:root {
  --bg: #050506;
  --ink: #f5f5f7;
  --muted: rgba(235, 235, 245, 0.62);
  --line: rgba(255, 255, 255, 0.12);
  --fill: rgba(255, 255, 255, 0.07);
  --glass: rgba(20, 20, 22, 0.72);
  --accent: #0a84ff;
  --accent-text: #64d2ff;
  --heart: #ff375f;
  --danger: #ff453a;
  --label: #8e8e93;
  --good: #34c759;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { color-scheme: dark; -webkit-text-size-adjust: 100%; }

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(900px 520px at 50% -12%, rgba(10, 132, 255, 0.14), transparent 52%),
    var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", sans-serif;
  font-size: 17px;
  letter-spacing: -0.022em;
  overflow-wrap: break-word;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

@supports (min-height: 100dvh) {
  body { min-height: 100dvh; }
}

a, button { -webkit-tap-highlight-color: transparent; }
a { color: var(--accent-text); text-decoration: none; }

/* --- HEADER --- */
.island-top {
  position: sticky;
  top: 12px;
  z-index: 40;
  width: min(920px, calc(100% - 24px));
  margin: 12px auto 0;
  min-height: 48px;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-radius: 10px;
  background: rgba(12,12,14,0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--line);
}

.island-title {
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.03em;
  text-transform: lowercase;
  color: var(--ink);
}

.island-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.island-side {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 36vw;
  padding: 4px 8px 4px 4px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
}

.island-side:hover { background: rgba(255,255,255,0.08); }

.island-id {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.2;
}

.island-name {
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.island-handle {
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.icon-btn {
  position: relative;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}

.icon-btn::after {
  content: "";
  position: absolute;
  inset: -6px;
}

.icon-btn svg { width: 18px; height: 18px; display: block; }
.icon-btn:hover { color: var(--ink); background: rgba(255,255,255,0.08); }

.logout-form,
form.logout-form {
  margin: 0;
  padding: 0 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  gap: 0;
}

.more { position: relative; }
.more summary { list-style: none; }
.more summary::-webkit-details-marker { display: none; }

.more-sheet {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 198px;
  padding: 8px;
  border-radius: 16px;
  background: var(--glass);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--line);
  box-shadow: 0 16px 40px rgba(0,0,0,.4);
  display: grid;
}

.more-sheet a {
  color: var(--ink);
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 15px;
}

.more-sheet a:hover { background: rgba(255,255,255,0.08); }

/* --- LAYOUT --- */
.canvas {
  width: min(680px, calc(100% - 32px));
  margin: 28px auto 0;
  flex: 1;
}

.large-title {
  font-size: clamp(32px, 7vw, 40px);
  font-weight: 700;
  letter-spacing: -0.043em;
  margin: 8px 0 18px;
}

.hero-card, .group, .gate-card, .archive a, .panel {
  background: var(--fill);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.hero-card { padding: 22px; }

.hero-card h1 {
  font-size: clamp(24px, 5.6vw, 32px);
  font-weight: 650;
  letter-spacing: -0.035em;
  line-height: 1.16;
  margin: 8px 0 0;
}

.group { margin-top: 16px; padding: 6px 0; overflow: hidden; }

.group-title {
  margin: 0;
  padding: 12px 18px 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--label);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
  gap: 6px;
}

.group.info { padding: 8px 20px 18px; }
.group.info p { color: var(--muted); line-height: 1.5; }

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--label);
  transition: background .3s ease;
}

.live-dot.is-live {
  background: var(--good);
  animation: liveDot 1.8s ease-out infinite;
}

@keyframes liveDot {
  0% { box-shadow: 0 0 0 0 rgba(52,199,89,.55); }
  70% { box-shadow: 0 0 0 7px rgba(52,199,89,0); }
  100% { box-shadow: 0 0 0 0 rgba(52,199,89,0); }
}

.meta { display: flex; gap: 10px; flex-wrap: wrap; color: var(--label); font-size: 13px; font-weight: 500; }
.lead, .boot-copy, .locked, .hint, .note { color: var(--muted); line-height: 1.45; }

