:root {

  --bg:        #0a0a0b;
  --surface:   #111114;
  --surface-2: #16161a;
  --surface-3: #1c1c22;
  --line:      rgba(255, 255, 255, 0.08);
  --line-2:    rgba(255, 255, 255, 0.14);
  --ink:       #f5f5f7;
  --ink-2:     #c7c7cf;
  --ink-3:     #8a8a93;
  --ink-4:     #5a5a63;
  --accent:    #ffffff;
  --accent-soft: rgba(255, 255, 255, 0.06);

  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Instrument Serif", "Times New Roman", serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --radius:   14px;
  --radius-sm: 10px;
  --radius-lg: 20px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-soft: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 0 0 1px var(--line);
  --shadow-lifted: 0 30px 80px -30px rgba(0, 0, 0, 0.7), 0 12px 30px -12px rgba(0, 0, 0, 0.5);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  font-size: 15px;
  font-feature-settings: "ss01", "cv11";
  letter-spacing: -0.005em;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, black 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, black 0%, transparent 75%);
}

.bg-glow {
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 600px;
  background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.06), transparent 60%);
  filter: blur(40px);
  animation: breathe 10s ease-in-out infinite;
}

.bg-noise {
  position: absolute;
  inset: 0;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.6 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

@keyframes breathe {
  0%, 100% { opacity: 0.6; transform: translateX(-50%) scale(1); }
  50%      { opacity: 1;   transform: translateX(-50%) scale(1.08); }
}

.nav {
  position: sticky;
  top: 0;
  z-index: 60;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 14px max(24px, calc((100% - 1100px) / 2));
  background: rgba(10, 10, 11, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.nav > .brand     { justify-self: start; }
.nav > .nav-links { justify-self: center; }
.nav > .nav-right { justify-self: end; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: linear-gradient(160deg, #2a2a30, #0a0a0b);
  border: 1px solid var(--line-2);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 16px;
  color: var(--ink);
}

.brand small {
  color: var(--ink-3);
  font-weight: 400;
  font-size: 12px;
  margin-left: 4px;
  font-family: var(--font-mono);
  letter-spacing: 0;
}

.nav-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 8px rgba(74, 222, 128, 0.6);
  animation: pulse 1.8s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.4; }
}

.app {
  max-width: 960px;
  margin: 0 auto;
  padding: 80px 32px 80px;
}

.hero {
  text-align: center;
  margin-bottom: 56px;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-2);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 28px;
  animation: fadeUp 0.7s var(--ease-out) both;
}

.hero-tag .pill {
  padding: 3px 8px;
  background: var(--ink);
  color: var(--bg);
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.title {
  font-family: var(--font-sans);
  font-size: clamp(44px, 7vw, 76px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.04em;
  margin-bottom: 24px;
  animation: fadeUp 0.8s var(--ease-out) 0.1s both;
}

.title em {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.02em;
  background: linear-gradient(180deg, var(--ink) 0%, var(--ink-3) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.subtitle {
  font-size: 17px;
  color: var(--ink-2);
  max-width: 560px;
  margin: 0 auto;
  animation: fadeUp 0.9s var(--ease-out) 0.2s both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lifted);
  animation: fadeUp 0.9s var(--ease-out) 0.25s both;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
}

.dots {
  display: inline-flex;
  gap: 6px;
}

.dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
}

.card-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.card-body { padding: 32px; }

.field { margin-bottom: 24px; }

.label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.label .num {
  display: inline-block;
  width: 18px;
  text-align: center;
  background: var(--surface-3);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1px 0;
  margin-right: 8px;
  color: var(--ink-2);
}

.input-wrap { position: relative; }

.input,
.select {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  font-family: inherit;
  font-size: 15px;
  padding: 16px 18px;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.input { padding-right: 70px; }

.input::placeholder { color: var(--ink-4); }

.input:hover,
.select:hover { border-color: var(--line-2); }

.input:focus,
.select:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.4);
  background: var(--surface-3);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.04);
}

.counter {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-4);
  pointer-events: none;
  letter-spacing: 0.03em;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.chip {
  padding: 8px 14px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-2);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s var(--ease);
  letter-spacing: -0.005em;
}

.chip:hover {
  background: var(--surface-3);
  border-color: var(--line-2);
  color: var(--ink);
  transform: translateY(-1px);
}

.chip:active { transform: translateY(0); }

.select {
  appearance: none;
  cursor: pointer;
  padding-right: 44px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%238a8a93' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 18px center;
}

.select option { background: var(--surface); color: var(--ink); }

.controls {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: end;
}

.controls .field { margin: 0; }

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 24px;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.005em;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.18s var(--ease), background 0.2s var(--ease), border-color 0.2s var(--ease), opacity 0.2s var(--ease);
  user-select: none;
}

.btn-primary {
  background: var(--ink);
  color: var(--bg);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset, 0 10px 24px -10px rgba(255, 255, 255, 0.25);
  min-width: 180px;
}

.btn-primary:hover {
  transform: translateY(-1px);
  background: #ffffff;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset, 0 16px 32px -10px rgba(255, 255, 255, 0.3);
}

.btn-primary:active { transform: translateY(0); }

.btn-primary:disabled,
.btn-primary[aria-busy="true"] {
  opacity: 0.7;
  cursor: not-allowed;
}

.btn-arrow {
  display: inline-block;
  transition: transform 0.25s var(--ease);
}

.btn-primary:hover .btn-arrow { transform: translateX(3px); }

.btn[aria-busy="true"] .btn-arrow {
  animation: rotate 0.9s linear infinite;
}

@keyframes rotate { to { transform: rotate(360deg); } }

.btn-ghost {
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--ink-2);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s var(--ease);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-ghost:hover {
  background: var(--surface-3);
  border-color: var(--line-2);
  color: var(--ink);
}

.result {
  margin-top: 28px;
  padding: 28px;
  background: var(--surface-2);
  border: 1px dashed var(--line-2);
  border-radius: var(--radius);
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}

.result.has-content {
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border-style: solid;
  border-color: var(--line-2);
}

.result-empty {
  text-align: center;
  color: var(--ink-3);
  font-size: 14px;
}

.result-empty .hint {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-4);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 10px;
  display: block;
}

.empty-mark {
  width: 40px;
  height: 40px;
  margin: 0 auto 14px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-style: italic;
  color: var(--ink-3);
  font-size: 22px;
}

