/* 「수싸움 테니스」 — 화면 (2026-09-20)
 * 폰 먼저. 그림 파일이 하나도 없습니다 — 코트도 선수도 CSS 로 그립니다(크레딧 0원).
 */
:root {
  --court: #2f7a4f;      /* 코트 잔디 */
  --court2: #276641;
  --line: #f4f7f2;
  --ink: #17281f;
  --paper: #f3f6f1;
  --card: #ffffff;
  --gold: #ffcf5c;
  --hot: #ff7043;
  --cool: #4aa3df;
  --dim: #7b8c82;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: "Pretendard", -apple-system, BlinkMacSystemFont, "Malgun Gothic", sans-serif;
  background: var(--paper);
  color: var(--ink);
  -webkit-text-size-adjust: 100%;
  overscroll-behavior: none;
}
button { font: inherit; color: inherit; cursor: pointer; }

.screen { min-height: 100%; display: flex; flex-direction: column; }

/* ---------- 시작 ---------- */
#start { align-items: center; justify-content: center; padding: 22px 16px 30px;
  background: radial-gradient(120% 80% at 50% 0%, #3c8f5e 0%, #205038 60%, #16351f 100%); }
.startCard { width: 100%; max-width: 420px; text-align: center; color: #fff; }
.moto { margin: 0 0 6px; font-size: 13px; letter-spacing: 3px; opacity: 0.75; }
.startCard h1 { margin: 0 0 12px; font-size: 38px; letter-spacing: -1px; text-shadow: 0 3px 0 rgba(0,0,0,.25); }
.lead { margin: 0 0 22px; font-size: 15px; line-height: 1.7; opacity: 0.92; }
.lead b { color: var(--gold); }
.pick { margin: 0 0 8px; font-size: 13px; font-weight: 700; opacity: 0.8; }
.ways { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 20px; }
.way { display: flex; flex-direction: column; gap: 4px; padding: 11px 5px; border: 2px solid rgba(255,255,255,.35);
  background: rgba(255,255,255,.08); border-radius: 16px; color: #fff; }
.way b { font-size: 15px; }
.way span { font-size: 11px; line-height: 1.45; opacity: 0.75; }
.way[aria-pressed="true"] { background: var(--gold); color: #24301f; border-color: var(--gold); box-shadow: 0 4px 0 #d9a92f; }
.way[aria-pressed="true"] span { opacity: 0.85; }

.big { display: block; width: 100%; margin: 0 0 10px; padding: 15px; border: 0; border-radius: 999px;
  background: var(--gold); color: #24301f; font-size: 17px; font-weight: 800; box-shadow: 0 4px 0 #d9a92f; }
.big:active { transform: translateY(3px); box-shadow: none; }
.big.ghost { background: rgba(255,255,255,.12); color: #fff; box-shadow: inset 0 0 0 2px rgba(255,255,255,.5); }
.plain { display: block; width: 100%; padding: 10px; border: 0; background: none; color: inherit;
  font-size: 14px; font-weight: 700; opacity: 0.75; text-decoration: underline; }
.plain.tiny { width: auto; padding: 2px 6px; font-size: 12px; }
.record { margin: 14px 0 4px; font-size: 13px; opacity: 0.8; min-height: 1em; }
.made { margin: 6px 0 0; font-size: 12px; opacity: 0.55; }
.made a { color: inherit; }

/* ---------- 점수판 ---------- */
.board { padding: 10px 14px 8px; background: #16351f; color: #fff; }
.sets { display: flex; align-items: baseline; gap: 8px; }
.sets .lbl { font-size: 11px; opacity: 0.6; }
.sets b { font-size: 20px; font-variant-numeric: tabular-nums; }
.sets b.pt { color: var(--gold); font-size: 24px; margin-left: auto; }
.who { display: flex; align-items: center; justify-content: space-between; margin-top: 2px; font-size: 12px; opacity: 0.8; }

/* ---------- 코트 ---------- */
.court { position: relative; height: 214px; background: linear-gradient(#3a8a5b, var(--court) 45%, var(--court2));
  border-bottom: 3px solid #10281a; overflow: hidden; }
.court::before, .court::after { content: ""; position: absolute; left: 8%; right: 8%; height: 2px; background: rgba(255,255,255,.55); }
.court::before { top: 16px; }
.court::after { bottom: 16px; }
.side { position: absolute; left: 0; right: 0; height: 50%; display: flex; flex-direction: column; justify-content: center; padding: 4px 0; }
.side.far { top: 0; }
.side.near { bottom: 0; }
.tag { text-align: center; font-size: 11px; color: rgba(255,255,255,.9); letter-spacing: 1px;
  text-shadow: 0 1px 3px rgba(0,0,0,.5); position: relative; z-index: 2; }
.tag span { font-weight: 800; color: var(--gold); }
.men { position: relative; height: 62px; margin: 2px 0; }
.men i { position: absolute; width: 20px; height: 20px; border-radius: 50%; background: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,.35); transition: all .38s cubic-bezier(.4,1.3,.5,1); }
.side.far .men i { background: #ffd6c2; }
.side.near .men i { background: #cfe9ff; }
.net { position: absolute; top: 50%; left: 0; right: 0; height: 0; border-top: 3px dashed rgba(255,255,255,.85); text-align: center; }
.net span { position: relative; top: -9px; padding: 0 8px; background: var(--court); font-size: 10px; letter-spacing: 3px; color: rgba(255,255,255,.75); }
.ball { position: absolute; width: 12px; height: 12px; border-radius: 50%; background: #e8ff5a;
  box-shadow: 0 0 10px rgba(232,255,90,.8); transition: all .34s ease-out; }

.say { padding: 11px 14px; font-size: 15px; font-weight: 700; line-height: 1.5; min-height: 46px;
  background: #fff; border-bottom: 1px solid #e3e9e4; }

/* ---------- 상대 버릇 ---------- */
.habit { display: flex; align-items: center; gap: 8px; padding: 9px 14px; background: var(--card); border-bottom: 1px solid #e3e9e4; }
.habit .lbl { font-size: 11px; color: var(--dim); font-weight: 700; flex: none; }
.chips { display: flex; gap: 5px; flex-wrap: wrap; }
.chips span { padding: 3px 9px; border-radius: 999px; background: #eef3ee; font-size: 12px; font-weight: 700; }
.chips span.new { background: var(--ink); color: #fff; }
.chips span.none { background: none; color: var(--dim); font-weight: 400; }

/* ---------- 체력·집중 ---------- */
.bars { display: grid; gap: 4px; padding: 9px 14px; background: var(--card); border-bottom: 1px solid #e3e9e4; }
.bar { display: grid; grid-template-columns: 54px 1fr 32px; align-items: center; gap: 8px; font-size: 11px; color: var(--dim); }
.tube { height: 9px; border-radius: 999px; background: #e8eee9; overflow: hidden; }
.tube i { display: block; height: 100%; width: 100%; background: var(--hot); transition: width .3s; }
.tube.blue i { background: var(--cool); }
.tube.dim i { background: #9bb0a2; }
.bar b { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink); }

/* ---------- 조작 ---------- */
.hand { margin-top: auto; padding: 12px 14px calc(14px + env(safe-area-inset-bottom)); background: var(--card); }
.handTitle { margin: 0 0 9px; font-size: 15px; font-weight: 800; }
.acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.act { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px 13px;
  border: 2px solid #dfe6e0; background: #fff; border-radius: 16px; text-align: left; box-shadow: 0 3px 0 #dfe6e0; }
.act:active { transform: translateY(3px); box-shadow: none; }
.act b { font-size: 16px; }
.act small { font-size: 11px; color: var(--dim); }
.act .stars { font-size: 12px; color: #e0a33a; letter-spacing: 1px; }
.act[aria-pressed="true"] { border-color: var(--ink); background: #f2f7f3; box-shadow: 0 3px 0 var(--ink); }
.act:disabled { opacity: 0.4; }
.hint { margin: 9px 0 0; font-size: 12px; color: var(--dim); line-height: 1.5; min-height: 1.4em; }

/* ---------- 덮는 창 ---------- */
/* ★ display:flex 가 hidden 을 이깁니다 — 이 한 줄이 없으면 설명 창이 켤 때부터 떠 있습니다
   (2026-09-20 실제로 그랬습니다. CLAUDE.md 에도 같은 교훈이 적혀 있습니다) */
[hidden] { display: none !important; }

.sheet { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center;
  padding: 18px; background: rgba(12,26,18,.72); z-index: 20; }
.sheetCard { width: 100%; max-width: 380px; max-height: 88vh; overflow: auto; padding: 22px 18px;
  background: var(--card); border-radius: 22px; text-align: center; box-shadow: 0 16px 40px rgba(0,0,0,.35); }
.sheetCard.left { text-align: left; }
.sheetCard h2 { margin: 0 0 10px; font-size: 22px; }
.sheetCard p { margin: 0 0 11px; font-size: 14px; line-height: 1.65; }
.overLine { font-size: 16px; font-weight: 800; }
.overRead { color: var(--dim); font-size: 13px; }
.sheetCard .dim { color: var(--dim); font-size: 12.5px; }
.sheetCard .big { margin-top: 6px; }

@media (max-height: 700px) {
  .court { height: 168px; }
  .say { min-height: 40px; padding: 8px 14px; font-size: 14px; }
}
