@font-face {
  font-family: Cinzel;
  src: url("/assets/fonts/cinzel-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 600 800;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --page: #0b1020;
  --panel: #111a2e;
  --panel-2: #151f35;
  --line: #26324e;
  --line-soft: #202b44;
  --text: #eef1ff;
  --muted: #a4afc8;
  --dim: #8492b1;
  --blue: #829cff;
  --blue-button: #4969ec;
  --font: "Segoe UI", "Microsoft YaHei UI", "PingFang SC", "Noto Sans CJK SC", sans-serif;
  --serif: Georgia, "Noto Serif SC", "Songti SC", SimSun, serif;
  --vault-display: Cinzel, var(--serif);
  font: 14px/1.55 var(--font);
  color: var(--text);
  background: var(--page);
  font-synthesis: none;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 300px; min-height: 100dvh; }
button, input, select { font: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { color: inherit; cursor: pointer; }
button:disabled { cursor: default; }
button, a { transition: color 150ms ease, background-color 150ms ease, border-color 150ms ease, box-shadow 150ms ease; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid #aebfff; outline-offset: 3px; }
main:focus { outline: none; }
h1, h2, h3, p { margin: 0; }
svg { display: inline-block; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; flex: none; vertical-align: middle; }
.skip { position: fixed; z-index: 50; top: 12px; left: 12px; padding: 10px 16px; border-radius: 6px; background: var(--panel-2); transform: translateY(-160%); }
.skip:focus { transform: none; }
.topbar { position: sticky; top: 0; z-index: 10; background: #0e1528; border-bottom: 1px solid #222c45; }
.topbar-inner { width: min(1360px, calc(100% - 80px)); height: 66px; margin-inline: auto; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 20px; }
.brand { display: flex; align-items: center; gap: 9px; width: max-content; max-width: 100%; min-width: 0; }
.brand img { flex: none; }
.brand strong {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: #ffe9bb; font: 800 19px/1.2 var(--vault-display); letter-spacing: .015em;
  text-shadow: 0 2px 3px #05070e;
}
.header-actions { display: flex; justify-content: flex-end; align-items: center; gap: 11px; min-width: 0; }
.pack-counter { display: none; }
.language-button { display: inline-flex; align-items: center; justify-content: center; flex: none; height: 36px; padding: 0 9px; border: 1px solid var(--line); border-radius: 7px; background: transparent; color: var(--muted); font-size: 12px; white-space: nowrap; }
.language-button:hover { color: var(--text); border-color: #4e63a6; background: #1a2644; }
.icon-button { display: inline-flex; justify-content: center; align-items: center; width: 36px; height: 36px; background: transparent; border: 1px solid var(--line); border-radius: 7px; color: var(--muted); }
.icon-button:hover:not(:disabled) { color: var(--text); border-color: #4e63a6; background: #1a2644; }
.icon-button:disabled { opacity: .4; }
.account-button { display: inline-flex; align-items: center; gap: 7px; min-width: 0; height: 36px; padding: 0 11px; background: #151f37; border: 1px solid #314163; border-radius: 7px; color: #d2dcfa; white-space: nowrap; font-size: 12px; font-weight: 650; }
.account-button:hover { border-color: #7089eb; background: #1d2d53; }
.account-button span { max-width: 140px; overflow: hidden; text-overflow: ellipsis; }
.account-button svg { width: 15px; height: 15px; }
.workspace, .site-footer { width: min(1360px, calc(100% - 80px)); margin-inline: auto; }
.workspace { padding-block: 30px 28px; }
.page-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 21px; }
.chapter { display: flex; align-items: center; gap: 7px; color: #a6b7f2; font-size: 12px; font-weight: 650; }
.chapter svg { width: 13px; height: 13px; color: #94aaff; }
.chapter > span { width: 3px; height: 3px; border-radius: 50%; background: #7887b4; }
.page-heading h1 { margin-top: 5px; font-size: clamp(27px, 2.65vw, 38px); line-height: 1.22; font-weight: 750; letter-spacing: .035em; }
.page-heading p { margin-top: 7px; color: var(--muted); }
.page-heading.collection-heading { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; margin-bottom: 16px; }
.page-heading.collection-heading h1 { font-size: clamp(22px, 1.7vw, 27px); letter-spacing: .02em; }
.collection-heading .collection-open { justify-self: end; min-height: 37px; padding-inline: 13px; }
.stage-slot { display: grid; min-width: 0; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 7px; min-height: 39px; padding: 0 15px; background: transparent; color: #e4ebff; font-size: 13px; font-weight: 650; white-space: nowrap; }
.button svg { width: 16px; height: 16px; }
.button-primary { background: var(--blue-button); border-color: #6b85ff; color: white; }
.button-primary:hover:not(:disabled) { background: #5878fa; border-color: #a1b2ff; }
.button-primary:disabled { background: #283661; border-color: #3a4975; color: #a2afd6; box-shadow: none; }
.button-quiet { background: #151f36; border-color: #364567; color: #c4d1f5; }
.button-quiet:hover:not(:disabled) { background: #213052; border-color: #6279bb; color: white; }
.tier-common { --tier: #e3e8f2; --tier-rgb: 215, 227, 248; --tier-dark: #202b40; }
.tier-rare { --tier: #83bcff; --tier-rgb: 103, 164, 255; --tier-dark: #172c50; }
.tier-epic { --tier: #d0a8ff; --tier-rgb: 172, 112, 252; --tier-dark: #2c214c; }
.tier-legendary { --tier: #ffd08a; --tier-rgb: 239, 167, 77; --tier-dark: #382c2a; }
.tier-badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 6px; color: var(--tier); background: rgba(var(--tier-rgb), .12); border-radius: 4px; line-height: 1.4; font-size: 10px; font-weight: 650; white-space: nowrap; }
.tier-badge svg { width: 12px; height: 12px; }
.golden-mark {
  display: inline-flex; align-items: center; padding: 2px 6px;
  border: 1px solid #b88c4c63; border-radius: 4px; color: #ffe1a1; background: #55371756;
  font-size: 10px; font-weight: 750; line-height: 1.2; letter-spacing: .035em; white-space: nowrap;
}
.card-attributes { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; }
.collection-stats { display: flex; gap: 8px; flex-wrap: wrap; justify-content: end; }
.collection-stats > div { padding: 8px 10px; border-radius: 7px; border: 1px solid var(--line); background: var(--panel); color: var(--muted); font-size: 12px; display: flex; align-items: center; gap: 7px; }
.collection-stats svg { width: 15px; height: 15px; color: #a8b9ff; }
.collection-stats strong { margin-left: 5px; color: var(--text); font-variant-numeric: tabular-nums; }
.save-banner, .inline-error { display: flex; align-items: center; gap: 10px; padding: 10px 13px; background: #192545; border: 1px solid #384a78; border-radius: 8px; margin-bottom: 13px; color: #d1dbf8; font-size: 13px; }
.save-banner span, .inline-error span { flex: 1; }
.save-banner .button, .inline-error .button { min-height: 31px; }
.inline-error { color: #ffc0bc; background: #291e34; border-color: #694454; }
.library-panel { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.filters, .library-head { display: flex; align-items: center; gap: 8px; padding: 13px 15px; border-bottom: 1px solid var(--line); }
#collection-filter { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; }
#collection-filter .search-input { width: 100%; }
.filters .button, .filters select { height: 36px; min-height: 36px; }
.search-input { display: flex; align-items: center; gap: 8px; padding-inline: 10px; height: 36px; width: min(100%, 420px); border: 1px solid var(--line); border-radius: 6px; background: #0d1528; color: var(--dim); }
.search-input:focus-within { border-color: #829aff; }
.search-input svg { width: 16px; height: 16px; }
.search-input input { width: 100%; min-width: 0; border: 0; outline: none; color: var(--text); background: transparent; }
input::placeholder { color: var(--dim); }
.filters select, .auth-form input { color: var(--text); border: 1px solid #364668; border-radius: 6px; background: #10192e; padding: 0 9px; }
.library-head { justify-content: space-between; }
.library-head h2 { font-size: 15px; }
.library-head span { font-size: 12px; color: var(--muted); }
.collection-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 11px; padding: 14px; }
.pager { display: flex; justify-content: space-between; align-items: center; padding: 9px 13px; color: var(--muted); border-top: 1px solid var(--line); font-size: 12px; }
.pager > div { display: flex; align-items: center; gap: 9px; }
.pager button { width: 30px; height: 30px; }
.pager button svg { width: 14px; height: 14px; }
.history-list { display: grid; }
.history-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 15px; border: 0; border-bottom: 1px solid var(--line-soft); background: transparent; text-align: left; color: var(--muted); }
.history-row:hover { background: #192542; }
.history-row:last-child { border-bottom: 0; }
.history-icon, .empty-icon { flex: none; display: grid; place-items: center; background: #222f54; color: #a8baff; border-radius: 8px; width: 39px; height: 39px; }
.history-info { flex: 1; display: grid; gap: 2px; }
.history-info strong { color: var(--text); font-size: 14px; }
.history-info small { color: var(--dim); font-size: 11px; }
.history-best { display: flex; align-items: center; gap: 8px; color: #dce3fa; font: 700 17px/1.1 var(--serif); }
.history-row > svg { width: 15px; height: 15px; }
.list-placeholder, .empty-state { padding: 32px 14px; text-align: center; color: var(--muted); }
.empty-state { min-height: 260px; display: grid; align-content: center; justify-items: center; gap: 7px; }
.empty-state h3 { color: var(--text); font-size: 16px; margin-top: 4px; }
.empty-state p { font-size: 13px; }
.empty-state .button { margin-top: 8px; }
.player-dialog { width: min(calc(100% - 30px), 500px); max-height: min(86dvh, 760px); border: 1px solid #465780; padding: 0; border-radius: 13px; color: var(--text); background: var(--panel); box-shadow: 0 20px 75px #020714a0; overflow: hidden; }
.player-dialog::backdrop { background: #040817c4; }
.dialog-shell { max-height: min(86dvh, 760px); display: flex; flex-direction: column; }
.dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 16px; border-bottom: 1px solid var(--line); flex: none; }
.dialog-header h2 { font-size: 17px; }
.dialog-header button { width: 32px; height: 32px; }
.dialog-content { overflow: auto; padding: 17px; }
.dialog-intro { color: var(--muted); margin-bottom: 14px; }
.dialog-button { width: 100%; margin-top: 12px; }
.auth-tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.auth-tabs button { flex: 1; padding: 7px 9px; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); background: #141f36; }
.auth-tabs button.active { color: #e0e7ff; background: #233566; border-color: #617cc8; }
.auth-form { display: grid; gap: 10px; }
.auth-form label { display: grid; gap: 4px; color: var(--muted); font-size: 12px; }
.auth-form input { min-height: 38px; font-size: 14px; }
.auth-form .dialog-button { margin-top: 0; }
.form-error { color: #ffc0be; font-size: 12px; }
.form-error:empty { display: none; }
.account-identity { display: flex; align-items: center; gap: 11px; }
.account-identity p { color: var(--muted); font-size: 12px; }
.history-dialog { width: min(calc(100% - 30px), 580px); }
.detail-dialog {
  --inspect-height: min(calc(100dvh - 90px), 960px);
  width: min(calc(100% - clamp(24px, 3.3vw, 64px)), 1380px);
  max-height: calc(100dvh - 20px);
  border-color: #8c795448; border-radius: 13px;
  background: #101523; box-shadow: 0 30px 110px #03050fd9;
}
.detail-dialog::backdrop { background: #030610da; }
.detail-dialog .dialog-shell { max-height: inherit; }
.detail-dialog .dialog-header {
  padding: 10px clamp(18px, 2.8vw, 36px); border-bottom: 1px solid #b099623c;
  background: linear-gradient(90deg, #1a1d2a, #111725 72%);
}
.detail-dialog .dialog-header h2 { color: #e6d6b5; font: 700 16px/1.25 var(--serif); }
.detail-dialog .dialog-header .icon-button { color: #dbcbaa; border-color: #9a845447; background: #101523; }
.detail-dialog .dialog-content { padding: 0; overflow: hidden; }
.card-inspector { display: grid; grid-template-columns: minmax(0, .98fr) minmax(0, 1.02fr); height: var(--inspect-height); }
.card-inspector.is-golden { --inspect-rgb: 221, 173, 86; }
.inspect-stage {
  position: relative; isolation: isolate; display: flex; flex-direction: column; justify-content: center; align-items: center;
  gap: 10px; min-width: 0; margin: 0; padding: 17px clamp(14px, 2vw, 32px) 14px; overflow: hidden;
  border-right: 1px solid #b0996231;
  background: radial-gradient(ellipse at 51% 43%, rgba(var(--inspect-rgb, var(--tier-rgb)), .19), transparent 71%), #090e19;
}
.inspect-stage::before {
  content: ""; position: absolute; z-index: -1; inset: 0;
  background: url("/assets/dusk-observatory.webp") center / cover no-repeat;
  mask-image: radial-gradient(ellipse at 50% 48%, #000, transparent 88%); opacity: .28;
}
.inspect-stage::after {
  content: ""; position: absolute; z-index: -1; inset: 7% 7%;
  border: 1px solid rgba(var(--inspect-rgb, var(--tier-rgb)), .15); border-radius: 50%;
  box-shadow: 0 0 0 11px rgba(var(--inspect-rgb, var(--tier-rgb)), .035);
  transform: rotate(-12deg);
}
.inspect-stage .detail-card-art {
  position: relative; isolation: isolate; flex: none;
  width: min(100%, 552px, calc((var(--inspect-height) - 62px) / var(--card-height)));
  aspect-ratio: 1 / var(--card-height);
}
.detail-card-art::before {
  content: ""; position: absolute; z-index: -1; inset: 5% 3.5%;
  border-radius: 6%; background: #090b14; box-shadow: 0 22px 34px 2px #020408d9;
  pointer-events: none;
}
@media (hover: hover) and (pointer: fine) {
  .detail-card-art:hover::before {
    box-shadow: 0 22px 34px 2px #020408d9, 0 0 44px 7px rgba(var(--inspect-rgb, var(--tier-rgb)), .32);
  }
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .detail-card-art::before { transition: box-shadow 230ms ease-out; }
  .detail-card-art::after {
    content: ""; position: absolute; z-index: 1; inset: 0;
    mask: var(--card-frame-image) center / 100% 100% no-repeat;
    clip-path: polygon(evenodd, 0 0, 100% 0, 100% 100%, 0 100%, 0 0, 5.6% 7%, 5.6% 91%, 94.4% 91%, 94.4% 7%, 5.6% 7%);
    background: linear-gradient(112deg, transparent 43%, rgba(var(--tier-rgb), .18) 48%, #fff2d86b 51%,
      rgba(var(--tier-rgb), .16) 55%, transparent 61%) no-repeat;
    background-size: 275% 100%;
    opacity: 0; pointer-events: none;
  }
  .detail-card-art:hover::after { animation: inspect-frame-glint 760ms ease-out both; }
}
@keyframes inspect-frame-glint {
  0% { background-position: 100% 50%; opacity: 0; }
  26%, 67% { opacity: 1; }
  100% { background-position: 0% 50%; opacity: 0; }
}
.detail-owned {
  display: inline-flex; align-items: center; gap: 7px; color: #c8bdac;
  font-size: 12px; line-height: 1.35;
}
.detail-owned svg { width: 14px; height: 14px; color: var(--tier); }
.inspect-reading {
  min-width: 0; min-height: 0; overflow: auto; scrollbar-width: thin; scrollbar-color: #81734f80 #111624;
  padding: clamp(26px, 4.1vw, 62px) clamp(24px, 4vw, 68px);
  background: radial-gradient(ellipse at 0 0, rgba(var(--tier-rgb), .07), transparent 64%), #101523;
}
.inspect-reading:focus-visible { outline: 1px solid var(--tier); outline-offset: -2px; }
.inspect-word { padding-bottom: 22px; border-bottom: 1px solid #c2a56a38; }
.inspect-word .tier-badge { padding: 4px 8px; border-color: rgba(var(--tier-rgb), .28); }
.inspect-word .golden-mark { padding: 3px 7px; }
.inspect-word h3 {
  margin: 10px 0 14px; color: #fff3dc; font: 700 clamp(36px, 4.45vw, 66px)/1.04 var(--serif);
  letter-spacing: -.025em; overflow-wrap: anywhere; text-wrap: balance;
}
.inspect-phonetics { display: flex; align-items: center; gap: 10px; color: #b9bed0; font-size: 14px; }
.inspect-phonetics .icon-button {
  flex: none; width: 38px; height: 38px; border-color: rgba(var(--tier-rgb), .36); color: var(--tier);
  background: rgba(var(--tier-rgb), .09); border-radius: 50%;
}
.inspect-phonetics .icon-button svg { width: 17px; height: 17px; }
.detail-section { margin-top: 22px; padding-bottom: 19px; border-bottom: 1px solid #a5a9c324; }
.detail-section h3 { color: #d9c89f; font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.detail-section p { color: #e5e8f1; font-size: 16px; line-height: 1.65; white-space: pre-line; overflow-wrap: anywhere; }
.meaning-notes p + p { margin-top: 10px; }
.example-credit { color: var(--muted); font-size: 11px; margin-top: 7px; }
.example-credit a { text-decoration: underline; text-underline-offset: 2px; }
.detail-section.example p[lang="en"] { font-family: var(--serif); font-size: 18px; }
.detail-section.example p + p { color: var(--muted); font-size: 13px; margin-top: 4px; }
.inspect-reading .dialog-button { width: auto; margin-top: 22px; }
@media (max-width: 720px) {
  .detail-dialog { width: calc(100% - 14px); max-height: calc(100dvh - 12px); }
  .detail-dialog .dialog-content { overflow: auto; }
  .card-inspector { display: block; height: auto; }
  .inspect-stage { padding: 17px 12px 14px; border-right: 0; border-bottom: 1px solid #b0996231; }
  .inspect-stage .detail-card-art { width: min(100%, 87vw, 392px, calc((100dvh - 142px) / var(--card-height))); }
  .inspect-reading { overflow: visible; padding: 26px clamp(19px, 5.5vw, 36px) 34px; }
  .inspect-word h3 { font-size: clamp(34px, 9vw, 45px); }
}
@media (max-width: 560px) {
  #collection-filter { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; }
  #collection-filter .search-input { grid-column: 1 / -1; }
  #collection-filter select { min-width: 0; width: 100%; }
}
.history-detail-top { display: flex; justify-content: space-between; align-items: center; padding-bottom: 11px; border-bottom: 1px solid var(--line); }
.history-detail-top > div { display: grid; gap: 2px; }
.history-detail-top > div > span { color: var(--muted); font-size: 12px; }
.history-packs section { margin-top: 12px; }
.history-packs h3 { font-size: 12px; color: var(--muted); margin-bottom: 5px; }
.history-packs section > div { display: flex; flex-wrap: wrap; gap: 5px; }
.history-word { display: inline-flex; align-items: center; gap: 5px; min-height: 30px; padding-inline: 7px; color: var(--tier); background: rgba(var(--tier-rgb), .09); border: 1px solid rgba(var(--tier-rgb), .24); border-radius: 5px; }
.history-word:hover { border-color: var(--tier); }
.history-word svg { width: 13px; height: 13px; }
.toast-region { position: fixed; z-index: 20; left: 50%; bottom: 28px; transform: translateX(-50%); pointer-events: none; width: max-content; max-width: calc(100% - 28px); }
.toast { display: flex; align-items: center; gap: 7px; padding: 9px 12px; background: #182645; color: #e6edff; border: 1px solid #475f9f; border-radius: 7px; box-shadow: 0 8px 20px #03061495; }
.toast svg { color: #a8c4ff; width: 16px; height: 16px; }
.toast-error { border-color: #915e68; color: #ffd0cf; }
.toast-error svg { color: #ffadab; }
.fx-canvas { position: fixed; z-index: 9; pointer-events: none; image-rendering: pixelated; }
.site-footer { padding-block: 14px calc(70px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line-soft); color: var(--dim); font-size: 12px; }
.faded { opacity: .55; margin-inline: 4px; }
.corner-nav {
  position: fixed; z-index: 11; display: flex; align-items: stretch; gap: 3px;
  right: calc(clamp(12px, 2.5vw, 42px) + env(safe-area-inset-right));
  bottom: calc(clamp(12px, 2.2vh, 24px) + env(safe-area-inset-bottom));
  padding: 3px; border: 1px solid #b79a6159; border-radius: 7px; background: #090f1bd9;
}
.corner-nav a {
  display: inline-flex; gap: 7px; align-items: center; min-height: 38px; padding: 0 11px;
  border-radius: 4px; color: #e9dfcc; font-size: 12px; font-weight: 600; white-space: nowrap;
}
.corner-nav a svg { width: 16px; height: 16px; color: #d8ba84; }
.corner-nav a:is(:hover, .active) { color: #fff1d1; background: #c5a06a25; }
.in-vault .corner-nav { display: none; }
.no-script { padding: 10px 20px; color: var(--muted); }
@media (max-width: 1110px) {
  .topbar-inner, .workspace, .site-footer { width: calc(100% - 48px); }
  .topbar-inner { gap: 12px; }
  .header-actions { gap: 7px; }
  .collection-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 800px), (hover: none) and (pointer: coarse) and (max-width: 1080px) {
  .topbar-inner, .workspace, .site-footer { width: calc(100% - 32px); }
  .topbar-inner { grid-template-columns: 1fr auto; height: 56px; }
  .brand img { width: 32px; height: 32px; }
  .brand { gap: 8px; }
  .brand strong { font-size: 17px; }
  .header-actions { gap: 7px; }
  .header-actions .icon-button { width: 33px; height: 33px; }
  .language-button { height: 33px; padding-inline: 8px; }
  .account-button { height: 33px; }
  .workspace { padding-block: 19px 16px; }
  .page-heading { margin-bottom: 14px; }
  .page-heading h1 { font-size: 28px; }
  .page-heading p { margin-top: 5px; font-size: 12px; }
  .page-heading.collection-heading { grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
  .collection-heading .collection-stats { grid-column: 1 / -1; grid-row: 2; justify-content: start; }
  .collection-heading .collection-open { min-height: 44px; }
  .corner-nav a { min-height: 42px; }
  .toast-region { bottom: calc(62px + env(safe-area-inset-bottom)); }
}
@media (max-width: 540px) {
  .topbar-inner, .workspace, .site-footer { width: calc(100% - 24px); }
  .topbar-inner { gap: 8px; }
  .brand strong { font-size: clamp(12px, 3.55vw, 17px); }
  .account-button { flex: none; justify-content: center; width: 33px; padding: 0; }
  .account-button span { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
  .workspace { padding-top: 13px; }
  .page-heading { gap: 7px; align-items: center; }
  .chapter { font-size: 10px; gap: 5px; }
  .chapter svg { width: 11px; height: 11px; }
  .page-heading h1 { font-size: 25px; margin-top: 4px; }
  .page-heading p { font-size: 11px; }
  .collection-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .collection-stats { justify-content: start; gap: 4px; }
  .collection-stats > div { padding: 4px 6px; font-size: 11px; }
  .collection-stats svg { display: none; }
  .save-banner { flex-wrap: wrap; padding: 8px; gap: 5px; font-size: 11px; }
  .save-banner > span { flex: 1 1 75%; }
  .save-banner .button { margin-left: 22px; }
  .filters, .library-head { padding: 8px; gap: 5px; }
  .filters select, .filters .button { font-size: 12px; }
  .filters .button { padding-inline: 7px; }
  .search-input { padding-inline: 6px; gap: 4px; }
  .search-input input, .auth-form input { font-size: 16px; }
  .collection-grid { padding: 8px; }
  .history-row { gap: 7px; padding: 9px; }
  .history-info strong { font-size: 12px; }
  .history-best { flex-direction: column; align-items: start; gap: 3px; font-size: 15px; max-width: 34%; overflow-wrap: anywhere; }
  .player-dialog { width: 100%; max-width: none; margin: auto 0 0; border-radius: 14px 14px 0 0; padding-bottom: env(safe-area-inset-bottom); }
  .dialog-header { padding: 10px 12px; }
  .dialog-content { padding: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