.excuse-card {
  width: 100%;
  animation: revealUp 0.6s var(--ease-out) both;
}

.excuse-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.excuse-meta .sep { color: var(--ink-4); }

.excuse-quote {
  font-family: var(--font-display);
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin-bottom: 24px;
  position: relative;
}

.excuse-quote::before {
  content: "“";
  position: absolute;
  left: -24px;
  top: -10px;
  font-size: 56px;
  color: var(--ink-4);
  line-height: 1;
}

.excuse-quote.is-streaming::after {
  content: "";
  display: inline-block;
  width: 2px;
  height: 1em;
  margin-left: 3px;
  vertical-align: -0.15em;
  background: var(--ink-3);
  animation: caretBlink 1s steps(2, start) infinite;
}

@keyframes caretBlink {
  to { opacity: 0; }
}

.excuse-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

@keyframes revealUp {
  from { opacity: 0; transform: translateY(12px); filter: blur(4px); }
  to   { opacity: 1; transform: translateY(0);    filter: blur(0); }
}

.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.loader {
  position: relative;
  width: 36px;
  height: 36px;
}

.loader::before,
.loader::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1.5px solid transparent;
  border-top-color: var(--ink);
}

.loader::before {
  animation: rotate 1s linear infinite;
  opacity: 0.9;
}

.loader::after {
  border-top-color: var(--ink-3);
  animation: rotate 1.4s linear infinite reverse;
  inset: 6px;
}

.loading-text {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.loading-text::after {
  content: "";
  display: inline-block;
  width: 18px;
  text-align: left;
  animation: dots 1.4s steps(4) infinite;
}

@keyframes dots {
  0%   { content: ""; }
  25%  { content: "."; }
  50%  { content: ".."; }
  75%  { content: "..."; }
  100% { content: ""; }
}

.history { margin-top: 56px; animation: fadeUp 0.8s var(--ease-out) both; }

.history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.history-head h2 {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.history-head .count {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-4);
  background: var(--surface-2);
  border: 1px solid var(--line);
  padding: 2px 8px;
  border-radius: 4px;
}

.history-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.history-item {
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  transition: all 0.2s var(--ease);
  animation: revealUp 0.4s var(--ease-out) both;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: start;
}

.history-item:hover {
  background: var(--surface-2);
  border-color: var(--line-2);
}

.history-item .text {
  font-size: 14px;
  color: var(--ink);
  line-height: 1.45;
}

.history-item .meta {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-4);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.history-item .meta .tag {
  color: var(--ink-2);
  background: var(--surface-3);
  border: 1px solid var(--line);
  padding: 2px 6px;
  border-radius: 4px;
  margin-right: 4px;
}

.history-item .time {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-4);
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.footer {
  margin-top: 80px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-4);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  padding: 12px 18px;
  background: var(--ink);
  color: var(--bg);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 12px 28px -12px rgba(0, 0, 0, 0.6);
  opacity: 0;
  transition: opacity 0.25s var(--ease), transform 0.3s var(--ease-out);
  pointer-events: none;
  z-index: 100;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ade80;
}

@media (max-width: 700px) {
  .nav      { padding: 14px 18px; }
  .app      { padding: 56px 18px 56px; }
  .card-body { padding: 22px; }
  .controls { grid-template-columns: 1fr; }
  .btn-primary { width: 100%; }
  .excuse-quote::before { left: -12px; font-size: 44px; }
  .history-item { grid-template-columns: 1fr; }
  .history-item .time { justify-self: start; }
}

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

::selection { background: rgba(255, 255, 255, 0.18); color: var(--ink); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: var(--surface-3);
  border-radius: 999px;
  border: 2px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover { background: #2a2a30; }

.nav-links {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.nav-link {
  position: relative;
  z-index: 1;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-3);
  text-decoration: none;
  transition: color 0.25s var(--ease);
  letter-spacing: -0.005em;
  white-space: nowrap;
}

.nav-link:hover { color: var(--ink); }

.nav-link[aria-current="page"] {
  color: var(--ink);
  font-weight: 500;
}

.nav-link[data-highlight] {
  color: var(--bg);
}

.nav-indicator {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  background: var(--ink);
  border-radius: 999px;
  z-index: 0;
  pointer-events: none;
  transform: translate3d(0, 0, 0);
  opacity: 0;
  transition:
    transform 0.42s cubic-bezier(0.32, 1.4, 0.5, 1),
    width    0.42s cubic-bezier(0.32, 1.4, 0.5, 1),
    height   0.42s cubic-bezier(0.32, 1.4, 0.5, 1),
    opacity  0.2s ease;
  box-shadow: 0 6px 20px -8px rgba(255, 255, 255, 0.35);
}

.nav-indicator.is-ready { opacity: 1; }

.nav-right {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.nav-auth { position: relative; min-width: 80px; display: flex; justify-content: flex-end; }

.btn-login {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s var(--ease);
  letter-spacing: -0.005em;
}

.btn-login:hover {
  background: #fff;
  transform: translateY(-1px);
}

.user-menu { position: relative; }

.user-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 4px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.18s var(--ease);
}

.user-trigger:hover { border-color: var(--line-2); }

.avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(160deg, #2a2a30, var(--bg));
  border: 1px solid var(--line-2);
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0;
}

.user-name { font-weight: 500; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.caret { font-size: 10px; color: var(--ink-3); }

.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: 12px;
  box-shadow: var(--shadow-lifted);
  padding: 6px;
  opacity: 0;
  transform: translateY(-6px) scale(0.98);
  pointer-events: none;
  transition: all 0.18s var(--ease);
  z-index: 60;
}

.user-menu[data-open="true"] .user-dropdown {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.user-dropdown-head {
  padding: 10px 12px 12px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 6px;
}

.user-dropdown-name { font-size: 13px; font-weight: 600; color: var(--ink); }
.user-dropdown-email {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-4);
  margin-top: 2px;
  word-break: break-all;
}

.user-dropdown-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 9px 12px;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: var(--ink-2);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s var(--ease);
}

.user-dropdown-item:hover {
  background: var(--surface-2);
  color: var(--ink);
}

.user-dropdown-item.danger { color: #f87171; }
.user-dropdown-item.danger:hover { background: rgba(248, 113, 113, 0.1); color: #fca5a5; }

.settings-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 7vh 16px 16px;
  overflow-y: auto;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.2s var(--ease);
}

.settings-overlay.is-open { opacity: 1; }

.settings-modal {
  width: 100%;
  max-width: 440px;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lifted);
  transform: translateY(12px) scale(0.97);
  opacity: 0;
  transition: transform 0.26s var(--ease-out), opacity 0.26s var(--ease-out);
}

.settings-overlay.is-open .settings-modal {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.settings-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 22px 24px 16px;
  border-bottom: 1px solid var(--line);
}

.settings-title {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 400;
  color: var(--ink);
  margin: 0;
}

.settings-sub {
  font-size: 12px;
  color: var(--ink-3);
  margin: 4px 0 0;
}

.settings-close {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.18s var(--ease);
}

.settings-close:hover { color: var(--ink); border-color: var(--line-2); background: var(--surface-3); }

.settings-body { padding: 20px 24px 24px; }

.settings-identity {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.avatar-lg {
  width: 48px;
  height: 48px;
  font-size: 16px;
  flex-shrink: 0;
}

.settings-name { font-size: 15px; font-weight: 600; color: var(--ink); }
.settings-email {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-4);
  margin-top: 2px;
  word-break: break-all;
}

.settings-form { margin-bottom: 22px; }
.settings-form:last-of-type { margin-bottom: 0; }

.settings-section-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-4);
  margin-bottom: 12px;
}

