:root {
  --ink: #ebe5d6;
  --dim: #a59e8e;
  --faint: #6f695d;
  --panel: rgba(14, 16, 17, .88);
  --panel2: rgba(30, 32, 31, .92);
  --line: rgba(255, 255, 255, .5);
  --line2: rgba(255, 255, 255, .18);
  --accent: #8fb9a8;
  --danger: #c4584a;
  --clue: #d8c27a;
  --sans: 'Pretendard Variable', Pretendard, -apple-system, sans-serif;
  --serif: 'Noto Serif KR', serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { width: 100%; height: 100%; overflow: hidden; overscroll-behavior: none; background: #120d0a; color: var(--ink); font-family: var(--sans); -webkit-font-smoothing: antialiased; user-select: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, textarea { font: inherit; color: inherit; }

/* 1600×900 무대를 창에 맞춰 키움 */
#stage {
  position: absolute; left: 50%; top: 50%; width: 1600px; height: 900px;
  transform-origin: 50% 50%; overflow: hidden;
  background-color: #2b1e16;
  background-image:
    repeating-linear-gradient(90deg, rgba(0,0,0,.0) 0 118px, rgba(0,0,0,.28) 118px 120px),
    repeating-linear-gradient(90deg, rgba(255,255,255,.018) 0 3px, rgba(0,0,0,.03) 3px 7px, rgba(255,255,255,.01) 7px 13px);
}
#stage::after { content: ''; position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 220px rgba(0,0,0,.75); z-index: 1; }
.screen { position: absolute; inset: 0; z-index: 2; }

/* 공통 버튼: 어두운 반투명 판 + 얇은 흰 테두리 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-width: 120px; height: 44px; padding: 0 22px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 4px;
  font-size: 16px; font-weight: 600; letter-spacing: .02em;
  transition: background .12s, border-color .12s, transform .08s;
}
.btn:hover { background: rgba(40, 46, 44, .95); border-color: #fff; }
.btn:active { transform: translateY(1px); }
.btn.main { border-color: var(--accent); color: #dff0e8; }
.btn.main:hover { background: rgba(50, 72, 64, .95); }
.btn.small { height: 34px; min-width: 0; padding: 0 14px; font-size: 14px; }
.btn[disabled] { opacity: .35; pointer-events: none; }
.tag { display: inline-block; font-size: 12px; padding: 2px 7px; border: 1px solid var(--line2); border-radius: 3px; color: var(--dim); font-weight: 500; }

/* ---------- 첫 화면 ---------- */
.title-screen { display: flex; flex-direction: column; align-items: center; justify-content: center; }
.title-art { position: absolute; inset: 0; background-size: cover; background-position: center; background-color: #0e0c0b; }
.title-art::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10,8,7,.88) 0%, rgba(10,8,7,.6) 38%, rgba(10,8,7,.08) 75%); }
.title-box { position: absolute; left: 140px; top: 220px; z-index: 2; }
.title-box .kicker { font-size: 15px; letter-spacing: .4em; color: var(--dim); margin-bottom: 18px; }
.title-box h1 { font-family: var(--serif); font-weight: 800; font-size: 84px; line-height: 1.1; letter-spacing: -.01em; }
.title-box .sub { font-family: var(--serif); font-size: 19px; color: var(--dim); margin-top: 18px; }
.title-menu { display: flex; flex-direction: column; gap: 12px; margin-top: 54px; width: 280px; }
.title-menu .btn { width: 100%; height: 52px; font-size: 18px; justify-content: flex-start; padding-left: 24px; }
.title-menu .btn small { margin-left: auto; font-size: 13px; color: var(--dim); font-weight: 500; }

