/* 게임 페이지 공용 스타일. 나중에 추가된 페이지들(게임 목록 / 워들 / 스트룹 / 기억력)이 함께 쓴다.
   먼저 만들어진 index.html·liar.html·chosung.html 은 각자 인라인 CSS를 그대로 쓴다 - 값은 아래와 같다. */
:root {
  --bg: #0f1419; --card: #1a2129; --border: #2a3340; --text: #e6e9ec;
  --muted: #8a96a3; --green: #3ecf8e; --red: #ef5350; --blue: #4fa3e0; --amber: #e0a84f;
  --purple: #b07de0; --cyan: #4fd6d6;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: -apple-system, "Segoe UI", "Malgun Gothic", sans-serif;
  overflow-x: hidden;
  /* 더블탭 확대·당겨서 새로고침이 게임 조작과 겹치지 않게 */
  touch-action: manipulation; overscroll-behavior-y: none;
}
.wrap { max-width: 780px; margin: 0 auto; padding: 20px 16px 40px; }
h1 { font-size: 22px; font-weight: 700; margin: 0 0 4px; }
.subtitle { color: var(--muted); font-size: 13px; margin-bottom: 20px; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 16px; margin-bottom: 14px; }
.card h2 { font-size: 13px; font-weight: 600; margin: 0 0 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.muted { color: var(--muted); font-size: 12px; }
.screen { display: none; }
.screen.active { display: block; }
.center { text-align: center; }

.topbar { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px; gap: 10px; }
.topbar .navs { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }

.btn {
  background: #243140; color: var(--text); border: 1px solid var(--border);
  border-radius: 8px; padding: 10px 16px; font-size: 14px; cursor: pointer; font-family: inherit;
}
.btn:hover { background: #2c3b4c; }
.btn:disabled { opacity: .45; cursor: default; }
.btn-primary {
  background: var(--blue); border-color: var(--blue); color: #0b1218; font-weight: 700;
  width: 100%; padding: 16px; font-size: 17px; border-radius: 10px;
}
.btn-primary:hover { background: #63b1e8; }
.icon-btn {
  background: transparent; border: 1px solid var(--border); color: var(--muted); border-radius: 8px;
  padding: 7px 11px; font-size: 13px; cursor: pointer; font-family: inherit;
  text-decoration: none; display: inline-block;
}
.icon-btn:hover { color: var(--text); border-color: #3d4a5a; }

.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.seg button {
  background: #131a21; border: 1px solid var(--border); color: var(--muted);
  border-radius: 8px; padding: 8px 12px; font-size: 13px; cursor: pointer; font-family: inherit; min-width: 52px;
}
.seg button.on { background: rgba(79,163,224,.15); border-color: var(--blue); color: var(--blue); font-weight: 600; }
.opt-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.opt-label { font-size: 14px; }
.switch { display: flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; font-size: 14px; }
.switch input { width: 18px; height: 18px; accent-color: var(--blue); }

.timer-num { text-align: center; font-size: 30px; font-weight: 800; font-variant-numeric: tabular-nums; }
.timer-num.urgent { color: var(--red); animation: blink .6s infinite; }
@keyframes blink { 50% { opacity: .35 } }
.timer-bar { height: 10px; background: #131a21; border-radius: 6px; overflow: hidden; }
.timer-fill { height: 100%; width: 100%; background: var(--green); transition: width .1s linear, background .3s; }

.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 8px; }
.stat-cell { background: #131a21; border: 1px solid var(--border); border-radius: 10px; padding: 12px 8px; text-align: center; }
.stat-cell .n { font-size: 24px; font-weight: 800; }
.verdict { font-size: clamp(28px, 8vw, 44px); font-weight: 900; text-align: center; margin: 6px 0 4px; }

.ad-slot { display: none; margin: 16px 0; text-align: center; }
.ad-slot.on { display: block; }
.ad-slot .ad-label { font-size: 10px; color: var(--muted); letter-spacing: .1em; margin-bottom: 5px; }
.ad-ph { border: 1px dashed var(--border); border-radius: 10px; padding: 30px 12px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.foot { text-align: center; margin-top: 22px; font-size: 11px; color: var(--muted); }
.foot a { color: var(--muted); }
details.rules { margin-top: 10px; }
details.rules summary { cursor: pointer; color: var(--muted); font-size: 13px; }
details.rules ul { color: var(--muted); font-size: 13px; line-height: 1.8; padding-left: 20px; margin: 10px 0 0; }
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%);
  background: #243140; color: var(--text); border: 1px solid var(--border); border-radius: 10px;
  padding: 12px 18px; font-size: 13px; z-index: 200; opacity: 0; transition: opacity .2s; pointer-events: none;
  max-width: 90vw; text-align: center;
}
.toast.on { opacity: 1; }