/* --- ANSWERS --- */
.answers { display: grid; }

.answer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,.06);
  transition: background .2s ease;
}

.answer:first-child { border-top: 0; }
.answer:hover { background: rgba(255,255,255,.015); }

.answer.is-mine {
  background: linear-gradient(90deg, rgba(10, 132, 255, 0.08), transparent 60%);
  border-left: 2px solid var(--accent);
  padding-left: 18px;
}

.answer.is-mine:hover {
  background: linear-gradient(90deg, rgba(10, 132, 255, 0.12), transparent 60%);
}

.answer.is-new { animation: answerIn .35s ease; }
@keyframes answerIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.answer .row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.answer .who {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--ink);
  font-weight: 600;
  min-width: 0;
}

.answer .who-inner {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.answer .who a {
  color: var(--ink);
  text-decoration: none;
  transition: color .15s ease;
}

.answer .who a:hover { color: var(--accent-text); }

.mine-mark {
  color: var(--accent-text);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  opacity: 0.8;
}

.answer .text {
  margin-top: 10px;
  line-height: 1.5;
  font-size: 16px;
  color: var(--ink);
  overflow-wrap: break-word;
  word-break: break-word;
  hyphens: auto;
  max-height: 180px;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.answer.is-expanded .text {
  max-height: none;
}

/* --- EXPAND BUTTON --- */
.expand-btn {
  display: inline-block;
  margin-top: 8px;
  padding: 6px 14px;
  border: 0;
  border-radius: 8px;
  background: rgba(10, 132, 255, 0.12);
  color: var(--accent-text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}

.expand-btn:hover {
  background: rgba(10, 132, 255, 0.2);
}

/* --- VERIFIED BADGE --- */
.verified-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin: 0;
  padding: 0;
  line-height: 0;
  flex: 0 0 18px;
  transform: none;
}

.verified-badge svg,
.verified-icon {
  width: 18px;
  height: 18px;
  display: block;
  overflow: visible;
}

/* --- VOTING --- */
.vote {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0;
  background: none;
  border: 0;
  line-height: 1;
}

.vote button,
.vote button[type="submit"] {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  border: 0 !important;
  background: none !important;
  box-shadow: none !important;
  color: rgba(255,255,255,.55);
  font: inherit;
  padding: 0 !important;
  width: auto !important;
  min-height: 0 !important;
  border-radius: 0 !important;
  cursor: pointer;
  line-height: 1;
}

.vote svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linejoin: round;
}

.vote button.is-on,
.vote button.is-on[type="submit"] { color: var(--heart); }
.vote button.is-on svg { fill: var(--heart); stroke: var(--heart); }
.vote.is-static { color: rgba(255,255,255,.55); }
.vote .n { font-size: 12px; color: inherit; display: inline-block; }

.vote.bump .n,
.vote.bump svg { animation: voteBump .35s ease; }

@keyframes voteBump {
  0% { transform: scale(1); }
  40% { transform: scale(1.35); }
  100% { transform: scale(1); }
}

/* --- FORMS --- */
form { display: grid; gap: 12px; padding: 4px 18px 16px; }
form.vote, form.logout-form { display: inline-flex; gap: 6px; padding: 0; }
label { display: grid; gap: 6px; font-size: 13px; color: var(--label); font-weight: 600; }

input, textarea, select {
  width: 100%;
  border: 0;
  background: rgba(0,0,0,.35);
  color: var(--ink);
  font: inherit;
  padding: 12px 14px;
  border-radius: 16px;
}

input:focus, textarea:focus, select:focus { outline: 2px solid rgba(10,132,255,.45); }
textarea { min-height: 120px; resize: vertical; }

.form-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }

/* --- COUNTERS & QUALITY HINTS --- */
.counter {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: var(--label);
  margin: 0;
  font-variant-numeric: tabular-nums;
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  transition: all 0.3s ease;
  font-weight: 600;
}

.counter [data-char-count] {
  font-weight: 700;
  min-width: 2em;
  text-align: right;
}