/* ---------- 조사자 고르기 / 대기실 ---------- */
.setup { padding: 70px 90px; }
.setup h2 { font-family: var(--serif); font-size: 38px; font-weight: 800; }
.setup .lead { color: var(--dim); margin-top: 8px; font-size: 16px; }
.pick-row { display: flex; gap: 18px; margin-top: 40px; }
.pick {
  position: relative; width: 268px; height: 490px; padding: 18px;
  background: var(--panel); border: 1px solid var(--line2); border-radius: 6px; text-align: left;
  display: flex; flex-direction: column; transition: transform .12s, border-color .12s;
}
.pick:hover { border-color: var(--line); transform: translateY(-4px); }
.pick.on { border-color: var(--accent); transform: translateY(-10px); box-shadow: 0 0 0 1px var(--accent); }
.pick.taken { opacity: .55; }
.pick .order { position: absolute; right: 14px; top: 14px; width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: #102019; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.pick .who { position: absolute; right: 14px; top: 16px; font-size: 13px; color: var(--accent); max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick .por { width: 100%; height: 170px; border-radius: 4px; margin-bottom: 14px; }
.pick .nm { font-family: var(--serif); font-size: 23px; font-weight: 800; }
.pick .rl { color: var(--dim); font-size: 14px; margin-top: 2px; }
.pick .stats { margin-top: 12px; }
.pick .ab { margin-top: 12px; font-size: 13.5px; line-height: 1.5; color: var(--ink); }
.pick .ab b { color: var(--accent); font-weight: 700; margin-right: 4px; }
.pick .bio { margin-top: auto; font-family: var(--serif); font-size: 13px; line-height: 1.6; color: var(--dim); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.setup-foot { position: absolute; left: 90px; right: 90px; bottom: 60px; display: flex; gap: 12px; align-items: center; }
.setup-foot .grow { flex: 1; color: var(--dim); }

.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 14px; color: var(--dim); }
.input { height: 48px; width: 280px; padding: 0 16px; background: rgba(0,0,0,.45); border: 1px solid var(--line); border-radius: 4px; font-size: 18px; outline: none; user-select: text; }
.input:focus { border-color: var(--accent); }
.input.code { width: 160px; text-transform: uppercase; letter-spacing: .3em; font-weight: 700; text-align: center; }
.online-box { display: flex; gap: 60px; margin-top: 50px; }
.online-box .col { background: var(--panel); border: 1px solid var(--line2); border-radius: 6px; padding: 28px; display: flex; flex-direction: column; gap: 18px; width: 420px; }
.online-box h3 { font-family: var(--serif); font-size: 22px; }
.roomcode { font-size: 46px; font-weight: 800; letter-spacing: .25em; color: var(--accent); }
.players { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.players .p { padding: 6px 12px; border: 1px solid var(--line2); border-radius: 4px; font-size: 14px; background: var(--panel); }
.players .p.off { opacity: .45; }
.players .p b { color: var(--accent); margin-left: 6px; font-weight: 600; font-size: 12px; }

/* ---------- 게임 화면 ---------- */
.game { position: absolute; inset: 0; }
.topbar { position: absolute; left: 0; right: 0; top: 0; height: 66px; display: flex; align-items: center; gap: 22px; padding: 0 22px; background: rgba(8, 9, 9, .82); border-bottom: 1px solid var(--line2); z-index: 5; }
.topbar .tt { font-family: var(--serif); font-weight: 800; font-size: 21px; white-space: nowrap; }
.topbar .obj { flex: 1; font-size: 14px; line-height: 1.45; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; padding-left: 22px; border-left: 1px solid var(--line2); }
.topbar .obj b { color: var(--accent); font-weight: 700; margin-right: 8px; }
.clock { display: flex; align-items: center; gap: 12px; padding: 0 16px; height: 46px; border: 1px solid var(--line2); border-radius: 4px; background: rgba(0,0,0,.35); white-space: nowrap; }
.clock .time { font-family: var(--serif); font-size: 22px; font-weight: 800; }
.clock .tide { font-size: 13px; color: var(--dim); line-height: 1.3; }
.clock .tide b { color: var(--ink); font-size: 15px; }
.clock.warn .tide b { color: var(--danger); }
.tidebar { display: flex; gap: 4px; }
.tidebar i { width: 9px; height: 20px; border: 1px solid rgba(255,255,255,.35); border-radius: 1px; }
.tidebar i.on { background: #5c8f9a; border-color: #8fc0c9; }
.tidebar i.late.on { background: var(--danger); border-color: #e48a7c; }

.boardwrap { position: absolute; left: 0; top: 66px; width: 1210px; height: 662px; overflow: hidden; cursor: grab; touch-action: none; }
.boardwrap.dragging { cursor: grabbing; }
.boardwrap.dragging * { cursor: grabbing !important; }
.zoombar { position: absolute; right: 14px; top: 12px; display: flex; gap: 6px; z-index: 9; }
.zoombar .btn { min-width: 36px; padding: 0 10px; font-size: 16px; }
.zoombar .btn:last-child { font-size: 13px; }
#board { position: absolute; transform-origin: 0 0; transition: transform .08s linear; }
.floorlbl { position: absolute; font-family: var(--serif); font-size: 15px; font-weight: 600; color: rgba(235, 229, 214, .55); letter-spacing: .2em; }

.tile {
  position: absolute; border-radius: 3px; overflow: hidden;
  box-shadow: 0 0 0 1px rgba(0,0,0,.6), 0 4px 0 #120c08, 0 10px 22px rgba(0,0,0,.55);
  transition: box-shadow .12s;
}
.tile.new { animation: flipin .55s cubic-bezier(.2,.8,.3,1) both; }
@keyframes flipin { from { transform: perspective(900px) rotateY(80deg) scale(.9); opacity: 0; } to { transform: none; opacity: 1; } }
.tile .rname { position: absolute; left: 6px; top: 6px; padding: 3px 8px; background: rgba(10, 10, 10, .78); border: 1px solid rgba(255,255,255,.3); border-radius: 2px; font-size: 13px; font-weight: 600; z-index: 2; }
.tile.can-move { cursor: pointer; }
.tile.can-move::after { content: ''; position: absolute; inset: 0; border: 2px solid rgba(255,255,255,.85); border-radius: 3px; }
.tile.can-move:hover::after { border-color: var(--accent); background: rgba(143, 185, 168, .12); }
.tile.here::before { content: ''; position: absolute; inset: 0; border: 2px solid var(--accent); border-radius: 3px; z-index: 1; }
.tile .water { position: absolute; inset: 0; background: rgba(38, 86, 96, .42); background-image: repeating-linear-gradient(170deg, transparent 0 14px, rgba(160, 210, 220, .14) 14px 16px); pointer-events: none; }

/* 바닥 무늬 */
.look-wood { background-color: #6a4932; background-image: repeating-linear-gradient(90deg, transparent 0 21px, rgba(0,0,0,.35) 21px 22px), repeating-linear-gradient(0deg, transparent 0 63px, rgba(0,0,0,.25) 63px 64px); }
.look-dark { background-color: #4a3324; background-image: linear-gradient(#2a1c13 0 18px, transparent 18px), repeating-linear-gradient(90deg, transparent 0 17px, rgba(0,0,0,.35) 17px 18px); }
.look-carpet { background-color: #5b2e2b; background-image: linear-gradient(#5b2e2b, #5b2e2b), repeating-linear-gradient(45deg, rgba(0,0,0,.18) 0 2px, transparent 2px 10px); background-clip: content-box, border-box; padding: 16px; border: 0; box-shadow: inset 0 0 0 10px #3f1f1d, inset 0 0 0 12px #8c6a3e, 0 0 0 1px rgba(0,0,0,.6), 0 4px 0 #120c08, 0 10px 22px rgba(0,0,0,.55); }
.look-carpet2 { background-color: #34414f; background-image: repeating-linear-gradient(45deg, rgba(0,0,0,.15) 0 2px, transparent 2px 12px), repeating-linear-gradient(-45deg, rgba(0,0,0,.15) 0 2px, transparent 2px 12px); box-shadow: inset 0 0 0 9px #243039, inset 0 0 0 11px #8c7a54, 0 0 0 1px rgba(0,0,0,.6), 0 4px 0 #120c08, 0 10px 22px rgba(0,0,0,.55); }
.look-carpet3 { background-color: #6b5b43; background-image: radial-gradient(circle at 50% 50%, rgba(255,255,255,.07) 0 3px, transparent 4px); background-size: 22px 22px; box-shadow: inset 0 0 0 9px #574732, inset 0 0 0 11px #a99068, 0 0 0 1px rgba(0,0,0,.6), 0 4px 0 #120c08, 0 10px 22px rgba(0,0,0,.55); }
.look-checker { background-color: #7c786d; background-image: repeating-conic-gradient(#8f8b80 0 25%, #64615a 0 50%); background-size: 32px 32px; }
.look-stone { background-color: #4c4a45; background-image: repeating-linear-gradient(0deg, transparent 0 25px, rgba(0,0,0,.45) 25px 27px), repeating-linear-gradient(90deg, transparent 0 46px, rgba(0,0,0,.35) 46px 48px); }
.look-cave { background-color: #1c2627; background-image: radial-gradient(ellipse at 70% 60%, #0f1a1d 0 30%, transparent 31%), radial-gradient(ellipse at 20% 30%, rgba(255,255,255,.04) 0 20%, transparent 21%), radial-gradient(ellipse at 45% 80%, rgba(255,255,255,.03) 0 15%, transparent 16%); }

.door { position: absolute; z-index: 3; display: flex; align-items: center; justify-content: center; border-radius: 2px; background: #9b7a4f; border: 2px solid #2a1c12; font-size: 13px; font-weight: 800; color: #fff; }
.door.v { width: 16px; height: 40px; margin: -20px 0 0 -8px; }
.door.h { width: 40px; height: 16px; margin: -8px 0 0 -20px; }
.door.unknown { background: #161616; border-color: #bbb; }
.door.locked { background: #3a2e24; border-color: #d6c9a8; }
.door.locked svg { width: 12px; height: 12px; }
.door.can-move { cursor: pointer; outline: 2px solid #fff; outline-offset: 1px; }
.door.can-move:hover { outline-color: var(--accent); }
.stair { position: absolute; z-index: 3; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 5px; height: 24px; padding: 0 8px; background: rgba(12,12,12,.85); border: 1px solid rgba(255,255,255,.4); border-radius: 2px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.stair svg { width: 13px; height: 13px; }
.stair.locked { color: #d6c9a8; }
.stair.can-move { cursor: pointer; border-color: #fff; outline: 1px solid #fff; }
.stair.can-move:hover { border-color: var(--accent); outline-color: var(--accent); color: #dff0e8; }

.spot { position: absolute; z-index: 4; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; background: #d8c9a2; border: 2px solid #3b2d1d; box-shadow: 0 2px 0 #1a120b, 0 4px 8px rgba(0,0,0,.5); display: flex; align-items: center; justify-content: center; color: #2b2116; }
.spot svg { width: 18px; height: 18px; }
.spot.goal { background: #b9d3c8; border-color: #1d3a30; width: 42px; height: 42px; margin: -21px 0 0 -21px; }
.spot.can-use { cursor: pointer; outline: 2px solid #fff; outline-offset: 2px; }
.spot.can-use:hover { outline-color: var(--accent); transform: scale(1.08); }
.spot .lbl { position: absolute; top: 37px; left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: 11px; font-weight: 600; color: #fff; background: rgba(0,0,0,.7); padding: 1px 5px; border-radius: 2px; pointer-events: none; }
.goal .lbl { top: 45px; }

.pawn { position: absolute; z-index: 6; width: 38px; height: 38px; margin: -19px 0 0 -19px; border-radius: 50%; border: 2px solid #f1ead9; box-shadow: 0 2px 0 #111, 0 5px 10px rgba(0,0,0,.6); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 15px; color: #fff; transition: left .45s cubic-bezier(.3,.8,.3,1), top .45s cubic-bezier(.3,.8,.3,1); }
.pawn.cur { border-color: var(--accent); box-shadow: 0 0 0 2px #0d1512, 0 0 0 4px var(--accent), 0 5px 10px rgba(0,0,0,.6); z-index: 7; }
.pawn.down { filter: grayscale(1) brightness(.5); }
.mon { position: absolute; z-index: 6; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 4px; background: #4a1c1a; border: 2px solid #d9b8a8; box-shadow: 0 2px 0 #111, 0 5px 10px rgba(0,0,0,.6); display: flex; align-items: center; justify-content: center; transition: left .45s, top .45s; background-size: cover; background-position: center; }
.mon svg { width: 30px; height: 30px; }
.mon.boss { width: 60px; height: 60px; margin: -30px 0 0 -30px; background-color: #2d1220; }
.mon .hp { position: absolute; bottom: -9px; left: 50%; transform: translateX(-50%); padding: 0 5px; height: 16px; line-height: 16px; background: #111; border: 1px solid #d9b8a8; border-radius: 2px; font-size: 11px; font-weight: 800; white-space: nowrap; }
.mon.can-attack { cursor: crosshair; outline: 2px solid var(--danger); outline-offset: 2px; }
.mon.can-attack:hover { transform: scale(1.06); }

.turnbar { position: absolute; left: 22px; top: 628px; z-index: 8; }
.turnbar .in { display: flex; align-items: center; gap: 14px; height: 54px; padding: 0 10px 0 18px; background: var(--panel); border: 1px solid var(--line); border-radius: 4px; white-space: nowrap; }
.turnbar .who { font-size: 16px; font-weight: 700; }
.turnbar .who span { color: var(--dim); font-weight: 500; margin-right: 8px; }
.pips { display: flex; gap: 5px; align-items: center; }
.pips i { width: 13px; height: 13px; border-radius: 50%; border: 1px solid var(--line); }
.pips i.on { background: var(--accent); border-color: var(--accent); }
.pips .free { font-size: 12px; color: var(--accent); margin-left: 4px; }
.turnbar .hint { font-size: 13px; color: var(--dim); }

/* 오른쪽 기록 */
.logpanel { position: absolute; right: 0; top: 66px; bottom: 0; width: 390px; background: rgba(9, 10, 10, .84); border-left: 1px solid var(--line2); display: flex; flex-direction: column; z-index: 5; }
.logpanel .hd { height: 46px; flex: none; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; border-bottom: 1px solid var(--line2); font-size: 14px; color: var(--dim); }
.log { flex: 1; overflow-y: auto; padding: 14px 18px 30px; scrollbar-width: thin; scrollbar-color: #444 transparent; }
.log .e { margin-bottom: 10px; font-size: 13.5px; line-height: 1.6; }
.log .story { font-family: var(--serif); font-size: 14px; line-height: 1.75; color: var(--ink); }
.log .story b { display: block; font-weight: 800; font-size: 15px; margin-bottom: 2px; }
.log .story.note b::before { content: '단서'; font-family: var(--sans); font-size: 11px; font-weight: 700; color: var(--clue); border: 1px solid var(--clue); border-radius: 2px; padding: 0 4px; margin-right: 6px; vertical-align: 2px; }
.log .story p { white-space: pre-line; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.log .narr { font-family: var(--serif); color: #cfc8b7; }
.log .info { color: var(--dim); font-size: 12.5px; }
.log .act { color: #d9e6df; font-weight: 600; }
.log .sep { display: flex; align-items: center; gap: 10px; color: var(--faint); font-size: 12px; margin: 16px 0 12px; }
.log .sep::before, .log .sep::after { content: ''; flex: 1; height: 1px; background: var(--line2); }
.log .sep.myth { color: #c48a7e; }
.log .roll { display: flex; align-items: center; gap: 6px; color: var(--dim); font-size: 12.5px; }
.log .roll .d { width: 17px; height: 17px; padding: 1px; border: 1px solid #5e584d; border-radius: 3px; display: inline-flex; color: var(--ink); }
.log .roll .d svg { width: 100%; height: 100%; }
.log .roll .d.f-c { color: var(--clue); }
.log .roll b { color: var(--ink); }
.log .roll b.no { color: var(--danger); }

/* 아래 조사자 카드 */
.hand { position: absolute; left: 0; width: 1210px; top: 728px; bottom: 0; display: flex; gap: 12px; padding: 0 16px; justify-content: center; z-index: 5; }
.icard { position: relative; width: 290px; height: 162px; padding: 9px 11px 8px; background: rgba(20, 21, 21, .94); border: 1px solid var(--line2); border-radius: 5px; transition: transform .2s, border-color .2s; display: flex; flex-direction: column; gap: 6px; }
.icard.cur { transform: translateY(-14px); border-color: var(--accent); }
.icard.down { opacity: .45; }
.icard .row1 { display: flex; gap: 10px; align-items: center; }
.icard .por { width: 40px; height: 40px; border-radius: 50%; flex: none; border: 2px solid #e9e2d0; display: flex; align-items: center; justify-content: center; font-weight: 800; }
.icard .nm { font-family: var(--serif); font-weight: 800; font-size: 17px; line-height: 1.2; }
.icard .rl { font-size: 12px; color: var(--dim); }
.icard .owner { margin-left: auto; align-self: flex-start; font-size: 11px; color: var(--accent); max-width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stats { display: flex; gap: 4px; }
.stats span { flex: 1; text-align: center; padding: 2px 0; background: rgba(255,255,255,.05); border-radius: 3px; font-size: 11px; color: var(--dim); line-height: 1.25; }
.stats span b { display: block; font-size: 14px; color: var(--ink); }
.stats span.minus b { color: var(--danger); }
.bars { display: flex; flex-direction: column; gap: 4px; }
.bar { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--dim); }
.bar .lb { width: 32px; }
.bar .cells { display: flex; gap: 2px; }
.bar .cells i { width: 13px; height: 9px; border-radius: 1px; background: rgba(255,255,255,.08); }
.bar.hp .cells i.on { background: #b9564a; }
.bar.san .cells i.on { background: #6f88b8; }
.bar .num { color: var(--ink); font-weight: 700; font-size: 12px; }
.bar .clue { margin-left: auto; display: flex; align-items: center; gap: 4px; color: var(--clue); font-weight: 700; font-size: 12px; }
.bar .clue svg { width: 13px; height: 13px; }
.chips { display: flex; gap: 4px; flex-wrap: wrap; min-height: 20px; max-height: 44px; overflow: hidden; }
.chip { height: 20px; padding: 0 7px; line-height: 18px; font-size: 11.5px; border: 1px solid var(--line2); border-radius: 2px; background: rgba(255,255,255,.04); white-space: nowrap; }
.chip.item.usable { cursor: pointer; border-color: var(--line); }
.chip.item.usable:hover { border-color: var(--accent); color: #dff0e8; }
.chip.injury { border-color: #9b4a40; color: #f0b8ae; }
.chip.madness { border-color: #6a5a9a; color: #c8bdf0; }

/* 창(모달) */
.veil { position: absolute; inset: 0; z-index: 50; background: rgba(4, 5, 6, .62); display: flex; align-items: center; justify-content: center; animation: fade .2s both; }
@keyframes fade { from { opacity: 0; } }
.modal { position: relative; width: 640px; max-height: 760px; padding: 34px 40px 28px; background: rgba(15, 17, 17, .96); border: 1px solid var(--line); border-radius: 5px; animation: rise .25s cubic-bezier(.2,.8,.3,1) both; display: flex; flex-direction: column; }
@keyframes rise { from { transform: translateY(16px); opacity: 0; } }
.modal.wide { width: 820px; }
.modal .kicker { font-size: 12px; letter-spacing: .25em; color: var(--dim); margin-bottom: 10px; }
.modal .kicker.clue { color: var(--clue); }
.modal .kicker.danger { color: var(--danger); }
.modal h2 { font-family: var(--serif); font-weight: 800; font-size: 30px; line-height: 1.25; }
.modal .body { margin-top: 16px; font-family: var(--serif); font-size: 17px; line-height: 1.85; white-space: pre-line; color: #e2dccb; overflow-y: auto; }
.modal .art { height: 250px; margin: -34px -40px 22px; border-radius: 5px 5px 0 0; background-size: cover; background-position: center 35%; border-bottom: 1px solid var(--line2); }
.modal.wide .art { height: 300px; }
.modal .art.mon { height: 300px; background-position: center 20%; }
.modal .foot { display: flex; gap: 10px; justify-content: flex-end; margin-top: 26px; }
.modal .opts { display: flex; flex-direction: column; gap: 10px; margin-top: 22px; }
.opt { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 56px; padding: 10px 16px; text-align: left; background: rgba(255,255,255,.04); border: 1px solid var(--line); border-radius: 4px; }
.opt:hover { border-color: var(--accent); background: rgba(143,185,168,.1); }
.opt .ol { flex: 1; font-size: 16px; font-weight: 600; }
.opt .od { font-size: 13px; color: var(--dim); white-space: nowrap; }
.opt[disabled] { opacity: .4; pointer-events: none; }

/* 주사위 */
.dicebox { width: 600px; text-align: center; }
.dicebox .who { font-size: 14px; color: var(--dim); }
.dicebox h2 { margin-top: 4px; font-size: 26px; }
.dicebox .need { font-size: 14px; color: var(--dim); margin-top: 6px; }
.dice { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin: 26px 0 8px; }
.die { width: 62px; height: 62px; border-radius: 9px; background: #e6dcc4; border: 2px solid #3a2f22; box-shadow: 0 4px 0 #2a2118, 0 8px 14px rgba(0,0,0,.5); display: flex; align-items: center; justify-content: center; color: #1f1a14; }
.die svg { width: 38px; height: 38px; }
.die.s { color: #1e3d33; }
.die.c { color: #6b4f12; }
.die.rolling { animation: shake .09s linear infinite; }
.die.changed { background: #cfe3d9; }
@keyframes shake { 0% { transform: rotate(-8deg); } 50% { transform: rotate(8deg) translateY(-3px); } 100% { transform: rotate(-8deg); } }
.dicebox .res { font-size: 22px; font-weight: 800; margin-top: 14px; min-height: 30px; }
.dicebox .res.ok { color: var(--accent); }
.dicebox .res.no { color: var(--danger); }
.dicebox .foot { justify-content: center; }

/* 금고 다이얼 */
.dials { display: flex; gap: 16px; justify-content: center; margin: 26px 0 6px; }
.dial { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.dial button { width: 64px; height: 30px; border: 1px solid var(--line2); border-radius: 3px; color: var(--dim); }
.dial button:hover { border-color: var(--line); color: #fff; }
.dial .n { width: 64px; height: 80px; display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-size: 46px; font-weight: 800; background: #1a1612; border: 2px solid #8c7a54; border-radius: 4px; }

/* 추리 */
.truths { display: flex; gap: 14px; margin-top: 24px; }
.truth { flex: 1; min-height: 130px; padding: 18px; text-align: left; border: 1px solid var(--line); border-radius: 4px; background: rgba(255,255,255,.04); font-family: var(--serif); font-size: 18px; font-weight: 600; line-height: 1.5; display: flex; flex-direction: column; justify-content: space-between; }
.truth small { font-family: var(--sans); font-size: 12px; color: var(--dim); font-weight: 500; }
.truth:hover { border-color: var(--accent); background: rgba(143,185,168,.1); }

.notes { margin-top: 18px; overflow-y: auto; max-height: 520px; padding-right: 8px; }
.notes .n { padding: 14px 0; border-bottom: 1px solid var(--line2); }
.notes .n b { font-family: var(--serif); font-size: 17px; }
.notes .n p { font-family: var(--serif); font-size: 15px; line-height: 1.75; color: #d6d0bf; margin-top: 4px; }
.notes .empty { color: var(--dim); padding: 20px 0; }

.toast { position: absolute; left: 50%; top: 86px; transform: translateX(-50%); z-index: 60; padding: 12px 22px; background: rgba(20, 12, 10, .95); border: 1px solid var(--danger); border-radius: 4px; font-size: 15px; animation: rise .2s both; pointer-events: none; max-width: 700px; text-align: center; }
.waiting { position: absolute; left: 50%; top: 86px; transform: translateX(-50%); z-index: 40; padding: 10px 20px; background: var(--panel); border: 1px solid var(--line); border-radius: 4px; font-size: 14px; }

.ending { text-align: center; width: 760px; padding: 50px 60px 40px; }
.ending .kicker { font-size: 14px; }
.ending h2 { font-size: 44px; }
.ending .body { text-align: left; }
.ending .foot { justify-content: center; }

/* 기록/채팅 탭 */
.logpanel .tabs { display: flex; gap: 4px; height: 100%; }
.logpanel .tabs button { height: 100%; padding: 0 12px; font-size: 14px; color: var(--dim); border-bottom: 2px solid transparent; }
.logpanel .tabs button.on { color: var(--ink); border-bottom-color: var(--accent); }
.logpanel .tabs button b { display: inline-block; min-width: 18px; margin-left: 6px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: #102019; font-size: 11px; line-height: 18px; }
.logpanel .tabs button b:empty { display: none; }

/* 채팅 */
.chat { display: flex; flex-direction: column; min-height: 0; }
.logpanel .chat { flex: 1; }
.chat .msgs { flex: 1; overflow-y: auto; padding: 12px 16px; scrollbar-width: thin; scrollbar-color: #444 transparent; user-select: text; }
.chat .m { margin-bottom: 9px; font-size: 14px; line-height: 1.5; }
.chat .m b { color: var(--accent); font-weight: 700; margin-right: 8px; }
.chat .m.me b { color: var(--clue); }
.chat .m span { word-break: break-all; }
.chat .m i { font-style: normal; font-size: 11px; color: var(--faint); margin-left: 6px; }
.chat .empty { color: var(--faint); font-size: 13px; }
.chat .say { flex: none; display: flex; gap: 6px; padding: 10px 12px; border-top: 1px solid var(--line2); }
.chat .say .input { flex: 1; width: auto; height: 36px; font-size: 14px; padding: 0 10px; }
.chat .say .btn { height: 36px; }
.lobby .chat { position: absolute; right: 90px; top: 50px; width: 500px; height: 210px; background: var(--panel); border: 1px solid var(--line2); border-radius: 6px; }

.sound-corner { position: absolute; right: 40px; bottom: 36px; z-index: 3; }

/* ================= 고급 다듬기 (10-10) =================
   얇은 두 줄 테두리(인쇄물 느낌) · 상아색 글씨 · 나뭇결 탁자 · 판 위만 은은한 등불 빛 */
:root {
  --ink: #e9e2d0;
  --dim: #a69e8b;
  --faint: #6c665a;
  --panel: rgba(15, 13, 11, .9);
  --line: rgba(233, 226, 208, .55);
  --line2: rgba(233, 226, 208, .16);
  --hair: rgba(233, 226, 208, .09);
  --frame: inset 0 0 0 4px rgba(15, 13, 11, .0), inset 0 0 0 5px rgba(233, 226, 208, .1);
}
#stage {
  background-color: #1a120d;
  background-image: linear-gradient(rgba(14, 9, 6, .78), rgba(14, 9, 6, .78)), url(img/table.jpg);
  background-size: cover; background-position: center;
}
#stage::before { content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 1;
  background: radial-gradient(ellipse 52% 48% at 38% 46%, rgba(255, 214, 160, .07), transparent 70%); }
#stage::after { box-shadow: inset 0 0 260px rgba(0, 0, 0, .85); }

/* 버튼 */
.btn { background: rgba(16, 14, 12, .88); border-color: rgba(233, 226, 208, .45); border-radius: 2px; box-shadow: var(--frame); letter-spacing: .04em; font-weight: 600; }
.btn:hover { background: rgba(233, 226, 208, .08); border-color: rgba(233, 226, 208, .85); }
.btn.main { border-color: rgba(143, 185, 168, .8); color: #e4f1ea; }
.btn.main:hover { background: rgba(143, 185, 168, .12); }

/* 첫 화면 */
.title-box .kicker { font-size: 13px; letter-spacing: .55em; }
.title-box h1 { font-size: 88px; letter-spacing: .02em; text-shadow: 0 2px 30px rgba(0, 0, 0, .6); }
.title-box .sub { letter-spacing: .08em; }
.title-box .sub::before { content: ''; display: block; width: 64px; height: 1px; background: var(--line); margin-bottom: 18px; }
.title-menu .btn { height: 54px; }
.credits-btn { position: absolute; right: 150px; bottom: 36px; z-index: 3; }

/* 고르기 카드 */
.pick { background: linear-gradient(#181512, #110f0d); border-color: var(--line2); border-radius: 3px; box-shadow: var(--frame), 0 14px 30px rgba(0, 0, 0, .45); }
.pick .por { border-radius: 2px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .5); }
.pick.on { box-shadow: var(--frame), 0 0 0 1px var(--accent), 0 18px 34px rgba(0, 0, 0, .55); }

/* 위 막대 */
.topbar { background: rgba(10, 9, 8, .9); border-bottom: 1px solid var(--line2); box-shadow: 0 1px 0 rgba(0, 0, 0, .6), 0 3px 0 -2px var(--hair); }
.topbar .tt { letter-spacing: .04em; }
.clock { border-radius: 2px; box-shadow: var(--frame); background: rgba(0, 0, 0, .3); }
.tidebar i { border-radius: 0; border-color: rgba(233, 226, 208, .28); }

/* 방 타일: 그림 + 두께 */
.tile { border-radius: 2px; background-size: cover; background-position: center;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .75), 0 3px 0 #0d0906, 0 5px 0 #070504, 0 14px 26px rgba(0, 0, 0, .6); }
.tile.art::before { content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(233, 226, 208, .14), inset 0 0 40px rgba(0, 0, 0, .45); background: rgba(10, 8, 6, .12); }
.tile.art.here::before { box-shadow: inset 0 0 0 2px var(--accent), inset 0 0 40px rgba(0, 0, 0, .45); border: 0; }
.tile .rname { left: 0; top: 0; padding: 4px 10px 4px 9px; background: rgba(10, 8, 7, .86); border: 0; border-right: 1px solid var(--line2); border-bottom: 1px solid var(--line2); border-radius: 0 0 2px 0; font-family: var(--serif); font-size: 13px; letter-spacing: .04em; }
.tile.can-move::after { border: 1px solid rgba(233, 226, 208, .9); box-shadow: inset 0 0 0 3px rgba(233, 226, 208, .18); border-radius: 2px; }
.tile.can-move:hover::after { border-color: var(--accent); box-shadow: inset 0 0 0 3px rgba(143, 185, 168, .35); background: rgba(143, 185, 168, .08); }
.tile .water { background: rgba(26, 64, 74, .4); }
.floorlbl { font-size: 13px; letter-spacing: .5em; color: rgba(233, 226, 208, .5); }
.floorlbl::after { content: ''; display: inline-block; width: 40px; height: 1px; background: rgba(233, 226, 208, .3); vertical-align: middle; margin-left: 4px; }

.door { background: #6e5235; border: 1px solid #120c08; box-shadow: 0 0 0 1px rgba(233, 226, 208, .35), 0 2px 4px rgba(0, 0, 0, .6); border-radius: 1px; }
.door.unknown { background: #0e0c0a; box-shadow: 0 0 0 1px rgba(233, 226, 208, .7), 0 2px 4px rgba(0, 0, 0, .6); font-family: var(--serif); color: var(--ink); }
.door.can-move { outline: 1px solid #fff; outline-offset: 2px; }
.stair { background: rgba(10, 8, 7, .88); border-color: var(--line2); border-radius: 1px; font-family: var(--serif); letter-spacing: .04em; }

/* 살펴볼 곳 토큰: 상아색 원판 + 안쪽 고리 */
.spot { background: #ddd0b0; border: 1px solid #2a1f14; box-shadow: inset 0 0 0 3px #ddd0b0, inset 0 0 0 4px rgba(42, 31, 20, .55), 0 2px 0 #140e09, 0 6px 10px rgba(0, 0, 0, .55); color: #2a1f14; }
.spot.goal { background: #c8d8cf; box-shadow: inset 0 0 0 3px #c8d8cf, inset 0 0 0 4px rgba(20, 50, 40, .55), 0 2px 0 #0b1410, 0 6px 12px rgba(0, 0, 0, .6); }
.spot.can-use { outline: 1px solid #fff; outline-offset: 3px; }
.spot .lbl { background: rgba(10, 8, 7, .86); font-family: var(--serif); font-weight: 600; letter-spacing: .02em; border-radius: 1px; padding: 1px 6px; }

/* 말: 받침이 있는 원형 토큰 */
.pawn { border: 2px solid #e9e2d0; box-shadow: 0 0 0 2px #15100c, 0 3px 0 #0a0705, 0 7px 12px rgba(0, 0, 0, .65); }
.pawn.cur { box-shadow: 0 0 0 2px #15100c, 0 0 0 4px var(--accent), 0 7px 12px rgba(0, 0, 0, .65); }
.mon { border: 2px solid #d8b9a6; border-radius: 2px; box-shadow: 0 0 0 2px #1a0a08, 0 3px 0 #0a0403, 0 8px 14px rgba(0, 0, 0, .7); }
.mon .hp { background: #1a0a08; border-color: #d8b9a6; border-radius: 1px; font-family: var(--serif); }

/* 차례 막대·확대 버튼 */
.turnbar .in { background: rgba(15, 13, 11, .92); border-color: var(--line); border-radius: 2px; box-shadow: var(--frame), 0 10px 24px rgba(0, 0, 0, .5); }
.turnbar .who { font-family: var(--serif); letter-spacing: .02em; }
.pips i { border-radius: 0; transform: rotate(45deg); width: 10px; height: 10px; margin: 0 2px; }

/* 기록 창 */
.logpanel { background: rgba(12, 10, 9, .9); box-shadow: -1px 0 0 rgba(0, 0, 0, .6), inset 3px 0 0 -2px var(--hair); }
.logpanel .hd { letter-spacing: .12em; font-size: 13px; }
.log .sep::before, .log .sep::after { background: var(--line2); }
.log .sep { letter-spacing: .08em; }
.log .sep.myth::before { background: linear-gradient(90deg, transparent, rgba(196, 138, 126, .45)); }
.log .sep.myth::after { background: linear-gradient(90deg, rgba(196, 138, 126, .45), transparent); }
.log .story b { letter-spacing: .02em; }

/* 조사자 카드: 실물 카드 느낌 */
.icard { background: linear-gradient(#1a1714, #12100e); border: 1px solid rgba(233, 226, 208, .22); border-radius: 3px; box-shadow: var(--frame), 0 3px 0 #0a0806, 0 12px 26px rgba(0, 0, 0, .55); }
.icard.cur { border-color: rgba(143, 185, 168, .85); box-shadow: var(--frame), 0 0 0 1px rgba(143, 185, 168, .5), 0 3px 0 #0a0806, 0 18px 30px rgba(0, 0, 0, .6); }
.icard .por { border: 2px solid #e9e2d0; box-shadow: 0 0 0 2px #15100c; }
.stats span { background: rgba(233, 226, 208, .045); border-radius: 1px; box-shadow: inset 0 0 0 1px rgba(233, 226, 208, .06); }
.stats span b { font-family: var(--serif); }
.bar .cells i { border-radius: 0; }
.bar.hp .cells i.on { background: #a84a3e; }
.bar.san .cells i.on { background: #5e78a8; }
.chip { border-radius: 1px; }
.icard.hurt { animation: hurt .5s ease-out; }
.icard.hurt::after { content: ''; position: absolute; inset: -1px; border: 1px solid #c4584a; box-shadow: inset 0 0 30px rgba(160, 40, 30, .35); pointer-events: none; animation: hurtfade .9s ease-out forwards; border-radius: 3px; }
.icard.cur.hurt { animation: hurtcur .5s ease-out; }
@keyframes hurt { 0%, 100% { transform: none; } 20% { transform: translateX(-6px); } 40% { transform: translateX(5px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(2px); } }
@keyframes hurtcur { 0%, 100% { transform: translateY(-14px); } 20% { transform: translate(-6px, -14px); } 40% { transform: translate(5px, -14px); } 60% { transform: translate(-3px, -14px); } 80% { transform: translate(2px, -14px); } }
@keyframes hurtfade { to { opacity: 0; } }
.icard.mind.hurt::after { border-color: #6a78b8; box-shadow: inset 0 0 30px rgba(60, 70, 150, .35); }

/* 창: 책처럼 */
.veil { background: rgba(5, 4, 3, .66); }
.modal { background: linear-gradient(#171411, #100e0c); border: 1px solid rgba(233, 226, 208, .4); border-radius: 2px; box-shadow: inset 0 0 0 6px #13110e, inset 0 0 0 7px rgba(233, 226, 208, .12), 0 30px 80px rgba(0, 0, 0, .7); padding: 38px 48px 32px; }
.modal .art { margin: -38px -48px 0; height: 260px; border-radius: 2px 2px 0 0; border-bottom: 0; -webkit-mask-image: linear-gradient(#000 62%, transparent); mask-image: linear-gradient(#000 62%, transparent); }
.modal.wide .art { height: 320px; }
.modal .art + .kicker { margin-top: -26px; position: relative; }
.modal .kicker { letter-spacing: .4em; font-size: 11.5px; }
.modal h2 { letter-spacing: .02em; }
.modal h2 + .body::before { content: ''; display: block; width: 100%; height: 9px; margin: -2px 0 16px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='9' height='9'%3E%3Cpath d='M4.5 0L9 4.5 4.5 9 0 4.5z' fill='%23e9e2d0' fill-opacity='.5'/%3E%3C/svg%3E") center / 9px 9px no-repeat,
    linear-gradient(var(--line2), var(--line2)) left center / calc(50% - 12px) 1px no-repeat,
    linear-gradient(var(--line2), var(--line2)) right center / calc(50% - 12px) 1px no-repeat; }
.modal .body { font-size: 17.5px; line-height: 1.95; color: #e3dccb; }
.modal.story { text-align: center; }
.modal.story .body { text-align: left; }
.modal.story .foot { justify-content: center; }
.opt { background: rgba(233, 226, 208, .03); border-color: rgba(233, 226, 208, .35); border-radius: 2px; }
.opt:hover { background: rgba(143, 185, 168, .08); }
.tag { border-radius: 1px; }
.truth { border-radius: 2px; border-color: rgba(233, 226, 208, .35); box-shadow: var(--frame); }

/* 주사위: 탁자에 던져져 구르다 멈춤 */
.dicebox .dice { min-height: 80px; }
.die { background: #e7dcc2; border: 1px solid #2c241a; border-radius: 10px; box-shadow: inset 0 -4px 0 rgba(60, 45, 25, .22), inset 0 0 0 3px #e7dcc2, inset 0 0 0 4px rgba(44, 36, 26, .18), 0 3px 0 #1d1710, 0 10px 16px rgba(0, 0, 0, .55); }
.die.rolling { animation: none; }
.die.thrown { animation: throwdie .75s cubic-bezier(.2, .7, .3, 1) both; }
@keyframes throwdie {
  0% { transform: translate(-260px, -90px) rotate(-420deg) scale(.7); opacity: 0; }
  35% { opacity: 1; }
  70% { transform: translate(8px, 4px) rotate(12deg) scale(1.02); }
  85% { transform: translate(-3px, -2px) rotate(-4deg); }
  100% { transform: none; }
}
.die.blank { color: transparent; }

.toast, .waiting { border-radius: 2px; box-shadow: var(--frame), 0 10px 24px rgba(0, 0, 0, .5); }
.lobby .chat, .online-box .col { border-radius: 3px; box-shadow: var(--frame); }
.music-credit { position: absolute; left: 140px; bottom: 30px; z-index: 3; font-size: 12px; color: rgba(233, 226, 208, .42); letter-spacing: .02em; }

/* 사건 고르기 */
.scard-row { display: flex; gap: 22px; margin-top: 40px; }
.scard { width: 460px; height: 560px; text-align: left; display: flex; flex-direction: column; background: linear-gradient(#181512, #110f0d); border: 1px solid var(--line2); border-radius: 3px; box-shadow: var(--frame), 0 14px 30px rgba(0, 0, 0, .45); overflow: hidden; transition: transform .15s, border-color .15s; }
.scard:hover { transform: translateY(-6px); border-color: var(--line); }
.scard.on { border-color: var(--accent); box-shadow: var(--frame), 0 0 0 1px var(--accent); }
.scard .sart { height: 300px; background-size: cover; background-position: center; -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }
.scard .sbody { padding: 0 28px 26px; margin-top: -20px; position: relative; }
.scard .ssub { font-size: 12px; letter-spacing: .2em; color: var(--dim); }
.scard .stitle { font-family: var(--serif); font-size: 28px; font-weight: 800; margin-top: 8px; line-height: 1.3; }
.scard .steaser { font-family: var(--serif); font-size: 15px; line-height: 1.75; color: #cfc8b6; margin-top: 14px; }
.scard.small { width: 250px; height: 150px; flex-direction: row; }
.scard.small .sart { width: 110px; height: auto; -webkit-mask-image: none; mask-image: none; }
.scard.small .sbody { margin: 0; padding: 14px 14px; display: flex; flex-direction: column; justify-content: center; }
.scard.small .ssub { font-size: 10.5px; letter-spacing: .05em; }
.scard.small .stitle { font-size: 17px; margin-top: 4px; }
.scen-row { display: flex; gap: 10px; }

/* 조사자 10명: 다섯 명씩 두 줄 */
.setup { padding-top: 56px; }
.pick-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px 14px; margin-top: 20px; }
.pick { width: auto; height: 300px; padding: 0 0 12px; display: grid; grid-template-columns: 104px 1fr; grid-template-rows: 38px 22px 56px auto auto 1fr; column-gap: 12px; align-content: start; overflow: hidden; }
.pick:hover { transform: translateY(-3px); }
.pick.on { transform: translateY(-5px); }
.pick .por { grid-row: 1 / 4; width: 104px; height: 116px; margin: 0; border-radius: 2px 0 2px 0; }
.pick .nm { font-size: 18px; padding: 12px 8px 0 0; line-height: 1.3; white-space: nowrap; }
.pick .rl { font-size: 13px; padding: 1px 8px 0 0; }
.pick .rl2 { font-size: 12px; color: var(--faint); padding: 0 8px 0 0; }
.pick .stats { grid-column: 1 / 3; margin: 10px 12px 0; gap: 3px; align-self: start; }
.pick .stats span { font-size: 10.5px; padding: 3px 0; }
.pick .stats span b { font-size: 14px; }
.pick .ab { grid-column: 1 / 3; padding: 0 12px; font-size: 12.5px; line-height: 1.5; margin-top: 9px; }
.pick .ab b { display: inline; margin-right: 6px; }
.pick .bio { grid-column: 1 / 3; display: block; padding: 0 12px; margin-top: 7px; font-family: var(--serif); font-size: 12px; line-height: 1.6; color: var(--dim); -webkit-line-clamp: unset; overflow: visible; }
.pick .order { right: 10px; top: 10px; left: auto; }
.pick .who { right: 8px; top: 8px; background: rgba(10, 8, 7, .85); padding: 2px 6px; }
/* 대기실: 위 한 줄(제목·코드 | 사건 | 채팅) + 카드 두 줄 */
.lobby { padding-top: 30px; }
.lobby-top { display: flex; gap: 26px; height: 170px; }
.lt-left { width: 400px; }
.lobby h2 { font-size: 30px; }
.lobby .roomcode { font-size: 36px; line-height: 1.1; }
.lobby .players { margin-top: 0; }
.lt-scen { display: flex; flex-direction: column; gap: 6px; width: 300px; }
.lt-label { font-size: 12px; color: var(--dim); letter-spacing: .1em; }
.lobby .scard.small { height: 42px; width: 300px; }
.lobby .scard.small .sart { width: 64px; }
.lobby .scard.small .sbody { padding: 0 12px; }
.lobby .scard.small .ssub { display: none; }
.lobby .scard.small .stitle { font-size: 14.5px; margin: 0; }
.lobby .scard:hover { transform: none; }
.lobby .chat { top: 30px; height: 170px; }
.lobby .pick-row { margin-top: 12px; gap: 10px 14px; }
.lobby .pick { height: 292px; }
.lobby .setup-foot { bottom: 22px; }
/* 순서 자물쇠 */
.order-pick { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 24px; }
.ochip { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 92px; padding: 12px 0 10px; border: 1px solid var(--line2); border-radius: 2px; font-size: 13px; }
.ochip i { width: 46px; height: 46px; border-radius: 50%; box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .35), 0 0 0 1px rgba(233, 226, 208, .35); }
.ochip:hover { border-color: var(--line); }
.ochip[disabled] { opacity: .3; pointer-events: none; }
.order-seq { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 22px; min-height: 40px; }
.order-seq em { color: var(--faint); font-style: normal; }
.oslot { display: flex; align-items: center; gap: 6px; min-width: 84px; height: 36px; padding: 0 10px; justify-content: center; border: 1px dashed var(--line2); border-radius: 2px; font-size: 13px; color: var(--faint); }
.oslot.on { border-style: solid; border-color: var(--line); color: var(--ink); }
.oslot i { width: 14px; height: 14px; border-radius: 50%; }

/* 버그 신고 */
.bug-corner { position: absolute; right: 150px; bottom: 36px; z-index: 3; }
.bugbox { width: 660px; }
.bug-kinds { display: flex; gap: 8px; margin-top: 18px; flex-wrap: wrap; }
.bk { height: 34px; padding: 0 14px; border: 1px solid var(--line2); border-radius: 2px; font-size: 14px; color: var(--dim); }
.bk:hover { border-color: var(--line); color: var(--ink); }
.bk.on { border-color: var(--accent); color: #e4f1ea; background: rgba(143, 185, 168, .1); }
.bug-text { width: 100%; height: 170px; margin-top: 14px; padding: 12px 14px; font-size: 15px; line-height: 1.6; resize: none; font-family: var(--sans); }
.bugbox .input#bugName { width: 260px; height: 40px; font-size: 15px; }
.players .p.ready { border-color: rgba(143, 185, 168, .6); }
.players .p b.wait { color: var(--faint); }

/* 남의 차례: 보기만 */
.blocked { margin-top: 14px; padding: 10px 14px; border-left: 2px solid var(--clue); background: rgba(216, 194, 122, .06); font-size: 14px; color: #ddd3b0; line-height: 1.6; }
.spot, .mon, .tile[data-room] { cursor: pointer; }
.chip.item { cursor: pointer; }

/* 구경 중: 창은 보이되 누를 수 없고 뒤 채팅은 쓸 수 있게 */
.veil.spectating { pointer-events: none; background: rgba(5, 4, 3, .35); }
.veil.spectating .modal { box-shadow: inset 0 0 0 6px #13110e, inset 0 0 0 7px rgba(143, 185, 168, .25), 0 30px 80px rgba(0, 0, 0, .7); }
.spec { margin-top: 18px; padding: 10px 14px; border-left: 2px solid var(--accent); background: rgba(143, 185, 168, .07); font-size: 14px; color: #d6e6de; text-align: left; }
.ochip.used { opacity: .3; }
div.ochip { cursor: default; }
.truth.leaning { border-color: var(--accent); background: rgba(143, 185, 168, .12); }
.truth small:empty { visibility: hidden; }
#actnotes { position: absolute; left: 50%; top: 82px; transform: translateX(-50%); z-index: 30; display: flex; flex-direction: column; gap: 6px; align-items: center; pointer-events: none; }
.actnote { padding: 8px 16px; background: rgba(15, 13, 11, .92); border: 1px solid rgba(143, 185, 168, .5); border-radius: 2px; font-size: 14px; white-space: nowrap; box-shadow: var(--frame), 0 8px 18px rgba(0, 0, 0, .5); animation: rise .25s both; transition: opacity .4s, transform .4s; }
.actnote.out { opacity: 0; transform: translateY(-6px); }

/* 괴물 등장 창: 그림 왼쪽 크게 */
.modal.monster { width: 940px; padding: 0; }
.monwrap { display: flex; }
.monart { flex: none; width: 420px; height: 420px; background-size: cover; background-position: center; border-right: 1px solid var(--line2); }
.montext { flex: 1; padding: 36px 40px 30px; display: flex; flex-direction: column; text-align: left; }
.montext .body { flex: 1; }
.monstats { display: flex; gap: 10px; margin-top: 14px; }
.monstats span { font-size: 13px; color: var(--dim); padding: 4px 10px; border: 1px solid var(--line2); border-radius: 2px; }
.monstats b { color: #f0b8ae; font-size: 15px; margin-left: 4px; }
.monstats .boss { color: #f0b8ae; border-color: rgba(196, 88, 74, .6); }
.modal.story.monster .foot { justify-content: flex-start; }

/* 불·막힌 문·옆방 사격·기절 */
.tile .fire { position: absolute; inset: 0; pointer-events: none; z-index: 1; background: rgba(150, 62, 20, .38); box-shadow: inset 0 0 0 2px rgba(214, 120, 60, .75); animation: flick 1.6s ease-in-out infinite alternate; }
.tile .fire span { position: absolute; right: 6px; top: 6px; padding: 2px 8px; background: #6b2a12; border: 1px solid #e0915a; font-size: 12px; font-weight: 700; color: #ffd9bf; }
@keyframes flick { from { opacity: .75; } to { opacity: 1; } }
.door.barred { background: repeating-linear-gradient(45deg, #5a3e24 0 5px, #3a2614 5px 9px); box-shadow: 0 0 0 1px #d6c9a8, 0 2px 4px rgba(0, 0, 0, .6); }
.door.v.barred { width: 20px; margin-left: -10px; }
.door.h.barred { height: 20px; margin-top: -10px; }
.mon.far { outline: 2px dashed #d8a46a; outline-offset: 3px; cursor: crosshair; }
.mon.stunned { filter: grayscale(.7) brightness(.8); }
.chip.skill { border-color: rgba(143, 185, 168, .6); color: #cfe6dc; cursor: pointer; }
.chip.skill.used { border-color: var(--line2); color: var(--faint); text-decoration: line-through; }
.chip b { color: var(--clue); font-weight: 700; }
.chip.empty { opacity: .5; }
.skillbtn { border-color: rgba(143, 185, 168, .7) !important; }
.firebtn { border-color: rgba(214, 120, 60, .8) !important; color: #ffd9bf; }
.monstats { flex-wrap: wrap; }
.monstats .trait { color: #e6d9a8; border-color: rgba(216, 194, 122, .45); }
.hub-corner { position: absolute; left: 40px; top: 32px; z-index: 3; text-decoration: none; color: var(--ink); }

/* 게임 방법 · 세계관 */
.title-sub { display: flex; gap: 10px; margin-top: 6px; }
.title-sub .btn { flex: 1; min-width: 0; height: 42px; font-size: 15px; justify-content: center; padding: 0; }
.book .book-wrap { display: flex; gap: 26px; margin-top: 26px; height: 620px; }
.book-toc { width: 300px; display: flex; flex-direction: column; gap: 4px; }
.book-toc button { display: flex; align-items: center; gap: 12px; height: 52px; padding: 0 16px; text-align: left; border: 1px solid transparent; border-radius: 2px; font-family: var(--serif); font-size: 16px; color: var(--dim); }
.book-toc button span { width: 26px; height: 26px; border: 1px solid var(--line2); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: var(--sans); font-size: 12px; }
.book-toc button:hover { color: var(--ink); }
.book-toc button.on { color: var(--ink); border-color: var(--line2); background: rgba(233, 226, 208, .05); }
.book-toc button.on span { border-color: var(--accent); color: var(--accent); }
.book-page { flex: 1; position: relative; padding: 40px 54px; background: linear-gradient(#181512, #110f0d); border: 1px solid var(--line2); border-radius: 2px; box-shadow: var(--frame), 0 18px 40px rgba(0, 0, 0, .5); }
.book-page h3 { font-family: var(--serif); font-size: 32px; font-weight: 800; margin-top: 10px; }
.book-page h3::after { content: ''; display: block; width: 64px; height: 1px; background: var(--line); margin-top: 18px; }
.book-body { margin-top: 22px; font-family: var(--serif); font-size: 17px; line-height: 1.95; color: #e0d9c7; white-space: pre-line; max-height: 440px; overflow-y: auto; padding-right: 10px; user-select: text; }
.book-nav { position: absolute; right: 30px; bottom: 26px; display: flex; gap: 8px; }
.night-chip { flex: none; height: 32px; padding: 0 12px; border: 1px solid rgba(216, 194, 122, .5); border-radius: 2px; color: #e6d9a8; font-size: 13px; font-family: var(--serif); white-space: nowrap; }
.night-chip:empty { display: none; }

/* =====================================================================
   모던 v2 (10-10): 테두리 대신 면과 그림자로 층을 나눔.
   반투명 판 + 흐림 · 둥근 모서리 · 고딕 UI, 명조는 제목·이야기만
   ===================================================================== */
:root {
  --s0: rgba(14, 12, 10, .72);
  --s1: rgba(24, 21, 18, .86);
  --s2: rgba(34, 30, 26, .92);
  --hl: rgba(255, 246, 228, .07);
  --hl2: rgba(255, 246, 228, .12);
  --tx: #efe8d8;
  --tx2: #b3aa97;
  --tx3: #7d7565;
  --ac: #9cc5b3;
  --ac-d: #1a2a24;
  --rd: #d36a58;
  --bl: #7e97c9;
  --gd: #e2c886;
  --r: 10px;
  --sh: 0 1px 0 rgba(255, 246, 228, .05) inset, 0 12px 32px rgba(0, 0, 0, .45);
  --frame: none;
}
body { letter-spacing: -.005em; }

/* 버튼 */
.btn { height: 40px; padding: 0 18px; border: 0; border-radius: 8px; background: var(--hl); color: var(--tx); font-weight: 600; letter-spacing: 0; box-shadow: 0 1px 0 rgba(255,246,228,.06) inset, 0 1px 2px rgba(0,0,0,.4); transition: background .15s, transform .1s, box-shadow .15s; }
.btn:hover { background: var(--hl2); border: 0; }
.btn.main { background: var(--ac); color: var(--ac-d); box-shadow: 0 6px 18px rgba(156, 197, 179, .18); }
.btn.main:hover { background: #b0d4c4; }
.btn.small { height: 34px; padding: 0 13px; font-size: 13.5px; border-radius: 7px; }
.btn[disabled] { opacity: .3; }
.tag { border: 0; background: var(--hl); color: var(--tx2); border-radius: 5px; padding: 3px 8px; font-weight: 600; }

/* 첫 화면 */
.title-box .kicker { letter-spacing: .5em; color: var(--tx2); }
.title-box h1 { font-size: 92px; letter-spacing: -.01em; }
.title-menu { gap: 10px; }
.title-menu .btn { height: 56px; border-radius: 10px; font-size: 17px; background: rgba(14, 12, 10, .62); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.title-menu .btn:hover { background: rgba(40, 36, 31, .8); }
.title-menu .btn.main { background: var(--ac); }
.title-sub .btn { height: 44px; }
.hub-corner, .bug-corner, .sound-corner { background: rgba(14, 12, 10, .55) !important; backdrop-filter: blur(8px); }

/* 고르기·대기실 카드 */
.pick, .scard, .online-box .col, .book-page, .lobby .chat { border: 0; border-radius: 14px; background: var(--s1); box-shadow: var(--sh); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.pick:hover, .scard:hover { border: 0; background: var(--s2); }
.pick.on, .scard.on { box-shadow: 0 0 0 2px var(--ac), var(--sh); }
.pick .por { border-radius: 14px 0 12px 0; }
.pick .order { background: var(--ac); color: var(--ac-d); }
.stats span { border-radius: 6px; background: rgba(255, 246, 228, .045); box-shadow: none; }
.input { border: 0; border-radius: 8px; background: rgba(0, 0, 0, .35); box-shadow: 0 0 0 1px var(--hl2) inset; }
.input:focus { box-shadow: 0 0 0 2px var(--ac) inset; }
.book-toc button { border-radius: 8px; }
.book-toc button.on { background: var(--hl); border-color: transparent; }

/* 위 막대 */
.topbar { background: rgba(12, 10, 9, .78); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 0; box-shadow: 0 1px 0 var(--hl), 0 8px 24px rgba(0, 0, 0, .35); gap: 14px; }
.topbar .obj { border-left: 0; padding-left: 0; font-size: 13.5px; color: var(--tx2); }
.topbar .obj b { display: inline-block; padding: 2px 8px; margin-right: 8px; border-radius: 5px; background: rgba(156, 197, 179, .14); color: var(--ac); font-size: 12px; }
.clock { border: 0; border-radius: 10px; background: var(--hl); box-shadow: none; height: 48px; }
.clock .time { font-size: 21px; }
.tidebar i { width: 7px; height: 18px; border: 0; border-radius: 3px; background: rgba(255, 246, 228, .1); }
.tidebar i.on { background: #6e9aa6; }
.tidebar i.late { background: rgba(211, 106, 88, .25); }
.tidebar i.late.on { background: var(--rd); }
.clock.warn { background: rgba(211, 106, 88, .14); }
.night-chip { border: 0; border-radius: 8px; background: rgba(226, 200, 134, .12); color: var(--gd); height: 34px; font-family: var(--sans); font-weight: 600; }
.hazards { display: flex; gap: 6px; }
.hazards:empty { display: none; }
.hz { display: inline-flex; align-items: center; gap: 5px; height: 34px; padding: 0 10px; border-radius: 8px; font-size: 13px; font-weight: 700; }
.hz svg { width: 16px; height: 16px; }
.hz.fire { background: rgba(230, 120, 60, .18); color: #ffb98a; }
.hz.water { background: rgba(110, 154, 166, .18); color: #a9cfd8; }
.hz.hzmon { background: rgba(211, 106, 88, .16); color: #f2a99c; }
.hz.hzbar { background: rgba(226, 200, 134, .12); color: var(--gd); }

/* 판 */
.tile { border-radius: 8px; box-shadow: 0 2px 0 rgba(0,0,0,.6), 0 16px 30px rgba(0, 0, 0, .55); }
.tile.art::before { border-radius: 8px; box-shadow: inset 0 0 0 1px rgba(255, 246, 228, .1), inset 0 0 50px rgba(0, 0, 0, .5); }
.tile .rname { top: 7px; left: 7px; padding: 4px 10px; border: 0; border-radius: 6px; background: rgba(10, 9, 8, .72); backdrop-filter: blur(6px); font-family: var(--sans); font-weight: 700; font-size: 12.5px; letter-spacing: 0; }
.tile.can-move::after { border: 0; border-radius: 8px; box-shadow: inset 0 0 0 2px rgba(255, 246, 228, .75); }
.tile.can-move:hover::after { box-shadow: inset 0 0 0 2px var(--ac); background: rgba(156, 197, 179, .1); }
.tile.art.here::before { box-shadow: inset 0 0 0 2px var(--ac), inset 0 0 50px rgba(0, 0, 0, .5); }
.floorlbl { font-family: var(--sans); font-weight: 700; font-size: 12px; letter-spacing: .4em; color: rgba(239, 232, 216, .38); }
.door { border-radius: 4px; border: 0; background: #7a5a3a; box-shadow: 0 0 0 2px rgba(10, 8, 6, .85), 0 3px 8px rgba(0, 0, 0, .6); }
.door.unknown { background: #1a1714; color: var(--tx); box-shadow: 0 0 0 2px rgba(255, 246, 228, .55), 0 3px 8px rgba(0, 0, 0, .6); font-family: var(--sans); }
.door.can-move { outline: 0; box-shadow: 0 0 0 2px #fff, 0 3px 8px rgba(0, 0, 0, .6); }
.door.can-move:hover { box-shadow: 0 0 0 2px var(--ac), 0 3px 8px rgba(0, 0, 0, .6); }
.door.barred { box-shadow: 0 0 0 2px var(--gd), 0 3px 8px rgba(0, 0, 0, .6); }
.stair { border: 0; border-radius: 6px; background: rgba(10, 9, 8, .78); backdrop-filter: blur(6px); font-family: var(--sans); font-weight: 700; }
.stair.can-move { outline: 0; box-shadow: 0 0 0 2px #fff; }
.spot { background: #efe6cf; border: 0; box-shadow: 0 0 0 3px rgba(20, 16, 12, .85), 0 6px 14px rgba(0, 0, 0, .55); color: #2a1f14; }
.spot.can-use { outline: 0; box-shadow: 0 0 0 3px rgba(20, 16, 12, .85), 0 0 0 5px rgba(255, 246, 228, .9), 0 6px 14px rgba(0, 0, 0, .55); }
.spot.can-use:hover { box-shadow: 0 0 0 3px rgba(20, 16, 12, .85), 0 0 0 5px var(--ac), 0 6px 14px rgba(0, 0, 0, .55); }
.spot.goal { background: #cfe4da; }
.spot .lbl { border-radius: 5px; background: rgba(10, 9, 8, .8); backdrop-filter: blur(4px); font-family: var(--sans); font-weight: 700; font-size: 11px; padding: 2px 7px; }
.pawn { border: 0; box-shadow: 0 0 0 2.5px #f1e9d6, 0 0 0 4.5px rgba(10, 8, 6, .8), 0 8px 14px rgba(0, 0, 0, .6); }
.pawn.cur { box-shadow: 0 0 0 2.5px var(--ac), 0 0 0 4.5px rgba(10, 8, 6, .85), 0 0 0 7px rgba(156, 197, 179, .25), 0 8px 14px rgba(0, 0, 0, .6); }
.mon { border: 0; border-radius: 9px; box-shadow: 0 0 0 2.5px #e7c6b6, 0 0 0 4.5px rgba(26, 8, 6, .85), 0 8px 16px rgba(0, 0, 0, .65); }
.mon .hp { border: 0; border-radius: 5px; background: var(--rd); color: #fff; font-family: var(--sans); height: 17px; line-height: 17px; bottom: -10px; box-shadow: 0 2px 6px rgba(0,0,0,.5); }
.mon.can-attack { outline: 0; box-shadow: 0 0 0 2.5px var(--rd), 0 0 0 4.5px rgba(26, 8, 6, .85), 0 0 0 7px rgba(211, 106, 88, .3), 0 8px 16px rgba(0, 0, 0, .65); }
.mon.far { outline: 0; box-shadow: 0 0 0 2.5px #e8a970, 0 0 0 4.5px rgba(26, 8, 6, .85), 0 0 0 7px rgba(232, 169, 112, .28); }
.mon.spawned::after { content: ''; position: absolute; inset: -6px; border-radius: 14px; box-shadow: 0 0 0 2px var(--rd); animation: ring 1s ease-out 1 both; pointer-events: none; }
.mon.spawned { animation: drop .4s ease-out; }
@keyframes ring { from { transform: scale(.9); opacity: 1; } to { transform: scale(1.8); opacity: 0; } }
@keyframes drop { from { transform: translateY(-12px); opacity: 0; } }
.zoombar .btn { background: rgba(14, 12, 10, .7); backdrop-filter: blur(8px); }

/* 불난 방: 일렁이는 테두리 + 불티 */
.tile .fire { border-radius: 8px; background: linear-gradient(0deg, rgba(200, 80, 30, .42), rgba(200, 80, 30, .12) 70%); box-shadow: inset 0 0 0 2px rgba(255, 150, 80, .75); }
.tile .fire span { top: auto; bottom: 8px; right: 8px; display: flex; align-items: center; gap: 4px; padding: 3px 9px; border: 0; border-radius: 6px; background: rgba(120, 40, 10, .9); color: #ffd3b0; font-family: var(--sans); }
.tile .water { border-radius: 8px; background: linear-gradient(0deg, rgba(40, 96, 110, .5), rgba(40, 96, 110, .18)); background-size: 100% 100%; box-shadow: inset 0 0 0 2px rgba(130, 190, 205, .5); }

/* 차례 막대 */
.turnbar .in { border: 0; border-radius: 12px; background: var(--s1); backdrop-filter: blur(14px); box-shadow: var(--sh); height: 58px; padding: 0 10px 0 18px; }
.turnbar .who { font-family: var(--sans); font-weight: 700; }
.pips i { border: 0; background: rgba(255, 246, 228, .12); }
.pips i.on { background: var(--ac); }
.skillbtn { background: rgba(156, 197, 179, .14) !important; color: var(--ac); border: 0 !important; }
.firebtn { background: rgba(230, 120, 60, .2) !important; color: #ffc49c; border: 0 !important; }

/* 기록 창 */
.logpanel { background: rgba(12, 10, 9, .82); backdrop-filter: blur(14px); box-shadow: -1px 0 0 var(--hl); border-left: 0; }
.logpanel .hd { border-bottom: 0; box-shadow: 0 1px 0 var(--hl); letter-spacing: .02em; }
.log .story b { font-family: var(--serif); }
.log .act { color: var(--ac); font-weight: 600; }
.log .roll .d { border: 0; background: var(--hl2); border-radius: 4px; }
.log .sep::before, .log .sep::after { background: var(--hl); }
.chat .say { border-top: 0; box-shadow: 0 -1px 0 var(--hl); }

/* 조사자 카드 */
.icard { border: 0; border-radius: 14px; background: var(--s1); backdrop-filter: blur(12px); box-shadow: var(--sh); }
.icard.cur { box-shadow: 0 0 0 2px var(--ac), var(--sh); }
.icard .por { border: 0; box-shadow: 0 0 0 2px #f1e9d6, 0 0 0 4px rgba(10, 8, 6, .8); }
.bar .cells i { height: 8px; border-radius: 2px; }
.bar.hp .cells i.on { background: var(--rd); }
.bar.san .cells i.on { background: var(--bl); }
.chip { border: 0; border-radius: 6px; background: var(--hl); height: 22px; line-height: 22px; padding: 0 8px; font-weight: 600; }
.chip.item.usable { box-shadow: 0 0 0 1px rgba(255, 246, 228, .25) inset; border: 0; }
.chip.item.usable:hover { background: var(--hl2); }
.chip.skill { background: rgba(156, 197, 179, .14); color: var(--ac); border: 0; }
.chip.skill.used { background: var(--hl); color: var(--tx3); }
.chip.injury { background: rgba(211, 106, 88, .16); color: #f2a99c; border: 0; }
.chip.madness { background: rgba(126, 151, 201, .16); color: #b9c8ea; border: 0; }
.icard.low { box-shadow: 0 0 0 2px rgba(211, 106, 88, .7), var(--sh); }

/* 창 */
.veil { background: rgba(6, 5, 4, .6); backdrop-filter: blur(3px); }
.modal { border: 0; border-radius: 18px; background: #16130f; box-shadow: 0 0 0 1px rgba(255, 246, 228, .07), 0 40px 100px rgba(0, 0, 0, .7); padding: 40px 48px 34px; }
.modal .art { border-radius: 18px 18px 0 0; margin: -40px -48px 0; }
.modal .art + .kicker { margin-top: -28px; }
.modal .kicker { font-family: var(--sans); font-weight: 700; letter-spacing: .3em; color: var(--tx3); }
.modal .kicker.danger { color: var(--rd); }
.modal .kicker.clue { color: var(--gd); }
.opt { border: 0; border-radius: 10px; background: var(--hl); min-height: 58px; transition: background .15s; }
.opt:hover { background: var(--hl2); }
.opt .tag { background: rgba(0, 0, 0, .3); }
.truth { border: 0; border-radius: 12px; background: var(--hl); box-shadow: none; }
.truth:hover { background: var(--hl2); }
.truth.leaning { box-shadow: 0 0 0 2px var(--ac); }
.modal.monster { padding: 0; overflow: hidden; }
.monart { border-right: 0; }
.monstats span { border: 0; border-radius: 6px; background: var(--hl); }
.monstats .trait { background: rgba(226, 200, 134, .12); }
.monstats .boss { background: rgba(211, 106, 88, .18); }
.blocked { border-left: 0; border-radius: 8px; background: rgba(226, 200, 134, .08); }
.spec { border-left: 0; border-radius: 8px; background: rgba(156, 197, 179, .1); }
.die { border: 0; border-radius: 13px; background: #efe5cc; box-shadow: inset 0 -5px 0 rgba(80, 60, 30, .18), 0 2px 0 rgba(0,0,0,.4), 0 12px 22px rgba(0, 0, 0, .5); }
.dial .n { border: 0; border-radius: 10px; background: #0f0d0b; box-shadow: inset 0 0 0 1px rgba(226, 200, 134, .4); }
.dial button { border: 0; border-radius: 7px; background: var(--hl); }
.ochip { border: 0; border-radius: 12px; background: var(--hl); }
.oslot { border-radius: 8px; }
.toast { border: 0; border-radius: 10px; background: rgba(40, 16, 12, .94); box-shadow: 0 0 0 1px rgba(211, 106, 88, .5), 0 12px 30px rgba(0,0,0,.5); }
.waiting, .actnote { border: 0; border-radius: 10px; background: rgba(20, 18, 16, .9); backdrop-filter: blur(10px); box-shadow: 0 0 0 1px rgba(156, 197, 179, .35), 0 10px 24px rgba(0,0,0,.5); }

/* 띠 알림 */
.banner { position: absolute; left: 0; width: 1210px; top: 300px; z-index: 45; pointer-events: none; display: flex; justify-content: center; }
.bn-in { min-width: 520px; padding: 18px 60px; text-align: center; background: linear-gradient(90deg, transparent, rgba(12, 10, 9, .9) 18%, rgba(12, 10, 9, .9) 82%, transparent); animation: bnin .45s cubic-bezier(.2,.8,.3,1) both; }
.bn-t { font-family: var(--serif); font-size: 34px; font-weight: 800; letter-spacing: .06em; }
.bn-s { font-size: 14px; color: var(--tx2); margin-top: 4px; letter-spacing: .2em; }
.banner.myth .bn-t { color: #f0b3a6; }
.banner.myth .bn-in::before { content: ''; display: block; height: 1px; margin: 0 auto; width: 70%; background: linear-gradient(90deg, transparent, rgba(211, 106, 88, .8), transparent); }
.banner.myth .bn-in::before { margin-bottom: 12px; }
.banner.out .bn-in { animation: bnout .5s ease-in both; }
@keyframes bnin { from { opacity: 0; transform: scaleX(.6); } }
@keyframes bnout { to { opacity: 0; transform: translateY(-10px); } }

/* 떠오르는 숫자 */
.floatnum { position: absolute; z-index: 20; margin: -46px 0 0 -14px; font-weight: 800; font-size: 20px; text-shadow: 0 2px 6px rgba(0, 0, 0, .9); animation: floatup 1.4s ease-out forwards; pointer-events: none; }
.floatnum.hp { color: #ff8b78; }
.floatnum.san { color: #9fb6ee; margin-left: 6px; }
.floatnum.heal { color: #a8dcc6; }
@keyframes floatup { from { transform: translateY(6px); opacity: 0; } 15% { opacity: 1; } to { transform: translateY(-34px); opacity: 0; } }

/* 위험: 가장자리 맥박 */
.game::after { content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 44; box-shadow: inset 0 0 0 0 rgba(211, 106, 88, 0); transition: box-shadow .6s; }
.game.danger::after { animation: dangerpulse 3.2s ease-in-out infinite; }
@keyframes dangerpulse { 0%, 100% { box-shadow: inset 0 0 120px rgba(160, 30, 20, .14); } 50% { box-shadow: inset 0 0 140px rgba(170, 35, 22, .24); } }

/* 대기실·세부 */
.players .p { border: 0; border-radius: 8px; background: var(--hl); }
.players .p.ready { box-shadow: 0 0 0 1px rgba(156, 197, 179, .6) inset; }
.logpanel .tabs button.on { border-bottom-color: var(--ac); }
.topbar .obj { min-width: 0; }
.hazards { flex: none; flex-wrap: nowrap; }
.topbar .tt { font-size: 19px; }
.topbar .btn.small { padding: 0 11px; }
.spot .lbl { overflow: hidden; text-overflow: ellipsis; }
.spot:hover .lbl { max-width: none !important; z-index: 5; }

/* 주 버튼: 꽉 찬 색 대신 어두운 바탕 + 초록 글씨 (눌린 것처럼 보이지 않게) */
.btn.main { background: rgba(156, 197, 179, .14); color: #cfe7dc; box-shadow: 0 1px 0 rgba(255,246,228,.06) inset, 0 1px 2px rgba(0,0,0,.4); }
.btn.main:hover { background: rgba(156, 197, 179, .24); }
.title-menu .btn.main { background: rgba(14, 12, 10, .62); color: #bfe0d2; }
.title-menu .btn.main::before { content: ''; width: 3px; height: 18px; border-radius: 2px; background: var(--ac); margin-right: 12px; margin-left: -10px; }
.title-menu .btn.main:hover { background: rgba(40, 36, 31, .8); }
.title-menu .btn small { color: var(--tx2); }
/* 마우스로 누를 때는 테두리 없이, 키보드로 옮길 때만 */
button:focus, a:focus, .btn:focus { outline: none; }
button:focus-visible, a:focus-visible, .btn:focus-visible { outline: 2px solid var(--ac); outline-offset: 2px; }
.monart.dead { filter: grayscale(.85) brightness(.7); }
.monmini { float: right; width: 120px; height: 120px; margin: -8px -12px 10px 18px; border-radius: 12px; background-size: cover; background-position: center; box-shadow: 0 0 0 1px rgba(255,246,228,.1); }
.modal.monster .opts { margin-top: 16px; }
.modal.monster .montext .body { flex: none; }
.modal.monster .foot { margin-top: auto; padding-top: 18px; }
.scard .sbody { display: flex; flex-direction: column; height: 100%; }
.smeta { display: flex; gap: 6px; margin-top: auto; padding-top: 14px; }
.smeta span { padding: 4px 10px; border-radius: 6px; background: var(--hl); font-size: 12.5px; font-weight: 600; color: var(--tx2); }
.smeta span:first-child { color: var(--gd); background: rgba(226, 200, 134, .12); }
.scard { height: 450px; }
/* 살펴볼 곳 이름: 자르지 않고 두 줄까지 */
.spot .lbl { white-space: normal; word-break: keep-all; text-align: center; line-height: 1.25; text-overflow: clip; overflow: visible; width: max-content; padding: 2px 6px; }
/* 방이 커진 만큼 토큰도 조금 크게 */
.spot { width: 40px; height: 40px; margin: -20px 0 0 -20px; }
.spot svg { width: 21px; height: 21px; }
.spot .lbl { top: 45px; font-size: 12px; }
.spot.goal { width: 48px; height: 48px; margin: -24px 0 0 -24px; }
.spot.goal .lbl { top: 53px; }
.pawn { width: 44px; height: 44px; margin: -22px 0 0 -22px; }
.mon { width: 52px; height: 52px; margin: -26px 0 0 -26px; }
.mon.boss { width: 68px; height: 68px; margin: -34px 0 0 -34px; }
.tile .rname { font-size: 13.5px; }
/* 첫 화면 버튼: 줄바꿈 없이 */
.title-menu { width: 380px; }
.title-menu .btn { white-space: nowrap; }
.title-menu .btn small { min-width: 0; overflow: hidden; text-overflow: ellipsis; padding-left: 12px; }

/* 층 탭 */
.floortabs { position: absolute; left: 14px; top: 12px; z-index: 9; display: flex; gap: 4px; padding: 4px; border-radius: 10px; background: rgba(14, 12, 10, .72); backdrop-filter: blur(8px); }
.floortabs:empty { display: none; }
.ft { display: flex; align-items: center; gap: 5px; height: 30px; padding: 0 12px; border-radius: 7px; font-size: 13px; font-weight: 700; color: var(--tx2); }
.ft:hover { color: var(--tx); background: var(--hl); }
.ft.on { background: var(--hl2); color: var(--tx); }
.ft i { font-style: normal; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; font-size: 11px; line-height: 17px; text-align: center; }
.ft .fp { background: rgba(156, 197, 179, .22); color: var(--ac); }
.ft .fm { background: rgba(211, 106, 88, .22); color: #f2a99c; }
.chip.spell { background: rgba(140, 110, 190, .2); color: #cbb8f0; cursor: pointer; }
.chip.spell:hover { background: rgba(140, 110, 190, .32); }
/* 문·계단 버튼 크게 */
.door.v { width: 24px; height: 60px; margin: -30px 0 0 -12px; border-radius: 6px; font-size: 15px; }
.door.h { width: 60px; height: 24px; margin: -12px 0 0 -30px; border-radius: 6px; font-size: 15px; }
.door.locked svg { width: 15px; height: 15px; }
.door.v.barred { width: 28px; margin-left: -14px; }
.door.h.barred { height: 28px; margin-top: -14px; }
.stair { height: 32px; padding: 0 12px; font-size: 13.5px; gap: 6px; border-radius: 8px; }
.stair svg { width: 16px; height: 16px; }
/* 게임 방법: 다른 메뉴처럼 왼쪽 정렬, 같은 높이 */
.title-sub { margin-top: 0; }
.title-sub .btn { height: 56px; justify-content: flex-start; padding-left: 24px; font-size: 17px; }
