/* PLAYORA 검 강화하기. 그을음색 대장간 + 불씨 주황 하나. 바깥 페이지는 누런 장부 종이.
   게임 안 크기는 모두 em: .sword의 글자 크기를 app.js가 상자 크기에 맞춰 정한다(가로 61.25em×38.3em, 세로 화면 24.4em×43.75em). */
:root {
  --soot: #1b1512; --soot2: #231b16; --soot3: #2e241d; --line: rgba(239, 229, 211, 0.13); --line2: rgba(239, 229, 211, 0.24);
  --ash: #efe5d3; --ash2: #b9a98f; --ember: #f2702a; --ember2: #ffb347; --gold: #f2c14e; --steel: #8fb4d6; --red: #e2503a; --keepc: #9a8f84;
  --paper: #efe6d4; --paper2: #e4d8c1; --ink: #2a201a; --ink2: #5e4f42;
  --font-d: "Song Myung", "Nanum Myeongjo", "Batang", serif;
  --font-b: "IBM Plex Sans KR", "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
  --s1: 0.25em; --s2: 0.5em; --s3: 0.75em; --s4: 1em; --s6: 1.5em;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}
@supports (color: oklch(0 0 0)) {
  :root { --soot: oklch(0.2 0.012 50); --soot2: oklch(0.225 0.014 50); --soot3: oklch(0.27 0.018 52); --ash: oklch(0.93 0.025 80); --ash2: oklch(0.74 0.04 75); --ember: oklch(0.68 0.18 45); --gold: oklch(0.83 0.14 85); --steel: oklch(0.75 0.06 245); --red: oklch(0.62 0.19 32); --paper: oklch(0.93 0.025 82); --paper2: oklch(0.88 0.035 80); --ink: oklch(0.26 0.02 50); --ink2: oklch(0.44 0.03 55); }
}
html { overflow-x: clip; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font-b); font-size: 16px; line-height: 1.65; -webkit-text-size-adjust: 100%; }
a { color: inherit; }

