@font-face {
  font-family: "Geist";
  src: url("fonts/geist.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Geist";
  src: url("fonts/geist-italic.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Vazirmatn";
  src: url("fonts/vazirmatn.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

/* Lapis blue on cool greys. One accent; corner rule: controls 12px, panels 16px, chips full pill. */
:root {
  --bg: #eef1f5;
  --surface: #fbfcfd;
  --surface-2: #f3f5f8;
  --ink: #131a26;
  --muted: #586274;
  --line: #dce1e8;
  --accent: #2448a8;
  --accent-ink: #ffffff;
  --accent-soft: rgb(36 72 168 / 0.09);
  --danger: #b42318;
  --scroll-thumb: #c3cad5;
  --scroll-thumb-hover: #97a1b1;
  --shadow: 0 1px 2px rgb(19 26 38 / 0.06), 0 8px 24px rgb(19 26 38 / 0.06);
  --radius-control: 12px;
  --radius-panel: 16px;
  --font: "Geist", ui-sans-serif, system-ui, sans-serif;
  --font-fa: "Vazirmatn", "Geist", system-ui, sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c1119;
    --surface: #121925;
    --surface-2: #182131;
    --ink: #e6ebf2;
    --muted: #96a2b6;
    --line: #243146;
    --accent: #85a1ff;
    --accent-ink: #0c1119;
    --accent-soft: rgb(133 161 255 / 0.12);
    --danger: #ff8a80;
    --scroll-thumb: #2c3a52;
    --scroll-thumb-hover: #46587a;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 8px 24px rgb(0 0 0 / 0.25);
  }
}

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

html, body { height: 100%; }
html { overflow-x: clip; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Thin, rounded scrollbars in the same cool greys, with no track or arrows. */
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: transparent; margin: 12px; } /* clear of rounded corners */
::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  border-radius: 999px;
  background: var(--scroll-thumb) padding-box;
}
::-webkit-scrollbar-thumb:hover { background: var(--scroll-thumb-hover) padding-box; }
::-webkit-scrollbar-button, ::-webkit-scrollbar-corner { display: none; }

/* Firefox has no ::-webkit-scrollbar; it gets the standard properties. */
@supports not selector(::-webkit-scrollbar) {
  * {
    scrollbar-width: thin;
    scrollbar-color: var(--scroll-thumb) transparent;
  }
}

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.icon { width: 20px; height: 20px; fill: currentColor; flex: none; }

[lang="fa"] { font-family: var(--font-fa); }

/* ---------- Layout ---------- */

.app {
  min-height: 100dvh;
  max-width: 1200px;
  margin: 0 auto;
}

.list-pane {
  display: flex;
  flex-direction: column;
  padding: max(16px, env(safe-area-inset-top)) 16px 32px;
}

.detail-pane {
  position: fixed;
  inset: 0;
  z-index: 10;
  overflow-y: auto;
  background: var(--surface);
  padding: max(12px, env(safe-area-inset-top)) 16px 48px;
  transform: translateX(100%);
  visibility: hidden;
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), visibility 0s linear 0.32s;
}
.detail-pane:focus { outline: none; }
.app.has-selection .detail-pane {
  transform: none;
  visibility: visible;
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}
.detail-empty { display: none; }

@media (min-width: 900px) {
  .app {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 24px;
    padding: 24px;
    height: 100dvh;
  }
  .list-pane {
    padding: 0;
    min-height: 0;
  }
  .list-pane .word-list:empty { flex: none; }
  .list-pane .word-list { overflow-y: auto; min-height: 0; flex: 1; scrollbar-gutter: stable; margin-right: -16px; padding-right: 4px; }
  .detail-pane, .app.has-selection .detail-pane {
    position: static;
    transform: none;
    visibility: visible;
    transition: none;
    border: 1px solid var(--line);
    border-radius: var(--radius-panel);
    box-shadow: var(--shadow);
    padding: 40px 48px 56px;
  }
  .detail-empty {
    display: grid;
    place-items: center;
    align-content: center;
    gap: 8px;
    height: 100%;
    color: var(--muted);
  }
  .detail-empty .icon { width: 40px; height: 40px; }
  .entry .back { display: none; }
}

/* ---------- Brand ---------- */

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}
.mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-ink);
  font: 700 22px/1 var(--font-fa);
  padding-bottom: 10px;
}
.brand-name { font-weight: 650; font-size: 20px; letter-spacing: -0.01em; }
.count { margin-left: auto; color: var(--muted); font-size: 14px; }

/* ---------- Composer ---------- */

