:root {
  color-scheme: light dark;
  --bg: #f4f4f1; --panel: #ffffff; --panel2: #ecece7; --line: #d9d9d3; --fg: #1d1d1b; --sub: #656560;
  --key: #ffffff; --keyfg: #1d1d1b; --keyline: #cfcfc8; --on: #2d5bd7; --onfg: #ffffff; --onsoft: #dde6fb;
  --ok: #1f7a3a; --okbg: #dff3e5; --ng: #b3261e; --ngbg: #fbe3e0; --frame: #e3e3de; --todo: #dcdcd5;
  --kw: #ffffff; --kwfg: #1d1d1b; --kb: #1d1d1b; --kbfg: #ffffff; --kline: #55554f;
  --kwok: #dff3e5; --kwokfg: #1f7a3a; --kbok: #1f7a3a; --kbokfg: #ffffff;
  --kwng: #fbe3e0; --kwngfg: #b3261e; --kbng: #b3261e; --kbngfg: #ffffff;
  --kwsel: #dde6fb; --kwselfg: #2d5bd7; --kbsel: #2d5bd7; --kbselfg: #ffffff;
  --press: brightness(.93); --hover: brightness(.96);
  --xlogo: #000000;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #151514; --panel: #1d1d1c; --panel2: #262624; --line: #33332f; --fg: #ecece8; --sub: #9a9a93;
    --key: #262624; --keyfg: #ecece8; --keyline: #3a3a36; --on: #7aa2ff; --onfg: #10131a; --onsoft: #24304a;
    --ok: #6fd28f; --okbg: #1d3a26; --ng: #ff8a80; --ngbg: #45201d; --frame: #0b0b0a; --todo: #2c2c29;
    --kw: #d8d8d2; --kwfg: #1d1d1b; --kb: #0b0b0a; --kbfg: #ecece8; --kline: #0b0b0a;
    --kwok: #b9e6c6; --kwokfg: #14512a; --kbok: #2c7643; --kbokfg: #ecece8;
    --kwng: #f2c3bd; --kwngfg: #8c1d16; --kbng: #a23a31; --kbngfg: #ecece8;
    --kwsel: #c9d7fb; --kwselfg: #1f46b0; --kbsel: #3d63c9; --kbselfg: #ecece8;
    --press: brightness(1.3); --hover: brightness(1.12);
    --xlogo: #ffffff;
  }
}
:root[data-theme="dark"] {
    --bg: #151514; --panel: #1d1d1c; --panel2: #262624; --line: #33332f; --fg: #ecece8; --sub: #9a9a93;
    --key: #262624; --keyfg: #ecece8; --keyline: #3a3a36; --on: #7aa2ff; --onfg: #10131a; --onsoft: #24304a;
    --ok: #6fd28f; --okbg: #1d3a26; --ng: #ff8a80; --ngbg: #45201d; --frame: #0b0b0a; --todo: #2c2c29;
    --kw: #d8d8d2; --kwfg: #1d1d1b; --kb: #0b0b0a; --kbfg: #ecece8; --kline: #0b0b0a;
    --kwok: #b9e6c6; --kwokfg: #14512a; --kbok: #2c7643; --kbokfg: #ecece8;
    --kwng: #f2c3bd; --kwngfg: #8c1d16; --kbng: #a23a31; --kbngfg: #ecece8;
    --kwsel: #c9d7fb; --kwselfg: #1f46b0; --kbsel: #3d63c9; --kbselfg: #ecece8;
    --press: brightness(1.3); --hover: brightness(1.12);
    --xlogo: #ffffff;
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; background: var(--frame); color: var(--fg); font: 16px/1.5 system-ui, sans-serif; }
body { display: flex; justify-content: center; align-items: center; overscroll-behavior: none; }
.phone { width: 412px; height: 912px; background: var(--bg); display: flex; flex-direction: column; overflow: hidden;
         border-radius: 28px; box-shadow: 0 0 0 1px var(--line); gap: 14px;
         padding: calc(var(--sat, env(safe-area-inset-top, 0px)) + 16px) 16px calc(var(--sab, env(safe-area-inset-bottom, 0px)) + 12px);
         user-select: none; -webkit-user-select: none; font-variant-numeric: tabular-nums; }
