@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/nunito-latin-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/nunito-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/nunito-latin-ext-600-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/nunito-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("/fonts/nunito-latin-ext-800-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("/fonts/nunito-latin-800-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #f0f3f8;
  --ink: #0e1522;
  --muted: #647084;
  --card: #ffffff;
  --line: rgba(14, 21, 34, 0.08);
  --accent: #16a34a;
  --accent-deep: #15803d;
  --sage: #4d7c5a;
  --shadow: 0 18px 40px rgba(14, 28, 48, 0.07);
  --toast: rgba(14, 21, 34, 0.94);
  --aside: #f4f6fa;
  --aside-chip: #ffffff;
  --keybox: #f6f8fb;
  --keybox-btn: #ffffff;
  --radius: 18px;
  --radius-lg: 22px;
  --radius-sm: 12px;
  --radius-chip: 999px;
  --fs-xs: 12px;
  --fs-sm: 14px;
  --fs-md: 16px;
  --fs-lg: 28px;
  --fs-xl: 40px;
  --font: "Nunito", "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --glow: rgba(22, 163, 74, 0.18);
  color-scheme: light;
}

body[data-theme="night"] {
  --bg: #07080b;
  --ink: #eef1f4;
  --muted: #8b93a0;
  --card: #101216;
  --line: rgba(255, 255, 255, 0.08);
  --accent: #22c55e;
  --accent-deep: #4ade80;
  --sage: #22c55e;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.38);
  --toast: rgba(238, 241, 244, 0.94);
  --aside: #07080b;
  --aside-chip: #121418;
  --keybox: #0c0e12;
  --keybox-btn: #161a20;
  --glow: rgba(34, 197, 94, 0.18);
  --brand: #22c55e;
  --btn: #e8eaed;
  --btn-ink: #07080b;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font);
  font-weight: 400;
  color: var(--ink);
  background:
    radial-gradient(920px 480px at 12% -8%, rgba(255, 255, 255, 0.035), transparent 56%),
    radial-gradient(700px 400px at 100% 8%, rgba(255, 255, 255, 0.02), transparent 50%),
    var(--bg);
  background-attachment: fixed;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background 0.45s var(--ease), color 0.45s ease;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button, input { font: inherit; color: inherit; }

:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 75%, transparent);
  outline-offset: 3px;
}

