/* Premiere Pro Shortcuts — dark frosted glass.
   Real backdrop-filter only on large surfaces (.glass); rows use cheap translucency. */

:root {
  color-scheme: dark;
  --bg: #060816;
  --bg-2: #0d1133;
  --text: #f5f6ff;
  --text-2: #cbcfeb;
  --text-3: #a9aed6;
  --glass: rgba(255, 255, 255, 0.075);
  --glass-border: rgba(255, 255, 255, 0.15);
  --glass-hi: rgba(255, 255, 255, 0.24);
  --glass-fallback: rgba(20, 24, 54, 0.94);
  --row: rgba(255, 255, 255, 0.035);
  --row-hover: rgba(255, 255, 255, 0.075);
  --row-border: rgba(255, 255, 255, 0.085);
  --accent: #a78bfa;
  --accent-soft: rgba(167, 139, 250, 0.22);
  --ring: #c4b5fd;
  --t1: #5eead4;
  --t2: #93c5fd;
  --t3: #c4b5fd;
  --t4: #f9a8d4;
  --warn: #fcd34d;
  --radius: 22px;
  --radius-sm: 14px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

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

a { color: #d8ccff; text-underline-offset: 2px; }
a:hover { color: #fff; }

button { font: inherit; color: inherit; }

:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; border-radius: 8px; }

.vh {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }

.skip-link {
  position: absolute; inset-inline-start: 16px; top: -48px; z-index: 50;
  padding: 8px 14px; border-radius: 10px; background: #1e1b4b; color: #fff;
}
.skip-link:focus { top: 12px; }

/* ---------------------------------------------------------------- background */
.bg {
  position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
  background:
    radial-gradient(1100px 700px at 50% -12%, var(--bg-2) 0%, transparent 62%),
    linear-gradient(180deg, #070a1c 0%, var(--bg) 60%);
}
.orb {
  position: absolute; border-radius: 50%;
  width: 62vmax; height: 62vmax; opacity: 0.5;
  will-change: transform;
}
.orb-1 { top: -26vmax; left: -18vmax;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.95) 0%, rgba(124, 58, 237, 0) 64%);
  animation: drift-1 38s ease-in-out infinite alternate; }
.orb-2 { top: 18vh; right: -26vmax;
  background: radial-gradient(circle, rgba(219, 39, 119, 0.8) 0%, rgba(219, 39, 119, 0) 62%);
  animation: drift-2 47s ease-in-out infinite alternate; }
.orb-3 { bottom: -34vmax; left: 4vw;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.95) 0%, rgba(37, 99, 235, 0) 62%);
  animation: drift-3 55s ease-in-out infinite alternate; }
.orb-4 { width: 40vmax; height: 40vmax; top: 44vh; left: 38vw; opacity: 0.4;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.7) 0%, rgba(56, 189, 248, 0) 62%);
  animation: drift-4 63s ease-in-out infinite alternate; }

@keyframes drift-1 { to { transform: translate3d(22vw, 16vh, 0) scale(1.12); } }
@keyframes drift-2 { to { transform: translate3d(-24vw, 22vh, 0) scale(0.92); } }
@keyframes drift-3 { to { transform: translate3d(26vw, -20vh, 0) scale(1.08); } }
@keyframes drift-4 { to { transform: translate3d(-30vw, -26vh, 0) scale(1.2); } }

.noise {
  position: absolute; inset: 0; opacity: 0.07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------------------------------------------------------------- glass */
.glass {
  background: var(--glass);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow:
    inset 0 1px 0 var(--glass-hi),
    inset 0 0 0 1px rgba(255, 255, 255, 0.02),
    0 24px 60px -24px rgba(0, 0, 0, 0.6);
}
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .glass { background: var(--glass-fallback); }
}