.settings-form .field { margin-bottom: 14px; }
.btn-full { width: 100%; }

.settings-msg {
  margin-top: 16px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  border: 1px solid var(--line);
}

.settings-msg.ok {
  color: #4ade80;
  background: rgba(74, 222, 128, 0.08);
  border-color: rgba(74, 222, 128, 0.25);
}

.settings-msg.err {
  color: #f87171;
  background: rgba(248, 113, 113, 0.08);
  border-color: rgba(248, 113, 113, 0.25);
}

@media (prefers-reduced-motion: reduce) {
  .settings-overlay,
  .settings-modal { transition: none; }
}

.hero-sm { margin-bottom: 36px; }
.title-sm { font-size: clamp(36px, 5.5vw, 56px); }

.app-narrow { max-width: 600px; }

.auth-card { animation: fadeUp 0.7s var(--ease-out) 0.2s both; }

.auth-tabs {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-bottom: 24px;
}

.auth-tabs::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: 4px;
  left: 4px;
  width: calc(50% - 6px);
  height: calc(100% - 8px);
  background: var(--ink);
  border-radius: 8px;
  transition: transform 0.32s var(--ease);
}

.auth-tabs[data-mode="signup"]::before {
  transform: translateX(calc(100% + 4px));
}

.auth-tab {
  position: relative;
  z-index: 1;
  padding: 10px;
  border: none;
  background: transparent;
  border-radius: 8px;
  color: var(--ink-3);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.25s var(--ease), font-weight 0.18s var(--ease);
}

.auth-tab.active {
  background: transparent;
  color: var(--bg);
  font-weight: 600;
}

.auth-form .field { margin-bottom: 18px; }

#usernameField {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  margin-bottom: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition:
    max-height 0.38s var(--ease),
    opacity 0.3s var(--ease),
    margin-bottom 0.38s var(--ease),
    transform 0.38s var(--ease);
}

#usernameField.is-open {
  max-height: 140px;
  opacity: 1;
  margin-bottom: 18px;
  transform: translateY(0);
  pointer-events: auto;
}

@keyframes authSwap {
  0% {
    opacity: 0;
    transform: translateY(10px);
    filter: blur(3px);
  }
  60% {
    filter: blur(0);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

.auth-form.is-switching .field:not(#usernameField),
.auth-form.is-switching #authSubmit,
.auth-form.is-switching .auth-foot {
  animation: authSwap 0.55s var(--ease-out) both;
}

.auth-form.is-switching > .field:nth-child(2)  { animation-delay: 0.05s; }
.auth-form.is-switching > .field:nth-child(3)  { animation-delay: 0.11s; }
.auth-form.is-switching > #authSubmit          { animation-delay: 0.18s; }
.auth-form.is-switching > .auth-foot           { animation-delay: 0.24s; }

#authTitle.is-swapping {
  animation: authSwap 0.55s var(--ease-out) both;
}

@media (prefers-reduced-motion: reduce) {
  .auth-tabs::before,
  #usernameField { transition: none; }
  .auth-form.is-switching .field:not(#usernameField),
  .auth-form.is-switching #authSubmit,
  .auth-form.is-switching .auth-foot,
  #authTitle.is-swapping { animation: none; }
}

.input.no-trail { padding-right: 18px; }

.label .hint-text {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-4);
  letter-spacing: 0.04em;
  text-transform: none;
}

.btn-full { width: 100%; margin-top: 8px; }

.auth-error {
  padding: 12px 14px;
  background: rgba(248, 113, 113, 0.08);
  border: 1px solid rgba(248, 113, 113, 0.25);
  border-radius: 10px;
  color: #fca5a5;
  font-size: 13px;
  margin-bottom: 14px;
  animation: shake 0.32s ease-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25%      { transform: translateX(-4px); }
  75%      { transform: translateX(4px); }
}

.auth-foot {
  text-align: center;
  margin-top: 16px;
  font-size: 13px;
  color: var(--ink-3);
}

.link-btn {
  background: none;
  border: none;
  color: var(--ink);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: var(--ink-4);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s var(--ease);
  padding: 0;
  margin-left: 4px;
}

.link-btn:hover { text-decoration-color: var(--ink); }

.saved-hint {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #4ade80;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
}

.saved-hint.link {
  color: var(--ink-2);
  text-decoration: underline;
  text-decoration-color: var(--ink-4);
  text-underline-offset: 2px;
}

.saved-hint.link:hover { color: var(--ink); }

.excuse-card.is-locked .excuse-meta {
  margin-bottom: 14px;
}

.excuse-locked {
  position: relative;
  max-height: 4.6em;
  overflow: hidden;

  -webkit-mask-image: linear-gradient(to bottom, #000 35%, transparent 100%);
          mask-image: linear-gradient(to bottom, #000 35%, transparent 100%);
}

.excuse-locked .excuse-quote {
  margin-bottom: 0;
}

.excuse-quote .blurred {
  filter: blur(5px);
  opacity: 0.65;
  user-select: none;
  pointer-events: none;
  -webkit-user-select: none;
}

.lock-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  margin-top: 12px;
  padding: 20px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.lock-mark {
  font-size: 22px;
  line-height: 1;
  margin-bottom: 2px;
}

.lock-title {
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--ink);
  margin: 0;
}

.lock-text {
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-3);
  max-width: 380px;
  margin: 0;
}

.lock-btn {
  margin-top: 10px;
  text-decoration: none;
}

.page-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.filters {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 4px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.filter-pill {
  padding: 7px 14px;
  background: transparent;
  border: none;
  border-radius: 999px;
  color: var(--ink-3);
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.18s var(--ease);
}

.filter-pill:hover { color: var(--ink); }

.filter-pill.active {
  background: var(--ink);
  color: var(--bg);
  font-weight: 600;
}

.page-stats {
  display: inline-flex;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-4);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.page-stats .stat strong {
  color: var(--ink);
  font-weight: 600;
  margin-right: 4px;
  font-size: 13px;
}

.history-grid {
  display: grid;
  gap: 14px;
}

.history-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  transition: all 0.2s var(--ease);
  animation: revealUp 0.4s var(--ease-out) both;
}

.history-card:hover {
  border-color: var(--line-2);
  background: var(--surface-2);
}

.history-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.history-card .meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  flex-wrap: wrap;
}

.history-card .meta .tag {
  color: var(--ink-2);
  background: var(--surface-3);
  border: 1px solid var(--line);
  padding: 2px 8px;
  border-radius: 4px;
}

.history-card .situation {
  color: var(--ink-3);
  text-transform: none;
  letter-spacing: 0;
}

.dot-sep { color: var(--ink-4); }

.badge {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--surface-3);
  border: 1px solid var(--line);
  color: var(--ink-3);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.badge-success {
  color: #4ade80;
  background: rgba(74, 222, 128, 0.08);
  border-color: rgba(74, 222, 128, 0.25);
}

.history-quote {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 400;
  line-height: 1.45;
  color: var(--ink);
  letter-spacing: -0.01em;
  margin-bottom: 16px;
}

.history-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}

