:root {
  color-scheme: light;
  /* SuperCompress.dev colorway */
  --primary: #0566ff;
  --primary-hover: #0055df;
  --card: #ffffff;
  --soft: #fbfbf8;
  --paper: #fbfbf8;
  --text: #171717;
  --text-secondary: #696967;
  --text-muted: #696967;
  --border-color: rgba(23, 23, 23, 0.12);
  --border-strong: rgba(23, 23, 23, 0.18);

  --bg: var(--paper);
  --bg-elevated: var(--card);
  --bg-hover: #f0f0ec;
  --border: var(--border-color);
  --accent: var(--primary);
  --accent-soft: rgba(5, 102, 255, 0.1);
  --danger: #dc2626;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
  --font: "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-hebrew: "Taamey Ashkenaz", "Times New Roman", serif;
  --font-mono: "Paper Mono", ui-monospace, "Cascadia Code", Consolas, monospace;
  --titlebar-h: 40px;
}

/* Culmus Taamey Ashkenaz Bold: closest free face to late-19th-c. Vilna-era book type. */
@font-face {
  font-family: "Taamey Ashkenaz";
  src: url("./fonts/taamey-ashkenaz/TaameyAshkenaz-Bold.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0590-05FF, U+FB1D-FB4F;
}

@font-face {
  font-family: "Taamey Ashkenaz";
  src: url("./fonts/taamey-ashkenaz/TaameyAshkenaz-Bold.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0590-05FF, U+FB1D-FB4F;
}

@font-face {
  font-family: "Taamey Ashkenaz";
  src: url("./fonts/taamey-ashkenaz/TaameyAshkenaz-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0590-05FF, U+FB1D-FB4F;
}

@font-face {
  font-family: "Paper Mono";
  src: url("./fonts/paper-mono/PaperMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Paper Mono";
  src: url("./fonts/paper-mono/PaperMono-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Paper Mono";
  src: url("./fonts/paper-mono/PaperMono-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

.font-hebrew,
:lang(he) {
  font-family: var(--font-hebrew);
}

.font-mono,
.tw-num,
.tw-table td.tw-num,
.tw-table th:is(:nth-child(1), :nth-child(3), :nth-child(4), :nth-child(6)),
input[type="number"] {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  user-select: text;
  -webkit-user-select: text;
}

body {
  overflow-x: hidden;
}

/* Space for custom title bar overlay (Windows) — leave left for nav, right for settings + caption */
.titlebar-drag {
  position: fixed;
  top: 0;
  left: 144px; /* 3 × 48px nav buttons */
  right: 186px; /* settings (48) + Windows caption (~138) */
  height: max(var(--titlebar-h), 40px);
  -webkit-app-region: drag;
  z-index: 100;
  user-select: none;
  -webkit-user-select: none;
}

/*
 * Top-left nav: same visual language as Windows caption buttons
 * (min / max / close) — flat, titlebar-height hit targets, no circles.
 */
.app-nav {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 200;
  height: max(var(--titlebar-h), 40px);
  display: flex;
  align-items: center;
  gap: 0;
  -webkit-app-region: no-drag;
  user-select: none;
  -webkit-user-select: none;
}

.app-nav__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: max(var(--titlebar-h), 40px);
  min-height: 40px;
  padding: 0;
  margin: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  color: #171717;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.1s ease, color 0.1s ease, opacity 0.1s ease;
}

.app-nav__btn:hover:not(:disabled) {
  background: rgba(0, 0, 0, 0.06);
}

.app-nav__btn:active:not(:disabled) {
  background: rgba(0, 0, 0, 0.09);
}

.app-nav__btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: -2px;
}

.app-nav__btn:disabled,
.app-nav__btn.is-disabled {
  opacity: 0.35;
  cursor: default;
  color: #696967;
}

.app-nav__btn:disabled:hover,
.app-nav__btn.is-disabled:hover {
  background: transparent;
}

.app-nav__btn svg,
.app-nav__icon {
  display: block;
  pointer-events: none;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

#nav-home {
  margin-right: 0;
}

#nav-back,
#nav-forward {
  background: transparent;
}

/* Settings gear — top-right, same size/chrome as left nav icons */
.dash-header__actions {
  position: fixed;
  top: 0;
  right: 138px; /* Electron: sit just left of Windows min/max/close */
  z-index: 200;
  height: max(var(--titlebar-h), 40px);
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0;
  -webkit-app-region: no-drag;
}

/* Website: no window chrome — pin gear flush to the corner */
body.web-shell .dash-header__actions {
  right: 0;
  top: 0;
}

/* Website learning: Electron-style home control, top-left corner */
body.web-shell #gd-home-btn.app-nav__btn {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 200;
  width: 48px;
  height: max(var(--titlebar-h), 40px);
  min-height: 40px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  color: #171717;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

body.web-shell #gd-home-btn.app-nav__btn:hover {
  background: rgba(0, 0, 0, 0.06);
}

body.web-shell #gd-home-btn .material-symbols-outlined {
  font-size: 30px;
  color: #171717;
}

body.web-shell #iw-home,
body.web-shell #tw-home {
  display: none;
}

.app-nav__btn--settings {
  width: 48px;
  height: max(var(--titlebar-h), 40px);
  min-height: 40px;
  border-radius: 0;
  background: transparent;
  color: #171717;
}

.app-nav__btn--settings:hover {
  background: rgba(0, 0, 0, 0.06);
}

.app-nav__btn--settings svg,
.app-nav__btn--settings .app-nav__icon {
  width: 32px;
  height: 32px;
}

/* Chrome controls: no accidental highlight when tapping */
button,
.auth-btn,
.back-btn,
.link-btn,

.enrolled-card {
  user-select: none;
  -webkit-user-select: none;
}

/* Always allow selection in fields and readable copy */
input,
textarea,

.subtitle,
.title,
.settings-block__hint,
.empty-state,

.enrolled-card__name,
.enrolled-card__category,

.status,
.enrolled-card__text {
  user-select: text !important;
  -webkit-user-select: text !important;
}

.page {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  padding: 56px 28px 32px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.header {
  text-align: center;
  margin-bottom: 32px;
}

.logo {
  display: inline-flex;
  margin-bottom: 20px;
  filter: drop-shadow(0 6px 16px rgba(5, 102, 255, 0.22));
}

.title {
  margin: 0 0 10px;
  font-size: 1.625rem;
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.subtitle {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--text-secondary);
}

.auth-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 36px;
  padding: 8px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  background: var(--card);
  color: var(--text);
  box-shadow: 0 0 0 1px transparent;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition:
    background-color 80ms ease,
    border-color 80ms ease,
    box-shadow 180ms cubic-bezier(0.23, 1, 0.32, 1),
    color 80ms ease;
  -webkit-app-region: no-drag;
}

.auth-btn:hover:not(:disabled) {
  background: var(--bg-hover);
  border-color: var(--border-strong);
}

.auth-btn:active:not(:disabled) {
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.18);
  transition:
    background-color 80ms ease,
    border-color 80ms ease,
    box-shadow 80ms ease,
    color 80ms ease;
}

