/* ICSE Resources — black glass UI with white glow
   Tokens first, then layout, components, reader. */

:root {
  --bg: #000;
  --text: #f5f5f6;
  --muted: rgba(255, 255, 255, 0.6);
  --dim: rgba(255, 255, 255, 0.4);
  --line: rgba(255, 255, 255, 0.1);
  --line-hi: rgba(255, 255, 255, 0.3);
  --glass: rgba(255, 255, 255, 0.045);
  --glass-hi: rgba(255, 255, 255, 0.085);
  --glow: 0 0 40px rgba(255, 255, 255, 0.09);
  --glow-hi: 0 0 60px rgba(255, 255, 255, 0.18);
  --r-lg: 22px;
  --r-md: 14px;
  --r-sm: 10px;
  --font-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --font-body: "Instrument Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --gutter: clamp(16px, 4vw, 40px);
  --maxw: 1180px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html.no-scroll, html.no-scroll body { overflow: hidden; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin: 0; }

:focus-visible { outline: 2px solid #fff; outline-offset: 3px; border-radius: 6px; }

.ic { width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Ambient glow ---------- */
.ambient { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.orb { position: absolute; border-radius: 50%; filter: blur(90px); background: #fff; }
.orb.o1 { width: 62vw; height: 38vh; left: 50%; top: -22vh; transform: translateX(-50%); opacity: 0.17; }
.orb.o2 { width: 36vw; height: 36vw; right: -14vw; top: 46vh; opacity: 0.05; }
.orb.o3 { width: 30vw; height: 30vw; left: -12vw; top: 90vh; opacity: 0.045; }
.spot {
  position: absolute; left: 0; top: 0; width: 620px; height: 620px; margin: -310px 0 0 -310px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.075), transparent 65%);
  opacity: 0; transition: opacity 0.4s; will-change: transform;
}
.spot.on { opacity: 1; }

/* ---------- Glass primitive ---------- */
.glass {
  background: var(--glass);
  border: 1px solid var(--line);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
}
@supports not (backdrop-filter: blur(1px)) {
  .glass { background: rgba(22, 22, 22, 0.92); }
}

/* hover glow that follows the pointer */
.gh { position: relative; isolation: isolate; overflow: hidden; transition: border-color 0.25s, box-shadow 0.3s, transform 0.25s, background 0.25s; }
.gh::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity 0.3s; pointer-events: none;
  background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, 0.13), transparent 62%);
}
.gh:hover { border-color: var(--line-hi); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), var(--glow), 0 24px 50px -24px #000; transform: translateY(-2px); }
.gh:hover::before { opacity: 1; }

/* ---------- Page frame ---------- */
.page { position: relative; z-index: 1; }
.wrap { width: min(var(--maxw), 100% - 2 * var(--gutter)); margin-inline: auto; }

.nav { position: sticky; top: 12px; z-index: 20; margin-top: 12px; }
.nav-in { background: rgba(12, 12, 12, 0.62); display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 16px; border-radius: 999px; }
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 0.9rem; transition: color 0.2s; white-space: nowrap; }
.back:hover { color: #fff; }
.brand { margin-inline: auto; font-family: var(--font-display); font-weight: 650; letter-spacing: -0.01em; font-size: 1.02rem; white-space: nowrap; }
.brand span { color: var(--dim); font-weight: 500; }

/* ---------- Buttons ---------- */
.btn, .pill, .ib {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--line); background: var(--glass); color: var(--text);
  transition: border-color 0.2s, box-shadow 0.25s, background 0.2s, transform 0.15s, color 0.2s;
}
.btn { height: 42px; padding: 0 16px; border-radius: 12px; font-weight: 550; font-size: 0.93rem; white-space: nowrap; }
.pill { height: 40px; padding: 0 14px; border-radius: 999px; font-size: 0.9rem; font-weight: 550; }
.ib { width: 38px; height: 38px; border-radius: 11px; padding: 0; flex: none; }
.btn:hover, .pill:hover, .ib:hover { border-color: var(--line-hi); background: var(--glass-hi); box-shadow: var(--glow); }
.btn:active, .pill:active, .ib:active { transform: scale(0.97); }
.btn[disabled], .ib[disabled] { opacity: 0.35; pointer-events: none; }