.history-card .time {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-4);
  letter-spacing: 0.04em;
}

.card-actions {
  display: inline-flex;
  gap: 6px;
  flex-wrap: wrap;
}

.btn-ghost.danger { color: #f87171; }
.btn-ghost.danger:hover {
  background: rgba(248, 113, 113, 0.08);
  border-color: rgba(248, 113, 113, 0.25);
  color: #fca5a5;
}

.auth-gate { max-width: 520px; margin: 0 auto; animation: fadeUp 0.6s var(--ease-out) both; }

.leaderboard-list {
  display: grid;
  gap: 12px;
}

.lb-row {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 18px;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: all 0.2s var(--ease);
  animation: revealUp 0.4s var(--ease-out) both;
}

.lb-row:hover {
  border-color: var(--line-2);
  background: var(--surface-2);
  transform: translateY(-1px);
}

.rank {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 38px;
  line-height: 1;
  font-weight: 400;
  color: var(--ink-4);
  text-align: center;
  padding-top: 4px;
  letter-spacing: -0.02em;
}

.rank.gold   { color: #f5d769; text-shadow: 0 0 24px rgba(245, 215, 105, 0.25); }
.rank.silver { color: #d8d8df; }
.rank.bronze { color: #d49a72; }

.lb-body { min-width: 0; }

.lb-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.avatar-sm {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(160deg, #2a2a30, var(--bg));
  border: 1px solid var(--line-2);
  display: inline-grid;
  place-items: center;
  font-size: 10px;
  font-weight: 600;
  color: var(--ink);
}

.lb-user {
  color: var(--ink);
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.lb-meta .tag {
  color: var(--ink-2);
  background: var(--surface-3);
  border: 1px solid var(--line);
  padding: 2px 8px;
  border-radius: 4px;
}

.lb-meta .situation {
  color: var(--ink-3);
  text-transform: none;
  letter-spacing: 0;
}

.lb-quote {
  font-family: var(--font-display);
  font-size: clamp(18px, 2.2vw, 22px);
  font-weight: 400;
  line-height: 1.4;
  color: var(--ink);
  letter-spacing: -0.01em;
  margin-bottom: 16px;
}

.lb-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
  gap: 10px;
}

.lb-foot .time {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-4);
  letter-spacing: 0.04em;
}

.lb-actions { display: inline-flex; gap: 6px; }

.like-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s var(--ease);
  letter-spacing: 0.02em;
}

.like-btn:hover {
  border-color: var(--line-2);
  color: var(--ink);
}

.like-btn .heart {
  font-size: 14px;
  transition: transform 0.2s var(--ease);
}

.like-btn:hover .heart { transform: scale(1.15); }

.like-btn.liked {
  background: rgba(245, 215, 105, 0.08);
  border-color: rgba(245, 215, 105, 0.3);
  color: #f5d769;
}

.like-btn.liked .heart { color: #f5d769; }

@media (max-width: 900px) {
  .nav {
    grid-template-columns: auto 1fr;
    grid-template-areas:
      "brand right"
      "links links";
    padding: 12px 16px;
    gap: 10px;
  }
  .nav > .brand     { grid-area: brand; justify-self: start; }
  .nav > .nav-right { grid-area: right; justify-self: end; }
  .nav > .nav-links {
    grid-area: links;
    justify-self: stretch;
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 700px) {
  .lb-row { grid-template-columns: 48px 1fr; padding: 18px; gap: 14px; }
  .rank { font-size: 30px; }
  .history-card { padding: 18px; }
  .nav-links { font-size: 12px; }
  .nav-link { padding: 6px 10px; font-size: 12px; }
  .user-name { display: none; }
  .nav-meta { display: none; }
  .page-toolbar { flex-direction: column; align-items: stretch; }
  .filters { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; }
  .filter-pill { white-space: nowrap; }
  .page-stats { justify-content: flex-end; }
}

html::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 40;
  background:
    radial-gradient(ellipse 80% 60% at 50% 50%, rgba(255, 255, 255, 0.04), transparent 70%),
    var(--bg);
  pointer-events: none;
  transform: translateY(100%);
  will-change: transform;
}

html.pt-entering::before {
  transform: translateY(0);
  transition: none;
}

html.pt-entered::before {
  transform: translateY(-100%);
  transition: transform 0.85s cubic-bezier(0.76, 0, 0.24, 1) 0.5s;
}

html.pt-leaving::before {
  transform: translateY(0);
  transition: transform 0.75s cubic-bezier(0.76, 0, 0.24, 1);
  pointer-events: auto;
}

html.pt-entering::after,
html.pt-leaving::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 41;
  pointer-events: none;
  background: radial-gradient(ellipse 30% 20% at 50% 50%, rgba(255, 255, 255, 0.05), transparent 70%);
  opacity: 0;
  animation: ptBloom 1.1s ease-out forwards;
}

@keyframes ptBloom {
  0%   { opacity: 0; }
  40%  { opacity: 1; }
  100% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html.pt-entered::before,
  html.pt-leaving::before {
    transition-duration: 0.01ms !important;
  }
  html.pt-entering::after,
  html.pt-leaving::after { display: none; }
}

.pt-brand-overlay {
  position: fixed;
  inset: 0;
  z-index: 42;
  display: grid;
  place-items: center;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  padding: 24px;
}

.pt-brand-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
}

.pt-brand-mark {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: linear-gradient(160deg, #2a2a30, var(--bg));
  border: 1px solid var(--line-2);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 28px;
  color: var(--ink);
  opacity: 0;
  transform: translateY(14px) scale(0.9);
  transition:
    opacity 0.7s var(--ease-out),
    transform 0.85s var(--ease-out);
}

.pt-brand-words {
  display: flex;
  align-items: baseline;
  gap: 0.28em;
  font-size: clamp(38px, 7vw, 76px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--ink);
  margin: 0;
  overflow: hidden;
  padding: 0.1em 0;
}

.pt-word {
  display: inline-block;
  opacity: 0;
  transform: translateY(110%);
  transition:
    opacity 0.8s var(--ease-out),
    transform 1.1s cubic-bezier(0.22, 1, 0.36, 1);
}

.pt-word-2 {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.025em;
  background: linear-gradient(180deg, var(--ink) 0%, var(--ink-3) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.pt-tagline {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 0.7s ease,
    transform 0.8s var(--ease-out);
}

.pt-tagline .pt-line {
  display: inline-block;
  width: 36px;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--line-2) 50%,
    transparent
  );
}

html.pt-leaving .pt-brand-overlay {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.35s ease;
}

html.pt-leaving .pt-brand-mark {
  opacity: 1;
  transform: translateY(0) scale(1);
  transition-delay: 0.35s;
}

html.pt-leaving .pt-word {
  opacity: 1;
  transform: translateY(0);
}

html.pt-leaving .pt-word-1 { transition-delay: 0.5s; }
html.pt-leaving .pt-word-2 { transition-delay: 0.7s; }

html.pt-leaving .pt-tagline {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.95s;
}

html.pt-entering .pt-brand-overlay {
  opacity: 1;
  visibility: visible;
  transition: none;
}

html.pt-entering .pt-brand-mark,
html.pt-entering .pt-word,
html.pt-entering .pt-tagline {
  opacity: 1;
  transform: translateY(0) scale(1);
  transition: none;
}

html.pt-entered .pt-brand-overlay {
  opacity: 0;
  visibility: visible;
  transition: opacity 0.5s ease 0.15s, visibility 0s linear 1s;
}

html.pt-entered .pt-brand-mark {
  opacity: 0;
  transform: translateY(-8px) scale(0.96);
  transition:
    opacity 0.45s ease,
    transform 0.55s var(--ease-out);
}

html.pt-entered .pt-word {
  opacity: 0;
  transform: translateY(-30%);
  transition:
    opacity 0.45s ease,
    transform 0.55s var(--ease-out);
}

html.pt-entered .pt-word-1 { transition-delay: 0.05s; }
html.pt-entered .pt-word-2 { transition-delay: 0.12s; }

html.pt-entered .pt-tagline {
  opacity: 0;
  transform: translateY(-6px);
  transition:
    opacity 0.35s ease,
    transform 0.4s var(--ease-out);
}

@media (prefers-reduced-motion: reduce) {
  .pt-brand-overlay,
  .pt-brand-mark,
  .pt-word,
  .pt-tagline {
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }
}

.window-stage {
  position: relative;
  width: 100%;

  min-height: 460px;
  height: clamp(460px, calc(100vh - 360px), 760px);
  border-radius: var(--radius-lg);
  border: 1px dashed var(--line);
  background:
    repeating-linear-gradient(
      135deg,
      transparent 0 8px,
      rgba(255, 255, 255, 0.012) 8px 16px
    );

  isolation: isolate;
  overflow: hidden;
  animation: stageFade 0.4s var(--ease-out) both;
}

.stage-narrow {
  height: clamp(520px, calc(100vh - 320px), 660px);
}

@keyframes stageFade {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.window-stage > .card {
  position: absolute;
  inset: 12px;
  margin: 0;
  display: flex;
  flex-direction: column;
}

.window-stage > .card .card-body {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

@media (max-width: 700px) {
  .window-stage {
    min-height: 380px;
    height: clamp(380px, calc(100vh - 280px), 620px);
  }
  .stage-narrow {
    height: clamp(460px, calc(100vh - 240px), 580px);
  }
  .window-stage > .card { inset: 8px; }
}

.dots .tl {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  position: relative;
  transition: filter 0.2s var(--ease), transform 0.2s var(--ease);
  display: inline-grid;
  place-items: center;
  font-size: 8px;
  color: rgba(0, 0, 0, 0.55);
  font-family: var(--font-mono);
  font-weight: 700;
  line-height: 1;
}

.dots .tl::before {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
}

.dots .tl-close { background: #ff5f57; }
.dots .tl-min   { background: #febc2e; }
.dots .tl-max   { background: #28c840; }

.dots:hover .tl-close::after { content: "×"; }
.dots:hover .tl-min::after   { content: "−"; }
.dots:hover .tl-max::after   { content: "+"; }

.dots .tl::after {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: rgba(0, 0, 0, 0.65);
  line-height: 1;
  pointer-events: none;
}

.dots .tl:hover { filter: brightness(1.1); }
.dots .tl:active { transform: scale(0.92); }

.card.window-able .card-header { user-select: none; }

.card-header[data-draggable="true"] {
  cursor: grab;
}

.card.is-dragging .card-header[data-draggable="true"],
.card-header[data-draggable="true"]:active {
  cursor: grabbing;
}

.card.is-window {
  z-index: 2;
  box-shadow:
    0 30px 60px -20px rgba(0, 0, 0, 0.85),
    0 12px 30px -12px rgba(0, 0, 0, 0.6),
    0 0 0 1px var(--line-2);
  animation: windowPop 0.2s var(--ease-out);
}

@keyframes windowPop {
  from { transform: scale(0.985); }
  to   { transform: scale(1); }
}

.card.is-window .card-body {
  overflow-y: auto;
  max-height: calc(100% - 50px);
}

.card.is-dragging,
.card.is-resizing {
  user-select: none;
  transition: none !important;
}

.card.is-dragging { box-shadow:
    0 50px 120px -20px rgba(0, 0, 0, 0.9),
    0 0 0 1px rgba(255, 255, 255, 0.15);
}

.card.is-minimized .card-body {
  display: none;
}

.card.is-minimized {
  height: auto !important;
}

.card.is-minimized .card-resizer {
  display: none;
}

.card.is-maximized .card-resizer { display: none; }
.card.is-maximized .card-header[data-draggable="true"] { cursor: default; }

.card-resizer {
  position: absolute;
  bottom: 6px;
  right: 6px;
  width: 16px;
  height: 16px;
  cursor: nwse-resize;
  z-index: 5;
  background-image:
    linear-gradient(135deg, transparent 0 55%, var(--ink-4) 55% 65%, transparent 65% 75%, var(--ink-4) 75% 85%, transparent 85% 100%);
  opacity: 0.5;
  transition: opacity 0.2s var(--ease);
  border-bottom-right-radius: var(--radius-lg);
}

.card-resizer:hover { opacity: 1; }

.card-placeholder {
  display: none;
}

@media (max-width: 700px) {
  .card.is-window {

  }
  .card-resizer { width: 22px; height: 22px; }
}

.rising-text {
  display: inline-block;
  white-space: nowrap;

  background: none;
  -webkit-text-fill-color: initial;
  color: var(--ink);
}

.rising-text .letter {
  display: inline-block;
  line-height: 1em;
  will-change: transform, opacity;

  background: linear-gradient(180deg, var(--ink) 0%, var(--ink-3) 100%);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
}

@media (prefers-reduced-motion: reduce) {
  .rising-text .letter {
    transform: none !important;
    opacity: 1 !important;
  }
}

.footer {
  align-items: center;
}

.footer-social {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--ink-3);
  text-decoration: none;
  transition:
    color 0.2s var(--ease),
    background 0.2s var(--ease),
    border-color 0.2s var(--ease),
    transform 0.25s var(--ease);
}

.footer-social svg {
  width: 16px;
  height: 16px;
  display: block;
}

.footer-social:hover,
.footer-social:focus-visible {
  color: var(--ink);
  background: var(--surface-3);
  border-color: var(--line-2);
  transform: translateY(-1px);
  outline: none;
}

.footer-social:focus-visible {
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08);
}

.community-sort {
  display: flex;
  align-items: center;
  gap: 10px;
}

.seg {
  display: inline-flex;
  gap: 2px;
  padding: 4px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.seg-btn {
  padding: 6px 14px;
  border: none;
  background: transparent;
  border-radius: 999px;
  color: var(--ink-3);
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.18s var(--ease);
}

.seg-btn:hover { color: var(--ink-2); }

.seg-btn.active {
  background: var(--ink);
  color: var(--bg);
  font-weight: 600;
}

.community-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cm-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
  animation: revealUp 0.4s var(--ease-out) both;
}

.cm-card:hover { border-color: var(--line-2); }

.cm-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--ink-3);
  margin-bottom: 12px;
}

.cm-user { font-weight: 600; color: var(--ink-2); }
.cm-situation { color: var(--ink-3); }
.cm-time {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-4);
}

.cm-quote {
  font-family: var(--font-display);
  font-size: clamp(19px, 2.4vw, 24px);
  font-weight: 400;
  line-height: 1.4;
  color: var(--ink);
  margin: 0 0 16px;
}

.cm-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.vote-group {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  background: var(--surface-2);
}

.vote-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: transparent;
  border: none;
  color: var(--ink-3);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.16s var(--ease);
}

.vote-btn + .vote-btn { border-left: 1px solid var(--line); }
.vote-btn:hover { color: var(--ink); background: var(--surface-3); }

.vote-btn.like.active {
  color: #4ade80;
  background: rgba(74, 222, 128, 0.12);
}

.vote-btn.dislike.active {
  color: #f87171;
  background: rgba(248, 113, 113, 0.12);
}

.cm-comment-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.cm-count-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-3);
  background: var(--surface-3);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 1px 7px;
  min-width: 20px;
  text-align: center;
}

