:root {
  color-scheme: light;
  --ink: #332f2b;
  --muted: #746e65;
  --red: #e86045;
  --line: #dfd9cc;
  font-family: "Malgun Gothic", "Apple SD Gothic Neo", "Noto Sans KR", system-ui, sans-serif;
  color: var(--ink);
  background: #faf8f2;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 280px; }
button, input, select { font: inherit; }
button { color: inherit; cursor: pointer; touch-action: manipulation; }
button:disabled { cursor: default; opacity: .52; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid #267e73; outline-offset: 3px; }
button, input { -webkit-tap-highlight-color: transparent; }
button, h1, h2, p { margin: 0; }
.symbols, .visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.icon { width: 1.25rem; height: 1.25rem; display: inline-block; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.topbar { height: 70px; border-bottom: 1px solid #ded9cd; background: #fffdf8; }
.bar-inner { max-width: 1168px; height: 100%; padding: 0 38px; margin: auto; display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 7px; font-size: 1.6rem; font-weight: 950; letter-spacing: -.095em; }
.brand img { transform: rotate(-6deg); }
.date { display: flex; align-items: center; gap: 8px; color: #625b50; font-size: .875rem; font-weight: 600; }
.date .icon { width: 16px; height: 16px; }
main { max-width: 1100px; padding: 0 32px 40px; margin: auto; }
.intro { text-align: center; padding: 38px 0 33px; }
h1 { font-size: clamp(2.45rem,4.4vw,3.55rem); font-weight: 950; letter-spacing: -.086em; line-height: 1.35; }
h1 em { color: var(--red); font-style: normal; position: relative; display: inline-block; white-space: nowrap; }
h1 em svg { position: absolute; left: 1%; bottom: -2px; width: 100%; height: 9px; fill: none; stroke: #efab79; stroke-width: 3; stroke-linecap: round; }
.intro p { color: #716b62; margin-top: 13px; line-height: 1.55; font-size: 1.02rem; letter-spacing: -.036em; word-break: keep-all; }
.filters { margin: 0 0 19px; padding: 12px 18px; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 25px; background: #fffdf8; border: 1px solid #d7cebf; border-radius: 14px; }
.filter-label, .edit-field { font-size: .88rem; font-weight: 700; color: #544a3e; }
.cuisine-filter, .filter-group { display: flex; align-items: center; gap: 10px; }
.filters select, .edit-field select { appearance: none; color: var(--ink); border: 1px solid #c8bead; border-radius: 8px; padding: 7px 30px 7px 10px; background: #fffdf8 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='m1.5 1.5 4.5 4.5 4.5-4.5' fill='none' stroke='%23645a4b' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 10px center; font-size: .94rem; cursor: pointer; min-height: 36px; }
.cuisine-filter select { min-width: 132px; }
.filter-options { display: inline-flex; padding: 3px; gap: 2px; border-radius: 10px; border: 1px solid var(--line); background: #f6f2e9; }
.filter-options label { position: relative; cursor: pointer; }
.filter-options input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.filter-options span { display: block; padding: 5px 12px; border: 1px solid transparent; border-radius: 7px; font-size: .875rem; color: #62594d; line-height: 1.35; }
.filter-options input:checked + span { color: #863c27; background: #ffead6; border-color: #e3bc9e; font-weight: 750; }
.filter-options input:focus-visible + span { outline: 3px solid #267e73; outline-offset: 1px; }
.filters:disabled { opacity: .6; }
.filters .clear-filters { margin-left: auto; }
.clear-filters[hidden] { display: none; }
.edit-field { display: grid; gap: 5px; margin-top: 14px; }
.board { display: grid; grid-template-columns: minmax(0,1.28fr) minmax(0,1fr); gap: 24px; align-items: stretch; }
.card { border: 1.8px solid var(--ink); border-radius: 21px; box-shadow: 3px 4px 0 #403a33; }
.play-card { position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; padding: 20px 25px 18px; background-color: #fff8e9; background-image: radial-gradient(#b59e783b .8px,transparent .9px); background-size: 13px 13px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-height: 34px; }
h2 { display: flex; align-items: center; gap: 9px; font-size: 1.34rem; line-height: 1.35; letter-spacing: -.06em; font-weight: 850; }
.ink-accent { width: 24px; height: 24px; stroke: var(--ink); }
#wheel-heading .icon { fill: #f7c685; }
.icon-button { width: 34px; height: 34px; display: grid; place-items: center; background: #fffdf7; border: 1px solid #c8bead; border-radius: 50%; }
.icon-button .icon { width: 17px; height: 17px; }
.icon-button:hover { background: #ffedcf; }
.wheel-stage { flex: 1; min-height: 340px; position: relative; display: grid; place-items: center; padding: 15px 0 12px; }
.wheel-frame { width: min(100%,333px); aspect-ratio: 1; position: relative; }
#wheel { display: block; width: 100%; height: 100%; filter: drop-shadow(1px 4px 0 #403a3342); }
.pointer { position: absolute; width: 34px; height: 42px; left: 50%; top: -13px; transform: translateX(-50%); filter: drop-shadow(0 2px 0 #42332238); }
.spark { position: absolute; line-height: 1; user-select: none; }
.spark-a { left: 9%; top: 24%; font-size: 27px; color: #e7aa45; transform: rotate(12deg); }
.spark-b { right: 7%; top: 32%; font-size: 35px; color: #dc927d; transform: rotate(9deg); }
.spark-c { left: 4.5%; bottom: 24%; font-size: 20px; color: #9cae92; }
.spark-d { right: 10%; bottom: 19%; font-size: 17px; color: #e8ad54; }
.spin-controls { text-align: center; z-index: 1; }
.spin { display: inline-flex; justify-content: center; align-items: center; gap: 11px; min-height: 50px; width: min(100%,332px); background: var(--red); color: #fffdf5; font-weight: 800; font-size: 1.2rem; letter-spacing: -.03em; border: 1.8px solid var(--ink); border-radius: 12px; box-shadow: 2px 3px 0 var(--ink); transition: transform .15s, box-shadow .15s, background .15s; }
.spin .icon { width: 21px; height: 21px; stroke-width: 2.25; }
.spin:hover:enabled, .primary:hover { background: #d84f36; }
.spin:active:enabled, .add:active:enabled { transform: translate(2px,2px); box-shadow: 0 1px 0 var(--ink); }
.keyboard-hint { color: #796f5e; font-size: .8rem; margin-top: 13px; }
kbd { font-size: .75rem; font-family: inherit; border: 1px solid #c2b9a7; border-bottom-width: 2px; padding: 0 5px 1px; border-radius: 4px; background: #fffdf8; color: #746c5f; margin-right: 3px; }
.gingham { position: absolute; right: -2px; bottom: -2px; width: 75px; height: 75px; clip-path: polygon(100% 0,100% 100%,0 100%); background-image: repeating-linear-gradient(0deg,transparent 0 8px,#df695f52 8px 16px),repeating-linear-gradient(90deg,transparent 0 8px,#df695f52 8px 16px); pointer-events: none; z-index: -1; }
.menu-card { padding: 20px 23px; display: flex; flex-direction: column; min-width: 0; background: #fffefa; }
.menu-head { margin-bottom: 11px; }
.menu-search { display: flex; align-items: center; gap: 8px; margin: 1px 0 6px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: #faf9f4; color: var(--muted); }
.menu-search .icon { width: 16px; height: 16px; }
.menu-search input { flex: 1; width: 100%; min-width: 0; padding: 8px 0; border: 0; color: var(--ink); background: transparent; font-size: .9rem; }
.menu-search:focus-within { outline: 2px solid #267e73; outline-offset: 1px; }
.menu-search input:focus-visible { outline: 0; }
.food-emoji { font-family: "Apple Color Emoji","Segoe UI Emoji","Noto Color Emoji",sans-serif; line-height: 1; font-size: 1.6rem; }
.result-art .food-emoji { font-size: 4rem; }
.count { font-size: .8rem; padding: 2px 8px 3px; line-height: 1.4; color: #9a452d; background: #fae9db; border: 1px solid #efd4c1; border-radius: 20px; letter-spacing: -.025em; }
.reset { display: flex; align-items: center; gap: 4px; background: transparent; border: 0; color: #746c61; font-weight: 600; padding: 7px 0 7px 5px; font-size: .875rem; }
.reset .icon { width: 14px; height: 14px; }
.reset:hover { color: #af452e; }
#menu-list { list-style: none; margin: 0 0 15px; padding: 0; flex: 1 1 auto; height: 314px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #b8ad99 transparent; }
.menu-row { display: flex; align-items: center; gap: 13px; min-height: 59px; padding: 6px 1px; border-bottom: 1px dashed #ded9cf; }
.menu-row:last-child { border-bottom: 0; }
.thumb { width: 45px; height: 45px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--tint); }
.thumb img { width: 36px; height: 33px; object-fit: contain; }
.thumb .icon { width: 23px; height: 23px; }
.row-text { flex: 1; min-width: 0; }
.row-name { font-size: 1.02rem; line-height: 1.4; font-weight: 750; overflow-wrap: anywhere; letter-spacing: -.045em; }
.category { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: .8rem; letter-spacing: -.02em; border: 0; background: transparent; padding: 3px 0; text-align: left; }
.category .icon { width: 12px; height: 12px; }
.category:hover:enabled { color: #a24a32; text-decoration: underline; }
.remove { background: transparent; border: 0; width: 32px; height: 36px; color: #938b7f; border-radius: 8px; display: grid; place-items: center; }
.remove .icon { width: 15px; height: 15px; }
.remove:hover:enabled { color: #b7422c; background: #f9eae1; }
.add-form { border-top: 1px solid var(--line); padding-top: 15px; display: flex; gap: 9px; }
.add-form input { min-width: 0; width: 100%; border: 1px solid #c9c2b5; background: #faf9f4; color: var(--ink); border-radius: 9px; padding: 10px 12px; letter-spacing: -.035em; font-size: .94rem; }
.add-form input::placeholder { color: #817b72; }
.add { flex: none; width: 44px; height: 43px; border: 1.5px solid var(--ink); box-shadow: 1px 2px 0 var(--ink); color: #fff; background: #46453c; border-radius: 9px; display: grid; place-items: center; }
.add:hover:enabled { background: #302e29; }
.input-error { font-size: .875rem; color: #aa3827; margin-top: 8px; }
.empty-list { text-align: center; padding: 50px 0; font-size: .95rem; color: var(--muted); }
.dialog { position: fixed; width: min(370px,calc(100% - 38px)); padding: 30px; color: var(--ink); background: #fffaf0; border: 2px solid var(--ink); border-radius: 20px; box-shadow: 4px 5px 0 var(--ink); }
.dialog::backdrop { background: #322a226b; }
.dialog h2 { display: block; font-size: 1.5rem; word-break: keep-all; overflow-wrap: anywhere; }
.dialog p { margin: 12px 0; color: #6d6559; line-height: 1.6; word-break: keep-all; }
.dialog-actions { display: flex; gap: 10px; margin-top: 24px; }
.dialog-actions button { flex: 1; min-height: 43px; font-weight: 750; border-radius: 9px; border: 1.5px solid #3d3831; }
.secondary { background: #fffdf7; }
.secondary:hover { background: #f5ecd9; }
.primary { background: var(--red); color: white; }
.result-dialog { text-align: center; }
.dialog-x { position: absolute; right: 12px; top: 12px; }
.result-art { margin: 0 auto; width: 130px; height: 130px; display: grid; place-items: center; background: var(--tint,#f6e2b8); border-radius: 50%; }
.result-art img { width: 104px; height: 100px; object-fit: contain; }
.result-art .icon { width: 55px; height: 55px; }
.result-dialog p { margin-bottom: 3px; }
.result-dialog h2 { font-size: 2.2rem; }
@media (min-width: 1300px) and (min-height: 840px) {
  .intro { padding: 48px 0 39px; }
  .wheel-frame { width: 352px; }
  .wheel-stage { padding: 21px 0 16px; }
  .menu-row { min-height: 64px; }
  #menu-list { height: 350px; }
}
@media (max-width: 850px) {
  main { padding-inline: 23px; }
  .bar-inner { padding-inline: 26px; }
  .board { gap: 16px; grid-template-columns: minmax(0,1.12fr) minmax(0,1fr); }
  .play-card,.menu-card { padding-inline: 17px; }
  .spark { display: none; }
  .menu-row { gap: 10px; }
}
@media (max-width: 680px) {
  .topbar { height: 59px; }
  .bar-inner { padding-inline: 18px; }
  .brand { font-size: 1.32rem; }
  .brand img { width: 37px; height: 35px; }
  .date { font-size: .77rem; gap: 5px; }
  main { max-width: 520px; padding: 0 16px 28px; }
  .intro { padding: 26px 0 23px; }
  h1 { font-size: clamp(2rem,8.4vw,2.65rem); }
  .intro p { font-size: .91rem; margin: 12px auto 0; }
  .filters { gap: 9px 14px; padding: 11px 14px; align-items: center; }
  .cuisine-filter, .filter-group { width: 100%; }
  .filters .filter-label { min-width: 59px; }
  .filters .clear-filters { margin-left: 0; }
  .board { grid-template-columns: 1fr; gap: 20px; }
  .play-card,.menu-card { padding: 16px 18px; border-radius: 17px; }
  .wheel-stage { min-height: auto; padding: 17px 0 14px; }
  .wheel-frame { width: min(100%,300px); }
  .spin { width: min(100%,300px); min-height: 46px; }
  .keyboard-hint { display: none; }
  h2 { font-size: 1.21rem; }
  .menu-head { margin-bottom: 6px; }
  .gingham { width: 47px; height: 47px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0s !important; } }
