/* Stage: a songbook built for the stage. Dark backstage by default, light for daylight gigs. */
:root, [data-theme="dark"] {
  --bg: #0f0d0c; --bg2: #171412; --card: #1d1916; --line: #2e2824; --line2: #3a332e;
  --tx: #f4ede3; --tx2: #c9bdb0; --mute: #8f8377;
  --amber: #f2b441; --amber2: #ffcf6e; --amberbg: rgba(242, 180, 65, .12);
  --chord: #f5b842; --chorus: rgba(242, 180, 65, .07); --cue: #7fc3b0;
  --danger: #ef7a6a; --ok: #7fcf8e;
  --shadow: 0 18px 50px rgba(0, 0, 0, .55);
  --size: 20px;
  color-scheme: dark;
}
[data-theme="light"] {
  --bg: #f6f1e7; --bg2: #efe8da; --card: #fffaf1; --line: #e2d8c6; --line2: #d3c6b0;
  --tx: #1c1713; --tx2: #4a3f35; --mute: #85786a;
  --amber: #b4540e; --amber2: #d06a18; --amberbg: rgba(180, 84, 14, .09);
  --chord: #b0470a; --chorus: rgba(180, 84, 14, .06); --cue: #1f7a66;
  --danger: #b73a2a; --ok: #2f8a44;
  --shadow: 0 18px 50px rgba(60, 40, 20, .18);
  color-scheme: light;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--tx); }
body { font: 15px/1.45 Inter, system-ui, -apple-system, sans-serif; overflow: hidden; -webkit-font-smoothing: antialiased; }
#app { height: 100dvh; display: flex; flex-direction: column; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, textarea, select { font: inherit; color: var(--tx); }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
svg .fill { fill: currentColor; stroke: none; }
.hidden { display: none !important; }
.muted { color: var(--mute); }

/* brand */
.mark { font: 800 15px/1 Inter, sans-serif; letter-spacing: .32em; display: flex; align-items: center; gap: 10px; color: var(--tx); }
.bulb { width: 12px; height: 12px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 4px var(--amberbg), 0 0 18px var(--amber); display: inline-block; }
.boot { flex: 1; display: grid; place-items: center; }
.boot .bulb { width: 18px; height: 18px; animation: glow 1.4s ease-in-out infinite alternate; }
@keyframes glow { to { opacity: .4; } }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 40px; padding: 0 15px; border-radius: 12px; border: 1px solid var(--line2); background: var(--card); font-weight: 600; font-size: 14px; white-space: nowrap; }
.btn svg { width: 18px; height: 18px; }
.btn.primary { background: var(--amber); border-color: var(--amber); color: #1a1208; }
[data-theme="light"] .btn.primary { color: #fff; }
.btn.sm { min-height: 34px; padding: 0 11px; font-size: 13px; border-radius: 10px; }
.btn.big { min-height: 52px; font-size: 16px; padding: 0 22px; border-radius: 14px; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--tx2); }
.btn.danger { color: var(--danger); }
.btn:disabled { opacity: .4; }
.icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; color: var(--tx2); }
.icon:active, .btn:active { transform: scale(.97); }