.cm-comments {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px dashed var(--line-2);
  animation: revealUp 0.3s var(--ease-out) both;
}

.cm-comments-loading,
.cm-no-comments {
  font-size: 13px;
  color: var(--ink-4);
  padding: 6px 2px 14px;
}

.cm-comment-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 16px;
}

.cm-comment {
  display: flex;
  gap: 10px;
}

.cm-comment-body { flex: 1; min-width: 0; }

.cm-comment-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}

.cm-comment-user { font-size: 12px; font-weight: 600; color: var(--ink-2); }
.cm-comment-time {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-4);
}

.cm-comment-del {
  margin-left: auto;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-4);
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  transition: all 0.15s var(--ease);
}

.cm-comment-del:hover {
  color: #f87171;
  border-color: rgba(248, 113, 113, 0.4);
  background: rgba(248, 113, 113, 0.08);
}

.cm-comment-text {
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
  margin: 0;
  word-break: break-word;
}

.cm-comment-form {
  display: flex;
  gap: 8px;
}

.cm-comment-input { flex: 1; padding: 12px 14px; font-size: 14px; }
.cm-comment-send { min-width: auto; padding: 0 18px; }

.cm-login-hint {
  display: inline-block;
  font-size: 13px;
  color: var(--ink-2);
  text-decoration: underline;
  text-decoration-color: var(--ink-4);
  text-underline-offset: 3px;
}