/* ---------------------------------------------------------------- 바깥 페이지 */
.mast { display: flex; align-items: center; gap: 1rem; padding: 0.55rem 1.25rem; background: var(--soot); color: var(--ash); font-size: 0.88rem; font-weight: 700; }
.mast a { text-decoration: none; }
.mast-brand b { font-family: var(--font-d); font-weight: 400; font-size: 1.15rem; letter-spacing: 0.04em; margin-right: 0.6rem; color: var(--gold); }
.mast-more { margin-left: auto; border-bottom: 2px solid var(--ember); }
.head { max-width: 1040px; margin: 0 auto; padding: 1.4rem 1.25rem 0.9rem; display: flex; align-items: baseline; gap: 0.4rem 1.2rem; flex-wrap: wrap; }
.head h1 { font-family: var(--font-d); font-weight: 400; font-style: normal; font-size: clamp(2.4rem, 7vw, 3.9rem); line-height: 1.02; margin: 0; letter-spacing: -0.01em; }
.head p { margin: 0; font-weight: 700; color: var(--ink2); font-size: 0.95rem; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 12px; }
.about { max-width: 1040px; margin: 2.6rem auto 0; padding: 0 1.25rem; }
.about-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 17.5rem); gap: 2.6rem; }
.about h2 { font-family: var(--font-d); font-weight: 400; font-style: normal; font-size: 1.65rem; line-height: 1.25; margin: 2.4rem 0 0.6rem; word-break: keep-all; }
.about h2:first-child { margin-top: 0; }
.about h3 { font-size: 1.04rem; font-weight: 700; margin: 1.3rem 0 0.25rem; font-style: normal; }
.about p, .about li { word-break: keep-all; }
.about p { margin: 0 0 0.85rem; }
.about ol { padding-left: 1.3rem; margin: 0 0 1rem; } .about li { margin: 0 0 0.45rem; }
.about .note { border-left: 4px solid var(--ember); background: var(--paper2); padding: 0.75rem 1rem; font-size: 0.95rem; }
.ledger-wrap { overflow-x: auto; margin: 0.4rem 0 1rem; border: 2px solid var(--ink); background: #f6efe1; }
.ledger { border-collapse: collapse; width: 100%; font-size: 0.86rem; font-variant-numeric: tabular-nums; min-width: 34rem; }
.ledger th, .ledger td { padding: 0.28rem 0.55rem; border-bottom: 1px solid rgba(42, 32, 26, 0.16); text-align: right; white-space: nowrap; }
.ledger thead th { background: var(--ink); color: var(--paper); font-weight: 700; position: sticky; top: 0; }
.ledger tbody th { text-align: left; font-family: var(--font-d); font-weight: 400; font-size: 1rem; }
.ledger tr.band th, .ledger tr.band td { background: rgba(242, 112, 42, 0.07); }
.ledger td.b { color: #a8321f; font-weight: 700; } .ledger td.s { font-weight: 700; }
.about dl { margin: 0; }
.about dt { font-weight: 700; margin-top: 1rem; }
.about dd { margin: 0.2rem 0 0; color: var(--ink2); }
.about .more { margin-top: 2.2rem; font-size: 0.9rem; line-height: 1.9; color: var(--ink2); }
.about .more a { text-decoration: none; border-bottom: 1px solid rgba(42, 32, 26, 0.3); }
.about-side h3 { margin-top: 0; font-family: var(--font-d); font-weight: 400; font-size: 1.2rem; border-bottom: 2px solid var(--ink); padding-bottom: 0.3rem; }
.about-side h3 ~ h3 { margin-top: 1.6rem; }
.keytab { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.keytab th { text-align: left; padding: 0.35rem 0.6rem 0.35rem 0; font-weight: 700; white-space: nowrap; vertical-align: top; }
.keytab td { padding: 0.35rem 0; color: var(--ink2); border-bottom: 1px solid rgba(42, 32, 26, 0.12); word-break: keep-all; }
.foot { max-width: 1040px; margin: 3rem auto 0; padding: 1.2rem 1.25rem 2.6rem; border-top: 3px solid var(--ink); font-size: 0.85rem; color: var(--ink2); }
.foot a { margin-right: 1.1rem; font-weight: 700; color: var(--ink); text-decoration: none; display: inline-block; }
.foot p { margin: 0.7rem 0 0; }
@media (max-width: 820px) { .about-cols { grid-template-columns: minmax(0, 1fr); gap: 1.6rem; } .mast { padding: 0.55rem 0.9rem; } .head { padding: 1rem 0.9rem 0.7rem; } .about, .foot { padding-left: 0.9rem; padding-right: 0.9rem; } .wrap { padding: 0 6px; } }
html.embed .mast, html.embed .head, html.embed .about, html.embed .foot { display: none; }
html.embed, html.embed body { height: 100%; overflow: hidden; background: var(--soot); }
html.embed .wrap { max-width: none; padding: 0; }
.nojs { padding: 2em; color: var(--ash); }

/* ---------------------------------------------------------------- 게임 상자 */
.sword { position: relative; box-sizing: border-box; width: 100%; aspect-ratio: 16 / 10; max-height: calc(100svh - 16px); margin: 0 auto; background: var(--soot); color: var(--ash); border-radius: 6px; overflow: hidden; display: grid; grid-template-rows: 2.75em minmax(0, 1fr) 2.75em; font-family: var(--font-b); line-height: 1.4; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; }
@media (max-width: 700px) { .sword { aspect-ratio: auto; height: min(calc(100svh - 10px), 780px); border-radius: 0; } }
html.embed .sword { position: fixed; inset: 0; width: auto; height: auto; aspect-ratio: auto; max-height: none; border-radius: 0; }
.sword:fullscreen { width: 100vw; height: 100vh; max-height: none; aspect-ratio: auto; border-radius: 0; }
.sword *, .sword *::before, .sword *::after { box-sizing: border-box; }
.sword button { font: inherit; color: inherit; touch-action: manipulation; }
.sword .ic { width: 1.15em; height: 1.15em; flex: none; vertical-align: -0.2em; }

/* 위쪽 띠 */
.sw-bar { display: flex; align-items: center; gap: var(--s3); padding: 0 var(--s3); background: var(--soot2); border-bottom: 1px solid var(--line); min-width: 0; }
.sw-brand { display: flex; align-items: baseline; gap: 0.5em; white-space: nowrap; min-width: 0; }
.sw-brand b { font-family: var(--font-d); font-weight: 400; font-size: 1.3em; color: var(--ash); }
.sw-brand i { font-style: normal; font-size: 0.78em; color: var(--ash2); }
.sw-stat { display: flex; gap: 0.4em; margin-left: auto; min-width: 0; }
.chip { display: inline-flex; align-items: center; gap: 0.3em; height: 1.9em; padding: 0 0.6em 0 0.45em; border-radius: 99em; background: rgba(239, 229, 211, 0.07); border: 1px solid var(--line); font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; font-size: 0.92em; }
.chip.coin b { color: var(--gold); }
.sw-tools { display: flex; gap: 0.3em; }
.tb { display: inline-flex; align-items: center; justify-content: center; gap: 0.35em; height: 2.15em; min-width: 2.15em; padding: 0 0.6em; border: 1px solid var(--line2); background: transparent; color: var(--ash2); border-radius: 0.45em; cursor: pointer; font-size: 0.86em; white-space: nowrap; }
.tb.ico { padding: 0; width: 2.15em; }
.tb:hover { color: var(--ash); border-color: var(--ash2); }
.tb.on { background: var(--ember); border-color: var(--ember); color: #1b1006; font-weight: 700; }
.tb:focus-visible, .btn:focus-visible, .tab:focus-visible, .cm:focus-visible, .bk:focus-visible, .hintb:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* 가운데: 장면 + 오른쪽 판 */
.sw-main { display: grid; grid-template-columns: 36em minmax(0, 1fr); min-height: 0; }
.sw-stage { position: relative; overflow: hidden; background: #1b1512; min-height: 0; }
.sw-stage > canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: manipulation; }
.sw-plate { position: absolute; left: 0.8em; bottom: 0.6em; display: flex; flex-direction: column; pointer-events: none; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8); max-width: 60%; }
.sw-plate .lv { font-family: var(--font-d); font-size: 2.6em; line-height: 0.95; color: var(--gold); }
.sw-plate .nm { font-family: var(--font-d); font-size: 1.3em; line-height: 1.25; color: var(--ash); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sw-plate .pr { font-size: 0.82em; color: var(--ash2); font-weight: 700; }
.sw-res { position: absolute; left: 0; right: 0; top: 30%; text-align: center; pointer-events: none; z-index: 2; }
.sw-res .r { display: inline-block; margin: 0; font-family: var(--font-d); font-size: 2.3em; line-height: 1.1; text-shadow: 0 2px 0 rgba(0, 0, 0, 0.55), 0 0 18px rgba(0, 0, 0, 0.5); animation: pop 1.1s var(--ease) both; }
.sw-res .r b { font-weight: 400; }
.sw-res .r.fast { animation-duration: 0.6s; font-size: 1.9em; }
.r.succ, .r.sold { color: var(--gold); } .r.keep { color: var(--ash); } .r.down { color: var(--steel); } .r.brk { color: var(--red); }
.r .gr { display: block; margin-top: 0.15em; font-family: var(--font-b); font-style: normal; font-weight: 700; font-size: 0.4em; letter-spacing: 0.02em; }
.gr.p { color: var(--gold); } .gr.g { color: var(--ember2); } .gr.m { color: var(--ash2); }
@keyframes pop { 0% { opacity: 0; transform: translateY(0.3em) scale(0.94); } 14% { opacity: 1; transform: none; } 72% { opacity: 1; } 100% { opacity: 0; transform: translateY(-0.25em); } }
.sw-say { position: absolute; left: 0.6em; top: 0.6em; max-width: min(52%, 20em); z-index: 3; display: flex; gap: 0.55em; align-items: flex-start; background: rgba(23, 18, 15, 0.93); border: 1px solid var(--line2); border-radius: 0.55em; padding: 0.5em 0.65em; font-size: 0.82em; line-height: 1.45; animation: rise 0.4s var(--ease) both; }
.sw-say canvas { width: 2.75em; height: 2.75em; border-radius: 0.4em; flex: none; }
.sw-say p { margin: 0; } .sw-say b { display: block; color: var(--gold); font-size: 0.92em; }
.sw-toast { position: absolute; right: 0.6em; top: 0.6em; width: max-content; max-width: 46%; pointer-events: none; z-index: 3; }
.sw-toast p { margin: 0; padding: 0.4em 0.85em; border-radius: 0.6em; background: rgba(23, 18, 15, 0.94); border: 1px solid var(--line2); font-size: 0.82em; font-weight: 700; animation: rise 0.35s var(--ease) both; text-align: center; }
.sw-toast .ach { color: var(--gold); } .sw-toast .charm { color: var(--ash); } .sw-toast .up { color: var(--ember2); }
.sw-say[hidden] { display: none; }
@keyframes rise { from { opacity: 0; transform: translateY(0.4em); } to { opacity: 1; transform: none; } }
.sw-hint { position: absolute; right: 0.6em; bottom: 0.7em; }
.hintb { border: 1px solid var(--gold); background: rgba(23, 18, 15, 0.9); color: var(--ash); border-radius: 0.5em; padding: 0.4em 0.7em; font-size: 0.82em; cursor: pointer; text-align: left; line-height: 1.3; white-space: nowrap; }
.hintb b { color: var(--gold); margin-right: 0.3em; }

.sw-side { display: flex; flex-direction: column; gap: 0.55em; padding: 0.7em 0.8em 0.8em; background: var(--soot2); border-left: 1px solid var(--line); min-height: 0; min-width: 0; }
.sw-odds { background: var(--soot); border: 1px solid var(--line); border-radius: 0.55em; padding: 0.55em 0.7em 0.5em; }
.od-h { display: flex; justify-content: space-between; align-items: baseline; gap: 0.5em; }
.od-h b { font-family: var(--font-d); font-weight: 400; font-size: 1.25em; }
.od-h span { font-size: 0.82em; color: var(--ash2); font-weight: 700; white-space: nowrap; }
.od-stack { position: relative; height: 0.62em; border-radius: 0.31em; background: #0f0b09; margin: 0.4em 0 0.35em; overflow: visible; }
.od-stack .seg { position: absolute; top: 0; bottom: 0; }
.od-stack .seg:first-child { border-radius: 0.31em 0 0 0.31em; } .od-stack .seg:last-of-type { border-radius: 0 0.31em 0.31em 0; }
.seg.succ { background: var(--gold); } .seg.keep { background: #6b5f54; } .seg.down { background: var(--steel); } .seg.brk { background: var(--red); }
.seg.shield { background-image: repeating-linear-gradient(135deg, rgba(20, 14, 10, 0.75) 0 0.18em, transparent 0.18em 0.36em); }
.od-stack .tick { position: absolute; top: -0.32em; bottom: -0.32em; width: 0.16em; margin-left: -0.08em; background: #fff; border-radius: 0.1em; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.7); }
.od-rows { list-style: none; margin: 0; padding: 0; }
.od-rows li { display: grid; grid-template-columns: 3.9em minmax(0, 1fr) 4.2em; grid-template-areas: "k bar p" ". n n"; align-items: center; column-gap: 0.5em; padding: 0.12em 0; }
.od-rows .k { grid-area: k; font-size: 0.9em; font-weight: 700; }
.od-rows .bar { grid-area: bar; height: 0.42em; background: rgba(239, 229, 211, 0.07); border-radius: 0.21em; overflow: hidden; }
.od-rows .bar i { display: block; height: 100%; border-radius: 0.21em; transition: width 0.25s var(--ease); }
.od-rows b { grid-area: p; text-align: right; font-variant-numeric: tabular-nums; font-size: 1.02em; white-space: nowrap; }
.od-rows b s { color: var(--ash2); font-weight: 400; font-size: 0.75em; margin-right: 0.2em; }
.od-rows small { grid-area: n; font-size: 0.74em; color: var(--ash2); line-height: 1.2; }
.od-rows li.succ b, .od-rows li.succ .k { color: var(--gold); } .od-rows li.succ .bar i { background: var(--gold); }
.od-rows li.keep .bar i { background: #8a7d70; }
.od-rows li.down b, .od-rows li.down .k { color: var(--steel); } .od-rows li.down .bar i { background: var(--steel); }
.od-rows li.brk b, .od-rows li.brk .k { color: var(--red); } .od-rows li.brk .bar i { background: var(--red); }
.od-rows li.zero .k, .od-rows li.zero b { opacity: 0.45; }
.od-rows li.hit { background: rgba(239, 229, 211, 0.08); border-radius: 0.3em; }
.od-bonus { margin: 0.3em 0 0; font-size: 0.78em; color: var(--ash2); line-height: 1.35; }
.od-bonus b { color: var(--ash); } .od-bonus b.gd { color: var(--gold); } .od-bonus small { font-size: 0.9em; }
.od-done { margin: 0.4em 0 0; font-size: 0.86em; color: var(--ash2); }

.sw-charms { display: grid; grid-template-columns: 1fr 1fr; gap: 0.45em; }
.cm { display: flex; align-items: center; gap: 0.45em; min-height: 2.9em; padding: 0.35em 0.5em; border: 1px solid var(--line2); background: var(--soot); border-radius: 0.5em; cursor: pointer; text-align: left; min-width: 0; }
.cm .ic { width: 1.5em; height: 1.5em; }
.cm span { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.cm b { font-size: 0.86em; white-space: nowrap; } .cm small { font-size: 0.7em; color: var(--ash2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cm.on.guard { border-color: var(--gold); background: rgba(242, 193, 78, 0.12); } .cm.on.back { border-color: var(--steel); background: rgba(143, 180, 214, 0.12); }
.cm.on small { color: var(--ash); }
.cm:disabled { opacity: 0.45; cursor: default; }

.sw-tm { min-height: 2.6em; display: flex; flex-direction: column; justify-content: center; }
.tm-track { position: relative; height: 1.5em; border-radius: 0.4em; background: #0f0b09; border: 1px solid var(--line2); overflow: hidden; }
.tm-g { position: absolute; top: 0; bottom: 0; background: rgba(255, 179, 71, 0.35); }
.tm-p { position: absolute; top: 0; bottom: 0; background: var(--gold); }
.tm-m { position: absolute; top: -0.1em; bottom: -0.1em; width: 0.25em; margin-left: -0.125em; background: #fff; box-shadow: 0 0 0.4em rgba(255, 255, 255, 0.8); left: 0; }
.tm-cap, .tm-idle { margin: 0.25em 0 0; font-size: 0.74em; color: var(--ash2); line-height: 1.3; }
.tm-cap b { color: var(--gold); }
.tm-idle { margin: 0; }

.sw-acts { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 0.45em; margin-top: auto; }
.btn { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.05em; min-height: 2.6em; padding: 0.35em 0.7em; border-radius: 0.55em; border: 1px solid var(--line2); background: var(--soot3); color: var(--ash); font-weight: 700; cursor: pointer; line-height: 1.2; text-align: center; white-space: nowrap; }
.btn small { font-size: 0.72em; font-weight: 500; opacity: 0.85; white-space: nowrap; }
.btn .ic { width: 1em; height: 1em; }
.btn.main { background: var(--ember); border-color: var(--ember); color: #1b1006; font-size: 1.1em; min-height: 3.3em; }
.btn.main small { opacity: 0.8; }
.btn.main:not(:disabled):active { transform: translateY(1px); }
.btn.main.gold, .btn.gold { background: var(--gold); border-color: var(--gold); color: #1b1006; }
.btn.main.job { background: var(--soot3); color: var(--ash); border-color: var(--ember); }
.btn.main.red { background: var(--red); border-color: var(--red); color: #fff; }
.btn.sell { min-height: 3.3em; }
.btn.sell.arm { border-color: var(--gold); color: var(--gold); }
.btn.ghost { background: transparent; }
.btn.sm { min-height: 2.3em; font-size: 0.86em; padding: 0.3em 0.75em; }
.btn:disabled { opacity: 0.42; cursor: default; }
.shake { animation: shake 0.4s; }
@keyframes shake { 20% { transform: translateX(-0.25em); } 40% { transform: translateX(0.25em); } 60% { transform: translateX(-0.15em); } 80% { transform: translateX(0.15em); } }

/* 아래 메뉴 */
.sw-tabs { display: flex; align-items: stretch; background: var(--soot2); border-top: 1px solid var(--line); min-width: 0; }
.tab { flex: 1 1 0; min-width: 0; position: relative; border: 0; border-right: 1px solid var(--line); background: transparent; color: var(--ash2); font-weight: 700; font-size: 0.9em; cursor: pointer; white-space: nowrap; padding: 0 0.3em; }
.tab:last-child { border-right: 0; }
.tab.on { color: var(--ash); background: var(--soot3); box-shadow: inset 0 -0.18em 0 var(--ember); }
.tab .bd { position: absolute; top: 0.35em; right: 0.35em; min-width: 1.25em; height: 1.25em; padding: 0 0.3em; border-radius: 99em; background: var(--ember); color: #1b1006; font-style: normal; font-size: 0.7em; line-height: 1.25em; }
.tab .bd.dot { min-width: 0; width: 0.55em; height: 0.55em; padding: 0; top: 0.55em; right: 0.55em; }
.tb-daily { flex: 1; margin: 0; align-self: center; padding: 0 0.9em; font-size: 0.78em; color: var(--ash2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sw-tabs .tb-daily + .tab { flex: 0 0 auto; padding: 0 1.1em; border-left: 1px solid var(--line); }

/* 패널 */
.sw-sheet { position: absolute; left: 0; right: 0; top: 2.75em; bottom: 2.75em; background: var(--soot2); display: flex; flex-direction: column; z-index: 5; animation: rise 0.25s var(--ease) both; }
.sw-sheet[hidden] { display: none; }
.sh-h { display: flex; align-items: baseline; gap: 0.8em; padding: 0.6em 0.9em 0.5em; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.sh-h h2 { margin: 0; font-family: var(--font-d); font-weight: 400; font-style: normal; font-size: 1.45em; }
.sh-h p { margin: 0; font-size: 0.8em; color: var(--ash2); flex: 1 1 14em; min-width: 0; }
.sh-h .x { margin-left: auto; border: 1px solid var(--line2); background: transparent; border-radius: 0.45em; padding: 0.3em 0.8em; cursor: pointer; color: var(--ash); font-size: 0.85em; }
.sh-b { flex: 1; overflow-y: auto; padding: 0.7em 0.9em 1em; overscroll-behavior: contain; }
.sh-note { font-size: 0.78em; color: var(--ash2); margin: 0.8em 0 0.6em; line-height: 1.5; }
.reqs, .facs, .achs, .book, .dl-hist { list-style: none; margin: 0; padding: 0; }
.req { display: grid; grid-template-columns: 4.2em minmax(0, 1fr) auto; gap: 0.7em; align-items: center; padding: 0.55em 0.6em; border: 1px solid var(--line); border-radius: 0.55em; background: var(--soot); margin-bottom: 0.5em; }
.req.ok { border-color: var(--gold); }
.req.wait { grid-template-columns: 1fr; opacity: 0.75; }
.req .face { width: 4.2em; height: 4.2em; border-radius: 0.45em; }
.req .who b { font-size: 0.95em; } .req .who p { margin: 0.1em 0 0.25em; font-size: 0.82em; line-height: 1.4; color: var(--ash); }
.req .rw { font-size: 0.82em; font-weight: 700; display: flex; align-items: center; gap: 0.25em; flex-wrap: wrap; } .req .rw small { font-weight: 400; color: var(--ash2); margin-left: 0.4em; }
.req .stay, .req.wait small { font-size: 0.72em; color: var(--ash2); }
.req .rb { display: flex; flex-direction: column; gap: 0.35em; }
.fac { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.8em; align-items: center; padding: 0.6em 0.7em; border: 1px solid var(--line); border-radius: 0.55em; background: var(--soot); margin-bottom: 0.5em; }
.fac b { font-family: var(--font-d); font-weight: 400; font-size: 1.15em; }
.fac p { margin: 0.15em 0 0.1em; font-size: 0.82em; } .fac small { font-size: 0.74em; color: var(--ash2); }
.pips { display: inline-flex; gap: 0.2em; vertical-align: 0.1em; margin-left: 0.4em; } .pips i { width: 0.6em; height: 0.6em; border-radius: 50%; border: 1px solid var(--ash2); } .pips i.on { background: var(--ember); border-color: var(--ember); }
.fac .max { font-size: 0.82em; color: var(--gold); font-weight: 700; }
.otab-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 0.5em; }
.otab { border-collapse: collapse; width: 100%; font-size: 0.82em; font-variant-numeric: tabular-nums; }
.otab th, .otab td { padding: 0.25em 0.5em; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
.otab thead th { position: sticky; top: 0; background: var(--soot3); color: var(--ash); font-weight: 700; }
.otab tbody th { text-align: left; font-family: var(--font-d); font-weight: 400; }
.otab .s { color: var(--gold); } .otab .d { color: var(--steel); } .otab .b { color: var(--red); }
.otab tr.cur th, .otab tr.cur td { background: rgba(242, 112, 42, 0.18); }
.book { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.45em; }
.bk { width: 100%; display: flex; flex-direction: column; gap: 0.15em; padding: 0.35em 0.45em 0.4em; border: 1px solid var(--line); border-radius: 0.5em; background: var(--soot); cursor: pointer; text-align: left; }
.bk canvas { width: 100%; height: 2.6em; }
.bk span { font-size: 0.78em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .bk span b { color: var(--gold); font-weight: 700; }
.bk.unseen span { color: var(--ash2); }
.achs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.45em; }
.achs li { padding: 0.45em 0.6em; border: 1px solid var(--line); border-radius: 0.5em; background: var(--soot); opacity: 0.7; }
.achs li.done { opacity: 1; border-color: rgba(242, 193, 78, 0.6); }
.achs b { font-size: 0.9em; } .achs li.done b { color: var(--gold); }
.achs p { margin: 0.1em 0; font-size: 0.78em; } .achs small { font-size: 0.72em; color: var(--ash2); }
.recs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.4em 1.2em; margin: 0; }
.recs div { display: flex; justify-content: space-between; gap: 0.6em; border-bottom: 1px solid var(--line); padding: 0.3em 0; font-size: 0.86em; }
.recs dt { color: var(--ash2); } .recs dd { margin: 0; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.dl-rule { font-size: 0.86em; margin: 0 0 0.6em; line-height: 1.55; } .dl-rule b { color: var(--gold); }
.dl-now { font-size: 1em; margin: 0.6em 0 0.7em; } .dl-now b { font-family: var(--font-d); font-weight: 400; font-size: 1.5em; color: var(--gold); }
.sh-b h3 { font-family: var(--font-d); font-weight: 400; font-size: 1.15em; margin: 1em 0 0.4em; font-style: normal; }
.dl-hist li { display: grid; grid-template-columns: 6em 3em 1fr; gap: 0.5em; font-size: 0.86em; padding: 0.25em 0; border-bottom: 1px solid var(--line); } .dl-hist b { color: var(--gold); } .dl-hist small { color: var(--ash2); }
.sh-b .btn.main { width: 100%; }

/* 모달 */
.sw-modal { position: absolute; inset: 0; z-index: 10; background: rgba(10, 7, 5, 0.72); display: flex; align-items: center; justify-content: center; padding: 1em; }
.sw-modal[hidden] { display: none; }
.md { width: min(31em, 100%); max-height: 100%; overflow-y: auto; background: var(--soot2); border: 1px solid var(--line2); border-radius: 0.7em; padding: 1.1em 1.2em 1em; animation: rise 0.3s var(--ease) both; }
.md h2 { margin: 0.1em 0 0.45em; font-family: var(--font-d); font-weight: 400; font-style: normal; font-size: 1.6em; line-height: 1.25; word-break: keep-all; }
.md p { margin: 0 0 0.7em; font-size: 0.92em; line-height: 1.6; word-break: keep-all; }
.md .step { margin: 0; font-size: 0.78em; color: var(--ember2); font-weight: 700; }
.md .md-note { font-size: 0.8em; color: var(--ash2); }
.md .quote { font-family: var(--font-d); font-size: 1.1em; }
.md-b { display: flex; gap: 0.5em; justify-content: flex-end; flex-wrap: wrap; margin-top: 0.8em; }
.md-b .btn { min-width: 6.5em; }
.md-list { display: flex; flex-direction: column; gap: 0.4em; }
.md-list .btn { width: 100%; align-items: flex-start; }
.md .face.big { width: 4.5em; height: 4.5em; border-radius: 0.5em; float: right; margin: 0 0 0.4em 0.8em; }
.md .bigsw { display: block; width: 100%; height: 6.5em; margin-bottom: 0.4em; }
.md.legend { border-color: var(--gold); }
.md.legend h2 { color: var(--gold); }

/* ---------------------------------------------------------------- 세로 화면 */
.sword.port .sw-main { display: flex; flex-direction: column; }
.sword.port .sw-stage { flex: 1 1 auto; min-height: 12.5em; }
.sword.port .sw-side { flex: none; border-left: 0; border-top: 1px solid var(--line); padding: 0.55em 0.65em 0.6em; gap: 0.45em; }
.sword.port .sw-brand { display: none; }
.sword.port .sw-stat { margin-left: 0; }
.sword.port .sw-tools { margin-left: auto; }
.sword.port .sw-toast { max-width: 60%; }
.sword.port .tb span { display: none; }
.sword.port .tb { padding: 0; width: 2.4em; height: 2.4em; }
.sword.port .tb, .sword.port .sh-h .x, .sword.port .btn.sm, .sword.port .hintb, .sword.port .btn { min-height: 34px; min-width: 34px; }
.sword.port .sw-bar { gap: 0.4em; padding: 0 0.5em; }
.sword.port .chip { padding: 0 0.45em 0 0.35em; font-size: 0.86em; }
.sword.port .od-rows { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.3em; }
.sword.port .od-rows li { display: flex; flex-direction: column; align-items: flex-start; padding: 0.25em 0.35em; background: rgba(239, 229, 211, 0.04); border-radius: 0.35em; min-width: 0; }
.sword.port .od-rows .bar { display: none; }
.sword.port .od-rows b { text-align: left; font-size: 1.1em; }
.sword.port .od-rows small { font-size: 0.66em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.sword.port .od-rows .k { font-size: 0.78em; }
.sword.port .sw-plate .lv { font-size: 2.2em; }
.sword.port .sw-plate .nm { font-size: 1.15em; }
.sword.port .sw-res .r { font-size: 2em; }
.sword.port .tab { font-size: 0.82em; }
.sword.port .tb-daily { white-space: normal; line-height: 1.25; font-size: 0.74em; padding: 0 0.7em; }
.sword.port .tb-daily span { display: none; }
.sword.port .book { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sword.port .achs, .sword.port .recs { grid-template-columns: minmax(0, 1fr); }
.sword.port .req { grid-template-columns: 3.4em minmax(0, 1fr); }
.sword.port .req .face { width: 3.4em; height: 3.4em; }
.sword.port .req .rb { grid-column: 1 / -1; flex-direction: row; }
.sword.port .req .rb .btn { flex: 1; }
.sword.port .sw-say { max-width: 70%; font-size: 0.76em; }
.sword.port .hintb { font-size: 0.76em; }

@media (prefers-reduced-motion: reduce) { .sw-res .r, .sw-say, .sw-toast p, .sw-sheet, .md, .shake { animation-duration: 0.01s; } .od-rows .bar i { transition: none; } }
