/* ── 탑골공원 · 종로 한판 ─────────────────────────────────────── */
:root {
  --paper: #f8efdc;
  --paper-2: #efe0c4;
  --ink: #2b2015;
  --ink-soft: #5b4a36;
  --wood: #6d4126;
  --wood-2: #9a6636;
  --gold: #c9932e;
  --ginkgo: #f0c33c;
  --roof: #3d4c47;
  --red: #a63a2c;
  --green: #5f7a45;
  --shadow: 0 12px 34px rgba(48, 30, 12, .28);
  --r: 18px;
  --serif: "Nanum Myeongjo", "Noto Serif KR", "Apple SD Gothic Neo", serif;
  --sans: "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0; padding: 0; height: 100%; overflow: hidden;
  background: #d9c08c; color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}

body { position: fixed; inset: 0; }

#app { position: fixed; inset: 0; }
#park { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }

#vignette {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 8%, rgba(255, 232, 168, .22), transparent 55%),
    radial-gradient(140% 110% at 50% 60%, transparent 55%, rgba(64, 40, 16, .34) 100%);
  mix-blend-mode: multiply;
}

.hidden { display: none !important; }

body.intro #hud, body.intro #dpad, body.intro #dock, body.intro #actBtn, body.intro #netbar { opacity: 0; pointer-events: none; }
#hud, #dpad, #dock, #actBtn { transition: opacity .3s ease; }

/* ── HUD ── */
#hud {
  position: absolute; top: 0; left: 0; right: 0;
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: calc(14px + env(safe-area-inset-top)) 16px 0;
  pointer-events: none; z-index: 20;
}
.hud-left, .hud-right { display: flex; align-items: center; gap: 10px; pointer-events: auto; }

.brand {
  display: flex; flex-direction: column; line-height: 1;
  padding: 9px 15px 10px;
  background: linear-gradient(180deg, rgba(250, 242, 224, .94), rgba(243, 231, 205, .88));
  border: 1px solid rgba(122, 84, 40, .28);
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(60, 38, 12, .18);
  backdrop-filter: blur(6px);
}
.brand-main { font-family: var(--serif); font-size: 19px; font-weight: 800; letter-spacing: -.3px; color: var(--wood); }
.brand-sub { font-size: 10px; letter-spacing: 3px; color: var(--ink-soft); margin-top: 4px; }