.cm-login-hint:hover { color: var(--ink); }

@media (max-width: 640px) {
  .community-sort { width: 100%; justify-content: space-between; }
  .cm-comment-form { flex-direction: column; }
  .cm-comment-send { padding: 12px; }
}

.nav-link-admin {
  color: #e0a82e;
}
.nav-link-admin[aria-current="page"] { color: #f0c070; }

.sys-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 20px;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.4;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--ink-2);
  animation: revealUp 0.5s var(--ease-out) both;
}
.sys-banner[data-kind="warn"] {
  border-color: rgba(224, 138, 46, 0.4);
  background: rgba(224, 138, 46, 0.08);
  color: #f0c070;
}

.cm-report,
.cm-comment-report {
  opacity: 0.7;
}
.cm-report:hover,
.cm-comment-report:hover {
  opacity: 1;
  color: #e8705a;
}
.cm-comment-report {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink-4);
  font-size: 13px;
  padding: 0 4px;
  margin-left: auto;
}

.cm-admin-controls {
  display: inline-flex;
  gap: 6px;
  margin-left: auto;
}

.report-textarea {
  margin-top: 10px;
  resize: vertical;
  min-height: 64px;
  font-family: inherit;
}
.report-error {
  margin-top: 8px;
  color: #e8705a;
  font-size: 13px;
}
.report-modal .settings-foot {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.admin-card { width: 100%; }

.admin-section-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 14px;
  color: var(--ink);
}

