/* ==========================================================================
   Grimoire d'entraînement — design tokens & base styles
   ========================================================================== */

@font-face {
  font-family: 'Cinzel';
  font-style: normal;
  font-weight: 600 700;
  font-display: swap;
  src: url('../fonts/cinzel.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/inter.woff2') format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url('../fonts/jetbrainsmono.woff2') format('woff2');
}

:root {
  color-scheme: dark;

  /* Couleurs */
  --bg-top: #120C1E;
  --bg-bottom: #1E1433;
  --bg-app: #0A0810;
  --card-bg: #1B1428;
  --card-border: rgba(180, 156, 242, 0.15);
  --divider: rgba(180, 156, 242, 0.12);

  --gold: #E8B84B;
  --gold-tint-14: rgba(232, 184, 75, 0.14);
  --gold-tint-15: rgba(232, 184, 75, 0.15);
  --gold-tint-18: rgba(232, 184, 75, 0.18);
  --gold-tint-25: rgba(232, 184, 75, 0.25);
  --gold-border-40: rgba(232, 184, 75, 0.4);

  --violet: #B49CF2;
  --violet-tint-12: rgba(180, 156, 242, 0.12);
  --violet-tint-15: rgba(180, 156, 242, 0.15);
  --violet-tint-20: rgba(180, 156, 242, 0.2);
  --violet-tint-35: rgba(180, 156, 242, 0.35);

  --turquoise: #5FD6C0;
  --coral: #E68A63;
  --coral-tint-12: rgba(230, 138, 99, 0.12);

  --text-primary: #F3EEFB;
  --text-secondary: rgba(243, 238, 251, 0.6);
  --text-tertiary: rgba(243, 238, 251, 0.4);
  --text-quaternary: rgba(243, 238, 251, 0.35);
  --text-on-gold: #1A1220;

  /* Typographies */
  --font-title: 'Cinzel', serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Échelles */
  --radius-card: 18px;
  --radius-card-sm: 16px;
  --radius-input: 14px;
  --radius-btn: 16px;
  --radius-pill: 999px;

  --tap-min: 44px;
  --cta-height: 56px;
  --cta-height-lg: 60px;

  --pad-h: 20px;
  --pad-header-top: 60px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  height: 100%;
  overflow: hidden;
}

body {
  margin: 0;
  padding: 0;
  /* Même dégradé que .screen, pas la couleur --bg-app unie : sur iOS en
     mode standalone, la hauteur réellement disponible (encoche, barre de
     gestes) est peu fiable à mesurer en CSS/JS. Si #app ne couvre pas tout
     à un pixel près, on veut que ce soit invisible plutôt qu'une bande
     noire disgracieuse en bas de l'écran. */
  background: linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 100%);
  font-family: var(--font-body);
  color: var(--text-primary);
  /* Empêche tout scroll/rebond de la page elle-même : seules les zones
     marquées .body-scroll doivent bouger. Sans ça, sur une longue liste,
     un balayage peut faire défiler toute la page comme un site web classique
     au lieu de rester cantonné à la liste. */
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-user-select: none;
  user-select: none;
}

input, textarea {
  -webkit-user-select: text;
  user-select: text;
}

button {
  font-family: inherit;
  -webkit-appearance: none;
  appearance: none;
  touch-action: manipulation;
}

#app {
  /* body est en position: fixed; inset: 0 (voir plus haut), donc son
     rendu correspond déjà exactement au viewport réel, encoche et barre de
     gestes comprises. Hériter de sa hauteur en % est plus fiable que vh/dvh
     ou une mesure JS, notamment en mode standalone iOS où ces dernières
     ont pu laisser un bandeau non couvert. Les unités vh restent en
     fallback pour les navigateurs plus anciens. */
  height: 100vh;
  height: 100dvh;
  height: calc(var(--app-height, 100vh));
  height: 100%;
  width: 100%;
  background: linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 100%);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.screen {
  height: 100vh;
  height: 100dvh;
  height: calc(var(--app-height, 100vh));
  height: 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 100%);
}