.auth-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.auth-btn__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.auth-btn__logo {
  display: block;
  width: 20px;
  height: 20px;
  object-fit: contain;
  pointer-events: none;
}

.auth-btn__logo--x {
  width: 18px;
  height: 18px;
}

.auth-btn__logo--google {
  width: 20px;
  height: 20px;
}

.auth-btn__label {
  flex: 1;
  text-align: left;
}

.auth-btn--x {
  background: #171717;
  border-color: #171717;
  color: #ffffff;
}

.auth-btn--x:hover:not(:disabled) {
  background: #2a2a2a;
  border-color: #2a2a2a;
}

.auth-btn--google {
  background: #ffffff;
  color: #171717;
  border-color: var(--border-strong);
}

.auth-btn--google:hover:not(:disabled) {
  background: #f5f5f2;
  border-color: rgba(23, 23, 23, 0.2);
}

.auth-btn--phone {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  box-shadow: none;
}

.auth-btn--phone:hover:not(:disabled) {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  box-shadow: none;
}

.auth-btn--phone .auth-btn__icon {
  color: #ffffff;
}

.auth-btn--phone .auth-btn__label {
  color: #ffffff;
}

.auth-btn--muted {
  opacity: 0.55;
  cursor: not-allowed;
  background: transparent;
  border-style: dashed;
}

.auth-btn--muted:disabled {
  color: var(--text-muted);
}

.badge {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--primary);
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0 16px;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.local-auth {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}
.local-auth__label {
  font-size: 0.8rem;
  color: var(--text-secondary);
}
.local-auth__optional {
  font-weight: 400;
}
.local-auth__input {
  width: 100%;
  box-sizing: border-box;
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--card);
  color: var(--text);
  font: inherit;
  transition: border-color 80ms ease, box-shadow 80ms ease;
}
.local-auth__input:focus {
  outline: none;
  border-color: #1c2420;
  box-shadow: 0 0 0 3px rgb(28 36 32 / 0.12);
}
.local-auth__password-wrap {
  position: relative;
  display: block;
  width: 100%;
}
.local-auth__password-wrap .local-auth__input {
  padding-right: 44px;
}
.local-auth__toggle-pw {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  margin: 0;
  padding: 4px;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: #536471;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.local-auth__toggle-pw:hover {
  background: rgba(15, 20, 25, 0.08);
  color: #0f1419;
}
.material-symbols-outlined {
  font-family: 'Material Symbols Outlined';
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-smoothing: antialiased;
  font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 24;
}