.blobs {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.blobs span {
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.22;
  contain: strict;
}

.blobs span:nth-child(1) {
  background: #3d9a62;
  top: -180px;
  left: -120px;
}

.blobs span:nth-child(2) {
  background: #145c32;
  right: -180px;
  bottom: -200px;
  opacity: 0.18;
}

.blobs span:nth-child(3) {
  background: #6ecf93;
  width: 240px;
  height: 240px;
  left: 48%;
  top: 22%;
  opacity: 0.12;
}

@media (prefers-reduced-motion: no-preference) and (min-width: 1101px) {
  .blobs span:nth-child(1) { animation: drift 28s ease-in-out infinite; }
  .blobs span:nth-child(2) { animation: drift 34s ease-in-out infinite reverse; }
}

.spark { display: none; }

.veil {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.18;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.4'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

.dotgrid {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.16;
  background-image: radial-gradient(rgba(12, 17, 27, 0.16) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(circle at 50% 18%, black 12%, transparent 70%);
}

body[data-theme="night"] .dotgrid {
  opacity: 0.12;
  background-image: radial-gradient(rgba(237, 241, 247, 0.14) 1px, transparent 1px);
}

body[data-theme="night"] .veil { opacity: 0.12; }
body[data-theme="night"] .blobs span:nth-child(1) { background: #101216; opacity: 0.35; }
body[data-theme="night"] .blobs span:nth-child(2) { background: #0c0e12; opacity: 0.4; }
body[data-theme="night"] .blobs span:nth-child(3) { background: #16a34a; opacity: 0.14; }

.topglass {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 52px;
  z-index: 25;
  pointer-events: none;
  opacity: 0;
  background: transparent;
  border-bottom: 1px solid transparent;
  box-shadow: none;
  transition: opacity 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

body.is-app .topglass {
  left: var(--rail, 248px);
}

.topglass.is-on {
  opacity: 1;
  background: color-mix(in srgb, var(--bg) 94%, var(--card));
  border-bottom-color: var(--line);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

body[data-theme="night"] .topglass.is-on {
  background: #07080b;
  border-bottom-color: rgba(255, 255, 255, 0.06);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
}

html {
  scrollbar-color: #3a3f48 #07080b;
}

::-webkit-scrollbar { width: 10px; height: 10px; background: #07080b; }
::-webkit-scrollbar-thumb { background: #3a3f48; border-radius: 99px; }

.splash, .auth, .app { position: relative; z-index: 1; }

.splash {
  min-height: 100vh;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
}

.splash-text {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
  animation: breathe 1.6s ease-in-out infinite;
}

.splash-mark {
  animation: pop-in 0.7s var(--ease) both;
  filter: drop-shadow(0 10px 24px rgba(34, 197, 94, 0.35));
}

.splash-bar {
  width: 88px;
  height: 4px;
  border-radius: 999px;
  background: rgba(16, 22, 34, 0.08);
  overflow: hidden;
}

.splash-bar span {
  display: block;
  height: 100%;
  width: 40%;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  animation: load-sweep 1.1s ease-in-out infinite;
}

.auth .mark,
.auth-head .mark {
  width: 56px;
  height: 56px;
}

.mark svg { width: 100%; height: 100%; display: block; }
.mark rect { fill: var(--brand, var(--accent)); }
body[data-theme="night"] .mark rect { fill: var(--brand); }
.mark .mark-r { fill: #07080b; }
.mark circle {
  fill: #07080b;
  transform-origin: 24px 24px;
  animation: pulse 2.4s ease-in-out infinite;
}

.auth {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 28px 16px;
  perspective: 1200px;
}

.card {
  position: relative;
  width: min(420px, 100%);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 30px 28px 22px;
  overflow: hidden;
  transform-style: preserve-3d;
  animation: card-in 0.75s var(--ease) both;
  transition: transform 0.45s var(--ease), box-shadow 0.35s ease, border-color 0.35s ease;
}

.card.glass-edge {
  border-color: var(--line);
  box-shadow:
    var(--shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

body[data-theme="night"] .card.glass-edge {
  border-color: var(--line);
  box-shadow:
    var(--shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.card:hover {
  box-shadow:
    var(--shadow),
    0 0 0 1px rgba(255, 255, 255, 0.1);
}

.card.is-bloom {
  transform: scale(1.015);
  box-shadow:
    var(--shadow),
    0 0 0 1px rgba(255, 255, 255, 0.14);
}

.sheen {
  position: absolute;
  inset: -40% auto -40% -60%;
  width: 38%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.18), transparent);
  transform: skewX(-18deg);
  animation: sheen 7s ease-in-out infinite;
  pointer-events: none;
  opacity: 0.7;
}

.brand {
  margin: 14px 0 0;
  font-weight: 800;
  letter-spacing: -0.045em;
  font-size: 1.05rem;
}

.copy-swap {
  transition: opacity 0.22s ease, transform 0.22s var(--ease);
}

.copy-swap.is-swap {
  opacity: 0;
  transform: translateY(6px);
}

h1, .display {
  margin: 6px 0 0;
  font-size: clamp(2rem, 4.2vw, var(--fs-xl));
  line-height: 1.02;
  letter-spacing: -0.055em;
  font-weight: 800;
}

.lined {
  position: relative;
  display: inline-block;
}

.lined::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 42%;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), transparent);
  transform-origin: left center;
  animation: underline-draw 0.7s var(--ease) both;
}

.sub, .lede, .hint, .workspace p, .soft p, .field-meta {
  color: var(--muted);
  line-height: 1.55;
  font-weight: 400;
}

.sub { margin: 10px 0 20px; max-width: 34ch; }

.stage {
  position: relative;
  min-height: 0;
}

.panel {
  animation: panel-in 0.35s var(--ease) both;
}

.panel.is-out {
  animation: panel-out 0.22s ease both;
}

.field { display: grid; gap: 6px; margin-bottom: 14px; }

label { font-size: var(--fs-sm); font-weight: 800; }

.field-meta {
  margin: 0;
  font-size: var(--fs-xs);
  font-weight: 700;
}

.input-shell { position: relative; }

input[type="text"], input:not([type]), input[type="password"] {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.8);
  border-radius: 14px;
  padding: 14px;
  outline: none;
  letter-spacing: 0.02em;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

input:hover { background: rgba(255, 255, 255, 0.95); }

input:focus {
  border-color: rgba(61, 95, 138, 0.55);
  box-shadow: 0 0 0 4px rgba(61, 95, 138, 0.16);
  transform: translateY(-1px);
}

.switch, .ghost, .nav-item, .primary, .keybox button {
  border: 0;
  cursor: pointer;
}

.hint {
  margin: 0 0 12px;
  font-size: var(--fs-sm);
  font-weight: 700;
}

.hint.strong { color: var(--ink); }
.hint.ok { color: var(--sage); }

.field-error {
  margin: 6px 0 0;
  font-size: var(--fs-xs);
  font-weight: 800;
  color: #a33b32;
  animation: shake 0.4s var(--ease);
}

.field.has-error input {
  border-color: rgba(163, 59, 50, 0.45);
  box-shadow: 0 0 0 4px rgba(163, 59, 50, 0.1);
}

.key-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.key-chips .chip,
.reveal-chips .chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(61, 95, 138, 0.1);
  color: var(--accent-deep);
  font-family: ui-monospace, Consolas, monospace;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  animation: chip-in 0.28s var(--ease) both;
}

.reveal-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 12px;
}

.auth-foot {
  margin: 18px 0 0;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--muted);
  opacity: 0.85;
}

.card[data-mode="register"] #login-form,
.card[data-mode="login"] #register-box,
.card[data-mode="reveal"] #login-form,
.card[data-mode="reveal"] #register-box { display: none; }

.card[data-mode="login"] #reveal-box,
.card[data-mode="register"] #reveal-box { display: none; }

.auth-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.auth-clock {
  margin: 0 0 0 auto;
  font-size: var(--fs-xs);
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.auth-meta .brand { margin: 0; }
.brand-tag {
  margin: 2px 0 0;
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.tabs {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  margin-bottom: 14px;
  border-radius: 16px;
  background: rgba(16, 22, 34, 0.05);
  overflow: hidden;
  isolation: isolate;
}

body[data-theme="night"] .tabs {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(230, 235, 244, 0.08);
}

.tab {
  position: relative;
  z-index: 1;
  border: 0;
  background: transparent;
  border-radius: 12px;
  padding: 10px 12px;
  font-weight: 800;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s ease;
  min-width: 0;
}

.tab.is-on { color: var(--ink); }

body[data-theme="night"] .tab { color: rgba(230, 235, 244, 0.45); }
body[data-theme="night"] .tab.is-on { color: #e6ebf4; }

.tab-breath {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-left: 6px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0;
  vertical-align: 1px;
}

.tab:not(.is-on) .tab-breath {
  opacity: 0.45;
  animation: tab-breathe 2.2s ease-in-out infinite;
}

.tabs.is-reveal .tab { pointer-events: auto; }

.flow-steps {
  display: none;
  align-items: center;
  gap: 8px;
  margin: -2px 0 14px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.flow-steps.is-on { display: flex; }

.flow-step {
  opacity: 0.4;
  transition: opacity 0.2s ease, color 0.2s ease;
}

.flow-step.is-on { opacity: 0.75; color: var(--ink); }
.flow-step.is-now { opacity: 1; color: var(--accent-deep); }

.flow-sep {
  opacity: 0.35;
  font-weight: 800;
}

.label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.text-btn {
  border: 0;
  background: transparent;
  color: var(--accent-deep);
  font-weight: 800;
  font-size: 12px;
  cursor: pointer;
  padding: 0;
}

.bio-stub {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0 0 10px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
  font-size: 13px;
  padding: 11px 12px;
  cursor: not-allowed;
  opacity: 0.8;
}

.bio-ico {
  width: 14px;
  height: 14px;
  border: 2px solid var(--muted);
  border-radius: 4px 4px 8px 8px;
  position: relative;
}

.bio-ico::before {
  content: "";
  position: absolute;
  left: 2px;
  right: 2px;
  top: -5px;
  height: 6px;
  border: 2px solid var(--muted);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
}

.reveal-layout {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: start;
  margin-bottom: 10px;
}

.qr-wrap {
  margin: 0;
  text-align: center;
}

.qr-wrap img {
  width: 96px;
  height: 96px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.7);
  padding: 6px;
  display: block;
}

.qr-wrap figcaption {
  margin-top: 6px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.keybox.is-blurred code {
  filter: blur(5px);
  user-select: none;
}

.soft-confirm {
  margin: 0 0 12px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(61, 95, 138, 0.1);
  border: 1px solid rgba(61, 95, 138, 0.18);
}

.soft-confirm p {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.soft-actions {
  display: flex;
  gap: 8px;
}

.soft-actions .ghost { flex: 1; }

.ghost.solid {
  background: var(--accent);
  color: #f7f9fc;
}

body[data-theme="night"] .ghost.solid { color: #0a0e16; }

.primary.is-pulse {
  animation: btn-pulse 0.45s var(--ease);
}

.tab-ink {
  position: absolute;
  top: 4px;
  left: 4px;
  width: calc((100% - 12px) / 2);
  height: calc(100% - 8px);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 18px rgba(16, 28, 48, 0.08);
  transform: translateX(0);
  transition: transform 0.28s var(--ease);
  pointer-events: none;
  z-index: 0;
}

.tabs[data-active="register"] .tab-ink {
  transform: translateX(calc(100% + 4px));
}

body[data-theme="night"] .tab-ink {
  background: rgba(230, 235, 244, 0.14);
  box-shadow:
    0 6px 16px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(230, 235, 244, 0.12);
}

.tabs.is-locked {
  opacity: 0.55;
  pointer-events: none;
}

.primary, .ghost, .switch, .nav-item, .keybox button {
  transition: transform 0.15s ease, background 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease;
}

.primary {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #0b0d10;
  font-weight: 800;
  letter-spacing: -0.01em;
  padding: 14px 16px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
  isolation: isolate;
  border: 0;
}

.primary .btn-label { position: relative; z-index: 1; }

.primary .ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 250, 247, 0.28);
  transform: scale(0);
  animation: ripple 0.6s ease-out;
  pointer-events: none;
  z-index: 0;
}

.btn-shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.28) 50%, transparent 70%);
  transform: translateX(-120%);
}

.primary:hover {
  background: var(--accent-deep);
  box-shadow: 0 14px 30px var(--glow);
}

.primary:hover .btn-shine { animation: shine 0.85s ease; }

.primary:active, .ghost:active, .switch:active, .keybox button:active { transform: scale(0.98); }

.primary:disabled {
  opacity: 0.75;
  cursor: progress;
}

.primary.is-busy .btn-label::after {
  content: "";
  display: inline-block;
  width: 0.9em;
  height: 0.9em;
  margin-left: 0.55em;
  border-radius: 50%;
  border: 2px solid rgba(255, 250, 247, 0.35);
  border-top-color: #f7f9fc;
  vertical-align: -0.1em;
  animation: spin 0.7s linear infinite;
}

.switch {
  width: 100%;
  margin-top: 14px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
  padding: 8px;
}

.switch:hover { color: var(--ink); }

.steps {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 16px;
}

.step {
  width: 28px;
  height: 4px;
  border-radius: 999px;
  background: rgba(16, 22, 34, 0.1);
  transition: background 0.3s ease, width 0.3s var(--ease);
}

.step.is-on {
  width: 40px;
  background: var(--accent);
}

.keybox {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  margin: 0 0 14px;
  padding: 12px;
  border-radius: 16px;
  background: var(--keybox);
  border: 1px solid var(--line);
  animation: glow-in 0.6s var(--ease) both;
  transition: background 0.45s ease, border-color 0.45s ease;
}

.keybox.is-copied {
  border-color: rgba(93, 122, 144, 0.45);
  box-shadow: 0 0 0 4px rgba(93, 122, 144, 0.12);
}

body[data-theme="night"] .keybox.is-copied {
  border-color: color-mix(in srgb, var(--sage) 55%, transparent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--sage) 18%, transparent);
}

.keybox code {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 12px;
  font-weight: 700;
  word-break: break-all;
  color: var(--ink);
  letter-spacing: 0.02em;
}

.keybox button {
  border-radius: 12px;
  background: var(--keybox-btn);
  color: var(--accent-deep);
  font-weight: 800;
  padding: 10px 12px;
  border: 1px solid var(--line);
  transition: background 0.45s ease, color 0.45s ease, border-color 0.45s ease;
}

body[data-theme="night"] .keybox button {
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 28%, transparent);
}

.celebrate {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.celebrate span {
  position: absolute;
  top: 40%;
  left: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0;
  animation: confetti 0.9s var(--ease) both;
}

.celebrate span:nth-child(1) { --x: -70px; --y: -50px; background: #3d5f8a; }
.celebrate span:nth-child(2) { --x: 60px; --y: -40px; background: #5d7a90; animation-delay: 0.05s; }
.celebrate span:nth-child(3) { --x: -40px; --y: 30px; background: #a8bfd8; animation-delay: 0.08s; }
.celebrate span:nth-child(4) { --x: 80px; --y: 20px; background: #3d5f8a; animation-delay: 0.1s; }
.celebrate span:nth-child(5) { --x: 10px; --y: -70px; background: #5d7a90; animation-delay: 0.12s; }
.celebrate span:nth-child(6) { --x: -90px; --y: 10px; background: #a8bfd8; animation-delay: 0.15s; }

#reveal-box { position: relative; }

body.is-app::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  z-index: 70;
  background: linear-gradient(
    90deg,
    transparent,
    color-mix(in srgb, var(--accent) 55%, transparent) 35%,
    color-mix(in srgb, var(--accent) 55%, transparent) 65%,
    transparent
  );
  pointer-events: none;
}

.app {
  min-height: 100vh;
  min-height: 100dvh;
  display: block;
  position: relative;
}

.view[hidden] { display: none !important; }
.view.is-on { display: block; animation: orch 0.45s var(--ease) both; }

.query-shell { margin-top: 8px; }
.query-title {
  margin: 4px 0 0;
  font-size: clamp(24px, 3vw, 32px);
  letter-spacing: -0.04em;
}

.query-desk {
  border: 1px solid var(--line);
  border-left: 3px solid #22c55e;
  border-radius: 14px;
  background: var(--card);
  box-shadow: none;
  padding: 18px;
}

body[data-theme="night"] .query-desk {
  background: #0e1012;
  border-color: rgba(255, 255, 255, 0.08);
  border-left-color: #22c55e;
  box-shadow: none;
}

.query-desk .panel-note { margin-bottom: 18px; }

.q-form {
  display: grid;
  gap: 14px;
  margin: 0 0 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--bg) 45%, var(--card));
  box-shadow: none;
}

.q-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}

.q-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.q-field span {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.q-field input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--bg) 80%, var(--card));
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  padding: 11px 12px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.q-field input:focus {
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.06);
}

.q-field input:invalid:not(:placeholder-shown) {
  border-color: rgba(163, 59, 50, 0.45);
}

.q-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.q-actions .primary {
  width: auto;
  min-width: 128px;
  padding: 11px 16px;
  background: #22c55e;
  color: #07080b;
  box-shadow: 0 8px 20px rgba(34, 197, 94, 0.28);
}

.q-actions .primary:hover {
  background: #4ade80;
  color: #07080b;
}

.q-actions .ghost {
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: transparent;
  font-weight: 800;
  color: var(--ink);
}

.q-meta {
  margin-left: auto;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.q-result {
  display: grid;
  gap: 10px;
}

.q-result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.q-result-title {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.q-table-wrap {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: auto;
  max-height: min(52vh, 520px);
  background: color-mix(in srgb, var(--card) 55%, transparent);
  box-shadow: none;
}

.q-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  font-weight: 700;
}

.q-table th,
.q-table td {
  padding: 11px 12px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.q-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: color-mix(in srgb, var(--card) 92%, var(--bg));
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.q-table tbody tr:hover td {
  background: rgba(255, 255, 255, 0.04);
}

.q-empty-row td {
  color: var(--muted);
  font-weight: 700;
  white-space: normal;
  padding: 22px 14px;
}

body[data-theme="night"] .q-form,
body[data-theme="night"] .q-table-wrap {
  background: #0e1012;
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: none;
}

body[data-theme="night"] .q-field input {
  background: #0a0b0d;
  border-color: rgba(255, 255, 255, 0.1);
}

body[data-theme="night"] .q-table th {
  background: #121418;
  color: #9aa3b2;
}

body[data-theme="night"] .q-table tbody tr:hover td {
  background: rgba(255, 255, 255, 0.035);
}

.admin-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(4, minmax(100px, 0.65fr));
  gap: 8px;
  margin: 14px 0 12px;
}

.admin-search,
.admin-filter {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  outline: none;
}

.admin-search:focus,
.admin-filter:focus {
  border-color: rgba(61, 95, 138, 0.55);
  box-shadow: 0 0 0 3px rgba(61, 95, 138, 0.12);
}

.admin-table-wrap {
  margin-top: 4px;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.35);
  max-height: min(58vh, 560px);
  overflow-y: auto;
}

.admin-table.is-loading { opacity: 0.72; }
.admin-empty { padding: 16px 14px; margin: 0; }

.admin-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 12px;
}

.admin-page-info {
  font-size: 13px;
  font-weight: 800;
  color: var(--muted);
  min-width: 64px;
  text-align: center;
}

.admin-page-btn,
.admin-refresh {
  padding: 8px 12px !important;
  font-size: 12px !important;
  box-shadow: none !important;
}

.admin-page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.admin-row-rich { cursor: pointer; }
.admin-row-rich:hover { background: rgba(61, 95, 138, 0.06); }

.admin-row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-edit-btn {
  padding: 8px 12px !important;
  font-size: 12px !important;
  box-shadow: none !important;
}

.admin-note-preview {
  display: block !important;
  margin-top: 4px !important;
  max-width: 42ch;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0.85;
}

.admin-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.admin-quick .primary,
.admin-quick .ghost {
  width: auto;
  min-width: 120px;
}

.admin-todo {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px dashed rgba(61, 95, 138, 0.35);
  background: rgba(61, 95, 138, 0.06);
}

.admin-todo ul {
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--muted);
  font-weight: 700;
  font-size: 13px;
  line-height: 1.55;
}

.admin-check {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0 8px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.admin-check input { width: 16px; height: 16px; accent-color: var(--accent); }

.admin-drawer {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: 1fr min(420px, 94vw);
}

.admin-drawer[hidden] { display: none !important; }

.admin-drawer-backdrop {
  background: rgba(10, 14, 22, 0.45);
  backdrop-filter: blur(4px);
}

.admin-drawer-panel {
  background: var(--card);
  border-left: 1px solid var(--line);
  box-shadow: -20px 0 50px rgba(0, 0, 0, 0.18);
  padding: 22px 20px 28px;
  overflow-y: auto;
  animation: drawer-in 0.28s var(--ease) both;
}

.admin-drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.admin-drawer-head h2 {
  margin: 4px 0 0;
  font-size: 24px;
  letter-spacing: -0.04em;
}

.admin-drawer-actions {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.admin-drawer-actions .primary,
.admin-drawer-actions .ghost { width: 100%; }

.admin-keybox {
  margin-top: 16px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(61, 95, 138, 0.28);
  background: rgba(61, 95, 138, 0.08);
}

.admin-keybox code {
  display: block;
  margin: 8px 0;
  font-size: 12px;
  font-weight: 800;
  word-break: break-all;
  color: var(--ink);
}

body[data-theme="night"] .admin-drawer-backdrop { background: rgba(0, 0, 0, 0.55); }
body[data-theme="night"] .admin-drawer-panel {
  background: rgba(16, 22, 34, 0.98);
  border-color: rgba(230, 235, 244, 0.1);
}
body[data-theme="night"] .admin-row-rich:hover { background: rgba(255, 255, 255, 0.035); }

.admin-table { display: grid; }

.admin-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.admin-row:last-child { border-bottom: 0; }

.admin-row-head {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  background: rgba(16, 22, 34, 0.04);
}

.admin-row strong {
  display: block;
  font-size: 14px;
  letter-spacing: -0.02em;
}

.admin-row small {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.admin-role-select {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  border-radius: 12px;
  padding: 8px 10px;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
  min-width: 120px;
}

.admin-del {
  padding: 8px 12px !important;
  font-size: 12px !important;
  box-shadow: none !important;
}

.admin-label {
  display: block;
  margin: 16px 0 8px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.admin-textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  border-radius: 14px;
  padding: 12px 14px;
  font: inherit;
  font-weight: 700;
  color: var(--ink);
  resize: vertical;
  min-height: 110px;
  outline: none;
}

.admin-textarea:focus {
  border-color: rgba(61, 95, 138, 0.55);
  box-shadow: 0 0 0 4px rgba(61, 95, 138, 0.14);
}

.admin-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}

.admin-actions .primary { width: auto; min-width: 140px; }

.admin-hint {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.admin-stat {
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.45);
}

.admin-stat span {
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.admin-stat strong {
  display: block;
  margin-top: 8px;
  font-size: 28px;
  letter-spacing: -0.05em;
  line-height: 1;
}

.admin-stat-small { font-size: 14px !important; letter-spacing: -0.02em !important; }

body[data-theme="night"] .admin-table-wrap,
body[data-theme="night"] .admin-stat {
  background: rgba(12, 14, 18, 0.92);
}

body[data-theme="night"] .admin-row-rich:hover {
  background: rgba(255, 255, 255, 0.035);
}

body[data-theme="night"] .admin-role-select,
body[data-theme="night"] .admin-textarea,
body[data-theme="night"] .admin-search,
body[data-theme="night"] .admin-filter {
  background: rgba(18, 24, 36, 0.95);
  border-color: rgba(230, 235, 244, 0.12);
  color: var(--ink);
}

.main {
  padding: 28px 28px 44px;
  max-width: none;
  min-width: 0;
  box-sizing: border-box;
}

.main .board,
.main .welcome-stage,
.main .query-hub {
  max-width: none;
}

.main .display {
  font-size: clamp(2rem, 4vw, 2.75rem);
}

header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.eyebrow, .kicker {
  margin: 0;
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: none;
  color: var(--muted);
}

.lede {
  margin: 10px 0 0;
  max-width: 42ch;
  font-size: var(--fs-md);
  font-weight: 300;
}

.ghost {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 11px 15px;
  font-weight: 700;
  box-shadow: none;
}

.chip-radius { border-radius: var(--radius-chip) !important; }

.ghost:hover {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.board {
  display: grid;
  gap: 20px;
  margin-top: 22px;
  max-width: 1040px;
}

.dash-quick {
  display: grid;
  gap: 10px;
}

.dash-quick .kicker { margin: 0; }

.dash-quick-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dash-quick-btn {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--card) 80%, transparent);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  padding: 9px 14px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.dash-quick-btn:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  color: var(--accent-deep);
}

body[data-theme="night"] .dash-quick-btn {
  background: rgba(18, 26, 38, 0.85);
}

.dash-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
}

.dash-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: stretch;
}

.dash-pair {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 14px;
  align-items: stretch;
}

.panel-stat-dense,
.panel-plan {
  min-height: 0;
  height: auto;
}

.panel-stat-dense {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto 1fr;
  align-items: center;
  column-gap: 16px;
  row-gap: 0;
  border: 0;
  border-left: 4px solid #5b9bd8;
  border-radius: 0 14px 14px 0;
  background:
    linear-gradient(90deg, rgba(91, 155, 216, 0.12), transparent 42%),
    transparent;
  box-shadow: inset 0 0 0 1px rgba(91, 155, 216, 0.18);
  padding: 12px 18px;
  min-height: 0;
  height: auto;
  box-sizing: border-box;
}

.panel-stat-dense .panel-head {
  grid-column: 1 / -1;
  margin: 0;
}

.panel-stat-dense .stat-hero {
  grid-column: 1 / -1;
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  gap: 12px;
  text-align: left;
  justify-items: start;
  padding: 6px 0 2px;
  flex: none;
}

.panel-stat-dense::before { display: none; }

.panel-stat-dense[data-tone="query"] .panel-num {
  color: #8bb8e8;
  font-variant-numeric: tabular-nums;
}

.panel-stat-dense[data-tone="users"] {
  border-left: 4px solid #6ea88c;
  border-radius: 0 14px 14px 0;
  background:
    linear-gradient(90deg, rgba(110, 168, 140, 0.14), transparent 45%),
    transparent;
  box-shadow: inset 0 0 0 1px rgba(110, 168, 140, 0.22);
}

.panel-stat-dense[data-tone="users"] .panel-num {
  color: #9ecbb4;
}

.panel-stat-dense .panel-head {
  margin-bottom: 0;
  flex-shrink: 0;
}

.stat-hero {
  display: grid;
  gap: 8px;
  margin: 0;
  text-align: center;
  justify-items: center;
  align-content: center;
  flex: 1 1 auto;
  min-height: 0;
  padding: 12px 4px;
}

.panel-stat-dense .stat-hero .panel-num {
  margin: 0;
  font-size: clamp(34px, 3.6vw, 44px);
  letter-spacing: -0.07em;
  line-height: 1;
}

.panel-stat-dense .stat-hero-label {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
}

.stat-hero .panel-num {
  margin: 0;
  font-size: clamp(42px, 4.4vw, 56px);
  letter-spacing: -0.07em;
  line-height: 1;
}

.stat-hero-label {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}

/* legacy aliases keep mobile overrides safe */
.panel-stat-ink,
.panel-stat-wash {
  border-radius: var(--radius-lg);
}
.panel-stat-ink::before,
.panel-stat-wash::before { display: none; }

/* --- Member: seal / stamp --- */
.panel-seal {
  border: 1px dashed color-mix(in srgb, var(--accent) 45%, var(--line));
  background: color-mix(in srgb, var(--card) 88%, var(--accent));
  border-radius: 20px;
  transform: rotate(-0.8deg);
  text-align: center;
}
.panel-seal::before { display: none; }
.panel-seal-ring {
  position: absolute;
  inset: 10px;
  border: 1px solid color-mix(in srgb, var(--accent) 18%, transparent);
  border-radius: 14px;
  pointer-events: none;
}
.panel-seal .panel-head { justify-content: center; gap: 12px; }
.panel-seal .panel-status { color: var(--accent); }
.panel-seal .panel-handle {
  letter-spacing: 0.14em;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 13px;
}

.panel-plan {
  display: flex;
  flex-direction: column;
  gap: 10px;
  border: 1.5px dashed rgba(212, 176, 122, 0.45);
  border-radius: 20px;
  background:
    radial-gradient(120% 80% at 100% 0%, rgba(196, 149, 74, 0.2), transparent 50%),
    linear-gradient(160deg, rgba(26, 20, 12, 0.35), transparent 60%),
    var(--card);
  padding: 14px;
  height: auto;
  box-sizing: border-box;
}

.panel-plan-wide {
  display: grid;
  grid-template-columns: 1.1fr 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 14px 18px;
}

.panel-plan-wide .plan-wide-main {
  min-width: 0;
}

.panel-plan-wide .stat-hero {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  text-align: left;
  justify-items: start;
  padding: 4px 0 0;
  flex: none;
}

.panel-plan-wide .panel-status {
  font-size: clamp(28px, 3vw, 36px);
}

.panel-plan-wide .plan-meter-days {
  margin: 0;
}

.panel-plan-wide .plan-upgrade {
  margin: 0;
  width: auto;
  min-width: 160px;
  justify-self: end;
}

.panel-plan .kicker,
.panel-plan .panel-status {
  color: #e0bf7a;
}

.panel-plan .plan-upgrade {
  background: linear-gradient(135deg, #c4954a, #e0bf7a);
  color: #1a140c;
  box-shadow: 0 12px 26px rgba(196, 149, 74, 0.28);
}

.panel-plan::before { display: none; }

.panel-plan .panel-status {
  margin: 0;
  font-size: clamp(28px, 2.8vw, 34px);
  letter-spacing: -0.05em;
  line-height: 1;
}

.panel-plan .panel-handle {
  margin: 0;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.panel-plan .plan-meter-days {
  margin-top: auto;
}

.panel-plan .plan-upgrade {
  margin-top: 10px;
}

@media (min-width: 1101px) {
  .dash-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    align-items: stretch;
  }

  .dash-stats {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .panel-stat-dense {
    min-height: 0;
  }

  .panel-plan-wide {
    min-height: 0;
  }

  .panel-announce {
    padding: 18px 20px 16px;
  }

  .panel-announce-title {
    font-size: clamp(20px, 2.2vw, 26px);
    max-width: 56ch;
    line-height: 1.25;
  }
}

.plan-meter {
  padding: 10px 11px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 55%, transparent);
}

.plan-meter-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.plan-meter-top span {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.plan-meter-top strong {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.plan-meter-sub {
  margin: 6px 0 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.plan-meter .panel-bar {
  height: 5px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--line) 80%, transparent);
  overflow: hidden;
}

.plan-meter .panel-bar i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #fff));
  transition: width 0.45s var(--ease);
}

.plan-upgrade {
  margin-top: auto;
  width: 100%;
  border: 0;
  border-radius: 12px;
  padding: 10px 14px;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  color: #f4f7fb;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  box-shadow: 0 10px 22px var(--glow);
  transition: transform 0.15s ease, filter 0.15s ease;
}

.plan-upgrade:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.panel-plan.is-free .panel-status { color: var(--muted); }
.panel-plan.is-premium .panel-status { color: var(--accent); }
.panel-plan.is-admin .panel-status { color: var(--accent-deep); }

body.is-app[data-surface="home"] {
  --surface-glow: color-mix(in srgb, var(--accent) 14%, transparent);
}

body.is-app[data-surface="premium"] {
  --surface-glow: rgba(196, 149, 74, 0.16);
}

body.is-app[data-surface="query"] {
  --surface-glow: color-mix(in srgb, var(--sage) 12%, transparent);
}

body.is-app[data-surface="admin"] {
  --surface-glow: rgba(140, 90, 70, 0.12);
}

body.is-app[data-surface] {
  background:
    radial-gradient(900px 420px at 8% -6%, var(--surface-glow, transparent), transparent 55%),
    radial-gradient(700px 380px at 100% 0%, color-mix(in srgb, var(--sage) 8%, transparent), transparent 50%),
    var(--bg);
}

.premium-page {
  max-width: 1180px;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(196, 149, 74, 0.14), transparent 34%),
    linear-gradient(135deg, color-mix(in srgb, var(--card) 88%, #1a140c), var(--card));
  box-shadow:
    inset 0 1px 0 rgba(232, 200, 140, 0.12),
    0 24px 50px rgba(0, 0, 0, 0.28);
}

.premium-page::before { display: none; }

.premium-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 26px 26px 10px;
  border-bottom: 1px solid rgba(232, 200, 140, 0.12);
}

.premium-hero-copy .kicker {
  color: #d4b07a;
}

.premium-hero-copy .query-title {
  margin-top: 4px;
  letter-spacing: -0.05em;
}

.premium-lede {
  max-width: 46ch;
  margin: 8px 0 0;
}

.premium-back {
  flex-shrink: 0;
  border: 1px solid rgba(232, 200, 140, 0.28);
  border-radius: 6px;
  padding: 8px 12px;
  font-weight: 800;
  background: rgba(0, 0, 0, 0.18);
}

.price-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 20px 24px 8px;
}

.price-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px 18px 16px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.18);
  overflow: hidden;
}

.price-card.is-featured {
  border-color: rgba(212, 176, 122, 0.45);
  background:
    linear-gradient(165deg, rgba(196, 149, 74, 0.22), transparent 55%),
    rgba(18, 16, 12, 0.55);
  box-shadow: 0 18px 40px rgba(196, 149, 74, 0.14);
}

.price-card.is-reseller {
  border-radius: 18px;
  border-style: dashed;
  border-color: color-mix(in srgb, var(--sage) 45%, var(--line));
  background:
    linear-gradient(165deg, color-mix(in srgb, var(--sage) 18%, transparent), transparent 55%),
    rgba(0, 0, 0, 0.16);
}

.price-ribbon {
  position: absolute;
  top: 14px;
  right: -28px;
  width: 120px;
  text-align: center;
  transform: rotate(32deg);
  background: linear-gradient(90deg, #c4954a, #e0bf7a);
  color: #1a140c;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 5px 0;
}

.price-tag {
  margin: 0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.price-amount {
  margin: 2px 0 0;
  font-size: clamp(34px, 4vw, 44px);
  font-weight: 800;
  letter-spacing: -0.06em;
  line-height: 1;
}

.price-period {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}

.price-list {
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 9px;
  flex: 1;
}

.price-list li {
  position: relative;
  padding-left: 18px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.price-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--glow);
}

.price-card.is-featured .price-list li::before {
  background: #d4b07a;
  box-shadow: 0 0 0 3px rgba(212, 176, 122, 0.22);
}

.price-card.is-reseller .price-list li::before {
  background: var(--sage);
}

.price-cta {
  width: 100%;
  margin-top: auto;
}

.price-cta.primary {
  padding: 12px 14px;
  border-radius: 8px;
}

.price-card.is-featured .price-cta.primary {
  background: linear-gradient(135deg, #c4954a, #e0bf7a);
  color: #1a140c;
  box-shadow: 0 12px 28px rgba(196, 149, 74, 0.28);
}

.price-cta.is-reseller-cta {
  border: 1px dashed color-mix(in srgb, var(--sage) 45%, var(--line));
  background: color-mix(in srgb, var(--sage) 14%, transparent);
  color: var(--ink);
  border-radius: 999px;
  padding: 12px 14px;
  font-weight: 800;
}

.price-cta:disabled {
  opacity: 0.55;
  cursor: default;
}

.premium-catalog {
  margin: 18px 24px 0;
  padding: 22px 22px 16px;
  border-radius: 10px;
  border: 1px solid rgba(232, 200, 140, 0.18);
  background:
    linear-gradient(180deg, rgba(196, 149, 74, 0.08), transparent 40%),
    rgba(0, 0, 0, 0.22);
}

.premium-catalog-head .kicker {
  color: #d4b07a;
}

.premium-catalog-title {
  margin: 6px 0 8px;
  font-size: clamp(22px, 2.4vw, 28px);
  font-weight: 800;
  letter-spacing: -0.04em;
}

.premium-catalog-head .panel-note {
  margin: 0 0 18px;
  max-width: 72ch;
  font-size: 14px;
  line-height: 1.55;
}

.premium-catalog-scroll {
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--card) 74%, transparent);
}

.premium-catalog-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 860px;
  font-size: 14px;
  line-height: 1.5;
}

.premium-catalog-table th,
.premium-catalog-table td {
  padding: 16px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

.premium-catalog-table th {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.28);
  white-space: nowrap;
}

.premium-catalog-table tbody tr:last-child td {
  border-bottom: 0;
}

.premium-catalog-table tbody tr:hover td {
  background: rgba(196, 149, 74, 0.07);
}

.premium-catalog-table td:first-child {
  width: 148px;
  white-space: nowrap;
  color: #e0bf7a;
  font-size: 15px;
}

.premium-catalog-table td:nth-child(2) {
  min-width: 260px;
  color: var(--ink);
  font-weight: 600;
}

.premium-catalog-table td:nth-child(3) {
  min-width: 280px;
  color: color-mix(in srgb, var(--ink) 90%, #d4b07a);
  font-weight: 650;
}

.premium-catalog-table td:last-child {
  width: 110px;
  white-space: nowrap;
  color: var(--muted);
  font-weight: 800;
}

.premium-catalog-note {
  margin: 14px 2px 2px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
  color: var(--muted);
}

.reseller-band {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 18px;
  margin: 10px 24px 0;
  padding: 18px;
  border-radius: 4px 18px 18px 4px;
  border: 0;
  border-left: 4px solid var(--sage);
  background:
    repeating-linear-gradient(
      -12deg,
      transparent,
      transparent 10px,
      color-mix(in srgb, var(--sage) 5%, transparent) 10px,
      color-mix(in srgb, var(--sage) 5%, transparent) 11px
    ),
    color-mix(in srgb, var(--bg) 40%, var(--card));
  box-shadow: inset 0 0 0 1px var(--line);
}

.reseller-title {
  margin: 4px 0 8px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.reseller-points {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
  align-content: center;
}

.reseller-points li {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--card) 80%, transparent);
  font-size: 13px;
  font-weight: 800;
}

.premium-foot {
  margin: 16px 24px 22px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 6px;
}

.premium-contact {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

@media (max-width: 900px) {
  .premium-hero { flex-direction: column; padding: 18px 16px 4px; }
  .price-grid { grid-template-columns: 1fr; padding: 12px 16px 4px; }
  .price-card.is-featured { transform: none; }
  .price-ribbon { display: none; }
  .premium-catalog { margin: 12px 16px 0; padding: 14px; }
  .reseller-band { grid-template-columns: 1fr; margin: 12px 16px 0; }
  .premium-foot { margin: 14px 16px 18px; }
}

body[data-theme="night"] .plan-meter {
  background: rgba(7, 11, 18, 0.45);
}

/* --- Announce: editorial banner --- */
.panel-announce {
  position: relative;
  padding: 26px 28px 24px;
  border: 0;
  border-radius: 28px 8px 28px 8px;
  background:
    radial-gradient(100% 90% at 0% 0%, rgba(196, 120, 106, 0.28), transparent 55%),
    linear-gradient(135deg, #1a1214, var(--card));
  box-shadow: inset 0 0 0 1px rgba(196, 120, 106, 0.22);
  overflow: hidden;
}
.panel-announce .kicker { color: #e0a090; }
.panel-announce::before {
  content: "“";
  position: absolute;
  right: 18px;
  top: -8px;
  font-size: 120px;
  font-weight: 800;
  line-height: 1;
  color: rgba(224, 160, 144, 0.2);
  pointer-events: none;
}
.panel-announce-title {
  margin: 0;
  font-size: clamp(26px, 3.6vw, 38px);
  line-height: 1.15;
  letter-spacing: -0.05em;
  font-weight: 800;
  max-width: 28ch;
  text-wrap: balance;
  position: relative;
  color: #f3e4df;
}
.panel-announce .panel-note { max-width: 48ch; font-weight: 400; color: #c9a9a0; }

/* --- Me: open rail, not a card --- */
.panel-me {
  position: relative;
  padding: 4px 0 0;
  background: transparent;
  border: 0;
}
.panel-me::before { display: none; }
.me-kicker { margin-bottom: 10px; color: #9bb6d8; }
.me-rail {
  display: grid;
  grid-template-columns: 1fr 1fr 1.2fr;
  gap: 10px;
  border: 0;
}
.me-cell {
  padding: 16px 18px 14px;
  border: 0;
  border-radius: 14px;
  min-width: 0;
  background: rgba(91, 155, 216, 0.1);
  box-shadow: inset 0 0 0 1px rgba(91, 155, 216, 0.18);
}
.me-cell:nth-child(2) {
  background: rgba(110, 168, 140, 0.1);
  box-shadow: inset 0 0 0 1px rgba(110, 168, 140, 0.2);
}
.me-cell:nth-child(2) .me-num { color: #9ecbb4; }
.me-cell:first-child .me-num { color: #8bb8e8; }
.me-cell:last-child {
  border-right: 0;
  background: rgba(212, 176, 122, 0.1);
  box-shadow: inset 0 0 0 1px rgba(212, 176, 122, 0.22);
}
.me-cell-note {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
}
.me-cell-note .panel-note { margin: 0; }
.me-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.me-num {
  display: block;
  margin-top: 6px;
  font-size: clamp(30px, 4vw, 40px);
  font-weight: 800;
  letter-spacing: -0.06em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

/* --- Feed: ticket --- */
.panel-ticket {
  position: relative;
  background:
    linear-gradient(135deg, rgba(91, 155, 216, 0.08), transparent 40%),
    var(--card);
  border: 1px solid rgba(91, 155, 216, 0.22);
  border-radius: 4px 20px 20px 4px;
  padding: 16px 18px 14px;
  box-shadow: none;
}
.panel-ticket .kicker { color: #8bb8e8; }
.panel-ticket::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 5px;
  border-radius: 0 3px 3px 0;
  background: repeating-linear-gradient(
    180deg,
    #5b9bd8 0 8px,
    transparent 8px 14px
  );
}
.panel-ticket .feed-item {
  padding: 4px 0 2px 8px;
  grid-template-columns: 1fr;
}
.panel-ticket .feed-dot { display: none; }
.panel-ticket .feed-item strong {
  font-size: 16px;
  letter-spacing: -0.03em;
}
.panel-ticket .feed-item small {
  font-family: ui-monospace, Consolas, monospace;
  letter-spacing: 0.04em;
}

/* --- Hot query --- */
.panel-hot {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100%;
  padding: 18px 18px 16px;
  border-radius: 22px 6px 22px 6px;
  border: 0;
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(110, 168, 140, 0.35), transparent 50%),
    linear-gradient(145deg, #102018, #121a26);
  box-shadow: inset 0 0 0 1px rgba(110, 168, 140, 0.28);
  overflow: hidden;
}
.panel-hot .kicker { color: #9ecbb4; }
.panel-hot .hot-title { color: #e5f3ea; }
.panel-hot::after {
  content: "#1";
  position: absolute;
  right: 14px;
  bottom: 6px;
  font-size: 56px;
  font-weight: 800;
  letter-spacing: -0.08em;
  color: rgba(158, 203, 180, 0.12);
  pointer-events: none;
  line-height: 1;
}
.hot-cat {
  margin: 2px 0 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.hot-title {
  display: block;
  margin-top: 6px;
  font-size: clamp(22px, 2.8vw, 28px);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.15;
  position: relative;
  z-index: 1;
}
.hot-go {
  position: relative;
  z-index: 1;
  align-self: flex-start;
  margin-top: 14px;
  border: 0;
  background: linear-gradient(135deg, #7eb89a, #b6dcc8);
  color: #0e1812;
  border-radius: 999px;
  padding: 9px 14px;
  font-weight: 800;
  cursor: pointer;
  transition: filter 0.2s ease, transform 0.15s ease;
}
.hot-go:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.panel-delta {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(16, 22, 34, 0.05);
  color: var(--muted);
  white-space: nowrap;
}

.panel-delta.is-up {
  background: rgba(93, 122, 144, 0.16);
  color: #3d5a6e;
}

.panel-delta.is-down {
  background: rgba(61, 95, 138, 0.14);
  color: var(--accent-deep);
}

.panel-delta.is-flat {
  background: rgba(16, 22, 34, 0.05);
  color: var(--muted);
}

.feed-list {
  display: grid;
  gap: 0;
  margin-top: 2px;
  position: relative;
}

.feed-item {
  display: grid;
  grid-template-columns: 14px 1fr;
  gap: 12px;
  align-items: start;
  padding: 12px 0;
  border: 0;
  background: transparent;
  animation: feed-in 0.45s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 45ms);
}

.feed-item + .feed-item {
  border-top: 1px solid var(--line);
}

.feed-dot {
  width: 9px;
  height: 9px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(61, 95, 138, 0.12);
}

.feed-item[data-type="login"] .feed-dot { background: var(--sage); box-shadow: 0 0 0 4px rgba(93, 122, 144, 0.14); }
.feed-item[data-type="register"] .feed-dot { background: #7a92b0; box-shadow: 0 0 0 4px rgba(122, 146, 176, 0.16); }
.feed-item[data-type="admin"] .feed-dot { background: var(--accent-deep); }

.feed-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.feed-top time {
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.feed-item strong {
  display: block;
  font-size: 14px;
  letter-spacing: -0.02em;
}

.feed-item small {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.mix-list {
  display: grid;
  gap: 12px;
  margin-top: 4px;
}

.mix-row {
  display: grid;
  grid-template-columns: 72px 1fr;
  grid-template-areas:
    "label value"
    "bar bar";
  gap: 4px 10px;
  align-items: baseline;
}

.mix-row span {
  grid-area: label;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: none;
  color: var(--muted);
}

.mix-row strong {
  grid-area: value;
  justify-self: end;
  font-size: 13px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.mix-row .panel-bar {
  grid-area: bar;
  margin-top: 2px;
}

#bar-free { background: rgba(16, 22, 34, 0.35); }
#bar-premium { background: var(--sage); }
#bar-admin { background: var(--accent); }

body[data-theme="night"] .panel-delta.is-up { color: #9bb4c8; }
body[data-theme="night"] #bar-free { background: rgba(230, 235, 244, 0.35); }
body[data-theme="night"] .panel-stat-ink {
  background: transparent;
}
body[data-theme="night"] .panel-announce {
  background:
    radial-gradient(120% 90% at 0% 0%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 55%),
    var(--card);
}

.panel-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px 18px 16px;
  box-shadow: none;
  overflow: hidden;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.panel-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 14px;
  bottom: 14px;
  width: 2px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 12%, transparent);
}

.panel-card[data-tone="query"]::before { background: var(--accent); }
.panel-card[data-tone="users"]::before { background: var(--sage); }
.panel-member:not(.panel-seal)::before { background: linear-gradient(180deg, var(--accent), var(--sage)); }

.panel-card:hover {
  border-color: color-mix(in srgb, var(--accent) 32%, var(--line));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 10%, transparent);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.panel-chip,
.panel-live,
.panel-time {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.panel-chip {
  padding: 4px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 5%, transparent);
  text-transform: none;
  letter-spacing: 0.01em;
  font-weight: 600;
}

.panel-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--sage);
  text-transform: none;
  letter-spacing: 0.01em;
  font-weight: 600;
}

.panel-live i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--sage);
  animation: live 1.8s ease-out infinite;
}

.panel-num {
  display: block;
  font-size: clamp(36px, 5.2vw, 52px);
  font-weight: 800;
  letter-spacing: -0.07em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.panel-status {
  display: block;
  font-size: clamp(30px, 4.2vw, 42px);
  font-weight: 800;
  letter-spacing: -0.055em;
  color: var(--accent-deep);
  line-height: 1.05;
}

.panel-handle {
  margin: 6px 0 0;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--ink);
}

.panel-note {
  margin: 10px 0 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  line-height: 1.4;
}

.panel-bar {
  margin-top: 14px;
  height: 6px;
  border-radius: 999px;
  background: rgba(16, 22, 34, 0.06);
  overflow: hidden;
}

.panel-bar i {
  display: block;
  height: 100%;
  width: 8%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 0.9s var(--ease);
}

.panel-card[data-tone="users"] .panel-bar i { background: var(--sage); }

.tag-soft {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(16, 22, 34, 0.06);
  font-style: normal;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.tag-sage {
  background: rgba(93, 122, 144, 0.16);
  color: #3d5a6e;
}

.tag-accent {
  background: rgba(61, 95, 138, 0.14);
  color: var(--accent-deep);
}

.soft, .workspace {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: none;
}

.soft h2, .workspace h2 {
  margin: 8px 0;
  font-size: var(--fs-lg);
  letter-spacing: -0.04em;
}

.soft p, .workspace p {
  margin: 0;
  font-size: var(--fs-md);
}

.empty-mark {
  display: grid;
  place-items: center;
  gap: 6px;
  justify-items: center;
  opacity: 0.72;
}

.empty-mark svg {
  width: 108px;
  height: 108px;
  animation: float-mark 4.5s ease-in-out infinite;
}

.empty-mark rect {
  fill: none;
  stroke: var(--accent);
  stroke-width: 3;
  stroke-linecap: round;
}

.empty-mark circle {
  fill: none;
  stroke: var(--sage);
  stroke-width: 3;
}

.empty-mark path {
  fill: none;
  stroke: var(--muted);
  stroke-width: 3;
  stroke-linecap: round;
}

.empty-mark em {
  font-style: normal;
  font-size: var(--fs-xs);
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.dots { display: flex; gap: 8px; margin-top: 18px; }
.dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.35;
  animation: blink 1.4s ease-in-out infinite;
}
.dots span:nth-child(2) { animation-delay: 0.15s; background: var(--sage); }
.dots span:nth-child(3) { animation-delay: 0.3s; }

body.is-app .orch {
  animation: orch 0.28s var(--ease) both;
  animation-delay: calc(var(--d, 0) * 20ms);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 20;
  transform: translateX(-50%) translateY(12px);
  background: rgba(16, 22, 34, 0.92);
  color: #f7f9fc;
  font-weight: 800;
  font-size: 14px;
  padding: 12px 16px;
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(16, 22, 34, 0.2);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s var(--ease);
}

.toast.is-on {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

body.is-loading .auth, body.is-loading .app,
body.is-auth .splash, body.is-auth .app,
body.is-app .splash, body.is-app .auth { display: none; }

@keyframes card-in {
  from { opacity: 0; transform: translateY(18px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

@keyframes panel-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

@keyframes panel-out {
  to { opacity: 0; transform: translateY(-8px); }
}

@keyframes orch {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

@keyframes stage-drift {
  from { transform: translate3d(0, 0, 0) scale(1); opacity: 0.7; }
  to { transform: translate3d(-28px, 18px, 0) scale(1.12); opacity: 1; }
}

@keyframes seal-settle {
  from { opacity: 0; transform: rotate(-6deg) translateY(10px) scale(0.96); }
  to { opacity: 1; transform: rotate(-1.25deg) translateY(0) scale(1); }
}

@keyframes feed-in {
  from { opacity: 0; transform: translateX(-8px); }
  to { opacity: 1; transform: none; }
}

@keyframes slide-side {
  from { opacity: 0; transform: translateX(-12px); }
  to { opacity: 1; transform: none; }
}

@keyframes drift {
  50% { transform: translate3d(36px, -24px, 0) scale(1.06); }
}

@keyframes pulse {
  50% { transform: scale(0.82); opacity: 0.85; }
}

@keyframes blink {
  50% { opacity: 1; transform: translateY(-2px); }
}

@keyframes floaty {
  0%, 100% { transform: translateY(0); opacity: 0.35; }
  50% { transform: translateY(-14px); opacity: 0.9; }
}

@keyframes sheen {
  0%, 60% { transform: translateX(0) skewX(-18deg); opacity: 0; }
  70% { opacity: 0.7; }
  100% { transform: translateX(520%) skewX(-18deg); opacity: 0; }
}

@keyframes shine {
  to { transform: translateX(120%); }
}

@keyframes load-sweep {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(280%); }
}

@keyframes breathe {
  50% { opacity: 0.55; }
}

@keyframes pop-in {
  from { opacity: 0; transform: scale(0.7); }
  70% { transform: scale(1.06); }
  to { opacity: 1; transform: none; }
}

@keyframes shake {
  0%, 100% { transform: none; }
  25% { transform: translateX(-5px); }
  50% { transform: translateX(5px); }
  75% { transform: translateX(-3px); }
}

@keyframes spin { to { transform: rotate(360deg); } }

@keyframes glow-in {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: none; }
}

@keyframes confetti {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.4); }
  30% { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y))) scale(1); }
}

@keyframes live {
  70% { box-shadow: 0 0 0 8px rgba(93, 122, 144, 0); }
  100% { box-shadow: 0 0 0 0 rgba(93, 122, 144, 0); }
}

.theme-fab {
  position: fixed;
  top: max(14px, env(safe-area-inset-top));
  right: max(14px, env(safe-area-inset-right));
  z-index: 30;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--card);
  box-shadow: var(--shadow);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform 0.2s ease, background 0.3s ease;
}

.theme-fab:hover { transform: translateY(-1px) scale(1.03); }
.theme-fab:active { transform: scale(0.96); }

.theme-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  position: absolute;
  transition: opacity 0.25s ease, transform 0.35s var(--ease);
}

.theme-sun {
  background: radial-gradient(circle at 35% 35%, #d9ffe8, #22c55e 70%);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.22);
}

.theme-moon {
  background: radial-gradient(circle at 30% 30%, #d9ffe8, #16a34a 75%);
  box-shadow: inset -4px -2px 0 rgba(7, 17, 12, 0.35);
  opacity: 0;
  transform: scale(0.6) rotate(-20deg);
}

body[data-theme="night"] .theme-sun {
  opacity: 0;
  transform: scale(0.6) rotate(20deg);
}

body[data-theme="night"] .theme-moon {
  opacity: 1;
  transform: none;
}

body[data-theme="night"] .mark circle { fill: #0c121c; }
body[data-theme="night"] .primary { color: #070b12; }
body[data-theme="night"] .q-actions .primary,
body[data-theme="night"] .q-form .primary {
  background: #22c55e !important;
  color: #07080b !important;
  box-shadow: 0 8px 20px rgba(34, 197, 94, 0.28);
}
body[data-theme="night"] .q-actions .primary:hover,
body[data-theme="night"] .q-form .primary:hover {
  background: #4ade80 !important;
}
body[data-theme="night"] .soft.sage { background: color-mix(in srgb, var(--sage) 28%, transparent); }
body[data-theme="night"] .panel-chip,
body[data-theme="night"] .panel-bar,
body[data-theme="night"] .tag-soft {
  background: rgba(237, 241, 247, 0.07);
}
body[data-theme="night"] .tag-sage { color: #9bb4c8; }
body[data-theme="night"] .toast {
  background: var(--toast);
  color: #070b12;
}
body[data-theme="night"] input {
  background: rgba(7, 11, 18, 0.55);
  color: var(--ink);
}

.welcome { position: relative; }

.welcome-stage {
  position: relative;
  align-items: flex-end;
  gap: 18px;
  margin: 0 0 6px;
  padding: 8px 0 18px;
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: visible;
  isolation: isolate;
}

.welcome-watermark {
  position: absolute;
  right: 0;
  top: 46%;
  transform: translateY(-50%);
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 0.9;
  color: color-mix(in srgb, var(--accent) 28%, transparent);
  pointer-events: none;
  user-select: none;
  z-index: 0;
  white-space: nowrap;
}

.welcome-copy {
  position: relative;
  z-index: 1;
  min-width: 0;
  flex: 1;
}

.welcome-stage .eyebrow {
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
}

.welcome-stage .lede {
  max-width: 38ch;
}

.rhythm-mark {
  position: relative;
  width: 44px;
  height: 44px;
  margin: 12px 0 6px;
  overflow: visible;
}

.rhythm-mark .sun,
.rhythm-mark .moon {
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  opacity: 0;
  transform: scale(0.7);
}

.rhythm-mark .sun {
  background: radial-gradient(circle at 32% 28%, #f4fff8 0%, #4ade80 42%, #16a34a 100%);
  box-shadow:
    0 0 0 5px rgba(34, 197, 94, 0.22),
    0 0 18px rgba(34, 197, 94, 0.35);
}

.rhythm-mark .moon {
  background: radial-gradient(circle at 35% 30%, #e8fff0 0%, #22c55e 45%, #15803d 100%);
  box-shadow:
    inset -5px -3px 0 rgba(7, 17, 12, 0.28),
    0 0 0 5px rgba(34, 197, 94, 0.18);
}

.rhythm-mark .stars {
  position: absolute;
  inset: -4px;
  opacity: 0;
}

.rhythm-mark .stars i {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.7;
}

.rhythm-mark .stars i:nth-child(1) { top: 2px; right: 4px; }
.rhythm-mark .stars i:nth-child(2) { bottom: 6px; left: 2px; width: 3px; height: 3px; }
.rhythm-mark .stars i:nth-child(3) { top: 14px; right: -2px; width: 2px; height: 2px; }

body[data-rhythm="morning"] .rhythm-mark .sun,
body[data-rhythm="day"] .rhythm-mark .sun {
  opacity: 1;
  animation: rise-sun 0.8s var(--ease) both;
}

body[data-rhythm="evening"] .rhythm-mark .moon,
body[data-rhythm="night"] .rhythm-mark .moon {
  opacity: 1;
  animation: rise-moon 0.8s var(--ease) both;
}

body[data-rhythm="evening"] .rhythm-mark .stars,
body[data-rhythm="night"] .rhythm-mark .stars {
  opacity: 1;
  animation: twinkle 2.4s ease-in-out infinite;
}

body[data-rhythm="morning"] .welcome #hello { animation: greet-morning 0.7s var(--ease) both; }
body[data-rhythm="day"] .welcome #hello { animation: greet-day 0.7s var(--ease) both; }
body[data-rhythm="evening"] .welcome #hello { animation: greet-evening 0.75s var(--ease) both; }
body[data-rhythm="night"] .welcome #hello { animation: greet-night 0.8s var(--ease) both; }

body[data-rhythm="morning"] .eyebrow,
body[data-rhythm="day"] .eyebrow,
body[data-rhythm="evening"] .eyebrow,
body[data-rhythm="night"] .eyebrow { color: #8b93a0; }

@keyframes badge-pop {
  from { opacity: 0; transform: scale(0.85); }
  to { opacity: 1; transform: none; }
}

@keyframes rise-sun {
  from { opacity: 0; transform: translateY(8px) scale(0.7); }
  to { opacity: 1; transform: none; }
}

@keyframes rise-moon {
  from { opacity: 0; transform: translateY(10px) rotate(-12deg) scale(0.7); }
  to { opacity: 1; transform: none; }
}

@keyframes twinkle {
  50% { opacity: 0.45; }
}

@keyframes greet-morning {
  from { opacity: 0; transform: translateY(12px); filter: blur(2px); }
  to { opacity: 1; transform: none; filter: none; }
}

@keyframes greet-day {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

@keyframes greet-evening {
  from { opacity: 0; transform: translateX(-10px); }
  to { opacity: 1; transform: none; }
}

@keyframes greet-night {
  from { opacity: 0; letter-spacing: 0.08em; }
  to { opacity: 1; letter-spacing: -0.04em; }
}

@keyframes underline-draw {
  from { transform: scaleX(0); opacity: 0; }
  to { transform: scaleX(1); opacity: 1; }
}

@keyframes ripple {
  to { transform: scale(2.4); opacity: 0; }
}

@keyframes chip-in {
  from { opacity: 0; transform: translateY(4px) scale(0.94); }
  to { opacity: 1; transform: none; }
}

@keyframes tab-breathe {
  50% { opacity: 0.15; transform: scale(0.85); }
}

@keyframes btn-pulse {
  0% { transform: scale(1); }
  40% { transform: scale(1.03); }
  100% { transform: scale(1); }
}

@keyframes float-mark {
  50% { transform: translateY(-6px); }
}

@keyframes gap-pulse {
  0% { box-shadow: 0 0 0 0 rgba(61, 95, 138, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(61, 95, 138, 0); }
  100% { box-shadow: 0 0 0 0 rgba(61, 95, 138, 0); }
}

@keyframes seal-spin {
  to { transform: rotate(360deg); }
}

@keyframes stage-in {
  from { opacity: 0; transform: translateY(12px) scale(0.985); }
  to { opacity: 1; transform: none; }
}

@keyframes credit-in {
  from { opacity: 0; letter-spacing: 0.04em; filter: blur(4px); }
  to { opacity: 1; filter: none; }
}

@keyframes tag-hang {
  0%, 100% { transform: rotate(-1.5deg) translateY(0); }
  50% { transform: rotate(2deg) translateY(2px); }
}

@keyframes drawer-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 1100px) {
  .main {
    padding: 16px 14px calc(28px + env(safe-area-inset-bottom));
    padding-top: max(64px, calc(16px + env(safe-area-inset-top) + 44px));
  }

  header.welcome,
  header.welcome-stage {
    flex-direction: row;
    align-items: flex-start;
    gap: 12px;
  }

  .welcome-stage {
    padding: 4px 0 12px;
    margin-bottom: 2px;
  }

  .welcome-watermark {
    right: 0;
    left: auto;
    max-width: 48%;
    font-size: clamp(28px, 11vw, 44px);
    letter-spacing: -0.04em;
    text-align: right;
    overflow: visible;
    opacity: 0.9;
  }

  header.welcome > div,
  header.welcome-stage .welcome-copy { min-width: 0; flex: 1; }
  header .ghost {
    width: auto;
    flex-shrink: 0;
    padding: 10px 14px;
    font-size: 13px;
  }

  .rhythm-mark { display: none; }
  .lede { font-size: 14px; max-width: none; }
  .eyebrow { margin-bottom: 4px; }

  .board { margin-top: 16px; gap: 16px; }
  .dash-row,
  .dash-stats,
  .dash-pair,
  .me-rail { grid-template-columns: 1fr; gap: 10px; }
  .panel-plan-wide {
    grid-template-columns: 1fr;
    justify-items: stretch;
  }
  .panel-plan-wide .plan-upgrade {
    width: 100%;
    justify-self: stretch;
  }
  .panel-stat-dense .stat-hero {
    flex-wrap: wrap;
  }
  .panel-stat-dense,
  .panel-plan { min-height: 0; }
  .me-rail { border: 0; }
  .me-cell {
    border-right: 0;
    border-bottom: 0;
  }
  .panel-stat-dense[data-tone="users"] { border-radius: 0 14px 14px 0; }
  .panel-seal { transform: none; }
  .panel-stat-ink { border-radius: 0 0 var(--radius) var(--radius); }
  .panel-announce { padding: 20px 18px; }
  .panel-announce-title { font-size: clamp(22px, 6.5vw, 28px); max-width: none; }
  .panel-ticket { border-radius: var(--radius); }
  .panel-card { border-radius: 18px; padding: 16px; }
  .panel-card:hover { box-shadow: none; }
  .panel-num { font-size: 36px; }
  .panel-status { font-size: 28px; }
  .admin-stats { grid-template-columns: 1fr 1fr; }
  .admin-actions { flex-wrap: wrap; }
  .admin-actions .primary { width: 100%; }
  .admin-toolbar { grid-template-columns: 1fr 1fr; }
  .admin-search { grid-column: 1 / -1; }
  .admin-table-wrap { max-height: min(52vh, 440px); }
  .admin-drawer { grid-template-columns: 1fr; }
  .admin-drawer-backdrop { display: none; }
  .admin-quick .primary,
  .admin-quick .ghost { flex: 1; min-width: 0; }

  .auth {
    min-height: 100dvh;
    padding: max(52px, calc(16px + env(safe-area-inset-top))) 16px calc(20px + env(safe-area-inset-bottom));
    align-items: center;
    justify-content: center;
    perspective: none;
  }

  .card {
    width: 100%;
    max-width: 420px;
    margin: 0;
    padding: 26px 22px 18px;
    border-radius: 24px;
    transform: none !important;
  }

  .card .sheen { display: none; }
  .card.is-bloom { transform: none !important; }
  .auth-head { margin-bottom: 14px; gap: 10px; }
  .auth-head .mark { width: 44px; height: 44px; flex-shrink: 0; }
  .auth-clock { font-size: 12px; }
  .brand-tag { display: block; }
  .tabs {
    margin-bottom: 12px;
    gap: 4px;
    padding: 4px;
    border-radius: 14px;
  }
  .tab {
    padding: 11px 8px;
    font-size: 14px;
    border-radius: 10px;
  }
  .tab-ink {
    top: 4px;
    left: 4px;
    height: calc(100% - 8px);
    border-radius: 10px;
  }
  .flow-steps { margin: -2px 0 12px; font-size: 10px; gap: 7px; }
  .display { font-size: 28px !important; letter-spacing: -0.035em; }
  .sub { margin: 8px 0 16px; font-size: 15px; }
  .field { margin-bottom: 12px; }
  .primary { padding: 14px 16px; border-radius: 16px; }
  .hint { font-size: 13px; line-height: 1.4; }
  .auth-foot { margin-top: 16px; font-size: 11px; }
  .keybox {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 12px;
    border-radius: 14px;
  }
  .keybox code { font-size: 12px; line-height: 1.4; }
  .keybox button { width: 100%; }

  .nav-fab,
  .theme-fab {
    top: max(10px, env(safe-area-inset-top));
    width: 38px;
    height: 38px;
  }

  .nav-fab {
    right: max(10px, env(safe-area-inset-right));
  }

  .toast {
    left: 14px;
    right: 14px;
    bottom: max(16px, env(safe-area-inset-bottom));
    width: auto;
    transform: translateY(12px);
    text-align: center;
  }

  .toast.is-on { transform: translateY(0); }
}

@media (max-width: 420px) {
  .card { padding: 24px 18px 16px; }
  .display { font-size: 26px !important; }
  .sub { font-size: 14px; }
}

.hub-tools {
  display: grid;
  gap: 12px;
  margin: 0 0 18px;
}

.hub-lede {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.hub-search {
  display: flex;
  align-items: stretch;
  gap: 0;
  padding: 0;
  min-height: 52px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #14161a;
  overflow: hidden;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.hub-search:focus-within {
  border-color: rgba(34, 197, 94, 0.45);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.12);
}

.hub-search-ico {
  display: grid;
  place-items: center;
  width: 52px;
  flex: none;
  color: #22c55e;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(34, 197, 94, 0.06);
}

.hub-search-ico svg { width: 18px; height: 18px; }

.hub-search input {
  width: 100%;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  padding: 14px 16px;
}

.hub-search input::placeholder {
  color: #7d8694;
  font-weight: 700;
}

.hub-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  overflow: visible;
  scrollbar-width: none;
}

.hub-pills::-webkit-scrollbar { display: none; }

.hub-pill {
  flex: none;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: transparent;
  color: #c5cbd4;
  border-radius: 999px;
  padding: 8px 14px;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.hub-pill:hover {
  border-color: rgba(34, 197, 94, 0.35);
  color: #eef1f4;
}

.hub-pill.is-on {
  color: #05210f;
  background: #22c55e;
  border-color: #22c55e;
}

.qh-count {
  margin-left: 8px;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: var(--accent);
  color: #05210f;
  font-size: 12px;
  font-weight: 800;
}

.q-ad-grid {
  display: grid;
  grid-template-columns: 1.1fr 1.1fr 1fr 1fr auto;
  gap: 10px 12px;
  align-items: end;
}

.q-span-2 { grid-column: span 2; }

.q-check {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
}

.q-check input { width: 16px; height: 16px; accent-color: var(--accent); }

.hub-empty {
  margin: 8px 0 0;
  color: var(--muted);
  font-weight: 800;
}

.q-modes {
  position: relative;
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #0c0e12;
  width: fit-content;
}

.q-mode-ink {
  position: absolute;
  top: 3px;
  left: 0;
  height: calc(100% - 6px);
  width: 0;
  border-radius: 8px;
  background: #143724;
  pointer-events: none;
  z-index: 0;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), width 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.q-modes[data-mode-active="yakin"] .q-mode-ink {
  width: 96px;
  transform: translateX(3px);
}

.q-modes[data-mode-active="uzak"] .q-mode-ink {
  width: 92px;
  transform: translateX(99px);
}

.q-mode {
  position: relative;
  z-index: 1;
  border: 0;
  background: transparent;
  color: #9aa3b2;
  border-radius: 8px;
  padding: 6px 11px;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: -0.01em;
  cursor: pointer;
  box-shadow: none;
  transition: color 0.22s ease;
}

.q-mode.is-on {
  background: transparent;
  border: 0;
  color: #22c55e;
  box-shadow: none;
}

.q-extra-panel { display: grid; gap: 12px; }
.q-extra-panel[hidden] { display: none !important; }

.q-dash {
  height: 0;
  border: 0;
  border-top: 1px dashed var(--line);
  margin: 2px 0 4px;
}

.q-extra.is-on {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  color: var(--accent);
}

.qh-card[hidden],
.qh-section[hidden] { display: none !important; }

.q-actions .ghost.q-extra { border-radius: 12px; }

.q-result-head { flex-wrap: wrap; }

.q-filter { margin-left: auto; }

.q-filter input {
  width: 180px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: #0f1014;
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  padding: 8px 12px;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.q-filter input:focus {
  border-color: rgba(34, 197, 94, 0.45);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.12);
}

.q-table td.q-id {
  color: var(--accent);
  font-weight: 800;
}

.q-cards { display: none; }

.q-person {
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: color-mix(in srgb, var(--card) 80%, #000);
}

.q-person + .q-person { margin-top: 12px; }

.q-person header,
.q-person-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.q-person header {
  background: color-mix(in srgb, var(--accent) 16%, transparent);
}

.q-person header span,
.q-person-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.q-person header strong { color: var(--accent); font-size: 18px; }

.q-person-row strong { font-weight: 800; text-align: right; }

.q-person-row:last-child { border-bottom: 0; }

.q-card-empty {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

body[data-theme="night"] .q-form,
body[data-theme="night"] .q-table-wrap {
  background: #121317 !important;
  box-shadow: none !important;
}

body[data-theme="night"] .query-desk {
  background: #121317 !important;
  border-left: 3px solid #22c55e !important;
  box-shadow: none !important;
}

body[data-theme="night"] .hub-search {
  background: #14161a !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

body[data-theme="night"] .q-table th {
  background: #15171c !important;
}

body[data-theme="night"] .q-field input,
body[data-theme="night"] .q-filter input,
body[data-theme="night"] .q-modes {
  background: #0f1014 !important;
}

body[data-theme="night"] .q-mode.is-on {
  background: transparent !important;
  border: 0 !important;
  color: #22c55e !important;
  box-shadow: none !important;
}

body[data-theme="night"] .q-table-wrap {
  box-shadow: none;
}

@media (max-width: 980px) {
  .q-ad-grid { grid-template-columns: 1fr 1fr; }
  .q-span-2 { grid-column: span 2; }
  .q-check { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
  .q-ad-grid,
  .q-span-2 { grid-template-columns: 1fr; grid-column: auto; }
  .q-table-wrap {
    display: block;
    -webkit-overflow-scrolling: touch;
  }
  .q-cards { display: none !important; }
  .q-filter input { width: 140px; }
  .q-table {
    min-width: 720px;
    font-size: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .toast { transition: none; }
}
