:root {
  --bg: #fff8f1;
  --card: #ffffff;
  --ink: #3b2f2a;
  --muted: #8a7a72;
  --line: #f0e3d8;
  --accent: #ff8a5c;
  --accent-ink: #ffffff;
  --soft: #fff0e5;
  --radius: 20px;
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic",
    "Hiragino Sans", "Yu Gothic", "Noto Sans KR", "Noto Sans JP", sans-serif;
  line-height: 1.6;
  -webkit-tap-highlight-color: transparent;
}

a { color: inherit; }

.wrap { max-width: 480px; margin: 0 auto; padding: 0 16px 48px; }

/* header */
.top {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 480px; margin: 0 auto; padding: 14px 16px;
}
.logo { font-weight: 800; font-size: 20px; text-decoration: none; letter-spacing: -0.5px; }
.logo span { color: var(--accent); }
.lang-select {
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
  border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 14px;
}

/* cards */
.card {
  background: var(--card); border-radius: var(--radius);
  box-shadow: 0 4px 0 var(--line); padding: 28px 22px; margin-top: 12px;
}
.center { text-align: center; }
.big-emoji { font-size: 72px; line-height: 1.1; }
.blob {
  width: 132px; height: 132px; border-radius: 50%; margin: 8px auto 14px;
  display: grid; place-items: center; font-size: 72px;
}
h1 { font-size: 26px; line-height: 1.3; margin: 12px 0 8px; letter-spacing: -0.5px; }
h2 { font-size: 20px; margin: 0 0 8px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }

/* buttons */
.btn {
  display: block; width: 100%; border: 0; cursor: pointer;
  background: var(--accent); color: var(--accent-ink);
  font: inherit; font-weight: 700; font-size: 17px;
  padding: 15px 18px; border-radius: 16px; margin-top: 12px;
  box-shadow: 0 4px 0 #e06b3e; transition: transform .06s;
  text-decoration: none; text-align: center;
}
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #e06b3e; }
.btn.ghost { background: var(--soft); color: var(--ink); box-shadow: 0 4px 0 var(--line); }
.btn.ghost:active { box-shadow: 0 1px 0 var(--line); }

.option {
  display: block; width: 100%; text-align: left; cursor: pointer;
  background: var(--card); color: var(--ink); font: inherit; font-size: 17px;
  border: 2px solid var(--line); border-radius: 16px; padding: 16px 18px; margin-top: 12px;
  transition: border-color .1s, background .1s;
}
.option:hover { border-color: var(--accent); }
.option.picked { border-color: var(--accent); background: var(--soft); }

/* question */
.progress { height: 8px; background: var(--line); border-radius: 999px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--accent); transition: width .25s; }
.qnum { font-weight: 800; color: var(--accent); margin-top: 22px; }
.qtext { font-size: 21px; font-weight: 700; line-height: 1.45; margin: 6px 0 10px; }

/* result bits */
.chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 14px 0 4px; }
.chip { background: var(--soft); border-radius: 999px; padding: 5px 12px; font-size: 14px; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.pair > div { background: var(--soft); border-radius: 16px; padding: 12px; text-align: center; }
.pair b { display: block; font-size: 13px; color: var(--muted); font-weight: 600; }
.pair .e { font-size: 34px; }
.desc { text-align: left; margin-top: 16px; }

/* home list */
.list { display: grid; gap: 12px; margin-top: 12px; }
.item {
  display: flex; gap: 14px; align-items: center; text-decoration: none;
  background: var(--card); border-radius: var(--radius); padding: 16px; box-shadow: 0 4px 0 var(--line);
}
.item .e { font-size: 42px; width: 56px; text-align: center; flex: none; }
.item b { display: block; font-size: 17px; }
.hero { text-align: center; padding: 18px 0 4px; }

/* ads */
.ad-slot {
  margin: 18px 0 0; min-height: 100px; border: 2px dashed var(--line); border-radius: 12px;
  display: grid; place-items: center; color: var(--muted); font-size: 13px; letter-spacing: 1px;
}

/* reaction game */
.pad {
  border-radius: var(--radius); min-height: 340px; display: grid; place-items: center;
  text-align: center; padding: 24px; cursor: pointer; user-select: none; touch-action: manipulation;
  color: #fff; font-weight: 800; font-size: 24px; margin-top: 12px;
}
.pad small { display: block; font-size: 16px; font-weight: 600; opacity: .9; margin-top: 6px; }
.pad.idle { background: #7c8cff; }
.pad.wait { background: #ff6b6b; }
.pad.go { background: #2fbf71; }
.pad.info { background: #ffb347; }
.dots { display: flex; gap: 6px; justify-content: center; margin-top: 12px; }
.dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.dots i.on { background: var(--accent); }

/* balance game */
.vs { display: grid; gap: 10px; margin-top: 14px; }
.vs .option { text-align: center; font-weight: 700; padding: 26px 16px; font-size: 19px; }
.vs .mid { text-align: center; font-weight: 900; color: var(--accent); font-size: 18px; }
.meter { display: flex; align-items: center; gap: 10px; margin-top: 16px; font-size: 14px; font-weight: 700; }
.meter .bar { flex: 1; height: 14px; background: var(--line); border-radius: 999px; overflow: hidden; }
.meter .bar i { display: block; height: 100%; background: var(--accent); }
.picks { text-align: left; margin: 16px 0 0; padding-left: 20px; font-size: 14px; color: var(--muted); }

.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%);
  background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 999px; font-size: 14px;
  opacity: 0; transition: opacity .2s; pointer-events: none;
}
.toast.show { opacity: 1; }

footer { text-align: center; color: var(--muted); font-size: 13px; margin-top: 32px; }