/* ---------------------------------------------------------------- hero */
.hero { padding: clamp(24px, 5vw, 56px) 0 clamp(18px, 3vw, 28px); }
.eyebrow {
  margin: 0 0 12px; font-size: 0.8125rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-3); font-weight: 600;
}
.hero h1 {
  margin: 0; font-size: clamp(1.9rem, 5.2vw, 3.4rem); line-height: 1.08;
  letter-spacing: -0.025em; font-weight: 750; text-wrap: balance;
}
.grad {
  background: linear-gradient(95deg, #c4b5fd 0%, #93c5fd 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.grad-2 { background-image: linear-gradient(95deg, #f9a8d4 0%, #c4b5fd 100%); }
.lede { margin: 16px 0 0; max-width: 62ch; color: var(--text-2); font-size: clamp(1rem, 1.6vw, 1.125rem); }
.lede strong { color: var(--text); }

/* ---------------------------------------------------------------- search */
.search-dock { position: sticky; top: 0; z-index: 30; padding: 12px 0 10px; }
.search-dock::before {
  /* soft fade so rows sliding under the bar don't compete with it */
  content: ""; position: absolute; inset: 0 0 -18px; pointer-events: none; opacity: 0;
  background: linear-gradient(180deg, rgba(6, 8, 22, 0.78) 0%, rgba(6, 8, 22, 0.5) 70%, rgba(6, 8, 22, 0) 100%);
  transition: opacity 0.25s ease;
}
.search-dock.stuck::before { opacity: 1; }
.search-dock > .wrap { position: relative; }

.search {
  display: flex; align-items: center; gap: 10px;
  padding-block: 8px; padding-inline: 18px 8px; border-radius: 24px;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.search:focus-within, .search.listening {
  border-color: rgba(196, 181, 253, 0.55);
  box-shadow:
    inset 0 1px 0 var(--glass-hi),
    0 0 0 2px rgba(167, 139, 250, 0.85),
    0 0 36px 4px rgba(139, 92, 246, 0.42),
    0 24px 60px -24px rgba(0, 0, 0, 0.6);
}
.search.listening { border-color: rgba(249, 168, 212, 0.6);
  box-shadow: inset 0 1px 0 var(--glass-hi), 0 0 0 2px rgba(244, 114, 182, 0.85),
    0 0 36px 4px rgba(236, 72, 153, 0.4), 0 24px 60px -24px rgba(0, 0, 0, 0.6); }

.search-field { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.search-icon { width: 22px; height: 22px; flex: none; fill: none; stroke: var(--text-2); stroke-width: 2; stroke-linecap: round; }
.search input {
  flex: 1; min-width: 0; height: 48px; padding: 0;
  background: transparent; border: 0; outline: none;
  color: var(--text); font-size: 1.1875rem; font-family: inherit;
}
.search input::placeholder { color: var(--text-3); opacity: 1; }
.search input::-webkit-search-cancel-button { filter: invert(1) opacity(0.6); cursor: pointer; }
.search input[readonly] { cursor: default; caret-color: transparent; }
.slash-hint { flex: none; }

.search-controls { display: flex; align-items: center; gap: 8px; flex: none; }

.press-btn {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px;
  border-radius: 14px; border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06); color: var(--text-2); cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.press-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.press-btn:hover { background: rgba(255, 255, 255, 0.11); color: var(--text); }
.press-btn[aria-pressed="true"] { background: rgba(244, 114, 182, 0.2); border-color: rgba(249, 168, 212, 0.6); color: #fff; }

.seg {
  display: inline-flex; padding: 3px; gap: 2px; border-radius: 13px;
  background: rgba(0, 0, 0, 0.22); border: 1px solid rgba(255, 255, 255, 0.1);
}
.seg button {
  height: 34px; padding: 0 12px; border: 0; border-radius: 10px; background: transparent;
  color: var(--text-2); font-size: 0.875rem; font-weight: 550; cursor: pointer; white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.seg button:hover { color: var(--text); }
.seg button[aria-pressed="true"] {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.1));
  color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 2px 8px rgba(0, 0, 0, 0.3);
}

.press-note {
  display: flex; align-items: center; gap: 10px; margin: 10px 4px 0;
  font-size: 0.875rem; color: var(--text-2);
}
.press-note[hidden] { display: none; }
.pulse { width: 9px; height: 9px; border-radius: 50%; background: #f472b6; flex: none;
  box-shadow: 0 0 0 0 rgba(244, 114, 182, 0.7); animation: pulse 1.6s ease-out infinite; }
@keyframes pulse { to { box-shadow: 0 0 0 10px rgba(244, 114, 182, 0); } }

/* ---------------------------------------------------------------- toolbar & chips */
.toolbar { margin-top: 12px; padding: 16px 18px 14px; }
.toolbar-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.count { margin: 0; font-size: 0.9375rem; color: var(--text-2); font-variant-numeric: tabular-nums; }
.count strong { color: var(--text); font-weight: 650; }
.toolbar-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.gem-btn {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px;
  border-radius: 13px; cursor: pointer; font-weight: 600; font-size: 0.9rem; color: #fff;
  border: 1px solid rgba(249, 168, 212, 0.45);
  background: linear-gradient(135deg, rgba(219, 39, 119, 0.45), rgba(124, 58, 237, 0.45));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 8px 24px -10px rgba(219, 39, 119, 0.7);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.gem-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; }
.gem-btn:hover { transform: translateY(-1px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 12px 30px -10px rgba(219, 39, 119, 0.85); }

.filters { display: grid; gap: 10px; margin-top: 14px; }
.chip-row { display: flex; align-items: flex-start; gap: 12px; min-width: 0; }
.chip-label {
  flex: none; width: 72px; padding-top: 7px; font-size: 0.75rem; font-weight: 650;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3);
}
.chips { display: flex; flex-wrap: wrap; gap: 7px; min-width: 0; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px;
  border-radius: 999px; cursor: pointer; font-size: 0.84rem; white-space: nowrap;
  color: var(--text-2); background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.13);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.chip:hover { background: rgba(255, 255, 255, 0.1); color: var(--text); }
.chip[aria-pressed="true"] {
  color: #fff; background: var(--accent-soft); border-color: rgba(196, 181, 253, 0.65);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 0 16px -4px rgba(167, 139, 250, 0.7);
}
.chip .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.chip.fav[aria-pressed="true"] { background: rgba(252, 211, 77, 0.16); border-color: rgba(252, 211, 77, 0.6); }
.chip .n { color: var(--text-3); font-variant-numeric: tabular-nums; font-size: 0.78rem; }
.chip[aria-pressed="true"] .n { color: #e9e5ff; }

.link-btn {
  margin-top: 12px; padding: 4px 2px; border: 0; background: none; cursor: pointer;
  color: #d8ccff; text-decoration: underline; text-underline-offset: 3px; font-size: 0.875rem;
}
.link-btn[hidden] { display: none; }

.dot-1 { background: var(--t1); } .dot-2 { background: var(--t2); }
.dot-3 { background: var(--t3); } .dot-4 { background: var(--t4); }

/* ---------------------------------------------------------------- groups & rows */
#results { outline: none; }
.group { margin-top: 18px; padding: 8px; scroll-margin-top: 110px; }
.group-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; padding: 12px 12px 10px; }
.group-head h2 {
  display: flex; align-items: center; gap: 10px; margin: 0;
  font-size: 1.2rem; letter-spacing: -0.01em; font-weight: 700;
}
.group-head h2 .dot { width: 10px; height: 10px; border-radius: 50%; box-shadow: 0 0 12px currentColor; }
.group-count { margin-inline-start: auto; font-size: 0.85rem; color: var(--text-3); font-variant-numeric: tabular-nums; }
.group-intro { flex-basis: 100%; margin: 0; color: var(--text-2); font-size: 0.925rem; }

.rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }

.row {
  --i: 0;
  display: flex; align-items: stretch;
  background: var(--row); border: 1px solid var(--row-border); border-radius: var(--radius-sm);
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  animation: rise 0.34s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  animation-delay: calc(min(var(--i), 14) * 18ms);
}
.row:hover, .row:focus-within {
  transform: translateY(-2px);
  background: var(--row-hover); border-color: rgba(255, 255, 255, 0.17);
  box-shadow: 0 12px 26px -16px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.07);
}
.row.flash { animation: flash 1.6s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes flash {
  0%, 40% { border-color: rgba(249, 168, 212, 0.9); box-shadow: 0 0 0 2px rgba(244, 114, 182, 0.55), 0 0 30px rgba(244, 114, 182, 0.35); }
  100% { border-color: var(--row-border); box-shadow: none; }
}

.row-main {
  flex: 1; min-width: 0;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px 18px;
  padding-block: 12px; padding-inline: 16px 10px; border: 0; border-radius: var(--radius-sm);
  background: none; text-align: start; cursor: pointer;
}
.row-main:focus-visible { outline-offset: -2px; }
.row-text { display: grid; gap: 3px; min-width: 0; }
.row-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.row-title { font-weight: 650; font-size: 1rem; color: var(--text); }
.row-path { font-size: 0.8rem; color: var(--text-3); }
.row-desc { font-size: 0.9rem; color: var(--text-2); }
.row-note { font-size: 0.8rem; color: var(--warn); display: flex; gap: 6px; }
.row-note::before { content: "ⓘ"; flex: none; }
.row-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 5px; }

mark {
  background: rgba(167, 139, 250, 0.32); color: #fff; border-radius: 4px;
  padding: 0 1px; box-shadow: 0 0 0 1px rgba(196, 181, 253, 0.35);
}

.badge {
  display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px;
  font-size: 0.74rem; font-weight: 550; color: var(--text-2);
  background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.12);
}
.badge.tier-1 { color: var(--t1); background: rgba(94, 234, 212, 0.09); border-color: rgba(94, 234, 212, 0.34); }
.badge.tier-2 { color: var(--t2); background: rgba(147, 197, 253, 0.09); border-color: rgba(147, 197, 253, 0.34); }
.badge.tier-3 { color: var(--t3); background: rgba(196, 181, 253, 0.1); border-color: rgba(196, 181, 253, 0.36); }
.badge.tier-4 { color: var(--t4); background: rgba(249, 168, 212, 0.09); border-color: rgba(249, 168, 212, 0.34); }
.badge.only { color: var(--warn); border-color: rgba(252, 211, 77, 0.35); background: rgba(252, 211, 77, 0.07); }

.row-keys { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px 8px; max-width: 320px; }
.combo { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.plus { color: var(--text-3); font-size: 0.75rem; font-family: var(--mono); }
.or { color: var(--text-3); font-size: 0.75rem; }
.none { color: var(--text-3); font-family: var(--mono); font-size: 1.1rem; padding: 0 6px; }

/* keycaps */
kbd, .key {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 2em; height: 2em; padding: 0 0.55em;
  font-family: var(--mono); font-size: 0.8125rem; font-weight: 650; line-height: 1;
  color: #f7f5ff; white-space: nowrap;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.07) 100%);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.34),
    inset 0 -2px 0 rgba(0, 0, 0, 0.32),
    0 2px 0 rgba(8, 10, 30, 0.75),
    0 4px 10px -2px rgba(0, 0, 0, 0.4);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.45);
  cursor: inherit;
}
.key.mod { font-size: 0.78rem; }
.key.sym { font-size: 1rem; font-family: var(--font); }
.combo.hit .key {
  border-color: rgba(221, 214, 254, 0.95);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.4), inset 0 -2px 0 rgba(0, 0, 0, 0.3),
    0 2px 0 rgba(8, 10, 30, 0.75), 0 0 16px rgba(167, 139, 250, 0.75);
}
.mouse {
  display: inline-flex; align-items: center; gap: 5px; height: 2em; padding: 0 9px;
  border-radius: 999px; font-size: 0.78rem; font-weight: 600; color: #e0f2fe;
  background: rgba(56, 189, 248, 0.12); border: 1px dashed rgba(125, 211, 252, 0.5);
}
.mouse svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.slash-hint { min-width: 1.8em; height: 1.8em; opacity: 0.8; }