.composer {
  display: flex;
  gap: 8px;
}
.field {
  position: relative;
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  transition: border-color 0.15s;
}
.field:focus-within { border-color: var(--accent); }
.field-icon { position: absolute; left: 14px; color: var(--muted); pointer-events: none; }
.field input {
  flex: 1;
  min-width: 0;
  height: 48px;
  padding: 0 4px 0 44px;
  border: 0;
  background: transparent;
  font-size: 17px;
}
.field input:focus { outline: none; }
.field input::placeholder { color: var(--muted); opacity: 1; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 48px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--radius-control);
  font-weight: 550;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.1s, background-color 0.15s, opacity 0.15s;
}
.btn:active:not(:disabled) { transform: scale(0.98); }
.btn:disabled { opacity: 0.55; cursor: progress; }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.quiet {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}
.btn.danger { background: transparent; border-color: var(--line); color: var(--danger); }

.icon-btn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-right: 2px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  transition: background-color 0.15s, color 0.15s;
}
.icon-btn:hover { background: var(--accent-soft); color: var(--accent); }

.mic.listening {
  background: var(--accent);
  color: var(--accent-ink);
}
@media (prefers-reduced-motion: no-preference) {
  .mic.listening { animation: listening 1.4s ease-in-out infinite; }
}
@keyframes listening {
  0%, 100% { box-shadow: 0 0 0 0 var(--accent-soft); }
  50% { box-shadow: 0 0 0 8px var(--accent-soft); }
}

.status {
  min-height: 1.5em;
  margin: 8px 2px 4px;
  font-size: 14px;
  color: var(--muted);
}
.status.error { color: var(--danger); }
.link-btn {
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ---------- Word list ---------- */

.word-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.word-list li + li { border-top: 1px solid var(--line); }

.word-row {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  column-gap: 12px;
  width: 100%;
  padding: 14px 12px;
  border: 0;
  border-radius: var(--radius-control);
  background: transparent;
  text-align: left;
  text-decoration: none;
  color: inherit;
}
.word-row:hover { background: var(--surface-2); }
.word-row[aria-current="true"] { background: var(--accent-soft); }
.word-row .w { font-weight: 600; font-size: 17px; }
.word-row .pos { color: var(--muted); font-size: 13px; margin-left: 6px; font-weight: 400; }
.word-row .fa {
  justify-self: end;
  overflow: hidden;
  max-width: 100%;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--muted);
  font-size: 15px;
}

.word-row.pending { color: var(--muted); cursor: progress; }
.skeleton {
  justify-self: end;
  width: 72px;
  height: 12px;
  border-radius: 999px;
  background: var(--line);
}
@media (prefers-reduced-motion: no-preference) {
  .skeleton { animation: shimmer 1.2s ease-in-out infinite; }
}
@keyframes shimmer { 50% { opacity: 0.4; } }

/* ---------- Groups ---------- */

.word-row, .group-head {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

.group-head {
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 52px;
  padding-right: 4px;
  border-radius: var(--radius-control);
  transition: background-color 0.15s;
}
.group-head:hover { background: var(--surface-2); }

.group-toggle {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  align-self: stretch;
  padding: 0 4px 0 8px;
  border: 0;
  border-radius: var(--radius-control);
  background: transparent;
  text-align: left;
}
.group-toggle > .icon:first-child {
  width: 14px;
  height: 14px;
  color: var(--muted);
  transform: rotate(90deg);
  transition: transform 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}
.group.collapsed .group-toggle > .icon:first-child { transform: none; }
.group-toggle > .icon:nth-child(2), .group-rename > .icon { color: var(--accent); }
.group-name {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-weight: 600;
  font-size: 17px;
}

.group-count {
  min-width: 24px;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  text-align: center;
}
.group-menu { width: 36px; height: 36px; margin: 0; }
@media (hover: hover) {
  .group-menu { opacity: 0; }
  .group-head:hover .group-menu, .group-menu:focus-visible, .group-menu[aria-expanded="true"] { opacity: 1; }
}

/* Opening and closing slides the contents rather than snapping. */
.group-body {
  display: grid;
  grid-template-rows: 1fr;
  transition: grid-template-rows 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}
.group.collapsed > .group-body { grid-template-rows: 0fr; }
.group-children {
  min-height: 0;
  overflow: hidden;
  list-style: none;
  margin: 0 0 0 19px;
  padding: 0 0 0 10px;
  border-left: 1.5px solid var(--line);
}
.group.collapsed > .group-body > .group-children { visibility: hidden; transition: visibility 0s 0.28s; }

.group-rename {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  padding-left: 30px;
}
.group-rename input {
  flex: 1;
  min-width: 0;
  height: 40px;
  margin-left: 4px;
  padding: 0 10px;
  border: 1px solid var(--accent);
  border-radius: 10px;
  background: var(--surface);
  font-size: 16px;
  font-weight: 600;
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.group-rename input:focus { outline: none; }
.group-rename input::placeholder { color: var(--muted); font-weight: 400; }
.group-rename .icon-btn { width: 40px; height: 40px; margin: 0; }

.list-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-control);
  color: var(--muted);
  font-size: 14px;
}
.word-list li.list-hint { border-top: 1px dashed var(--line); }