.live {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; color: #4a3a26;
  background: rgba(250, 242, 224, .82);
  border: 1px solid rgba(122, 84, 40, .22);
  padding: 6px 11px; border-radius: 999px;
  backdrop-filter: blur(6px);
}
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: #b9a680; box-shadow: 0 0 0 3px rgba(185, 166, 128, .18); }
.live.on .live-dot { background: #57a05a; box-shadow: 0 0 0 3px rgba(87, 160, 90, .22); animation: pulse 2.4s infinite; }
@keyframes pulse { 0%,100% { opacity: 1 } 50% { opacity: .45 } }

.hbtn {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid rgba(122, 84, 40, .26);
  background: rgba(250, 242, 224, .9);
  color: #4a3a26; font-family: var(--sans); font-size: 12.5px; font-weight: 600;
  padding: 8px 12px; border-radius: 12px; cursor: pointer;
  box-shadow: 0 4px 12px rgba(60, 38, 12, .14);
  backdrop-filter: blur(6px);
  transition: transform .12s ease, background .2s;
}
.hbtn:hover { background: #fff8ea; transform: translateY(-1px); }
.hbtn:active { transform: translateY(0) scale(.97); }
.hbtn[aria-pressed="false"] { opacity: .55; }
.hbtn .ico { font-size: 14px; }

/* ── 하단 도크 ── */
#dock {
  position: absolute; left: 50%; transform: translateX(-50%);
  bottom: calc(18px + env(safe-area-inset-bottom));
  display: flex; gap: 8px; z-index: 18;
  padding: 7px 9px; border-radius: 999px;
  background: rgba(250, 242, 224, .82);
  border: 1px solid rgba(122, 84, 40, .24);
  box-shadow: 0 8px 22px rgba(60, 38, 12, .18);
  backdrop-filter: blur(8px);
}
.emo {
  width: 44px; height: 44px; border-radius: 50%;
  border: none; background: rgba(255, 251, 240, .92);
  font-size: 21px; cursor: pointer; line-height: 1;
  box-shadow: 0 2px 6px rgba(80, 50, 20, .12), inset 0 -2px 0 rgba(160, 120, 70, .12);
  transition: transform .1s ease;
}
.emo:hover { transform: translateY(-2px); }
.emo:active { transform: scale(.9); }
.emo.sm { width: 34px; height: 34px; font-size: 17px; }
.emo.pop { animation: pop .5s ease; }
@keyframes pop { 0% { transform: scale(1) } 40% { transform: scale(1.35) } 100% { transform: scale(1) } }

/* ── D-pad ── */
#dpad {
  position: absolute; left: 16px; bottom: calc(20px + env(safe-area-inset-bottom));
  width: 146px; height: 146px; z-index: 18;
  display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr);
  gap: 4px; opacity: .92;
}
.dpad-core {
  grid-area: 2 / 2; border-radius: 50%;
  background: rgba(250, 242, 224, .55);
  border: 1px solid rgba(122, 84, 40, .18);
}
.dbtn {
  border: 1px solid rgba(122, 84, 40, .24);
  background: rgba(250, 242, 224, .9);
  color: #5a452c; font-size: 13px;
  border-radius: 12px; cursor: pointer;
  box-shadow: 0 3px 9px rgba(60, 38, 12, .14);
  transition: background .12s, transform .1s;
  touch-action: none;
}
.dbtn:active, .dbtn.on { background: #f3dfae; transform: scale(.95); }
.dbtn.up { grid-area: 1 / 2; }
.dbtn.left { grid-area: 2 / 1; }
.dbtn.right { grid-area: 2 / 3; }
.dbtn.down { grid-area: 3 / 2; }

#actBtn {
  position: absolute; right: 18px; bottom: calc(26px + env(safe-area-inset-bottom));
  display: inline-flex; align-items: center; gap: 9px;
  padding: 14px 20px 14px 16px; border-radius: 999px;
  border: 1px solid rgba(90, 40, 16, .35);
  background: linear-gradient(180deg, #b8492f, #94331f);
  color: #fff4e2; font-family: var(--sans); font-size: 15px; font-weight: 700;
  box-shadow: 0 10px 26px rgba(90, 30, 10, .38), inset 0 1px 0 rgba(255, 220, 180, .28);
  cursor: pointer; z-index: 19;
  animation: rise .25s ease;
}
#actBtn .act-ico { font-size: 19px; }
#actBtn:active { transform: scale(.96); }
@keyframes rise { from { transform: translateY(12px); opacity: 0 } to { transform: none; opacity: 1 } }

/* ── toast ── */
#toast {
  position: absolute; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(8px);
  background: rgba(38, 26, 14, .88); color: #ffefd2;
  font-size: 13.5px; padding: 10px 18px; border-radius: 999px;
  opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s;
  z-index: 40; max-width: 82vw; text-align: center; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
#toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }

#netbar {
  position: absolute; top: calc(60px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%);
  background: rgba(166, 58, 44, .92); color: #ffeede; font-size: 11.5px;
  padding: 5px 12px; border-radius: 999px; z-index: 21;
}

/* ── 입장 화면 ── */
.screen {
  position: absolute; inset: 0; z-index: 60;
  display: flex; align-items: center; justify-content: center;
  padding: 18px;
  background:
    radial-gradient(90% 70% at 50% 30%, rgba(255, 231, 170, .45), transparent 70%),
    linear-gradient(180deg, rgba(46, 30, 14, .46), rgba(28, 18, 8, .62));
  backdrop-filter: blur(3px) saturate(1.05);
  opacity: 0; pointer-events: none; transition: opacity .35s ease;
}
.screen.show { opacity: 1; pointer-events: auto; }