.admin-toggles {
  display: grid;
  gap: 12px;
}

.admin-toggle {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.admin-toggle:hover { border-color: var(--ink-4); }

.admin-toggle input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: #e0a82e;
  cursor: pointer;
  flex-shrink: 0;
}

.admin-toggle-text { display: flex; flex-direction: column; gap: 2px; }
.admin-toggle-text strong { font-size: 14px; color: var(--ink); }
.admin-toggle-text small { font-size: 12px; color: var(--ink-4); }

.admin-actions-row {
  margin-top: 18px;
  display: flex;
  justify-content: flex-end;
}

.report-reason {
  margin: 10px 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink-2);
}
.report-reason strong { color: var(--ink); }
.report-by { color: var(--ink-4); }

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 1px solid var(--line);
  color: var(--ink-3);
  background: rgba(255, 255, 255, 0.03);
}
.badge-success {
  border-color: rgba(74, 192, 122, 0.4);
  background: rgba(74, 192, 122, 0.1);
  color: #6fd699;
}
.badge-warn {
  border-color: rgba(224, 138, 46, 0.4);
  background: rgba(224, 138, 46, 0.1);
  color: #f0c070;
}

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 22px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
}
.admin-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--ink-3);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.admin-tab:hover { color: var(--ink); }
.admin-tab.active {
  background: var(--ink);
  color: var(--bg, #0c0c0e);
}
.tab-badge {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #e8705a;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

.admin-panel { animation: revealUp 0.4s var(--ease-out) both; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}
.stat-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
}
.stat-card.warn   { border-color: rgba(224, 138, 46, 0.35); }
.stat-card.danger { border-color: rgba(232, 112, 90, 0.35); }
.stat-num {
  font-family: var(--font-display);
  font-size: 34px;
  line-height: 1;
  color: var(--ink);
}
.stat-label { font-size: 12px; color: var(--ink-4); }

.sys-status-row { display: flex; flex-wrap: wrap; gap: 8px; }
.sys-chip {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  border: 1px solid var(--line);
  color: var(--ink-3);
}
.sys-chip.on  { border-color: rgba(74, 192, 122, 0.4); color: #6fd699; background: rgba(74,192,122,0.08); }
.sys-chip.off { border-color: rgba(232, 112, 90, 0.4); color: #e8705a; background: rgba(232,112,90,0.08); }
.admin-hint { margin-top: 12px; font-size: 13px; color: var(--ink-4); }

.admin-search { max-width: 320px; }

.admin-table { display: flex; flex-direction: column; gap: 8px; }
.admin-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  animation: revealUp 0.35s var(--ease-out) both;
}
.admin-row-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.admin-row-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.admin-row-name { font-size: 14px; font-weight: 600; color: var(--ink); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.admin-row-sub { font-size: 12px; color: var(--ink-4); }
.admin-row-actions { display: flex; gap: 6px; flex-shrink: 0; }

.admin-empty {
  padding: 40px;
  text-align: center;
  color: var(--ink-4);
  border: 1px dashed var(--line);
  border-radius: 14px;
}

.audit-log { display: flex; flex-direction: column; gap: 2px; }
.audit-item {
  display: grid;
  grid-template-columns: minmax(160px, auto) 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.audit-action { font-weight: 600; color: var(--ink); }
.audit-meta { color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.audit-time { color: var(--ink-4); font-size: 12px; white-space: nowrap; }

.badge-gold {
  border-color: rgba(224, 168, 46, 0.45);
  background: rgba(224, 168, 46, 0.12);
  color: #e0a82e;
}
.badge-danger {
  border-color: rgba(232, 112, 90, 0.45);
  background: rgba(232, 112, 90, 0.12);
  color: #e8705a;
}

@media (max-width: 640px) {
  .admin-row { flex-direction: column; align-items: stretch; }
  .admin-row-actions { justify-content: flex-end; }
  .audit-item { grid-template-columns: 1fr; gap: 2px; }
  .audit-time { justify-self: start; }
}

html.is-banned-lock,
html.is-banned-lock body {
  overflow: hidden !important;
}

.ban-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(8, 8, 10, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  animation: banFade 0.35s ease both;
}

@keyframes banFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.ban-card {
  width: 100%;
  max-width: 460px;
  text-align: center;
  padding: 40px 32px 28px;
  border: 1px solid rgba(232, 112, 90, 0.35);
  border-radius: 20px;
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(232, 112, 90, 0.12), transparent 60%),
    rgba(20, 20, 24, 0.9);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
  animation: revealUp 0.5s var(--ease-out) both;
}

.ban-mark {
  font-size: 52px;
  line-height: 1;
  margin-bottom: 16px;
  filter: drop-shadow(0 4px 16px rgba(232, 112, 90, 0.4));
}

.ban-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 5vw, 38px);
  font-weight: 400;
  color: var(--ink);
  margin-bottom: 14px;
  letter-spacing: -0.02em;
}

.ban-text {
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-2);
  margin-bottom: 12px;
}
.ban-text strong { color: #e8705a; }

.ban-subtext {
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-4);
  margin-bottom: 26px;
}

.ban-actions {
  display: flex;
  justify-content: center;
}
.ban-btn { min-width: 160px; justify-content: center; }

.ban-foot {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--ink-4);
}