@media (max-width: 500px) { .phone { width: 100%; height: 100%; border-radius: 0; box-shadow: none; } }
.phone > * { min-width: 0; flex-shrink: 0; }
.phone > .grow, .phone > .scroll { flex: 1 1 0; }
button { font: inherit; color: inherit; white-space: nowrap; touch-action: manipulation; -webkit-tap-highlight-color: transparent; cursor: pointer;
         border: 1px solid var(--keyline); background: var(--key); border-radius: 12px; padding: 0 8px; }
button:disabled { cursor: default; }
button:not(:disabled):active { filter: var(--press); }
.primary { background: var(--on); color: var(--onfg); border-color: var(--on); font-weight: 700; }
.big { height: 60px; width: 100%; font-size: 20px; }
.mid { height: 52px; width: 100%; font-size: 17px; }
.sub { color: var(--sub); }
.small { font-size: 13px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; }
.h { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.title { font-size: 22px; font-weight: 700; }
.center { text-align: center; }
.keyname { font-size: 48px; font-weight: 800; line-height: 1.1; white-space: nowrap; }
.keyname small, .score small, button small { font-size: .55em; font-weight: 700; margin-left: 2px; }
.bar { height: 8px; border-radius: 4px; background: var(--panel2); overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--on); }
.thtog { width: 44px; height: 44px; padding: 0; border: 0; background: none; border-radius: 12px; color: var(--sub);
         display: inline-flex; align-items: center; justify-content: center; flex: none; align-self: center; margin: -8px -10px -8px 0; }