.btn-primary { background: #fff; color: #000; border-color: #fff; box-shadow: 0 0 22px rgba(255, 255, 255, 0.28); }
.btn-primary:hover { background: #fff; border-color: #fff; box-shadow: 0 0 36px rgba(255, 255, 255, 0.55); }

.pill .n { min-width: 20px; height: 20px; padding: 0 6px; display: inline-grid; place-items: center; border-radius: 999px; background: rgba(255, 255, 255, 0.14); font-size: 0.75rem; }
.pill[aria-pressed="true"] { background: #fff; color: #000; border-color: #fff; box-shadow: 0 0 22px rgba(255, 255, 255, 0.3); }
.pill[aria-pressed="true"] .n { background: rgba(0, 0, 0, 0.12); }
.saved .ic { fill: currentColor; }

/* ---------- Hero ---------- */
.hero { padding: clamp(56px, 11vh, 120px) 0 clamp(28px, 5vh, 48px); }
.hero h1 {
  font-family: var(--font-display); font-weight: 700; font-size: clamp(2.5rem, 7.4vw, 5.6rem);
  line-height: 0.98; letter-spacing: -0.04em; max-width: 14ch; text-wrap: balance;
  text-shadow: 0 0 60px rgba(255, 255, 255, 0.28);
}
.hero p { margin-top: 20px; max-width: 52ch; color: var(--muted); font-size: clamp(1rem, 2vw, 1.15rem); }

.search {
  margin-top: clamp(28px, 5vh, 44px); display: flex; align-items: center; gap: 14px;
  height: 66px; padding: 0 14px 0 22px; border-radius: 22px; max-width: 760px;
  transition: border-color 0.25s, box-shadow 0.3s, background 0.25s;
}
.search:hover { border-color: rgba(255, 255, 255, 0.2); }
.search:focus-within { border-color: rgba(255, 255, 255, 0.55); background: var(--glass-hi); box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.06), 0 0 70px rgba(255, 255, 255, 0.2); }
.search .ic { width: 22px; height: 22px; color: var(--muted); }
.search input { flex: 1; min-width: 0; height: 100%; background: none; border: 0; outline: 0; font-size: clamp(1rem, 2.4vw, 1.2rem); }
.search input::placeholder { color: var(--dim); }
.search input::-webkit-search-cancel-button { display: none; }
.kbd { display: inline-flex; align-items: center; gap: 4px; color: var(--dim); font-size: 0.8rem; }
.kbd kbd { min-width: 26px; height: 26px; padding: 0 7px; display: inline-grid; place-items: center; border-radius: 8px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.05); font: inherit; color: var(--muted); }
.search .clear { width: 34px; height: 34px; }
.hero .quick { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; color: var(--dim); font-size: 0.9rem; }
.quick button { height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--muted); font-size: 0.85rem; transition: all 0.2s; }
.quick button:hover { color: #fff; border-color: var(--line-hi); box-shadow: var(--glow); }

/* ---------- Sections ---------- */
section[id] { scroll-margin-top: 84px; }
.block { padding: clamp(24px, 4vw, 40px) 0; }
.block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.block-head h2 { font-family: var(--font-display); font-weight: 650; font-size: clamp(1.35rem, 3vw, 1.8rem); letter-spacing: -0.025em; }
.block-head .sub { color: var(--dim); font-size: 0.92rem; }

/* recent strip */
.strip { display: flex; gap: 14px; overflow-x: auto; padding: 6px var(--gutter) 22px; margin-inline: calc(-1 * var(--gutter)); scroll-snap-type: x proximity; scrollbar-width: none; }
.strip::-webkit-scrollbar { display: none; }
.mini { flex: 0 0 min(290px, 78vw); scroll-snap-align: start; display: flex; flex-direction: column; gap: 10px; padding: 16px 16px 14px; border-radius: 18px; }
.mini h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; line-height: 1.25; letter-spacing: -0.01em; }
.mini .row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 6px; }
.mini .when { color: var(--dim); font-size: 0.82rem; }
.mini .tl { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 0.84rem; }