.counter.is-weak { color: var(--danger); background: rgba(255, 69, 58, 0.1); }
.counter.is-ok { color: #ff9f0a; background: rgba(255, 159, 10, 0.1); }
.counter.is-good { color: var(--good); background: rgba(52, 199, 89, 0.1); }

.counter.is-gold {
  background: linear-gradient(90deg, rgba(255, 215, 0, 0.15), rgba(255, 179, 0, 0.25), rgba(255, 215, 0, 0.15));
  background-size: 200% 100%;
  animation: goldShimmer 3s ease-in-out infinite;
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.4), inset 0 0 8px rgba(255, 215, 0, 0.1);
  border: 1px solid rgba(255, 215, 0, 0.3);
}

.counter.is-gold [data-char-count] {
  background: linear-gradient(90deg, #ffd700, #ffb300, #ffe55c, #ffd700);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: goldTextShine 2s linear infinite;
  filter: drop-shadow(0 0 6px rgba(255, 215, 0, 0.8));
}

@keyframes goldShimmer {
  0% { background-position: 0% 50%; box-shadow: 0 0 12px rgba(255, 215, 0, 0.4), inset 0 0 8px rgba(255, 215, 0, 0.1); }
  50% { background-position: 100% 50%; box-shadow: 0 0 20px rgba(255, 215, 0, 0.7), inset 0 0 12px rgba(255, 215, 0, 0.2); }
  100% { background-position: 0% 50%; box-shadow: 0 0 12px rgba(255, 215, 0, 0.4), inset 0 0 8px rgba(255, 215, 0, 0.1); }
}

@keyframes goldTextShine {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

.answer-hint {
  margin: 8px 0 0;
  padding: 8px 12px;
  font-size: 13px;
  line-height: 1.4;
  border-radius: 8px;
  animation: hintFadeIn 0.4s ease;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
}

.answer-hint.is-empty { color: var(--label); font-style: italic; }
.answer-hint.is-weak { color: var(--danger); background: rgba(255, 69, 58, 0.08); border-left: 2px solid var(--danger); }
.answer-hint.is-ok { color: #ff9f0a; background: rgba(255, 159, 10, 0.08); border-left: 2px solid #ff9f0a; }
.answer-hint.is-good { color: var(--good); background: rgba(52, 199, 89, 0.08); border-left: 2px solid var(--good); }

.answer-hint.is-gold {
  color: #ffd700;
  background: linear-gradient(90deg, rgba(255, 215, 0, 0.12), rgba(255, 179, 0, 0.08));
  border-left: 2px solid #ffd700;
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.4);
  font-weight: 500;
}

@keyframes hintFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.answer-error {
  margin: 8px 0 0;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(255, 69, 58, 0.12);
  color: var(--danger);
  font-size: 14px;
  line-height: 1.4;
  animation: errorShake 0.4s ease;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.answer-error.is-fading {
  opacity: 0;
  transform: translateY(-8px);
}

@keyframes errorShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

button[type="submit"]:not(.icon-btn):not(.vote button), .btn-main {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #050506;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  text-align: center;
  transition: opacity .15s ease;
}

button[type="submit"]:not(.icon-btn):hover, .btn-main:hover { opacity: .86; }

.btn-quiet {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 8px;
  border: 1px solid var(--line);
  color: var(--ink);
  background: transparent;
  font-weight: 600;
}

/* --- STUBS & LEADS --- */
.locked, .note, .live-lead {
  padding: 12px 20px;
  margin: 0;
  font-size: 15px;
}

.locked {
  color: var(--muted);
  font-style: italic;
  opacity: 0.7;
}

.note { background: var(--fill); color: var(--muted); margin: 12px 18px; border-radius: 16px; }

.live-lead {
  color: var(--accent-text);
  font-weight: 500;
  padding: 14px 20px;
  margin: 0;
  border-bottom: 1px solid rgba(255,255,255,.06);
  animation: leadIn .4s ease;
}

@keyframes leadIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: none; }
}

.error { margin: 12px 18px; padding: 12px 14px; border-radius: 16px; font-size: 15px; background: rgba(255,69,58,.12); color: var(--danger); }

/* --- ARCHIVE & FILTERS --- */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 16px; }
.filters a { color: var(--ink); background: var(--fill); border-radius: 999px; padding: 8px 14px; font-size: 15px; }
.filters a.is-active { background: #fff; color: #000; }

.archive { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.archive a { padding: 16px 18px; color: inherit; display: block; }
.archive .q { font-size: 20px; font-weight: 600; letter-spacing: -0.03em; margin: 6px 0 0; }

/* --- AVATARS --- */
.avatar {
  object-fit: cover;
  background: #1c1c1e;
  border: 1px solid rgba(255,255,255,.08);
}

.avatar-sm { width: 26px; height: 26px; border-radius: 50%; flex: 0 0 auto; }
.avatar-md { width: 32px; height: 32px; border-radius: 50%; flex: 0 0 auto; }
.avatar-lg { width: 84px; height: 84px; border-radius: 50%; display: block; margin: 0 0 12px; }

.avatar.placeholder {
  background: linear-gradient(135deg, rgba(10,132,255,.4), rgba(255,55,95,.3));
  border: 0;
}

/* --- COUNT BADGES --- */
.count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: rgba(10, 132, 255, 0.15);
  color: var(--accent-text);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  margin-left: 6px;
}

.group-title .count {
  margin-left: 8px;
  margin-right: 8px;
}

.archive .meta .count {
  background: var(--fill);
  color: var(--muted);
  font-weight: 600;
}

/* --- LANDING (BOOT) --- */
.boot { flex: 1; display: grid; align-items: center; padding: 28px 20px 40px; }
.boot-stage { width: min(720px, 100%); margin: 0 auto; }
.boot-kicker { color: var(--label); font-size: 13px; font-weight: 600; margin: 0 0 10px; }

#typewriter {
  font-size: clamp(30px, 7vw, 48px);
  font-weight: 700;
  letter-spacing: -0.042em;
  line-height: 1.1;
  margin: 0;
  min-height: 1.15em;
}