.row-side { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding-block: 6px; padding-inline: 2px 8px; }
.star {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px;
  border: 1px solid transparent; background: none; cursor: pointer; color: var(--text-3);
  transition: color 0.15s, background 0.15s, transform 0.15s;
}
.star svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; }
.star:hover { color: var(--text); background: rgba(255, 255, 255, 0.07); }
.star[aria-pressed="true"] { color: var(--warn); }
.star[aria-pressed="true"] svg { fill: currentColor; }
.star:active { transform: scale(0.9); }
.src {
  display: grid; place-items: center; min-width: 38px; height: 26px; border-radius: 8px;
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.03em; color: var(--text-3); text-decoration: none;
}
.src:hover { color: var(--text); background: rgba(255, 255, 255, 0.07); }

/* empty state */
.empty { margin-top: 18px; padding: 36px 24px; text-align: center; }
.empty h2 { margin: 0 0 8px; font-size: 1.25rem; }
.empty p { margin: 0 auto; max-width: 52ch; color: var(--text-2); }
.suggest { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 18px; }

/* ---------------------------------------------------------------- footer */
.site-footer { padding: 40px 0 56px; }
.footer-card { padding: 22px 24px; font-size: 0.9rem; color: var(--text-2); }
.footer-card p { margin: 0 0 12px; }
.footer-card strong { color: var(--text); }
.sources summary { cursor: pointer; color: var(--text); font-weight: 600; margin-bottom: 8px; }
.sources ul { margin: 8px 0 12px; padding-inline-start: 18px; display: grid; gap: 4px; font-size: 0.82rem; }
.sources li { overflow-wrap: anywhere; }
.fine { font-size: 0.8rem; color: var(--text-3); margin: 0 !important; }