/* Header */
.header {
  flex-shrink: 0;
  padding: calc(var(--pad-header-top) + var(--safe-top)) var(--pad-h) 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.header--nav {
  justify-content: flex-start;
}

.icon-btn {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-pill);
  background: var(--gold-tint-15);
  border: 1px solid var(--gold-border-40);
  color: var(--gold);
  font-size: 24px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.back-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-pill);
  background: var(--violet-tint-12);
  border: none;
  color: var(--violet);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 20px;
  flex-shrink: 0;
}

.title-brand {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 26px;
  color: var(--gold);
  letter-spacing: 0.5px;
  line-height: 1.1;
}

.title-brand-sub {
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 12px;
  color: var(--violet);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-top: 3px;
}

.title-screen {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 20px;
  color: var(--violet);
}

/* Body / scroll area */
.body-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 4px var(--pad-h) 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.body-scroll--form {
  padding: 8px var(--pad-h) 20px;
  gap: 26px;
}

/* Bottom bar */
.bottom-bar {
  flex-shrink: 0;
  padding: 12px var(--pad-h) calc(28px + var(--safe-bottom));
  border-top: 1px solid var(--divider);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-cta {
  width: 100%;
  height: var(--cta-height);
  border-radius: var(--radius-btn);
  background: var(--gold);
  border: none;
  color: var(--text-on-gold);
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.5px;
  cursor: pointer;
}

.btn-cta:disabled {
  background: var(--gold-tint-25);
  color: rgba(26, 18, 32, 0.5);
  cursor: not-allowed;
}

.btn-cta--stop {
  height: var(--cta-height-lg);
  background: var(--coral);
  font-size: 18px;
}

.btn-cta--ghost {
  background: transparent;
  border: 1px solid var(--violet-tint-35);
  color: var(--violet);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
}

/* Section labels */
.section-label {
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 12px;
  color: var(--violet);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 8px;
}

/* Spell card */
.spell-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-card);
  padding: 16px;
  cursor: pointer;
}

.spell-card--static {
  cursor: default;
  border-radius: var(--radius-card-sm);
  padding: 14px;
}

.spell-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  gap: 8px;
}

.spell-card__name {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 16px;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.badge-level {
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 12px;
  color: var(--gold);
  background: var(--gold-tint-14);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  flex-shrink: 0;
  white-space: nowrap;
}

.badge-touch {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 11px;
  color: var(--violet);
  background: var(--violet-tint-12);
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  flex-shrink: 0;
  white-space: nowrap;
}

.badge-warn {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 11px;
  color: var(--coral);
  background: var(--coral-tint-12);
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  flex-shrink: 0;
  white-space: nowrap;
}

.progress-track {
  height: 6px;
  border-radius: var(--radius-pill);
  background: var(--violet-tint-12);
  overflow: hidden;
  margin-bottom: 8px;
}

.progress-fill {
  height: 100%;
  border-radius: var(--radius-pill);
  background: var(--turquoise);
  transition: width 0.2s ease;
}

.progress-fill--gold {
  background: var(--gold);
}

.spell-card__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.mono-sm {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-secondary);
}

.mono-eta {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--turquoise);
}

.empty-state {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 28px;
  gap: 10px;
}

.empty-state__title {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 18px;
  color: var(--violet);
}

.empty-state__body {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Form fields */
.text-input {
  width: 100%;
  height: 52px;
  border-radius: var(--radius-input);
  background: var(--card-bg);
  border: 1px solid var(--violet-tint-20);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  padding: 0 16px;
}

.text-input:focus {
  outline: none;
  border-color: var(--gold-border-40);
}

.text-input::placeholder {
  color: var(--text-quaternary);
}

/* Stepper row (cooldown) */
.stepper-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--card-bg);
  border: 1px solid var(--violet-tint-20);
  border-radius: var(--radius-input);
  padding: 8px;
}