#typewriter.is-caret::after {
  content: "";
  display: inline-block;
  width: 2px;
  height: 0.8em;
  margin-left: 3px;
  background: var(--accent-text);
  transform: translateY(3px);
  animation: blink 1s steps(1) infinite;
}

@keyframes blink { 50% { opacity: 0; } }

.boot-reveal { opacity: 0; transform: translateY(10px); transition: .55s ease; pointer-events: none; }
.boot-reveal.is-in { opacity: 1; transform: none; pointer-events: auto; }
.boot-copy { margin: 18px 0 0; max-width: 28em; }
.boot-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }

/* --- AUTH --- */
body.is-auth {
  min-height: 100dvh;
  padding-bottom: 0;
}

body.is-auth .site-footer { margin-top: 0; }

.auth-stage {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100dvh - 168px);
  padding: 20px 16px;
}

.gate-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  width: min(400px, calc(100% - 8px));
  padding: 30px 26px 26px;
  border-radius: 22px;
  background: var(--glass);
  border: 1px solid var(--line);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  box-shadow: 0 30px 80px rgba(0,0,0,.45);
  animation: authIn .5s cubic-bezier(.2,.8,.2,1);
}

@keyframes authIn { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }

.gate-card::before {
  content: "";
  position: absolute;
  inset: -45%;
  z-index: -2;
  background: conic-gradient(from 0deg, var(--accent), var(--heart), var(--accent-text), var(--accent));
  opacity: .16;
  filter: blur(46px);
  animation: authSpin 14s linear infinite;
}

@keyframes authSpin { to { transform: rotate(360deg); } }

.gate-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(340px circle at var(--mx, 50%) var(--my, 10%), rgba(255,255,255,.10), transparent 62%);
  transition: opacity .3s ease;
}

.auth-mark {
  width: 40px;
  height: 40px;
  margin: 0 auto 18px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent), var(--heart));
}

.auth-mark span {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--ink);
  animation: authPulse 2.2s ease-in-out infinite;
}

@keyframes authPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(.68); opacity: .55; }
}

