
@font-face { font-family: "Inter"; src: url("fonts/Inter-subset-wght.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Lora"; src: url("fonts/Lora-wght.ttf") format("truetype"); font-weight: 400 700; font-display: swap; }

:root { --theme-name: light; color-scheme: light dark; }
:root { --sl: env(safe-area-inset-left); --sr: env(safe-area-inset-right); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --theme-name: dark; } }
:root[data-theme="dark"] { --theme-name: dark; color-scheme: dark; }
:root[data-theme="light"] { color-scheme: light; }

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
html { background: var(--bg); overscroll-behavior: none; }
body { background: var(--bg); color: var(--ink); font: 400 var(--text-m)/1.45 var(--font-sans); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; overscroll-behavior: none; -webkit-text-size-adjust: 100%; }
body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: manipulation; }
input, textarea, select, [contenteditable] { -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; }
img, a { -webkit-user-drag: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; margin: 0; text-align: inherit; }
button:disabled { cursor: default; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ol, ul { margin: 0; }
[hidden] { display: none !important; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--accent-ring); outline-offset: 2px; }
svg.i { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.screen { position: fixed; inset: 0; overflow: hidden; overflow: clip; background: var(--bg); }
.boot { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; color: var(--accent-ink); background: var(--bg); transition: opacity .32s ease; }
.boot img { width: 72px; height: 72px; border-radius: 22%; box-shadow: var(--shadow-2); }
body.ready .boot { opacity: 0; pointer-events: none; }
.boot.fail { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 24px; text-align: center; }
.boot-fail { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.boot-fail p { margin: 0; max-width: 300px; font: 500 15px/21px var(--font-sans); color: var(--ink-2); }
.boot-fail .boot-help { font: 400 14px/20px var(--font-sans); }
.boot-help a { color: var(--accent-ink); text-underline-offset: 2px; }

.btn { height: var(--btn-h); padding: 0 22px; border-radius: var(--r-pill); display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 600 15px/1 var(--font-sans); white-space: nowrap; flex: none; text-align: center; }
.btn svg.i { width: 20px; height: 20px; }
.btn-s { height: 40px; padding: 0 16px; font-size: 14px; }
.btn-s svg.i { width: 18px; height: 18px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-tonal { background: var(--accent-tint); color: var(--accent-ink); }
.btn-line { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-strong); }
.btn-ghost { background: transparent; color: var(--accent-ink); padding: 0 12px; }
.btn:disabled { opacity: .5; }
.tog[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); box-shadow: none; }
.icon-btn { width: var(--tap); height: var(--tap); display: grid; place-items: center; border-radius: var(--r-pill); color: var(--ink); flex: none; }
.icon-btn:disabled { opacity: .32; }
.icon-btn.ok { color: var(--ok); }
.icon-btn.warn { color: var(--warn); }
.raised { background: var(--bar) !important; box-shadow: var(--shadow-1), inset 0 0 0 1px var(--line); }
.raised.tog[aria-pressed="true"] { background: var(--accent) !important; color: var(--on-accent); }
.link-btn { color: var(--accent-ink); font-weight: 600; margin-left: 6px; text-decoration: underline; text-underline-offset: 2px; }
@media (pointer: coarse) {
  :where(.btn-s, .icon-btn, .seg button, .fchip, .star, .more, .link-btn, .search-x, .toast-btn, .toast-x, .plib-reset, .trash-link, .fb-foot, .lib-brand, .set-foot, .pal, .mk, button.avatar) { position: relative; }
  :where(.btn-s, .icon-btn, .seg button, .fchip, .star, .more, .link-btn, .search-x, .toast-btn, .toast-x, .plib-reset, .trash-link, .fb-foot, .lib-brand, .set-foot, .pal, .mk, button.avatar)::after { content: ""; position: absolute; inset: min(0px, calc(50% - 22px)); }
  button.avatar { overflow: visible; }
  .link-btn { display: inline-block; }
}
@media (hover: hover) {
  .icon-btn:not(:disabled):hover { background: var(--accent-tint); }
  .btn-line:hover, .btn-ghost:hover { background: var(--accent-tint); }
  .tog[aria-pressed="true"]:hover { background: color-mix(in srgb, var(--accent) 88%, var(--ink)); }
  .raised.tog[aria-pressed="true"]:hover { background: color-mix(in srgb, var(--accent) 88%, var(--ink)) !important; }
}

.seg { display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 4px; gap: 4px; background: var(--surface-sunk); border-radius: var(--r-pill); flex: none; }
.seg button { height: 36px; padding: 0 16px; border: 0; background: transparent; color: var(--ink-2); border-radius: var(--r-pill); font: 600 14px/1 var(--font-sans); white-space: nowrap; text-align: center; }
.seg button[aria-checked="true"], .seg button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }
.seg-ic button { width: 36px; padding: 0; display: grid; place-items: center; }
.seg-ic svg.i { width: 18px; height: 18px; }
@media (pointer: coarse) { .seg-ic button { width: 42px; } }
.seg.raised { padding: 4px; }
.js-mode.seg-ic { padding: 2px; }
.js-mode.seg-ic button { width: 40px; height: 40px; }
@media (pointer: coarse) { .js-mode.seg-ic button { width: 42px; } }
.js-mode.seg-ic svg.i { width: 22px; height: 22px; }
.ur-pair { padding: 2px; }
.ur-pair button { width: 40px; height: 40px; color: var(--ink); }
@media (pointer: coarse) { .ur-pair button { width: 42px; } }
.ur-pair svg.i { width: 22px; height: 22px; }
.ur-pair button:disabled { opacity: .32; }
@media (hover: hover) { .ur-pair button:not(:disabled):hover { background: var(--accent-tint); } }
.seg.raised button[aria-checked="true"] { background: var(--accent-tint); color: var(--accent-ink); box-shadow: none; }
.st-bar .seg-ic { padding: 0; gap: 0; background: none; }
.st-bar .seg-ic button { width: var(--tap); height: var(--tap); }
.st-bar .seg-ic button[aria-checked="true"] { background: var(--accent-tint); color: var(--accent-ink); box-shadow: none; }
.st-tools .ur-pair { padding: 0; gap: 0; background: transparent; box-shadow: inset 0 0 0 1px var(--line-strong); }
.st-tools .ur-pair button { width: var(--tap); height: 40px; }
.seg-full { display: flex; }
.seg-full button { flex: 1; padding: 0 10px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); }
.prog { height: 4px; border-radius: 99px; background: var(--line-soft); overflow: hidden; }
.prog > i { display: block; height: 100%; width: var(--p, 0%); background: var(--accent); border-radius: inherit; }
canvas.hoop, .hoop-empty { display: block; width: 52px; height: 52px; border-radius: 50%; flex: none; background: var(--chart-fabric); box-shadow: 0 0 0 3px var(--hoop), 0 0 0 4px var(--hoop-edge), 0 3px 8px 3px rgba(60, 45, 20, 0.10); margin: 4px; }
.hoop-empty { background: var(--chart-fabric); opacity: .6; }
.avatar { position: relative; overflow: hidden; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: #9A6B47; color: #fff; font: 600 16px/1 var(--font-sans); flex: none; text-align: center; outline: 1.5px solid var(--avatar-ring, var(--gold-line)); outline-offset: 2.5px; transition: outline-color .2s ease, outline-offset .2s ease; }
button.avatar:focus-visible { outline: 2px solid var(--accent-ring); outline-offset: 3px; }
@media (hover: hover) { button.avatar:hover { outline-color: var(--avatar-ring-hover, var(--gold)); outline-offset: 3.5px; } }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; opacity: 0; transition: opacity .2s; }
.avatar.has-photo { color: transparent; background: var(--surface-2); }
.avatar.has-photo img { opacity: 1; }
.avatar-l { width: 48px; height: 48px; font-size: 19px; }
.sync { display: flex; align-items: center; flex-wrap: wrap; gap: 0 6px; font: 500 13px/18px var(--font-sans); color: var(--ink-2); margin-top: 2px; }
.sync svg.i { width: 18px; height: 18px; color: var(--ok); }
.sync > span { flex: 1 1 0; min-width: 0; }
.sync.off, .sync.off svg.i { color: var(--warn); }
.sync[data-status="saving"] svg.i { color: var(--ink-2); }
.chev { color: var(--ink-3); width: 20px !important; height: 20px !important; }
.grow { flex: 1; min-width: 0; }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid var(--line-strong); border-top-color: var(--accent); animation: spin .8s linear infinite; display: inline-block; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }

.sw { width: var(--chip); height: var(--chip); border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--c); color: var(--ci); font: 600 17px/1 var(--font-chart); box-shadow: inset 0 0 0 1px var(--swatch-ring); }
.sw.sw-bead { background: radial-gradient(circle at 30% 28%, rgba(255, 255, 255, 0.7) 0 8%, transparent 10%), var(--c); box-shadow: inset 0 0 0 3px rgba(0, 0, 0, 0.3), inset 0 0 0 1px var(--swatch-ring); }
.sw.sw-line { background: linear-gradient(135deg, transparent calc(50% - 1.5px), var(--ci) calc(50% - 1.5px) calc(50% + 1.5px), transparent calc(50% + 1.5px)) center / 58% 58% no-repeat, var(--c); }
.sw.sw-knot { background: radial-gradient(circle, var(--ci) 0 16%, transparent 18%), var(--c); }
.sw:has(> .sw-n) { position: relative; }
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-m); background: var(--surface-2); font-size: 14px; line-height: 1.45; text-align: left; }
.notice svg.i { width: 20px; height: 20px; color: var(--ink-2); margin-top: 1px; }
.notice img.notice-ic { width: 28px; height: 28px; flex: none; margin-top: -2px; }
.notice b { display: block; font-weight: 600; color: var(--ink); }
.notice span { color: var(--ink-2); }
.notice.warn { background: var(--warn-tint); }
.notice.warn svg.i { color: var(--warn); }