.stepper-btn {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--violet-tint-12);
  border: none;
  color: var(--violet);
  font-size: 20px;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stepper-btn--gold {
  background: var(--gold-tint-15);
  color: var(--gold);
}

.stepper-btn--sm {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  font-size: 16px;
}

.stepper-btn--xs {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  font-size: 16px;
}

.stepper-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.stepper-value {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 600;
  color: var(--text-primary);
}

/* Tier rows (levels editor) */
.tier-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-input);
  padding: 10px 12px;
  gap: 8px;
}

.tier-row--stacked {
  flex-direction: column;
  align-items: stretch;
}

.tier-row__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.tier-row__control {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.tier-req-input {
  flex: 1;
  min-width: 0;
  height: 40px;
  border: 1px solid var(--violet-tint-20);
  border-radius: 10px;
  background: var(--bg-app);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 17px;
  text-align: center;
  padding: 0 8px;
}

.tier-req-input:focus {
  outline: none;
  border-color: var(--gold-border-40);
}

.tier-row__suffix {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--text-tertiary);
  white-space: nowrap;
  flex-shrink: 0;
}

.tier-row__label {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.tier-row__title {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
}

.tier-row__sub {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 2px;
}

.tier-row__actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.tier-remove-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--coral-tint-12);
  border: none;
  color: var(--coral);
  font-size: 15px;
  cursor: pointer;
}

.btn-dashed {
  width: 100%;
  height: 48px;
  border-radius: var(--radius-input);
  background: transparent;
  border: 1px dashed var(--violet-tint-35);
  color: var(--violet);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-input);
  padding: 14px 16px;
  min-height: var(--tap-min);
}

.toggle-row__label {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--text-primary);
}

.toggle-row__hint {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 2px;
}

.switch {
  width: 48px;
  height: 28px;
  border-radius: var(--radius-pill);
  background: var(--violet-tint-20);
  border: none;
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
}

.switch::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: var(--radius-pill);
  background: var(--text-primary);
  transition: transform 0.15s ease;
}

.switch--on {
  background: var(--gold);
}

.switch--on::after {
  transform: translateX(20px);
  background: var(--text-on-gold);
}

/* Chips (prepare screen) */
.chip-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip {
  padding: 10px 16px;
  min-height: 44px;
  border-radius: var(--radius-pill);
  background: var(--card-bg);
  color: var(--violet);
  border: 1px solid var(--violet-tint-20);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}

.chip--selected {
  background: var(--gold-tint-18);
  border: 1px solid var(--gold);
  color: var(--gold);
}

.chip__level {
  font-family: var(--font-mono);
  font-size: 11px;
  opacity: 0.7;
}

.chip__touch {
  font-size: 11px;
}

/* Duration slider */
.duration-display {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 32px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 14px;
}

.slider-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  height: 44px;
  background: transparent;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: var(--radius-pill);
  background: var(--violet-tint-15);
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 26px;
  height: 26px;
  border-radius: var(--radius-pill);
  background: var(--gold);
  border: 2px solid var(--text-on-gold);
  cursor: pointer;
  margin-top: -10px;
}

input[type="range"]::-moz-range-track {
  height: 6px;
  border-radius: var(--radius-pill);
  background: var(--violet-tint-15);
}

input[type="range"]::-moz-range-thumb {
  width: 26px;
  height: 26px;
  border-radius: var(--radius-pill);
  background: var(--gold);
  border: 2px solid var(--text-on-gold);
  cursor: pointer;
}

.slider-minmax {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-quaternary);
  margin-top: 6px;
}

/* Parallel time callout */
.callout {
  background: var(--gold-tint-14);
  border: 1px solid var(--gold-border-40);
  border-radius: var(--radius-card-sm);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.callout__title {
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 12px;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 1.2px;
}

.callout__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-secondary);
}

.callout__gain {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 15px;
  color: var(--turquoise);
}