.auth-tabs {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  margin: 0 0 22px;
  border-radius: 12px;
  background: rgba(0,0,0,.35);
  border: 1px solid var(--line);
}

.auth-tab {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 9px 10px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  transition: color .25s ease;
}

.auth-tab.is-active { color: #050506; }

.auth-tab-indicator {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc(50% - 6px);
  border-radius: 9px;
  background: var(--ink);
  transition: transform .32s cubic-bezier(.2,.8,.2,1);
  z-index: 0;
}

.auth-tabs[data-mode="signup"] .auth-tab-indicator { transform: translateX(calc(100% + 4px)); }

.auth-heading { font-size: 25px; font-weight: 700; letter-spacing: -0.035em; margin: 0 0 4px; text-align: center; }
.auth-subtitle { color: var(--muted); font-size: 14px; line-height: 1.4; text-align: center; margin: 0 0 20px; }
.auth-form { padding: 0; gap: 6px; }
.auth-stack { display: grid; gap: 12px; }
.auth-resend { margin: 0; padding: 0 !important; display: block; }
.auth-resend .btn-quiet { width: 100%; }

.field { position: relative; margin: 0 0 14px; }

.field input {
  width: 100%;
  padding: 19px 14px 9px;
  border-radius: 14px;
  border: 1px solid transparent;
  background: rgba(0,0,0,.35);
  color: var(--ink);
  font: inherit;
  transition: border-color .2s ease, background .2s ease;
}

.field input:focus { outline: none; border-color: var(--accent); background: rgba(0,0,0,.45); }
.field input:-webkit-autofill { -webkit-text-fill-color: var(--ink); box-shadow: 0 0 0 1000px rgba(20,20,22,.9) inset; }

.field label {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  font-weight: 500;
  color: var(--label);
  pointer-events: none;
  transition: top .18s ease, font-size .18s ease, color .18s ease;
}

.field input:focus + label,
.field input:not(:placeholder-shown) + label,
.field input:-webkit-autofill + label {
  top: 11px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--accent-text);
}

.field.has-toggle input { padding-right: 44px; }

.field-toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.field-toggle svg { width: 18px; height: 18px; }
.field-toggle:hover { color: var(--ink); background: rgba(255,255,255,.08); }

.field-hint { margin: -8px 0 14px; padding: 0 2px; font-size: 12.5px; color: var(--danger); }

.pw-meter { margin: -4px 0 16px; }
.pw-meter-track { height: 4px; border-radius: 2px; background: rgba(255,255,255,.1); overflow: hidden; }
.pw-meter-fill { display: block; height: 100%; width: 0%; border-radius: 2px; background: var(--danger); transition: width .25s ease, background .25s ease; }
.pw-meter-label { margin: 6px 0 0; font-size: 12px; color: var(--label); }

.auth-submit { width: 100%; margin-top: 6px; display: block; text-align: center; text-decoration: none; }

.hero h1, .panel h1 { font-size: 28px; letter-spacing: -0.03em; }
.eyebrow { display: none; }
.panel { padding: 18px; }
.hint { font-size: 15px; }

/* --- FOOTER --- */
.site-footer {
  margin-top: auto;
  padding: 32px 20px 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 24px;
  color: var(--label);
  font-size: 13px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.site-footer a {
  color: var(--label);
  padding: 4px 2px;
  transition: color 0.15s ease;
  letter-spacing: 0.01em;
}

.site-footer a:hover { color: var(--ink); }

.footer-sep {
  width: 1px;
  height: 14px;
  background: rgba(255, 255, 255, 0.12);
  flex-shrink: 0;
}

.footer-group {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-email {
  font-family: ui-monospace, "SF Mono", "Menlo", monospace;
  font-size: 12px;
  letter-spacing: 0;
  color: var(--muted);
}

/* --- NOTIFICATIONS --- */
.nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--heart);
  color: white;
  font-size: 11px;
  font-weight: 700;
  margin-left: 6px;
  animation: badgePop 0.3s ease;
}