#gd-home-btn.is-current .material-symbols-outlined {
  font-variation-settings: 'FILL' 1, 'wght' 300, 'GRAD' 0, 'opsz' 24;
  color: #6b7280;
}

.local-auth__toggle-pw .material-symbols-outlined {
  font-size: 22px;
  color: inherit;
}

.local-auth__toggle-pw .material-symbols-outlined[hidden] {
  display: none;
}

.account-menu {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 200;
}
.account-menu__btn {
  width: 40px;
  height: 40px;
  margin: 8px 8px 0 0;
  border: none;
  border-radius: 999px;
  background: #1d9bf0;
  color: #fff;
  font: inherit;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.account-menu__btn:hover {
  background: #1a8cd8;
}
.account-menu__panel {
  position: absolute;
  top: 52px;
  right: 8px;
  min-width: 220px;
  margin: 0;
  padding: 0;
  list-style: none;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  overflow: hidden;
}
.account-menu__panel[hidden] {
  display: none;
}
.account-menu__item {
  display: block;
  width: 100%;
  padding: 12px 16px;
  border: none;
  background: transparent;
  text-align: left;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  color: #0f1419;
  cursor: pointer;
}
.account-menu__item:hover {
  background: rgba(15, 20, 25, 0.06);
}
.account-menu__panel > li:first-child .account-menu__item:hover {
  border-radius: 16px 16px 0 0;
}
.account-menu__panel > li:last-child .account-menu__item:hover {
  border-radius: 0 0 16px 16px;
}
.account-menu__item--muted {
  cursor: default;
  color: #536471;
}
.account-menu__item--muted:hover {
  background: transparent;
}
.coming-soon {
  margin-bottom: 8px;
}

.status {
  min-height: 1.25rem;
  margin: 16px 0 0;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  text-align: center;
}

.status.is-error {
  color: var(--danger);
}

.status.is-info {
  color: var(--primary);
}

.footer {
  margin-top: auto;
  padding-top: 28px;
  text-align: center;
}

.footer p {
  margin: 0 0 10px;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.footer a {
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease;
  -webkit-app-region: no-drag;
}

.footer a:hover {
  border-bottom-color: var(--text-secondary);
}

.legal {
  font-size: 0.75rem !important;
  color: var(--text-muted) !important;
  line-height: 1.45;
}

/* Soft ambient tint (SuperCompress paper) */
body::before {
  content: "";
  pointer-events: none;
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 90% 55% at 50% -15%, rgba(5, 102, 255, 0.07), transparent 55%),
    radial-gradient(ellipse 70% 45% at 100% 100%, rgba(251, 251, 248, 0.95), transparent 50%);
  z-index: 0;
}

.page {
  position: relative;
  z-index: 1;
}

.hidden {
  display: none !important;
}

.signed-in {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  padding-top: 24px;
  flex: 1;
}

.signed-in__avatar-wrap {
  position: relative;
  width: 72px;
  height: 72px;
  margin-bottom: 8px;
  flex-shrink: 0;
}

.signed-in__avatar,
.signed-in__avatar-fallback {
  position: absolute;
  inset: 0;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
}

.signed-in__avatar {
  border: 2px solid var(--border-strong);
  z-index: 1;
}

.signed-in__avatar[hidden] {
  display: none !important;
}

.signed-in__avatar-fallback {
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 1.5rem;
  font-weight: 700;
}

.signed-in__avatar-fallback[hidden] {
  display: none !important;
}

.signed-in .title {
  margin-bottom: 16px;
}

.signed-in .auth-btn {
  max-width: 280px;
  margin-top: 8px;
}

.link-btn {
  margin-top: 8px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  -webkit-app-region: no-drag;
}

.link-btn:hover {
  color: var(--text);
}

.auth-btn.is-busy,
.auth-btn:disabled:not(.auth-btn--muted) {
  opacity: 0.65;
  cursor: wait;
}

.setup {
  margin-top: 20px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background: var(--card);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.setup__toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  cursor: pointer;
  -webkit-app-region: no-drag;
}

.setup__toggle:hover {
  color: var(--text);
  background: var(--bg-hover);
}

.setup__chevron {
  opacity: 0.7;
}

.setup__panel {
  padding: 0 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.setup__hint {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.45;
  color: var(--text-muted);
}

.setup__hint code {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--bg);
  color: var(--accent);
  font-size: 0.7rem;
  user-select: text;
}

.setup__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.field .optional {
  font-weight: 500;
  color: var(--text-muted);
}

.field input {
  width: 100%;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--card);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  outline: none;
  -webkit-app-region: no-drag;
  user-select: text;
}