.thtog svg { width: 22px; height: 22px; display: block; }
.h.hastog > .sub { margin-left: auto; }
.nav { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.nav button { height: 52px; font-size: 15px; }
.badge { position: relative; }
.badge em { position: absolute; top: -8px; right: 8px; font-style: normal; font-size: 11px; font-weight: 700; background: var(--ng); color: var(--onfg); border-radius: 9px; padding: 1px 7px; }
.dots { display: flex; gap: 8px; justify-content: center; margin-top: 14px; }
.dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--todo); display: block; }
.dots i.now { background: var(--on); }
.dots i.done { background: var(--ok); }
.score { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; font-size: 16px; }
.score .v { font-weight: 700; text-align: right; }
.score .v.ok { color: var(--ok); } .score .v.ng { color: var(--ng); }
.times { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px 8px; text-align: center; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.times span { font-size: 12px; color: var(--sub); white-space: nowrap; }
.times b { font-size: 18px; font-weight: 700; }
.times i { grid-column: 1 / -1; text-align: right; font-style: normal; font-size: 11px; color: var(--sub); margin-top: 4px; }
.msg { font-size: 13px; color: var(--sub); min-height: 1.5em; margin: 0; }

.prog { display: flex; align-items: center; gap: 10px; color: var(--sub); font-size: 13px; margin: 0 4px; }
.prog .bar { flex: 1; height: 4px; border-radius: 2px; }
.prog .bar span { transition: width .2s; }
.phone.qscreen { gap: 0; }
.qscreen > .space-top { flex: 1 1 0; }
.qscreen > .space-bottom { flex: 0.45 1 0; }
.q { display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; gap: 12px; margin-bottom: 20px; }
.slots { display: grid; gap: 8px; width: 100%; max-width: 360px; }
.s3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.s2 { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 260px; }
.s1 { grid-template-columns: minmax(0, 1fr); max-width: 120px; }
.staffbox { width: 100%; max-width: 300px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 6px 10px; }
.staff { display: block; width: 100%; height: auto; fill: var(--fg); }
.staffbox.ok .head, .staffbox.ok .stem, .staffbox.ok .leger, .staffbox.ok .nacc { fill: var(--ok); }
.staffbox.ng .head, .staffbox.ng .stem, .staffbox.ng .leger, .staffbox.ng .nacc { fill: var(--ng); }
.staff .nok { fill: var(--ok); }
.staff .nng { fill: var(--ng); }
.staffbox.wide { max-width: 380px; }
.staffbox.ks { max-width: 300px; }
.staffbox.ks.ok .acc { fill: var(--ok); }
.staffbox.ks.ng .acc { fill: var(--ng); }
.slots .lab { font-size: 13px; color: var(--sub); }
.slots .val { height: 72px; display: flex; align-items: center; justify-content: center; border-radius: 14px; font-size: 38px; font-weight: 700; line-height: 1; white-space: nowrap; }
.slots .val.long { font-size: 30px; }
.slots .val.xlong { font-size: 23px; }
.slots .val small { font-size: .45em; font-weight: 600; margin-left: 2px; }
.slots .val.unk { background: var(--onsoft); color: var(--on); }
.slots .val.ok { background: var(--okbg); color: var(--ok); }
.slots .val.ng { background: var(--ngbg); color: var(--ng); }
.seqhead { font-size: 38px; font-weight: 700; line-height: 1.1; }
.seqhead small { font-size: 17px; margin-left: 2px; }
.seqnum, .seq { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; width: 100%; }
.seqnum { font-size: 12px; color: var(--sub); margin-bottom: -6px; }
.seq > span { height: 52px; display: flex; align-items: center; justify-content: center; border-radius: 10px; font-size: 20px; font-weight: 700; background: var(--panel2); color: var(--sub); white-space: nowrap; }
.seq > span.done { background: var(--panel); color: var(--fg); border: 1px solid var(--line); }
.seq > span.now { background: var(--onsoft); color: var(--on); }
.seq > span.ok { background: var(--okbg); color: var(--ok); }
.seq > span.ng { background: var(--ngbg); color: var(--ng); }
.seqlab { font-size: 13px; color: var(--sub); margin-bottom: -6px; }
.seq.n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 240px; gap: 8px; }
.seq.n4 { grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: 320px; gap: 8px; }
.seq.n3 > span, .seq.n4 > span { height: 64px; font-size: 28px; border-radius: 14px; }
.seq.cn { grid-template-columns: 1fr 1.6fr; max-width: 250px; gap: 8px; }
.seq.cn > span { height: 64px; font-size: 28px; border-radius: 14px; padding: 0 6px; }
.seq.cn.b3 { grid-template-columns: 1fr 1.6fr 1fr; max-width: 330px; }
.staffbox.cn { max-width: 260px; padding: 4px 8px; }
.staffbox.cn.ok .acc { fill: var(--ok); }
.staffbox.cn.ng .acc { fill: var(--ng); }
.tones { display: grid; gap: 12px; width: 100%; max-width: 360px; }
.tones.t3 { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 290px; }
.tones.t4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tones > span { text-align: center; font-size: 34px; font-weight: 700; line-height: 1.2; white-space: nowrap; overflow: hidden; }
.notes i { font-style: normal; font-size: 13px; color: var(--sub); margin-right: 4px; white-space: nowrap; }
.pad .qual { grid-column: span 7; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin-top: 4px; }
.pad .qual button { height: 50px; font-size: 18px; font-weight: 600; white-space: nowrap; }
.pad .qual.t4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pad .qual.t4 button { font-size: 16px; }
.pad .cell.sel { background: var(--onsoft); color: var(--on); border-color: var(--on); }
.slots.s1.mel { max-width: 220px; }
.result { height: 24px; font-size: 15px; color: var(--sub); white-space: nowrap; }
.notes { height: 34px; display: flex; gap: 4px; justify-content: center; align-items: center; }
.notes > span { min-width: 38px; padding: 3px 2px; border-radius: 8px; font-size: 16px; font-weight: 600; color: var(--sub); background: var(--panel2); text-align: center; white-space: nowrap; }
.notes > span.mark { color: var(--onfg); background: var(--on); }
.pad { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.pad button { color: var(--keyfg); padding: 0; }
.pad .cell { height: 64px; font-size: 19px; font-weight: 600; }
.pad .cell.nat { height: 72px; font-size: 24px; }
.pad .cell.x2 { height: 50px; font-size: 18px; }
.pad .down { background: var(--on); color: var(--onfg); border-color: var(--on); }
.pad .right { background: var(--okbg); color: var(--ok); border: 2px solid var(--ok); }
.pad .picked { background: var(--ngbg); color: var(--ng); border: 2px solid var(--ng); }
.pad.done button:not(.right):not(.picked):not(.foot) { opacity: .35; }
.pad .num { grid-column: span 7; display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.pad .num button { height: 80px; font-size: 30px; font-weight: 700; }
.pad .sig { height: 64px; font-size: 20px; font-weight: 600; }
.pad .sigpic { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.pad .sp { height: 72px; display: flex; align-items: center; justify-content: center; }
.pad .sp svg.staff { width: auto; height: 62px; max-width: 94%; display: block; fill: currentColor; }
.pad .zero { grid-column: span 7; height: 56px; font-size: 22px; font-weight: 600; }
.pad .foot { grid-column: span 7; height: 52px; margin-top: 4px; color: var(--sub); font-size: 15px; }
.pad .foot.half { grid-column: span 3; }
.pad .foot.half2 { grid-column: span 4; }
.pad .foot.next { background: var(--on); color: var(--onfg); border-color: var(--on); font-size: 19px; font-weight: 600; }
.pad .foot.blank { visibility: hidden; }
.kbd { grid-column: span 7; position: relative; height: 230px; touch-action: manipulation; }
.pad .kbd .key { position: absolute; top: 0; border-radius: 0 0 7px 7px; border: 1px solid var(--kline); padding: 0;
                 display: flex; align-items: flex-end; justify-content: center; }
.pad .kbd .key.w { background: var(--kw); color: var(--kwfg); z-index: 1; }
.pad .kbd .key.b { background: var(--kb); color: var(--kbfg); z-index: 2; border-radius: 0 0 5px 5px; }
.pad .kbd .key + .key.w { border-left-width: 0; }
.kbd .kn { font-size: 15px; font-weight: 700; line-height: 1; margin-bottom: 12px; white-space: nowrap; }
.kbd .key.b .kn { font-size: 13px; margin-bottom: 9px; }
.pad .kbd .key.sel.w, .pad .kbd .key.down.w { background: var(--kwsel); color: var(--kwselfg); }
.pad .kbd .key.sel.b, .pad .kbd .key.down.b { background: var(--kbsel); color: var(--kbselfg); }
.pad .kbd .key.right.w { background: var(--kwok); color: var(--kwokfg); border: 2px solid var(--kwokfg); }
.pad .kbd .key.right.b { background: var(--kbok); color: var(--kbokfg); border-color: var(--kbok); }
.pad .kbd .key.picked.w { background: var(--kwng); color: var(--kwngfg); border: 2px solid var(--kwngfg); }
.pad .kbd .key.picked.b { background: var(--kbng); color: var(--kbngfg); border-color: var(--kbng); }
.pad.done .kbd button.key:not(.foot) { opacity: 1; }
.dbl { font-family: 'Noto Music', 'Noto Sans Symbols 2', 'Segoe UI Symbol', system-ui, sans-serif; font-size: 1.9em; line-height: 0; vertical-align: 0.06em; margin-left: 1px; }
.dbl.dflat { font-size: 1.05em; vertical-align: 0; margin-left: 0; }

.scale { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; text-align: center; }
.scale .deg { color: var(--sub); font-size: 14px; }
.scale .nt { font-size: 24px; font-weight: 700; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px 0; white-space: nowrap; }
.scale .nt.up { border: 2px solid var(--on); color: var(--on); }
.looklist .scale .nt { font-size: 18px; padding: 7px 0; }
.looklist .nm { font-weight: 700; margin-bottom: 4px; }
.looklist .nm .sub { font-size: 13px; font-weight: 400; margin-left: 8px; }
.looklist .scale .deg { font-size: 12px; }

.dock { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: -4px -8px 0; padding-top: 8px; border-top: 1px solid var(--line); }
.dock button { height: 50px; font-size: 15px; border: 0; background: none; color: var(--sub); border-radius: 12px; }
.dock button.on { background: var(--onsoft); color: var(--on); font-weight: 700; }
.dock .badge em { top: 0; right: 4px; }
.warn { font-size: 13px; color: var(--ng); margin: 0; }

.lk { display: grid; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 4px 8px; }
.lk .r { display: grid; align-items: center; border-bottom: 1px solid var(--line); min-height: 40px; }
.lk .r:last-child { border-bottom: 0; }
.lk .r > span { white-space: nowrap; }
.lk .hd { min-height: 26px; }
.lk .hd > span { font-size: 12px; color: var(--sub); font-weight: 400; text-align: center; }
.lk .hd > span:first-child { text-align: left; }
.scroll .lk .hd { position: sticky; top: -2px; z-index: 2; background: var(--panel); }
.lk .lkg { display: grid; }
.lk .lkg:not(:last-child) > .r:last-child { border-bottom: 1px solid var(--line); }
.lk.sc .r { grid-template-columns: 58px 30px repeat(7, minmax(0, 1fr)); }
.lk.sc .r > .k { font-size: 18px; font-weight: 700; }
.lk.sc .r > .g { font-size: 13px; color: var(--sub); text-align: center; }
.lk.sc .r > .n { font-size: 17px; font-weight: 700; text-align: center; padding: 3px 0; }
.lk.sc .r > .n.up { color: var(--on); box-shadow: inset 0 0 0 1.5px var(--on); border-radius: 6px; }
.lk.ks .r { grid-template-columns: 34px minmax(0, 1fr) 76px 76px; gap: 6px; }
.lk.ks .r > .g { font-size: 16px; font-weight: 700; }
.lk.ks .hd > span:first-child { grid-column: span 2; }
.lk.ks .r > .k { font-size: 19px; font-weight: 700; text-align: center; }
.lk.ks .r > .s svg { height: 56px; width: auto; display: block; fill: var(--fg); }
.lk.rd { padding: 6px 8px; gap: 4px; }
.lk.rd svg { width: 100%; height: auto; display: block; fill: var(--fg); }
.lk.rd text.nn { font: 700 1.45px system-ui, sans-serif; fill: var(--fg); }
.lk.rd text.oc { font: 400 0.9px system-ui, sans-serif; fill: var(--sub); }
.lk.cd .r { grid-template-columns: 96px minmax(0, 1fr); }
.lk.cd .r > .c { font-size: 18px; font-weight: 700; }
.lk.cd .r > .t { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); text-align: center; }
.lk.cd .r > .t i { font-style: normal; font-size: 17px; font-weight: 700; white-space: nowrap; }
.lk.cd .r.off > span { color: var(--sub); font-weight: 400; }
.lk.tn .r { grid-template-columns: 52px repeat(7, minmax(0, 1fr)); min-height: 34px; }
.lk.tn .r.w { border-bottom: 0; min-height: 28px; }
.lk.tn .r > .l { font-size: 12px; color: var(--sub); }
.lk.tn .r > .n { text-align: center; }
.lk.tn .r.w > .n { font-size: 15px; color: var(--sub); }
.lk.tn .r.s > .n { font-size: 18px; font-weight: 700; }
.lk.tn .r.s > .n.off { color: var(--sub); font-weight: 400; opacity: .6; }
.lk.tk .r { grid-template-columns: minmax(0, 1fr) 34px minmax(0, 1fr) 34px; gap: 4px; }
.lk.tk .r > .k { font-size: 18px; font-weight: 700; text-align: center; }
.lk.tk .r > .g { font-size: 13px; color: var(--sub); text-align: center; }
.lk.tk .r.off > span { color: var(--sub); font-weight: 400; }

.scroll { overflow-y: auto; display: flex; flex-direction: column; gap: 12px; margin: 0 -4px; padding: 2px 4px; }
.scroll > * { flex-shrink: 0; }
.seg { display: flex; gap: 4px; padding: 4px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.seg button { flex: 1; border: 0; background: none; height: 38px; border-radius: 9px; color: var(--sub); }
.seg button.on { background: var(--on); color: var(--onfg); font-weight: 700; }
.exline { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin-top: -4px; }
.exline > span { text-align: center; font-size: 16px; font-weight: 600; background: var(--panel2); border-radius: 8px; padding: 3px 0; white-space: nowrap; overflow: hidden; }
.tabs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; border-bottom: 1px solid var(--line); }
.tabs button { height: 42px; border: 0; border-radius: 0; background: none; color: var(--sub); font-size: 15px; border-bottom: 3px solid transparent; }
.tabs button.on { color: var(--fg); font-weight: 700; border-bottom-color: var(--on); }
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cards .card { height: 72px; display: flex; align-items: center; justify-content: center; padding: 0 6px; background: var(--panel); }
.cards .card.on { border: 2px solid var(--on); box-shadow: 0 0 0 2px var(--onsoft); }
.face { display: inline-flex; gap: 4px; align-items: stretch; vertical-align: middle; }
.face > span { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 40px; padding: 3px 6px; border-radius: 8px; background: var(--panel2); line-height: 1.1; white-space: nowrap; }
.face i { font-style: normal; font-size: 10px; color: var(--sub); }
.face b { font-size: 18px; font-weight: 700; }
.face b small { font-size: .55em; }
.face .qm { background: var(--onsoft); color: var(--on); }
.face .qm i { color: var(--on); }
.face .seven b { font-size: 13px; letter-spacing: 1px; }
.face .stf { padding: 2px 4px; background: var(--panel2); }
.face .stf svg { height: 50px; width: auto; display: block; fill: var(--fg); }
.face .rsf svg { height: 30px; width: auto; display: block; fill: var(--on); margin-top: 1px; }
.kbi { display: block; height: 20px; width: auto; margin-top: 2px; }
.kbi .w { fill: none; stroke: currentColor; stroke-width: .16; }
.kbi .b { fill: currentColor; }
.face.sm .kbi { height: 14px; }
.face.sm { gap: 3px; }
.face.sm > span { min-width: 30px; padding: 1px 4px; border-radius: 6px; }
.face.sm i { font-size: 8px; }
.face.sm b { font-size: 13px; }
.face.sm .seven b { font-size: 10px; letter-spacing: 0; }
.face.sm .stf svg { height: 28px; }
.face.sm .rsf svg { height: 18px; }
.facetitle { display: flex; align-items: center; gap: 10px; }
.facetitle > span:not(.face) { font-size: 20px; }
.tname { display: flex; align-items: center; gap: 6px; }
.tname > small { font-size: 11px; color: var(--sub); }
.tname.stack { flex-direction: column; align-items: flex-start; gap: 1px; }
.facetitle > small { font-size: 13px; font-weight: 400; }
.mixrows { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2px 6px; align-items: center; padding: 10px 14px; text-align: center; }
.mixrows > span { font-size: 12px; color: var(--sub); white-space: nowrap; }
.mixrows > .mf { grid-column: 1 / -1; display: flex; margin-top: 8px; }
.mixrows > b { font-size: 16px; font-weight: 700; white-space: nowrap; }
.mixrows > i { grid-column: 1 / -1; text-align: right; font-style: normal; font-size: 11px; color: var(--sub); margin-top: 4px; }
.tg { display: flex; flex-direction: column; --tgh: 26px; }
.tg + .tg { margin-top: 8px; }
.tgrp { position: sticky; top: -2px; z-index: 2; background: var(--bg); box-sizing: border-box; height: var(--tgh);
  display: grid; grid-template-columns: 1fr 96px 44px 40px; gap: 8px; align-items: end; padding: 0 2px 4px; border-bottom: 1px solid var(--line);
  font-size: 12px; color: var(--sub); font-weight: 700; }
.tgrp > span:last-child { grid-column: 3 / 5; text-align: right; font-weight: 400; }
.tg thead th { position: sticky; top: calc(var(--tgh) - 2px); z-index: 1; background: var(--bg); box-shadow: inset 0 -1px 0 var(--line); }
.lbl { font-size: 13px; color: var(--sub); margin: 0 2px -6px; display: flex; justify-content: space-between; align-items: center; }
.lbl button { height: 30px; font-size: 13px; padding: 0 10px; }
.lbl button.on { color: var(--on); border-color: var(--on); font-weight: 700; }
.chips { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.chips.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.chips.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.chips.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.chips.c7 { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.chips.c7 button { height: 44px; font-size: 16px; }
.chips.quals button { font-size: 15px; }
.chips.c8 { grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 4px; }
.chips.c8 button { font-size: 14px; height: 44px; }
.chips.c6 { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; }
.chips.c6 button { font-size: 18px; height: 44px; }
.chips.c6 button:first-child { font-size: 14px; }
.chips.sigs button:nth-child(9) { grid-column-start: 2; }
.chips button { position: relative; height: 48px; font-weight: 700; font-size: 17px; padding: 0 2px; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.15; }
.chips.c4 button, .chips.c2 button { font-size: 14px; }
.chips button.on { background: var(--onsoft); border-color: var(--on); }
.chips button em { position: absolute; top: 2px; right: 5px; font-style: normal; font-size: 11px; color: var(--ng); font-weight: 700; }
.chips button i { font-style: normal; font-size: 10px; font-weight: 400; color: var(--sub); }
.row2 { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; }
.row2 > button { height: 46px; font-size: 14px; }

.map { display: grid; grid-template-columns: 84px repeat(15, minmax(0, 1fr)); gap: 3px; align-items: center; font-size: 12px; }
.map .lab { color: var(--sub); }
.map button { height: 22px; border-radius: 4px; background: var(--todo); border: 0; padding: 0; }
.map button.d { background: var(--ok); }
.map button.n { background: var(--on); }
.map button.x { box-shadow: inset 0 0 0 2px var(--ng); }
.trend { display: flex; flex-direction: column; }
.trow { display: grid; grid-template-columns: 1fr 96px 44px 40px; gap: 8px; align-items: center; min-height: 44px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: none; padding: 3px 2px; font-size: 14px; text-align: left; }
.trow.on { background: var(--onsoft); }
.trow > svg { width: 96px; height: 26px; }
.trow polyline { fill: none; stroke: var(--on); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.trow > b { text-align: right; }
.trow > em { font-style: normal; color: var(--sub); font-size: 12px; text-align: right; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { color: var(--sub); font-weight: 400; text-align: left; font-size: 12px; }
th, td { padding: 5px 4px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td.n, th.n { text-align: right; }
.note { font-size: 12px; color: var(--sub); margin: 0; }
.miss { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 4px 12px; font-size: 15px; align-items: baseline; }
.miss b { color: var(--ng); text-align: right; }
.miss .t { color: var(--sub); font-size: 13px; text-align: right; max-width: 8.6em; line-height: 1.35; }
.miss .t small { font-size: 11px; }
.ext { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 3px 10px; margin-top: 8px; font-size: 14px; align-items: baseline; }
.ext > span:nth-child(3n+1) { font-size: 12px; color: var(--sub); white-space: nowrap; }
.ext > .eq { text-align: left; }
.ext > b { text-align: right; white-space: nowrap; }
.sigstf { display: flex; justify-content: center; margin-top: 14px; }
.sigstf svg { height: 84px; width: auto; display: block; fill: var(--fg); }
.looklist .sigstf { justify-content: flex-start; margin-top: 6px; }
.looklist .sigstf svg { height: 50px; }
