/* 음식 월드컵 — 분식집 연두 포마이카 식탁 + 하얀 칼선 음식 스티커 + 고추장 빨강 도장 */
@font-face { font-family: 'WC Sign'; src: url(fonts/wc-sign.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: 'WC Pen'; src: url(fonts/wc-pen.woff2) format('woff2'); font-display: swap; }

:root {
  --table: #8cc7ad; --table-2: #7dbca0; --table-3: #a6d6c0;
  --ink: #2b1a15; --ink-2: #5a463d;
  --paper: #fff8e7; --paper-2: #f4e9cf;
  --chili: #e2361f; --chili-d: #b2261a;
  --danmuji: #ffd23a; --steel: #cfd6d9; --wood: #d79a58;
  --sign: 'WC Sign', 'Pretendard Variable', 'Apple SD Gothic Neo', sans-serif;
  --pen: 'WC Pen', 'Pretendard Variable', 'Apple SD Gothic Neo', sans-serif;
  --ui: 'Pretendard Variable', Pretendard, -apple-system, 'Apple SD Gothic Neo', 'Malgun Gothic', system-ui, sans-serif;
  --dish: min(58vw, 27svh, 300px);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { scrollbar-width: none; -webkit-text-size-adjust: 100%; }
html::-webkit-scrollbar { display: none; }
body {
  margin: 0; min-height: 100svh; height: auto; overflow-x: hidden; overflow-y: visible;
  color: var(--ink); font: 15px/1.5 var(--ui);
  background-color: var(--table);
  /* 포마이카 식탁: 잔 점박이 + 종이 결 */
  background-image:
    radial-gradient(circle at 30% 40%, rgba(255,255,255,.28) 0 1px, transparent 1.6px),
    radial-gradient(circle at 70% 20%, rgba(43,26,21,.13) 0 1px, transparent 1.6px),
    radial-gradient(circle at 50% 80%, rgba(255,255,255,.18) 0 1.4px, transparent 2px),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .17 0 0 0 0 .1 0 0 0 0 .08 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 23px 19px, 31px 29px, 41px 37px, 180px 180px;
  -webkit-tap-highlight-color: transparent;
}
button { font: inherit; color: inherit; }
img { display: block; -webkit-user-drag: none; user-select: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 6px; }

/* ---------- 머리 ---------- */
.top { position: absolute; inset: 0 0 auto; z-index: 20; display: flex; align-items: center; gap: 10px; padding: max(10px, env(safe-area-inset-top)) 16px 0; }
.logo { font: 400 22px/1 var(--sign); color: var(--ink); text-decoration: none; padding: 6px 2px; letter-spacing: -.01em; }
.crumb { margin-right: auto; background: none; border: 0; padding: 6px 8px; font: 600 14px/1 var(--ui); color: var(--ink-2); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.top .logo + .chip { margin-left: auto; }
.chip { margin-left: auto; appearance: none; border: 2px solid var(--ink); background: var(--paper); border-radius: 999px; padding: 5px 12px; font: 700 13px/1 var(--ui); cursor: pointer; box-shadow: 0 2px 0 var(--ink); }
.chip[aria-pressed="false"] { background: transparent; box-shadow: none; opacity: .75; }

.app { position: relative; min-height: 100svh; display: grid; overflow-x: clip; }
.scr { grid-area: 1 / 1; min-height: 100svh; padding: calc(max(10px, env(safe-area-inset-top)) + 48px) 16px max(18px, env(safe-area-inset-bottom)); }

/* ---------- 공용 단추 ---------- */
.go, .btn {
  appearance: none; border: 3px solid var(--ink); border-radius: 14px; cursor: pointer;
  font: 400 22px/1 var(--sign); padding: 15px 22px 13px; letter-spacing: .01em;
  background: var(--chili); color: var(--paper); box-shadow: 0 5px 0 var(--ink);
  transition: transform .08s ease, box-shadow .08s ease; text-decoration: none; text-align: center;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.go:active, .btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--ink); }
.btn { background: var(--paper); color: var(--ink); font-size: 18px; padding: 12px 14px 10px; border-radius: 12px; box-shadow: 0 4px 0 var(--ink); }
.btn.ghost, .ghost { background: transparent; box-shadow: none; border-color: rgba(43,26,21,.55); }
.ghost:disabled { opacity: .35; cursor: default; }

/* ---------- 시작: 메뉴판 ---------- */
.start { position: relative; display: grid; place-items: center; overflow: hidden; }
.start-in { position: relative; z-index: 2; width: min(100%, 460px); display: grid; justify-items: center; gap: 14px; }
.pile { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.pile img { position: absolute; width: var(--s, 120px); height: auto; opacity: 0; animation: land .7s cubic-bezier(.2,1.4,.4,1) forwards; animation-delay: var(--d, 0s); }
@keyframes land { 0% { opacity: 0; transform: translate(-50%,-50%) translateY(-60px) scale(1.5) rotate(var(--r0, 0deg)); } 60% { opacity: 1; } 100% { opacity: 1; transform: translate(-50%,-50%) scale(1) rotate(var(--r, 0deg)); } }

.title { margin: 6px 0 0; display: flex; flex-direction: column; align-items: center; font: 400 clamp(66px, 22vw, 116px)/.86 var(--sign); letter-spacing: -.02em; color: var(--chili);
  text-shadow: 3px 0 0 var(--paper), -3px 0 0 var(--paper), 0 3px 0 var(--paper), 0 -3px 0 var(--paper), 2px 2px 0 var(--paper), -2px 2px 0 var(--paper), 2px -2px 0 var(--paper), -2px -2px 0 var(--paper), 4px 8px 0 var(--ink); }
.title span:last-child { color: var(--ink); text-shadow: 3px 0 0 var(--paper), -3px 0 0 var(--paper), 0 3px 0 var(--paper), 0 -3px 0 var(--paper), 2px 2px 0 var(--paper), -2px 2px 0 var(--paper), 2px -2px 0 var(--paper), -2px -2px 0 var(--paper), 4px 8px 0 var(--chili); transform: rotate(-2deg); }
.lede { margin: 2px 0 4px; font: 400 23px/1.25 var(--pen); text-align: center; color: var(--ink); background: rgba(255,248,231,.72); padding: 2px 10px; border-radius: 6px; }

.menu { width: 100%; background: var(--paper); border: 3px solid var(--ink); border-radius: 6px; padding: 8px 10px; box-shadow: 0 6px 0 rgba(43,26,21,.85), 0 18px 30px -12px rgba(43,26,21,.5); transform: rotate(-.6deg); position: relative; }
.menu::before { content: '차림표'; position: absolute; top: -15px; left: 50%; transform: translateX(-50%) rotate(1.2deg); background: var(--danmuji); border: 2px solid var(--ink); padding: 3px 14px 1px; font: 400 17px/1.2 var(--sign); }
.menu button { width: 100%; display: grid; grid-template-columns: auto auto 1fr auto; align-items: center; gap: 8px; background: none; border: 0; border-bottom: 2px dashed rgba(43,26,21,.25); padding: 10px 6px 9px; cursor: pointer; text-align: left; border-radius: 4px; }
.menu button:last-child { border-bottom: 0; }
.menu .thumbs { display: flex; }
.menu .thumbs img { width: 34px; height: 34px; margin-right: -12px; }
.menu .nm { font: 400 24px/1 var(--sign); padding-left: 10px; white-space: nowrap; }
.menu .lead { height: 0; border-bottom: 3px dotted rgba(43,26,21,.45); align-self: center; margin-top: 8px; }
.menu .pr { font: 400 22px/1 var(--sign); color: var(--chili); }
.menu button[aria-checked="true"] { background: var(--chili); color: var(--paper); border-bottom-color: transparent; }
.menu button[aria-checked="true"] .pr { color: var(--danmuji); }
.menu button[aria-checked="true"] .lead { border-color: rgba(255,248,231,.6); }

.sizes { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.sizes button { appearance: none; border: 2.5px solid var(--ink); background: var(--paper); border-radius: 10px; padding: 7px 14px 6px; cursor: pointer; display: grid; justify-items: center; gap: 1px; box-shadow: 0 3px 0 var(--ink); }
.sizes b { font: 400 22px/1 var(--sign); }
.sizes small { font: 600 11.5px/1.2 var(--ui); color: var(--ink-2); }
.sizes button[aria-checked="true"] { background: var(--danmuji); transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.start .go { width: 100%; font-size: 28px; padding: 18px 20px 15px; margin-top: 4px; }

/* ---------- 대결 ---------- */
.match { display: grid; grid-template-rows: auto 1fr auto; justify-items: center; gap: 6px; }
.slip { position: relative; display: flex; align-items: baseline; gap: 10px; background: var(--paper); border: 2px solid var(--ink); border-bottom: 0; padding: 8px 16px 12px; font-family: var(--sign); transform: rotate(-1deg);
  -webkit-mask: linear-gradient(#000 0 0) top / 100% calc(100% - 7px) no-repeat, conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / 14px 7px repeat-x;
          mask: linear-gradient(#000 0 0) top / 100% calc(100% - 7px) no-repeat, conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / 14px 7px repeat-x; }
.slip-set { font-size: 17px; color: var(--ink-2); }
.slip-round { font-weight: 400; font-size: 27px; color: var(--chili); line-height: 1; }
.slip-count { font-size: 17px; }
.arena { position: relative; width: 100%; max-width: 1200px; display: grid; grid-template-rows: 1fr auto 1fr; align-items: center; justify-items: center; }
.dish { appearance: none; background: none; border: 0; padding: 0; cursor: pointer; display: grid; justify-items: center; gap: 2px; touch-action: manipulation; position: relative; will-change: transform; }
.dish .plate { position: relative; width: var(--dish); height: var(--dish); display: block; }
.dish .plate img { width: 100%; height: 100%; }
.dish .tag { display: flex; align-items: baseline; gap: 6px; background: var(--danmuji); border: 2px solid var(--ink); padding: 6px 14px 3px; margin-top: -10px; position: relative; z-index: 2; transform: rotate(var(--tilt, -2deg));
  clip-path: polygon(0 8%, 4% 0, 96% 4%, 100% 0, 98% 52%, 100% 100%, 3% 96%, 0 100%, 2% 50%); }
.dish[data-side="1"] .tag { --tilt: 1.6deg; }
.dish .nm { font: 400 clamp(22px, 6.4vw, 34px)/1 var(--sign); white-space: nowrap; }
.dish .mk { font: 700 12px/1 var(--ui); color: var(--ink-2); }
.dish .mk:empty { display: none; }
.dish .ds { font: 400 clamp(18px, 5vw, 24px)/1.15 var(--pen); color: var(--ink); max-width: min(86vw, 420px); text-align: center; margin-top: 2px; }
@media (hover: hover) { .dish:hover .plate img { transform: translateY(-4px) rotate(-1.5deg); } .dish .plate img { transition: transform .18s ease; } }
.dish:active .plate { transform: scale(.97); }
.vs { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; background: var(--chili); color: var(--paper); border: 3px solid var(--ink); font: 400 25px/1 var(--sign); transform: rotate(-10deg); box-shadow: 0 4px 0 var(--ink); z-index: 3; margin: -8px 0; }
.vs.pop { animation: vspop .45s cubic-bezier(.2,1.6,.4,1); }
@keyframes vspop { 0% { transform: rotate(-10deg) scale(.2); } 100% { transform: rotate(-10deg) scale(1); } }
.mfoot { display: flex; align-items: center; gap: 14px; }
.mfoot .ghost { border: 2px solid rgba(43,26,21,.5); border-radius: 10px; padding: 7px 14px 6px; font: 400 17px/1 var(--sign); cursor: pointer; }
.keys { font: 600 12.5px/1 var(--ui); color: var(--ink-2); display: none; }
@media (hover: hover) and (pointer: fine) { .keys { display: inline; } }
@media (hover: none), (max-width: 699px) { .keys { display: none !important; } }

/* 찜 도장 */
.seal { position: absolute; left: 50%; top: 46%; width: 44%; aspect-ratio: 1; margin: -22% 0 0 -22%; border-radius: 50%; display: grid; place-items: center; z-index: 4; pointer-events: none;
  border: 5px solid var(--chili); box-shadow: inset 0 0 0 3px var(--paper), inset 0 0 0 6px var(--chili); color: var(--chili); font: 400 clamp(30px, 9vw, 54px)/1 var(--sign); background: rgba(255,248,231,.82);
  -webkit-mask: radial-gradient(circle at 30% 30%, #000 60%, #0008 61% 63%, #000 64%) , linear-gradient(#000 0 0); mask: radial-gradient(circle at 30% 30%, #000 60%, #0008 61% 63%, #000 64%); }

/* ---------- 라운드 넘어갈 때 ---------- */
.rb { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; background: rgba(43,26,21,.42); cursor: pointer; padding: 16px; }
.rb-in { display: grid; justify-items: center; gap: 10px; width: min(100%, 560px); }
.rb-stamp { margin: 0; font: 400 clamp(92px, 32vw, 190px)/.9 var(--sign); color: var(--danmuji); transform: rotate(-7deg);
  text-shadow: 4px 0 0 var(--ink), -4px 0 0 var(--ink), 0 4px 0 var(--ink), 0 -4px 0 var(--ink), 3px 3px 0 var(--ink), -3px 3px 0 var(--ink), 3px -3px 0 var(--ink), -3px -3px 0 var(--ink), 6px 12px 0 var(--chili); }
.rb-sub { margin: 0; font: 400 26px/1.2 var(--pen); color: var(--paper); text-align: center; }
.rb-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 4px; max-width: 520px; }
.rb-grid figure { margin: 0; width: var(--g, 78px); display: grid; justify-items: center; opacity: 0; animation: rbin .42s cubic-bezier(.2,1.5,.4,1) forwards; animation-delay: var(--d); }
.rb-grid img { width: 100%; height: auto; }
.rb-grid figcaption { font: 600 11.5px/1.1 var(--ui); color: var(--paper); text-align: center; margin-top: -4px; white-space: nowrap; }
@keyframes rbin { from { opacity: 0; transform: translateY(26px) scale(.4) rotate(-14deg); } to { opacity: 1; transform: none; } }
.rb-tap { margin: 4px 0 0; font: 600 13px/1 var(--ui); color: rgba(255,248,231,.8); }
.rb.go-in .rb-stamp { animation: stamp .5s cubic-bezier(.3,1.6,.5,1) both; }
@keyframes stamp { 0% { opacity: 0; transform: rotate(-20deg) scale(2.6); } 70% { opacity: 1; } 100% { transform: rotate(-7deg) scale(1); } }

/* ---------- 우승 ---------- */
.win { display: grid; justify-items: center; align-content: start; text-align: center; gap: 4px; overflow-x: clip; }
.rays, .trophy, .podium, .stage { pointer-events: none; }
.stage { position: relative; width: min(100%, 520px); height: min(66vw, 350px, 42svh); margin-top: 4px; display: grid; }
.rays { position: absolute; left: 50%; top: 42%; width: 150%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; opacity: 0;
  background: repeating-conic-gradient(rgba(255,210,58,.75) 0 9deg, transparent 9deg 22.5deg);
  -webkit-mask: radial-gradient(circle, #000 18%, transparent 62%); mask: radial-gradient(circle, #000 18%, transparent 62%); }
.win.show .rays { opacity: 1; transition: opacity .6s .9s; animation: spin 40s linear infinite; }
@keyframes spin { to { transform: translate(-50%, -50%) rotate(1turn); } }
.trophy { position: absolute; z-index: 4; right: 2%; top: 0; width: 30%; opacity: 0; }
.trophy svg { width: 100%; height: auto; display: block; }
.win.show .trophy { animation: trophy 1s cubic-bezier(.2,1.3,.4,1) 1.25s forwards; }
@keyframes trophy { 0% { opacity: 0; transform: translateY(-120px) rotate(-30deg) scale(.6); } 60% { opacity: 1; } 100% { opacity: 1; transform: translateY(0) rotate(8deg) scale(1); } }
.podium { position: absolute; inset: auto 0 0; display: grid; grid-template-columns: 1fr 1.25fr 1fr; align-items: end; gap: 0; padding: 0 4%; }
.step { position: relative; display: grid; justify-items: center; border: 3px solid var(--ink); border-bottom: 0; border-radius: 6px 6px 0 0; transform-origin: bottom; transform: scaleY(0); }
.step i { font: 400 34px/1 var(--sign); font-style: normal; padding: 8px 0 6px; }
.step.s1 { height: 26%; height: calc(var(--h, 300px) * .3); background: var(--danmuji); z-index: 2; }
.step.s2 { height: calc(var(--h, 300px) * .2); background: var(--steel); margin-right: -3px; }
.step.s3 { height: calc(var(--h, 300px) * .14); background: var(--wood); margin-left: -3px; }
.win.show .step { animation: rise .5s cubic-bezier(.3,1.4,.5,1) forwards; }
.win.show .s2 { animation-delay: .1s; } .win.show .s3 { animation-delay: .2s; } .win.show .s1 { animation-delay: .3s; }
@keyframes rise { to { transform: scaleY(1); } }
.on { position: absolute; bottom: calc(100% - 10px); left: 50%; display: flex; justify-content: center; opacity: 0; }
.on img { width: var(--w); height: auto; }
.s2 .on, .s3 .on { --w: min(24vw, 116px); }
.s3 .on img + img { margin-left: calc(var(--w) * -.45); }
.s1 .on { --w: min(46vw, 222px); bottom: calc(100% - 4px); }
.win.show .s2 .on { animation: drop .55s cubic-bezier(.3,1.5,.5,1) .55s forwards; }
.win.show .s3 .on { animation: drop .55s cubic-bezier(.3,1.5,.5,1) .7s forwards; }
.win.show .s1 .on { animation: drop .7s cubic-bezier(.3,1.6,.5,1) .95s forwards; }
@keyframes drop { 0% { opacity: 0; transform: translate(-50%, -140px) rotate(-8deg); } 50% { opacity: 1; } 100% { opacity: 1; transform: translate(-50%, 0) rotate(0); } }
.win-kicker { margin: 4px 0 0; font: 400 22px/1 var(--pen); }
.win-name { margin: 0; font: 400 clamp(44px, 13vw, 76px)/.95 var(--sign); color: var(--chili); letter-spacing: -.01em;
  text-shadow: 3px 0 0 var(--paper), -3px 0 0 var(--paper), 0 3px 0 var(--paper), 0 -3px 0 var(--paper), 2px 2px 0 var(--paper), -2px 2px 0 var(--paper), 2px -2px 0 var(--paper), -2px -2px 0 var(--paper), 3px 6px 0 var(--ink); }
.win-desc { margin: 2px 0 0; font: 400 22px/1.2 var(--pen); }
.win-vs { margin: 0; font: 600 13px/1.4 var(--ui); color: var(--ink-2); min-height: 1em; }
.win-vs b { color: var(--ink); }
.win-acts { width: min(100%, 440px); display: grid; gap: 10px; margin-top: 8px; }
.win-acts .row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.eat { font-size: 26px; }

/* ---------- 대진표 ---------- */
.bracket { display: grid; justify-items: center; align-content: start; gap: 6px; text-align: center; }
.br-kicker { margin: 0; font: 400 21px/1.2 var(--pen); }
.br-title { margin: 0; font: 400 clamp(30px, 8.6vw, 46px)/1.05 var(--sign); }
.br-title em { font-style: normal; color: var(--chili); white-space: nowrap; }
.br-wrap { width: min(100%, 92svh - 230px, 640px); min-width: min(100%, 340px); aspect-ratio: 1; }
.br-svg { width: 100%; height: 100%; display: block; overflow: visible; }
.br-legend { margin: 0; font: 600 12.5px/1.4 var(--ui); color: var(--ink-2); }
.br-acts { width: min(100%, 440px); display: grid; gap: 10px; margin-top: 6px; }
.br-acts .row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.br-svg .node { opacity: 0; animation: nodein .4s ease forwards; animation-delay: var(--d, 0s); }
@keyframes nodein { to { opacity: var(--o, 1); } }

/* ---------- 식권 ---------- */
.tk { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: rgba(43,26,21,.94); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); padding: 16px; overflow-y: auto; }
.tk-in { display: grid; justify-items: center; gap: 24px; width: min(100%, 360px); }
.ticket { position: relative; width: 100%; background: var(--paper); padding: 0 22px 20px; text-align: center; animation: tkin .55s cubic-bezier(.2,1.4,.4,1);
  -webkit-mask: radial-gradient(circle 9px at 0 50%, #0000 98%, #000) left / 51% 22px repeat-y, radial-gradient(circle 9px at 100% 50%, #0000 98%, #000) right / 51% 22px repeat-y;
          mask: radial-gradient(circle 9px at 0 50%, #0000 98%, #000) left / 51% 22px repeat-y, radial-gradient(circle 9px at 100% 50%, #0000 98%, #000) right / 51% 22px repeat-y; }
@keyframes tkin { from { transform: translateY(-40px) rotate(-6deg); opacity: 0; } to { transform: rotate(-1.5deg); opacity: 1; } }
.ticket { transform: rotate(-1.5deg); }
.tk-head { margin: 0 -22px; background: var(--chili); color: var(--paper); display: flex; justify-content: space-between; align-items: baseline; padding: 12px 26px 9px; border-bottom: 3px dashed var(--paper); }
.tk-head span { font: 400 30px/1 var(--sign); letter-spacing: .3em; }
.tk-head small { font: 600 12px/1 var(--ui); opacity: .9; }
.tk-kicker { margin: 14px 0 0; font: 400 25px/1 var(--pen); }
.tk-img { width: 70%; height: auto; margin: 2px auto -4px; }
.tk-name { margin: 0; font: 400 40px/1 var(--sign); color: var(--ink); }
.tk-meta { margin: 8px 0 0; font: 600 12.5px/1.5 var(--ui); color: var(--ink-2); border-top: 2px dotted rgba(43,26,21,.35); padding-top: 10px; }
.tk-seal { position: absolute; right: 16px; top: 62px; width: 74px; height: 74px; border-radius: 50%; border: 3.5px solid var(--chili); color: var(--chili); display: grid; place-items: center; font: 400 21px/1 var(--sign); transform: rotate(14deg); opacity: .88; box-shadow: inset 0 0 0 3px var(--paper), inset 0 0 0 5px var(--chili); }
.tk-acts { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tk-acts .go, .tk-acts .ghost { grid-column: 1 / -1; }
.tk-acts .map { font-size: 16px; padding: 12px 6px 10px; }
.tk-acts .ghost { color: var(--paper); border-color: rgba(255,248,231,.6); }

/* ---------- 기타 ---------- */
.confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; }
/* 꽃가루는 시상대 위로만, 글자·단추보다 아래 */
.win > :not(.stage) { position: relative; z-index: 2; }
body[data-modal] .win-acts, body[data-modal] .confetti { visibility: hidden; }
.win-match { margin: 6px 0 2px; display: inline-grid; grid-template-columns: auto auto; grid-template-areas: "l n" "p n"; align-items: center; column-gap: 12px; background: var(--danmuji); border: 3px solid var(--ink); border-radius: 12px; padding: 6px 16px 6px 18px; box-shadow: 0 4px 0 var(--ink); transform: rotate(-2deg); text-align: left; }
.win-match span { grid-area: l; font: 400 17px/1.1 var(--sign); }
.win-match em { grid-area: p; font: 700 13px/1.2 var(--ui); font-style: normal; color: var(--ink-2); }
.win-match b { grid-area: n; font: 400 46px/1 var(--sign); color: var(--chili); }
.win-match b small { font-size: 26px; color: var(--ink); }
.toast { position: fixed; left: 50%; top: calc(max(10px, env(safe-area-inset-top)) + 50px); transform: translate(-50%, -16px); background: var(--ink); color: var(--paper); padding: 10px 18px; border-radius: 10px; font: 600 14px/1.3 var(--ui); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 60; max-width: calc(100% - 32px); text-align: center; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.copybox { position: fixed; inset: auto 16px max(16px, env(safe-area-inset-bottom)); z-index: 61; background: var(--paper); border: 3px solid var(--ink); border-radius: 12px; padding: 12px; display: grid; gap: 8px; }
.copybox input { width: 100%; font: 14px/1.3 var(--ui); padding: 8px; border: 2px solid var(--ink); border-radius: 8px; }
.fallback { position: fixed; inset: auto 16px 40%; text-align: center; font: 600 16px/1.4 var(--ui); }

/* ---------- 넓은 화면: 접시 둘을 나란히 ---------- */
@media (min-aspect-ratio: 1/1) and (min-width: 700px) {
  :root { --dish: min(31vw, 50svh, 460px); }
  .arena { grid-template-rows: none; grid-template-columns: 1fr auto 1fr; }
  .vs { width: 84px; height: 84px; font-size: 36px; margin: 0 -10px; }
  .dish .nm { font-size: clamp(28px, 3vw, 46px); }
  .dish .ds { font-size: clamp(22px, 2vw, 30px); }
  .stage { height: min(40svh, 380px); }
  .win { gap: 2px; }
  .title { font-size: clamp(90px, 11vw, 150px); }
  .start-in { width: min(100%, 520px); }
}
@media (min-width: 1500px) and (min-aspect-ratio: 1/1) { .slip-round { font-size: 40px; } .slip-set, .slip-count { font-size: 24px; } }
@media (max-height: 700px) and (max-aspect-ratio: 1/1) {
  :root { --dish: min(50vw, 20.5svh, 240px); }
  .scr { padding-top: calc(max(8px, env(safe-area-inset-top)) + 42px); padding-bottom: 10px; }
  .match { gap: 2px; }
  .slip { padding: 5px 14px 10px; } .slip-round { font-size: 23px; }
  .vs { width: 44px; height: 44px; font-size: 19px; margin: 4px 0; box-shadow: 0 3px 0 var(--ink); }
  .dish .tag { padding: 4px 12px 2px; margin-top: -6px; } .dish .nm { font-size: 22px; } .dish .ds { font-size: 17px; }
  .mfoot .ghost { padding: 5px 12px 4px; }
}
@media (max-height: 700px) { .title { font-size: clamp(54px, 17vw, 80px); } .menu .nm { font-size: 21px; } .menu button { padding: 7px 6px 6px; } .lede { font-size: 20px; } .start .go { padding: 14px 20px 12px; } }

/* ---------- 설명서 ---------- */
.guide { position: relative; z-index: 5; padding: 40px 16px 30px; content-visibility: auto; contain-intrinsic-size: auto 1800px; }
.guide-in { max-width: 720px; margin: 0 auto; background: var(--paper); border: 3px solid var(--ink); border-radius: 8px; padding: 26px clamp(18px, 5vw, 40px) 18px; box-shadow: 0 6px 0 rgba(43,26,21,.85); font: 16px/1.78 var(--ui); }
.guide h2 { font: 400 clamp(26px, 6.4vw, 34px)/1.2 var(--sign); margin: 6px 0 12px; }
.guide h3 { font: 400 23px/1.25 var(--sign); color: var(--chili-d); margin: 30px 0 10px; }
.guide p { margin: 0 0 12px; }
.guide b { display: block; font-weight: 750; }
.guide .steps { list-style: none; counter-reset: s; padding: 0; margin: 0; display: grid; gap: 14px; }
.guide .steps li { counter-increment: s; position: relative; padding-left: 48px; }
.guide .steps li::before { content: counter(s); position: absolute; left: 0; top: 2px; width: 34px; height: 34px; border-radius: 50%; border: 2.5px solid var(--ink); background: var(--danmuji); display: grid; place-items: center; font: 400 19px/1 var(--sign); }
.guide .faq { margin: 0; }
.guide .faq dt { font-weight: 750; margin-top: 14px; }
.guide .faq dd { margin: 4px 0 0; color: #3e2e27; }
.guide .when { padding-left: 0; list-style: none; display: grid; gap: 10px; margin: 0; }
.guide .when li { border-left: 4px solid var(--table-2); padding-left: 12px; }
.guide .more ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.guide .more a { display: block; color: inherit; text-decoration: none; border: 2px solid rgba(43,26,21,.25); border-radius: 10px; padding: 10px 14px; }
.guide .more a:hover { border-color: var(--ink); }
.guide .credit { margin-top: 22px; font-size: 12.5px; color: var(--ink-2); }
.site-foot { text-align: center; font-size: 13px; padding: 18px 0 4px; color: var(--ink-2); }
.site-foot a { color: inherit; }
.site-foot .sep { margin: 0 8px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
  .win.show .rays { animation: none; }
}

/* ---------- 실사진: 흰 테두리 + 먹선 원형 접시 (사진 없는 항목은 그림 그대로) ---------- */
img[src*="/vendor/food/"] { aspect-ratio: 1; object-fit: cover; border-radius: 50%; background: #fff; border: var(--rim, 5px) solid #fff; box-sizing: border-box; box-shadow: 0 0 0 2px var(--ink), 0 5px 0 2px rgba(43,26,21,.2); }
.menu .thumbs img[src*="/vendor/food/"] { --rim: 2px; box-shadow: 0 0 0 1.5px var(--ink); }
.dish .plate img[src*="/vendor/food/"] { --rim: 7px; box-shadow: 0 0 0 3px var(--ink), 0 8px 0 3px rgba(43,26,21,.22); }
.rb-grid img[src*="/vendor/food/"] { --rim: 3px; width: 88%; margin-bottom: 6px; }
.on img[src*="/vendor/food/"] { --rim: 4px; }
.tk-credit { margin: 6px 0 0; font: 500 11px/1.3 var(--ui); color: var(--ink-2); text-align: center; }
.tk-credit:empty { display: none; }
.guide .credits p, .guide .credits li { font-size: 13px; color: var(--ink-2); }
.guide .credits summary { cursor: pointer; font-weight: 700; min-height: 44px; display: flex; align-items: center; }
.guide .credits ul { padding-left: 1.1em; margin: 6px 0 0; }
.guide .credits a { color: inherit; overflow-wrap: anywhere; }
