/* 「아직 이만큼 남았어」 기본: 시작·캐릭터 만들기·인벤토리. 게임 화면은 game.css */
:root { --ink: #f3f0e8; --muted: #a3a8b8; --sun: #ffd23f; --mint: #3ddc97; --line: rgba(255,255,255,0.14); --panel: rgba(16, 17, 26, 0.86); --dark: #16171d; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: hidden; }
body { margin: 0; min-height: 100vh; min-height: 100dvh; overflow-x: clip; color: var(--ink); background: #14151c; font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', system-ui, sans-serif; line-height: 1.5; word-break: keep-all; overflow-wrap: break-word; -webkit-tap-highlight-color: transparent; -webkit-user-select: none; user-select: none; }
button { font: inherit; color: inherit; }
img { -webkit-user-drag: none; }
.home { position: fixed; top: max(10px, env(safe-area-inset-top)); left: 12px; z-index: 20; font-size: 13px; color: #e8e4da; text-decoration: none; padding: 5px 11px; border-radius: 999px; background: rgba(10, 11, 16, 0.6); backdrop-filter: blur(6px); }
.sound { position: fixed; top: max(10px, env(safe-area-inset-top)); right: 12px; z-index: 20; font-size: 13px; padding: 5px 11px; border-radius: 999px; border: 0; background: rgba(10, 11, 16, 0.6); color: #e8e4da; cursor: pointer; }
.screen { position: relative; z-index: 2; width: min(100%, 520px); margin: 0 auto; min-height: 100vh; min-height: 100dvh; padding: max(54px, env(safe-area-inset-top)) 16px max(20px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; align-items: center; }
.screen[hidden] { display: none; }
.btn { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 56px; margin-top: 12px; border-radius: 16px; border: 0; cursor: pointer; font-weight: 800; font-size: 17px; text-decoration: none; touch-action: manipulation; }
.btn--main { margin-top: 22px; background: var(--sun); color: var(--dark); font-size: 20px; font-weight: 900; box-shadow: 0 7px 0 #b8901a, 0 18px 30px rgba(0,0,0,0.35); transition: transform 0.08s, box-shadow 0.08s; }
.btn--main:active { transform: translateY(5px); box-shadow: 0 2px 0 #b8901a, 0 8px 16px rgba(0,0,0,0.35); }
.btn--ghost { background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.22); color: var(--ink); }
.btn--text { background: none; color: var(--muted); font-weight: 600; font-size: 15px; min-height: 44px; }
.btn:focus-visible, .pick:focus-visible, .food:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
h2:focus { outline: none; }

/* 시작 */
.screen--title { justify-content: center; overflow: hidden; }
.kicker { margin: 0; font-size: 12.5px; letter-spacing: 0.16em; color: var(--muted); }
h1 { margin: 6px 0 0; font-size: clamp(44px, 13vw, 68px); line-height: 1.02; font-weight: 900; letter-spacing: -0.035em; text-align: center; text-shadow: 0 6px 24px rgba(0,0,0,0.5); }
h1 em { font-style: normal; color: var(--sun); }
.lead { margin: 14px 0 0; text-align: center; font-size: 16.5px; color: #e6e2d8; }
.lead b { color: #fff; }
.fine { margin: 12px 0 0; font-size: 12.5px; color: var(--muted); text-align: center; }
.lineup { display: flex; justify-content: center; gap: 2px; margin-top: 18px; height: 110px; }
.lineup img { width: 96px; height: 96px; animation: bob 1.6s ease-in-out infinite; filter: drop-shadow(0 10px 10px rgba(0,0,0,0.35)); }
.lineup img:nth-child(2) { animation-delay: -0.4s; } .lineup img:nth-child(3) { animation-delay: -0.8s; } .lineup img:nth-child(4) { animation-delay: -1.2s; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
.rain { position: absolute; inset: 0; pointer-events: none; z-index: -1; }
.rain img { position: absolute; top: -80px; width: 56px; height: 56px; opacity: 0.45; animation: drop linear infinite; }
@keyframes drop { from { transform: translateY(0) rotate(0deg); } to { transform: translateY(115vh) rotate(260deg); } }
.friend { width: 100%; margin-top: 18px; padding: 14px 16px; border-radius: 18px; background: var(--panel); border: 1px solid rgba(255,210,63,0.5); }
.friend__k { margin: 0; font-size: 13px; color: var(--sun); font-weight: 800; }
.friend__row { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.friend__row img { width: 54px; height: 54px; flex: none; }
.friend__row ul { list-style: none; margin: 0; padding: 0; font-size: 14.5px; }
.friend__row b { color: var(--sun); }
.friend__q { margin: 10px 0 0; font-weight: 900; font-size: 17px; }

/* 캐릭터 만들기 */
.screen--make { justify-content: center; }
.make__step { margin: 0; padding: 4px 12px; border-radius: 999px; background: rgba(0,0,0,0.35); font-size: 13px; font-weight: 800; color: var(--sun); letter-spacing: 0.06em; }
.make__q { margin: 12px 0 18px; font-size: clamp(26px, 7.4vw, 32px); font-weight: 900; text-align: center; letter-spacing: -0.02em; text-shadow: 0 4px 18px rgba(0,0,0,0.45); }
.picks { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.picks.is-age { grid-template-columns: repeat(4, 1fr); gap: 10px; }
.pick { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 150px; padding: 10px 6px 12px; border-radius: 22px; border: 2px solid rgba(255,255,255,0.16); background: linear-gradient(180deg, rgba(255,255,255,0.14), rgba(255,255,255,0.05)); cursor: pointer; touch-action: manipulation; animation: pop-in 0.35s cubic-bezier(0.2, 1.4, 0.4, 1) backwards; transition: transform 0.1s; }
.pick img { width: 104px; height: 104px; filter: drop-shadow(0 8px 10px rgba(0,0,0,0.3)); }
.pick span { font-weight: 800; font-size: 15px; }
.pick:active, .pick.is-on { transform: scale(0.95); border-color: var(--sun); background: rgba(255,210,63,0.22); }
.picks.is-age .pick { min-height: 86px; border-radius: 18px; }
.pick__lv { font-size: 21px; font-weight: 900; color: var(--sun); line-height: 1; }
.picks.is-age .pick span:last-child { font-size: 13.5px; color: #e6e2d8; font-weight: 700; }
@keyframes pop-in { from { opacity: 0; transform: scale(0.7) translateY(18px); } to { opacity: 1; transform: none; } }

/* 인벤토리 */
.screen--result { padding-top: max(52px, env(safe-area-inset-top)); }
.inv { width: 100%; border-radius: 26px; background: var(--panel); border: 2px solid rgba(255,255,255,0.12); box-shadow: 0 26px 60px rgba(0,0,0,0.45); padding: 18px 16px 20px; animation: pop-in 0.45s ease; }
.inv__head { display: flex; align-items: center; gap: 12px; }
.inv__head img { width: 82px; height: 82px; flex: none; filter: drop-shadow(0 8px 10px rgba(0,0,0,0.4)); }
.inv__lv { margin: 0; font-size: 13px; color: var(--muted); font-weight: 700; }
.inv__title { margin: 2px 0 0; font-size: 20px; font-weight: 900; line-height: 1.25; color: var(--sun); }
.inv__what { margin: 14px 0 0; padding: 10px 12px; border-radius: 14px; background: rgba(255,255,255,0.07); font-size: 15px; line-height: 1.5; }
.inv__what b { color: var(--sun); }
.inv__top { margin: 14px 0 0; padding: 0; list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.inv__top li { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 10px 6px 12px; border-radius: 18px; background: linear-gradient(180deg, rgba(255,210,63,0.2), rgba(255,210,63,0.06)); border: 1px solid rgba(255,210,63,0.4); }
.inv__top img { width: 72px; height: 72px; }
.inv__top .n { font-size: 13.5px; color: #e6e2d8; }
.inv__top .c { font-size: clamp(24px, 7vw, 30px); font-weight: 900; letter-spacing: -0.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.inv__top .c small { font-size: 14px; margin-left: 2px; }
.inv__h { margin: 18px 0 8px; font-size: 13px; color: var(--muted); font-weight: 800; letter-spacing: 0.06em; }
.slots { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.slots li { position: relative; aspect-ratio: 1 / 1.18; border-radius: 12px; background: rgba(0,0,0,0.35); border: 1px solid rgba(255,255,255,0.1); display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding-top: 4px; overflow: hidden; }
.slots img { width: 70%; height: auto; aspect-ratio: 1; }
.slots .x { font-size: 13px; font-weight: 900; color: #fff; font-variant-numeric: tabular-nums; line-height: 1.1; }
.slots .nm { font-size: 10.5px; color: var(--muted); line-height: 1.2; text-align: center; padding: 0 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.slots li.is-badge { border-color: rgba(61,220,151,0.6); background: rgba(61,220,151,0.12); }
.inv__year { margin: 14px 0 0; font-size: 14px; color: #e6e2d8; }
.inv__say { margin: 16px 0 0; text-align: center; font-size: 22px; font-weight: 900; line-height: 1.35; }
.inv__say em { font-style: normal; color: var(--sun); }
.inv__src { margin: 8px 0 0; font-size: 11px; color: var(--muted); text-align: center; }
.pair { width: 100%; margin-top: 14px; padding: 16px; border-radius: 22px; background: var(--panel); border: 1px solid rgba(255,210,63,0.45); }
.pair__k { margin: 0; font-size: 13px; color: var(--muted); font-weight: 700; }
.pair__t { margin: 2px 0 10px; font-size: 22px; font-weight: 900; color: var(--sun); }
.pair table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.pair th { color: var(--muted); font-weight: 700; text-align: left; padding: 4px 2px; }
.pair td { padding: 6px 2px; border-top: 1px solid rgba(255,255,255,0.08); vertical-align: middle; }
.pair td img { width: 30px; height: 30px; vertical-align: middle; }
.actions { width: 100%; margin-top: 6px; }
.go { display: grid; gap: 10px; margin-top: 4px; }
.go a { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: var(--panel); border: 1px solid rgba(255,255,255,0.14); color: var(--ink); text-decoration: none; }
.go a img { width: 52px; height: 52px; flex: none; }
.go a b { display: block; font-size: 15.5px; }
.go a span { font-size: 13px; color: var(--muted); }
.go a::after { content: "→"; margin-left: auto; color: var(--sun); font-weight: 900; }
.share { display: flex; justify-content: center; align-items: center; gap: 6px; margin-top: 10px; color: var(--muted); font-size: 13px; }
.share__b { background: none; border: 0; padding: 8px 6px; min-height: 36px; color: var(--muted); font-size: 13px; text-decoration: underline; cursor: pointer; }
.care { margin: 20px 0 0; font-size: 13px; color: var(--muted); text-align: center; }
.care a { color: var(--ink); }
.toast { position: fixed; left: 50%; bottom: max(24px, env(safe-area-inset-bottom)); transform: translate(-50%, 20px); opacity: 0; z-index: 40; padding: 10px 16px; border-radius: 12px; background: #000c; color: #fff; font-size: 14px; transition: 0.25s; pointer-events: none; max-width: calc(100% - 32px); }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