@keyframes badgePop {
  0% { transform: scale(0); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

.menu-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--heart);
  border: 2px solid rgba(12, 12, 14, 0.88);
  animation: dotPulse 2s ease-in-out infinite;
}

@keyframes dotPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.2); }
}

/* --- NEWS --- */
.news-item { position: relative; }
.news-date { font-size: 12px; color: var(--label); font-weight: 500; }

.latest-mark {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 6px;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 179, 0, 0.15));
  color: #ffd700;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: 1px solid rgba(255, 215, 0, 0.3);
  animation: latestGlow 3s ease-in-out infinite;
}

@keyframes latestGlow {
  0%, 100% { box-shadow: 0 0 8px rgba(255, 215, 0, 0.3); }
  50% { box-shadow: 0 0 16px rgba(255, 215, 0, 0.6); }
}

/* --- LANGUAGE SWITCHER --- */
.lang-pop { position: relative; }
.lang-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 220px;
  max-height: min(70vh, 420px);
  overflow-y: auto;
  padding: 8px;
  border-radius: 16px;
  background: rgba(16,16,18,0.94);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--line);
  box-shadow: 0 16px 40px rgba(0,0,0,.45);
  z-index: 60;
}
.lang-panel-title {
  margin: 2px 8px 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--label);
}
.lang-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 9px 10px;
  border-radius: 10px;
  font: inherit;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}
.lang-row:hover { background: rgba(255,255,255,0.07); }
.lang-row.is-active { background: rgba(255,255,255,0.1); }
.lang-code {
  width: 28px;
  flex: 0 0 28px;
  color: var(--label);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
}
.lang-name { min-width: 0; }

/* --- GOOGLE TRANSLATE HIDING --- */
.goog-te-banner-frame,
.skiptranslate,
.goog-te-gadget,
.goog-logo-link,
.goog-te-gadget-icon {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  width: 0 !important;
  overflow: hidden !important;
}

body {
  top: 0 !important;
  position: static !important;
}

.goog-tooltip,
.goog-tooltip:hover { display: none !important; }

.goog-text-highlight {
  background: none !important;
  box-shadow: none !important;
  outline: none !important;
}

#google_translate_element {
  position: absolute !important;
  left: -9999px !important;
  top: -9999px !important;
}

.notranslate,
.island-title,
.icon-btn,
.mine-mark,
.answer-hint,
.count,
.nav-badge {
  font-family: inherit;
}

/* --- PROFILE & SETTINGS --- */
.profile-head {
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
}

.profile-head h1,
.profile-title {
  font-size: 24px;
  margin: 12px 0 4px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  line-height: 1;
}
.profile-handle { line-height: 1; }

.profile-settings-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  transition: all 0.2s ease;
}

.profile-settings-btn:hover {
  background: rgba(255,255,255,0.1);
  color: var(--ink);
}

.profile-settings-btn svg {
  width: 18px;
  height: 18px;
}

/* --- ONBOARDING --- */
.onboarding-panel {
  max-width: 480px;
  margin: 40px auto;
  padding: 32px 28px;
}

.onboarding-header {
  text-align: center;
  margin-bottom: 28px;
}

.onboarding-icon {
  font-size: 48px;
  margin-bottom: 16px;
  animation: wave 2s ease-in-out infinite;
  display: inline-block;
}

@keyframes wave {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-15deg); }
  75% { transform: rotate(15deg); }
}

.onboarding-header h1 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 8px;
  color: var(--ink);
}

.onboarding-subtitle {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
  margin: 0;
}

.onboarding-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 0;
}

.onboarding-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0;
  margin: 0;
}

.onboarding-field .field-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.01em;
}

.onboarding-field .field-hint {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
  line-height: 1.4;
  min-height: 16px;
}
.onboarding-field .field-hint.is-ok { color: var(--good); }
.onboarding-field .field-hint.is-bad { color: var(--danger); }
button[data-save-btn]:disabled,
.onboarding-submit:disabled {
  opacity: 0.4;
  pointer-events: none;
}

.input-with-prefix {
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 12px;
  border: 1px solid transparent;
  transition: border-color 0.2s ease, background 0.2s ease;
  overflow: hidden;
}

