/* ===================================================================
   Spin the Wheel — Tomato Hero (single theme, light only)
   Zero dependencies. Pure CSS.
   =================================================================== */

:root {
  --bg:           #faf6f1;
  --bg-2:         #f3eee5;
  --surface:      #ffffff;
  --surface-2:    #faf6ed;
  --surface-3:    #eee7d8;
  --border:       #e8dfcc;
  --border-soft:  #f0e9da;
  --text:         #1f1a14;
  --text-2:       #5c5547;
  --text-3:       #6e6557;
  --text-faint:   #b5ac9b;

  --accent:       #e85f4d;
  --accent-2:     #d44a39;
  --accent-soft:  rgba(232, 95, 77, 0.10);
  --accent-glow:  rgba(232, 95, 77, 0.30);

  --tomato-from:  #ff6b4a;
  --tomato-to:    #e85f4d;

  --success:      #3a9d6f;
  --warn:         #d97706;

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 20px;
  --r-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.06);
  --shadow-lg: 0 24px 48px rgba(0,0,0,0.12);

  --font-ui: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI",
             "PingFang TC", "PingFang SC", "Hiragino Sans", "Noto Sans CJK",
             sans-serif;
  --font-display: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;

  --transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
html, body {
  font-family: var(--font-ui);
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(255, 235, 220, 0.55) 0%, transparent 70%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
}
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font-family: inherit; color: inherit; }
textarea { resize: vertical; }
a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-2); }
ul, ol { list-style: none; }
kbd { font-family: var(--font-display); font-size: 0.85em; background: var(--surface-3); padding: 1px 6px; border-radius: 4px; border: 1px solid var(--border); }
code { font-family: SF Mono, Menlo, monospace; background: var(--surface-2); padding: 1px 6px; border-radius: 4px; font-size: 0.9em; }
[hidden] { display: none !important; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--accent); color: #fff;
  padding: 10px 16px; font-weight: 600;
  border-radius: 0 0 var(--r-sm) 0;
  z-index: 1000;
}
.skip-link:focus { left: 0; }

.app {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(12px, 3vw, 24px) clamp(12px, 3vw, 24px) 80px;
}

/* ============ Top bar ============ */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 4px 28px;
}
.brand {
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
  color: var(--text-2);
}
.brand:hover { color: var(--accent); }

.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-3);
  padding: 6px 10px;
  border-radius: var(--r-sm);
  white-space: nowrap;
  transition: background var(--transition), color var(--transition);
}
.nav-link:hover { color: var(--accent); background: var(--surface-2); }
@media (max-width: 380px) {
  .nav-link { font-size: 12px; padding: 4px 8px; }
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: var(--r-sm);
  color: var(--text-2);
  transition: background var(--transition), color var(--transition), transform 80ms ease-out;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn:active { transform: scale(0.95); }
.icon-btn svg { width: 18px; height: 18px; }

.lang-switcher {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 6px 28px 6px 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 12 12' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3 5l3 3 3-3' stroke='%237a7973' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 12px;
  transition: border-color var(--transition);
}
.lang-switcher:hover { border-color: var(--text-3); }
.lang-switcher:focus { outline: none; border-color: var(--accent); }

/* ============ Page title ============ */
.page-title {
  font-size: clamp(28px, 5vw, 40px);
  font-weight: 700;
  letter-spacing: -0.025em;
  text-align: center;
  margin-bottom: 6px;
}
.page-sub {
  text-align: center;
  font-size: 14px;
  color: var(--text-3);
  margin-bottom: 36px;
}

/* ============ Workspace ============ */
.workspace {
  display: grid;
  grid-template-columns: 1.4fr 0.6fr;
  gap: 28px;
  align-items: start;
  margin-bottom: 56px;
}
@media (max-width: 900px) {
  .workspace { grid-template-columns: 1fr; gap: 20px; }
}

/* ============ Wheel area ============ */
.wheel-area {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.wheel-stage {
  position: relative;
  width: 100%;
  max-width: 600px;
  aspect-ratio: 1;
  margin: 0 auto;
}
#wheel-canvas {
  display: block;
  width: 100%;
  height: 100%;
  /* Two-layer drop shadow: warm tomato glow + crisp dark for depth */
  filter:
    drop-shadow(0 18px 40px rgba(232, 95, 77, 0.22))
    drop-shadow(0 4px 12px rgba(0, 0, 0, 0.12));
}
/* Pointer at top */
.wheel-pointer {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%) rotate(180deg);
  width: 40px;
  height: 48px;
  pointer-events: none;
  /* Layered shadow for crisp 3D float */
  filter:
    drop-shadow(0 1px 2px rgba(0, 0, 0, 0.25))
    drop-shadow(0 6px 12px rgba(188, 64, 48, 0.30));
  z-index: 2;
}
.wheel-pointer svg { width: 100%; height: 100%; display: block; }
/* SPIN button — central hub */
.wheel-spin-hub {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: clamp(80px, 18%, 110px);
  height: clamp(80px, 18%, 110px);
  border-radius: 50%;
  background: linear-gradient(155deg, var(--tomato-from) 0%, var(--tomato-to) 100%);
  color: #fff;
  font-weight: 800;
  font-size: clamp(15px, 2.5vw, 19px);
  letter-spacing: 0.12em;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.3),
    inset 0 -2px 4px rgba(0,0,0,0.15),
    0 6px 16px rgba(232, 95, 77, 0.35),
    0 0 0 4px #fff,
    0 0 0 5px rgba(232, 95, 77, 0.2);
  cursor: pointer;
  transition: transform 100ms ease-out, box-shadow 100ms ease-out;
  z-index: 3;
  display: flex; align-items: center; justify-content: center;
}
.wheel-spin-hub:hover {
  transform: translate(-50%, -50%) scale(1.05);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.3),
    inset 0 -2px 4px rgba(0,0,0,0.15),
    0 8px 20px rgba(232, 95, 77, 0.45),
    0 0 0 4px #fff,
    0 0 0 5px rgba(232, 95, 77, 0.3);
}
.wheel-spin-hub:active { transform: translate(-50%, -50%) scale(0.97); }
.wheel-spin-hub:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: translate(-50%, -50%);
}
.hub-text { user-select: none; }