/* subject cards */
.subjects { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.subj { display: flex; flex-direction: column; gap: 22px; padding: 20px; border-radius: var(--r-lg); text-align: left; min-height: 150px; width: 100%; }
.subj:hover { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 0 44px color-mix(in srgb, var(--accent) 28%, transparent), 0 24px 50px -24px #000; border-color: color-mix(in srgb, var(--accent) 60%, white 0%); }
.subj::after { content: ""; position: absolute; left: 20px; right: 20px; bottom: 0; height: 2px; border-radius: 2px; background: var(--accent); opacity: 0.55; transition: opacity 0.3s, left 0.3s, right 0.3s; }
.subj:hover::after { opacity: 1; left: 0; right: 0; }
.subj .top { display: flex; justify-content: space-between; align-items: flex-start; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent, #fff); box-shadow: 0 0 14px var(--accent, #fff); flex: none; }
.subj .cnt { font-family: var(--font-display); font-weight: 650; font-size: 2.4rem; line-height: 1; letter-spacing: -0.04em; color: var(--accent); }
.subj h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.18rem; letter-spacing: -0.015em; margin-top: auto; }
.subj .meta { color: var(--dim); font-size: 0.86rem; margin-top: 2px; }

/* ---------- Filters ---------- */
.filters { display: grid; gap: 12px; padding: 16px; border-radius: var(--r-lg); }
.frow { display: grid; grid-template-columns: 70px 1fr; align-items: center; gap: 12px; }
.frow > label { color: var(--dim); font-size: 0.88rem; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 3px; margin: -3px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; height: 34px; padding: 0 14px; display: inline-flex; align-items: center; gap: 8px;
  border-radius: 999px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03);
  color: var(--muted); font-size: 0.88rem; font-weight: 500; transition: all 0.2s;
}
.chip:hover { color: #fff; border-color: var(--line-hi); box-shadow: var(--glow); }
.chip[aria-pressed="true"] { background: #fff; color: #000; border-color: #fff; box-shadow: 0 0 22px rgba(255, 255, 255, 0.28); }
.chip .dot { width: 8px; height: 8px; box-shadow: none; }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin: 18px 0 16px; }
.count { color: var(--muted); font-size: 0.95rem; }
.count b { color: #fff; font-weight: 600; }
.count button { margin-left: 10px; background: none; border: 0; color: #fff; text-decoration: underline; text-underline-offset: 3px; padding: 0; }
.seg { display: inline-flex; padding: 4px; border-radius: 13px; gap: 2px; }
.seg button { height: 32px; padding: 0 12px; border-radius: 9px; border: 1px solid transparent; background: none; color: var(--muted); font-size: 0.88rem; font-weight: 500; transition: all 0.2s; }
.seg button:hover { color: #fff; }
.seg button[aria-pressed="true"] { background: var(--glass-hi); border-color: var(--line-hi); color: #fff; box-shadow: var(--glow); }

/* ---------- Resource cards ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 16px; }
.card { display: flex; flex-direction: column; gap: 14px; padding: 20px; border-radius: var(--r-lg); }
.card .tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-right: 44px; color: var(--muted); font-size: 0.85rem; }
.card .tags .sj { display: inline-flex; align-items: center; gap: 8px; }
.card .tags .ty { color: var(--dim); }
.card h3 { font-family: var(--font-display); font-weight: 620; font-size: 1.28rem; line-height: 1.2; letter-spacing: -0.02em; }
.card h3 a:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-color: rgba(255, 255, 255, 0.4); }
.card .desc { color: var(--muted); font-size: 0.94rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .facts { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--dim); font-size: 0.84rem; margin-top: auto; }
.card .acts { display: flex; gap: 8px; }
.card .acts .btn { flex: 1; }
.card .acts .btn-primary { flex: 1.25; }
.card .corner { position: absolute; top: 14px; right: 14px; }
.card .more { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.card .more .ib { width: 32px; height: 32px; border-color: transparent; background: none; color: var(--dim); }
.card .more .ib:hover { color: #fff; }

.badge { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 0.74rem; font-weight: 650; letter-spacing: 0.01em; border: 1px solid; }
.badge.new { color: #000; background: #fff; border-color: #fff; box-shadow: 0 0 14px rgba(255, 255, 255, 0.45); }
.badge.pop { color: #fff; border-color: rgba(255, 255, 255, 0.45); background: rgba(255, 255, 255, 0.1); }

.empty { grid-column: 1 / -1; text-align: center; padding: 56px 20px; border-radius: var(--r-lg); color: var(--muted); }
.empty h3 { font-family: var(--font-display); color: #fff; font-size: 1.4rem; margin-bottom: 8px; }
.empty .btn { margin-top: 18px; }

.foot { padding: 48px 0 56px; color: var(--dim); font-size: 0.9rem; }
.foot .glass { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; align-items: center; padding: 18px 22px; border-radius: var(--r-lg); }
.foot a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.foot a:hover { color: #fff; }

.is-filtering #recent, .is-filtering #subjects { display: none; }
.is-filtering .hero { padding-bottom: 20px; }

/* ---------- Reader ---------- */
.viewer { position: fixed; inset: 0; z-index: 50; display: flex; background: rgba(0, 0, 0, 0.78); backdrop-filter: blur(26px); -webkit-backdrop-filter: blur(26px); opacity: 0; transition: opacity 0.2s; }
.viewer.on { opacity: 1; }
.v-shell { position: relative; display: flex; flex-direction: column; width: 100%; height: 100%; margin-inline: auto; background: rgba(8, 8, 8, 0.7); transform: scale(0.985); transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1); min-height: 0; }
.viewer.on .v-shell { transform: none; }
@media (min-width: 900px) {
  .viewer { padding: 18px; }
  .v-shell { max-width: 1280px; border-radius: 24px; border: 1px solid var(--line-hi); overflow: hidden; box-shadow: 0 0 90px rgba(255, 255, 255, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.1); }
}
.viewer:fullscreen { padding: 0; background: #000; }
.viewer:fullscreen .v-shell { max-width: none; border-radius: 0; border: 0; }

.v-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, 0.04); }
.v-title { flex: 1 1 160px; min-width: 0; line-height: 1.25; }
.v-title strong { display: block; font-family: var(--font-display); font-weight: 620; font-size: 1rem; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v-title span { display: block; color: var(--dim); font-size: 0.8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.grp { display: inline-flex; align-items: center; gap: 4px; padding: 3px; border-radius: 13px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03); flex: none; }
.grp .ib { width: 32px; height: 32px; border-color: transparent; background: none; }
.grp .ib:hover { background: var(--glass-hi); }
.pg-in { display: inline-flex; align-items: center; gap: 6px; padding: 0 4px; color: var(--muted); font-size: 0.9rem; font-variant-numeric: tabular-nums; }
.pg-in input { width: 3.1em; height: 30px; text-align: center; border-radius: 9px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.06); outline: 0; -moz-appearance: textfield; }
.pg-in input::-webkit-outer-spin-button, .pg-in input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pg-in input:focus { border-color: #fff; box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.12); }
.zl { min-width: 3.4em; text-align: center; color: var(--muted); font-size: 0.85rem; font-variant-numeric: tabular-nums; }
.v-bar .btn { height: 38px; }
.v-break { display: none; }

.v-scroll { position: relative; flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; touch-action: pan-x pan-y; background: radial-gradient(ellipse at 50% 0%, rgba(255, 255, 255, 0.06), transparent 55%), #050505; -webkit-overflow-scrolling: touch; }
.v-pages { display: flex; flex-direction: column; align-items: center; gap: 16px; width: max-content; min-width: 100%; padding: 24px 32px 48px; transform-origin: 0 0; }
.pg { position: relative; flex: none; background: #fff; border-radius: 3px; overflow: hidden; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1), 0 14px 44px rgba(0, 0, 0, 0.7), 0 0 70px rgba(255, 255, 255, 0.06); }
.pg:not(.ready)::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(0, 0, 0, 0.06) 50%, transparent 70%); background-size: 250% 100%; animation: shimmer 1.3s linear infinite; }
.pg canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
@keyframes shimmer { from { background-position: 150% 0; } to { background-position: -100% 0; } }

.v-status { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 14px; text-align: center; padding: 24px; color: var(--muted); pointer-events: none; }
.v-status a, .v-status button { pointer-events: auto; }
.v-status:empty { display: none; }
.spin { width: 28px; height: 28px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.15); border-top-color: #fff; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.v-prog { height: 2px; background: rgba(255, 255, 255, 0.06); }
.v-prog i { display: block; height: 100%; width: 0; background: #fff; box-shadow: 0 0 12px #fff; transition: width 0.12s; }

@media (max-width: 760px) {
  .v-bar > * { order: 4; }
  .v-bar > .o-close { order: 0; }
  .v-bar > .v-title { order: 1; }
  .v-bar > .o-dl { order: 2; }
  .v-break { display: block; order: 3; flex-basis: 100%; height: 0; }
  .v-bar .zbtn, .v-bar .zl, .v-bar .o-full { display: none; }
  .v-bar { overflow-x: auto; scrollbar-width: none; }
  .v-pages { padding: 14px 12px 40px; gap: 12px; }
}

/* ---------- Share dialog + toasts ---------- */
.dlg { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 16px; background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.dlg-card { position: relative; width: min(400px, 100%); padding: 26px 24px 22px; border-radius: 26px; background: rgba(14, 14, 14, 0.78); border-color: var(--line-hi); box-shadow: 0 0 80px rgba(255, 255, 255, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.1); animation: pop 0.22s cubic-bezier(0.2, 0.8, 0.2, 1); }
@keyframes pop { from { opacity: 0; transform: scale(0.95) translateY(8px); } }
.dlg-card h3 { font-family: var(--font-display); font-size: 1.35rem; letter-spacing: -0.02em; }
.dlg-card .nm { color: var(--muted); font-size: 0.92rem; margin-top: 2px; padding-right: 36px; }
.dlg-x { position: absolute; top: 14px; right: 14px; }
.qr { width: 188px; height: 188px; margin: 20px auto 18px; padding: 12px; border-radius: 18px; background: #fff; box-shadow: 0 0 50px rgba(255, 255, 255, 0.22); }
.qr svg { display: block; width: 100%; height: 100%; }
.copy { display: flex; gap: 8px; }
.copy input { flex: 1; min-width: 0; height: 42px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.05); font-size: 0.85rem; color: var(--muted); outline: 0; }
.copy input:focus { border-color: #fff; }
.dlg-acts { display: flex; gap: 8px; margin-top: 10px; }
.dlg-acts .btn { flex: 1; }

#toasts { position: fixed; z-index: 90; left: 50%; bottom: 24px; transform: translateX(-50%); display: grid; gap: 8px; justify-items: center; pointer-events: none; width: max-content; max-width: calc(100% - 32px); }
.toast { padding: 11px 18px; border-radius: 999px; background: rgba(20, 20, 20, 0.85); border: 1px solid var(--line-hi); backdrop-filter: blur(14px); box-shadow: 0 0 40px rgba(255, 255, 255, 0.12); font-size: 0.92rem; animation: pop 0.2s ease-out; }

/* ---------- Small screens ---------- */
@media (max-width: 640px) {
  .back .t { display: none; }
  .frow { grid-template-columns: 1fr; gap: 6px; }
  .search { height: 58px; padding-left: 16px; border-radius: 18px; }
  .kbd { display: none; }
  .toolbar { align-items: flex-start; }
  .seg { width: 100%; }
  .seg button { flex: 1; padding: 0 6px; }
}

@media (hover: none) { .spot { display: none; } .gh:hover { transform: none; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .spot { display: none; }
}