.input-with-prefix:focus-within {
  border-color: var(--accent);
  background: rgba(0, 0, 0, 0.45);
}

.input-prefix {
  padding: 12px 0 12px 14px;
  color: var(--muted);
  font-size: 16px;
  font-weight: 500;
  user-select: none;
}

.input-with-prefix input {
  flex: 1;
  background: transparent;
  border: 0;
  padding: 12px 14px 12px 4px;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  border-radius: 0;
  outline: none;
  min-width: 0;
}

.input-with-prefix input:focus {
  outline: none;
  box-shadow: none;
}

.onboarding-field > input {
  width: 100%;
  border: 0;
  background: rgba(0, 0, 0, 0.35);
  color: var(--ink);
  font: inherit;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 16px;
  transition: border-color 0.2s ease, background 0.2s ease;
  border: 1px solid transparent;
}

.onboarding-field > input:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(0, 0, 0, 0.45);
}

.onboarding-submit {
  margin-top: 8px;
  width: 100%;
  padding: 14px 16px;
  font-size: 15px;
  font-weight: 600;
}

/* --- VERIFY CODE --- */
#verify-code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 22px;
  letter-spacing: 10px;
  text-align: center;
  font-weight: 700;
  padding: 20px 14px;
}

#verify-code::-webkit-outer-spin-button,
#verify-code::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* --- ADMIN PANEL --- */
body.is-admin {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 100vh;
  background: #0b0b0d;
  padding: 0;
}

.admin-side {
  border-right: 1px solid var(--line);
  padding: 22px 16px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  background: #08080a;
}

.admin-logo { color: var(--ink); font-weight: 650; letter-spacing: -0.03em; }
.admin-side nav { display: grid; gap: 4px; }
.admin-side nav a { color: var(--muted); padding: 8px 10px; border-radius: 8px; }
.admin-side nav a.is-active, .admin-side nav a:hover { color: var(--ink); background: rgba(255,255,255,.05); }
.admin-back { margin-top: auto; color: var(--label); font-size: 13px; }
.admin-main { padding: 28px; min-width: 0; }
.admin-title { font-size: 28px; margin: 0 0 20px; letter-spacing: -0.04em; }

.admin-card { background: rgba(255,255,255,.04); border: 1px solid var(--line); border-radius: 12px; padding: 18px; }
.admin-card h2 { margin: 0 0 14px; font-size: 15px; font-weight: 650; }
.admin-split { display: grid; grid-template-columns: 320px 1fr; gap: 16px; margin-top: 16px; }
.admin-card-wide { min-width: 0; }

.metric-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.metric { border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: rgba(255,255,255,.03); }
.metric-value { font-size: 26px; font-weight: 650; letter-spacing: -0.04em; }
.metric-label { color: var(--ink); font-size: 13px; margin-top: 4px; }
.metric-hint { color: var(--label); font-size: 12px; margin-top: 2px; }

.chart { width: 100%; height: 84px; fill: #cfcfd2; }

.top-list { margin: 0; padding-left: 18px; }
.top-list li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; }
.muted { color: var(--label); font-size: 13px; }

.table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th { text-align: left; color: var(--label); font-weight: 600; padding: 8px; border-bottom: 1px solid var(--line); }
.admin-table td { padding: 10px 8px; border-bottom: 1px solid rgba(255,255,255,.05); vertical-align: top; }

.admin-nav { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 18px; }
.admin-nav a { color: var(--muted); border: 1px solid var(--line); padding: 6px 12px; border-radius: 8px; font-size: 13px; }
.admin-nav a.is-active { color: var(--ink); border-color: var(--ink); }

.admin-list { list-style: none; margin: 0; padding: 0; }

.admin-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 14px 18px;
  border-top: 1px solid rgba(255,255,255,.06);
}

