/* 좀비 사태 생존기 · PLAYORA */
:root {
  --bg: #111316; --bg2: #171a1e; --panel: #1b1f24; --panel2: #20252b; --line: #2e353d; --line2: #3a424c;
  --ink: #e7e1d4; --ink2: #b9b3a6; --muted: #858c94;
  --paper: #e4dccb; --paper2: #d8cfbb; --pink: #2b2620; --pink2: #5b5348;
  --sodium: #e19a45; --sodium2: #b8752c; --rust: #b4553a; --blood: #9a3227; --olive: #8a9a5b; --slate: #6d8296; --teal: #6fa3a6;
  --f-disp: 'Black Han Sans', 'IBM Plex Sans KR', sans-serif; --f-ui: 'IBM Plex Sans KR', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px;
  --r: 3px;
  --colw: min(1120px, calc(100vw - 32px));
  --stagew: min(100%, max(640px, calc((100vh - 488px) * 1.7778)));
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { overflow-x: clip; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--f-ui); font-size: 15px; line-height: 1.55; -webkit-font-smoothing: antialiased; overflow-x: clip;
  background-image: radial-gradient(ellipse at 50% -10%, rgba(225,154,69,.06), transparent 60%), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .035 0'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E"); }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: var(--sodium); }

/* ---------- 마스트 ---------- */
.mast { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); height: 44px; padding: 0 var(--s4); border-bottom: 1px solid #23282e; background: #0d0f11; font-size: 13px; }
.mast-brand { color: var(--ink2); text-decoration: none; letter-spacing: .02em; white-space: nowrap; }
.mast-brand b { color: var(--ink); font-weight: 700; letter-spacing: .08em; margin-right: 6px; }
.mast-tag { color: var(--muted); white-space: nowrap; }

/* ---------- 게임 틀 ---------- */
.sv { width: var(--colw); margin: 0 auto; padding: var(--s2) 0 var(--s4); }
.sv-top { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: var(--s3); width: var(--stagew); height: 44px; margin: 0 auto; padding: 0 var(--s1); container-type: inline-size; }
.hud-l { display: flex; align-items: baseline; gap: var(--s3); white-space: nowrap; }
.hud-day { font-family: var(--f-disp); font-weight: 400; font-size: 30px; line-height: 1; color: var(--ink); letter-spacing: .01em; }
.hud-time { font-size: 15px; color: var(--ink2); font-variant-numeric: tabular-nums; }
.hud-c { display: flex; align-items: center; justify-content: center; gap: var(--s3); color: var(--ink2); font-size: 13px; }
.env { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 99px; background: var(--bg2); white-space: nowrap; }
.env.off { color: var(--muted); }
.env.off .pxi { opacity: .45; }
.env.off .lbl { text-decoration: line-through; text-decoration-color: var(--rust); }
.hud-r { display: flex; justify-content: flex-end; gap: var(--s2); align-items: center; }
.speed, .snd { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--bg2); }
.speed button, .snd button { border: 0; background: none; padding: 5px 9px; font-size: 13px; color: var(--ink2); min-width: 34px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.speed button + button, .snd button + button { border-left: 1px solid var(--line); }
.speed button.on { background: var(--sodium); color: #1a140c; font-weight: 700; }
.snd button[aria-pressed="false"] { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--rust); }
.pxi { image-rendering: pixelated; display: inline-block; vertical-align: middle; flex: none; }
/* 장면이 좁을 때(노트북·태블릿) 상단 막대가 넘치지 않게 */
@container (max-width: 760px) {
  .hud-c { gap: var(--s2); }
  .env { padding: 4px 8px; }
  .speed button, .snd button { padding: 5px 6px; min-width: 30px; }
}
@container (max-width: 680px) {
  .env .lbl { display: none; }
  .env.wx .lbl { display: inline; }
}
.snd-m { display: none !important; }
.snd-m[aria-pressed="false"] { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--rust); }

