:root {
  --bg: #fff7ea;
  --bg-alt: #fff0d6;
  --card: #ffffff;
  --ink: #3a2816;
  --muted: #7b6450;
  --line: #f0dcbc;
  --red: #e8434f;
  --red-dark: #c42a37;
  --green: #3aa845;
  --green-dark: #23752c;
  --wood: #e8b06a;
  --radius: 18px;
  --shadow: 0 6px 20px rgba(120, 70, 20, .12);
  --display: 'Jua', 'Noto Sans KR', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Noto Sans KR', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  line-height: 1.7;
  word-break: keep-all;
  overflow-x: hidden;
}
img, canvas { display: block; }
a { color: var(--green-dark); }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.3; margin: 0 0 .5em; }

.wrap { width: 100%; max-width: 1040px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }

.skip { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

/* 헤더 */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 247, 234, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 58px; gap: 12px; }
.logo { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); font-family: var(--display); font-size: 1.45rem; }
.nav { display: flex; gap: 4px; overflow-x: auto; }
.nav { scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { padding: 6px 10px; border-radius: 999px; text-decoration: none; color: var(--muted); font-weight: 500; white-space: nowrap; font-size: .95rem; }
.nav a:hover { background: var(--bg-alt); color: var(--ink); }

/* 게임 영역 */
.play { padding: 20px 0 36px; background: radial-gradient(ellipse at top, #ffe7c4 0%, var(--bg) 70%); }
.hero-text { text-align: center; margin-bottom: 16px; }
.hero-text h1 { font-size: clamp(2rem, 6vw, 3rem); color: var(--green-dark); margin-bottom: .1em; }
.hero-text h1 small { display: block; font-size: .45em; color: var(--red); }
.lead { margin: 0 auto; max-width: 560px; color: var(--muted); }
.hero-pills {
  list-style: none; margin: 12px 0 0; padding: 0;
  display: flex; justify-content: center; flex-wrap: wrap; gap: 7px;
}
.hero-pills li {
  padding: 5px 10px; border: 1px solid rgba(58, 168, 69, .18); border-radius: 999px;
  background: rgba(255, 255, 255, .72); color: #5c4938; font-size: .78rem; font-weight: 700;
  box-shadow: 0 3px 12px rgba(120, 70, 20, .06);
}

.mode-switch {
  width: min(100%, 470px); margin: 0 auto 16px; padding: 4px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px;
  background: rgba(255, 255, 255, .72); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 5px 18px rgba(120, 70, 20, .08);
}
.mode-btn {
  min-width: 0; border: 0; border-radius: 12px; padding: 8px 10px;
  background: transparent; color: var(--muted); cursor: pointer; font: inherit;
}
.mode-btn span { display: block; font-weight: 700; }
.mode-btn small { display: block; font-size: .72rem; line-height: 1.35; }
.mode-btn.active { background: var(--green); color: #fff; box-shadow: 0 3px 10px rgba(35, 117, 44, .22); }
.mode-btn:focus-visible { outline: 3px solid var(--green-dark); outline-offset: 2px; }

.game-layout { display: flex; justify-content: center; align-items: flex-start; gap: 20px; }

.panel {
  width: 190px; flex-shrink: 0;
  display: flex; flex-direction: column; gap: 12px;
}
.stat {
  background: var(--card); border: 2px solid var(--line); border-radius: var(--radius);
  padding: 10px 14px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; align-items: center;
}
.stat-label { font-size: .85rem; color: var(--muted); font-weight: 500; }
.stat-value { font-family: var(--display); font-size: 1.9rem; font-weight: 400; line-height: 1.2; font-variant-numeric: tabular-nums; }
.stat-rta { border-color: rgba(232, 67, 79, .35); background: #fffaf1; }
.stat-rta .stat-value { color: var(--red-dark); font-size: 1.45rem; }
.stat-rta small { color: var(--muted); font-size: .72rem; }
.stat[hidden] { display: none; }
.panel-buttons { display: flex; flex-direction: column; gap: 8px; }
.btn-share { color: var(--green-dark); }

.board-wrap {
  position: relative;
  width: min(420px, 100%, calc((100svh - 150px) * 2 / 3));
  min-width: 260px;
  aspect-ratio: 2 / 3;
  border-radius: 22px;
  box-shadow: 0 10px 30px rgba(120, 70, 20, .22), 0 0 0 5px #d99a4f;
  overflow: hidden;
  background: #ffe8c2;
}
#game-canvas { width: 100%; height: 100%; touch-action: none; cursor: pointer; outline: none; -webkit-tap-highlight-color: transparent; }
#game-canvas:focus-visible { box-shadow: inset 0 0 0 3px var(--green); }

.combo-badge {
  position: absolute; left: 50%; top: 18%; transform: translate(-50%, -8px) scale(.9);
  z-index: 3; padding: 7px 14px; border-radius: 999px; pointer-events: none;
  background: rgba(58, 40, 22, .82); color: #fff; font-family: var(--display);
  font-size: 1.15rem; letter-spacing: .02em; box-shadow: 0 6px 18px rgba(58, 40, 22, .2);
  animation: combo-in .2s ease-out forwards;
}
.combo-badge[hidden] { display: none; }
@keyframes combo-in { to { transform: translate(-50%, 0) scale(1); } }

.controls-hint { text-align: center; color: var(--muted); font-size: .88rem; margin: 16px auto 8px; max-width: 640px; }
.run-stats {
  display: flex; justify-content: center; flex-wrap: wrap; gap: 7px 18px;
  max-width: 680px; margin: 0 auto 12px; color: var(--muted); font-size: .84rem;
}
.run-stats span { white-space: nowrap; }
.run-stats strong { color: var(--ink); font-variant-numeric: tabular-nums; }

.evolution {
  list-style: none; margin: 8px auto 0; padding: 12px;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 2px;
  background: var(--card); border: 2px solid var(--line); border-radius: var(--radius);
  max-width: 720px;
}
.evolution li { display: flex; flex-direction: column; align-items: center; width: 58px; font-size: .75rem; color: var(--muted); position: relative; }
.evolution li:not(:last-child)::after { content: '›'; position: absolute; right: -5px; top: 10px; color: #d2b48c; font-size: 1.1rem; }

/* 프리미엄 게임 콕핏 */
.play {
  position: relative; padding: 14px 0 48px; overflow: hidden;
  background:
    radial-gradient(circle at 12% 9%, rgba(255, 205, 84, .28), transparent 27%),
    radial-gradient(circle at 88% 18%, rgba(67, 181, 92, .17), transparent 30%),
    linear-gradient(180deg, #fff8e8 0%, #fff3dc 100%);
}
.play::before, .play::after {
  content: ''; position: absolute; width: 280px; height: 280px; border-radius: 50%;
  border: 55px solid rgba(58, 168, 69, .045); pointer-events: none;
}
.play::before { left: -170px; top: 100px; }
.play::after { right: -180px; top: 420px; }
.play > .wrap { max-width: 1180px; position: relative; z-index: 1; }
.hero-text { margin-bottom: 14px; }
.hero-text h1 { font-size: clamp(2.15rem, 4.6vw, 3.15rem); letter-spacing: -.025em; text-shadow: 0 3px 0 rgba(255,255,255,.8); }
.hero-text h1 small { margin-top: 3px; font-size: .4em; letter-spacing: .02em; }
.lead { max-width: 650px; font-size: .95rem; }

.game-shell {
  position: relative; padding: 14px 18px 16px; border-radius: 30px;
  background:
    radial-gradient(circle at 50% -30%, rgba(255, 222, 115, .22), transparent 45%),
    linear-gradient(145deg, #174d3c 0%, #0d392e 55%, #082d26 100%);
  border: 1px solid rgba(255,255,255,.15);
  box-shadow: 0 24px 55px rgba(44, 67, 45, .26), inset 0 1px 0 rgba(255,255,255,.16);
}
.game-shell::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: .28;
  background-image: radial-gradient(circle, rgba(255,255,255,.2) 1px, transparent 1px);
  background-size: 22px 22px; mask-image: linear-gradient(to bottom, #000, transparent 58%);
}
.game-shell-top {
  position: relative; z-index: 1; display: grid; grid-template-columns: 1fr auto 1fr;
  align-items: center; gap: 16px; margin-bottom: 14px;
}
.live-dot, .no-login { color: rgba(255,255,255,.66); font-size: .72rem; font-weight: 700; letter-spacing: .08em; }
.live-dot { display: flex; align-items: center; gap: 7px; }
.live-dot i { width: 8px; height: 8px; border-radius: 50%; background: #8bf28e; box-shadow: 0 0 0 5px rgba(139,242,142,.12); }
.no-login { justify-self: end; letter-spacing: 0; }
.game-shell .mode-switch {
  width: 460px; margin: 0; border-color: rgba(255,255,255,.13);
  background: rgba(1, 24, 19, .3); box-shadow: none;
}
.game-shell .mode-btn { color: rgba(255,255,255,.65); }
.game-shell .mode-btn.active { background: #fff6df; color: #164736; box-shadow: 0 4px 14px rgba(0,0,0,.2); }

.game-layout {
  position: relative; z-index: 1; display: grid;
  grid-template-columns: 205px minmax(310px, 400px) 235px;
  grid-template-areas: 'left board right'; justify-content: center; align-items: start; gap: 16px;
}
.panel { width: auto; min-width: 0; gap: 10px; }
.panel-left { grid-area: left; }
.panel-right { grid-area: right; }
.board-column { grid-area: board; min-width: 0; }
.panel-title { margin: 0; color: rgba(255,255,255,.58); font-size: .68rem; font-weight: 800; letter-spacing: .14em; }

.score-card {
  overflow: hidden; border-radius: 20px; color: #fff;
  background: linear-gradient(145deg, #ff6a60, #e8434f); border: 1px solid rgba(255,255,255,.2);
  box-shadow: 0 13px 28px rgba(0,0,0,.18), inset 0 1px 0 rgba(255,255,255,.28);
}
.score-main { display: flex; flex-direction: column; align-items: center; padding: 15px 12px 11px; }
.score-main .stat-label { color: rgba(255,255,255,.78); }
.score-main .stat-value { color: #fff; font-size: 2.8rem; line-height: 1; text-shadow: 0 3px 0 rgba(137,30,40,.28); }
.best-line {
  display: flex; justify-content: space-between; align-items: center; padding: 8px 13px;
  background: rgba(104, 18, 26, .18); font-size: .78rem;
}
.best-line span { color: rgba(255,255,255,.68); font-weight: 800; letter-spacing: .08em; }
.best-line strong { font-family: var(--display); font-size: 1.18rem; font-weight: 400; }
.game-shell .stat-rta { box-shadow: none; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.92); }

.run-stats { display: grid; grid-template-columns: 1fr; gap: 6px; width: 100%; margin: 0; }
.run-stats span {
  display: grid; grid-template-columns: 25px 1fr auto; align-items: center; gap: 6px;
  padding: 7px 9px; border: 1px solid rgba(255,255,255,.1); border-radius: 11px;
  background: rgba(255,255,255,.07); color: #fff;
}
.run-stats i { font-style: normal; }
.run-stats small { color: rgba(255,255,255,.6); font-size: .7rem; }
.run-stats strong { color: #fff; font-size: .8rem; }
.panel-buttons { gap: 7px; }
.game-shell .btn { border-width: 1px; padding: 8px 10px; font-size: .82rem; }
.game-shell .btn-ghost { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.16); }
.game-shell .btn-ghost:hover { background: rgba(255,255,255,.17); }
.game-shell .btn-share { background: #ffd459; color: #3b2b09; border-color: #f0ba28; box-shadow: 0 4px 0 #bd8613; }

.board-kicker { display: flex; align-items: center; justify-content: space-between; margin: 0 4px 8px; }
.board-kicker span { color: #8bf28e; font-size: .68rem; font-weight: 800; letter-spacing: .13em; }
.board-kicker strong { color: rgba(255,255,255,.7); font-size: .72rem; }
.board-wrap {
  width: 100%; min-width: 0; border-radius: 22px;
  border: 7px solid #d99a4f;
  box-shadow: 0 15px 36px rgba(0,0,0,.29), inset 0 0 0 2px rgba(255,255,255,.38), 0 0 0 1px #774921;
}

.next-card, .evolution-card {
  border: 1px solid rgba(255,255,255,.13); border-radius: 18px;
  background: rgba(255,255,255,.08); box-shadow: inset 0 1px 0 rgba(255,255,255,.09);
}
.next-card { padding: 13px; text-align: center; }
.next-card .panel-title { display: block; color: #ffd459; }
.next-card canvas { margin: 5px auto 2px; filter: drop-shadow(0 8px 7px rgba(0,0,0,.2)); }
.next-card small { display: block; color: rgba(255,255,255,.58); font-size: .68rem; }
.evolution-card { padding: 12px 9px 10px; }
.evolution-heading { display: flex; align-items: baseline; justify-content: space-between; padding: 0 4px 8px; }
.evolution-heading span { color: #8bf28e; font-size: .65rem; font-weight: 800; letter-spacing: .1em; }
.evolution-heading strong { color: #fff; font-size: .84rem; }
.game-shell .evolution {
  max-width: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px;
  border: 0; border-radius: 0; background: transparent;
}
.game-shell .evolution li {
  width: auto; min-width: 0; padding: 4px 1px; border-radius: 10px;
  background: rgba(255,255,255,.065); color: rgba(255,255,255,.67); font-size: .61rem;
}
.game-shell .evolution li:last-child { grid-column: 2; background: rgba(255, 212, 89, .16); color: #ffe69b; }
.game-shell .evolution li::after { display: none; }

.game-shell .controls-hint {
  position: relative; z-index: 1; display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 18px;
  max-width: none; margin: 14px 0 0; color: rgba(255,255,255,.62); font-size: .75rem;
}

/* 버튼 */
.btn {
  font: inherit; font-weight: 700; cursor: pointer;
  border-radius: 999px; padding: 10px 18px; border: 2px solid transparent;
  transition: transform .1s, background .15s;
}
.btn:active { transform: scale(.97); }
.btn:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }
.btn-primary { background: var(--red); color: #fff; border-color: var(--red-dark); box-shadow: 0 4px 0 var(--red-dark); }
.btn-primary:hover { background: #f0515d; }
.btn-ghost { background: var(--card); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--bg-alt); }

/* 게임오버 */
.overlay {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(58, 40, 22, .45); backdrop-filter: blur(2px); padding: 16px;
}
.overlay[hidden] { display: none; }
.overlay-card {
  background: var(--card); border-radius: 22px; padding: 24px 22px; text-align: center; width: 100%; max-width: 300px;
  box-shadow: var(--shadow); animation: pop .3s ease-out;
}
@keyframes pop { from { transform: scale(.85); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.overlay-card h2 { font-size: 2rem; color: var(--red); margin-bottom: .2em; }
.final { margin: 0; color: var(--muted); }
.final strong { display: block; font-family: var(--display); font-weight: 400; font-size: 2.6rem; color: var(--ink); line-height: 1.2; }
.final-best { margin: 4px 0 18px; color: var(--muted); font-size: .9rem; }
.overlay-buttons { display: flex; flex-direction: column; gap: 10px; }
.badge { display: inline-block; margin: 0 0 8px; background: #fff3c4; color: #9a6a00; border-radius: 999px; padding: 2px 12px; font-weight: 700; font-size: .9rem; }
.badge[hidden] { display: none; }

/* 콘텐츠 섹션 */
.section { padding: 56px 0; }
.section-alt { background: var(--bg-alt); }
.section h2 { font-size: clamp(1.6rem, 4.5vw, 2.1rem); text-align: center; color: var(--green-dark); }
.section-lead { text-align: center; color: var(--muted); max-width: 620px; margin: 0 auto 28px; }
.eyebrow { margin: 0 0 5px; color: var(--red); text-align: center; font-size: .72rem; font-weight: 800; letter-spacing: .14em; }

.guide-nav {
  max-width: 870px; margin: 18px auto 0; padding: 9px 12px;
  display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 5px 8px;
  border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.7);
}
.guide-nav span { margin-right: 5px; color: var(--ink); font-size: .78rem; font-weight: 800; }
.guide-nav a { padding: 4px 9px; border-radius: 999px; color: var(--muted); font-size: .76rem; font-weight: 600; text-decoration: none; }
.guide-nav a:hover { background: var(--green); color: #fff; }

.control-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.control-card {
  display: grid; grid-template-columns: 64px 1fr; gap: 15px; padding: 24px;
  border: 2px solid var(--line); border-radius: 22px; background: var(--card); box-shadow: var(--shadow);
}
.control-icon { display: grid; place-items: center; width: 62px; height: 62px; border-radius: 18px; background: var(--bg-alt); font-size: 2rem; }
.device-label { color: var(--green-dark); font-size: .72rem; font-weight: 800; letter-spacing: .07em; }
.control-card h3 { margin: 3px 0 12px; font-size: 1.3rem; }
.control-card ul { list-style: none; margin: 0; padding: 0; color: var(--muted); font-size: .9rem; }
.control-card li { margin: 7px 0; }
kbd { display: inline-block; min-width: 26px; padding: 1px 7px; margin-right: 4px; border: 1px solid #d9c7aa; border-bottom-width: 3px; border-radius: 6px; background: #fffdf8; color: var(--ink); font-family: inherit; font-size: .76rem; font-weight: 700; text-align: center; }
.mode-explainer { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.mode-explainer article { display: flex; gap: 12px; padding: 16px 18px; border-radius: 16px; background: rgba(58,168,69,.08); }
.mode-explainer article > span { font-size: 1.5rem; }
.mode-explainer h3 { margin: 0 0 3px; font-size: 1.05rem; }
.mode-explainer p { margin: 0; color: var(--muted); font-size: .86rem; }

.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.feature-grid article { padding: 22px 19px; border-radius: 20px; background: #123f32; color: #fff; box-shadow: 0 10px 24px rgba(25,72,56,.16); }
.feature-grid article:nth-child(even) { background: #184f3e; }
.feature-grid article > span { font-size: 1.8rem; }
.feature-grid h3 { margin: 10px 0 7px; color: #fff; font-size: 1.12rem; }
.feature-grid p { margin: 0; color: rgba(255,255,255,.7); font-size: .84rem; line-height: 1.65; }

.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; }
.steps li { background: var(--card); border: 2px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.steps h3 { font-size: 1.25rem; margin-top: 8px; }
.steps p { margin: 0; color: var(--muted); font-size: .95rem; }
.step-num { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--green); color: #fff; font-family: var(--display); font-size: 1.2rem; }

.table-wrap { overflow-x: auto; max-width: 620px; margin: 0 auto; }
.fruit-table { width: 100%; border-collapse: collapse; background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.fruit-table th, .fruit-table td { padding: 8px 14px; text-align: left; border-bottom: 1px solid var(--line); }
.fruit-table th { background: var(--green); color: #fff; font-weight: 500; }
.fruit-table td:first-child, .fruit-table th:first-child { text-align: center; width: 64px; }
.fruit-table td:nth-child(2) { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.fruit-table tr:last-child td { border-bottom: 0; }

.encyclopedia-heading { margin: 48px auto 20px; text-align: center; }
.encyclopedia-heading h3 { margin: 0 0 7px; color: var(--green-dark); font-size: 1.7rem; }
.encyclopedia-heading p:last-child { max-width: 620px; margin: 0 auto; color: var(--muted); font-size: .9rem; }
.fruit-encyclopedia { display: grid; grid-template-columns: repeat(3, 1fr); gap: 13px; }
.fruit-encyclopedia article {
  position: relative; display: grid; grid-template-columns: 68px 1fr; align-items: center; gap: 11px;
  min-height: 126px; padding: 16px; overflow: hidden;
  border: 1px solid var(--line); border-radius: 18px; background: var(--card);
}
.fruit-encyclopedia canvas { margin: 0 auto; }
.fruit-stage { position: absolute; right: 10px; top: 5px; color: #ead9bd; font-family: var(--display); font-size: 1.55rem; }
.fruit-encyclopedia h4 { position: relative; margin: 0 0 3px; font-family: var(--display); font-size: 1.1rem; }
.fruit-encyclopedia p { position: relative; margin: 0; color: var(--muted); font-size: .76rem; line-height: 1.55; }
.fruit-encyclopedia .watermelon-card { grid-column: 2 / span 2; grid-template-columns: 88px 1fr; border-color: rgba(58,168,69,.35); background: linear-gradient(135deg, #f6fff1, #fff); }
.watermelon-card h4 { color: var(--green-dark); font-size: 1.3rem; }

.tips { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.tips li { background: var(--card); border: 2px solid var(--line); border-radius: var(--radius); padding: 20px; }
.tips h3 { font-size: 1.15rem; }
.tips p { margin: 0; color: var(--muted); font-size: .95rem; }
.tip-level { display: inline-block; margin-bottom: 10px; padding: 2px 9px; border-radius: 999px; font-size: .67rem; font-weight: 800; }
.tip-level.beginner { background: #e4f7e6; color: #23752c; }
.tip-level.intermediate { background: #fff1c4; color: #8b6200; }
.tip-level.advanced { background: #ffe2e5; color: #b42533; }

.rules-layout { display: grid; grid-template-columns: 1.3fr .7fr; gap: 20px; align-items: start; }
.rule-list { display: grid; gap: 9px; }
.rule-list article { display: grid; grid-template-columns: 42px 1fr; gap: 13px; padding: 15px 17px; border-radius: 16px; background: #fff; border: 1px solid var(--line); }
.rule-list article > b { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--green); color: #fff; font-family: var(--display); font-weight: 400; }
.rule-list h3 { margin: 0 0 2px; font-size: 1rem; }
.rule-list p { margin: 0; color: var(--muted); font-size: .82rem; }
.score-example { position: sticky; top: 78px; padding: 21px; border-radius: 22px; background: #123f32; color: #fff; box-shadow: 0 14px 30px rgba(20,65,50,.18); }
.score-example-label { display: block; margin-bottom: 12px; color: #8bf28e; font-size: .72rem; font-weight: 800; letter-spacing: .1em; }
.score-example > div { display: grid; grid-template-columns: 1fr auto auto; gap: 9px; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.1); font-size: .82rem; }
.score-example > div span { color: rgba(255,255,255,.58); }
.score-example > div b { color: #ffd459; }
.score-example .bonus b { color: #8bf28e; }
.score-example p { margin: 16px 0 0; color: rgba(255,255,255,.67); font-size: .8rem; }

#about p { font-size: 1.02rem; }

.faq details { background: var(--card); border: 2px solid var(--line); border-radius: 14px; margin-bottom: 10px; padding: 0 18px; }
.faq summary { cursor: pointer; padding: 14px 0; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-size: 1.3rem; color: var(--green); line-height: 1; }
.faq details[open] summary::after { content: '−'; }
.faq details p { margin: 0 0 16px; color: var(--muted); }

.final-cta { padding: 52px 0; background: #123f32; color: #fff; }
.final-cta .wrap { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 28px; }
.cta-fruits { display: flex; align-items: flex-end; }
.cta-fruits canvas { margin-left: -8px; filter: drop-shadow(0 7px 5px rgba(0,0,0,.2)); }
.final-cta .eyebrow { text-align: left; color: #8bf28e; }
.final-cta h2 { margin: 0 0 4px; color: #fff; font-size: clamp(1.5rem, 3vw, 2.1rem); }
.final-cta p { margin: 0; color: rgba(255,255,255,.65); font-size: .88rem; }
.cta-button { padding: 13px 20px; border-radius: 999px; background: #ffd459; color: #3b2b09; font-weight: 800; text-decoration: none; box-shadow: 0 5px 0 #ad7a13; }
.cta-button:hover { transform: translateY(-1px); }

/* 푸터 */
.site-footer { background: #3a2816; color: #e9d8c2; padding: 32px 0; text-align: center; font-size: .9rem; }
.footer-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 20px; margin-bottom: 12px; }
.footer-links a { color: #fff; text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }
.disclaimer { max-width: 560px; margin: 0 auto 6px; opacity: .8; font-size: .82rem; }
.copy { margin: 0; opacity: .6; }

/* 토스트 */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px);
  background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 999px; font-size: .92rem;
  opacity: 0; pointer-events: none; transition: .25s; z-index: 50; max-width: calc(100% - 32px); text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* 정책 페이지 */
.doc { padding: 40px 0 64px; }
.doc h1 { font-size: 2rem; color: var(--green-dark); }
.doc h2 { font-size: 1.3rem; margin-top: 1.6em; }
.doc p, .doc li { color: #5a4532; }

/* 모바일 */
@media (max-width: 960px) {
  .play { padding: 10px 0 34px; }
  .play > .wrap { padding: 0 9px; }
  .hero-text { margin-bottom: 10px; }
  .hero-text h1 { font-size: 2.05rem; }
  .lead { font-size: .85rem; line-height: 1.55; }
  .hero-pills { margin-top: 8px; gap: 4px; }
  .hero-pills li { padding: 3px 7px; font-size: .68rem; }
  .game-shell { padding: 10px 8px 12px; border-radius: 22px; }
  .game-shell-top { grid-template-columns: 1fr; margin-bottom: 9px; }
  .live-dot, .no-login { display: none; }
  .game-shell .mode-switch { width: 100%; }
  .mode-btn { padding: 6px 4px; }
  .mode-btn span { font-size: .82rem; }
  .mode-btn small { font-size: .62rem; }
  .game-layout {
    grid-template-columns: minmax(0, 420px); grid-template-areas: 'left' 'right' 'board';
    justify-content: center; gap: 9px;
  }
  .panel-left {
    display: grid; grid-template-columns: 1.05fr .95fr; gap: 7px;
    width: 100%; max-width: 420px;
  }
  .panel-left > .panel-title { display: none; }
  .score-card { grid-column: 1; grid-row: 1 / span 2; border-radius: 15px; }
  .score-main { padding: 9px 8px 6px; }
  .score-main .stat-value { font-size: 2rem; }
  .best-line { padding: 5px 9px; }
  .stat-rta { grid-column: 2; padding: 5px; border-radius: 13px; }
  .stat-rta .stat-value { font-size: 1rem; }
  .run-stats { grid-column: 2; gap: 3px; }
  .run-stats span { grid-template-columns: 18px 1fr auto; padding: 3px 6px; border-radius: 8px; }
  .run-stats small, .run-stats strong { font-size: .62rem; }
  .panel-buttons { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
  .game-shell .panel-buttons .btn { min-width: 0; padding: 6px 3px; font-size: .68rem; box-shadow: none; }
  .panel-right { display: block; width: 100%; max-width: 420px; }
  .next-card { display: grid; grid-template-columns: 1fr 56px 1.4fr; align-items: center; padding: 5px 10px; text-align: left; }
  .next-card canvas { width: 52px !important; height: 52px !important; margin: 0; }
  .next-card small { text-align: right; }
  .evolution-card { display: none; }
  .board-kicker { margin-bottom: 6px; }
  .board-wrap { width: min(100%, calc((100svh - 250px) * 2 / 3)); margin: 0 auto; border-width: 5px; }
  .game-shell .controls-hint { gap: 3px 10px; margin-top: 9px; font-size: .65rem; }
  .guide-nav { border-radius: 18px; padding: 8px; }
  .guide-nav span { flex-basis: 100%; text-align: center; }
  .guide-nav a { padding: 3px 6px; font-size: .68rem; }
  .control-grid, .mode-explainer, .rules-layout { grid-template-columns: 1fr; }
  .control-card { grid-template-columns: 48px 1fr; gap: 10px; padding: 17px; }
  .control-icon { width: 46px; height: 46px; border-radius: 13px; font-size: 1.45rem; }
  .control-card h3 { font-size: 1.12rem; }
  .feature-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .feature-grid article { padding: 16px 13px; }
  .feature-grid h3 { font-size: .95rem; }
  .fruit-encyclopedia { grid-template-columns: 1fr; }
  .fruit-encyclopedia article { min-height: 108px; }
  .fruit-encyclopedia .watermelon-card { grid-column: auto; }
  .score-example { position: static; }
  .final-cta .wrap { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 16px; }
  .final-cta .eyebrow { text-align: center; }
  .nav a { padding: 6px 7px; font-size: .88rem; }
  .section { padding: 44px 0; }
}
@media (max-width: 380px) {
  .logo span { display: none; }
}
@media (max-width: 520px) {
  .feature-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .overlay-card, .combo-badge { animation: none; }
}