/* ---------------------------------------------------------------- toast & dialog */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 60;
  transform: translate(-50%, 16px); opacity: 0;
  padding: 10px 18px; border-radius: 14px; font-size: 0.9rem; font-weight: 550;
  display: flex; align-items: center; gap: 8px; max-width: calc(100% - 32px);
  transition: opacity 0.2s ease, transform 0.2s ease; pointer-events: none;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast[hidden] { display: none; }
.toast .tick { color: var(--t1); }

.gem-dialog {
  width: min(560px, 100% - 32px); padding: 0; color: var(--text);
  border-radius: 26px;
}
.gem-dialog[open] { animation: pop 0.28s cubic-bezier(0.2, 0.8, 0.2, 1); }
.gem-dialog::backdrop { background: rgba(4, 6, 20, 0.55); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(0.97); } }
.gem-inner { padding: 26px 26px 8px; }
.gem-kicker { margin: 0 0 10px; display: flex; gap: 8px; flex-wrap: wrap; }
.gem-inner h2 { margin: 0; font-size: 1.5rem; letter-spacing: -0.015em; }
.gem-inner .row-path { display: block; margin-top: 4px; }
.gem-inner .gem-desc { margin: 12px 0 0; color: var(--text-2); }
.gem-keys { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 20px 0 6px; }
.gem-keys .key { font-size: 1rem; min-width: 2.4em; height: 2.4em; border-radius: 10px; }
.gem-keys .key.sym { font-size: 1.2rem; }
.gem-other { font-size: 0.82rem; color: var(--text-3); margin: 8px 0 0; }
.gem-src { font-size: 0.82rem; margin: 12px 0 0; }
.gem-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 26px 24px; }
.btn {
  height: 40px; padding: 0 16px; border-radius: 12px; cursor: pointer; font-weight: 600; font-size: 0.9rem;
  color: #fff; background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.btn:hover { background: rgba(255, 255, 255, 0.16); }
.btn-ghost { background: transparent; }

.noscript { padding: 24px; color: var(--text-2); }

/* ---------------------------------------------------------------- top bar + language */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 18px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 750; font-size: 1.05rem; letter-spacing: -0.01em; }
.brand-mark { width: 30px; height: 30px; }
.bm-edge { fill: #7c3aed; opacity: 0.85; }
.bm-top { fill: #1e1b4b; stroke: rgba(255, 255, 255, 0.28); stroke-width: 1; }
.bm-p { fill: none; stroke: #e9d5ff; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }

.lang-picker {
  position: relative; display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding-inline: 12px 6px; border-radius: 14px; cursor: pointer;
}
.lang-picker svg { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--text-2); stroke-width: 1.6; }
.lang-picker select {
  appearance: none; -webkit-appearance: none; border: 0; outline: none; cursor: pointer;
  height: 100%; padding-inline: 2px 24px; background: transparent; color: var(--text);
  font: inherit; font-size: 0.9rem; font-weight: 600;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-2) 50%), linear-gradient(135deg, var(--text-2) 50%, transparent 50%);
  background-position: calc(100% - 12px) 55%, calc(100% - 7px) 55%;
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
}
[dir="rtl"] .lang-picker select { background-position: 12px 55%, 7px 55%; }
.lang-picker select option { background: #151935; color: #fff; }
.lang-picker:focus-within { box-shadow: inset 0 1px 0 var(--glass-hi), 0 0 0 2px var(--ring); }

/* ---------------------------------------------------------------- category tiles */
.cat-block { display: grid; gap: 8px; }
.cat-groups { display: grid; gap: 8px; }
.cat-group {
  --hue: 167, 139, 250;
  display: grid; grid-template-columns: 116px minmax(0, 1fr); align-items: start; gap: 10px;
  padding: 10px 12px; border-radius: 18px;
  background: linear-gradient(90deg, rgba(var(--hue), 0.1), rgba(var(--hue), 0.02));
  border: 1px solid rgba(var(--hue), 0.2);
}
.grp-menus { --hue: 167, 139, 250; }
.grp-panels { --hue: 96, 165, 250; }
.grp-techniques { --hue: 244, 114, 182; }
.cat-group-label {
  margin: 0; padding-top: 12px; display: flex; align-items: center; gap: 8px;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: rgb(var(--hue));
}
.cat-group-label::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: rgb(var(--hue)); box-shadow: 0 0 10px rgb(var(--hue)); }
.tiles { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.tile {
  flex: none; display: flex; align-items: center; gap: 9px; min-height: 42px; padding-block: 5px; padding-inline: 5px 10px;
  white-space: nowrap;
  border-radius: 12px; cursor: pointer; text-align: start; color: var(--text-2);
  background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.08);
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.15s, opacity 0.15s;
}
.tile:hover { background: rgba(255, 255, 255, 0.08); color: var(--text); transform: translateY(-1px); }
.tile-icon {
  flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px;
  color: rgb(var(--hue));
  background: linear-gradient(145deg, rgba(var(--hue), 0.28), rgba(var(--hue), 0.08));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 0 0 1px rgba(var(--hue), 0.25);
}
.tile-icon svg, .group-icon svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tile-name { font-size: 0.86rem; font-weight: 580; line-height: 1.2; }
.tile-n { flex: none; font-size: 0.72rem; font-variant-numeric: tabular-nums; color: var(--text-3);
  padding: 1px 7px; border-radius: 999px; background: rgba(0, 0, 0, 0.25); }