/* Screen-reader-only — visually hidden but readable by assistive tech */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ============ Names panel ============ */
.names-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 22px;
  box-shadow:
    0 1px 2px rgba(0,0,0,0.02),
    0 4px 16px rgba(60, 40, 20, 0.06);
}
.names-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.names-title {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.names-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 22px;
  padding: 0 8px;
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.btn-text-mini {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-3);
  padding: 4px 8px;
  border-radius: 6px;
  transition: background var(--transition), color var(--transition);
}
.btn-text-mini:hover { background: var(--surface-2); color: var(--accent); }

.names-input {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  transition: border-color var(--transition);
  min-height: 160px;
}
.names-input::placeholder { color: var(--text-faint); }
.names-input:focus { outline: none; border-color: var(--accent); }

.names-meta {
  margin-top: 8px;
  font-size: 11px;
  color: var(--text-3);
  line-height: 1.5;
}
.names-meta code { font-size: 11px; padding: 0 4px; }

.quick-controls {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-soft);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toggle-row, .quick-controls .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-2);
  gap: 8px;
}
.toggle-row input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 36px; height: 20px;
  background: var(--border);
  border-radius: 999px;
  position: relative;
  cursor: pointer;
  transition: background var(--transition);
}
.toggle-row input[type="checkbox"]::before {
  content: "";
  position: absolute;
  top: 2px; left: 2px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: transform var(--transition);
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
.toggle-row input[type="checkbox"]:checked { background: var(--accent); }
.toggle-row input[type="checkbox"]:checked::before { transform: translateX(16px); }

.quick-controls input[type="number"] {
  width: 64px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 4px 8px;
  font-size: 13px;
}
.quick-controls input[type="number"]:focus { outline: none; border-color: var(--accent); }

/* ============ Modals ============ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: modal-fade 240ms ease-out;
}
@keyframes modal-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.modal-content {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  max-width: 540px;
  width: 100%;
  max-height: 85vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  animation: modal-slide 280ms cubic-bezier(0.32, 0.72, 0, 1);
}
.modal-content-narrow { max-width: 420px; }
@keyframes modal-slide {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-soft);
}
.modal-header h2 { font-size: 18px; font-weight: 600; }
.modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 24px 24px;
}

/* ============ Winner modal (override) ============ */
.modal-winner .modal-backdrop {
  background: rgba(20, 14, 8, 0.55);
}
.winner-content {
  position: relative;
  background: linear-gradient(155deg, var(--tomato-from) 0%, var(--tomato-to) 100%);
  border-radius: 28px;
  padding: 56px clamp(28px, 5vw, 48px);
  text-align: center;
  color: #fff;
  max-width: 540px;
  width: 100%;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.18),
    0 24px 48px rgba(232, 95, 77, 0.35);
  z-index: 1;
  animation: winner-pop 380ms cubic-bezier(0.32, 0.72, 0, 1);
}
@keyframes winner-pop {
  from { opacity: 0; transform: scale(0.85); }
  to { opacity: 1; transform: scale(1); }
}
.confetti-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}
.winner-eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.85);
  margin-bottom: 12px;
}
.winner-name {
  font-size: clamp(48px, 10vw, 96px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.05;
  text-shadow: 0 4px 16px rgba(0,0,0,0.12);
  margin-bottom: 8px;
  word-break: break-word;
}
.winner-actions {
  display: flex;
  justify-content: center;
  margin-top: 28px;
}
.winner-actions .btn-primary {
  background: #ffffff;
  color: var(--tomato-to);
  font-weight: 700;
  padding: 12px 24px;
  border-radius: var(--r-pill);
  font-size: 14px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.10), inset 0 1px 0 rgba(255,255,255,0.5);
  transition: transform 80ms ease-out;
}
.winner-actions .btn-primary:hover {
  transform: translateY(-2px);
  background: #fff;
  color: var(--tomato-to);
}
.winner-actions .btn-secondary {
  background: rgba(255,255,255,0.18);
  color: #fff;
  font-weight: 600;
  padding: 12px 18px;
  border-radius: var(--r-pill);
  font-size: 14px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background var(--transition);
}
.winner-actions .btn-secondary:hover { background: rgba(255,255,255,0.28); }