/* ---------- Dragging ---------- */

html.dragging, html.dragging * { cursor: grabbing !important; }
html.dragging .word-row:hover, html.dragging .group-head:hover { background: transparent; }

/* A held finger shrinks the row a little, so it's clear something is about to happen. */
.pressing > .word-row, .pressing > .group-head {
  transform: scale(0.97);
  background: var(--surface-2);
  transition: transform 0.36s ease-out, background-color 0.36s;
}

.drag-source > .word-row, .drag-source > .group-head, .drag-source > .group-body { opacity: 0.35; }

.drag-ghost {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  pointer-events: none;
  will-change: transform;
}
.drag-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--surface);
  box-shadow: 0 2px 4px rgb(19 26 38 / 0.08), 0 16px 40px rgb(19 26 38 / 0.18);
  transform: rotate(-1.5deg) scale(1.03);
  transition: opacity 0.15s, transform 0.15s;
}
.drag-card .w { font-weight: 600; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.drag-card .fa { margin-left: auto; color: var(--muted); white-space: nowrap; }
.drag-card .group-count { margin-left: auto; }
.drag-card > .icon { color: var(--accent); }
.drag-ghost.can-drop .drag-card { border-color: var(--accent); }
.drag-ghost.dropped .drag-card { opacity: 0; transform: scale(0.9); }
.drag-ghost.returning .drag-card { opacity: 0; transform: scale(0.96); }

.drag-label {
  width: max-content;
  max-width: 100%;
  margin: 0 0 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  box-shadow: var(--shadow);
}
.drag-label[hidden] { display: block; visibility: hidden; }

/* Where the drop will land */
.drop-combine > .word-row {
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 2px var(--accent);
}
.group.drop-into {
  border-radius: var(--radius-control);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 2px var(--accent);
}
.group.drop-into > .group-head:hover { background: transparent; }
.word-list.drop-root {
  border-radius: var(--radius-control);
  box-shadow: inset 0 0 0 2px var(--accent);
  background: var(--accent-soft);
}

.composer-wrap { position: relative; }
.drop-top {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 2px dashed var(--accent);
  border-radius: var(--radius-control);
  background: var(--surface);
  color: var(--accent);
  font-weight: 600;
}
html.dragging-nested .drop-top { display: flex; }
.drop-top.drop-root { background: var(--accent); color: var(--accent-ink); border-style: solid; }

/* A word or group that just moved shows where it went. */
.landed > .word-row, .landed > .group-head { animation: landed 1.4s ease-out; }
@keyframes landed {
  0%, 30% { background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent); }
  100% { background: transparent; box-shadow: inset 0 0 0 2px transparent; }
}

/* ---------- Group menu ---------- */