.admin-row form { padding: 0; margin: 0; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.admin-row button { background: transparent; color: var(--muted); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font: inherit; font-size: 12px; cursor: pointer; }
.admin-row button:hover { color: var(--ink); }
.admin-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.admin-actions a { color: var(--muted); font-size: 13px; }

a, .icon-btn, .more-sheet a, .filters a, .archive a {
  transition: color .15s ease, background .15s ease, border-color .15s ease, opacity .15s ease;
}

/* --- RESPONSIVE --- */
@media (max-width: 900px) {
  body.is-admin { grid-template-columns: 1fr; }
  .admin-side { flex-direction: row; flex-wrap: wrap; align-items: center; height: auto; }
  .admin-side nav { display: flex; flex-wrap: wrap; }
  .admin-back { margin-top: 0; }
  .admin-split { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  body { font-size: 16px; overflow-x: hidden; }
  .island-top { width: calc(100% - 16px); top: 8px; min-height: 44px; gap: 8px; padding: 6px 10px; }
  .island-name { display: none; }
  .island-side { max-width: 42vw; }
  .canvas { width: calc(100% - 20px); margin-top: 20px; }
  .form-row { flex-direction: column; align-items: stretch; }
  button[type="submit"]:not(.icon-btn) { width: 100%; }
  .vote button[type="submit"] { width: auto !important; }
  .boot-actions { flex-direction: column; }
  .btn-main, .btn-quiet { width: 100%; min-height: 48px; }
  .more-sheet, .lang-panel { right: -4px; width: min(220px, calc(100vw - 24px)); }
  #verify-code { font-size: 20px; letter-spacing: 8px; }
  .auth-stack { gap: 14px; margin-top: 4px; }
  .hero-card { padding: 18px; }
  .answer { padding: 14px 16px; }

  .site-footer {
    padding: 16px 16px max(18px, env(safe-area-inset-bottom));
    gap: 6px 12px;
    justify-content: center;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    font-size: 12px;
  }

  .footer-group {
    gap: 10px 12px;
    width: auto;
    justify-content: center;
  }

  .footer-sep { display: none; }
  .footer-email { font-size: 11px; }

  .auth-stage { padding: 20px 14px 28px; }
  .gate-card { padding: 26px 20px 22px; border-radius: 20px; }
  .auth-heading { font-size: 23px; }

  .answer-form textarea { min-height: 120px; font-size: 16px; }
  .answer-hint { font-size: 12px; }
  .answer-error { font-size: 13px; padding: 8px 12px; }

  .answer .text,
  .archive .q {
    font-size: 15px;
    line-height: 1.5;
  }
  
  .onboarding-panel {
    margin: 24px auto;
    padding: 24px 20px;
  }
  
  .onboarding-header h1 {
    font-size: 24px;
  }
  
  .onboarding-icon {
    font-size: 40px;
  }
}

@media (max-width: 400px) {
  .island-id { max-width: 28vw; }
  .hero-card, .group, .archive a { border-radius: 20px; }
  .answer-form textarea { min-height: 100px; padding: 10px 12px; }
  .answer-hint { font-size: 11px; }
  .form-row { flex-direction: column; align-items: stretch; }
  .counter { justify-content: flex-end; }
  .answer-form button[type="submit"] { width: 100%; }
}

@media (max-width: 360px) {
  .island-top { padding: 6px 10px; gap: 10px; }
  .island-side { max-width: 30vw; gap: 6px; padding: 2px 4px 2px 2px; }
  .island-handle { display: none; }
  .large-title { font-size: 27px; }
  .gate-card { padding: 22px 16px 18px; }
  .auth-mark { margin-bottom: 14px; }
}

@media (min-width: 900px) {
  .canvas { width: min(720px, calc(100% - 32px)); }
}

@media (orientation: landscape) and (max-height: 480px) {
  .boot { padding: 18px 20px 24px; align-items: center; }
  .auth-stage { padding: 16px 20px 20px; }
  #typewriter { font-size: clamp(26px, 6vw, 36px); }
}

@supports (padding: max(0px)) {
  .island-top { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
  .site-footer { padding-left: max(20px, env(safe-area-inset-left)); padding-right: max(20px, env(safe-area-inset-right)); padding-bottom: max(28px, env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .gate-card::before { animation: none; }
  #typewriter.is-caret::after { animation: none; opacity: 1; }
}