/* Winner modal: secondary actions are tertiary text links below the primary button */
.winner-secondary-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
  margin-top: 18px;
}
.winner-secondary-actions .btn-link {
  background: none;
  border: none;
  padding: 4px 6px;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.78);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(255, 255, 255, 0.35);
  transition: color 120ms, text-decoration-color 120ms;
}
.winner-secondary-actions .btn-link:hover {
  color: #fff;
  text-decoration-color: rgba(255, 255, 255, 0.8);
}
.winner-secondary-actions .btn-link[hidden] { display: none; }

/* ============ Settings / Stats common ============ */
.settings-group {
  border: none;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-soft);
}
.settings-group:last-child { border-bottom: none; }
.settings-group legend {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--text-3);
  padding-bottom: 8px;
}
.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  font-size: 14px;
}
.setting-row > span { color: var(--text); flex: 1; }
.setting-row input[type="number"], .setting-row select {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 6px 10px;
  font-size: 13px;
  color: var(--text);
  width: 110px;
}
.setting-row input[type="range"] { flex: 0 0 140px; accent-color: var(--accent); }

.setting-toggle-row input[type="checkbox"] {
  appearance: none; -webkit-appearance: none;
  width: 36px; height: 20px;
  background: var(--border);
  border-radius: 999px;
  position: relative;
  cursor: pointer;
  transition: background var(--transition);
}
.setting-toggle-row input[type="checkbox"]::before {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 16px; height: 16px; border-radius: 50%;
  background: #fff; transition: transform var(--transition);
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
.setting-toggle-row input[type="checkbox"]:checked { background: var(--accent); }
.setting-toggle-row input[type="checkbox"]:checked::before { transform: translateX(16px); }

.settings-note { font-size: 12px; color: var(--text-3); padding: 6px 0 10px; line-height: 1.5; }
.data-actions { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 4px; }
.btn-text {
  background: var(--surface-2);
  color: var(--text);
  padding: 8px 14px;
  border-radius: var(--r-sm);
  font-size: 13px;
  font-weight: 500;
  transition: background var(--transition);
}
.btn-text:hover { background: var(--surface-3); }
.btn-text-danger { color: #d44a39; }
.btn-text-danger:hover { background: rgba(212, 74, 57, 0.1); }

/* ============ Stats modal specific ============ */
.stats-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}
.stats-tile {
  background: var(--surface-2);
  border-radius: var(--r-md);
  padding: 14px 16px;
  text-align: center;
}
.stats-num {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.1;
}
.stats-label {
  font-size: 11px;
  color: var(--text-3);
  margin-top: 4px;
  font-weight: 500;
}
.modal-body h3 {
  font-size: 13px;
  font-weight: 600;
  margin: 16px 0 10px;
  color: var(--text-2);
}
.stats-bars {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}
.stat-bar-row {
  display: grid;
  grid-template-columns: 1fr 60px 36px;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}
.stat-bar-name {
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.stat-bar-track {
  background: var(--surface-2);
  border-radius: 4px;
  height: 8px;
  overflow: hidden;
}
.stat-bar-fill {
  background: linear-gradient(90deg, var(--tomato-from), var(--tomato-to));
  height: 100%;
  transition: width var(--transition-slow);
}
.stat-bar-count { font-variant-numeric: tabular-nums; color: var(--text-2); text-align: right; }
.stats-note { font-size: 12px; color: var(--text-3); line-height: 1.6; padding-top: 6px; }

/* ============ Share modal ============ */
.share-link-row {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.share-link {
  flex: 1;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 10px 12px;
  font-size: 13px;
  font-family: SF Mono, Menlo, monospace;
  color: var(--text-2);
  user-select: all;
}
.share-link:focus { outline: none; border-color: var(--accent); }
.btn-primary {
  background: var(--accent);
  color: #fff;
  padding: 10px 18px;
  border-radius: var(--r-sm);
  font-weight: 600;
  font-size: 13px;
  transition: background var(--transition), transform 80ms ease-out;
}
.btn-primary:hover { background: var(--accent-2); }
.btn-primary:active { transform: scale(0.97); }
.share-status {
  margin-top: 12px;
  font-size: 12px;
  color: var(--success);
  min-height: 16px;
  font-weight: 500;
}

/* ============ Info section ============ */
.info {
  max-width: 760px;
  margin: 0 auto;
  padding: 24px 0;
  color: var(--text-2);
  line-height: 1.7;
}
.info h2 {
  font-size: clamp(20px, 4vw, 24px);
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
  margin: 32px 0 10px;
}
.info h2:first-child { margin-top: 0; }
.info p { margin-bottom: 12px; font-size: 15px; }
.info ol { padding-left: 0; counter-reset: step; }
.info ol li {
  padding: 6px 0 6px 32px;
  position: relative;
  font-size: 15px;
}
.info ol li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0; top: 8px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  line-height: 22px;
}
.info ul.bullet { padding-left: 16px; margin-bottom: 14px; }
.info ul.bullet li { list-style: disc; padding-left: 4px; margin-bottom: 6px; font-size: 15px; }
.info code { font-size: 0.9em; }
.info em { color: var(--accent); font-style: italic; }
.info strong { color: var(--text); font-weight: 600; }

.preset-grid, .usecase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
}
.preset-grid a, .usecase-grid a {
  display: block;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  transition: border-color var(--transition), transform var(--transition);
}
.preset-grid a:hover, .usecase-grid a:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
  color: var(--text);
}

