/* 인생 커리어 모드 — 모바일 390px 먼저. style.css의 변수(--card, --brand…)를 쓴다. */
.cv { display: grid; gap: 14px; min-width: 0; }
.cv > * { min-width: 0; }
.ctabs { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.ctabs nav { display: flex; gap: 4px; overflow-x: auto; flex: 1; scrollbar-width: none; }
.ctabs nav a { white-space: nowrap; padding: 7px 11px; border-radius: 999px; text-decoration: none; color: var(--muted); font-size: .9rem; font-weight: 600; }
.ctabs nav a[aria-current=page] { background: var(--brand); color: #04121a; }
.snd { background: var(--card); border: 1px solid var(--line); color: var(--ink); border-radius: 999px; width: 40px; height: 40px; font-size: 1.1rem; cursor: pointer; flex: none; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.cv h2 { margin: .2em 0 .4em; font-size: 1.3rem; }
.cv .tag { color: var(--brand); font-size: .8rem; font-weight: 700; letter-spacing: .02em; }

/* HUD */
.chud { background: linear-gradient(180deg, var(--card2), var(--card)); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; display: grid; gap: 10px; }
.chud-top { display: flex; align-items: center; gap: 10px; }
.chud-who { display: grid; flex: 1; min-width: 0; }
.chud-who span { color: var(--muted); font-size: .84rem; }
.chud .money { font-weight: 800; white-space: nowrap; }
.chud .money.neg { color: var(--bad); }
.chud-prog { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; align-items: center; }
.stages { display: flex; gap: 4px; flex-wrap: wrap; }
.sdot { font-size: .74rem; padding: 2px 8px; border-radius: 999px; background: var(--bg2); color: var(--muted); }
.sdot.now { background: var(--brand2); color: #fff; }
.sdot.done { opacity: .6; text-decoration: line-through; }
.seasons { display: flex; gap: 2px; }
.sz { filter: grayscale(1); opacity: .35; font-size: 1.05rem; }
.sz.now { filter: none; opacity: 1; transform: scale(1.2); }
.sz.done { filter: none; opacity: .7; }
.cbars { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; }
.cbar { display: grid; grid-template-columns: 5.6em 1fr 3.6em; align-items: center; gap: 6px; font-size: .78rem; }
.cbar-l { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cbar-m { height: 8px; background: var(--bg2); border-radius: 99px; overflow: hidden; }
.cbar-m i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand2), var(--brand)); border-radius: 99px; transition: width .8s cubic-bezier(.2,.8,.2,1); }
.cbar b { font-size: .8rem; text-align: right; white-space: nowrap; }
.cbar small.up { color: var(--good); } .cbar small.down { color: var(--bad); }
.counters { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.counters li { background: var(--bg2); border-radius: 10px; padding: 6px; text-align: center; font-size: .74rem; color: var(--muted); display: grid; }
.counters li b { color: var(--ink); font-size: .95rem; }
.counters.big { grid-template-columns: repeat(2, 1fr); }
.counters.big li { font-size: .82rem; padding: 10px; } .counters.big li b { font-size: 1.2rem; }
.inv { display: flex; flex-wrap: wrap; gap: 4px; }
.chip-item { font-size: .74rem; background: rgba(95,208,196,.12); border: 1px solid rgba(95,208,196,.35); padding: 2px 8px; border-radius: 999px; }

/* 폰 화면 */
.msgwrap { display: grid; gap: 10px; margin: 12px 0; }
.scene { font-style: italic; color: var(--muted); margin: 0; }
.phone { position: relative; width: 100%; max-width: 360px; margin: 0 auto; background: #0a0f1c; border: 3px solid #33406a; border-radius: 28px; padding: 26px 12px 16px; display: grid; gap: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.35); animation: rise .35s ease-out; }
.notch { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); width: 80px; height: 8px; background: #33406a; border-radius: 99px; }
.pm { font-size: .9rem; overflow-wrap: anywhere; animation: pop .3s ease-out both; }
.pm:nth-child(3) { animation-delay: .25s; } .pm:nth-child(4) { animation-delay: .5s; }
.pm p { margin: 0; }
.pm-h { font-size: .74rem; color: var(--muted); margin-bottom: 3px; }
.pm .bub { background: #26324f; padding: 9px 12px; border-radius: 4px 16px 16px 16px; display: inline-block; max-width: 92%; }
.pm.chat .bub, .pm.dm .bub { background: #fde76a; color: #2b2410; }
.pm.web { background: #f3f5fa; color: #1b2233; border-radius: 12px; padding: 0 0 10px; overflow: hidden; }
.pm.web p, .pm.web small { padding: 0 12px; display: block; }
.urlbar { background: #dfe4ef; font-size: .74rem; padding: 6px 10px; margin-bottom: 8px; color: #44506b; overflow-wrap: anywhere; }
.pm.call { background: linear-gradient(180deg, #1d6b4f, #134a37); border-radius: 16px; padding: 12px; }
.call-h { font-weight: 700; font-size: .82rem; margin-bottom: 4px; }
.pm.notice { background: rgba(255,255,255,.08); border-radius: 14px; padding: 9px 12px; }
.pm.mail { background: #fff; color: #1b2233; border-radius: 10px; padding: 10px 12px; }
.mail-h { font-weight: 700; font-size: .82rem; }
.fake-link { display: inline-block; margin-top: 4px; color: #7fb2ff; text-decoration: underline; font-size: .82rem; overflow-wrap: anywhere; }
.pm.mail .fake-link, .pm.web .fake-link { color: #2350c8; }
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* 선택지 */
.choices { display: grid; gap: 8px; margin-top: 12px; }
.choice { display: flex; gap: 10px; align-items: flex-start; text-align: left; width: 100%; background: var(--bg2); color: var(--ink); border: 1px solid var(--line); border-radius: 12px; padding: 12px; font: inherit; cursor: pointer; transition: transform .12s, border-color .12s, background .12s; min-height: 48px; }
.choice:hover, .choice:focus-visible { border-color: var(--brand); background: var(--card2); transform: translateY(-1px); }
.choice .k { flex: none; width: 26px; height: 26px; border-radius: 8px; background: var(--card2); display: grid; place-items: center; font-weight: 800; font-size: .85rem; color: var(--brand); }
.choice-l { display: grid; gap: 2px; }
.choice-l small { color: var(--muted); }
.choice-l small.eff { color: var(--good); }
.hint { background: rgba(255,211,77,.08); border: 1px dashed rgba(255,211,77,.4); border-radius: 10px; padding: 8px 10px; font-size: .88rem; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.hint summary { cursor: pointer; font-weight: 600; }

/* 결과 */
.cres { animation: rise .3s ease-out; }
.verdict { font-size: 1.5rem; font-weight: 900; margin: 0 0 4px; animation: pop .4s ease-out; }
.verdict.v-good { color: var(--good); } .verdict.v-ok { color: var(--brand); } .verdict.v-bad { color: var(--bad); } .verdict.v-over { color: var(--warn); }
.cres.v-good { border-color: rgba(70,209,138,.5); } .cres.v-bad { border-color: rgba(255,107,107,.55); } .cres.v-over { border-color: rgba(255,211,77,.5); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.chip { font-size: .8rem; padding: 3px 9px; border-radius: 999px; background: var(--bg2); }
.chip.up { color: var(--good); } .chip.down { color: var(--bad); }
.lesson { background: rgba(95,208,196,.08); border-left: 4px solid var(--brand); padding: 8px 12px; border-radius: 8px; margin: 10px 0; }
.lesson p { margin: 4px 0 0; }
.tacs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 8px 0; }
.tac { font-size: .78rem; background: rgba(255,107,107,.12); border: 1px solid rgba(255,107,107,.35); padding: 2px 8px; border-radius: 999px; }
.flags-d, .realcase, .log { background: var(--bg2); border-radius: 10px; padding: 8px 12px; margin: 8px 0; }
.flags-d summary, .realcase summary, .log summary { cursor: pointer; font-weight: 600; }
.cv .primary { margin-top: 10px; }
.primary.big { font-size: 1.05rem; padding: 14px 22px; }

/* 새 커리어 */
.newc { display: grid; gap: 12px; }
.nick-l { font-weight: 700; }
.newc input#nick { font: inherit; padding: 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg2); color: var(--ink); width: 100%; }
.rg { border: 1px solid var(--line); border-radius: 12px; padding: 10px; margin: 0; min-width: 0; }
.rg legend { font-weight: 700; padding: 0 6px; }
.rg-opts { display: grid; grid-template-columns: 1fr; gap: 6px; }
.rg-stage .rg-opts, .rg-mode .rg-opts, .rg-len .rg-opts { grid-template-columns: repeat(2, 1fr); }
.ropt { display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: 10px; background: var(--bg2); border: 2px solid transparent; cursor: pointer; min-width: 0; }
.ropt:has(input:checked) { border-color: var(--brand); background: var(--card2); }
.ropt input { accent-color: var(--brand); flex: none; }
.ropt-t { display: grid; min-width: 0; } .ropt-t small { color: var(--muted); font-size: .76rem; overflow: hidden; text-overflow: ellipsis; }
.ropt .char-svg { flex: none; }

/* 슬롯 */
.slots { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.slot { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; flex-wrap: wrap; }
.slot.empty { justify-content: space-between; color: var(--muted); }
.slot .primary, .slot .ghost { margin: 0; }
.slot-t { display: grid; flex: 1; min-width: 120px; } .slot-t small { color: var(--muted); }
.mascot-intro, .mascot-line { display: flex; gap: 10px; align-items: center; }
.mascot-intro p { margin: 0; background: var(--card); border: 1px solid var(--line); padding: 10px 12px; border-radius: 4px 14px 14px 14px; }
.tut-h { display: flex; gap: 12px; align-items: center; }
.tut { animation: rise .3s ease-out; }

/* 훈련·시상 */
.topt .choice-l b { font-size: 1rem; }
.awards { list-style: none; padding: 0; margin: 10px 0; display: grid; gap: 8px; }
.award { display: grid; grid-template-columns: 48px 1fr; grid-template-rows: auto auto; column-gap: 10px; background: linear-gradient(90deg, rgba(255,211,77,.14), transparent); border: 1px solid rgba(255,211,77,.4); border-radius: 12px; padding: 10px; animation: pop .5s ease-out both; }
.award .aw-e { grid-row: span 2; font-size: 2rem; display: grid; place-items: center; }
.award small { color: var(--muted); }
.small-aw .award .aw-e { font-size: 1.4rem; }

/* 엔딩 */
.end-h { display: flex; gap: 12px; align-items: center; }
.end-h > div:nth-child(2) { flex: 1; min-width: 0; }
.ctitle { margin: 0; color: var(--warn); font-weight: 800; }
.grade { flex: none; width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; align-content: center; font-size: 2.3rem; font-weight: 900; color: #0b1220; line-height: 1; animation: pop .6s ease-out; }
.grade small { font-size: .7rem; font-weight: 700; }
.g-S { background: #ffd34d; } .g-A { background: #5fd0c4; } .g-B { background: #7aa2ff; } .g-C { background: #ff9f5a; } .g-D { background: #ff6b6b; }
.gmini { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; color: #0b1220; font-size: .8rem; }
.end-grid { display: grid; gap: 12px; justify-items: center; }
.radar { width: 100%; max-width: 280px; height: auto; overflow: visible; }
.moment { border-radius: 12px; padding: 10px 12px; margin: 10px 0; }
.moment h3 { margin: 0 0 4px; font-size: 1rem; } .moment p { margin: 2px 0; }
.moment.good { background: rgba(70,209,138,.08); border: 1px solid rgba(70,209,138,.35); }
.moment.bad { background: rgba(255,107,107,.08); border: 1px solid rgba(255,107,107,.35); }
.report { background: var(--bg2); border-radius: 12px; padding: 10px 12px; }
.report h3 { margin: 0 0 6px; font-size: 1rem; }
.sharebox img.share-img { width: 100%; max-width: 360px; height: auto; display: block; margin: 10px auto; border-radius: 12px; border: 1px solid var(--line); }
.recs { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 4px; }
.rec { display: grid; grid-template-columns: 1fr; font-size: .84rem; border-left: 3px solid var(--line); padding: 2px 8px; }
.rec.v-bad { border-color: var(--bad); } .rec.v-good, .rec.v-defused { border-color: var(--good); } .rec.v-train { border-color: var(--brand2); } .rec.v-over { border-color: var(--warn); }
.rec-w { color: var(--muted); font-size: .74rem; } .rec-c { color: var(--muted); }

/* 도감·업적 */
.dexbar { height: 10px; background: var(--bg2); border-radius: 99px; overflow: hidden; }
.dexbar i { display: block; height: 100%; background: linear-gradient(90deg, var(--warn), var(--brand)); transition: width .8s; }
.dex, .achs { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.dcard, .ach { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: grid; gap: 4px; align-content: start; min-width: 0; overflow-wrap: anywhere; }
.dcard small, .ach small { font-size: .78rem; color: var(--muted); }
.dcard .tip { color: var(--good); }
.dc-e, .ach .aw-e { font-size: 2rem; }
.dcard.locked, .ach.locked { opacity: .55; border-style: dashed; }
.sil { filter: brightness(0) invert(.35); }
.ach.locked .aw-e { filter: grayscale(1); }
.dres { animation: rise .3s ease-out; }
.streak { font-weight: 800; color: var(--warn); }
.past { padding-left: 1.2em; } .past li { margin: 4px 0; }
.danger { color: var(--bad) !important; border-color: rgba(255,107,107,.5) !important; }

/* 토스트 */
.toasts { position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 60; display: grid; gap: 6px; width: min(92vw, 380px); pointer-events: none; }
.toast { display: flex; gap: 10px; align-items: center; background: #1f2b4d; border: 1px solid var(--brand); color: var(--ink); border-radius: 12px; padding: 10px 12px; box-shadow: 0 8px 24px rgba(0,0,0,.4); animation: pop .3s ease-out; transition: opacity .5s, transform .5s; }
.toast.ach { border-color: var(--warn); } .toast.dex { border-color: var(--brand2); }
.toast.out { opacity: 0; transform: translateY(8px); }
.toast-i { font-size: 1.6rem; } .toast div { display: grid; } .toast small { color: var(--muted); }

/* 홈 배너(index) */
.career-promo { display: flex; gap: 14px; align-items: center; background: linear-gradient(110deg, rgba(79,110,242,.25), rgba(95,208,196,.18)); border: 1px solid var(--brand); border-radius: var(--radius); padding: 14px 16px; margin: 12px 0; text-decoration: none; color: var(--ink); }
.career-promo b { font-size: 1.05rem; } .career-promo span { color: var(--muted); font-size: .88rem; display: block; }
.career-promo .go { margin-left: auto; font-weight: 800; color: var(--brand); white-space: nowrap; }

@media (min-width: 720px) {
  .rg-who .rg-opts { grid-template-columns: repeat(2, 1fr); }
  .rg-stage .rg-opts { grid-template-columns: repeat(3, 1fr); }
  .rg-mode .rg-opts, .rg-len .rg-opts { grid-template-columns: repeat(3, 1fr); }
  .dex, .achs { grid-template-columns: repeat(4, 1fr); }
  .end-grid { grid-template-columns: 280px 1fr; align-items: center; }
  .cbars { grid-template-columns: repeat(3, 1fr); }
  .cv h2 { font-size: 1.5rem; }
}
@media (prefers-reduced-motion: reduce) { .cv *, .toast { animation: none !important; transition: none !important; } }
.dcard .tips { margin: 2px 0; padding-left: 1em; font-size: .76rem; color: var(--good); }
.rar { font-size: .68rem !important; font-weight: 800; letter-spacing: .04em; justify-self: start; padding: 1px 7px; border-radius: 999px; background: var(--bg2); }
.dcard.r-rare { border-color: #7aa2ff; } .dcard.r-epic { border-color: #c77dff; } .dcard.r-legendary { border-color: var(--warn); box-shadow: 0 0 0 1px rgba(255,211,77,.25) inset; }
.r-rare .rar { color: #7aa2ff !important; } .r-epic .rar { color: #c77dff !important; } .r-legendary .rar { color: var(--warn) !important; }
.dcard.locked.r-legendary, .dcard.locked.r-epic, .dcard.locked.r-rare { border-style: dashed; }
.life-ending { background: linear-gradient(135deg, rgba(95,208,196,.14), rgba(255,200,87,.10)); border: 1px solid rgba(95,208,196,.35); border-radius: 12px; padding: 12px 16px; margin: 12px 0; }
.life-ending h3 { margin: 0 0 6px; }
.life-ending p { margin: 0; }
.mode-note { margin-top: -4px; }