/* ---------- 무대 ---------- */
.stage { position: relative; width: var(--stagew); margin: 0 auto; aspect-ratio: 16 / 9; background: #0b0c0e; border: 1px solid #262b31; border-radius: var(--r); overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,.45); }
.stage > canvas { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; object-fit: cover; }
.vig { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at 50% 55%, transparent 55%, rgba(0,0,0,.42) 100%); }
.floats { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.fl { position: absolute; transform: translate(-50%, -100%); font-weight: 700; font-size: clamp(11px, 1.4vw, 15px); color: #f1ead8; text-shadow: 0 1px 0 #000, 0 0 6px rgba(0,0,0,.8); white-space: nowrap; animation: flUp 1.7s cubic-bezier(.16,1,.3,1) forwards; }
.fl.good { color: #e8d79a; }
.fl.bad { color: #ff8a73; }
.fl.thump { font-family: var(--f-disp); font-size: clamp(16px, 2.4vw, 26px); color: #d9cfbf; animation-duration: 1s; }
.fl.lvl { color: #a9d58f; }
@keyframes flUp { 0% { opacity: 0; transform: translate(-50%, -80%); } 12% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -260%); } }
.loc { position: absolute; left: var(--s3); top: var(--s3); padding: 4px 10px 5px; background: rgba(12,14,16,.72); border-left: 3px solid var(--sodium); font-size: 13px; color: var(--ink); backdrop-filter: blur(2px); }
.loc small { color: var(--ink2); margin-left: 6px; }
.stage-btns { position: absolute; right: var(--s3); top: var(--s3); display: flex; gap: var(--s2); align-items: center; }
.stage-btns button, .auto { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; background: rgba(12,14,16,.72); border: 1px solid rgba(255,255,255,.14); border-radius: var(--r); font-size: 13px; color: var(--ink); backdrop-filter: blur(2px); }
.stage-btns button:hover, .auto:hover { border-color: var(--sodium); }
.auto { cursor: pointer; user-select: none; }
.auto input { appearance: none; width: 26px; height: 15px; border-radius: 9px; background: #3a3f46; position: relative; margin: 0; transition: background .2s; }
.auto input::after { content: ''; position: absolute; left: 2px; top: 2px; width: 11px; height: 11px; border-radius: 50%; background: #c9c3b6; transition: transform .2s cubic-bezier(.16,1,.3,1); }
.auto input:checked { background: var(--sodium2); }
.auto input:checked::after { transform: translateX(11px); background: #fff3df; }
.cap { position: absolute; left: 50%; bottom: var(--s3); transform: translateX(-50%); margin: 0; padding: 6px 16px 7px; background: rgba(12,14,16,.76); border-radius: 99px; font-size: 14px; color: var(--ink); white-space: nowrap; max-width: 90%; overflow: hidden; text-overflow: ellipsis; backdrop-filter: blur(2px); }
.cap::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--sodium); margin-right: 8px; vertical-align: 1px; animation: blink 1.6s ease-in-out infinite; }
.cap.night::before { background: var(--slate); }
@keyframes blink { 50% { opacity: .25; } }

/* ---------- 휴대폰 알림 (첫날) ---------- */
.phone { position: absolute; left: 50%; top: 9%; width: min(360px, 86%); transform: translateX(-50%); background: #1d2126; border: 1px solid #3a4048; border-radius: 14px; padding: var(--s3) var(--s4); box-shadow: 0 18px 50px rgba(0,0,0,.6); animation: phoneIn .6s cubic-bezier(.16,1,.3,1); }
.phone .ph-top { display: flex; justify-content: space-between; font-size: 12px; color: #ff9b84; font-weight: 700; letter-spacing: .02em; margin-bottom: 6px; }
.phone .ph-top span:last-child { color: var(--muted); font-weight: 400; }
.phone p { margin: 0; font-size: 14px; line-height: 1.55; color: #ece6da; }
@keyframes phoneIn { from { opacity: 0; transform: translate(-50%, -24px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ---------- 갈림길 카드 ---------- */
.card-wrap { position: absolute; inset: 0; display: grid; place-items: center; background: radial-gradient(ellipse at center, rgba(8,9,11,.55), rgba(8,9,11,.82)); padding: var(--s3); animation: fadeIn .35s ease-out; }
@keyframes fadeIn { from { opacity: 0; } }
.xcard { position: relative; width: min(560px, 100%); max-height: 100%; overflow: auto; background: var(--paper); color: var(--pink); border-radius: 2px; padding: var(--s4) var(--s5) var(--s4); box-shadow: 0 24px 60px rgba(0,0,0,.55), inset 0 0 0 1px rgba(80,60,40,.18), inset 0 0 40px rgba(120,90,50,.22); transform: rotate(-.6deg); animation: cardIn .5s cubic-bezier(.16,1,.3,1);
  background-image: linear-gradient(transparent 27px, rgba(70,90,120,.13) 28px); background-size: 100% 28px; }
@keyframes cardIn { from { opacity: 0; transform: translateY(18px) rotate(-2deg); } }
.xcard::before { content: ''; position: absolute; left: 50%; top: -8px; width: 96px; height: 20px; transform: translateX(-50%) rotate(2deg); background: rgba(214,201,160,.78); box-shadow: 0 1px 2px rgba(0,0,0,.25); }
.x-meta { margin: 0 0 2px; font-size: 12.5px; color: #574e42; letter-spacing: .03em; }
.x-title { margin: 0 0 var(--s2); font-family: var(--f-disp); font-weight: 400; font-size: 27px; line-height: 1.15; color: #1f1b16; }
.x-txt { margin: 0 0 var(--s3); font-size: 15px; line-height: 1.65; color: #2f2a23; }
.x-opts { display: grid; gap: 7px; }
.x-opt { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: var(--s3); width: 100%; text-align: left; padding: 9px 12px; background: rgba(255,252,244,.62); border: 1px solid rgba(60,48,36,.28); border-radius: 2px; color: #231f1a; transition: background .15s, transform .15s, border-color .15s; }
.x-opt:hover:not(:disabled) { background: #fffaf0; border-color: #6a5a46; transform: translateX(2px); }
.x-opt:disabled { cursor: default; }
.x-opt.picked { background: #fff4dc; border-color: #8a6a3a; box-shadow: inset 3px 0 0 var(--sodium2); }
.x-opt.dim { opacity: 0; max-height: 0; padding-top: 0; padding-bottom: 0; border-width: 0; margin-top: -7px; overflow: hidden; transition: opacity .25s, max-height .35s cubic-bezier(.16,1,.3,1), padding .35s, margin .35s; }
.x-opt { max-height: 120px; }
.x-opt b { display: block; font-weight: 500; font-size: 15px; }
.x-opt small { display: block; color: #574e42; font-size: 12.5px; margin-top: 1px; }
.x-p { font-family: var(--f-disp); font-size: 22px; color: #3b3227; font-variant-numeric: tabular-nums; min-width: 58px; text-align: right; }
.x-p.sure { font-family: var(--f-ui); font-size: 13px; font-weight: 700; color: #5d6b3a; border: 1px solid #8a9a5b; padding: 2px 8px; border-radius: 2px; min-width: 0; }
.x-p.hi { color: #4f6331; } .x-p.lo { color: #9a3a2a; }
.x-auto { position: absolute; right: 12px; top: 10px; font-size: 12.5px; color: #574e42; }
.roll { position: relative; margin-top: var(--s3); }
.track { position: relative; height: 18px; background: #c9bfa9; border: 1px solid #8b7f69; overflow: hidden; }
.zone { position: absolute; left: 0; top: 0; bottom: 0; background: repeating-linear-gradient(-45deg, #8fa064, #8fa064 6px, #849659 6px, #849659 12px); }
.marker { position: absolute; top: -3px; bottom: -3px; width: 3px; margin-left: -1px; background: #1d1a16; box-shadow: 0 0 0 1px rgba(255,255,255,.5); }
.rollnum { display: flex; justify-content: space-between; font-size: 12.5px; color: #4f463a; margin-top: 4px; font-variant-numeric: tabular-nums; }
.rollnum b { font-size: 15px; color: #1f1b16; }
.stamp { position: absolute; right: 4px; top: -52px; font-family: var(--f-disp); font-size: 34px; padding: 2px 14px 4px; border: 4px solid; border-radius: 4px; transform: rotate(-12deg) scale(1); opacity: .88; mix-blend-mode: multiply; animation: stampIn .32s cubic-bezier(.2,1.6,.4,1); letter-spacing: .06em; }
.stamp.ok { color: #46612c; border-color: #46612c; } .stamp.ng { color: #9b2c1f; border-color: #9b2c1f; }
@keyframes stampIn { from { transform: rotate(-12deg) scale(2.2); opacity: 0; } }
.outcome { margin-top: var(--s3); padding-top: var(--s3); border-top: 1px dashed rgba(60,48,36,.35); }
.outcome p { margin: 0 0 var(--s2); font-size: 15px; line-height: 1.65; color: #2a251f; }
.chips { display: flex; flex-wrap: wrap; gap: 5px; margin: var(--s2) 0 var(--s3); }
.chip { font-size: 12px; padding: 2px 8px; border-radius: 2px; background: rgba(60,48,36,.08); border: 1px solid rgba(60,48,36,.22); color: #3a332a; font-variant-numeric: tabular-nums; }
.chip.up { color: #3f5a26; border-color: rgba(70,97,44,.4); } .chip.down { color: #8f2c20; border-color: rgba(155,44,31,.35); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 20px; border: 1px solid transparent; border-radius: var(--r); font-size: 15px; font-weight: 700; background: var(--sodium); color: #1b140b; white-space: nowrap; transition: transform .15s, background .15s; }
.btn:hover { background: #eaa957; transform: translateY(-1px); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line2); font-weight: 500; }
.btn.ghost:hover { border-color: var(--sodium); }
.btn.ink { background: #2b2620; color: #f3ecdc; }
.btn.ink:hover { background: #3a332a; }
.btn:disabled { opacity: .45; cursor: default; transform: none; }

/* ---------- 지도 ---------- */
.map-wrap { position: absolute; inset: 0; background: rgba(8,9,11,.82); display: grid; place-items: center; padding: var(--s3); animation: fadeIn .25s; }
.map { position: relative; width: min(720px, 100%); aspect-ratio: 16 / 10; background: #d8cfba; border-radius: 2px; box-shadow: 0 24px 60px rgba(0,0,0,.5); overflow: hidden; }
.map svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.map-h { position: absolute; left: 14px; top: 10px; font-family: var(--f-disp); color: #2b2620; font-size: 20px; }
.map-x { position: absolute; right: 10px; top: 8px; border: 1px solid #6a5e4c; background: #efe7d6; color: #2b2620; font-size: 13px; padding: 3px 10px; border-radius: 2px; }
.pin { position: absolute; transform: translate(-50%, -50%); display: grid; justify-items: center; gap: 1px; background: none; border: 0; padding: 2px; color: #2a251f; font-size: 12px; line-height: 1.2; }
.pin i { width: 12px; height: 12px; border-radius: 50%; background: #3b342a; box-shadow: 0 0 0 3px rgba(239,231,214,.85); }
.pin b { font-weight: 700; white-space: nowrap; background: rgba(239,231,214,.85); padding: 0 4px; }
.pin small { color: #4f4537; white-space: nowrap; font-size: 12px; }
.pin.home i { background: var(--sodium2); }
.pin.sel i { background: #a8361f; box-shadow: 0 0 0 3px #f6d9a0; }
.pin.empty b { text-decoration: line-through; text-decoration-color: #8f2c20; }
.pin.far i { background: #7a6d5c; }
.pin:hover i { transform: scale(1.25); }
.map-foot { position: absolute; left: 0; right: 0; bottom: 0; padding: 6px 14px; font-size: 12.5px; color: #3e362b; background: rgba(239,231,214,.85); }

/* ---------- 시작 화면 ---------- */
.sv.intro-on .stage { width: 100%; aspect-ratio: auto; height: clamp(560px, calc(100vh - 64px), 720px); }
.intro { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--s3); padding: var(--s4); background: linear-gradient(180deg, rgba(8,9,11,.35), rgba(8,9,11,.15) 40%, rgba(8,9,11,.6)); }
.intro-head { text-align: center; filter: drop-shadow(0 3px 0 #1a120c) drop-shadow(0 0 18px rgba(0,0,0,.75)); }
.title { margin: 0; font-family: var(--f-disp); font-weight: 400; font-size: clamp(38px, 6vw, 72px); line-height: 1; color: #efe7d6; letter-spacing: .01em;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='90'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.42' numOctaves='2' seed='7'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -11 7.9'/%3E%3C/filter%3E%3Crect width='220' height='90' filter='url(%23g)'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='90'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.42' numOctaves='2' seed='7'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -11 7.9'/%3E%3C/filter%3E%3Crect width='220' height='90' filter='url(%23g)'/%3E%3C/svg%3E"); }
.hook { margin: 10px 0 0; font-family: var(--f-disp); font-size: clamp(17px, 1.9vw, 23px); letter-spacing: .06em; color: #e9c48c; text-shadow: 0 2px 6px rgba(0,0,0,.85); }
.intro-body { display: grid; justify-items: center; gap: var(--s3); }
.loading { color: var(--ink2); }
.idcard { position: relative; width: min(470px, 92vw); display: grid; grid-template-columns: 112px 1fr; gap: var(--s3) var(--s4); padding: 26px var(--s4) var(--s4); background: var(--paper); color: var(--pink); border-radius: 6px; transform: rotate(-1.2deg); box-shadow: 0 24px 50px rgba(0,0,0,.55), inset 0 0 0 1px rgba(80,60,40,.25), inset 0 0 50px rgba(130,100,60,.25);
  background-image: radial-gradient(circle at 93% 93%, rgba(120,80,40,.13) 0 18px, transparent 19px), radial-gradient(circle at 93% 93%, transparent 21px, rgba(120,80,40,.1) 22px 24px, transparent 25px); }
.idcard.swap { animation: swap .45s cubic-bezier(.16,1,.3,1); }
@keyframes swap { 0% { transform: rotate(4deg) translateY(10px); opacity: .1; } }
.idcard .hole { position: absolute; left: 50%; top: 8px; width: 46px; height: 9px; margin-left: -23px; border-radius: 9px; background: #1a1c1f; box-shadow: inset 0 2px 2px rgba(0,0,0,.6); }
.idcard .strip { position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--rust); border-radius: 6px 6px 0 0; opacity: .8; }
.idcard .photo { grid-row: span 2; width: 112px; height: 126px; border: 3px solid #f6f0e3; box-shadow: 0 1px 3px rgba(0,0,0,.35); background: #7f8a7a; image-rendering: pixelated; }
.idcard .photo canvas { width: 100%; height: 100%; display: block; image-rendering: pixelated; }
.id-org { margin: 0; font-size: 12px; color: #574e42; letter-spacing: .03em; }
.id-name { margin: 2px 0 0; font-family: var(--f-disp); font-size: 30px; line-height: 1.1; color: #1d1915; }
.id-sub { margin: 2px 0 0; font-size: 14px; color: #3d362d; }
.id-sub b { color: #1d1915; }
.id-job { margin: var(--s1) 0 0; font-size: 13px; color: #4f463a; line-height: 1.5; }
.id-traits { grid-column: 1 / -1; display: grid; gap: 4px; }
.trait { display: grid; grid-template-columns: auto 1fr; gap: 2px 8px; align-items: baseline; font-size: 13px; }
.trait b { font-weight: 700; color: #1f1b16; padding: 1px 7px; border: 1px solid #6a5e4c; border-radius: 2px; font-size: 13px; }
.trait span { color: #4a4135; }
.trait span em { font-style: normal; color: #4f6331; margin-right: 8px; } .trait span i { font-style: normal; color: #94402f; }
.id-skills { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; border-top: 1px dashed rgba(60,48,36,.35); padding-top: var(--s2); }
.sk { text-align: center; font-size: 12px; color: #4f463a; }
.sk .pips { display: flex; justify-content: center; gap: 1px; margin-top: 2px; }
.sk .pips i { width: 4px; height: 7px; background: rgba(60,48,36,.18); }
.sk .pips i.on { background: #5e4a32; }
.id-items { grid-column: 1 / -1; font-size: 12.5px; color: #4f463a; margin: 0; }
.intro-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s2); }
.best { margin: 0; font-size: 13px; color: var(--ink2); text-shadow: 0 1px 3px #000; }
.cont { font-size: 13px; }

/* ---------- 아래 ---------- */
.sv-bottom { margin-top: var(--s2); }
.pol { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.pol::before { content: '오늘의 방침'; align-self: center; font-size: 12.5px; color: #9aa0a7; margin-right: 6px; letter-spacing: .04em; }
.pol button { position: relative; padding: 7px 14px 8px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); font-size: 14px; color: var(--ink2); transition: border-color .15s, color .15s, background .15s; white-space: nowrap; }
.pol button:hover { border-color: var(--line2); color: var(--ink); }
.pol button.on { background: #2b2216; border-color: var(--sodium); color: #ffe2b8; box-shadow: inset 0 -2px 0 var(--sodium); }
.pol-desc { margin: 6px 0 0; text-align: center; font-size: 13px; color: #9aa0a7; min-height: 20px; }
.tabs { display: none; }
.panels { display: grid; grid-template-columns: 1fr 1.45fr 1fr; gap: var(--s2); margin-top: var(--s2); height: 300px; }
.pn { min-height: 0; display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: var(--s2) var(--s3); overflow: hidden; }
.pn-h { margin: 0 0 6px; font-size: 12.5px; font-weight: 700; color: #9aa0a7; letter-spacing: .06em; }
.pn > div { overflow: auto; min-height: 0; scrollbar-width: thin; }
.pn-log { position: relative; background: var(--paper); color: #25211b; border-color: #bfb49c; padding: 12px 14px; box-shadow: inset 0 0 28px rgba(120,95,60,.16); }
.pn-log .pn-h { color: #4f463a; }
.diary { list-style: none; margin: 0; padding: 0 4px 0 0; overflow: auto; flex: 1; min-height: 0; scrollbar-width: thin; scrollbar-color: #b5a98f transparent; }
.diary li { display: grid; grid-template-columns: 44px 1fr; gap: 0 10px; padding: 2px 6px 2px 0; border-left: 3px solid transparent; font-family: var(--f-ui); font-size: 15px; font-weight: 400; line-height: 1.65; color: #25211b; word-break: keep-all; overflow-wrap: anywhere; }
.diary li .t { padding-left: 4px; font-size: 12.5px; line-height: 24.75px; color: #5a5043; font-variant-numeric: tabular-nums; }
.diary li.cont .t { visibility: hidden; }
.diary li.dh { display: block; margin: 12px 0 4px; padding: 7px 0 3px 7px; border-left: 0; border-top: 1px solid rgba(60,48,36,.32); font-size: 13.5px; font-weight: 700; line-height: 1.4; color: #3a3128; letter-spacing: .01em; }
.diary li.dh:first-child { margin-top: 0; border-top: 0; padding-top: 0; }
.diary li.b { border-left-color: #a1301f; }
.diary li.g { border-left-style: dashed; border-left-color: #3e5a22; }
.diary li.w { border-left-style: dotted; border-left-color: #4a5f73; color: #33404d; }
.diary li.e, .diary li.eb { font-weight: 600; border-left-color: #3e5a22; }
.diary li.eb { border-left-color: #a1301f; }
.diary li.e.cont, .diary li.eb.cont { font-weight: 400; }
.diary li.new { animation: newHi 1.5s ease-out; }
@keyframes newHi { from { background: rgba(225,154,69,.3); } to { background: rgba(225,154,69,0); } }
.newpill { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); padding: 5px 12px; border: 0; border-radius: 99px; background: #2b2620; color: #f3ecdc; font-size: 12.5px; font-weight: 700; box-shadow: 0 4px 12px rgba(0,0,0,.3); }
.bar { display: grid; grid-template-columns: 22px 66px 1fr 30px; align-items: center; gap: 6px; font-size: 13px; color: var(--ink2); margin-bottom: 5px; }
.bar .tr { height: 8px; background: #2a3037; border-radius: 1px; overflow: hidden; position: relative; }
.bar .tr i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--olive); transition: width .5s cubic-bezier(.16,1,.3,1); }
.bar.hp .tr i { background: #b8564a; } .bar.warn .tr i { background: var(--sodium); } .bar.bad .tr i { background: var(--blood); }
.bar .v { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink); }
.bar.bad .v { color: #ff8f78; }
.conds { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0; }
.cond { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px 2px 5px; border: 1px solid var(--line2); border-radius: 2px; font-size: 12px; color: var(--ink); background: #22272d; }
.cond.bad { border-color: #6e3027; background: #2c1e1b; color: #ffcabd; }
.cond.ok { color: var(--ink2); }
.cond small { color: var(--muted); }
.skills { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 10px; font-size: 12px; color: var(--ink2); margin-top: 4px; }
.skills div { display: flex; justify-content: space-between; align-items: center; }
.skills .pips { display: flex; gap: 1px; } .skills .pips i { width: 4px; height: 7px; background: #2e353c; } .skills .pips i.on { background: var(--sodium2); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; font-size: 13px; margin: 0 0 6px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; color: var(--ink); text-align: right; font-variant-numeric: tabular-nums; }
.kv dd.warn { color: var(--sodium); } .kv dd.bad { color: #ff8f78; }
.mini { height: 5px; background: #2a3037; margin-top: 3px; } .mini i { display: block; height: 100%; background: var(--olive); }
.inv { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 4px; }
.inv span { font-size: 12px; padding: 1px 6px; border-radius: 2px; background: #252a30; color: var(--ink2); white-space: nowrap; }
.inv span b { color: var(--ink); font-weight: 500; margin-left: 3px; font-variant-numeric: tabular-nums; }
.esc { display: flex; gap: 6px; font-size: 12px; margin: 2px 0 6px; flex-wrap: wrap; }
.esc span { padding: 1px 7px; border: 1px dashed var(--line2); border-radius: 2px; color: var(--muted); }
.esc span.ok { border-style: solid; border-color: var(--olive); color: #c9d9a4; }

/* ---------- 결과 ---------- */
.result { padding: var(--s2) 0 var(--s5); }
.r-hero { position: relative; aspect-ratio: 16 / 7; border-radius: var(--r); overflow: hidden; border: 1px solid #262b31; }
.r-hero canvas { width: 100%; height: 100%; display: block; image-rendering: pixelated; object-fit: cover; }
.r-hero .r-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(8,9,11,.82), rgba(8,9,11,.35) 60%, rgba(8,9,11,.6)); }
.r-big { position: absolute; left: 5%; top: 50%; transform: translateY(-50%); }
.r-day { font-family: var(--f-disp); font-size: clamp(64px, 11vw, 132px); line-height: .9; color: #f1e9d8; text-shadow: 0 4px 0 #1a120c; }
.r-end { margin: 10px 0 0; font-family: var(--f-disp); font-size: clamp(22px, 3vw, 34px); color: var(--sodium); }
.r-end.rescue { color: #b5d38a; } .r-end.escape { color: #9fd0d4; } .r-end.long { color: #f3d68a; }
.r-name { margin: 6px 0 0; color: var(--ink2); font-size: 14px; }
.r-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: var(--s5); margin-top: var(--s4); }
.r-text { font-family: var(--f-ui); font-size: 17px; line-height: 1.75; color: #efe7d6; margin: 0 0 var(--s3); word-break: keep-all; }
.r-pct { margin: 0 0 var(--s4); font-size: 16px; color: var(--ink2); }
.r-pct b { color: var(--sodium); font-size: 22px; font-family: var(--f-disp); font-weight: 400; }
.r-btns { display: flex; flex-wrap: wrap; gap: var(--s2); margin-bottom: var(--s4); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.stats div { background: var(--panel); padding: 10px 12px; }
.stats b { display: block; font-family: var(--f-disp); font-weight: 400; font-size: 24px; color: var(--ink); line-height: 1.1; }
.stats span { font-size: 12px; color: var(--muted); }
.r-h { margin: 0 0 var(--s2); font-size: 12px; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
.timeline { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line2); }
.timeline li { position: relative; padding: 0 0 10px 16px; font-size: 14px; color: var(--ink2); }
.timeline li::before { content: ''; position: absolute; left: -6px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--bg); border: 2px solid var(--line2); }
.timeline li b { color: var(--ink); font-weight: 500; margin-right: 6px; font-variant-numeric: tabular-nums; }
.timeline li.last::before { border-color: var(--sodium); background: var(--sodium); }
.dist { display: flex; align-items: flex-end; gap: 1px; height: 64px; margin: var(--s2) 0 4px; }
.dist i { flex: 1; background: #39414a; min-height: 1px; }
.dist i.me { background: var(--sodium); }
.dist-l { display: flex; justify-content: space-between; font-size: 12px; color: #9aa0a7; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); background: #26221c; color: #f3ead6; padding: 10px 18px; border-radius: var(--r); border: 1px solid var(--sodium2); font-size: 14px; z-index: 50; animation: fadeIn .25s; }

/* ---------- 소개 ---------- */
.about { width: min(860px, calc(100vw - 32px)); margin: var(--s6) auto 0; padding: var(--s5) 0; border-top: 1px solid var(--line); color: var(--ink2); font-size: 15px; line-height: 1.8; }
.about h2 { font-family: var(--f-disp); font-weight: 400; font-size: 22px; color: var(--ink); margin: var(--s5) 0 var(--s2); letter-spacing: .01em; }
.about h2:first-child { margin-top: 0; }
.about strong, .about b { color: var(--ink); font-weight: 700; }
.about ol, .about ul { padding-left: 20px; }
.about li { margin-bottom: 4px; }
.about .pols { list-style: none; padding: 0; display: grid; gap: 6px; }
.about .pols b { display: inline-block; min-width: 104px; color: var(--sodium); font-weight: 700; }
.about dl dt { color: var(--ink); font-weight: 700; margin-top: var(--s3); }
.about dl dd { margin: 2px 0 0; }
.more { margin-top: var(--s5); font-size: 14px; }
.foot { width: min(860px, calc(100vw - 32px)); margin: var(--s5) auto var(--s6); font-size: 13px; color: var(--muted); }
.foot a { color: var(--ink2); margin-right: var(--s4); text-decoration: none; white-space: nowrap; }
.foot a:hover { color: var(--sodium); }
.foot p { margin: var(--s3) 0 0; line-height: 1.7; }
.nojs { padding: var(--s5); text-align: center; }

/* ---------- 휴대폰 ---------- */
@media (max-width: 760px) {
  :root { --colw: 100%; --stagew: 100%; }
  body { font-size: 14px; }
  .mast { height: 38px; font-size: 12px; }
  .sv { padding: 0; }
  .sv.playing { display: flex; flex-direction: column; height: calc(100dvh - 38px); }
  .sv-top { grid-template-columns: auto 1fr auto; height: auto; padding: 6px 6px; gap: 4px; }
  .hud-l { gap: 6px; }
  .hud-time { white-space: nowrap; font-size: 12px; }
  .hud-day { font-size: 24px; }
  .hud-time { font-size: 13px; }
  .hud-c { justify-content: center; gap: 4px; }
  .env { padding: 2px 6px; gap: 3px; font-size: 12px; }
  .env .lbl { display: none; }
  .env.wx .lbl { display: inline; }
  .hud-r { gap: 4px; }
  .speed button { padding: 4px 3px; min-width: 24px; font-size: 12px; }
  .snd { display: none; }
  .snd-m { display: inline-flex !important; }
  .stage { border-radius: 0; border-left: 0; border-right: 0; flex: none; }
  .sv.intro-on .stage { aspect-ratio: auto; height: calc(100dvh - 38px); }
  .loc { font-size: 11px; padding: 3px 7px; left: 6px; top: 6px; }
  .stage-btns { right: 6px; top: 6px; gap: 4px; }
  .stage-btns button, .auto { height: 26px; padding: 0 8px; font-size: 12px; }
  .cap { font-size: 12px; padding: 4px 12px; bottom: 6px; }
  .sv-bottom { flex: 1; min-height: 0; display: flex; flex-direction: column; margin: 0; padding: 6px 8px 8px; }
  .pol { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
  .pol::before { display: none; }
  .pol button { padding: 6px 2px; font-size: 13px; }
  .pol-desc { font-size: 12px; margin: 4px 0 0; min-height: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .tabs { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 6px; border-bottom: 1px solid var(--line); }
  .tabs button { background: none; border: 0; padding: 6px 0; font-size: 14px; color: var(--muted); border-bottom: 2px solid transparent; }
  .tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--sodium); }
  .panels { display: block; flex: 1; min-height: 0; height: auto; margin-top: 6px; }
  .pn { display: none; height: 100%; }
  .pn.on { display: flex; }
  .pn-h { display: none; }
  .pn-log .pn-h { display: none; }
  .diary li { font-size: 14.5px; grid-template-columns: 42px 1fr; }
  .card-wrap, .map-wrap { position: fixed; left: 0; right: 0; top: 0; bottom: 0; z-index: 40; padding: 10px; align-items: center; }
  .card-wrap .xcard { max-height: calc(100dvh - 20px); }
  .xcard { padding: var(--s3) var(--s3); transform: none; }
  .x-title { font-size: 21px; }
  .x-txt { font-size: 14px; margin-bottom: 8px; }
  .x-opt { padding: 7px 10px; } .x-opt b { font-size: 14px; } .x-p { font-size: 18px; min-width: 44px; }
  .stamp { font-size: 26px; top: 30px; right: 14px; }
  .intro { justify-content: flex-start; padding: var(--s5) var(--s3) var(--s3); gap: var(--s3); overflow: auto; }
  .idcard { grid-template-columns: 84px 1fr; padding: 22px 12px 12px; gap: 8px 12px; width: 88vw; transform: rotate(-.6deg); }
  .id-items { padding-right: 34px; }
  .idcard .photo { width: 84px; height: 95px; }
  .id-name { font-size: 24px; }
  .sk { font-size: 12px; }
  .id-skills { grid-template-columns: repeat(4, 1fr); row-gap: 6px; }
  .r-grid { grid-template-columns: 1fr; gap: var(--s4); padding: 0 var(--s3); }
  .r-hero { border-radius: 0; aspect-ratio: 4 / 3; }
  .r-btns .btn { flex: 1; padding: 10px 8px; font-size: 14px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .result { padding-top: 0; }
  .map { aspect-ratio: 3 / 4; }
  .pin { font-size: 12px; } .pin small { display: none; }
}
@media (max-width: 430px) {
  .env.wx .lbl { display: none; }
  .speed { flex: none; }
}
@media (max-width: 380px) {
  .hud-day { font-size: 22px; }
  .hud-time { font-size: 12px; }
  .env { padding: 2px 4px; }
  .speed button { min-width: 22px; padding: 4px 2px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