.tile[aria-pressed="true"] {
  color: #fff; background: linear-gradient(145deg, rgba(var(--hue), 0.34), rgba(var(--hue), 0.14));
  border-color: rgba(var(--hue), 0.75);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 0 18px -4px rgba(var(--hue), 0.8);
}
.tile[aria-pressed="true"] .tile-icon { color: #fff; background: rgba(var(--hue), 0.55); }
.tile[aria-pressed="true"] .tile-n { color: #fff; background: rgba(0, 0, 0, 0.3); }
.tile.is-empty, .chip.is-empty { opacity: 0.42; }
.chip-sm { height: 30px; padding: 0 11px; font-size: 0.8rem; }

/* section headers with icons */
.group-head { align-items: center; }
.group-titles { display: grid; gap: 1px; min-width: 0; }
.group-eyebrow { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); }
.group-icon {
  --hue: 167, 139, 250;
  flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px;
  color: rgb(var(--hue));
  background: linear-gradient(145deg, rgba(var(--hue), 0.32), rgba(var(--hue), 0.08));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 0 0 1px rgba(var(--hue), 0.3), 0 0 22px -6px rgba(var(--hue), 0.8);
}
.group-icon svg { width: 21px; height: 21px; }
.tier-orb { flex: none; width: 12px; height: 12px; border-radius: 50%; margin-inline: 4px 2px; box-shadow: 0 0 14px 1px currentColor; }
.tier-orb.dot-1 { color: var(--t1); } .tier-orb.dot-2 { color: var(--t2); }
.tier-orb.dot-3 { color: var(--t3); } .tier-orb.dot-4 { color: var(--t4); }
.gem-title-row { display: flex; align-items: center; gap: 14px; }
.gem-title-row .group-icon { width: 46px; height: 46px; }

/* ---------------------------------------------------------------- right-to-left + scripts */
.combo, .gem-keys .combo { direction: ltr; unicode-bidi: isolate; }
[dir="rtl"] .row-note::before { content: "ⓘ"; }
:lang(ar) .eyebrow, :lang(ar) .chip-label, :lang(ar) .cat-group-label, :lang(ar) .group-eyebrow,
:lang(ar) .hero h1, :lang(ar) .brand { letter-spacing: 0; }
:lang(ar) .hero h1 { line-height: 1.35; }
:lang(ar) body, :lang(ar) button, :lang(ar) input, :lang(ar) select { font-family: "Segoe UI", Tahoma, "Noto Sans Arabic", "Geeza Pro", system-ui, sans-serif; }
:lang(ru) .hero h1, :lang(de) .hero h1, :lang(fr) .hero h1, :lang(es) .hero h1, :lang(tr) .hero h1 { font-size: clamp(1.8rem, 4.8vw, 3.1rem); }


/* ---------------------------------------------------------------- responsive */
@media (max-width: 760px) {
  .search { flex-wrap: wrap; padding-block: 8px; padding-inline: 14px 8px; row-gap: 6px; }
  .search-field { flex-basis: 100%; }
  .search input { height: 42px; font-size: 1.0625rem; }
  .search-controls { flex-basis: 100%; justify-content: space-between; }
  .slash-hint { display: none; }

  .toolbar { padding: 14px 12px 12px; }
  .chip-row { flex-direction: column; gap: 6px; }
  .chip-label { width: auto; padding-top: 0; }
  .chips {
    flex-wrap: nowrap; overflow-x: auto; width: 100%;
    scroll-snap-type: x proximity; scrollbar-width: none; -webkit-overflow-scrolling: touch;
    padding-block: 2px 4px; padding-inline: 0 24px; margin-inline-end: -12px;
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent);
    mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent);
  }
  .chips::-webkit-scrollbar, .tiles::-webkit-scrollbar { display: none; }
  [dir="rtl"] .chips, [dir="rtl"] .tiles {
    -webkit-mask-image: linear-gradient(270deg, #000 calc(100% - 28px), transparent);
    mask-image: linear-gradient(270deg, #000 calc(100% - 28px), transparent);
  }
  .cat-group { display: block; padding-block: 10px; padding-inline: 10px 0; }
  .cat-group-label { padding-top: 0; margin-bottom: 8px; }
  .tiles {
    flex-wrap: nowrap; overflow-x: auto; gap: 6px; scroll-snap-type: x proximity; scrollbar-width: none;
    padding-inline-end: 24px;
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent);
    mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent);
  }
  .tile { flex: none; scroll-snap-align: start; max-width: 190px; }
  .tile:hover { transform: none; }
  .topbar { padding-top: 12px; }
  .chip { flex: none; scroll-snap-align: start; }

  .group { padding: 6px; }
  .group-head { padding: 10px 8px 8px; }
  /* stack: title, description, keys, then badges */
  .row-main { display: flex; flex-direction: column; align-items: stretch; gap: 4px; padding-block: 12px; padding-inline: 12px 6px; }
  .row-text { display: contents; }
  .row-head { order: 1; }
  .row-desc { order: 2; }
  .row-note { order: 3; }
  .row-keys { order: 4; justify-content: flex-start; max-width: none; margin-top: 6px; }
  .row-meta { order: 5; margin-top: 6px; }
  .row-side { padding-block: 6px; padding-inline: 0 4px; }
}