.menu {
  position: fixed;
  z-index: 50;
  min-width: 220px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.menu button {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  padding: 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  text-align: left;
  font-weight: 500;
}
.menu button:hover, .menu button:focus-visible { background: var(--surface-2); outline: none; }
.menu .icon { color: var(--muted); margin-top: 1px; }
.menu small { display: block; color: var(--muted); font-size: 13px; font-weight: 400; }

.empty {
  margin-top: 32px;
  padding: 0 4px;
  color: var(--muted);
}
.empty h2 {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
}
.empty p { margin: 0; max-width: 40ch; }

/* ---------- Entry detail ---------- */

.entry { max-width: 680px; }

.back { margin: 0 0 12px -10px; }

.entry-head { margin-bottom: 28px; }
.headword {
  margin: 0;
  font-size: clamp(36px, 8vw, 52px);
  font-weight: 650;
  line-height: 1.1;
  letter-spacing: -0.025em;
  overflow-wrap: anywhere;
}
.pron {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  color: var(--muted);
}
.pron .icon-btn { margin-left: -8px; }

.no-persian {
  margin: -12px 0 24px;
  color: var(--muted);
}

.pos-group + .pos-group { margin-top: 32px; }
.pos-group h2 {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 600;
  font-style: italic;
  color: var(--accent);
}

.senses {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: sense;
}
.sense {
  counter-increment: sense;
  position: relative;
  padding-left: 32px;
  padding-right: 44px;
}
.sense + .sense { margin-top: 24px; }
.sense::before {
  content: counter(sense);
  position: absolute;
  left: 0;
  top: 6px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.meaning {
  margin: 0 0 6px;
  text-align: left;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.6;
  color: var(--ink);
}
.definition { margin: 0 0 8px; }

.sense-edit {
  position: absolute;
  top: -2px;
  right: -10px;
}

.add-fa {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  margin: 0 0 8px;
  padding: 0 14px 0 10px;
  border: 1px dashed var(--accent);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 14px;
  font-weight: 550;
}
.add-fa .icon { width: 16px; height: 16px; }

.add-sense { margin-top: 28px; }

/* ---------- Editing a meaning ---------- */

.sense.editing { padding: 0; }
.sense.editing::before { display: none; }
.new-sense { margin-top: 32px; }

.sense-form {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--surface-2);
}
.sense-form label {
  display: grid;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
}
.sense-form .hint { color: var(--muted); font-weight: 400; }
.sense-form .field input {
  height: 48px;
  padding: 0 14px;
  font: 500 18px var(--font-fa);
}
.input {
  width: 100%;
  min-height: 48px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--surface);
  font-size: 16px;
  font-weight: 400;
  transition: border-color 0.15s;
}
.input:focus { outline: none; border-color: var(--accent); }
textarea.input { resize: vertical; line-height: 1.5; }
.form-error { margin: 0; color: var(--danger); font-size: 14px; }
.form-error:empty { display: none; }
.sense-form .actions { display: flex; flex-wrap: wrap; gap: 8px; }
.sense-form .actions .danger { margin-left: auto; }
.example {
  margin: 0;
  padding-left: 12px;
  border-left: 2px solid var(--line);
  color: var(--muted);
  font-style: italic;
  line-height: 1.6;
}

.mine {
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.mine h2 { margin: 0 0 12px; font-size: 18px; font-weight: 600; }
.mine-list { list-style: none; margin: 0 0 16px; padding: 0; }
.mine-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 0;
}
.mine-list li + li { border-top: 1px solid var(--line); }
.mine-list p { flex: 1; margin: 0; padding-top: 10px; line-height: 1.6; }
.mine-list .icon-btn { flex: none; }
.mine-empty { margin: 0 0 16px; color: var(--muted); }

.sentence-form label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 500;
}
.sentence-form .row { display: flex; gap: 8px; }
.sentence-form .field input { padding-left: 14px; }

.entry-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 48px;
}
.group-picker {
  position: relative;
  flex: 1 1 220px;
  max-width: 320px;
  display: flex;
  align-items: center;
}
.group-picker .icon { position: absolute; left: 14px; color: var(--accent); pointer-events: none; }
.group-picker select { padding-left: 42px; }

@media (max-width: 600px) {
  .sentence-form .row { flex-direction: column; }
}

/* ---------- Password dialog ---------- */

.password {
  width: min(380px, calc(100% - 32px));
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
}
.password::backdrop { background: rgb(12 17 25 / 0.5); }
.password h2 { margin: 0 0 4px; font-size: 20px; }
.password p { margin: 0 0 20px; color: var(--muted); }
.password label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 500; }
.password input {
  width: 100%;
  height: 48px;
  margin-bottom: 16px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--bg);
}
.password .form-error { margin: -6px 0 14px; color: var(--danger); }
.dialog-actions { display: flex; gap: 8px; }
.dialog-actions .btn { flex: 1; }

/* ---------- Sign in ---------- */

.app[hidden], .auth[hidden], .auth-switch[hidden] { display: none; }

.auth {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: max(24px, env(safe-area-inset-top)) 16px 32px;
}
.auth-card {
  width: min(400px, 100%);
  padding: 32px 28px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.auth-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 28px; }
.auth h1 { margin: 0 0 4px; font-size: 26px; font-weight: 650; letter-spacing: -0.015em; }
.auth-lead { margin: 0 0 24px; color: var(--muted); }
#auth-form { display: grid; }
#auth-form label { margin: 0 0 6px; font-size: 14px; font-weight: 500; }
#auth-form .input, #auth-form .field { margin-bottom: 16px; }
#auth-form .field input { padding-left: 14px; font-size: 16px; }
.auth-hint { margin: -10px 0 16px; color: var(--muted); font-size: 13px; }
#auth-form .form-error { margin: -4px 0 14px; }
.auth-switch {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin: 20px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}
@media (max-width: 480px) {
  .auth { place-items: start center; }
  .auth-card { padding: 24px 20px 20px; box-shadow: none; }
}

/* ---------- Account ---------- */

.account-btn { margin: 0 -10px 0 2px; }
.menu-note {
  margin: 0 0 4px;
  padding: 8px 10px 10px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}
.menu-note strong { color: var(--ink); font-weight: 600; }

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