.field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
}

.setup__status {
  margin: 0;
  min-height: 1rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.setup__status.is-error {
  color: var(--danger);
}

.setup__status.is-info {
  color: var(--accent);
}

/* —— Dashboard —— */

.page--wide {
  max-width: 640px;
}

.header--left {
  text-align: left;
  position: relative;
  padding-top: 8px;
}

.header--left .title {
  margin-top: 8px;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin: 0 0 8px -8px;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  color: #171717;
  line-height: 1;
  cursor: pointer;
  box-shadow: none;
  -webkit-app-region: no-drag;
}

.back-btn:hover {
  background: rgba(0, 0, 0, 0.06);
}

.back-btn svg,
.back-btn .app-nav__icon {
  width: 32px;
  height: 32px;
  display: block;
  pointer-events: none;
}

.eyebrow {
  margin: 0 0 6px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}


.dash-header__row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.dash-header__row--end {
  justify-content: flex-end;
}

.dash-header {
  margin-bottom: 16px;
}

.settings-page {
  padding-bottom: 72px;
}

.settings-footer {
  margin-top: auto;
  padding-top: 32px;
  display: flex;
  justify-content: center;
}

.settings-signout {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.settings-signout:hover {
  color: var(--danger);
}

.subject-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.enrolled-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  background: var(--card);
  box-shadow: var(--shadow);
  cursor: default;
  -webkit-app-region: no-drag;
}

.enrolled-card--clickable {
  cursor: pointer;
  transition:
    background 0.15s ease,
    border-color 0.15s ease;
}

.enrolled-card--clickable:hover {
  background: var(--bg-hover);
  border-color: rgba(5, 102, 255, 0.3);
}

.enrolled-card__category {
  margin: 0 0 4px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}

.enrolled-card__name {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--text);
}

.enrolled-card__chevron {
  color: var(--text-muted);
  font-weight: 700;
}

.empty-state {
  margin: 0 0 16px;
  padding: 20px 16px;
  text-align: center;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text-secondary);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius);
  background: var(--card);
}

/* Settings */
.settings-block {
  margin-bottom: 22px;
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  background: var(--card);
  box-shadow: var(--shadow);
}

.settings-block__title {
  margin: 0 0 6px;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.settings-block__hint {
  margin: 0 0 14px;
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--text-muted);
}

.settings-block__hint code {
  font-size: 0.72rem;
  color: var(--accent);
}

.inline-link {
  border: none;
  background: none;
  padding: 0;
  color: var(--accent);
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
  -webkit-app-region: no-drag;
}

.field-note {
  margin: -4px 0 12px;
  font-size: 0.72rem;
  line-height: 1.4;
  color: var(--text-muted);
}

.field textarea {
  width: 100%;
  min-height: 160px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--card);
  color: var(--text);
  font-family: inherit;
  font-size: 0.875rem;
  line-height: 1.45;
  resize: vertical;
  outline: none;
  -webkit-app-region: no-drag;
  user-select: text;
}

.field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
}


/* Preview-only TEST MODE (never shown in production). */
.gd-test-mode {
  position: fixed;
  right: 12px;
  top: 52px;
  z-index: 1000;
  max-width: min(560px, calc(100vw - 24px));
  padding: 6px 8px 6px 10px;
  border-radius: 10px;
  background: #fff4d6;
  border: 2px dashed #c9971c;
  color: #5a4300;
  font-size: 0.8rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}
.gd-test-mode--error {
  background: #ffe1df;
  border-color: #d9605a;
  color: #7a1712;
}
.gd-test-mode__head,
.gd-test-mode__row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.gd-test-mode__tag {
  letter-spacing: 0.06em;
}
.gd-test-mode__label {
  flex: 1;
}
.gd-test-mode__panel {
  display: grid;
  gap: 6px;
  margin-top: 6px;
}
.gd-test-mode__panel.hidden {
  display: none;
}
.gd-test-mode__panel select {
  font: inherit;
  max-width: 220px;
}
.gd-test-mode__btn {
  font: inherit;
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid currentColor;
  background: #fff;
  color: inherit;
  cursor: pointer;
}

.gd-test-toast {
  position: fixed;
  left: 50%;
  bottom: 132px;
  transform: translate(-50%, 8px);
  z-index: 1001;
  max-width: min(560px, calc(100vw - 24px));
  padding: 8px 14px;
  border-radius: 10px;
  background: #5a4300;
  color: #fff8e6;
  font-size: 0.85rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.gd-test-toast--show {
  opacity: 1;
  transform: translate(-50%, 0);
}
.gd-test-toast--error {
  background: #7a1712;
}