/* top bar */
.bar { display: flex; align-items: center; gap: 12px; padding: calc(env(safe-area-inset-top) + 10px) 16px 10px; border-bottom: 1px solid var(--line); background: var(--bg); flex: none; }
.bar .right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.bar .ttl { min-width: 0; display: flex; flex-direction: column; }
.bar .ttl strong { font: 700 17px/1.2 Fraunces, Georgia, serif; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar .ttl small { color: var(--mute); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tabs { display: flex; gap: 4px; background: var(--bg2); padding: 4px; border-radius: 12px; margin-left: 10px; }
.tabs a { padding: 7px 14px; border-radius: 9px; font-weight: 600; font-size: 14px; color: var(--mute); }
.tabs a.on { background: var(--card); color: var(--tx); box-shadow: 0 1px 0 var(--line2); }
.sync { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 99px; display: inline-flex; align-items: center; gap: 6px; color: var(--mute); background: var(--bg2); }
.sync::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.sync.ok { color: var(--ok); } .sync.off { color: var(--amber); } .sync.busy { color: var(--tx2); }
@media (max-width: 560px) {
  .bar .mark { letter-spacing: .2em; font-size: 13px; }
  .tabs { margin-left: auto; } .tabs + .right { margin-left: 0; }
  .sync { font-size: 0; padding: 5px; } .sync::before { width: 9px; height: 9px; }
  .hide-sm { display: none; }
}

/* scroll areas */
.scroller { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.lib { padding: 0 0 calc(env(safe-area-inset-bottom) + 40px); }
.tools { padding: 14px 16px 6px; display: flex; flex-direction: column; gap: 12px; max-width: 860px; margin: 0 auto; }
.search { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 0 14px; color: var(--mute); }
.search input { flex: 1; border: 0; background: none; outline: none; height: 46px; font-size: 16px; }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
.chips::-webkit-scrollbar { display: none; }
.chips button { white-space: nowrap; padding: 8px 13px; border-radius: 99px; border: 1px solid var(--line); font-weight: 600; font-size: 13.5px; color: var(--tx2); }
.chips button em { font-style: normal; color: var(--mute); font-weight: 500; margin-left: 3px; }
.chips button.on { background: var(--tx); color: var(--bg); border-color: var(--tx); }
.chips button.on em { color: inherit; opacity: .6; }
.adds { display: flex; gap: 8px; flex-wrap: wrap; }
#songList, .sets { max-width: 860px; margin: 0 auto; padding: 0 16px; }
.grp { font: 700 11.5px/1 Inter, sans-serif; text-transform: uppercase; letter-spacing: .16em; color: var(--mute); margin: 22px 4px 8px; }
.rows { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--card); }
.rows li + li { border-top: 1px solid var(--line); }
.row { display: flex; align-items: center; gap: 12px; padding: 12px 15px; width: 100%; text-align: left; min-height: 58px; }
.row:active { background: var(--bg2); }
.row .t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.row .t strong { font-weight: 600; font-size: 15.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .t small { color: var(--mute); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .meta { display: flex; align-items: center; gap: 6px; color: var(--mute); }
.row .meta .ic svg { width: 16px; height: 16px; }
.pill { font-size: 12.5px; font-weight: 700; padding: 3px 9px; border-radius: 8px; background: var(--amberbg); color: var(--amber); white-space: nowrap; }
.pill.ghost { background: var(--bg2); color: var(--tx2); font-weight: 600; }
.empty { padding: 40px 20px; text-align: center; color: var(--mute); }
.empty.big { padding: 80px 20px; font-size: 17px; display: flex; flex-direction: column; align-items: center; gap: 18px; }

/* set cards */
.sets { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; padding-top: 6px; }
.setcard { background: var(--card); border: 1px solid var(--line); border-radius: 18px; display: flex; flex-direction: column; overflow: hidden; }
.setcard .body { padding: 16px 16px 10px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.setcard strong { font: 700 19px/1.2 Fraunces, Georgia, serif; }
.setcard small { color: var(--amber); font-weight: 600; font-size: 13px; }
.setcard .songs { color: var(--mute); font-size: 13px; margin-top: 6px; line-height: 1.5; }
.setcard .foot { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px 12px 16px; color: var(--mute); font-size: 13px; font-weight: 600; }

/* set editor */
.setedit, .editor { max-width: 760px; margin: 0 auto; padding: 16px 16px calc(env(safe-area-inset-bottom) + 60px); display: flex; flex-direction: column; gap: 12px; }
input.name { font: 700 24px/1.2 Fraunces, Georgia, serif; background: none; border: 0; border-bottom: 1px solid var(--line); padding: 8px 2px 10px; outline: none; width: 100%; }
.setedit label, .editor label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; font-weight: 600; color: var(--mute); text-transform: uppercase; letter-spacing: .08em; }
.setedit input:not(.name), .setedit textarea, .editor input:not(.name), .editor textarea, .editor select {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; font-size: 16px; outline: none; text-transform: none; letter-spacing: 0; font-weight: 500; width: 100%;
}
.setedit input:focus, .setedit textarea:focus, .editor input:focus, .editor textarea:focus { border-color: var(--amber); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.actions .big { flex: 1; min-width: 200px; }
.actions.small { justify-content: center; margin-top: 10px; }
.setlist { list-style: none; margin: 4px 0 0; padding: 0; border: 1px solid var(--line); border-radius: 16px; background: var(--card); overflow: hidden; }
.setlist li { display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 4px; min-height: 60px; background: var(--card); }
.setlist li + li { border-top: 1px solid var(--line); }
.setlist li.drag { background: var(--amberbg); box-shadow: inset 3px 0 0 var(--amber); }
.setlist .grip { touch-action: none; cursor: grab; color: var(--mute); padding: 10px 6px; display: grid; place-items: center; }
.setlist .num { width: 26px; text-align: center; font: 800 16px/1 Fraunces, serif; color: var(--amber); }
.setlist .t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.setlist .t strong { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.setlist .t small { color: var(--mute); font-size: 12.5px; }
.setlist .mv { display: flex; }
.setlist .mv button { width: 34px; height: 38px; display: grid; place-items: center; color: var(--mute); }
.setlist .rm { width: 36px; height: 36px; color: var(--mute); }
@media (max-width: 480px) { .setlist .mv { display: none; } }

/* sheets */
.sheet-wrap { position: fixed; inset: 0; background: rgba(0, 0, 0, .5); z-index: 50; display: flex; align-items: flex-end; justify-content: center; animation: fade .15s; }
.sheet { background: var(--bg); width: 100%; max-width: 620px; max-height: 82dvh; border-radius: 22px 22px 0 0; padding: 14px 16px calc(env(safe-area-inset-bottom) + 16px); display: flex; flex-direction: column; gap: 12px; box-shadow: var(--shadow); animation: up .2s ease-out; }
.sheet.tall { height: 88dvh; max-height: none; }
.sheet header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sheet header strong { font: 700 18px/1.2 Fraunces, serif; }
.sheet .rows { overflow-y: auto; flex: 1; }
.pick .row.picked { background: var(--amberbg); }
.pick .check { width: 26px; height: 26px; border-radius: 8px; border: 1.5px solid var(--line2); display: grid; place-items: center; font-weight: 800; color: var(--amber); flex: none; }
.pick .picked .check { border-color: var(--amber); background: var(--amber); color: var(--bg); }
.pick .num { width: 24px; color: var(--amber); font-weight: 800; }
@media (min-width: 700px) { .sheet-wrap { align-items: center; } .sheet { border-radius: 22px; } }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }

/* reading */
.reading .page { max-width: 980px; margin: 0 auto; padding: 18px 18px 200px; }
.stagenote { background: var(--amberbg); border-left: 3px solid var(--amber); border-radius: 10px; padding: 10px 14px; margin-bottom: 18px; color: var(--tx); font-size: calc(var(--size) * .78); line-height: 1.4; }
.chart { font-size: var(--size); line-height: 1.25; }
.chart .ln { margin: 0; min-height: 1.25em; }
.chart .ly { white-space: pre-wrap; }
.chart .ln.pr { display: flex; flex-wrap: wrap; align-items: flex-end; row-gap: .25em; margin-top: .15em; }
.chart .w { display: inline-flex; white-space: nowrap; }
.chart .sg { display: inline-flex; flex-direction: column; }
.chart .sg b { color: var(--chord); font-weight: 800; font-size: .92em; line-height: 1.15; min-height: 1.15em; white-space: pre; }
.chart .sg.has b { padding-right: .4em; }
.chart .sg .ly { white-space: pre; }
.chart .co { font-family: "SF Mono", ui-monospace, Menlo, monospace; white-space: pre-wrap; font-size: .9em; margin-top: .3em; }
.chart .co b { color: var(--chord); font-weight: 800; }
.chart .co i { color: var(--mute); font-style: normal; }
.chart .gap { height: .7em; }
.chart .cue { color: var(--cue); font-weight: 600; font-size: .78em; margin: .4em 0; font-style: italic; }
.chart .sec { margin: .5em 0 .9em; padding: .1em 0 .2em .75em; border-left: 3px solid var(--line2); break-inside: avoid; }
.chart .sec.chorus { border-left-color: var(--amber); background: var(--chorus); border-radius: 0 10px 10px 0; padding-right: .5em; }
.chart .sec h4 { margin: 0 0 .25em; font: 800 .56em/1.4 Inter, sans-serif; letter-spacing: .16em; text-transform: uppercase; color: var(--mute); }
.chart .sec.chorus h4 { color: var(--amber); }
.two-col .reading .chart { column-width: 420px; column-gap: 44px; }
@media (max-width: 899px) { .two-col .reading .chart { column-width: auto; } .ctrl .cg button.widen { display: none; } }
.files { margin-top: 24px; display: flex; flex-direction: column; gap: 16px; }
.file { margin: 0; }
.file figcaption { font-size: 12px; color: var(--mute); margin-bottom: 6px; font-weight: 600; }
.pdfpage { width: 100%; height: auto; display: block; border-radius: 6px; background: #fff; margin-bottom: 10px; }
[data-theme="dark"] .pdfpage { filter: invert(.92) hue-rotate(180deg); }
.loading { color: var(--mute); padding: 20px 0; }

/* reader controls */
.ctrl { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(env(safe-area-inset-bottom) + 12px); z-index: 20; display: flex; gap: 6px; background: color-mix(in srgb, var(--card) 92%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid var(--line2); border-radius: 18px; padding: 6px; box-shadow: var(--shadow); max-width: calc(100vw - 16px); overflow-x: auto; scrollbar-width: none; }
.ctrl::-webkit-scrollbar { display: none; }
.ctrl .cg { display: flex; align-items: center; background: var(--bg2); border-radius: 13px; flex: none; }
.ctrl .cg button { height: 44px; min-width: 40px; display: grid; place-items: center; border-radius: 12px; color: var(--tx2); font-weight: 800; font-size: 13px; }
.ctrl .cg button.on { color: var(--amber); background: var(--amberbg); }
.ctrl .val { min-width: 44px; text-align: center; font-weight: 800; font-size: 15px; display: flex; flex-direction: column; line-height: 1.05; }
.ctrl .val.key { color: var(--amber); font-size: 17px; font-family: Fraunces, serif; }
.ctrl .val small { font: 700 10px Inter, sans-serif; color: var(--mute); }
.ctrl .aa { font: 800 19px Fraunces, serif; } .ctrl .aa.sm { font-size: 13px; }
.ctrl .playbtn { display: flex !important; gap: 6px; padding: 0 12px; color: var(--tx) !important; }
.ctrl .playbtn span { font-size: 13px; }
.ctrl .playbtn.on { background: var(--amber) !important; color: #1a1208 !important; }
@media (max-width: 520px) { .ctrl { left: 8px; right: 8px; transform: none; } .ctrl .playbtn span { display: none; } }

/* gig mode */
.gig .gigtop { display: flex; align-items: center; gap: 6px; padding: calc(env(safe-area-inset-top) + 6px) 8px 6px; border-bottom: 1px solid var(--line); flex: none; background: var(--bg); }
.gig .now { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 10px; text-align: left; padding: 6px 4px; }
.gig .now .count { font: 800 13px Inter; color: var(--bg); background: var(--amber); padding: 3px 8px; border-radius: 8px; flex: none; }
.gig .now strong { font: 800 19px/1.2 Fraunces, serif; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gig .now small { color: var(--mute); font-size: 13px; white-space: nowrap; }
.gig .reading .page { padding-top: 14px; }
.page.in-r { animation: inr .22s ease-out; } .page.in-l { animation: inl .22s ease-out; }
@keyframes inr { from { transform: translateX(28px); opacity: 0; } } @keyframes inl { from { transform: translateX(-28px); opacity: 0; } }
.gigsc .page { padding-bottom: 28px; }
.endcap { max-width: 980px; margin: 0 auto; padding: 0 18px calc(env(safe-area-inset-bottom) + 140px); }
.nextup { width: 100%; display: flex; align-items: center; gap: 14px; padding: 18px; border: 1px dashed var(--line2); border-radius: 16px; text-align: left; }
.nextup small { color: var(--mute); text-transform: uppercase; letter-spacing: .14em; font-size: 11px; font-weight: 700; }
.nextup strong { flex: 1; font: 700 20px Fraunces, serif; }
.nextup span { color: var(--amber); font-weight: 800; }
.nextup.done { justify-content: center; flex-direction: column; gap: 4px; }

/* editor */
.editor .grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 560px) { .editor .grid { grid-template-columns: 1fr 1fr; } }
.chartbox, .filesbox { background: var(--bg2); border: 1px solid var(--line); border-radius: 16px; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.chart-head { display: flex; align-items: center; justify-content: space-between; }
.seg { display: flex; background: var(--card); border-radius: 10px; padding: 3px; }
.seg button { padding: 6px 12px; border-radius: 8px; font-weight: 600; font-size: 13px; color: var(--mute); }
.seg button.on { background: var(--tx); color: var(--bg); }
.imports { display: flex; gap: 6px; flex-wrap: wrap; }
#chart { font: 14.5px/1.45 "SF Mono", ui-monospace, Menlo, Consolas, monospace !important; min-height: 380px; white-space: pre; overflow-x: auto; resize: vertical; tab-size: 4; }
.preview { background: var(--bg); border-radius: 12px; padding: 14px; min-height: 200px; --size: 17px; }
.hint { font-size: 12.5px; color: var(--mute); margin: 0; }
.fl { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.fl li { display: flex; align-items: center; gap: 8px; background: var(--card); border-radius: 10px; padding: 6px 6px 6px 10px; }
.fl li span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.fl li.muted { background: none; padding: 0; }

/* login */
.login { flex: 1; display: grid; place-items: center; padding: 20px; background: radial-gradient(circle at 50% 20%, var(--amberbg), transparent 60%); }
.login-card { width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: 12px; }
.login-card .mark { font-size: 22px; justify-content: center; margin-bottom: 4px; }
.login-card p { text-align: center; margin: 0 0 8px; }
.login-card input { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 13px 14px; font-size: 16px; outline: none; }
.err { color: var(--danger); text-align: center; min-height: 1em; }

#toast { position: fixed; left: 50%; top: calc(env(safe-area-inset-top) + 14px); transform: translate(-50%, -20px); opacity: 0; pointer-events: none; transition: .2s; background: var(--tx); color: var(--bg); padding: 10px 16px; border-radius: 12px; font-weight: 600; font-size: 14px; z-index: 99; max-width: calc(100vw - 32px); text-align: center; box-shadow: var(--shadow); }
#toast.on { opacity: 1; transform: translate(-50%, 0); }

/* inside the hub: the hub has its own frame */
.in-hub .bar { padding-top: 10px; }

.empty.big small { font-size: 13.5px; max-width: 360px; line-height: 1.4; }
.row-btns { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.chart .w { align-items: flex-end; }
.chart .sg b.e { min-height: 0; height: 0; }
@media (max-width: 420px) {
  .ctrl { gap: 4px; padding: 5px; }
  .ctrl .cg button { min-width: 36px; height: 42px; }
  .ctrl .cg:nth-child(2) .val { display: none; }
  .ctrl .val { min-width: 36px; }
}
.chart pre.tab { font: .62em/1.25 "SF Mono", ui-monospace, Menlo, monospace; color: var(--tx2); overflow-x: auto; margin: .3em 0 .6em; padding: .4em 0; }
.imp { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.imp li { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.imp li .t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.imp li .t strong { font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.imp li .t small { color: var(--mute); font-size: 12.5px; }
.imp li .st { font-size: 12.5px; font-weight: 700; color: var(--mute); white-space: nowrap; }
.imp li .st.ok { color: var(--ok); } .imp li .st.bad { color: var(--danger); } .imp li .st.busy { color: var(--amber); }
.imp select { background: var(--bg2); border: 1px solid var(--line); border-radius: 8px; padding: 4px 6px; max-width: 170px; }
.check-row { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--tx2); }
.check-row input { width: 20px; height: 20px; accent-color: var(--amber); }

/* Hip Hop Medley */
.grp-link { float: right; text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 700; color: var(--amber); }
.medley-row { background: var(--amberbg); }
.addrow { display: grid; grid-template-columns: 1.4fr 1fr auto; gap: 8px; }
@media (max-width: 520px) { .addrow { grid-template-columns: 1fr 1fr; } .addrow .btn { grid-column: 1 / -1; } }
.medleylist .mt { gap: 1px; }
.medleylist .mnote { margin-top: 5px; background: transparent !important; border: 1px dashed var(--line2) !important; border-radius: 8px !important; padding: 6px 9px !important; font-size: 14px !important; color: var(--tx2) !important; }
.medleylist .mnote:focus { border-style: solid !important; border-color: var(--amber) !important; }
.medleylist li.is-out { opacity: .45; }
.medleylist li.is-out .num { color: var(--mute); }
.sw { position: relative; width: 46px; height: 28px; flex: none; }
.sw input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.sw span { position: absolute; inset: 0; border-radius: 99px; background: var(--line2); transition: .15s; }
.sw span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--tx); transition: .15s; }
.sw input:checked + span { background: var(--amber); }
.sw input:checked + span::after { transform: translateX(18px); background: #1a1208; }
.icon.rm.sure { color: var(--danger); background: rgba(239,122,106,.12); }
.chart.medley { display: flex; flex-direction: column; gap: .15em; }
.chart.medley .mline { display: flex; gap: .7em; align-items: baseline; padding: .45em 0; border-bottom: 1px solid var(--line); break-inside: avoid; }
.chart.medley .mn { font: 800 .7em/1 Fraunces, serif; color: var(--amber); min-width: 1.6em; text-align: right; }
.chart.medley strong { font-weight: 700; }
.chart.medley small { color: var(--mute); font-size: .6em; margin-left: .6em; }
.chart.medley p { margin: .15em 0 0; color: var(--cue); font-size: .8em; font-style: italic; }
.aistat { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.aistat .ok { color: var(--ok); } .aistat .warn { color: var(--amber); } .aistat small { color: var(--mute); }
.aiform { display: flex; gap: 8px; } .aiform input { flex: 1; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; font-size: 16px; outline: none; min-width: 0; }
.tabs a { white-space: nowrap; }
@media (max-width: 560px) { #themeBtn { display: none; } .tabs a { padding: 7px 11px; } }