@media (max-width: 420px) {
  .press-label { display: none; }
  .press-btn { padding: 0 11px; }
  .seg button { padding: 0 10px; }
  .toolbar-actions { width: 100%; justify-content: space-between; }
  .gem-btn { padding: 0 12px; }
}

/* ---------------------------------------------------------------- motion */
@media (prefers-reduced-motion: reduce) {
  .orb, .pulse { animation: none; }
  .row, .row.flash, .gem-dialog[open] { animation: none; }
  .row:hover, .row:focus-within, .gem-btn:hover { transform: none; }
  *, *::before, *::after { transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
[dir="rtl"] .cat-group { background: linear-gradient(270deg, rgba(var(--hue), 0.1), rgba(var(--hue), 0.02)); }

/* footer language switcher */
.lang-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, 0.1); }
.lang-link {
  height: 32px; padding: 0 12px; border-radius: 999px; cursor: pointer; font-size: 0.85rem;
  color: var(--text-2); background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.12);
}
.lang-link:hover { color: var(--text); background: rgba(255, 255, 255, 0.1); }
.lang-link[aria-pressed="true"] { color: #fff; background: var(--accent-soft); border-color: rgba(196, 181, 253, 0.65); }

/* Grid items default to min-width:auto, which lets a no-wrap tile row stretch the whole
   filter panel on phones. Pin every track to the container instead. */
.filters, .cat-block, .cat-groups { grid-template-columns: minmax(0, 1fr); min-width: 0; }
.filters > *, .cat-block > *, .cat-groups > *, .cat-group > * { min-width: 0; }
@media (min-width: 761px) {
  .cat-group { grid-template-columns: 116px minmax(0, 1fr); }
}