/* Session screen */
.session-header {
  flex-shrink: 0;
  padding: calc(56px + var(--safe-top)) var(--pad-h) 16px;
  text-align: center;
}

.session-label {
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 12px;
  color: var(--violet);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 8px;
}

.session-timer {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 58px;
  color: var(--gold);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.session-timer--done {
  color: var(--turquoise);
}

/* Summary screen */
.summary-title {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 24px;
  color: var(--gold);
}

.summary-sub {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-tertiary);
  margin-top: 4px;
}

.summary-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  gap: 8px;
}

.summary-level-change {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.summary-level-change--up {
  color: var(--turquoise);
}

.summary-progress-label {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-tertiary);
  margin-bottom: 12px;
}

.summary-cast-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.summary-cast-label {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text-secondary);
}

.summary-cast-control {
  display: flex;
  align-items: center;
  gap: 10px;
}

.summary-cast-value {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 16px;
  color: var(--text-primary);
  min-width: 30px;
  text-align: center;
}

/* Gate screen */
.gate-screen {
  height: 100vh;
  height: 100dvh;
  height: calc(var(--app-height, 100vh));
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 100%);
  padding: calc(48px + var(--safe-top)) 28px calc(48px + var(--safe-bottom));
}

.gate-badge {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  background: var(--gold-tint-14);
  border: 1px solid var(--gold-border-40);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 30px;
  color: var(--gold);
  margin-bottom: 24px;
}

.gate-title {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 22px;
  color: var(--violet);
  margin-bottom: 12px;
  letter-spacing: 0.3px;
}

.gate-body {
  font-family: var(--font-body);
  font-size: 15px;
  color: rgba(243, 238, 251, 0.75);
  line-height: 1.5;
  margin-bottom: 28px;
}

.gate-instructions {
  width: 100%;
  max-width: 360px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-card-sm);
  padding: 16px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.gate-instructions__line {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--turquoise);
}

.gate-instructions__arrow {
  color: var(--text-tertiary);
}

.gate-divider {
  height: 1px;
  background: var(--divider);
}

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(100px + var(--safe-bottom));
  transform: translateX(-50%) translateY(10px);
  background: var(--card-bg);
  border: 1px solid var(--gold-border-40);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 14px;
  padding: 12px 18px;
  border-radius: var(--radius-pill);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 1000;
  max-width: calc(100% - 40px);
  text-align: center;
}

.toast--visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Bandeau de mise à jour PWA */
.update-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1100;
  padding: calc(10px + var(--safe-top)) 16px 10px;
  background: var(--gold);
  color: var(--text-on-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.update-banner__text {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 13px;
}

.update-banner__btn {
  height: 32px;
  padding: 0 14px;
  border-radius: var(--radius-pill);
  background: var(--text-on-gold);
  color: var(--gold);
  border: none;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}

/* Modal (confirm delete) */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 8, 16, 0.7);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 900;
}

.modal-sheet {
  width: 100%;
  max-width: 480px;
  background: var(--bg-bottom);
  border-top: 1px solid var(--card-border);
  border-radius: 20px 20px 0 0;
  padding: 24px 20px calc(24px + var(--safe-bottom));
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-title {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 18px;
  color: var(--text-primary);
}

.modal-body {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.btn-secondary {
  flex: 1;
  height: 48px;
  border-radius: var(--radius-input);
  background: var(--violet-tint-12);
  border: none;
  color: var(--violet);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
}

.btn-danger {
  flex: 1;
  height: 48px;
  border-radius: var(--radius-input);
  background: var(--coral);
  border: none;
  color: var(--text-on-gold);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
}

/* Import/export screen bits */
.textarea-json {
  width: 100%;
  min-height: 140px;
  border-radius: var(--radius-input);
  background: var(--card-bg);
  border: 1px solid var(--violet-tint-20);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 12px;
  resize: vertical;
}

.link-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 4px 0;
}

.link-btn {
  background: none;
  border: none;
  color: var(--violet);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  text-decoration: underline;
  padding: 8px;
}