.guide-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.guide-list a {
  display: block;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  transition: background var(--transition);
}
.guide-list a:hover { background: var(--surface-2); color: var(--accent); }

/* ============ Footer ============ */
.site-footer {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--border-soft);
  text-align: center;
  font-size: 13px;
  color: var(--text-3);
}
.site-footer-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 6px;
}
.site-footer a { color: var(--text-2); }
.site-footer a:hover { color: var(--accent); }
.site-footer .sub {
  font-size: 11px;
  color: var(--text-faint);
}

/* ============ Responsive ============ */
@media (max-width: 600px) {
  .app { padding: 8px 12px 60px; }
  .topbar { padding: 4px 0 20px; }
  .icon-btn { width: 32px; height: 32px; }
  .icon-btn svg { width: 16px; height: 16px; }
  .lang-switcher { padding: 4px 22px 4px 8px; font-size: 12px; }
  .names-panel { padding: 16px; }
  .info { padding: 16px 4px; }
  .preset-grid, .usecase-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}
/* Phone width — hide "All tools" nav-link (brand still clickable to /) */
@media (max-width: 420px) {
  .topbar-right .nav-link { display: none; }
  .topbar-right { gap: 6px; }
  /* Cap the lang-switcher so the long localized labels truncate gracefully */
  .lang-switcher { max-width: 130px; text-overflow: ellipsis; }
}

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

/* ============ Focus visible ============ */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}
button:focus:not(:focus-visible),
select:focus:not(:focus-visible),
input:focus:not(:focus-visible),
textarea:focus:not(:focus-visible) { outline: none; }