.entry-card {
  width: min(460px, 94vw);
  max-height: 94vh; overflow: auto;
  background: linear-gradient(175deg, #fdf5e5 0%, #f6e8cf 55%, #f1dfbf 100%);
  border: 1px solid rgba(122, 84, 40, .3);
  border-radius: 26px;
  box-shadow: 0 30px 70px rgba(30, 18, 6, .45), inset 0 1px 0 rgba(255, 255, 255, .7);
  padding: 26px 24px 22px;
  position: relative;
  scrollbar-width: thin;
}
.entry-card::after {
  content: ""; position: absolute; inset: 9px; border-radius: 19px;
  border: 1px dashed rgba(140, 100, 50, .26); pointer-events: none;
}
.entry-top { text-align: center; position: relative; z-index: 1; }
.entry-badge {
  display: inline-block; font-size: 10.5px; letter-spacing: 3px; color: #8a6a3c;
  border: 1px solid rgba(140, 100, 50, .35); border-radius: 999px; padding: 4px 12px 3px;
}
.entry-top h1 {
  font-family: var(--serif); font-size: 40px; line-height: 1.1; margin: 14px 0 6px;
  color: var(--wood); letter-spacing: -1.5px;
}
.entry-top h1 span { color: var(--red); font-size: 30px; }
.entry-lead { font-size: 13px; line-height: 1.7; color: var(--ink-soft); margin: 0 0 18px; }

.entry-form { position: relative; z-index: 1; }
.field { display: block; margin-bottom: 14px; }
.field-lbl { display: block; font-size: 11.5px; color: #7d6138; letter-spacing: 1px; margin-bottom: 6px; }
#nickInput, .code-input {
  width: 100%; padding: 13px 15px; font-size: 16px; font-family: var(--sans);
  color: var(--ink); background: rgba(255, 253, 246, .9);
  border: 1px solid rgba(122, 84, 40, .3); border-radius: 13px;
  outline: none; transition: border-color .2s, box-shadow .2s;
}
#nickInput:focus, .code-input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201, 147, 46, .18); }

.char-title { font-size: 11.5px; color: #7d6138; letter-spacing: 1px; margin: 4px 0 8px; }
.char-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; margin-bottom: 16px; }
.char-card {
  border: 1.5px solid rgba(122, 84, 40, .22);
  background: rgba(255, 252, 243, .8);
  border-radius: 14px; padding: 8px 4px 7px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  transition: border-color .18s, transform .12s, background .18s;
}
.char-card:hover { transform: translateY(-2px); background: #fffdf7; }
.char-card.sel { border-color: var(--gold); background: #fff7e4; box-shadow: 0 0 0 3px rgba(201, 147, 46, .16); }
.char-card canvas { width: 44px; height: 56px; image-rendering: auto; }
.char-card b { font-size: 11.5px; font-weight: 700; color: #4d3a22; }
.char-card small { font-size: 9px; color: #97794c; letter-spacing: -.2px; }

.primary {
  width: 100%; padding: 15px; border: none; border-radius: 14px;
  background: linear-gradient(180deg, #b8492f, #8f3220);
  color: #fff2df; font-family: var(--sans); font-size: 16px; font-weight: 800; letter-spacing: .5px;
  cursor: pointer; box-shadow: 0 10px 22px rgba(120, 40, 20, .32), inset 0 1px 0 rgba(255, 220, 180, .3);
  transition: transform .12s, filter .2s;
}
.primary:hover { filter: brightness(1.05); }
.primary:active { transform: scale(.98); }
.entry-foot { text-align: center; font-size: 10.5px; color: #98794a; margin: 11px 0 0; letter-spacing: .3px; }

/* ── 시트(테이블 카드) ── */
.sheet {
  position: absolute; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: min(400px, 92vw); z-index: 30;
  background: linear-gradient(180deg, #fdf6e7, #f3e3c6);
  border: 1px solid rgba(122, 84, 40, .3);
  border-radius: 20px; box-shadow: 0 18px 44px rgba(40, 24, 8, .34);
  padding: 15px 16px 16px;
  animation: rise .22s ease;
}
.sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 11px; }
.sheet-head h3 { font-family: var(--serif); font-size: 18px; margin: 0 0 2px; color: var(--wood); }
.sheet-head p { margin: 0; font-size: 11.5px; color: #836740; }
.xbtn {
  width: 30px; height: 30px; border-radius: 50%; border: 1px solid rgba(122, 84, 40, .25);
  background: rgba(255, 252, 244, .9); color: #6d5738; font-size: 13px; cursor: pointer; line-height: 1;
  flex: 0 0 auto;
}
.xbtn:hover { background: #fff; }

.tc-opt {
  display: flex; align-items: center; gap: 11px; width: 100%;
  padding: 12px 13px; margin-bottom: 7px;
  border: 1px solid rgba(122, 84, 40, .22); border-radius: 13px;
  background: rgba(255, 253, 247, .88); cursor: pointer; text-align: left;
  font-family: var(--sans); transition: background .15s, transform .1s, border-color .15s;
}
.tc-opt:hover { background: #fff; border-color: var(--gold); transform: translateY(-1px); }
.tc-opt:active { transform: none; }
.tc-opt .oico { font-size: 20px; width: 26px; text-align: center; flex: 0 0 auto; }
.tc-opt .otxt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tc-opt b { font-size: 13.5px; color: #3e2c18; font-weight: 700; }
.tc-opt small { font-size: 10.5px; color: #8b6d44; }
.tc-opt .chev { margin-left: auto; color: #b59a70; font-size: 12px; }
.tc-note { font-size: 10.5px; color: #96794c; text-align: center; margin: 8px 0 0; line-height: 1.5; }
.lvl-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 2px 0 4px; }
.lvl {
  padding: 11px 4px; border-radius: 11px; cursor: pointer; font-family: var(--sans);
  border: 1px solid rgba(122, 84, 40, .24); background: rgba(255, 253, 247, .9);
  display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.lvl b { font-size: 12.5px; color: #3e2c18; }
.lvl small { font-size: 9px; color: #94784e; }
.lvl.sel { border-color: var(--gold); background: #fff6e0; box-shadow: 0 0 0 2px rgba(201, 147, 46, .16); }

.code-input { text-align: center; font-size: 26px; letter-spacing: 12px; font-weight: 800; text-transform: uppercase; padding: 14px; }
.code-share {
  font-family: ui-monospace, monospace; font-size: 30px; letter-spacing: 8px;
  text-align: center; color: var(--wood); background: rgba(255, 252, 242, .85);
  border: 1px dashed rgba(122, 84, 40, .4); border-radius: 13px; padding: 13px; margin: 4px 0 11px;
  font-weight: 800;
}
.copy-row { display: flex; gap: 7px; }
.copy-row .primary { font-size: 13.5px; padding: 12px; }

/* ── 게임 모달 ── */
.gmodal {
  position: absolute; inset: 0; z-index: 70;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  background: radial-gradient(80% 60% at 50% 35%, rgba(60, 40, 18, .55), rgba(20, 12, 4, .82));
  backdrop-filter: blur(6px);
  animation: fade .22s ease;
}
@keyframes fade { from { opacity: 0 } to { opacity: 1 } }
.gwrap {
  width: min(940px, 96vw); max-height: 94vh; overflow: auto;
  background: linear-gradient(178deg, #fdf7e9, #f2e2c4);
  border: 1px solid rgba(122, 84, 40, .32); border-radius: 22px;
  box-shadow: 0 40px 80px rgba(15, 8, 2, .55);
  padding: 14px 16px 16px;
}
.gwrap.narrow { width: min(520px, 94vw); }
.ghead { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.gtitle { display: flex; align-items: center; gap: 9px; }
.gtitle h2 { font-family: var(--serif); font-size: 20px; margin: 0; color: var(--wood); letter-spacing: -.5px; }
.gico { font-size: 17px; }
.gtag {
  font-size: 10.5px; color: #7d5f34; background: rgba(201, 147, 46, .16);
  border: 1px solid rgba(201, 147, 46, .3); border-radius: 999px; padding: 3px 9px; letter-spacing: .3px;
}
.gbody { display: flex; gap: 16px; align-items: flex-start; }
.boardwrap { position: relative; flex: 1 1 auto; min-width: 0; display: flex; justify-content: center; }
.boardwrap canvas { width: 100%; max-width: min(62vh, 540px); height: auto; aspect-ratio: 1 / 1; border-radius: 12px; touch-action: none; display: block; }
.boardwrap.alk canvas { background: #e9d6ae; }
.gside { width: 232px; flex: 0 0 232px; display: flex; flex-direction: column; gap: 10px; }

.turnbar {
  display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 700; color: #3d2c18;
  background: rgba(255, 253, 245, .8); border: 1px solid rgba(122, 84, 40, .2);
  border-radius: 11px; padding: 10px 12px;
}
.dot { width: 13px; height: 13px; border-radius: 50%; box-shadow: inset 0 -2px 3px rgba(0,0,0,.28); flex: 0 0 auto; }
.dot.black { background: radial-gradient(circle at 35% 30%, #6b6b6b, #141414 70%); }
.dot.white { background: radial-gradient(circle at 35% 30%, #ffffff, #d8d2c4 75%); border: 1px solid #b9b1a0; }

.plist { display: flex; flex-direction: column; gap: 6px; }
.pline {
  display: flex; align-items: center; gap: 8px; font-size: 12px; color: #4b3822;
  background: rgba(255, 253, 245, .62); border-radius: 9px; padding: 7px 10px;
}
.pline .dot { width: 11px; height: 11px; }
.pline .pn { font-weight: 700; }
.pline .me { color: var(--red); font-size: 10px; margin-left: auto; }
.pline.win { background: rgba(240, 195, 60, .22); }

.grow { display: flex; flex-direction: column; gap: 7px; }
.gbtn {
  padding: 10px 12px; border-radius: 10px; cursor: pointer; font-family: var(--sans); font-size: 12.5px;
  border: 1px solid rgba(122, 84, 40, .26); background: rgba(255, 253, 246, .9); color: #46341f; font-weight: 600;
  transition: background .15s, transform .1s; text-align: center;
}
.gbtn:hover { background: #fff; }
.gbtn:active { transform: scale(.98); }
.gbtn.acc { background: linear-gradient(180deg, #b8492f, #93331f); color: #fff2df; border-color: transparent; }
.gbtn.ghost { background: transparent; }

.cheer-row { display: flex; align-items: center; gap: 6px; margin-top: 2px; }
.cheer-lbl { font-size: 10.5px; color: #8a6c42; margin-right: 2px; }

.gover {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 12px;
  background: rgba(28, 18, 8, .74); border-radius: 12px; color: #fff3de;
  backdrop-filter: blur(2px); text-align: center; padding: 18px;
}
.gover h3 { font-family: var(--serif); font-size: 26px; margin: 0; letter-spacing: -.5px; }
.gover p { margin: 0; font-size: 12.5px; color: #e7d2b2; }
.gover .row { display: flex; gap: 8px; margin-top: 4px; }
.gover .gbtn { min-width: 108px; }

.alk-help { font-size: 11px; color: #8a6c42; line-height: 1.55; }

.peer-emoji {
  position: absolute; left: 50%; top: 46%;
  font-size: 40px; pointer-events: none; z-index: 5;
  animation: floatUp 1.7s ease-out forwards;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,.3));
}
@keyframes floatUp {
  0% { opacity: 0; transform: translate(-50%, 10px) scale(.6) }
  18% { opacity: 1; transform: translate(-50%, -8px) scale(1.08) }
  70% { opacity: 1; transform: translate(-50%, -52px) scale(1) }
  100% { opacity: 0; transform: translate(-50%, -82px) scale(.95) }
}

/* ── 명예의 전당 ── */
.plaque {
  background:
    repeating-linear-gradient(90deg, rgba(0,0,0,.035) 0 2px, transparent 2px 9px),
    linear-gradient(170deg, #7d4c29, #5c3419 60%, #4a2a13);
  border-radius: 14px; padding: 16px; border: 3px solid #c9932e;
  box-shadow: inset 0 0 0 2px rgba(255, 220, 150, .25), 0 16px 34px rgba(40, 20, 4, .4);
  color: #ffe9c4;
}
.plaque-top {
  text-align: center; font-family: var(--serif); font-size: 17px; letter-spacing: 5px;
  color: #ffdd9c; padding-bottom: 11px; border-bottom: 1px solid rgba(255, 210, 130, .28);
  text-shadow: 0 1px 0 rgba(0,0,0,.4);
}
.rank-list { list-style: none; margin: 8px 0 10px; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.rank-row {
  display: flex; align-items: center; gap: 9px; padding: 8px 6px; font-size: 13px;
  border-bottom: 1px dashed rgba(255, 210, 130, .14);
}
.rank-row:last-child { border-bottom: none; }
.rank-row .rno { width: 22px; text-align: center; font-family: var(--serif); font-weight: 800; color: #e8b95e; font-size: 14px; }
.rank-row .rno.gold { color: #ffe08a; text-shadow: 0 0 8px rgba(255, 210, 110, .55); }
.rank-row .rchar { font-size: 15px; }
.rank-row .rnick { font-weight: 700; color: #fff1d6; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-row .rw { font-size: 11.5px; color: #f0c98a; font-variant-numeric: tabular-nums; }
.rank-row.me { background: rgba(255, 214, 130, .12); border-radius: 8px; }
.rank-empty { text-align: center; color: #d9b78a; font-size: 12.5px; padding: 20px 0; }
.plaque-foot { text-align: center; font-size: 11.5px; color: #e0bc8b; border-top: 1px solid rgba(255, 210, 130, .22); padding-top: 10px; }

/* ── 안내 ── */
.help-body { display: flex; flex-direction: column; gap: 9px; }
.help-row { display: flex; gap: 12px; font-size: 12.5px; line-height: 1.55; color: #4a3720; }
.help-row b { flex: 0 0 62px; color: var(--wood); font-family: var(--serif); }
.help-row em { font-style: normal; color: var(--red); font-weight: 700; }
.help-foot { text-align: center; font-size: 10.5px; color: #997a4c; margin-top: 14px; }

/* ── 모바일 ── */
@media (max-width: 760px) {
  #hud { padding: calc(10px + env(safe-area-inset-top)) 10px 0; gap: 6px; }
  .hud-left, .hud-right { gap: 6px; }
  .brand { padding: 7px 11px 8px; }
  .brand-main { font-size: 15.5px; }
  .brand-sub { font-size: 8.5px; letter-spacing: 2px; margin-top: 3px; }
  .hbtn { padding: 7px 9px; font-size: 11px; gap: 4px; }
  .hbtn .lbl { display: none; }
  .hbtn .ico { font-size: 15px; }
  .live { font-size: 10.5px; padding: 5px 9px; }

  .entry-card { padding: 20px 18px 18px; border-radius: 22px; }
  .entry-top h1 { font-size: 32px; margin: 10px 0 5px; }
  .entry-top h1 span { font-size: 24px; }
  .entry-lead { font-size: 12px; margin-bottom: 14px; }
  .char-grid { gap: 5px; }
  .char-card { padding: 6px 2px 5px; }
  .char-card canvas { width: 38px; height: 48px; }
  .char-card b { font-size: 10.5px; }
  .char-card small { display: none; }

  #dpad { width: 122px; height: 122px; left: 12px; bottom: calc(14px + env(safe-area-inset-bottom)); }
  #dock { gap: 5px; padding: 5px 7px; bottom: calc(12px + env(safe-area-inset-bottom)); left: auto; right: 12px; transform: none; }
  .emo { width: 38px; height: 38px; font-size: 18px; }
  #actBtn { right: 12px; bottom: calc(74px + env(safe-area-inset-bottom)); padding: 11px 16px 11px 13px; font-size: 13.5px; }
  #toast { bottom: calc(64px + env(safe-area-inset-bottom)); font-size: 12px; }

  .sheet { bottom: calc(126px + env(safe-area-inset-bottom)); width: min(370px, 94vw); padding: 13px 13px 14px; }
  .gmodal { padding: 8px; align-items: flex-start; padding-top: calc(8px + env(safe-area-inset-top)); }
  .gwrap { padding: 11px 11px 13px; border-radius: 18px; max-height: 96vh; }
  .ghead { margin-bottom: 9px; }
  .gtitle h2 { font-size: 17px; }
  .gbody { flex-direction: column; gap: 10px; }
  .gside { width: 100%; flex: 1 1 auto; }
  .boardwrap canvas { max-width: 100%; }
  .ply-row { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
  .plist { flex-direction: row; gap: 6px; }
  .pline { flex: 1; }
  .turnbar { padding: 8px 11px; font-size: 12.5px; }
  .grow { flex-direction: row; flex-wrap: wrap; }
  .gbtn { flex: 1; min-width: 88px; padding: 9px 8px; font-size: 12px; }
  .cheer-row { justify-content: flex-end; }
  .rank-row { font-size: 12.5px; }
  .gwrap.narrow { max-height: 92vh; }
}

@media (max-height: 560px) and (orientation: landscape) {
  .gbody { flex-direction: row; }
  .gside { width: 200px; flex: 0 0 200px; }
  .boardwrap canvas { max-width: min(78vh, 460px); }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