.badge-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink-2);
  vertical-align: middle;
}
.badge-chip-md { font-size: 13px; padding: 5px 12px; }
.badge-chip-icon { font-size: 0.95em; line-height: 1; }

.badge-chip-admin    { border-color: rgba(224,168,46,.5);  background: rgba(224,168,46,.14); color: #e0a82e; }
.badge-chip-verified { border-color: rgba(74,158,255,.5);  background: rgba(74,158,255,.14); color: #6cb0ff; }
.badge-chip-mod      { border-color: rgba(124,196,124,.5); background: rgba(124,196,124,.14);color: #88d18a; }
.badge-chip-creator  { border-color: rgba(224,112,200,.5); background: rgba(224,112,200,.14);color: #e785d2; }
.badge-chip-early    { border-color: rgba(124,200,170,.5); background: rgba(124,200,170,.14);color: #7fd1b3; }
.badge-chip-vip      { border-color: rgba(232,180,90,.55);  background: rgba(232,180,90,.16); color: #f0c46a; }
.badge-chip-partner  { border-color: rgba(160,160,255,.5); background: rgba(160,160,255,.14);color: #a8a8ff; }

.badge-dot {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 11px;
  line-height: 1;
  border: 1px solid var(--line);
  vertical-align: middle;
  margin-left: 2px;
}
.badge-dot.badge-chip-admin    { border-color: rgba(224,168,46,.5);  background: rgba(224,168,46,.16); color: #e0a82e; }
.badge-dot.badge-chip-verified { border-color: rgba(74,158,255,.5);  background: rgba(74,158,255,.16); color: #6cb0ff; }
.badge-dot.badge-chip-mod      { border-color: rgba(124,196,124,.5); background: rgba(124,196,124,.16);color: #88d18a; }
.badge-dot.badge-chip-creator  { border-color: rgba(224,112,200,.5); background: rgba(224,112,200,.16);color: #e785d2; }
.badge-dot.badge-chip-early    { border-color: rgba(124,200,170,.5); background: rgba(124,200,170,.16);color: #7fd1b3; }
.badge-dot.badge-chip-vip      { border-color: rgba(232,180,90,.55);  background: rgba(232,180,90,.18); color: #f0c46a; }
.badge-dot.badge-chip-partner  { border-color: rgba(160,160,255,.5); background: rgba(160,160,255,.16);color: #a8a8ff; }

.cm-user-link,
.cm-comment-user-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: inherit;
  transition: opacity 0.15s ease;
}
.cm-user-link:hover,
.cm-comment-user-link:hover { opacity: 0.75; }
.cm-user-link:hover .cm-user,
.cm-comment-user-link:hover .cm-comment-user { text-decoration: underline; }

.profile-header { width: 100%; margin-bottom: 24px; }
.profile-top { display: flex; align-items: center; gap: 18px; margin-bottom: 22px; }
.profile-avatar {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 20px;
  font-family: var(--font-display);
  font-size: 32px;
  color: var(--bg, #0c0c0e);
  background: var(--ink);
  flex-shrink: 0;
}
.profile-id { min-width: 0; }
.profile-name {
  font-family: var(--font-display);
  font-size: clamp(26px, 4vw, 34px);
  font-weight: 400;
  color: var(--ink);
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}
.profile-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.profile-no-badge { font-size: 12px; color: var(--ink-4); }
.profile-joined { font-size: 13px; color: var(--ink-4); }

.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.profile-stat { display: flex; flex-direction: column; gap: 2px; }
.profile-stat-num { font-family: var(--font-display); font-size: 28px; color: var(--ink); line-height: 1; }
.profile-stat-label { font-size: 12px; color: var(--ink-4); }

.profile-section-head { margin: 4px 0 14px; }
.profile-section-title { font-size: 18px; font-weight: 600; color: var(--ink); }
.profile-card-stats { align-items: center; gap: 12px; }
.pf-stat { font-size: 13px; color: var(--ink-3); }

.badge-pick-list { display: grid; gap: 8px; }
.badge-pick {
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
}
.badge-pick:hover { border-color: var(--ink-4); }
.badge-pick input { width: 16px; height: 16px; accent-color: #e0a82e; }
.badge-pick small { color: var(--ink-4); font-size: 12px; }

.bulk-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 12px 16px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
}
.bulk-select-all { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.bulk-select-all input { width: 16px; height: 16px; accent-color: #e0a82e; }
.bulk-count { font-size: 13px; color: var(--ink-3); }
.bulk-actions { display: flex; gap: 8px; margin-left: auto; }
.bulk-check { display: inline-flex; align-items: center; margin-right: 4px; }
.bulk-check input { width: 15px; height: 15px; accent-color: #e8705a; }

.insight-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 16px;
}
@media (max-width: 760px) { .insight-grid { grid-template-columns: 1fr; } }

.bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 200px;
  padding-top: 20px;
  overflow-x: auto;
}
.bar-col {
  flex: 1;
  min-width: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  gap: 6px;
}
.bar-fill {
  width: 70%;
  min-height: 3px;
  border-radius: 5px 5px 0 0;
  background: linear-gradient(180deg, #e0a82e, rgba(224,168,46,.4));
  position: relative;
  display: flex;
  justify-content: center;
  transition: height 0.4s var(--ease-out);
}
.bar-val {
  position: absolute;
  top: -16px;
  font-size: 10px;
  color: var(--ink-3);
}
.bar-label { font-size: 9px; color: var(--ink-4); white-space: nowrap; transform: rotate(-45deg); transform-origin: center; }

.vibe-stats { display: flex; flex-direction: column; gap: 12px; }
.vibe-stat-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 5px; }
.vibe-stat-num { font-size: 12px; color: var(--ink-4); }
.vibe-bar { height: 8px; border-radius: 999px; background: rgba(255,255,255,.05); overflow: hidden; }
.vibe-bar-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #6cb0ff, #a8a8ff); transition: width 0.5s var(--ease-out); }

.top-users { display: flex; flex-direction: column; }
.top-user-row {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 9px 4px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
}
.top-user-row:hover { background: rgba(255,255,255,.02); }
.top-user-rank { font-family: var(--font-display); font-size: 18px; color: var(--ink-4); text-align: center; }
.top-user-name { font-size: 14px; color: var(--ink); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.top-user-meta { font-size: 12px; color: var(--ink-4); white-space: nowrap; }