.handle { display: block; width: 36px; height: 4px; border-radius: 99px; background: var(--line-strong); margin: 8px auto 4px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; }
.sheet-head h2 { font: 600 22px/28px var(--font-serif); min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.x-btn { width: 40px; height: 40px; background: var(--surface-sunk); color: var(--ink-2); }
.x-btn svg.i { width: 20px; height: 20px; }
@media (hover: hover) { .x-btn:not(:disabled):hover { background: var(--accent-tint); color: var(--ink); } }
.sheet-head .x-btn { margin-right: -6px; }
.sheet:focus-visible, .set-panel:focus-visible, .pop:focus-visible { outline: none; }
.count { font: 500 15px/1 var(--font-sans); color: var(--ink-2); margin-left: 6px; }
.scrim { background: var(--overlay); }
.sheet-root { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.sheet-root > .scrim { position: absolute; inset: 0; opacity: 0; transition: opacity .18s; }
.sheet-root.open > .scrim { opacity: 1; }
.sheet-root.closing { pointer-events: none; }
.sheet-root > .sheet { position: relative; width: 100%; max-height: calc(100% - 24px - env(safe-area-inset-top)); overflow-y: auto; overscroll-behavior: contain; background: var(--surface); border-radius: var(--r-xl) var(--r-xl) 0 0; box-shadow: var(--shadow-up), 0 -1px 0 var(--line); padding: 14px 20px calc(24px + env(safe-area-inset-bottom)); transform: translateY(32px); opacity: 0; transition: transform .2s ease, opacity .18s; }
.sheet-root.open > .sheet { transform: none; opacity: 1; }
.sheet-root > .sheet > .handle { position: absolute; top: 0; left: 0; right: 0; width: auto; height: 28px; margin: 0; background: none; border-radius: var(--r-xl) var(--r-xl) 0 0; }
.sheet-root > .sheet > .handle::before { content: ""; display: block; width: 36px; height: 4px; margin: 6px auto 0; border-radius: 99px; background: var(--line-strong); }
.sheet-root > .sheet > .sheet-head { position: relative; z-index: 1; min-height: 40px; margin-bottom: 8px; }
.sheet-body { display: flex; flex-direction: column; }
@media (min-width: 600px) {
  .sheet-root { align-items: center; padding: 24px; }
  .sheet-root > .sheet { max-width: 460px; border-radius: var(--r-xl); padding: 14px 24px 24px; box-shadow: var(--shadow-2); }
  .sheet-root > .sheet > .handle { display: none; }
  .sheet-head .x-btn { margin-right: -10px; }
}
@media (max-width: 599px) {
  .sheet > .handle, .sheet > .sheet-head { touch-action: none; }
  .sheet-root > .sheet > .sheet-head { position: sticky; top: -14px; margin: 0 -20px 8px; padding: 0 20px; background: var(--surface); border-radius: var(--r-xl) var(--r-xl) 0 0; }
}
.sheet-ok .sheet-head h2 { display: flex; align-items: center; gap: 12px; }
.res-ok { width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; flex: none; }
.res-ok svg.i { width: 20px; height: 20px; stroke-width: 2.2; }
.res-card { display: flex; align-items: center; gap: 18px; padding: 16px; }
.res-card canvas.hoop { width: 64px; height: 64px; margin: 4px; }
.res-card b { display: block; font: 600 19px/24px var(--font-serif); }
.res-card span { display: block; font-size: 13px; color: var(--ink-2); margin-top: 2px; overflow-wrap: anywhere; }
.sheet-result .notice { margin-top: 12px; }
.sheet-result .btn-primary { margin-top: 20px; }
.sheet-result .btn-ghost { margin-top: 6px; }
.sheet-delacct .del-ck { margin-top: 14px; padding: 10px 0; border-top: 0; color: var(--ink); }
.sheet-delacct .btn-danger { margin-top: 14px; }
.sheet-fail .notice { margin-top: 4px; }
.pdf-card { padding: 12px 12px 14px; }
.pdf-prev { display: block; width: 100%; height: 200px; border-radius: var(--r-m); }
.pdf-about { padding: 10px 4px 0; }
.pdf-about b { display: block; font: 600 19px/24px var(--font-serif); overflow-wrap: anywhere; }
.pdf-about span { display: block; font-size: 13px; color: var(--ink-2); margin-top: 2px; }
.pdf-key { font: 600 15px/20px var(--font-sans); margin: 20px 2px 8px; }
.pdf-list .pdf-row { gap: 10px; padding: 8px 12px; }
.pdf-row .sw { --chip: 32px; font-size: 15px; }
.pdf-brand { flex: none; font-size: 13px; color: var(--ink-2); }
.pdf-row .pdf-code { flex: none; width: 92px; height: 40px; margin: 0; padding: 0 10px; }
.pdf-name { flex: 1 1 auto; min-width: 0; font-size: 14px; line-height: 1.3; overflow-wrap: anywhere; }
.pdf-unknown .pdf-name { color: var(--ink-2); }
.pdf-row { cursor: pointer; }
.pdf-info { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.pdf-info .pdf-name { flex: none; }
.pdf-n { font-size: 12px; line-height: 16px; color: var(--ink-2); }
.pdf-row .pdf-more { width: 28px; height: 40px; margin: 0 -8px 0 -6px; color: var(--ink-2); }
.pdf-row .pdf-more svg.i { width: 18px; height: 18px; }
.pdf-unknown .pdf-code { border-color: var(--warn); }
.pdf-odd .pdf-name { color: var(--warn); }
.pdf-odd .pdf-code { border-color: var(--warn); }
.ke-conv { margin-top: 12px; }
.ke-conv-tx { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; min-width: 0; }
.sheet-result .ke-conv .btn { margin-top: 0; }
.ke-sizebox .ke-brands { margin-bottom: 12px; }
.ke-sizebox .ke-chip[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); box-shadow: none; }
.ke-sum { margin: 14px 2px 0; font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.ke-sum.warn { color: var(--warn); font-weight: 600; }
.ke-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.sheet-result .ke-tools .btn { margin-top: 0; }
.ke-tools .ke-revert { padding: 0 12px; }
.sheet-keyedit .ke-save { margin-top: 20px; }
@media (max-height: 560px) { .sheet-pdf .pdf-prev { height: 120px; } }
.ke-head { display: flex; align-items: center; gap: 14px; margin: 2px 0 14px; }
.ke-head .ke-sw, .ke-pair .ke-sw { --chip: 56px; font-size: 26px; }
.ke-headtx { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ke-thr { font: 600 19px/24px var(--font-serif); overflow-wrap: anywhere; }
.ke-sub { font-size: 13px; color: var(--ink-2); }
.ke-label { display: block; margin: 0 2px 6px; font-size: 14px; font-weight: 600; color: var(--ink); }
.ke-brands { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.ke-chip { height: 36px; padding: 0 14px; border-radius: var(--r-pill); box-shadow: inset 0 0 0 1px var(--line-strong); color: var(--ink); font: 500 14px/1 var(--font-sans); white-space: nowrap; }
.ke-chip[aria-checked="true"] { background: var(--accent); color: var(--on-accent); box-shadow: none; }
.sheet-keythr .field { margin-bottom: 8px; }
.ke-second { margin-top: 6px; }
.ke-add2 { align-self: flex-start; margin: 0 0 4px -4px; }
.ke-name { margin: 2px 2px 12px; min-height: 20px; font-size: 14px; line-height: 1.4; color: var(--ink); overflow-wrap: anywhere; }
.ke-name.muted { color: var(--ink-2); }
.ke-near { margin: 4px 0 12px; }
.ke-near .ke-hint { margin: 0 2px 8px; }
.ke-nears { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; }
.ke-nearbtn { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; padding: 6px 2px; border-radius: var(--r-m); color: var(--ink); }
.ke-nearbtn .sw { --chip: 36px; }
.ke-nearbtn small { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 500 12px/14px var(--font-sans); }
.ke-nearbtn[aria-pressed="true"] { background: var(--accent-tint); box-shadow: inset 0 0 0 2px var(--accent-ring); }
.ke-acts { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.ke-hint { margin: 6px 2px 0; font-size: 13px; line-height: 1.45; color: var(--ink-2); }
.sheet-keythr .ke-done { margin-top: 18px; }
.sheet-keythr .ke-next { margin-top: 6px; }
.sheet-keypick .ke-hint { margin: 0 2px 12px; }
.ke-pair { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 4px 0 14px; color: var(--ink-2); }
@media (hover: hover) {
  .ke-chip:not([aria-checked="true"]):not([aria-pressed="true"]):hover, .ke-nearbtn:not([aria-pressed="true"]):hover, .ce-tool:not([aria-checked="true"]):hover, .ce-brush:hover { background: var(--accent-tint); }
}
.sheet-root > .sheet.sheet-cells { display: flex; flex-direction: column; height: calc(100% - 24px - env(safe-area-inset-top)); overflow: hidden; }
.sheet-cells .sheet-body { flex: 1 1 auto; min-height: 0; }
.ce-tools { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; padding: 3px; border-radius: var(--r-l); background: var(--surface-sunk); }
.ce-tool { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-width: 0; height: 50px; padding: 0 2px; border-radius: calc(var(--r-l) - 3px); color: var(--ink-2); font: 600 12px/14px var(--font-sans); }
.ce-tool span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ce-tool svg.i { width: 20px; height: 20px; }
.ce-tool[aria-checked="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }
.ce-tool[aria-checked="true"] svg.i { color: var(--accent-ink); }
.ce-row { display: flex; align-items: center; gap: 8px; min-height: 44px; margin: 8px 0; }
.ce-row .grow { flex: 1 1 auto; }
.ce-brush { display: inline-flex; align-items: center; gap: 8px; min-width: 0; height: 40px; padding: 0 14px 0 4px; border-radius: var(--r-pill); box-shadow: inset 0 0 0 1px var(--line-strong); color: var(--ink); font: 500 14px/1 var(--font-sans); }
.ce-brush .sw { --chip: 32px; font-size: 15px; }
.ce-brush span:not(.sw) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ce-undo { flex: none; }
.ce-wrap { position: relative; flex: 1 1 auto; min-height: 160px; border-radius: var(--r-m); overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); }
.ce-cv { display: block; width: 100%; height: 100%; touch-action: none; cursor: crosshair; }
.ce-cv[data-tool="cell"], .ce-cv[data-tool="rows"] { cursor: pointer; }
.ce-zoom { position: absolute; right: 8px; bottom: 8px; display: flex; gap: 6px; }
.ce-zoom .icon-btn { width: 40px; height: 40px; }
.ce-hint { margin: 8px 2px 0; min-height: 18px; font-size: 13px; line-height: 1.4; color: var(--ink-2); }
.sheet-cells .ce-done { flex: none; margin-top: 10px; }
.ce-empty { background: var(--chart-fabric, var(--bg)); box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.ce-pick.on { background: var(--accent-tint); }
.sheet-cellpick .pdf-key { margin-top: 16px; }
.sheet-cellpick .ke-hint { margin: 0 2px 10px; }
.sheet-cellpick #ce-newadd { margin-top: 0; }
.sheet-cellarea #ce-areaok { margin-top: 18px; }
@media (min-width: 600px) {
  .sheet-root > .sheet.sheet-cells { max-width: 880px; height: min(calc(100% - 48px), 920px); }
}
@media (min-width: 600px) and (max-height: 560px) {
  .sheet-root:has(> .sheet-cells) { padding: 8px; }
  .sheet-root > .sheet.sheet-cells { max-width: none; height: 100%; padding: 8px 16px 12px; }
  .sheet-cells .sheet-body { display: grid; grid-template-columns: minmax(0, 1fr) 236px; grid-template-rows: auto auto minmax(0, 1fr) auto; column-gap: 14px; }
  .sheet-cells .ce-wrap { grid-column: 1; grid-row: 1 / -1; min-height: 0; }
  .sheet-cells .ce-bar, .sheet-cells .ce-row, .sheet-cells .ce-hint, .sheet-cells .ce-done { grid-column: 2; }
  .sheet-cells .ce-tools { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sheet-cells .ce-tools:has(> :nth-child(5)) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sheet-cells .ce-tool { height: 46px; }
  .sheet-cells .ce-row { margin: 6px 0 0; flex-wrap: wrap; gap: 6px; }
  .sheet-cells .ce-hint { overflow: hidden; margin-top: 6px; }
  .sheet-cells .ce-done { margin-top: 6px; }
}
.sheet-ios .notice { margin-top: 12px; }
.sheet-ios .btn-primary { margin-top: 18px; }
.menu { display: flex; flex-direction: column; padding-bottom: 4px; }
.menu-it { display: flex; align-items: center; gap: 14px; min-height: 52px; padding: 0 8px; border-radius: var(--r-m); font: 500 16px/20px var(--font-sans); }
.menu-it svg.i { color: var(--ink-2); }
.menu-it.danger, .menu-it.danger svg.i { color: var(--danger); }
.menu-it.on svg.i { color: var(--accent); fill: currentColor; }
.menu-it.support svg.i { color: var(--accent-ink); fill: currentColor; }
.menu-it.support span { font-weight: 600; }
a.menu-it { text-decoration: none; color: inherit; }
@media (hover: hover) { .menu-it:hover { background: var(--accent-tint); } }
.menu-sep { height: 1px; background: var(--line-soft); margin: 4px 8px; flex: none; }
.menu-ver { display: flex; padding: 8px 4px; break-inside: avoid; }
.ver-pill { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 16px 0 12px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); font: 600 14px/18px var(--font-sans); box-shadow: inset 0 0 0 1px var(--line-soft); }
.ver-pill svg.i { width: 18px; height: 18px; color: currentColor; flex: none; }
.menu-ver { align-items: center; gap: 10px; }
.ver-reset { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--surface-2); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line-soft); }
.ver-reset svg.i { width: 18px; height: 18px; }
.sheet-menu .ver-reset { width: 44px; height: 44px; }
@media (hover: hover) { .ver-reset:hover { color: var(--ink); } }
.ver-tx { display: grid; }
.ver-tx > * { grid-area: 1 / 1; white-space: nowrap; }
.ver-alt { visibility: hidden; }
.ver-pill[aria-disabled="true"] { cursor: default; }
.ver-pill.on { background: var(--accent); color: var(--on-accent); box-shadow: none; }
@media (hover: hover) { .ver-pill.on:hover { filter: brightness(1.06); } }
.pop .menu-ver { padding: 6px 6px; }
.sheet-menu .ver-pill { min-height: 44px; }
.sheet-menu .menu-ver { padding: 4px; }
@media (min-width: 480px) and (max-height: 560px) {
  .sheet-root > .sheet.sheet-menu { max-width: 600px; }
  .sheet-menu .menu { display: block; columns: 2; column-gap: 16px; padding-bottom: 0; }
  .sheet-menu .menu-it { width: 100%; min-height: 44px; break-inside: avoid; }
  .sheet-menu .menu-sep { margin: 0 8px; break-inside: avoid; }
  .sheet-menu .menu-ver { padding: 6px 4px; }
}
@media (min-width: 600px) and (max-height: 560px) {
  .sheet-root:has(> .sheet-menu) { padding-top: 8px; padding-bottom: 8px; }
  .sheet-root > .sheet.sheet-menu { max-height: 100%; padding-bottom: 12px; }
}
.pop-root { position: fixed; inset: 0; z-index: 55; }
.pop-root.closing { pointer-events: none; }
.pop { position: fixed; min-width: 236px; max-width: min(320px, calc(100vw - 16px)); padding: 6px; background: var(--surface); border-radius: var(--r-l); box-shadow: var(--shadow-2), 0 0 0 1px var(--line); opacity: 0; transform: scale(.97); transition: opacity .14s ease, transform .14s ease; }
.pop-root.open .pop { opacity: 1; transform: none; }
.pop .menu { padding: 0; }
.pop .menu-it { min-height: 40px; padding: 0 14px 0 10px; gap: 12px; font-size: 15px; }
.pop .menu-it svg.i { width: 20px; height: 20px; }
.pop .menu-sep { margin: 5px 6px; }
.field { width: 100%; height: 52px; border-radius: var(--r-m); border: 1px solid var(--line-strong); background: var(--bg); color: var(--ink); font: 400 16px/1 var(--font-sans); padding: 0 14px; margin: 4px 0 16px; }
.field:focus { outline: 2px solid var(--accent-ring); outline-offset: 1px; }
.about { padding: 4px 16px; }
.about-row { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; font-size: 15px; }
.about-row:not([hidden]) ~ .about-row { border-top: 1px solid var(--line-soft); }
.about-row span { color: var(--ink-2); }
.about-row b { font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.about-note { font-size: 13px; color: var(--ink-2); margin-top: 12px; }
.about-code { font-size: 11.5px; letter-spacing: .02em; white-space: nowrap; }
.sheet-about .notice { margin-top: 12px; }
.about-restart { margin-top: 14px; }

.sheet-root.clear > .scrim { background: transparent; }
.sheet-root.clear > .sheet { max-height: min(74%, 640px); }
@media (min-width: 600px) {
  .sheet-root.clear { align-items: flex-end; justify-content: flex-end; padding: 16px; }
  .sheet-root.clear > .sheet { max-width: 400px; max-height: calc(100% - 32px); box-shadow: var(--shadow-2), 0 0 0 1px var(--line); }
}
.pop-panel { width: 368px; max-width: calc(100vw - 16px); max-height: calc(100vh - 96px); overflow-y: auto; overscroll-behavior: contain; padding: 14px 16px 18px; }
.pop-panel .sheet-head { min-height: 40px; margin-bottom: 4px; }
.pop-panel .sheet-head h2 { font-size: 20px; line-height: 26px; }
.pop-panel .sheet-head .x-btn { margin-right: -2px; }
.vw-h { font: 600 13px/18px var(--font-sans); color: var(--ink-2); margin: 18px 4px 8px; }
.vw-card { overflow: hidden; }
.vw-l { flex: 1; min-width: 0; font: 500 15px/20px var(--font-sans); }
.vw-later { font-size: 12px; line-height: 16px; color: var(--ink-3); white-space: nowrap; }
.fabs { display: grid; grid-template-columns: repeat(auto-fill, minmax(66px, 1fr)); gap: 4px; }
.fab { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 2px 6px; border-radius: var(--r-m); cursor: pointer; text-align: center; }
.fab-sw { width: 36px; height: 36px; border-radius: 50%; background: var(--fc, var(--chart-fabric)); box-shadow: inset 0 0 0 1px var(--swatch-ring); }
.fab-theme { background: linear-gradient(135deg, var(--chart-fabric) 0 50%, var(--chart-surround) 50% 100%); }
.fab-own { background: conic-gradient(from 45deg, #E6C7BF, #E7DCB4, #C7DBC2, #C1D4E1, #D7C9E1, #E6C7BF); }
.fab-own.set { background: var(--fc); }
.fab-name { font: 500 12px/15px var(--font-sans); color: var(--ink-2); max-width: 74px; }
.fab.on .fab-sw { box-shadow: inset 0 0 0 1px var(--swatch-ring), 0 0 0 2px var(--surface), 0 0 0 4px var(--accent-ring); }
.fab.on .fab-name { color: var(--ink); }
@media (hover: hover) { .fab:hover { background: var(--accent-tint); } }
.vw-d { display: block; font-size: 13px; line-height: 18px; color: var(--ink-2); }
.ss-card { display: flex; flex-direction: column; gap: 8px; padding: 16px 16px 12px; }
.sss { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ss { display: flex; flex-direction: column; align-items: stretch; gap: 6px; min-width: 0; padding: 6px; border-radius: var(--r-m); text-align: center; cursor: pointer; }
.ss-pv { --ss-r: calc(var(--r-m) - 6px); display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1px; padding: 1px; border-radius: var(--ss-r); overflow: hidden; background: var(--chart-grid10); box-shadow: inset 0 0 0 1px var(--swatch-ring); }
.ss-pv i { display: grid; place-items: center; aspect-ratio: 1; min-width: 0; overflow: hidden; background: var(--chart-fabric); color: var(--ink); font: 600 15px/1 var(--font-chart); font-style: normal; }
.ss-pv i:first-child { border-top-left-radius: calc(var(--ss-r) - 1px); }
.ss-pv i:nth-child(5) { border-top-right-radius: calc(var(--ss-r) - 1px); }
.ss-pv i:nth-last-child(5) { border-bottom-left-radius: calc(var(--ss-r) - 1px); }
.ss-pv i:last-child { border-bottom-right-radius: calc(var(--ss-r) - 1px); }
.ss-pv .sg { display: block; width: 100%; height: 100%; }
.ss-n { font: 500 12px/15px var(--font-sans); color: var(--ink-2); overflow-wrap: anywhere; }
.ss[aria-checked="true"] .ss-pv { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent-ring); }
.sheet-symedit .sheet-body { display: flex; flex-direction: column; gap: 10px; }
.se-head { display: flex; align-items: center; gap: 14px; }
.se-big .sw { --chip: 56px; font-size: 26px; }
.se-hd { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.se-code { font: 600 17px/1.25 var(--font-sans); color: var(--ink); }
.se-name, .se-src { font-size: 13px; line-height: 1.35; color: var(--ink-2); }
.se-hint { margin: 0 2px; font-size: 13px; line-height: 1.45; color: var(--ink-2); }
.se-err { color: var(--danger); }
.se-h { margin: 8px 2px 0; font: 600 13px/1.3 var(--font-sans); color: var(--ink-2); }
.se-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 6px; }
.se-it { aspect-ratio: 1; min-width: 0; display: grid; place-items: center; border-radius: calc(var(--r-m) - 6px); background: var(--chart-fabric); color: var(--ink); font: 600 18px/1 var(--font-chart); box-shadow: inset 0 0 0 1px var(--swatch-ring); overflow: hidden; }
.se-it .sg { display: block; width: 62%; height: 62%; }
.se-it.used { opacity: 0.5; }
.se-it[aria-pressed="true"] { opacity: 1; box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent-ring); }
.se-own { display: flex; gap: 8px; align-items: center; }
.se-own .field { margin: 0; flex: 1; min-width: 0; font: 600 18px/1 var(--font-chart); }
.se-foot { display: flex; padding-top: 4px; }
.so-line { display: flex; align-items: center; gap: 12px; padding-top: 10px; margin-top: 2px; border-top: 1px solid var(--line-soft); }
.so-line .grow { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sheet-symorg .sheet-body { display: flex; flex-direction: column; gap: 10px; }
.so-row { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 8px 0 14px; }
.so-sym { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: calc(var(--r-m) - 8px); background: var(--chart-fabric); color: var(--ink); font: 600 17px/1 var(--font-chart); box-shadow: inset 0 0 0 1px var(--swatch-ring); }
.so-sym .sg { display: block; width: 64%; height: 64%; }
.so-l { font: 500 15px/1.3 var(--font-sans); color: var(--ink); }
.so-del span { font: 400 24px/1 var(--font-sans); color: var(--ink-2); }
.ss[aria-checked="true"] .ss-n { color: var(--ink); }
.ss:focus-visible { outline: 2px solid var(--accent-ring); outline-offset: 1px; }
.ss-hint { padding: 0 4px; }
.sw .sg, #thr-print .thp-sw .sg { display: block; width: 1.15em; height: 1.15em; }
.vw-rv { display: flex; align-items: center; gap: 12px; flex: none; }
.vw-rv .set-v { min-width: 3em; text-align: right; }
.vw-reset-s { margin: 0; font-size: 13px; line-height: 18px; text-decoration: none; }
.vw-reset-s[hidden] { display: none; }
.vw-mk { display: flex; flex-direction: column; gap: 10px; padding: 12px 12px 12px; }
.vw-mk > .vw-l, .vw-mk > .vw-d { padding: 0 4px; }
.vw-h[hidden] { display: none; }
.switch[aria-disabled="true"] { opacity: .45; cursor: default; }
@media (max-width: 599px) {
  .sheet-root.clear > .sheet.sheet-view { max-height: calc(100% - 24px - env(safe-area-inset-top)); transition: transform .2s ease, opacity .18s, max-height .22s ease; }
  .sheet-root.clear > .sheet.sheet-view.vw-half { max-height: 50%; }
}
@media (min-width: 600px) {
  [data-hand="left"] .sheet-root.clear:has(> .sheet-view, > .cp-fabric) { justify-content: flex-start; }
}

.pop-panel.sheet-cp { width: 352px; }
.sw-win .sw-rows { overflow: hidden; }
.sw-foot { display: flex; justify-content: center; padding: 12px 4px 2px; }
.sw-more { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; }
.sw-more .i { width: 18px; height: 18px; flex: none; }
.sheet-root.clear > .sheet.sheet-cp { max-height: min(88%, 720px); }
.cp-pvbox { border-radius: var(--r-m); overflow: hidden; background: var(--chart-surround); box-shadow: inset 0 0 0 1px var(--line); }
.cp-pv { display: block; width: 100%; height: 66px; }
.sheet-cp .vw-h { margin-top: 14px; }
.cp-presets { display: grid; grid-template-columns: repeat(auto-fill, minmax(60px, 1fr)); gap: 2px; }
.cp-presets .fab { padding: 5px 2px 3px; gap: 4px; }
.cp-presets .fab-sw { width: 30px; height: 30px; }
.cp-presets .fab[aria-checked="true"] .fab-sw { box-shadow: inset 0 0 0 1px var(--swatch-ring), 0 0 0 2px var(--surface), 0 0 0 4px var(--accent-ring); }
.cp-presets .fab[aria-checked="true"] .fab-name { color: var(--ink); }
.cp-hint { margin: 10px 4px 0; font-size: 13px; line-height: 18px; color: var(--ink-2); }
.cp-strips { display: flex; flex-direction: column; gap: 4px; margin-top: 14px; }
.cp-l { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 0 4px; font: 500 14px/20px var(--font-sans); }
.cp-l .set-v { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.cp-l .set-v::before { content: none; }
.cp-strip { position: relative; height: 44px; border-radius: 22px; touch-action: none; cursor: pointer; outline: none; }
.cp-fill { position: absolute; left: 2px; right: 2px; top: 50%; height: 24px; margin-top: -12px; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--swatch-ring); }
.cp-thumb { position: absolute; top: 50%; width: 28px; height: 28px; margin: -14px 0 0 -14px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 3px var(--surface), 0 0 0 4px var(--line-strong), 0 2px 6px rgba(0, 0, 0, 0.18); pointer-events: none; transition: transform .12s ease; }
.cp-strip.drag .cp-thumb { transform: scale(1.12); }
.cp-strip:focus-visible .cp-thumb { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--accent-ring), 0 2px 6px rgba(0, 0, 0, 0.18); }
.cp-pvbox { position: relative; }
.cp-pv-ov { position: absolute; inset: 0; height: 100%; }
.cp-cue .cp-pv { height: 104px; }
.cp-dots { grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); }
.cp-dots .fab { padding: 4px 0; }
.cp-dots .fab-sw { width: 30px; height: 30px; }
.cp-alpha { margin-top: 2px; }
.cue-btn { flex: none; display: grid; place-items: center; width: 44px; height: 44px; margin: -4px -6px -4px 0; border-radius: 50%; cursor: pointer; }
.cue-sw { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(var(--cc, var(--chart-cursor)), var(--cc, var(--chart-cursor))), var(--chart-fabric); box-shadow: inset 0 0 0 1px var(--swatch-ring); }
.dim-sw { background: linear-gradient(135deg, var(--dl, #FFFFFF) calc(50% - 0.5px), var(--dd, #262626) calc(50% + 0.5px)); }
@media (hover: hover) { .cue-btn:hover { background: var(--accent-tint); } }
@media (min-width: 600px) and (max-height: 520px) {
  .sheet-root.clear > .sheet.sheet-cp.cp-fabric { max-width: 660px; max-height: 100%; }
  .pop-panel.sheet-cp.cp-fabric { width: 660px; }
  .cp-fabric .sheet-body { display: grid; grid-template-columns: minmax(0, 312px) minmax(0, 1fr); grid-template-rows: auto auto auto 1fr; column-gap: 24px; }
  .cp-fabric :is(.cp-pvbox, .vw-h, .cp-presets) { grid-column: 1; }
  .cp-fabric .cp-pv { height: 48px; }
  .cp-fabric .vw-h { margin-top: 10px; }
  .cp-fabric .cp-strips { grid-column: 2; grid-row: 1 / 5; margin-top: 0; }
}

.tip { position: fixed; z-index: 90; max-width: min(280px, calc(100vw - 12px)); padding: 6px 10px; border-radius: 9px; background: var(--ink); color: var(--bg);
  font: 500 13px/17px var(--font-sans); box-shadow: var(--shadow-2); pointer-events: none; opacity: 0; transform: translateY(3px); transition: opacity .12s, transform .12s; }
.tip.below { transform: translateY(-3px); }
.tip.on { opacity: 1; transform: none; }
.tip.measure { visibility: hidden; transition: none; }
@media (prefers-reduced-motion: reduce) { .tip { transition: none; } }
@media (pointer: coarse) { .tip { padding: 8px 12px; font-size: 15px; line-height: 20px; } }
.toast { position: fixed; left: var(--toast-x, 50%); top: var(--toast-top, calc(env(safe-area-inset-top) + 8px)); z-index: 80; display: flex; align-items: center; gap: 10px; width: max-content; min-height: 52px; max-width: min(560px, var(--toast-w, calc(100vw - 24px))); padding: 6px 6px 6px 16px; border-radius: var(--r-l); background: var(--ink); color: var(--bg); font: 500 14px/19px var(--font-sans); box-shadow: var(--shadow-2); opacity: 0; transform: translate(calc(-50% + var(--tx, 0px)), var(--ty, 0px)) scale(.96); transition: opacity .18s, transform .18s; touch-action: none; -webkit-user-select: none; user-select: none; }
.toast.show { opacity: 1; transform: translate(calc(-50% + var(--tx, 0px)), var(--ty, 0px)) scale(var(--ts, 1)); }
.toast.drag { transition: none; }
.toast.under { visibility: hidden; }
.toast > svg.i { flex: none; width: 20px; height: 20px; }
.toast > img { flex: none; width: 24px; height: 24px; }
.toast-text { flex: 1 1 auto; min-width: 0; padding: 6px 0; overflow-wrap: anywhere; }
.toast-btn { flex: none; height: 40px; padding: 0 14px; border-radius: var(--r-pill); background: color-mix(in srgb, var(--bg) 16%, transparent); color: var(--bg); font: 600 14px/19px var(--font-sans); white-space: nowrap; }
.toast-x { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border-radius: var(--r-pill); color: var(--bg); opacity: .78; }
.toast-x svg.i { width: 20px; height: 20px; }
.toast-btn + .toast-x { margin-left: -4px; }
.toast-later { background: transparent; }
.toast-btn + .toast-later { margin-left: -6px; }
#st-more.has-dot { position: relative; --dot-ring: var(--bar, var(--bg)); }
#st-more.has-dot::before { content: ""; position: absolute; top: 8px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--dot-ring); pointer-events: none; }
button.avatar.has-dot { overflow: visible; --dot-ring: var(--bg); }
button.avatar.has-dot::before { content: ""; position: absolute; z-index: 1; top: -2px; right: -2px; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--dot-ring); pointer-events: none; }
.has-dot.dot-pulse::before { animation: dot-pulse .75s ease-out 2; }
@keyframes dot-pulse {
  from { box-shadow: 0 0 0 2px var(--dot-ring), 0 0 0 2px color-mix(in srgb, var(--accent) 70%, transparent); }
  to { box-shadow: 0 0 0 2px var(--dot-ring), 0 0 0 14px color-mix(in srgb, var(--accent) 0%, transparent); }
}
@media (prefers-reduced-motion: reduce) { .has-dot.dot-pulse::before { animation: none; } }
.menu-it.dot span::after { content: ""; display: inline-block; width: 8px; height: 8px; margin-left: 8px; border-radius: 50%; background: var(--accent); vertical-align: 2px; }
.menu-who { display: flex; align-items: center; gap: 12px; padding: 4px 8px 12px; min-width: 0; }
.pop .menu-who { padding: 8px 10px 12px; }
.menu-who .avatar { outline: none; }
.menu-who > div { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.menu-who b { font: 600 15px/1.3 var(--font-sans); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-who > div > span { font-size: 13px; line-height: 1.3; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (hover: hover) {
  .toast-btn:hover { background: color-mix(in srgb, var(--bg) 26%, transparent); }
  .toast-x:hover { opacity: 1; background: color-mix(in srgb, var(--bg) 14%, transparent); }
}
@media (prefers-reduced-motion: reduce) { .toast { transition: opacity .18s; } }

#login { overflow-y: auto; }
.login { min-height: 100%; max-width: 440px; margin: 0 auto; padding: calc(10px + env(safe-area-inset-top)) 28px calc(28px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; align-items: center; text-align: center; }
.login-top { align-self: stretch; display: flex; align-items: center; justify-content: flex-end; gap: 8px; min-height: 44px; }
.login-top #login-close { margin-right: auto; }
.pill { display: inline-flex; align-items: center; justify-content: center; height: 36px; min-width: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--bg); color: var(--ink-2); font: 600 13px/1 var(--font-sans); letter-spacing: .06em; text-decoration: none; outline: 1px solid transparent; outline-offset: 5px; transition: color .2s, border-color .2s, outline-color .25s, outline-offset .25s; }
.pill:hover { color: var(--ink); outline-color: var(--gold-line); outline-offset: 3px; }
.pill:focus-visible { outline: 2px solid var(--accent-ring); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .pill { transition: none; } }
.login-main { width: 100%; display: flex; flex-direction: column; align-items: center; }
.login-brand { margin-top: 22px; display: flex; align-items: center; justify-content: center; gap: 10px; font: 600 21px/1 var(--font-serif); letter-spacing: -0.01em; }
.login-brand img { width: 36px; height: 36px; flex: none; border-radius: 9px; }
.login-eye { margin-top: 34px; font: 600 12.5px/1.4 var(--font-sans); letter-spacing: .2em; text-transform: uppercase; color: var(--gold); }
.login-title { margin-top: 12px; font: 500 clamp(32px, 9vw, 40px)/1.08 var(--font-serif); letter-spacing: -0.02em; text-wrap: balance; }
.login-title em { font-style: normal; color: var(--gold); }
.login-lead { margin-top: 14px; max-width: 330px; font-size: 16.5px; line-height: 1.5; color: var(--ink-2); }
.login-points { list-style: none; padding: 22px 0 0; margin-top: 26px; border-top: 1px solid var(--line); width: 100%; display: flex; flex-direction: column; gap: 14px; text-align: left; }
.login-points li { display: flex; align-items: center; gap: 12px; font-size: 15px; line-height: 1.4; }
.login-points svg.i { width: 22px; height: 22px; flex: none; color: var(--gold); }
#login:not([hidden]) .rise { animation: login-rise .6s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i, 0) * 70ms + 40ms); }
@keyframes login-rise { from { opacity: 0; transform: translateY(10px); } }
.login-act { margin-top: auto; padding-top: 28px; width: 100%; display: flex; flex-direction: column; align-items: center; }
.login-msg { width: 100%; margin-bottom: 14px; }
.login-msg > div { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.login-msg-btn { height: 36px; }
.login-inst { width: 100%; margin-bottom: 14px; }
.login-inst-btn { height: 52px; font-size: 16px; outline: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 3px; transition: outline-color .25s ease, outline-offset .25s ease, filter .2s ease; }
.login-inst-btn:hover { outline-color: var(--accent); outline-offset: 5px; }
.login-inst-btn:active { outline-offset: 1px; filter: brightness(.95); }
.login-have { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: var(--r-m); background: var(--surface-2); font-size: 14px; line-height: 1.45; text-align: left; color: var(--ink-2); }
.login-have svg.i { width: 20px; height: 20px; flex: none; margin-top: 1px; color: var(--ok); }
.login-inst[data-kind="none"] .login-have svg.i { color: var(--ink-2); }
.gbtn { width: 100%; height: 52px; border-radius: var(--r-pill); background: var(--google-bg); color: var(--google-ink); box-shadow: inset 0 0 0 1px var(--google-line); display: flex; align-items: center; justify-content: center; gap: 12px; font: 500 16px/1 var(--font-google); text-decoration: none; outline: 1px solid transparent; outline-offset: 6px; transition: outline-color .25s ease, outline-offset .25s ease, filter .2s ease; }
.gbtn.is-main { outline-color: var(--gold-line); outline-offset: 4px; }
.gbtn:hover { outline-color: var(--gold); outline-offset: 4px; }
.gbtn:active { outline-offset: 2px; filter: brightness(.96); }
.gbtn:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.gbtn svg { width: 20px; height: 20px; flex: none; }
.gbtn[aria-disabled="true"] { opacity: .62; pointer-events: none; }
.gbtn.busy { cursor: progress; }
.login-fine { margin-top: 14px; font-size: 13px; line-height: 1.45; color: var(--ink-2); max-width: 310px; }
.login-legal { margin-top: 8px; font-size: 13px; color: var(--ink-2); }
.login-legal a { color: var(--ink-2); text-decoration: none; border-bottom: 1px solid var(--line-strong); padding-bottom: 1px; }
.login-legal a:hover, .login-legal a:focus-visible { color: var(--ink); border-bottom-color: var(--accent); }
@media (pointer: coarse) {
  .login-legal a { display: inline-block; }
  .login-legal a, .login-top .pill { position: relative; }
  .login-legal a::after, .login-top .pill::after { content: ""; position: absolute; inset: min(0px, calc(50% - 22px)); }
  .login-top #login-lang::after { content: none; }
  .login-top #login-lang .pill-sel { inset: min(0px, calc(50% - 22px)); width: auto; height: auto; }
}
@media (min-width: 600px) and (min-height: 700px) {
  .login { justify-content: center; }
  .login-act { margin-top: 32px; }
}

.lib { --lib-w: 820px; --lib-pad: 20px; height: 100%; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; padding: calc(6px + env(safe-area-inset-top)) max(var(--lib-pad), calc((100% - var(--lib-w)) / 2 + var(--lib-pad))) calc(40px + env(safe-area-inset-bottom)); }
.lib-head { display: flex; align-items: center; gap: 4px; min-height: 66px; }
.lib-brand { display: inline-flex; align-items: center; gap: 10px; min-width: 0; padding: 4px 6px 4px 0; color: var(--ink); text-decoration: none; border-radius: var(--r-m); }
.lib-brand img { width: 30px; height: 30px; border-radius: 8px; flex: none; }
.lib-brand h1 { font: 600 22px/28px var(--font-serif); letter-spacing: -0.01em; white-space: nowrap; }
.lib-brand:focus-visible { outline: 2px solid var(--accent-ring); outline-offset: 2px; }
@media (max-width: 380px) { .lib-brand h1 { font-size: 20px; } }
.lib-nav { display: flex; align-items: center; gap: 8px; margin: 2px 0 4px; }
.lib-tabs button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 38px; padding: 0 16px; font-size: 15px; }
.lib-tabs svg.i { width: 18px; height: 18px; }
.lib-add { width: 40px; padding: 0; flex: none; }
.lib-add-top { display: none; }
.lib-tabs { flex: 0 1 auto; min-width: 0; }
.lib-add span { display: none; }
@media (max-width: 599px) {
  .lib-tabs { border-radius: 22px; }
  .lib-tabs button { flex-direction: column; gap: 3px; height: 54px; padding: 0 8px; border-radius: 18px; font-size: 13px; line-height: 16px; }
  .lib-tabs svg.i { width: 20px; height: 20px; flex: none; }
}
@media (max-width: 599px) {
  .lib-add-top { display: inline-flex; margin-right: 10px; }
  .lib-nav .lib-add, .lib-nav .grow { display: none; }
  .lib-tabs { flex: 1 1 auto; }
}
@media (max-width: 340px) { .lib-tabs button { padding: 0 4px; font-size: 12px; } .lib-nav { gap: 4px; } }
#lib-body { display: flow-root; }
.cont { margin-top: 12px; overflow: hidden; cursor: pointer; }
.cont-art { position: relative; }
.cont-cv { display: block; width: 100%; height: 124px; border-bottom: 1px solid var(--line-soft); background: var(--chart-fabric); }
.cont-body { padding: 14px 18px 16px; }
.eyebrow { font: 600 13px/16px var(--font-sans); color: var(--accent-ink); margin-bottom: 4px; }
.cont-body h2 { font: 600 22px/28px var(--font-serif); }
.meta { font-size: 14px; color: var(--ink-2); margin-top: 2px; }
.cont-body .prog { margin-top: 14px; }
.cont-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; gap: 12px; }
.pct { font-size: 15px; color: var(--ink-2); }
.pct b { color: var(--ink); font-weight: 600; }
.lib-sec { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; min-height: 40px; margin: 20px 2px 10px; }
.lib-sec h3 { font: 600 20px/26px var(--font-serif); white-space: nowrap; }
.lib-sec .n { color: var(--ink-2); font-size: 14px; white-space: nowrap; }
.sec-tools { margin-left: auto; display: flex; align-items: center; gap: 6px; flex: none; }
.sort { position: relative; display: flex; align-items: center; height: 36px; border-radius: var(--r-pill); color: var(--ink-2); flex: none; box-shadow: inset 0 0 0 1px var(--line-strong); }
.sort svg.i { position: absolute; left: 8px; width: 18px; height: 18px; pointer-events: none; }
.sort svg.i.chev { left: auto; right: 9px; width: 16px; height: 16px; }
.sort-tx { padding: 0 30px 0 32px; color: var(--ink); font: 500 14px/36px var(--font-sans); white-space: nowrap; pointer-events: none; }
.sort-sel { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; opacity: 0; appearance: none; -webkit-appearance: none; border: 0; border-radius: var(--r-pill); background: transparent; color: var(--ink); font: 500 14px/1 var(--font-sans); cursor: pointer; }
.sort:has(.sort-sel:focus-visible) { outline: 2px solid var(--accent-ring); outline-offset: 1px; }
@media (pointer: coarse) { .sort-sel { top: -4px; height: calc(100% + 8px); } }
.set-lang { margin-left: auto; min-width: 0; }
.set-lang .sort-tx { overflow: hidden; text-overflow: ellipsis; }
#login-lang { position: relative; gap: 6px; }
#login-lang svg.i { width: 16px; height: 16px; margin-left: -3px; pointer-events: none; }
.pill-tx { pointer-events: none; }
.pill-sel { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; opacity: 0; appearance: none; -webkit-appearance: none; border: 0; border-radius: 999px; background: transparent; color: var(--ink); font: 500 16px/1 var(--font-sans); cursor: pointer; }
#login-lang:has(.pill-sel:focus-visible) { outline: 2px solid var(--accent-ring); outline-offset: 2px; }
@media (hover: hover) { .sort:hover { background: var(--accent-tint); } }
.search { position: relative; margin-top: 12px; }
.search > svg.i { position: absolute; left: 14px; top: 13px; width: 20px; height: 20px; color: var(--ink-3); pointer-events: none; }
.search-in { width: 100%; height: 46px; border-radius: var(--r-pill); border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font: 400 16px/1 var(--font-sans); padding: 0 46px 0 44px; -webkit-appearance: none; appearance: none; }
.search-in::placeholder { color: var(--ink-3); }
.search-in::-webkit-search-cancel-button, .search-in::-webkit-search-decoration { -webkit-appearance: none; display: none; }
.search-in:focus { outline: 2px solid var(--accent-ring); outline-offset: 1px; }
.search-x { position: absolute; right: 4px; top: 4px; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: var(--ink-2); }
.search-x svg.i { width: 18px; height: 18px; }
.fchips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 12px -2px 0; padding: 2px;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 var(--fadeL, 0px), #000 calc(100% - var(--fadeR, 0px)), transparent 100%);
  mask-image: linear-gradient(to right, transparent 0, #000 var(--fadeL, 0px), #000 calc(100% - var(--fadeR, 0px)), transparent 100%); }
@media (pointer: coarse) { .fchips { margin: 8px -2px -4px; padding: 6px 2px; } }
.fchips::-webkit-scrollbar { display: none; }
.fchip { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 15px; border-radius: var(--r-pill); box-shadow: inset 0 0 0 1px var(--line-strong); font: 600 14px/1 var(--font-sans); color: var(--ink-2); white-space: nowrap; flex: none; }
.fchip svg.i { flex: none; width: 16px; height: 16px; }
.fchip[aria-pressed="true"] { background: var(--accent-tint); color: var(--accent-ink); box-shadow: inset 0 0 0 1px transparent; }
@media (hover: hover) { .fchip[aria-pressed="false"]:hover { background: var(--surface-2); color: var(--ink); } }
.plib-switch { margin-top: 12px; }
.tchips .fchip { height: 32px; padding: 0 12px; font-weight: 500; font-size: 13px; }
.tchips[hidden] { display: none; }
.plib-row { display: flex; align-items: center; gap: 4px; margin-top: 12px; }
.plib-opts { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; }
.plib-row[hidden] { display: none; }
.plib-lab { flex: none; font: 500 13px/16px var(--font-sans); color: var(--ink-2); }
.plib-row > .fchips { flex: 1; min-width: 0; margin: 0 -2px 0 0; padding: 2px 2px 2px 6px; }
@media (pointer: coarse) { .plib-row > .fchips { margin: -4px -2px -4px 0; padding-top: 6px; padding-bottom: 6px; } }
@media (hover: hover) and (pointer: fine) {
  .plib-row > .fchips { scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; padding-bottom: 6px; }
  .plib-row > .fchips::-webkit-scrollbar { display: block; height: 6px; }
  .plib-row > .fchips::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: var(--r-pill); }
}
.plib-row .fchip .n { font-weight: 500; opacity: .8; }
.fchip-fav { color: var(--accent-ink); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 50%, transparent); }
.fchip-fav svg.i { fill: currentColor; }
.fchip-fav[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }
.fchip-hid { background: var(--surface-2); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line); }
.fchip-hid[aria-pressed="true"] { background: var(--surface-sunk); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-strong); }
@media (hover: hover) {
  .fchip-fav[aria-pressed="false"]:hover { background: var(--accent-tint); color: var(--accent-ink); }
  .fchip-hid[aria-pressed="false"]:hover { background: var(--surface-sunk); }
}
#plib-tags .fchip { height: 32px; padding: 0 12px; font-weight: 500; font-size: 13px; }
#plib-tags .fchip.on { padding-left: 9px; background: var(--accent); color: var(--on-accent); box-shadow: none; }
.plib-reset { flex: none; display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 10px 0 6px; margin-left: 2px; border-radius: var(--r-pill); color: var(--accent-ink); font: 600 13px/1 var(--font-sans); white-space: nowrap; }
.plib-reset[hidden] { display: none; }
.plib-reset svg.i { width: 16px; height: 16px; }
@media (hover: hover) { .plib-reset:hover { background: var(--accent-tint); } }
.plib-row:has(> .plib-reset:not([hidden])) > .fchips { margin-right: 0; }
.plib-det-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.plib-det-acts .btn { flex: 1 1 auto; }
#plib-det-fav.on { color: var(--accent-ink); box-shadow: inset 0 0 0 1px var(--accent); }
#plib-det-fav.on svg.i { fill: currentColor; }
.plib-more { margin-top: 16px; }
.plib-note { margin: 18px 2px 4px; font-size: 13px; line-height: 18px; color: var(--ink-3); text-align: center; }
.plib-note svg.i { width: 14px; height: 14px; vertical-align: -2px; margin-right: 6px; }
.det-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.det-tags .fchip { height: 30px; padding: 0 12px; font-weight: 500; font-size: 13px; }
.det-note:empty { display: none; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 12px; }
.tile { position: relative; display: flex; flex-direction: column; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); overflow: hidden; text-align: left; }
.tile.wait { opacity: .7; }
.tile-art { position: relative; display: block; aspect-ratio: 1; background: var(--chart-fabric); border-bottom: 1px solid var(--line-soft); }
.tile-art canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.badge { position: absolute; top: 8px; right: 8px; padding: 4px 9px; border-radius: var(--r-pill); background: var(--surface); color: var(--ink); font: 600 12px/14px var(--font-sans); box-shadow: var(--shadow-1); white-space: nowrap; }
.badge.fin { color: var(--ok); }
.badge.new { color: var(--ink-2); font-weight: 500; }
.tile-tx { flex: 1; display: flex; flex-direction: column; gap: 2px; padding: 10px 12px 12px; min-width: 0; }
.tile-tx b { font: 600 15px/20px var(--font-sans); overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow-wrap: anywhere; }
.tile-tx small { font-size: 12px; line-height: 16px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: auto; }
.tile-tx .prog { margin-top: 6px; }
@media (hover: hover) { .tile:hover { border-color: var(--line-strong); box-shadow: var(--shadow-1); } }
.cat-none { margin: 36px auto 0; max-width: 320px; text-align: center; color: var(--ink-2); font-size: 15px; line-height: 1.5; }
.cat-none .link-btn { margin: 10px 0 0; }
.cat-none .btn { margin-top: 18px; }
canvas.off { opacity: .35; }
.det { margin-top: 4px; }
.det-top { margin: 0 0 8px -12px; }
.det-back { gap: 4px; padding: 0 14px 0 8px; }
.det-art { --det-h: min(440px, 62vh); aspect-ratio: 4 / 3; width: 100%; max-width: calc(var(--det-h) * var(--det-k, 1.3333)); max-height: var(--det-h); margin-inline: auto; border-radius: var(--r-l); border: 1px solid var(--line); background: var(--chart-fabric); overflow: hidden; }
.det-cv { display: block; width: 100%; height: 100%; }
.det-info { margin-top: 18px; }
.det-info h2 { font: 600 28px/34px var(--font-serif); letter-spacing: -0.01em; }
.det-facts { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-direction: column; gap: 4px; font-size: 15px; line-height: 1.45; color: var(--ink-2); }
.det-sw { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.dsw { width: 22px; height: 22px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px var(--swatch-ring); }
.dsw.wait { background: var(--line-soft); box-shadow: none; }
.det-prog { display: flex; align-items: center; gap: 12px; margin-top: 18px; font-size: 14px; color: var(--ink-2); }
.det-prog .prog { flex: 1; }
.det-info > .btn-primary { margin-top: 20px; }
.det-src { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line-soft); font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.det-src h3 { font: 600 13px/18px var(--font-sans); color: var(--ink-2); margin-bottom: 6px; }
.det-src p + p { margin-top: 6px; }
.det-who { color: var(--ink); }
.det-link { display: inline-block; margin: 8px 0 0; }
.det-lic { font-size: 13px; }
@media (min-width: 760px) {
  .det { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); grid-template-areas: "top top" "art info"; column-gap: 32px; align-items: start; }
  .det-top { grid-area: top; }
  .det-art { grid-area: art; aspect-ratio: 1; --det-h: min(640px, 74vh); }
  .det-info { grid-area: info; margin-top: 0; }
}
.dsg-intro { margin: 16px 2px 14px; max-width: 62ch; font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.dsg-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 12px; }
.dsg-list > [role="listitem"] { display: flex; min-width: 0; }
.dsg-card { flex: 1; display: flex; flex-direction: column; min-width: 0; text-align: left; color: inherit; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); overflow: hidden; }
@media (hover: hover) { .dsg-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-1); } }
.dsg-thumbs { display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); gap: 1px; aspect-ratio: 3 / 1; background: var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.dsg-th { position: relative; min-width: 0; overflow: hidden; background: var(--chart-fabric); }
.dsg-th.pdf { background: #fff; }
.dsg-th img, .dsg-th canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.dsg-th img { object-fit: cover; }
.dsg-th.pdf img { object-fit: contain; padding: 6px; box-sizing: border-box; }
.dsg-tx { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px 14px; min-width: 0; }
.dsg-tx b { font: 600 19px/25px var(--font-serif); overflow-wrap: anywhere; }
.dsg-brand { font: 600 13px/18px var(--font-sans); color: var(--accent-ink); }
.dsg-about { font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.dsg-n { margin-top: 6px; font-size: 13px; line-height: 18px; color: var(--ink-2); }
.det.dsg-page { display: block; }
.dsg-head { max-width: 640px; }
.dsg-head h2 { font: 600 28px/34px var(--font-serif); letter-spacing: -0.01em; }
.dsg-head .dsg-brand { margin-top: 2px; font-size: 14px; }
.dsg-head .dsg-about { margin-top: 8px; font-size: 15px; }
.dsg-head .det-link { margin-left: 0; }
.dsg-head .det-lic { margin-top: 10px; color: var(--ink-2); line-height: 1.5; }
.tile.soon .tile-art { background: #fff; }
.tile.soon .tile-art img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: contain; padding: 10px; box-sizing: border-box; }
.badge.soon { color: var(--ink-2); font-weight: 500; }
.dsg-th.no-img, .tile.soon .tile-art.no-img { background: var(--chart-fabric); }
.no-img-tx { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 6px; box-sizing: border-box;
  text-align: center; font-size: 12px; line-height: 1.3; color: var(--ink-2); overflow: hidden; }
.tile-art .no-img-tx { padding: 12px; font-size: 13px; }
.det-links { display: flex; flex-wrap: wrap; gap: 0 18px; }
.det-links .det-link { margin-left: 0; }
.det-links + .det-lic { margin-top: 10px; }
.det-photo { margin: 16px 0 0; }
.det-photo img { display: block; width: 100%; max-width: 360px; height: auto; border-radius: var(--r-m); border: 1px solid var(--line); }
.det-photo figcaption { margin-top: 6px; font-size: 13px; line-height: 1.45; color: var(--ink-2); }
.drop-hint { position: fixed; inset: 12px; z-index: 30; display: grid; place-items: center; border: 2px dashed var(--accent); border-radius: var(--r-xl); background: color-mix(in srgb, var(--bg) 90%, transparent); pointer-events: none; }
.drop-hint > div { display: flex; flex-direction: column; align-items: center; gap: 12px; font: 600 20px/26px var(--font-serif); color: var(--accent-ink); text-align: center; padding: 0 24px; }
.drop-hint svg.i { width: 40px; height: 40px; }
.list { overflow: hidden; }
.item { width: 100%; display: flex; align-items: center; gap: 14px; padding: 12px 14px 12px 16px; text-align: left; }
.item:not([hidden]) ~ .item { border-top: 1px solid var(--line-soft); }
.item.wait { opacity: .7; }
@media (hover: hover) { .item:hover { background: var(--surface-2); } }
.it-body { flex: 1; min-width: 0; }
.it-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.it-title { font: 600 16px/22px var(--font-sans); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.it-pct { font: 600 14px/20px var(--font-sans); color: var(--ink); white-space: nowrap; }
.it-pct.fin { color: var(--ok); }
.it-pct.new { color: var(--ink-2); font-weight: 500; }
.it-meta { font-size: 13px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .prog { margin-top: 8px; }
#lib-banner { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; justify-content: center; padding: 0 calc(12px + var(--sr)) calc(12px + env(safe-area-inset-bottom)) calc(12px + var(--sl)); pointer-events: none; }
#lib-banner:empty { display: none; }
#library[data-banner] .lib { padding-bottom: calc(112px + env(safe-area-inset-bottom)); }
.banner { pointer-events: auto; display: flex; align-items: center; gap: 12px; width: 100%; max-width: 460px; padding: 10px 6px 10px 14px; box-shadow: var(--shadow-2); animation: banner-in .24s ease-out both; }
.banner-ic { display: block; width: 36px; height: 36px; flex: none; }
.banner-tx { flex: 1; min-width: 0; }
.banner-tx b { display: block; font: 600 15px/20px var(--font-sans); }
.banner-tx > span { display: block; font-size: 13px; line-height: 1.35; color: var(--ink-2); margin-top: 1px; }
.banner .btn, .banner-x { flex: none; }
@keyframes banner-in { from { opacity: 0; transform: translateY(14px); } }
@media (prefers-reduced-motion: reduce) { .banner { animation: none; } }
@media (max-width: 599px) { .banner-tx > span { display: none; } }
@media (min-width: 600px) { #lib-banner { justify-content: flex-end; padding-right: calc(24px + var(--sr)); padding-bottom: calc(24px + env(safe-area-inset-bottom)); } .banner { max-width: 500px; } }
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; margin: 34px auto 0; max-width: 420px; }
.empty-art { width: 132px; height: 132px; }
.empty-art svg { width: 100%; height: 100%; }
.ea-ring { fill: var(--chart-fabric); stroke: var(--hoop); stroke-width: 8; }
.ea-edge { fill: none; stroke: var(--hoop-edge); stroke-width: 1.5; }
.ea-x { stroke: var(--accent); stroke-width: 5; stroke-linecap: round; }
.ea-thread { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; opacity: 0.65; }
.ea-dot { fill: var(--line-strong); }
.empty h2 { margin-top: 22px; font: 600 24px/30px var(--font-serif); }
.empty p { margin-top: 8px; max-width: 300px; color: var(--ink-2); font-size: 15px; line-height: 1.5; }
.empty .btn { margin-top: 10px; }
.empty .btn-primary { margin-top: 24px; }
.empty .empty-fine { margin-top: 14px; font-size: 13px; }
.lib-loading { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 64px; color: var(--ink-2); }
.lib-load { display: flex; flex-direction: column; gap: 9px; margin: 2px 0 14px; padding: 12px 14px; border-radius: var(--r-m); background: var(--surface-2); }
.lib-load-row { display: flex; align-items: center; gap: 10px; font-size: 14px; line-height: 1.4; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.lib-load .spinner { width: 16px; height: 16px; border-width: 2px; }
.lib-load-bar { display: flex; align-items: center; gap: 12px; }
.lib-load-bar .prog { flex: 1; }
.lib-load-n { flex: none; font-size: 13px; line-height: 1; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.lib-load .prog > i { transition: width .3s ease; }
@media (prefers-reduced-motion: reduce) { .lib-load .prog > i { transition: none; } }
.lib-fail { display: flex; flex-direction: column; gap: 16px; max-width: 420px; margin: 28px auto 0; }
.lib-fail .notice { font-size: 15px; }
@media (min-width: 600px) {
  .lib { --lib-pad: 32px; padding-bottom: 48px; }
  .lib-add { width: auto; padding: 0 16px 0 12px; }
  .lib-add span { display: inline; }
  .tiles { grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 14px; }
  .lib-brand h1 { font-size: 24px; line-height: 30px; }
  .lib-head { min-height: 84px; }
}

[data-layout="land"] .lib { max-width: none; padding: calc(2px + env(safe-area-inset-top)) calc(24px + var(--sr)) calc(28px + env(safe-area-inset-bottom)) calc(24px + var(--sl)); }
[data-layout="land"] .lib-head { min-height: 54px; }
[data-layout="land"] .lib-brand h1 { font-size: 20px; line-height: 26px; }
[data-layout="land"] .cont { margin-top: 10px; display: grid; grid-template-columns: minmax(180px, 36%) minmax(0, 1fr); }
[data-layout="land"] .cont-art { min-height: 150px; border-right: 1px solid var(--line-soft); }
[data-layout="land"] .cont-cv { position: absolute; inset: 0; height: 100%; border-bottom: 0; }
[data-layout="phone"] .cont { display: grid; grid-template-columns: minmax(118px, 40%) minmax(0, 1fr); }
[data-layout="phone"] .cont-art { min-height: 136px; border-right: 1px solid var(--line-soft); }
[data-layout="phone"] .cont-cv { position: absolute; inset: 0; height: 100%; border-bottom: 0; }
[data-layout="phone"] .cont-body { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-content: center; column-gap: 10px; padding: 12px 14px; }
[data-layout="phone"] .cont-body > * { grid-column: 1 / -1; }
[data-layout="phone"] .cont-body h2 { font-size: 18px; line-height: 23px; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; overflow-wrap: anywhere; }
[data-layout="phone"] .cont-body .meta { display: none; }
[data-layout="phone"] .cont-foot { display: contents; }
[data-layout="phone"] .cont-body .prog { grid-column: 1; align-self: center; margin-top: 10px; }
[data-layout="phone"] .cont-foot .pct { grid-column: 2; margin-top: 10px; font-size: 14px; line-height: 18px; }
[data-layout="phone"] .cont-foot .pct-w { display: none; }
[data-layout="phone"] .cont-foot .btn { grid-column: 1 / -1; margin-top: 10px; }

.set-layer { position: fixed; inset: 0; z-index: 40; }
.set-layer.closing { pointer-events: none; }
.set-scrim { position: absolute; inset: 0; opacity: 0; transition: opacity .24s ease; }
.set-layer.open .set-scrim { opacity: 1; }
.set-panel { position: absolute; left: 0; right: 0; bottom: 0; top: calc(env(safe-area-inset-top) + 36px); display: flex; flex-direction: column; background: var(--bg); border-radius: var(--r-xl) var(--r-xl) 0 0; box-shadow: var(--shadow-up), 0 -1px 0 var(--line); transform: translateY(100%); transition: transform .3s cubic-bezier(.2, .8, .2, 1); }
.set-layer.open .set-panel { transform: none; }
.set-panel > .handle { position: absolute; top: 6px; left: 50%; margin: 0 0 0 -18px; touch-action: none; }
.set-head { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 14px 8px 20px; touch-action: none; }
.set-head h1 { font: 600 24px/30px var(--font-serif); }
.set { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 16px calc(28px + env(safe-area-inset-bottom)); }
@media (min-width: 600px) {
  .set-panel { top: 0; left: auto; width: min(440px, 100%); border-radius: var(--r-xl) 0 0 var(--r-xl); box-shadow: var(--shadow-2), -1px 0 0 var(--line); transform: translateX(100%); }
  .set-panel > .handle { display: none; }
  .set-head { padding: calc(14px + env(safe-area-inset-top)) calc(14px + var(--sr)) 10px 24px; touch-action: auto; }
  .set { padding: 0 calc(20px + var(--sr)) calc(28px + env(safe-area-inset-bottom)) 20px; }
}
.acct { padding: 16px; margin-top: 4px; }
.acct-top { display: flex; align-items: center; gap: 14px; }
.acct-top b { display: block; font: 600 16px/22px var(--font-sans); }
.acct-top > div { min-width: 0; }
.acct-top div > span { display: block; font-size: 13px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
chrome_annotation { border-bottom: 0 !important; text-decoration: none !important; color: inherit !important; background: none !important; pointer-events: none; }
.acct-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.acct-foot .sync { margin: 0; flex: 1; min-width: 0; }
.set-page > .card:not([hidden]) ~ .card, .set-part > .card:not([hidden]) ~ .card { margin-top: 10px; }
.set-page > .set-part-h + .card:not([hidden]), .set-part > .set-part-h + .card:not([hidden]) { margin-top: 0; }
.acct-news { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 10px 14px; border-top: 1px solid var(--line-soft); color: var(--ink-2); font-size: 14px; line-height: 20px; text-align: left; }
.acct-news[hidden] { display: none; }
.news-ck { width: 20px; height: 20px; flex: none; display: grid; place-items: center; border-radius: 6px; border: 1.5px solid var(--line-strong); background: var(--surface); color: transparent; transition: background .15s, border-color .15s; }
.news-ck svg.i { width: 14px; height: 14px; stroke-width: 2.4; }
.acct-news[aria-checked="true"] .news-ck { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.acct-news[aria-busy="true"] { opacity: .7; }
.acct-news:focus-visible { outline: 2px solid var(--accent-ring); outline-offset: 3px; border-radius: 6px; }
button.set-row { width: 100%; }
.devs .dev-note { margin: 0; color: var(--ink-2); font-size: 14px; line-height: 20px; }
.devs .set-row:has(> .dev-note) { flex-wrap: wrap; row-gap: 8px; }
.devs .set-row > .dev-note { flex: 1 1 200px; }
.devs .dev .set-l { overflow-wrap: anywhere; }
.fb-lead { margin: 0 0 12px; color: var(--ink-2); font-size: 14px; line-height: 20px; }
.fb-list .set-row { color: inherit; text-decoration: none; }
.mine-it, .plib-it { padding: 0; gap: 0; }
.it-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 14px; padding: 12px 2px 12px 16px; text-align: left; color: inherit; }
.mine-it > .more, .plib-it > .more { margin-right: 6px; }
.mine-tile, .plib-tile { padding: 0; }
.tile-main { flex: 1; display: flex; flex-direction: column; width: 100%; min-width: 0; text-align: left; color: inherit; }
.star, .more { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; color: var(--ink-3); flex: none; }
.more { color: var(--ink-2); }
.star svg.i { width: 20px; height: 20px; }
.more svg.i { width: 24px; height: 24px; }
.star.on { color: var(--accent); }
.star.on svg.i { fill: currentColor; }
.lib-sec h3 svg.sec-star { width: 17px; height: 17px; color: var(--accent); fill: currentColor; vertical-align: -2px; margin-right: 6px; }
.mine-tile > .star, .mine-tile > .more, .plib-tile > .star, .plib-tile > .more, .cont-art > .star, .cont-art > .more { position: absolute; top: 6px; width: 34px; height: 34px; background: color-mix(in srgb, var(--surface) 90%, transparent); box-shadow: var(--shadow-1); }
.mine-tile > .star, .plib-tile > .star, .cont-art > .star { left: 6px; }
.mine-tile > .more, .plib-tile > .more, .cont-art > .more { right: 6px; }
.mine-tile > .star svg.i, .plib-tile > .star svg.i, .cont-art > .star svg.i { width: 18px; height: 18px; }
.mine-tile > .more svg.i, .plib-tile > .more svg.i, .cont-art > .more svg.i { width: 22px; height: 22px; }
.mine-tile .badge, .plib-tile .badge { top: auto; bottom: 8px; }
.mine-it, .plib-it { position: relative; }
.mine-it > .star, .plib-it > .star { position: absolute; z-index: 1; left: 9px; top: calc(50% - 33px); width: 26px; height: 26px; background: color-mix(in srgb, var(--surface) 94%, transparent); box-shadow: var(--shadow-1); }
.mine-it > .star svg.i, .plib-it > .star svg.i { width: 15px; height: 15px; }
@media (max-width: 599px) {
  .mine-it > .more, .plib-it > .more { width: 36px; margin-right: 6px; }
  .mine-it .it-body { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 10px; align-items: center; }
  .mine-it .it-top { display: contents; }
  .mine-it .it-title, .mine-it .it-meta { grid-column: 1 / -1; }
  .mine-it .it-body > .prog { grid-column: 1; grid-row: 3; }
  .mine-it .it-pct { grid-column: 2; grid-row: 3; margin-top: 8px; line-height: 14px; }
}
@media (hover: hover) {
  .star:hover, .more:hover { color: var(--accent-ink); }
  .mine-it > .star:hover, .mine-it > .more:hover, .plib-it > .star:hover, .plib-it > .more:hover { background: var(--accent-tint); }
}
@media (pointer: coarse) { .mine-it > .more, .plib-it > .more { width: 44px; height: 44px; margin: 0 4px 0 6px; } }
@media (max-width: 599px) { .item .m-col { display: none; } }
.hp-art { position: relative; display: block; aspect-ratio: 1; }
.hp-cv, .hp-cv.hoop-empty { position: absolute; left: 14%; top: 14%; display: block; width: 72%; height: 72%; margin: 0; border-radius: 50%; background: var(--chart-fabric); box-shadow: 0 0 0 3px var(--hoop), 0 0 0 4px var(--hoop-edge), 0 3px 8px 3px rgba(60, 45, 20, 0.10); }
.hp-cv.hoop-empty { opacity: .6; }
.mine-it, .mine-tile, .hp, .cont { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.lift { position: relative; z-index: 2; transform: scale(1.025); background: var(--surface); box-shadow: var(--shadow-2); border-radius: var(--r-m); transition: transform .15s, box-shadow .15s; }
.drag-src { opacity: .3; }
.drag-ghost { z-index: 70; pointer-events: none; background: var(--surface); border-radius: var(--r-l); box-shadow: var(--shadow-2); }
html.dragging, html.dragging * { cursor: grabbing !important; }
.mine-it { touch-action: pan-y; }
.sw-acts { display: none; position: absolute; top: 0; right: 0; bottom: 0; width: max(0px, calc(-1 * var(--sx, 0px))); overflow: hidden; }
.mine-it.sw-on { overflow: hidden; }
.mine-it.sw-on > .sw-acts { display: flex; }
.mine-it.sw-on > :is(.it-main, .star, .more) { transform: translateX(var(--sx, 0px)); }
.mine-it.sw-on:not(.sw-drag) > :is(.it-main, .star, .more) { transition: transform .2s cubic-bezier(.2, .8, .2, 1); }
.mine-it.sw-on:not(.sw-drag) > .sw-acts { transition: width .2s cubic-bezier(.2, .8, .2, 1); }
.sw-acts > button { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; overflow: hidden; font: 600 12px/14px var(--font-sans); white-space: nowrap; }
.sw-acts svg.i { width: 22px; height: 22px; flex: none; }
.sw-fav { background: var(--accent); color: var(--on-accent); }
.sw-fav:not(.on) svg.i { fill: currentColor; }
.sw-del { background: var(--danger); color: var(--bg); }
.sel-ck { display: none; width: 24px; height: 24px; flex: none; border-radius: 50%; border: 2px solid var(--line); background: var(--surface); place-items: center; color: transparent; }
.sel-ck svg.i { width: 15px; height: 15px; }
#library[data-select] .sel-ck { display: grid; }
#library[data-select] #lib-body :is(.star, .more), #library[data-select] .sec-tools, #library[data-select] #lib-banner { display: none; }
.sel .sel-ck { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.mine-it.sel { background: var(--accent-tint); }
#library[data-select] .mine-it > .it-main { padding-right: 16px; }
.mine-tile > .sel-ck, .cont-art > .sel-ck { position: absolute; top: 11px; left: 11px; box-shadow: var(--shadow-1); pointer-events: none; }
.mine-tile.sel, .cont.sel { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.mine-tile.sel .tile-tx, .cont.sel .cont-body { background: var(--accent-tint); }
.sel-head { position: sticky; top: 0; z-index: 6; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; margin: 4px -20px 0; padding: 4px 12px 4px 22px; background: var(--bg); }
.sel-n { font: 600 16px/22px var(--font-sans); }
.sel-bar { position: fixed; z-index: 40; left: 0; right: 0; bottom: calc(18px + env(safe-area-inset-bottom)); width: max-content; max-width: calc(100vw - 24px); margin: 0 auto; display: flex; gap: 8px; padding: 8px; border-radius: var(--r-pill); background: var(--surface); box-shadow: var(--shadow-2); animation: banner-in .2s ease-out both; }
.sel-bar > button { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: var(--r-pill); font: 600 15px/20px var(--font-sans); background: var(--surface-2); color: var(--ink); white-space: nowrap; }
.sel-bar svg.i { width: 20px; height: 20px; }
.sel-fav.on svg.i { fill: currentColor; color: var(--accent); }
@media (hover: hover) { .sel-bar > button:hover { background: var(--accent-tint); color: var(--accent-ink); } }
#library[data-select] .lib { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
[data-layout="land"] .sel-head { margin: 4px calc(-24px - var(--sr)) 0 calc(-24px - var(--sl)); padding-left: calc(26px + var(--sl)); padding-right: calc(16px + var(--sr)); }
.mine-more { margin: 16px 0 4px; }
.trash-link { display: flex; align-items: center; gap: 8px; width: fit-content; margin: 22px auto 0; padding: 9px 16px; border-radius: var(--r-pill); color: var(--ink-2); font: 500 14px/18px var(--font-sans); }
.trash-link svg.i { width: 18px; height: 18px; }
.trash-link .n { color: var(--ink-3); }
@media (hover: hover) { .trash-link:hover { background: var(--surface-2); color: var(--ink); } }
.trash-lead { margin: 0 2px 12px; color: var(--ink-2); font-size: 14px; line-height: 1.45; }
.trash-list .item, .many-list .item { gap: 10px; padding: 10px 8px 10px 12px; }
.trash-list .btn, .many-list .btn { flex: none; }
.tr-it, .many-it { flex-wrap: wrap; row-gap: 8px; padding-bottom: 12px; }
.tr-it .it-title, .many-it .it-title { white-space: normal; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow-wrap: anywhere; }
.it-act { flex: 1 0 100%; display: flex; flex-wrap: wrap; gap: 8px; }
.tr-del { color: var(--danger); }
.trash-all { margin-top: 8px; color: var(--danger); }
.btn-danger { background: var(--danger); color: var(--bg); }
.sheet-confirm p { margin: 0 2px 16px; color: var(--ink-2); line-height: 1.45; }
.sheet-confirm .btn-ghost { margin-top: 6px; }
.many-list { margin-bottom: 4px; }
.many-x { display: grid; place-items: center; color: var(--ink-3); }
.many-x svg.i { width: 22px; height: 22px; }
.many-it.fail .it-title { color: var(--ink-2); }
.many-why { white-space: normal; }
.many-sum { margin: 0 2px 12px; font-size: 14px; line-height: 20px; color: var(--ink-2); }
.many-hint { margin: 10px 2px 0; font-size: 13px; line-height: 18px; color: var(--ink-2); }
.wn-rel { padding: 4px 2px 14px; }
.wn-rel:not([hidden]) ~ .wn-rel { border-top: 1px solid var(--line); padding-top: 14px; }
.wn-date { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font: 600 15px/20px var(--font-sans); color: var(--ink); }
.wn-ver { color: var(--ink-2); font: 500 13px/20px var(--font-sans); font-variant-numeric: tabular-nums; }
.wn-tag { padding: 2px 8px; border-radius: var(--r-pill); background: var(--accent-tint); color: var(--accent-ink); font: 600 12px/16px var(--font-sans); }
.wn-list { margin: 0; padding-left: 20px; color: var(--ink-2); font-size: 14px; line-height: 20px; }
.wn-list li + li { margin-top: 6px; }
.fb-foot { display: flex; align-items: center; justify-content: center; gap: 6px; max-width: 100%; margin: 20px auto 6px; padding: 10px 14px; font: 500 13px/18px var(--font-sans); color: var(--ink-2); text-align: center; border-radius: var(--r-pill); }
.fb-foot:hover { color: var(--accent-ink); background: var(--accent-tint); }
.fb-foot svg.i { flex: none; width: 16px; height: 16px; }
.set-sec { font: 600 13px/18px var(--font-sans); color: var(--ink-2); margin: 16px 4px 8px; }
.set-hint { margin: 8px 4px 0; font-size: 13px; line-height: 18px; color: var(--ink-2); }
.set-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; min-height: 56px; }
.set-row:not([hidden]) ~ .set-row { border-top: 1px solid var(--line-soft); }
.set-row.col { flex-direction: column; align-items: stretch; gap: 8px; padding: 12px; }
.set-row.col .set-l { padding-left: 4px; }
.set-l { display: block; font: 500 15px/20px var(--font-sans); }
.set-d { display: block; font-size: 13px; line-height: 18px; color: var(--ink-2); }
.switch { width: 50px; height: 30px; border-radius: 99px; background: var(--line-strong); position: relative; flex: none; transition: background .15s; }
.switch::before { content: ""; position: absolute; inset: -8px -4px; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); transition: transform .15s; }
.switch[aria-checked="true"] { background: var(--accent); }
.switch[aria-checked="true"]::after { transform: translateX(20px); background: var(--on-accent); }
.set-ic { width: 36px; height: 36px; border-radius: 6px; background: var(--surface-2); color: var(--accent-ink); display: grid; place-items: center; flex: none; }
.set-ic svg.i { width: 20px; height: 20px; }
.set-ic-app { background: none; }
.set-ic-app img { display: block; width: 36px; height: 36px; }
.set-foot { display: block; width: 100%; text-align: center; font-size: 13px; color: var(--ink-2); margin-top: 12px; padding: 10px; border-radius: var(--r-m); }
.set-foot-row { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 2px 6px; margin-top: 12px; }
.set-foot-row .set-foot { width: auto; margin-top: 0; }
.pals { display: flex; flex-wrap: wrap; gap: 8px; }
.pal { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 15px 0 7px; border-radius: var(--r-pill); box-shadow: inset 0 0 0 1px var(--line-strong); font: 500 14px/1 var(--font-sans); color: var(--ink-2); }
.pal[aria-checked="true"] { box-shadow: inset 0 0 0 2px var(--accent); color: var(--ink); }
.pal-sw { width: 28px; height: 28px; border-radius: 50%; flex: none; background: linear-gradient(135deg, var(--pb) 0 50%, var(--pa) 50% 100%); box-shadow: inset 0 0 0 1px var(--swatch-ring); }
.vw-mk { container: marks / inline-size; }
.marks { display: grid; grid-template-columns: repeat(4, 42px); gap: 10px 14px; padding: 0 2px; }
@container marks (min-width: 368px) { .marks { grid-template-columns: repeat(8, 42px); gap: 4px; justify-content: space-between; } }
.mk { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; box-shadow: inset 0 0 0 1px var(--line-strong); }
.mk[aria-checked="true"] { box-shadow: inset 0 0 0 2px var(--accent); }
.mk-sw { width: 30px; height: 30px; border-radius: 50%; background: var(--mk); box-shadow: inset 0 0 0 1px var(--swatch-ring); }
.mk-thread { background: conic-gradient(from 45deg, #B4533F 0 25%, #D9A53A 0 50%, #6E8B4E 0 75%, #4F7FB0 0); }
.mk-own { background: radial-gradient(closest-side, var(--mk) 0 9.5px, transparent 10px), radial-gradient(closest-side, var(--surface) 0 11.5px, transparent 12px), conic-gradient(#C9645A, #D3A24A, #8FA75A, #4FA0A0, #5A7FC0, #9A6AB8, #C9645A); }
@media (hover: hover) { .mk[aria-checked="false"]:hover { background: var(--surface-2); } }
.set-row.col .set-dl { padding: 0 4px; }
.set-v { color: var(--ink-2); font-weight: 400; }
.set-v::before { content: " · "; }
.rng { display: block; }
.rng-l { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 4px; font: 500 14px/20px var(--font-sans); }
.rng-l .set-v { font-variant-numeric: tabular-nums; }
.rng-l .set-v::before { content: none; }
.rng-l.set-l { font-size: 15px; justify-content: space-between; }
.range { display: block; width: 100%; height: 36px; margin: 0; background: transparent; -webkit-appearance: none; appearance: none; cursor: pointer; }
@media (pointer: coarse) { .range { height: 44px; margin: -4px 0; } }
.range::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: linear-gradient(to right, var(--accent) calc(12px + (100% - 24px) * var(--k, .5)), var(--line-strong) 0); }
.range::-moz-range-track { height: 6px; border-radius: 3px; background: var(--line-strong); }
.range::-moz-range-progress { height: 6px; border-radius: 3px; background: var(--accent); }
.range::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 24px; height: 24px; margin-top: -9px; border: 0; border-radius: 50%; background: var(--surface); box-shadow: 0 0 0 1px var(--line-strong), 0 1px 4px rgba(0, 0, 0, 0.16); }
.range::-moz-range-thumb { width: 24px; height: 24px; border: 0; border-radius: 50%; background: var(--surface); box-shadow: 0 0 0 1px var(--line-strong), 0 1px 4px rgba(0, 0, 0, 0.16); }
.range:focus-visible { outline: none; }
.range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 3px var(--accent-ring), 0 1px 4px rgba(0, 0, 0, 0.16); }
.range:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 3px var(--accent-ring), 0 1px 4px rgba(0, 0, 0, 0.16); }
@media (hover: hover) { .pal[aria-checked="false"]:hover { background: var(--surface-2); color: var(--ink); } }

#stitch { touch-action: none; }
.st-stage { position: relative; overflow: hidden; overflow: clip; background: var(--chart-surround); }
canvas.chart, canvas.chart-ov { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
canvas.chart { touch-action: none; cursor: default; }
canvas.chart.panning { cursor: grabbing; }
#stitch.drag-on canvas.chart { cursor: crosshair; }
#stitch:not(.tools-two) .js-erase { display: none; }
canvas.chart-ov { pointer-events: none; }
.st-sb { position: absolute; z-index: 3; display: none; border-radius: 6px; transition: background-color .15s; }
@media (hover: hover) and (pointer: fine) { .st-sb:not([hidden]) { display: block; } }
.st-sb-th { position: absolute; left: 0; top: 0; border-radius: 99px; background: color-mix(in srgb, var(--ink) 34%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--surface) 60%, transparent); transition: background-color .15s, height .15s, width .15s, margin .15s; }
.st-sb-x .st-sb-th { height: 6px; margin-top: 4px; }
.st-sb-y .st-sb-th { width: 6px; margin-left: 4px; }
.st-sb:hover, .st-sb.drag { background: color-mix(in srgb, var(--ink) 8%, transparent); }
.st-sb:hover .st-sb-th, .st-sb.drag .st-sb-th { background: color-mix(in srgb, var(--ink) 52%, transparent); }
.st-sb-x:hover .st-sb-th, .st-sb-x.drag .st-sb-th { height: 8px; margin-top: 2px; }
.st-sb-y:hover .st-sb-th, .st-sb-y.drag .st-sb-th { width: 8px; margin-left: 2px; }
#stitch.loading .st-sb { visibility: hidden; }
@media (hover: hover) and (pointer: fine) { [data-layout="desk"] .kbd-hint { bottom: 22px; } }
@media (max-width: 359px) { #set-pgsize button { padding: 0 2px; font-size: 13px; } }
.st-wait { position: absolute; inset: 0; display: none; place-items: center; }
#stitch.loading .st-wait { display: grid; }
#stitch.loading canvas { visibility: hidden; }

.st-bar { display: flex; align-items: center; gap: 2px; padding: 0 6px; background: var(--bar); border-bottom: 1px solid var(--line); z-index: 7; -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.st-title { flex: 1; min-width: 0; padding: 0 4px; }
.st-title b { display: block; font: 600 17px/22px var(--font-serif); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-title > span { display: block; font: 500 13px/17px var(--font-sans); color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-bar .sep { width: 1px; height: 26px; background: var(--line); margin: 0 4px; flex: none; }
.bar-edit, .bar-view { display: flex; align-items: center; gap: 6px; flex: none; }
.d-sub { display: none; }
.bar-view .js-panel { display: none; }
[data-layout="wide"] .bar-view .js-panel, [data-layout="desk"] .bar-view .js-panel { display: grid; }
.js-panel[aria-pressed="true"] { color: var(--accent-ink); }
.st-float { position: absolute; display: none; gap: 8px; z-index: 4; }
.hl-lock[aria-pressed="true"] { color: var(--accent-ink); }
.offline-pill { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); z-index: 5; display: flex; align-items: center; gap: 8px; width: max-content; max-width: calc(100% - 24px); padding: 10px 18px 10px 14px; border-radius: 20px; background: var(--warn-tint); color: var(--warn); font: 500 14px/18px var(--font-sans); box-shadow: var(--shadow-1); }
.offline-pill svg.i { width: 20px; height: 20px; }
.kbd-hint { position: absolute; left: 12px; bottom: 12px; padding: 7px 12px; border-radius: var(--r-pill); background: var(--bar); color: var(--ink-2); font-size: 12px; line-height: 16px; box-shadow: inset 0 0 0 1px var(--line); pointer-events: none; display: none; max-width: calc(100% - 24px); }

.st-dock { background: var(--surface); z-index: 6; display: none; }
.st-tools { display: flex; align-items: center; gap: 4px; padding: 0 10px 6px; }
.st-tools .sp { flex: 1; }
.st-tools .btn-s { padding: 0 14px; }
.st-tools .btn-ghost { padding: 0 6px 0 12px; gap: 4px; }
#st-all .lbl-short { display: none; }
[data-layout="phone"] #stitch.tools-two .st-tools { gap: 2px; }
[data-layout="phone"] #stitch.tools-two .st-tools .tog { padding: 0 10px; gap: 6px; }
[data-layout="phone"] #stitch.tools-two #st-all { padding: 0 10px; }
[data-layout="phone"] #stitch.tools-two #st-all .lbl-long { display: none; }
[data-layout="phone"] #stitch.tools-two #st-all .lbl-short { display: inline; }
@media (max-width: 359px) {
  [data-layout="phone"] .st-float { gap: 6px; }
  [data-layout="phone"] .st-float .seg button { padding: 0 9px; }
}
[data-layout] #stitch.tools-fit2 .st-tools .tog.js-drag, [data-layout] #stitch.tools-fit2 .st-tools .tog.js-erase { width: var(--tap); padding: 0; justify-content: center; }
[data-layout] #stitch.tools-fit2 .st-tools .tog.js-drag span, [data-layout] #stitch.tools-fit2 .st-tools .tog.js-erase span,
[data-layout] #stitch.tools-fit3 #st-all .lbl-short, [data-layout] #stitch.tools-fit3 #st-all .lbl-long { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.strip { display: flex; gap: 12px; padding: 4px 16px 4px; overflow-x: auto; scrollbar-width: none; scroll-padding: 0 16px; }
.strip::-webkit-scrollbar { display: none; }
.chip { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 44px; flex: none; padding-top: 4px; }
.chip small { font: 600 12px/14px var(--font-sans); color: var(--ink-2); font-variant-numeric: tabular-nums; max-width: 48px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip.on .sw { box-shadow: inset 0 0 0 1px var(--swatch-ring), 0 0 0 2px var(--surface), 0 0 0 4px var(--accent-ring); }
.chip.on small { color: var(--ink); }
.chip.fin .sw { position: relative; }
.chip .sw { position: relative; }
.chip .sw-n { top: -4px; bottom: auto; right: -6px; }
.chip.fin .sw::after { content: "✓"; position: absolute; right: -3px; bottom: -3px; width: 17px; height: 17px; border-radius: 50%; background: var(--accent); color: var(--on-accent); font: 700 10px/17px var(--font-sans); text-align: center; box-shadow: 0 0 0 2px var(--surface); }

.tpanel { --tl-px: 8px; --tr-px: 10px; --tr-sw: 30px; --tr-gap: 10px; --tr-py: 6px; --tr-r: calc(var(--r-l) - var(--tl-px));
  --tl-x0: calc(var(--tl-px) + var(--tr-px)); --tl-x1: calc(var(--tl-x0) + var(--tr-sw) + var(--tr-gap));
  background: var(--surface); display: flex; flex-direction: column; min-height: 0; z-index: 9; }
.tpanel > .handle { display: none; }
.tpanel .sheet-head { padding: 8px 12px 0 var(--tl-x0); flex: none; }
.tpanel .sheet-head h2 { font-size: 20px; }
#st-collapse { display: none; margin-right: 6px; }
.overall { padding: 4px var(--tl-x0) 10px; flex: none; }
.ov-top { display: flex; flex-wrap: nowrap; align-items: center; gap: 10px; min-height: 32px; }
.ov-top b { margin-left: auto; min-width: 0; color: var(--ink); font: 600 14px/20px var(--font-sans); text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.overall .prog { margin-top: 8px; }
.ov-kinds { margin-top: 6px; font: 500 12px/16px var(--font-sans); color: var(--ink-2); font-variant-numeric: tabular-nums; }
[data-layout="land"] .ov-kinds { display: none; }
.tl-count { position: relative; flex: none; display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 9px 0 12px; border-radius: var(--r-pill); background: var(--surface-sunk); color: var(--ink); font: 600 13px/1 var(--font-sans); white-space: nowrap; }
.tl-count svg.i { width: 15px; height: 15px; color: var(--ink-2); }
.tl-count::after { content: ""; position: absolute; left: 0; right: 0; top: -5px; bottom: -9px; }
.tl-count:focus-visible { outline: 2px solid var(--accent-ring); outline-offset: 2px; }
@media (hover: hover) { .tl-count:hover { background: var(--accent-tint); } }
.tl-head { display: flex; align-items: center; gap: 6px; min-height: 44px; padding: 2px var(--tl-x0) 6px; overflow-x: auto; scrollbar-width: none; flex: none; border-bottom: 1px solid var(--line-soft); }
.tl-head::-webkit-scrollbar { display: none; }
.tl-head { -webkit-mask-image: linear-gradient(to right, transparent 0, #000 var(--fadeL, 0px), #000 calc(100% - var(--fadeR, 0px)), transparent 100%);
  mask-image: linear-gradient(to right, transparent 0, #000 var(--fadeL, 0px), #000 calc(100% - var(--fadeR, 0px)), transparent 100%); }
.tl-head .sort { height: 32px; }
.tl-head .sort-tx { padding: 0 28px 0 12px; font: 500 13px/32px var(--font-sans); }
.tl-head .sort svg.i.chev { right: 8px; width: 14px; height: 14px; }
.tl-head .sort.on { box-shadow: inset 0 0 0 1.5px var(--accent); }
.tl-head .sort.on .sort-tx, .tl-head .sort.on svg.i { color: var(--accent-ink); }
.tl-dot { display: none; }
.tl-head .sort.tl-color .tl-dot { display: block; position: absolute; left: 7px; width: 18px; height: 18px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px var(--swatch-ring); pointer-events: none; }
.tl-head .sort.tl-color .sort-tx { padding: 0 34px 0 31px; }
.tl-head .sort.tl-color svg.i.chev { display: none; }
.tl-fx { position: absolute; right: 2px; top: 2px; z-index: 1; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; color: var(--accent-ink); }
.tl-fx[hidden] { display: none; }
.tl-head .tl-fx svg.i { position: static; width: 16px; height: 16px; }
.tl-fx::after { content: ""; position: absolute; inset: -8px; }
.tl-fx:focus-visible { outline: 2px solid var(--accent-ring); outline-offset: 1px; }
@media (hover: hover) { .tl-fx:hover { background: var(--accent-tint); } }
.tl-gear { position: relative; flex: none; display: grid; place-items: center; width: 32px; height: 32px; margin-left: auto; border-radius: 50%; color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line-strong); }
.tl-prog { display: none; }
[data-layout="land"] .tl-prog { position: relative; flex: none; display: grid; place-items: center; width: 32px; height: 32px; margin-left: auto; border-radius: 50%; color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line-strong); }
[data-layout="land"] .tl-prog svg.i { width: 18px; height: 18px; }
[data-layout="land"] .tl-prog + .tl-gear { margin-left: 2px; }
[data-layout="land"] #st-panel:not(.ptab-progress) > .sheet-head { display: none; }
@media (hover: hover) { [data-layout="land"] .tl-prog:hover { background: var(--accent-tint); } }
[data-layout="land"] .tl-prog:focus-visible { outline: 2px solid var(--accent-ring); outline-offset: 1px; }
.tl-gear svg.i { width: 18px; height: 18px; }
.tl-gear.on { color: var(--accent-ink); box-shadow: inset 0 0 0 1.5px var(--accent); }
.tl-gear:focus-visible { outline: 2px solid var(--accent-ring); outline-offset: 1px; }
@media (hover: hover) { .tl-gear:hover { background: var(--accent-tint); } }
.rows-card .vw-mk:not([hidden]) ~ .vw-mk { border-top: 1px solid var(--line-soft); }
.vw-mk.sel-flt { flex-direction: row; align-items: center; gap: 12px; }
.sel-flt .grow { display: flex; flex-direction: column; gap: 2px; padding: 0 4px; }
.seg.seg-col { display: flex; flex-direction: column; align-items: stretch; border-radius: var(--r-m); }
.seg.seg-col button { height: auto; min-height: 40px; padding: 9px 14px; border-radius: calc(var(--r-m) - 3px); font-size: 14px; line-height: 18px; text-align: left; white-space: normal; }
@media (pointer: coarse) { .seg.seg-col button { min-height: 44px; } }
.tgroup { position: sticky; top: -4px; z-index: 1; display: flex; align-items: baseline; gap: 8px; padding: 10px var(--tr-px) 4px; background: var(--surface); color: var(--ink-2); font: 600 13px/18px var(--font-sans); }
.tgroup .tg-n { font-weight: 500; font-variant-numeric: tabular-nums; }
.tl-empty { padding: 20px var(--tl-x0); font: 400 14px/20px var(--font-sans); color: var(--ink-2); text-align: center; }
.tlist { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 4px var(--tl-px) calc(16px + env(safe-area-inset-bottom)); }
.trow { width: 100%; min-height: 44px; display: grid; grid-template-columns: var(--tr-sw) minmax(0, 1fr); grid-template-areas: "sw l1" "sw prog"; column-gap: var(--tr-gap); row-gap: 3px; align-items: center; align-content: center; padding: var(--tr-py) var(--tr-px); border-radius: var(--tr-r); text-align: left; }
@media (pointer: fine) { .trow { min-height: 40px; } }
.trow .sw { grid-area: sw; position: relative; width: var(--tr-sw); height: var(--tr-sw); font-size: calc(var(--tr-sw) * .46); }
.sw-n { position: absolute; right: -5px; bottom: -4px; min-width: 15px; height: 15px; padding: 0 3px; border-radius: 8px; background: var(--surface); color: var(--ink); font: 700 10px/15px var(--font-sans); font-style: normal; text-align: center; box-shadow: 0 0 0 1.5px var(--line-strong); }
.tr-l1 { grid-area: l1; display: flex; align-items: baseline; gap: 6px; min-width: 0; white-space: nowrap; overflow: hidden; }
.tr-code { flex: 0 1 auto; min-width: 0; max-width: 50%; font: 600 14px/20px var(--font-sans); color: var(--ink); overflow: hidden; text-overflow: ellipsis; }
.tr-tag { flex: none; font: 500 12px/20px var(--font-sans); font-style: normal; color: var(--ink-2); }
.tr-kind { flex: 1 1 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.tr-l1:has(> .tr-kind) > .tr-code { max-width: none; }
.tr-kind ~ .tr-nm { display: none; }
.tr-nm { flex: 1 1 0; min-width: 0; font: 400 13px/20px var(--font-sans); color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; }
.tr-left { flex: none; margin-left: auto; padding-left: 4px; font: 600 14px/20px var(--font-sans); color: var(--ink); text-align: right; font-variant-numeric: tabular-nums; }
.tr-left .c-n { display: inline-block; min-width: var(--tr-num, 0); text-align: right; }
.trow .prog { grid-area: prog; height: 3px; }
.trow .vh, .ov-top .vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.trow.on { background: var(--accent-tint); }
.trow.on .tr-left { color: var(--accent-ink); }
.trow.fin .tr-left { color: var(--ok); font-weight: 600; }
.trow.fin:not(.on) .tr-code, .trow.fin:not(.on) .tr-nm { opacity: .62; }
.trow.nomark .prog { visibility: hidden; }
@media (hover: hover) { .trow:not(.on):hover { background: var(--surface-2); } }

[data-layout="phone"] #stitch .st-stage, [data-layout="tablet"] #stitch .st-stage { position: absolute; inset: 0; }
[data-layout="phone"] .st-bar, [data-layout="tablet"] .st-bar { position: absolute; top: 0; left: 0; right: 0; height: calc(var(--bar-h) + env(safe-area-inset-top)); padding-top: env(safe-area-inset-top); padding-left: calc(6px + var(--sl)); padding-right: calc(6px + var(--sr)); }
[data-layout="phone"] .bar-edit, [data-layout="phone"] .bar-view, [data-layout="tablet"] .bar-edit { display: none; }
[data-layout="phone"] .st-dock, [data-layout="tablet"] .st-dock { display: block; position: absolute; left: 0; right: 0; bottom: 0; border-radius: var(--r-xl) var(--r-xl) 0 0; box-shadow: var(--shadow-up), 0 -1px 0 var(--line); padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
[data-layout="phone"] .st-float { display: flex; top: calc(var(--bar-h) + env(safe-area-inset-top) + 12px); left: calc(12px + var(--sl)); }
[data-layout="tablet"] .st-tools, [data-layout="tablet"] #stitch.dock-min .st-dock .st-tools { padding: 8px 18px; gap: 6px; }
[data-layout="tablet"] .strip { padding: 4px 22px 4px; gap: 14px; }
[data-layout="tablet"] .st-bar { height: calc(64px + env(safe-area-inset-top)); padding-left: calc(10px + var(--sl)); padding-right: calc(14px + var(--sr)); gap: 6px; }
[data-layout="tablet"] .st-title b { font-size: 20px; line-height: 26px; }
[data-layout="tablet"] .st-title > span { font-size: 14px; }
[data-layout="phone"] .offline-pill, [data-layout="tablet"] .offline-pill { top: calc(var(--bar-h) + env(safe-area-inset-top) + 64px); }
[data-layout="phone"] .tpanel, [data-layout="tablet"] .tpanel { position: absolute; left: 0; right: 0; bottom: 0; top: calc(env(safe-area-inset-top) + 196px); border-radius: var(--r-xl) var(--r-xl) 0 0; box-shadow: var(--shadow-up), 0 -1px 0 var(--line); transform: translateY(105%); transition: transform .22s ease; visibility: hidden; }
[data-layout="tablet"] .tpanel { top: max(240px, 30%); }
[data-layout="phone"] #stitch.panel-open .tpanel, [data-layout="tablet"] #stitch.panel-open .tpanel { transform: none; visibility: visible; }
[data-layout="phone"] .tpanel > .handle, [data-layout="tablet"] .tpanel > .handle { display: block; }
[data-layout="phone"] #st-collapse, [data-layout="tablet"] #st-collapse { display: grid; }
[data-layout="phone"] .tpanel .sheet-head, [data-layout="tablet"] .tpanel .sheet-head { padding: 0 8px 0 var(--tl-x0); }
[data-layout="phone"] .tpanel, [data-layout="tablet"] .tpanel { --tr-r: calc(var(--r-xl) - var(--tl-px)); }
[data-hand="left"][data-layout="phone"] .st-float { left: auto; right: calc(12px + var(--sr)); }
.st-scrim { position: absolute; inset: 0; z-index: 8; }

[data-layout="wide"] #stitch { display: grid; grid-template-columns: minmax(0, 1fr) 360px; grid-template-rows: auto minmax(0, 1fr); grid-template-areas: "bar bar" "stage panel"; column-gap: 14px; padding: 0 calc(14px + var(--sr)) calc(14px + env(safe-area-inset-bottom)) calc(14px + var(--sl)); }
[data-layout="wide"] .st-bar { grid-area: bar; height: calc(64px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 0 0; margin: 0 -4px; gap: 6px; background: none; border: 0; -webkit-backdrop-filter: none; backdrop-filter: none; }
[data-layout="wide"] .st-title b { font-size: 20px; line-height: 26px; }
[data-layout="wide"] .st-title > span { font-size: 14px; }
[data-layout="wide"] .st-stage { grid-area: stage; border-radius: var(--r-l); border: 1px solid var(--line); }
[data-layout="wide"] .tpanel { grid-area: panel; border: 1px solid var(--line); border-radius: var(--r-l); overflow: hidden; overflow: clip; }
[data-layout="wide"] .tlist { padding-bottom: 12px; }
[data-layout="wide"] #stitch.panel-off { grid-template-columns: minmax(0, 1fr); grid-template-areas: "bar" "stage"; }
[data-layout="wide"] #stitch.panel-off .tpanel { display: none; }
[data-layout="wide"] .st-scrim { display: none !important; }
@media (pointer: coarse) {
  [data-hand="left"][data-layout="wide"] #stitch:not(.panel-off) { grid-template-columns: 360px minmax(0, 1fr); grid-template-areas: "bar bar" "panel stage"; }
  [data-hand="left"][data-layout="wide"] .st-back { order: -2; }
  [data-hand="left"][data-layout="wide"] .st-bar > .bar-edit { order: -1; }
}

[data-layout="desk"] #stitch { display: grid; grid-template-columns: minmax(0, 1fr) 360px; grid-template-rows: auto minmax(0, 1fr); grid-template-areas: "bar bar" "stage panel"; column-gap: 20px; padding: 0 24px 22px; }
[data-layout="desk"] .st-bar { grid-area: bar; background: none; border: 0; -webkit-backdrop-filter: none; backdrop-filter: none; padding: 18px 0 0; align-items: flex-start; gap: 6px; }
[data-layout="desk"] .bar-view .sep { display: none; }
[data-layout="desk"] .st-title { padding: 0; }
[data-layout="desk"] .st-title b { font: 600 28px/34px var(--font-serif); letter-spacing: -0.01em; }
[data-layout="desk"] .st-title > span { display: none; }
[data-layout="desk"] .d-sub { display: flex; align-items: center; gap: 12px; margin-top: 4px; font-size: 14px; color: var(--ink-2); white-space: nowrap; }
[data-layout="desk"] .st-bar { flex-wrap: wrap; row-gap: 0; }
[data-layout="desk"] .st-title { display: contents; }
[data-layout="desk"] .st-title b { flex: 1 1 0; min-width: 0; white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow-wrap: anywhere; }
[data-layout="desk"] .d-sub { order: 1; flex: 1 0 100%; min-width: 0; padding-left: calc(var(--tap) + 6px); }
[data-layout="desk"] .d-sub > span { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
[data-layout="desk"] .d-sub .prog { width: 120px; flex: none; }
[data-layout="desk"] .d-sub strong { color: var(--ink); font-weight: 600; }
[data-layout="desk"] .bar-edit, [data-layout="desk"] .bar-view { margin-top: 2px; }
[data-layout="desk"] .st-bar { container: stbar / inline-size; }
@container stbar (max-width: 1039px) {
  [data-layout="desk"] .st-title b { font-size: 24px; line-height: 30px; }
  [data-layout="desk"] .st-bar .sep { margin: 0; }
}
[data-layout="wide"] .st-bar { container: stbar / inline-size; }
@container stbar (max-width: 1189px) {
  #stitch.tools-two .st-bar .js-drag, #stitch.tools-two .st-bar .js-erase { width: 44px; padding: 0; justify-content: center; }
  #stitch.tools-two .st-bar .js-drag span, #stitch.tools-two .st-bar .js-erase span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
[data-layout="desk"] .st-stage { grid-area: stage; margin-top: 16px; border-radius: var(--r-l); border: 1px solid var(--line); }
[data-layout="desk"] .kbd-hint { display: block; }
[data-layout="desk"] .tpanel { grid-area: panel; margin-top: 16px; border: 1px solid var(--line); border-radius: var(--r-l); overflow: hidden; overflow: clip; }
[data-layout="desk"] .tpanel { --tl-px: 6px; --tr-px: 8px; --tr-sw: 28px; --tr-py: 5px; }
[data-layout="desk"] .tpanel .sheet-head { padding: 6px 12px 0 var(--tl-x0); min-height: 48px; }
[data-layout="desk"] .overall { padding: 2px var(--tl-x0) 10px; }
[data-layout="desk"] .tlist { padding-bottom: 12px; }
[data-layout="desk"] .st-scrim { display: none !important; }
[data-layout="desk"] #stitch.panel-off { grid-template-columns: minmax(0, 1fr); grid-template-areas: "bar" "stage"; }
[data-layout="desk"] #stitch.panel-off .tpanel { display: none; }

[data-layout="land"] #stitch { --land-pw: clamp(280px, 36vw, 340px); --stage-il: 0px; display: grid; grid-template-columns: calc(var(--land-pw) + var(--sl)) minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); grid-template-areas: "bar stage" "panel stage"; }
[data-layout="land"] .st-stage { grid-area: stage; }
[data-layout="land"] .st-float { display: flex; flex-direction: column; align-items: flex-start; top: 10px; left: 10px; }
[data-layout="land"] .st-float .seg { grid-auto-flow: row; border-radius: 22px; }
[data-layout="land"] .st-float .js-mode.seg-ic button { width: 40px; }
[data-layout="land"] #stitch.fit-on.center-on .st-float { display: grid; grid-template-columns: 44px 44px; align-items: start; justify-items: start; }
[data-layout="land"] #stitch.fit-on.center-on .st-float > :not(.js-fit):not(.js-center) { grid-column: 1; }
@media (pointer: coarse) { [data-layout="land"] .st-float .seg button { height: 42px; } }
.st-isl { position: absolute; z-index: 4; display: none; flex-direction: column; gap: 8px; }
[data-layout="land"] .st-isl { display: flex; }
[data-layout="land"] .st-isl .icon-btn { background: var(--bar); box-shadow: var(--shadow-1), inset 0 0 0 1px var(--line); }
[data-layout="land"] .st-isl-tr { top: 10px; right: calc(10px + var(--sr)); }
[data-layout="land"] .st-isl-bl { left: 10px; bottom: calc(8px + env(safe-area-inset-bottom)); }
[data-layout="land"] .st-isl-bl.row { flex-direction: row; }
[data-layout="land"] .st-isl .ur-pair { grid-auto-flow: row; border-radius: 22px; background: var(--bar); box-shadow: var(--shadow-1), inset 0 0 0 1px var(--line); }
[data-layout="land"] .st-isl-bl.row .ur-pair { grid-auto-flow: column; border-radius: var(--r-pill); }
[data-layout="land"] .st-isl .ur-pair button { width: 40px; height: 42px; }
[data-layout="land"] .st-isl-bl.row .ur-pair button { width: 42px; height: 40px; }
[data-hand="left"][data-layout="land"] #stitch:not(.marks-xr) .st-isl-bl, [data-layout="land"] #stitch.marks-xl .st-isl-bl { left: auto; right: calc(10px + var(--sr)); }
[data-layout="land"] .st-bar { grid-area: bar; gap: 2px; padding: calc(4px + env(safe-area-inset-top)) 4px 4px calc(6px + var(--sl)); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line-soft); background: var(--surface); }
[data-layout="land"] .st-title b { font-size: 15px; line-height: 20px; }
[data-layout="land"] .st-title > span { font-size: 12px; line-height: 16px; white-space: normal; }
[data-layout="land"] .st-bar .icon-btn { width: 40px; height: 40px; }
@media (pointer: coarse) { [data-layout="land"] .st-bar .icon-btn { width: 42px; height: 42px; } }
[data-layout="land"] .bar-edit, [data-layout="land"] .bar-view { display: none; }
.st-land-tog, .st-land-hide, .st-rail-thr, .land-grip { display: none; }
[data-layout="land"] .st-land-tog { display: grid; color: var(--ink-2); }
[data-layout="land"] .st-land-tog[aria-expanded="true"] { color: var(--accent-ink); }
[data-layout="land"] .tpanel { grid-area: panel; padding-left: var(--sl); border-right: 1px solid var(--line); }
[data-layout="land"] .tpanel .sheet-head { min-height: 0; padding: 8px 6px 0 var(--tl-x0); }
[data-layout="land"] .tpanel .sheet-head h2 { font-size: 16px; line-height: 22px; }
[data-layout="land"] .overall { padding: 8px var(--tl-x0) 6px; }
[data-layout="land"] .ov-top b { font-size: 13px; }
[data-layout="land"] .overall .prog { margin-top: 6px; }
[data-layout="land"] .tpanel { --tr-sw: 26px; --tr-px: 8px; --tr-gap: 8px; --tr-py: 5px; }
[data-layout="land"] .tl-head { min-height: 40px; padding: 0 var(--tl-x0) 4px; }
[data-layout="land"] .tl-head { flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; }
[data-layout="land"] .trow .tr-nm { display: none; }
[data-layout="phone"] #st-list { container: tlist / inline-size; }
@container tlist (max-width: 329px) {
  .trow .tr-nm { display: none; }
}
@media (pointer: coarse) {
  .tl-head, [data-layout="land"] .tl-head { padding-top: 6px; padding-bottom: 6px; }
  .tl-head .sort-sel { top: -6px; height: calc(100% + 12px); }
  .tl-head .tl-gear::after, .ov-top .tl-gear::after, .ov-top .tl-prog::after { content: ""; position: absolute; inset: -6px; }
}
[data-layout="land"] .st-scrim { display: none !important; }
[data-layout="land"] #stitch.land-off { grid-template-columns: calc(60px + var(--sl)) minmax(0, 1fr); grid-template-areas: "bar stage" "strip stage"; }
[data-layout="land"] #stitch.land-off .tpanel { display: none; }
[data-layout="land"] #stitch.land-off .st-bar { flex-direction: column; align-items: center; gap: 4px; padding: calc(6px + env(safe-area-inset-top)) 0 4px var(--sl); }
[data-layout="land"] #stitch.land-off .st-title { display: none; }
[data-layout="land"] #stitch.land-off .st-dock { display: flex; flex-direction: column; grid-area: strip; min-height: 0; padding-left: var(--sl); border-right: 1px solid var(--line); }
[data-layout="land"] #stitch.land-off .st-dock > :not(.strip) { display: none !important; }
[data-layout="land"] #stitch.land-off .strip { flex: 1; min-height: 0; flex-direction: column; align-items: center; gap: 8px; padding: 8px 0 calc(8px + env(safe-area-inset-bottom)); overflow-x: hidden; overflow-y: auto; scroll-padding: 8px 0; }

#stitch:not(.fit-on) .js-fit { display: none; }
#stitch:not(.center-on) .js-center { display: none; }
.st-marks { position: absolute; z-index: 4; display: none; right: calc(var(--marks-x, 12px) + var(--stage-ir, var(--sr))); bottom: var(--marks-b, calc(12px + env(safe-area-inset-bottom))); }
#stitch.marks-island .st-marks { display: flex; }
[data-hand="left"] #stitch:not(.marks-xr) .st-marks, #stitch.marks-xl .st-marks { right: auto; left: calc(var(--marks-x, 12px) + var(--stage-il, var(--sl))); }
[data-layout="land"] .st-marks { bottom: calc(8px + env(safe-area-inset-bottom)); }
#stitch.marks-t .st-marks { bottom: auto; top: var(--marks-t, calc(12px + env(safe-area-inset-top))); }
#stitch.marks-island #st-bar .js-drag, #stitch.marks-island #st-bar .js-erase, #stitch.marks-island #st-dock .js-drag, #stitch.marks-island #st-dock .js-erase { display: none; }
.mk-pair { padding: 4px; gap: 4px; }
.mk-pair button { width: 44px; height: 44px; padding: 0; }
.mk-pair svg.i { width: 22px; height: 22px; }
#stitch.marks-big .mk-pair { padding: 5px; gap: 6px; }
#stitch.marks-big .mk-pair button { width: 66px; height: 66px; }
#stitch.marks-big .mk-pair svg.i { width: 32px; height: 32px; }
[data-hand="left"] .kbd-hint { left: auto; right: 12px; }
.js-mode button, .js-glasses, .js-needle, .js-drag, .js-erase { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }

.st-isl-b { display: none; }
[data-layout="phone"] #stitch .st-dock { display: none; }
[data-layout="phone"] .st-isl-b { position: absolute; z-index: 4; left: calc(12px + var(--sl)); right: calc(12px + var(--sr)); bottom: calc(12px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: end; gap: 8px; pointer-events: none; }
[data-layout="phone"] .st-isl-b.mk-top { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
[data-layout="phone"] .st-isl-b { transition: background-color .22s ease, box-shadow .22s ease; }
[data-layout="phone"] #st-stage > .strip { position: absolute; z-index: 4; left: calc(12px + var(--sl)); right: calc(12px + var(--sr)); bottom: var(--strip-b, 76px); gap: 10px; padding: 4px 12px 4px; border-radius: 22px; background: var(--bar); box-shadow: var(--shadow-1), inset 0 0 0 1px var(--line); scroll-padding: 0 12px; }
[data-layout="phone"] #stitch.panel-open #st-stage > .strip, [data-layout="phone"] #stitch.area-edit #st-stage > .strip { display: none; }
[data-layout="phone"] #stitch.panel-open .st-isl-b { z-index: 10; left: 0; right: 0; bottom: 0; padding: 10px calc(12px + var(--sr)) calc(12px + env(safe-area-inset-bottom)) calc(12px + var(--sl)); background: var(--surface); box-shadow: 0 -1px 0 var(--line-soft); pointer-events: auto; }
.st-isl-b > * { pointer-events: auto; grid-row: 1; }
.st-isl-b > .ur-pair { grid-column: 1; justify-self: start; }
.st-isl-b > #st-all { grid-column: 2; justify-self: center; }
.st-isl-b > .st-marks { grid-column: 3; justify-self: end; position: static; }
.st-isl-b.mk-left > .ur-pair { grid-column: 3; justify-self: end; }
.st-isl-b.mk-left > .st-marks { grid-column: 1; justify-self: start; }
#stitch.isl-fit3 .st-isl-b > .ur-pair, #stitch.isl-fit3 .st-isl-b > #st-all { grid-row: 2; }
#stitch.isl-fit3 .st-isl-b > .st-marks { grid-column: 1 / -1; }
.st-isl-b > .ur-pair { padding: 4px; gap: 4px; background: var(--bar); box-shadow: var(--shadow-1), inset 0 0 0 1px var(--line); }
.st-isl-b > .ur-pair button { width: 44px; height: 44px; }
[data-layout="phone"] #stitch .st-isl-b > #st-all { height: 52px; padding: 0 18px 0 16px; gap: 8px; background: var(--bar); box-shadow: var(--shadow-1), inset 0 0 0 1px var(--line); }
[data-layout="phone"] #stitch .st-isl-b > #st-all .lbl-short { display: inline; }
[data-layout="phone"] #stitch .st-isl-b > #st-all .lbl-long { display: none; }
[data-layout="phone"] #stitch.isl-fit2 .st-isl-b > #st-all { width: 52px; padding: 0; justify-content: center; }
#stitch.isl-fit2 .st-isl-b #st-all .lbl-short { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.dock-grip { display: block; position: relative; width: 120px; height: 32px; margin: 0 auto; padding: 0; border: 0; background: none; cursor: pointer; touch-action: none; }
.dock-grip::after { content: ""; position: absolute; inset: -12px -20px 0; }
.dock-grip .handle { margin: 14px auto; }
#stitch.dock-min .st-dock .strip { display: none; }
#stitch.dock-min .st-dock .st-tools { padding-bottom: 2px; }
#st-all { gap: 8px; padding: 0 16px 0 12px; }
#st-all .lbl-long { display: none; }
#st-all .lbl-short { display: inline; }
#st-all[aria-expanded="true"] svg.i { color: var(--accent-ink); }
[data-layout="phone"] #stitch.panel-open .st-dock, [data-layout="tablet"] #stitch.panel-open .st-dock { z-index: 10; border-radius: 0; box-shadow: 0 -1px 0 var(--line-soft); }
#stitch.panel-open .st-dock .strip, #stitch.panel-open .st-dock .dock-grip { display: none !important; }
[data-layout="land"] #stitch.land-off .st-dock .strip { display: flex; }
#stitch .strip.strip-none { display: none !important; }
[data-layout="phone"] #stitch.strip-off #st-stage > .strip { display: none; }
.strip-x { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 44px; flex: none; padding-top: 4px; }
.strip-x small { font: 600 12px/14px var(--font-sans); color: var(--ink-2); white-space: nowrap; }
.strip-x .sw-x { background: var(--surface-2); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line); }
.strip-x .sw-x .i { width: 18px; height: 18px; }
[data-layout="phone"] #stitch.panel-open .st-dock .st-tools, [data-layout="tablet"] #stitch.panel-open .st-dock .st-tools { padding-top: 10px; }
[data-layout="phone"] .tlist, [data-layout="tablet"] .tlist,
[data-layout="phone"] .tprog, [data-layout="tablet"] .tprog { padding-bottom: calc(var(--dock-h, 72px) + 8px); }
[data-layout="phone"] .tpanel > .handle, [data-layout="tablet"] .tpanel > .handle { width: auto; height: 16px; margin: 0; background: none; border-radius: var(--r-xl) var(--r-xl) 0 0; touch-action: none; }
[data-layout="phone"] .tpanel > .handle::before, [data-layout="tablet"] .tpanel > .handle::before { content: ""; display: block; width: 36px; height: 4px; margin: 8px auto 0; border-radius: 99px; background: var(--line-strong); }
[data-layout="phone"] .tpanel .sheet-head, [data-layout="tablet"] .tpanel .sheet-head { touch-action: none; }


.pg-periods { display: flex; width: 100%; margin-top: 12px; }
.pg-periods button { flex: 1; padding: 0 4px; }
@media (max-width: 429px) {
  .pg-periods { display: grid; grid-template-columns: 1fr 1fr; grid-auto-flow: row; border-radius: 22px; }
  .pg-periods button { padding: 0 10px; }
}
@media (max-width: 429px) and (pointer: coarse) {
  .pg-periods { border-radius: 24px; }
  .pg-periods button { height: 40px; }
}
.pg-head { margin-top: 16px; }
.pg-big { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.pg-big b { font: 600 40px/44px var(--font-sans); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.pg-big span { font: 500 16px/20px var(--font-sans); color: var(--ink-2); }
.pg-sub { margin-top: 2px; font-size: 14px; line-height: 20px; color: var(--ink-2); }
.pg-sub b { color: var(--ink); font-weight: 600; }
.pg-card { margin-top: 14px; padding: 14px 14px 12px; }
.pg-card-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.pg-card-h h3 { font: 600 16px/22px var(--font-serif); white-space: nowrap; }
.pg-card-h span { font-size: 13px; line-height: 18px; color: var(--ink-2); min-width: 0; text-align: right; }
.pg-note { display: flex; align-items: center; gap: 10px; margin-top: 14px; font-size: 14px; color: var(--ink-2); }
.pg-notice { margin-top: 14px; align-items: center; }
.pg-notice p { flex: 1; min-width: 0; }
.pg-empty { padding: 6px 0 4px; font-size: 14px; line-height: 20px; color: var(--ink-2); }
.pg-bars { padding-top: 28px; border-radius: var(--r-s); outline: none; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.pg-bars:focus-visible, .pg-cal:focus-visible { box-shadow: 0 0 0 2px var(--accent-ring); }
.pg-plot { position: relative; display: flex; align-items: flex-end; gap: 2px; height: 96px; border-bottom: 1px solid var(--line); }
.pg-col { flex: 1 1 0; min-width: 0; height: 100%; display: flex; align-items: flex-end; justify-content: center; }
.pg-bar { display: block; width: 100%; max-width: 24px; height: max(3px, var(--h)); border-radius: 4px 4px 0 0; background: var(--accent); opacity: .72; }
.pg-bar.zero, .pg-col.future .pg-bar { height: 2px; border-radius: 1px; background: var(--line); opacity: 1; }
.pg-col.future .pg-bar { background: var(--line-soft); }
.pg-col.now .pg-bar, .pg-col.sel .pg-bar { opacity: 1; }
.pg-col.sel .pg-bar.zero { background: var(--ink-3); }
.pg-tip { position: absolute; left: 0; padding: 3px 8px; border-radius: 8px; background: var(--ink); color: var(--bg); font: 600 12px/16px var(--font-sans); white-space: nowrap; pointer-events: none; z-index: 2; font-variant-numeric: tabular-nums; }
.pg-axis { display: grid; margin-top: 6px; font: 500 11px/14px var(--font-sans); color: var(--ink-2); }
.pg-axis span { justify-self: center; white-space: nowrap; }
.pg-axis .start { justify-self: start; }
.pg-axis .end { justify-self: end; }
.pg-axis .now { color: var(--accent-ink); font-weight: 600; }
.pg-bars-s { padding-top: 26px; }
.pg-bars-s .pg-plot { height: 64px; }
.pg-cal { outline: none; border-radius: var(--r-s); touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.pg-cal-grid { --cal-gap: 4px; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: var(--cal-gap); }
.pg-wd { text-align: center; font: 600 11px/16px var(--font-sans); color: var(--ink-2); padding-bottom: 2px; }
.pg-day { position: relative; aspect-ratio: 1; border-radius: 8px; background: var(--chart-fabric); box-shadow: inset 0 0 0 1px var(--line-soft); display: grid; place-items: center; color: var(--accent); }
.pg-day[data-day]::after { content: ""; position: absolute; inset: calc(var(--cal-gap) / -2); }
@media (max-width: 599px) {
  .pg-month { container-type: inline-size; }
  .pg-month .pg-cal { margin-inline: clamp(-8px, calc((100cqw - 308px) / 2), 0px); }
}
.pg-day small { position: absolute; left: 5px; top: 3px; font: 500 11px/13px var(--font-sans); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.pg-day.blank { visibility: hidden; }
.pg-day.future { background: transparent; }
.pg-day.pre { background: repeating-linear-gradient(135deg, transparent 0 5px, var(--line-soft) 5px 6px); }
.pg-day.now { box-shadow: inset 0 0 0 2px var(--accent-ring); }
.pg-day.sel:not(.now) { box-shadow: inset 0 0 0 2px var(--ink); }
.pg-x { display: grid; place-items: center; width: 58%; height: 58%; }
.pg-day > .pg-x { width: 50%; height: 50%; transform: translate(12%, 18%); }
.pg-x svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.lv1 .pg-x svg, .pg-x.lv1 svg { opacity: .38; stroke-width: 2; }
.lv2 .pg-x svg, .pg-x.lv2 svg { opacity: .58; stroke-width: 2.3; }
.lv3 .pg-x svg, .pg-x.lv3 svg { opacity: .8; stroke-width: 2.6; }
.lv4 .pg-x svg, .pg-x.lv4 svg { opacity: 1; stroke-width: 2.9; }
.pg-legend { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 14px; margin-top: 10px; font-size: 12px; line-height: 16px; color: var(--ink-2); }
.pg-lg { display: inline-flex; align-items: center; gap: 5px; }
.pg-lv > span { white-space: nowrap; }
.pg-lg .pg-x { width: 18px; height: 18px; padding: 3px; border-radius: 5px; background: var(--chart-fabric); box-shadow: inset 0 0 0 1px var(--line-soft); color: var(--accent); }
.pg-lv { font-variant-numeric: tabular-nums; }
.pg-pick { margin-top: 8px; min-height: 18px; font-size: 13px; line-height: 18px; color: var(--ink-2); }
.pg-pick b { color: var(--ink); font-weight: 600; }
.pg-hint { margin-top: 4px; font-size: 12.5px; line-height: 17px; color: var(--ink-3); }
.pg-pts { display: flex; flex-direction: column; }
.pg-pt { position: relative; width: calc(100% + 16px); display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; align-items: center; min-height: 56px; margin: 0 -8px; padding: 8px; border-radius: var(--r-m); text-align: left; color: inherit; }
.pg-pt:not([hidden]) ~ .pg-pt::before { content: ""; position: absolute; left: 8px; right: 8px; top: 0; height: 1px; background: var(--line-soft); }
@media (hover: hover) { button.pg-pt:hover { background: var(--surface-2); } }
.pg-pt.gone { opacity: .72; }
canvas.hoop.pg-thumb, .hoop-empty.pg-thumb { width: 34px; height: 34px; margin: 3px; box-shadow: 0 0 0 2px var(--hoop), 0 0 0 3px var(--hoop-edge); }
.pg-pt-mid { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pg-pt-top { display: flex; align-items: baseline; gap: 10px; }
.pg-pt-top b { flex: 1; min-width: 0; font: 600 14px/18px var(--font-sans); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pg-pt-n { font: 600 14px/18px var(--font-sans); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pg-pt-bot { display: flex; align-items: center; gap: 10px; }
.pg-pt-bot .prog { flex: 1; height: 6px; }
.pg-pt-bot small { min-width: 3.4em; font-size: 12px; line-height: 16px; color: var(--ink-2); text-align: right; white-space: nowrap; }
.pg-pt-bot small.fin { color: var(--ok); font-weight: 600; }
.pg-recs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 -8px -6px; }
.pg-rec { min-width: 0; padding: 10px 8px; border-radius: 11px; background: var(--surface-2); }
.pg-rec b { display: block; font: 600 20px/24px var(--font-sans); letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.pg-rec small { display: block; font-size: 12px; line-height: 16px; color: var(--ink-2); overflow-wrap: anywhere; }
.pg-one { max-width: 760px; margin: 0 auto; }
.pg-back { display: inline-flex; align-items: center; gap: 4px; height: 44px; margin: 2px 0 0 -8px; padding: 0 14px 0 6px; border-radius: var(--r-pill); color: var(--accent-ink); font: 600 15px/1 var(--font-sans); }
.pg-back svg.i { width: 20px; height: 20px; }
@media (hover: hover) { .pg-back:hover { background: var(--accent-tint); } }
.pg-title { margin-top: 2px; font: 600 26px/32px var(--font-serif); letter-spacing: -0.01em; overflow-wrap: anywhere; }
.pg-sum { display: grid; grid-template-columns: 116px minmax(0, 1fr); gap: 16px; align-items: center; padding: 16px; }
.pg-ring { position: relative; width: 116px; height: 116px; flex: none; }
.pg-ring svg { display: block; width: 100%; height: 100%; }
.pg-ring-bg { fill: none; stroke: var(--line-soft); stroke-width: 9; }
.pg-ring-fg { fill: none; stroke: var(--accent); stroke-width: 9; stroke-linecap: round; }
.pg-ring-tx { position: absolute; inset: 0; display: grid; place-content: center; padding: 0 12px; text-align: center; }
.pg-ring-tx b { display: block; font: 600 26px/30px var(--font-sans); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.pg-ring-tx small { display: block; font-size: 12px; line-height: 15px; color: var(--ink-2); }
.pg-facts { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.pg-facts p { font-size: 13px; line-height: 17px; color: var(--ink-2); }
.pg-facts b { display: block; font: 600 15px/20px var(--font-sans); color: var(--ink); }
.pg-ths { display: flex; flex-direction: column; gap: 8px; }
.pg-th { display: flex; align-items: center; gap: 10px; min-height: 28px; font-size: 14px; line-height: 19px; }
.pg-th .sw { width: 28px; height: 28px; font-size: 13px; flex: none; }
.pg-th-name { flex: 1; min-width: 0; color: var(--ink-2); overflow-wrap: break-word; }
.pg-th-name b { color: var(--ink); font-weight: 600; }
.pg-th-left { font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pg-th.fin .pg-th-left { color: var(--ok); }
.pg-foot { display: flex; justify-content: center; margin-top: 18px; }
.pg-more { margin-top: 12px; min-height: 44px; width: 100%; }
@media (min-width: 600px) {
  .pg-day { aspect-ratio: auto; height: 56px; }
  .pg-day > .pg-x { width: 28px; height: 28px; }
}
[data-layout="land"] .pg-month { display: grid; grid-template-columns: minmax(312px, 1.4fr) minmax(0, 1fr); grid-template-rows: auto auto auto 1fr; column-gap: 24px; align-items: start; }
[data-layout="land"] .pg-month { padding-bottom: 17px; }
[data-layout="land"] .pg-month .pg-lg { flex-wrap: wrap; }
[data-layout="land"] .pg-cal-wrap { display: contents; }
[data-layout="land"] .pg-month .pg-cal { grid-column: 1; grid-row: 1 / -1; }
[data-layout="land"] .pg-month > .pg-card-h { grid-column: 2; flex-direction: column; align-items: flex-start; gap: 2px; margin-bottom: 12px; }
[data-layout="land"] .pg-month > .pg-card-h span { text-align: left; }
[data-layout="land"] .pg-month .pg-legend { grid-column: 2; justify-content: flex-start; margin-top: 0; }
[data-layout="land"] .pg-month .pg-pick, [data-layout="land"] .pg-month .pg-hint { grid-column: 2; }
[data-layout="land"] .pg-day { height: 40px; }
[data-layout="land"] .pg-day > .pg-x { width: 22px; height: 22px; }
@media (min-width: 980px) {
  #library[data-tab="progress"] .lib { --lib-w: 1100px; }
  .pg:not(.pg-one) { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 20px; align-items: start; margin-top: 8px; }
  .pg-main, .pg-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
  .pg:not(.pg-one) .pg-card, .pg-main .pg-head { margin-top: 0; }
  .pg-periods { display: inline-grid; width: auto; align-self: flex-start; margin-top: 0; }
  .pg-periods button { padding: 0 16px; }
  .pg-day { aspect-ratio: auto; height: 48px; }
  .pg-day > .pg-x { width: 26px; height: 26px; }
  .pg-bars:not(.pg-bars-s) .pg-plot { height: 132px; }
}

.tp-tabs { flex: 1; display: flex; min-width: 0; max-width: 380px; }
.tp-tabs button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 8px; }
.tp-tabs .count { margin-left: 0; font: 500 13px/1 var(--font-sans); color: var(--ink-2); }
#st-panel.ptab-progress > .overall, #st-panel.ptab-progress > .tl-head, #st-panel.ptab-progress > .tlist { display: none; }
.tprog { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 12px; padding: 6px 20px calc(18px + env(safe-area-inset-bottom)); }
.tprog > * { flex: none; }
.tprog .pg-notice, .tprog .pg-note { margin-top: 0; }
.pg-top { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 14px; align-items: center; }
.tprog .pg-ring { width: 88px; height: 88px; }
.tprog .pg-ring-tx { padding: 0 6px; }
.tprog .pg-ring-tx b { font-size: 21px; line-height: 24px; }
.pg-top-tx { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.pg-top-tx p { font-size: 13px; line-height: 17px; color: var(--ink-2); }
.pg-top-tx b { display: block; font: 600 15px/20px var(--font-sans); color: var(--ink); font-variant-numeric: tabular-nums; }
.pg-top-tx .pg-today { color: var(--accent-ink); }
.pg-sec { border-top: 1px solid var(--line-soft); padding-top: 10px; }
.pg-sec-h { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 4px; font: 600 13px/18px var(--font-sans); color: var(--ink-2); }
.pg-sec-h b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.pg-sec-h small { font: 500 13px/18px var(--font-sans); white-space: nowrap; }
.pg-line { font-size: 14px; line-height: 20px; color: var(--ink-2); }
.pg-line b { color: var(--ink); font-weight: 600; }
[data-layout="desk"] .tprog { padding: 8px 18px 16px; }
[data-layout="wide"] .tprog { padding-bottom: 16px; }
[data-layout="land"] .tpanel .sheet-head { grid-column: 1 / -1; padding-right: 14px; }
[data-layout="land"] .ov-top b { display: none; }
[data-layout="land"] .tr-left .c-n { min-width: 0; }
[data-layout="land"] .tp-tabs button { height: 32px; font-size: 13px; }
[data-layout="land"] .tprog { grid-column: 1 / -1; grid-row: 2 / -1; align-self: stretch; gap: 10px; padding: 8px 14px 12px 16px; }

.d-today { flex: none; color: var(--accent-ink); font-weight: 600; }
.sess-tx { display: block; }
.sess-tx b { font-weight: 600; }
.sess-tx small { display: flex; margin-top: 1px; font: 500 12.5px/17px var(--font-sans); opacity: .78; white-space: nowrap; }
.sess-tx .sess-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.sess-tx .sess-p { flex: none; white-space: pre; }

.goal-lead { font-size: 14px; line-height: 20px; color: var(--ink-2); }
.goal-num { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 8px; }
.goal-num b { font: 600 28px/34px var(--font-sans); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.goal-num span { font: 500 15px/20px var(--font-sans); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.prog.goal-bar { height: 8px; margin: 8px 0 10px; }
.goal-sub { font-size: 14px; line-height: 20px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.goal-sub:not([hidden]) ~ .goal-sub { margin-top: 2px; }
.goal-done, .goal-state { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 4px; font: 600 15px/21px var(--font-sans); color: var(--ink); font-variant-numeric: tabular-nums; }
.goal-done svg.i { width: 20px; height: 20px; margin-top: 0.5px; flex: none; color: var(--ok); stroke-width: 2.2; }
.goal-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.goal-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 40px; }
.goal-lbl { font: 600 14px/20px var(--font-sans); color: var(--ink); }
.goal-clear { margin-right: -12px; }
.sheet-goal .field { margin: 2px 0 10px; }
.sheet-goal input[type="date"] { display: block; min-width: 0; max-width: 100%; -webkit-appearance: none; appearance: none; text-align: left; padding-top: 15px; padding-bottom: 15px; line-height: 20px; }
.sheet-goal input[type="date"]::-webkit-date-and-time-value { text-align: left; margin: 0; line-height: 20px; min-height: 20px; }
.goal-quick { display: flex; margin: 0 0 12px; }
.goal-quick button { flex: 1; padding: 0 6px; font-variant-numeric: tabular-nums; }
.goal-hint { margin: -4px 0 12px; font-size: 13px; line-height: 18px; color: var(--ink-2); }
.goal-err { margin: -4px 0 10px; font-size: 14px; line-height: 20px; color: var(--danger); }
.sheet-goal .btn-primary { margin-top: 10px; }
.sheet-goal .btn-ghost.btn-block { margin-top: 6px; }
.goal-del { color: var(--danger); }
.pg-goal b { font-variant-numeric: tabular-nums; }

.js-needle { position: relative; }
.nd-n { min-width: 20px; height: 20px; padding: 0 6px; margin-right: -6px; border-radius: 10px; background: var(--accent-tint); color: var(--accent-ink); font: 700 11.5px/20px var(--font-sans); font-variant-numeric: tabular-nums; text-align: center; pointer-events: none; }
.tog[aria-pressed="true"] .nd-n { background: color-mix(in srgb, var(--on-accent) 22%, transparent); color: var(--on-accent); }
.icon-btn .nd-n { position: absolute; top: -5px; right: -5px; margin: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; line-height: 18px; font-size: 11px; background: var(--accent-ink); color: var(--surface); box-shadow: 0 0 0 2px var(--bar); }
.icon-btn.tog[aria-pressed="true"] .nd-n { background: var(--surface); color: var(--accent-ink); box-shadow: 0 0 0 2px var(--accent); }
[data-layout="phone"] .st-tools .js-needle, [data-layout="land"] .bar-edit .js-needle { display: none; }
#stitch.nd-on canvas.chart { cursor: crosshair; }

.orient-pill { position: absolute; left: 0; top: 0; z-index: 4; display: flex; align-items: center; gap: 6px; height: 36px; padding: 0 10px 0 11px; border-radius: var(--r-pill); background: var(--surface); color: var(--ink); font: 500 13px/18px var(--font-sans); white-space: nowrap; box-shadow: var(--shadow-2), inset 0 0 0 1px var(--line); }
.orient-pill::after { content: ''; position: absolute; inset: -4px 0; }
.orient-pill svg.i { width: 18px; height: 18px; color: var(--accent-ink); flex: none; }
.orient-pill .or-x { width: 16px; height: 16px; margin-left: 2px; color: var(--ink-2); }
@media (hover: hover) { .orient-pill:hover { background: var(--accent-tint); } }
.thr-pill { position: absolute; left: 0; top: 0; z-index: 4; display: flex; align-items: center; gap: 2px; height: 44px; max-width: calc(100% - 24px); max-width: min(calc(100% - 24px), var(--pill-max, 100%)); padding: 0 6px 0 0; border-radius: var(--r-pill); background: var(--surface); color: var(--ink); font: 600 14px/18px var(--font-sans); white-space: nowrap; box-shadow: var(--shadow-2), inset 0 0 0 1px var(--line); }
#stitch.panel-open .thr-pill { z-index: 9; }
.thr-pill.locked { box-shadow: var(--shadow-2), inset 0 0 0 1.5px var(--accent); }
.thr-main { position: relative; display: flex; align-items: center; gap: 8px; height: 44px; min-width: 0; padding: 0 6px 0 6px; border-radius: var(--r-pill); color: inherit; font: inherit; }
.thr-pill .sw { width: 32px; height: 32px; font-size: 15px; flex: none; }
.thr-tx { display: flex; flex-direction: column; min-width: 0; text-align: left; }
.thr-l1 { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.thr-pill b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.thr-pill .thr-l1 > b { flex: none; }
.thr-pill .thr-nm { min-width: 0; max-width: 12em; font: 400 13px/18px var(--font-sans); color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; }
.thr-pill .thr-n { flex: none; font: 500 13px/18px var(--font-sans); color: var(--ink-2); }
.thr-pill .thr-c { display: flex; gap: 0.3em; min-width: 0; font: 500 12px/16px var(--font-sans); color: var(--ink-2); font-variant-numeric: tabular-nums; overflow: hidden; }
.thr-pill .thr-cw { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.thr-pill .thr-cn { flex: none; }
.thr-pill .icon-btn { width: 32px; height: 32px; }
.thr-pill .icon-btn svg.i { width: 20px; height: 20px; }
.thr-btns { display: flex; align-items: center; height: 32px; flex: none; border-radius: var(--r-pill); background: var(--surface-sunk); }
@media (pointer: coarse) { .thr-btns .icon-btn { width: 44px; } }
@media (hover: hover) { .thr-main:hover { background: var(--accent-tint); } }
.area-pill .area-ic { width: 32px; height: 32px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--accent-tint); color: var(--accent-ink); }
.area-pill .area-ic svg.i { width: 20px; height: 20px; }
.area-bar { position: absolute; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 6; display: flex; align-items: center; gap: 8px; width: max-content; max-width: calc(100% - 24px); padding: 6px; border-radius: var(--r-pill); background: var(--surface); box-shadow: var(--shadow-2), inset 0 0 0 1px var(--line); }
.area-bar .area-size { min-width: 72px; padding: 0 4px; text-align: center; font: 600 14px/18px var(--font-sans); color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
[data-layout="tablet"] .area-bar { bottom: calc(var(--marks-b, 10px) + 4px); }
#stitch.area-edit #st-marks, #stitch.area-edit #st-isl-b, #stitch.area-edit #st-isl-bl, #stitch.area-edit .js-drag, #stitch.area-edit .js-erase, #stitch.area-edit #st-kbd { visibility: hidden; }
#stitch.area-edit canvas.chart { cursor: crosshair; }
.area-where { margin: 0; color: var(--ink-2); font: 500 14px/20px var(--font-sans); }
.area-prog { display: grid; gap: 8px; margin: 12px 0 6px; }
.area-prog b { font: 600 16px/22px var(--font-sans); font-variant-numeric: tabular-nums; }
.area-meter { height: 6px; border-radius: 3px; background: var(--surface-sunk); overflow: hidden; }
.area-meter i { display: block; height: 100%; width: var(--p, 0%); background: var(--accent); border-radius: 3px; }
.area-sub { margin: 14px 0 4px; font: 600 13px/18px var(--font-sans); color: var(--ink-2); }
.area-list { display: flex; flex-direction: column; gap: 2px; max-height: min(40vh, 360px); overflow-y: auto; }
.area-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 4px 8px; border-radius: var(--r-m); color: inherit; text-align: left; }
.area-row .sw { width: 32px; height: 32px; font-size: 15px; flex: none; }
.area-row .ar-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.area-row b { font: 600 15px/20px var(--font-sans); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.area-row .ar-c { font: 500 13px/18px var(--font-sans); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.area-row.fin .ar-tx { opacity: .62; }
.area-row.on { background: var(--accent-tint); }
@media (hover: hover) { .area-row:hover { background: var(--surface-2); } .area-row.on:hover { background: var(--accent-tint); } }
.area-m { margin-top: 12px; padding: 0 12px; border-radius: var(--r-m); background: var(--surface-2); }
.area-m summary { display: flex; align-items: center; min-height: 44px; gap: 8px; font: 600 14px/20px var(--font-sans); cursor: pointer; }
.area-m-row { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-top: 1px solid var(--line); font: 500 14px/20px var(--font-sans); font-variant-numeric: tabular-nums; }
.area-m-row span:last-child { flex: none; color: var(--ink-2); }
.area-m-note { margin: 8px 0 12px; font: 500 12px/17px var(--font-sans); color: var(--ink-2); }
.area-foot { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

.nd-list { display: flex; flex-direction: column; gap: 2px; }
.nd-row { display: flex; align-items: center; gap: 4px; border-radius: var(--r-m); }
@media (hover: hover) { .nd-row:hover { background: var(--surface-2); } }
.nd-go { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 6px 4px 6px 8px; border-radius: var(--r-m); text-align: left; }
.nd-dot { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--c, var(--ink-2)); color: var(--ci, var(--surface)); box-shadow: inset 0 0 0 1px var(--swatch-ring); }
.nd-dot.free { background: var(--surface-sunk); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line); }
.nd-dot svg.i { width: 20px; height: 20px; }
.nd-tx { min-width: 0; display: flex; flex-direction: column; }
.nd-tx b { font: 600 15px/20px var(--font-sans); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.nd-tx span { font: 500 13px/18px var(--font-sans); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.nd-x { color: var(--ink-2); }
.nd-note { margin: 8px 4px 0; font-size: 14px; line-height: 20px; color: var(--ink-2); }
.nd-foot { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

.vw-rots { display: flex; gap: 8px; margin-right: -4px; }
.vw-rot { width: 44px; height: 44px; background: var(--surface-sunk); }
@media (hover: hover) { .vw-rot:hover { background: var(--accent-tint); } }

@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
}
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .2s; animation-timing-function: cubic-bezier(.2, .8, .2, 1); animation-fill-mode: both; }
::view-transition-old(root) { animation-name: es-fade-out; }
::view-transition-new(root) { animation-name: es-fade-in; }
@keyframes es-fade-out { to { opacity: 0; } }
@keyframes es-fade-in { from { opacity: 0; } }

.nav-busy { position: fixed; left: 0; right: 0; top: env(safe-area-inset-top, 0px); height: 3px; z-index: 1000; overflow: hidden; pointer-events: none; opacity: 0; }
.nav-busy.on { opacity: 1; }
.nav-busy i { position: absolute; top: 0; bottom: 0; left: 0; width: 38%; border-radius: 0 3px 3px 0; background: var(--accent); will-change: transform; animation: es-busy 1.1s cubic-bezier(.4, 0, .2, 1) infinite; }
@keyframes es-busy { from { transform: translateX(-100%); } to { transform: translateX(270%); } }
@media (prefers-reduced-motion: reduce) { .nav-busy i { width: 100%; opacity: .55; animation: none; } }

:where(button, a[href], [role="tab"], [role="menuitem"], [role="radio"], [role="option"], summary):active:not(:disabled):not([aria-disabled="true"]) { opacity: .62; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation-duration: .01ms !important; }
}

@media (min-width: 600px) { .sheet-root > .sheet.sheet-thr { max-width: 560px; } }
.sheet-root > .sheet.sheet-thr { padding-bottom: 0; }
.thr-sub { display: flex; flex-wrap: wrap; gap: 2px 8px; margin: -2px 0 12px; font: 400 14px/19px var(--font-sans); color: var(--ink-2); }
.thr-sub b { min-width: 0; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.thr-opts { display: flex; flex-direction: column; padding: 2px 14px; border-radius: var(--r-l); background: var(--surface-2); }
.thr-opt { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; padding: 10px 0; }
.thr-opt:not([hidden]) ~ .thr-opt { border-top: 1px solid var(--line); }
.thr-ol { display: flex; flex-direction: column; gap: 1px; min-width: 0; font: 500 15px/20px var(--font-sans); }
.thr-oh { font: 400 12.5px/16px var(--font-sans); color: var(--ink-2); }
@media (max-width: 599px) {
  .thr-opt:has(.thr-oh) { row-gap: 18px; }
  .thr-opt:has(.thr-oh) > .thr-ol { flex-basis: 100%; }
}
.thr-fab { flex: 0 1 auto; max-width: 100%; height: auto; min-height: 36px; }
.thr-fab .sort-tx { padding: 9px 30px 9px 14px; line-height: 18px; white-space: normal; }
.thr-own-ctl { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.thr-own .thr-own-n { width: 76px; height: 36px; margin: 0; padding: 0 10px; text-align: center; }
.thr-seg { background: var(--surface-sunk); }
.thr-seg button { min-width: 40px; padding: 0 12px; }
@media (pointer: coarse) { .thr-seg button { min-width: 44px; } }
.thr-sizes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0 4px; }
.thr-sizes > div { padding: 10px 14px; border-radius: var(--r-m); background: var(--surface-2); }
.thr-sizes dt { font: 500 13px/17px var(--font-sans); color: var(--ink-2); }
.thr-sizes dt small { display: block; font-size: 12px; line-height: 16px; }
.thr-sizes dd { margin: 4px 0 0; font: 600 20px/24px var(--font-sans); font-variant-numeric: tabular-nums; white-space: nowrap; }
.thr-tables { margin-top: 8px; }
.thr-tbl { width: 100%; border-collapse: collapse; table-layout: fixed; }
.thr-tbl col.thr-c-sw { width: 36px; }
.thr-tbl col.thr-w-x { width: 70px; }
.thr-tbl col.thr-w-m { width: 54px; }
.thr-tbl col.thr-w-s { width: 52px; }
.thr-tbl col.thr-w-b { width: 72px; }
.thr-tbl th { padding: 8px 0 6px; border-bottom: 1px solid var(--line); text-align: left; font: 600 12.5px/16px var(--font-sans); color: var(--ink-2); white-space: nowrap; }
.thr-tbl td { padding: 6px 0; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.thr-tbl .thr-c-n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.thr-tbl td.thr-c-n { font: 500 14px/18px var(--font-sans); }
.thr-tbl td.thr-s, .thr-tbl td.thr-b { font-weight: 600; }
.thr-tbl .sw { --chip: 28px; font-size: 13px; }
.thr-tbl col.thr-c-sw.thr-sw2 { width: 50px; }
.thr-tbl .sw.sw-multi { width: max-content; height: auto; min-width: var(--chip); min-height: var(--chip); padding: 4px 8px; border-radius: calc(var(--chip) / 2); grid-template-columns: repeat(2, minmax(11px, max-content)); gap: 2px 6px; }
.sw-multi i { font-style: normal; }
.thr-sw1 .thr-tbl .sw.sw-multi { grid-template-columns: max-content; }
.thr-tight .thr-tbl col.thr-c-sw.thr-sw2 { width: 40px; }
.thr-tight .thr-tbl col.thr-w-x { width: 56px; }
.thr-tight .thr-tbl col.thr-w-m { width: 44px; }
.thr-tight .thr-tbl col.thr-w-s { width: 40px; }
.thr-tight .thr-tbl col.thr-w-b { width: 56px; }
.thr-tight .thr-tbl th { font-size: 11px; }
.thr-tight .thr-tbl td.thr-c-n { font-size: 13px; }
.thr-tight .thr-tbl td.thr-c-name b { font-size: var(--thr-name-fs, 13px); line-height: 17px; }
.thr-tbl .thr-c-name { padding-right: 8px; }
.thr-tbl td.thr-c-name b, .thr-tbl td.thr-c-name span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thr-tbl td.thr-c-name b { font: 600 14px/18px var(--font-sans); white-space: normal; overflow-wrap: break-word; }
.thr-tbl td.thr-c-name span { font: 400 12.5px/16px var(--font-sans); color: var(--ink-2); }
.thr-tbl tfoot th, .thr-tbl tfoot td { padding: 8px 0 4px; border-top: 1px solid var(--line-strong); border-bottom: 0; font-weight: 600; color: var(--ink); }
.thr-tbl tfoot th { font: 600 14px/18px var(--font-sans); }
.thr-tbl tfoot th span { display: block; font: 400 12.5px/16px var(--font-sans); color: var(--ink-2); }
.thr-back { color: var(--ink-2); }
.thr-beads { margin-top: 14px; }
.thr-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.thr-notes { display: flex; flex-direction: column; gap: 4px; margin-top: 12px; font: 400 13px/18px var(--font-sans); color: var(--ink-2); }
.thr-pair { display: grid; }
.thr-pair > span { grid-area: 1 / 1; }
.thr-pair > .thr-alt { visibility: hidden; }
.thr-acts { position: sticky; bottom: 0; z-index: 1; display: flex; flex-wrap: wrap; gap: 10px; margin: 14px -20px 0; padding: 12px 20px calc(16px + env(safe-area-inset-bottom)); background: var(--surface); box-shadow: 0 -1px 0 var(--line-soft); }
.thr-acts .btn { flex: 1 1 140px; padding: 0 14px; }
@media (min-width: 600px) { .thr-acts { margin: 14px -24px 0; padding: 12px 24px 20px; } }
#thr-print { display: none; }
@media print {
  @page { size: A4 portrait; margin: 12mm 12mm 14mm; }
  html.thr-printing { color-scheme: light !important; }
  html.thr-printing, html.thr-printing body { height: auto !important; overflow: visible !important; background: #fff !important; color: #000 !important; }
  html.thr-printing body > :not(#thr-print) { display: none !important; }
  html.thr-printing #thr-print { display: block !important; color: #000; font: 10pt/1.35 var(--font-sans); -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  #thr-print .thp-head { display: flex; align-items: flex-start; gap: 6mm; margin-bottom: 4mm; }
  #thr-print .thp-img { flex: none; width: 40mm; height: 40mm; object-fit: contain; border: 0.3mm solid #bbb; border-radius: 2mm; background: #fff; }
  #thr-print .thp-hx { min-width: 0; }
  #thr-print h1 { margin: 0 0 1mm; font: 600 17pt/1.2 var(--font-serif); }
  #thr-print .thp-sub { margin: 0 0 3mm; color: #333; }
  #thr-print .thp-facts { display: grid; grid-template-columns: auto auto; justify-content: start; gap: 1mm 6mm; margin: 0; }
  #thr-print .thp-facts > div { display: contents; }
  #thr-print .thp-facts dt { color: #333; }
  #thr-print .thp-facts dd { margin: 0; font-weight: 600; }
  #thr-print .thp-tbl { width: 100%; margin-top: 3mm; border-collapse: collapse; }
  #thr-print .thp-tbl th { padding: 1.2mm 1.5mm; border-bottom: 0.4mm solid #000; text-align: left; font-size: 9pt; font-weight: 600; }
  #thr-print .thp-tbl td { padding: 0.9mm 1.5mm; border-bottom: 0.2mm solid #bbb; vertical-align: middle; }
  #thr-print .thp-tbl tr { break-inside: avoid; }
  #thr-print .thp-tbl .n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
  #thr-print .thp-tbl .b { font-weight: 600; white-space: nowrap; }
  #thr-print .thp-total td { border-top: 0.4mm solid #000; border-bottom: 0; font-weight: 600; }
  #thr-print .thp-sw { display: inline-grid; place-items: center; width: 6mm; height: 6mm; border-radius: 50%; background: var(--c); color: var(--ci); font: 600 8pt/1 var(--font-chart); box-shadow: inset 0 0 0 0.25mm rgba(0, 0, 0, 0.4); }
  #thr-print .thp-sw.bead { box-shadow: inset 0 0 0 0.8mm rgba(0, 0, 0, 0.3); }
  #thr-print .thp-sw.multi { width: auto; padding: 0 1.5mm; border-radius: 3mm; grid-auto-flow: column; gap: 1.2mm; }
  #thr-print .thp-sw i { font-style: normal; }
  #thr-print .thp-bh th { padding-top: 5mm; }
  #thr-print .thp-notes { margin-top: 4mm; font-size: 9pt; color: #333; }
  #thr-print .thp-notes p { margin: 0 0 1mm; }
  #thr-print .thp-foot { margin-top: 3mm; font-size: 9pt; color: #333; }
}

.set-back { flex: none; margin-left: -8px; }
.set-back[hidden] { display: none; }
.set-head h1 { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.set-panel:not([data-page="home"]) .set-head h1 { font-size: 20px; line-height: 24px; white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.set-page[hidden], .set-part[hidden] { display: none; }
.set-part-h { display: flex; align-items: center; gap: 6px; min-width: 0; margin: 16px 4px 8px; font: 600 13px/18px var(--font-sans); color: var(--ink-2); }
.set-part-h > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.set-part-h .i { width: 16px; height: 16px; flex: none; color: var(--accent-ink); }
.set-nochart { margin: 0; padding: 14px 16px; border: 1px dashed var(--line-strong); border-radius: var(--r-l); font-size: 14px; line-height: 20px; color: var(--ink-2); }
.set-topic, .set-act { text-align: left; color: inherit; }
.set-act.set-done { cursor: default; }
.set-act.set-done .set-ic { color: var(--accent); }
.seg.seg-2x2 { display: grid; grid-template-columns: 1fr 1fr; grid-auto-flow: row; border-radius: 22px; }
.seg.seg-2x2 button { padding: 0 6px; }
@media (pointer: coarse) {
  .seg.seg-2x2 { row-gap: 4px; border-radius: 24px; }
  .seg.seg-2x2 button { height: 40px; }
}
.set-chev { width: 18px; height: 18px; flex: none; color: var(--ink-3); }
@media (hover: hover) { .set-topic:hover, .set-act:hover, .set-chart:hover, .set-hit:hover { background: var(--surface-2); } }
.set-search { margin: 4px 0 6px; }
.set-results[hidden], .set-foot-row[hidden], #set-topics[hidden], #set-chartbox[hidden] { display: none; }
.set-results { margin-top: 10px; }
.set-hit { text-align: left; color: inherit; width: 100%; }
.set-hit mark { background: var(--accent-tint); color: inherit; border-radius: 3px; padding: 0 1px; }
.set-why { font-style: italic; }
.set-none, .set-layout { margin: 6px 4px 10px; font-size: 14px; line-height: 20px; color: var(--ink-2); }
.set-flash { animation: set-flash 1.8s ease-out; }
@keyframes set-flash { 0%, 35% { background: var(--accent-tint); } 100% { background: transparent; } }
@media (prefers-reduced-motion: reduce) { .set-flash { animation: none; background: var(--accent-tint); } }
.set-chart { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; text-align: left; color: inherit; }
.set-chart > .grow { min-width: 0; }
.set-chart-pv { width: 56px; height: 56px; flex: none; display: grid; place-items: center; overflow: hidden; border-radius: 8px; background: var(--surface-2); }
.set-chart-cv { display: block; width: 100%; height: 100%; }
.set-chart .set-l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.set-chart-all { color: var(--accent-ink); }
.set-page[data-page="chart"] .set-part-h { display: none; }
.set-more { display: inline-flex; align-items: center; gap: 4px; margin: 8px 4px 0; font-size: 14px; line-height: 20px; text-decoration: none; }
.set-more .i { width: 16px; height: 16px; }
.set-rng .range { width: 100%; }
.set-row .rng-l .set-l { padding-left: 0; }
.set-row .seg button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.set-row .seg button .i { width: 18px; height: 18px; flex: none; }
@media (max-width: 599px) { .set-row .seg button:not([role="checkbox"]) .i { display: none; } }
.gs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.gs-box { display: inline-flex; align-items: center; gap: 2px; padding: 3px; background: var(--surface-sunk); border-radius: var(--r-pill); flex: none; }
.gs-b { width: 40px; height: 34px; display: grid; place-items: center; padding: 0; border: 0; background: transparent; color: var(--ink); border-radius: var(--r-pill); }
.gs-b .i { width: 18px; height: 18px; }
.gs-b:disabled { opacity: .4; cursor: default; }
.gs-n { width: 52px; height: 34px; padding: 0; border: 0; border-radius: var(--r-pill); background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1);
  font: 600 16px/1 var(--font-sans); font-variant-numeric: tabular-nums; text-align: center; }
.gs-n:focus { outline: 2px solid var(--accent-ring); outline-offset: 1px; }
.gs .gs-quick { display: flex; flex: 1 1 120px; }
.gs .gs-quick button { flex: 1; }
@media (pointer: coarse) { .gs-b { width: 44px; height: 44px; } .gs-n { height: 44px; } .gs .gs-quick button { height: 44px; } }
.seg button[aria-disabled="true"] { opacity: .45; cursor: default; }
.set-row.off .set-l { color: var(--ink-3); }
.set-klist { display: flex; flex-direction: column; }
.set-kind { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 2px 4px; }
.set-kind:not([hidden]) ~ .set-kind { border-top: 1px solid var(--line-soft); }
.set-kl { flex: 1; min-width: 0; font: 500 15px/20px var(--font-sans); }
.set-kn { color: var(--ink-2); font-size: 14px; font-variant-numeric: tabular-nums; }
.set-kind.off .set-kl { color: var(--ink-3); }
.set-or { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 0 4px; }
.set-or-l { font: 500 15px/20px var(--font-sans); }
.set-or-foot { align-items: flex-start; padding-top: 4px; }
.set-or-foot .set-d { flex: 1; }
.set-marks .rng-l { padding: 0 4px; }
@media (min-width: 900px) { .set-layer.over-chart .set-scrim { background: transparent; } }

.icon-btn.st-pdf, [data-layout="land"] .st-isl .icon-btn.st-pdf { background: var(--accent); color: var(--on-accent); font: 700 12px/1 var(--font-sans); letter-spacing: .02em; }
.icon-btn.st-pdf[aria-expanded="true"] { box-shadow: 0 0 0 3px var(--accent-tint); }
.pdfn-head { display: flex; align-items: center; gap: 8px; }
.pdfn-head b { font-weight: 600; color: var(--ink); }
.pdfn-tag, .notice .pdfn-tag { flex: none; height: 22px; padding: 0 7px; border-radius: var(--r-pill); background: var(--accent); color: var(--on-accent); font: 700 11px/22px var(--font-sans); letter-spacing: .03em; }
.pdfn-text { margin: 6px 0 0; color: var(--ink-2); font-size: 14px; line-height: 1.45; }
.pdfn-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.sheet-result .pdfn .btn-primary, .sheet-result .pdfn .btn-ghost { margin-top: 0; }
.notice.pdfn { flex-direction: column; gap: 0; background: var(--accent-tint); }
.notice.pdfn.folded .pdfn-text { display: none; }
.pdf-note { position: absolute; left: 0; top: 0; z-index: 4; max-width: calc(100% - 24px); padding: 12px 14px; border-radius: var(--r-l); background: var(--surface); color: var(--ink); box-shadow: var(--shadow-2), inset 0 0 0 1px var(--line); text-align: left; }
.pdf-note.nofit { visibility: hidden; pointer-events: none; }
.pdfn-sheet .pdfn-text { margin-top: 0; }

.scan-what { margin: 0 0 12px; color: var(--ink-2); font-size: 14px; line-height: 1.45; }
.scan-h { margin: 4px 0 8px; font: 600 17px/22px var(--font-sans); color: var(--ink); }
.scan-hint { margin: 10px 0 0; font-size: 13px; line-height: 1.45; color: var(--ink-2); }
.scan-hint:empty { display: none; }
.scan-pages { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 12px; }
.scan-page { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.scan-thumb { display: flex; align-items: center; justify-content: center; aspect-ratio: 3 / 4; border-radius: var(--r-m); background: var(--surface-2); overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); }
.scan-thumbcv { display: block; max-width: 100%; max-height: 100%; background: #fff; }
.scan-pno { font-size: 13px; color: var(--ink-2); }
.scan-select { width: 100%; min-height: 40px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: 400 15px/1.2 var(--font-sans); }
.scan-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 14px 0 0; font-size: 14px; color: var(--ink); }
.scan-row .scan-select { width: auto; min-width: 88px; }
.scan-row[hidden] { display: none; }
.scan-tools { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.scan-area { position: relative; width: fit-content; max-width: 100%; margin: 0 auto; touch-action: none; user-select: none; -webkit-user-select: none; border-radius: 10px; overflow: hidden; box-shadow: 0 0 0 1px var(--line); background: #fff; cursor: crosshair; }
.scan-keycv { display: block; width: auto; height: auto; max-width: 100%; max-height: 60vh; }
.scan-box { position: absolute; border: 2px solid var(--accent); background: color-mix(in srgb, var(--accent) 16%, transparent); border-radius: 4px; pointer-events: none; }
.scan-box[hidden] { display: none; }
.scan-imgs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 12px; }
.scan-imgs figure { margin: 0; min-width: 0; }
.scan-imgs img { display: block; width: 100%; height: 160px; object-fit: contain; background: #fff; border-radius: 10px; box-shadow: inset 0 0 0 1px var(--line); }
.scan-imgs figcaption { margin-top: 4px; font-size: 13px; color: var(--ink-2); }
.scan-left { margin: 0 0 4px; font-size: 13px; color: var(--ink-2); }
#pdf-key-ai { margin-top: 8px; }

.pdfs-what { margin: 0 0 12px; color: var(--ink-2); font-size: 14px; line-height: 1.45; }
.pdfs-pick { margin: 0 0 14px; }
.pdfs-pick p { margin: 0 0 8px; font-size: 14px; line-height: 1.45; color: var(--ink); }
.pdfs-pickrow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pdfs-file { font-size: 13px; color: var(--ink-2); overflow-wrap: anywhere; }
.pdfs-label { display: block; margin: 0 0 6px; font-size: 14px; font-weight: 600; color: var(--ink); }
.pdfs-comment { width: 100%; height: auto; min-height: 84px; margin: 0; padding: 10px 14px; resize: vertical; font: 400 16px/1.4 var(--font-sans); }
.pdfs-privacy { display: flex; gap: 8px; align-items: flex-start; margin: 12px 0 0; font-size: 13px; line-height: 1.45; color: var(--ink-2); }
.pdfs-privacy svg.i { flex: none; width: 16px; height: 16px; margin-top: 2px; }
.pdfs-status .notice { margin-top: 12px; }
.pdfs-more { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.sheet-pdfsend #pdfs-send { margin-top: 16px; }
.pdfs-done svg.i { color: var(--ok); }

.onb { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 4px 4px 2px; text-align: center; }
.onb-ic { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; background: var(--accent-tint); color: var(--accent-ink); }
.onb-ic svg.i { width: 34px; height: 34px; }
.onb-t { margin: 4px 0 0; font: 600 22px/28px var(--font-serif, var(--font-sans)); color: var(--ink); }
.onb-d { margin: 0; max-width: 420px; font-size: 17px; line-height: 25px; color: var(--ink-2); }
.onb-dots { display: flex; gap: 8px; margin: 6px 0 4px; }
.onb-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); }
.onb-dots i.on { width: 22px; border-radius: 4px; background: var(--accent); }
.onb .btn { max-width: 420px; }
