/* =========================================================
   DOSSIER — Resume Builder
   Design tokens
========================================================= */
:root{
  --paper:      #FAF7F0;
  --surface:    #FFFFFF;
  --ink:        #1E2A24;
  --ink-soft:   #3A453E;
  --muted:      #6E7669;
  --line:       #E5E0D2;
  --line-soft:  #EFEBDF;

  --accent:     #0F3D33;   /* deep pine */
  --accent-2:   #C9A24B;   /* muted gold */
  --accent-soft:#E7E2CE;
  --danger:     #B3432B;

  --resume-accent: var(--accent); /* user-editable resume color, independent of app UI color */
  --resume-accent-2: var(--accent-2);

  --font-display: "Fraunces", Georgia, serif;
  --font-body:    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono:    "IBM Plex Mono", ui-monospace, monospace;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;

  --shadow-sm: 0 1px 2px rgba(30,42,36,0.06);
  --shadow-md: 0 8px 24px rgba(30,42,36,0.08);
  --shadow-lg: 0 24px 60px rgba(30,42,36,0.16);

  --topbar-h: 64px;
}

*, *::before, *::after{ box-sizing: border-box; }
/* the hidden attribute must always win over any display rule set elsewhere in this file */
[hidden]{ display:none !important; }
html{ -webkit-text-size-adjust:100%; height:100%; }
body{
  margin:0;
  height:100%;
  display:flex;
  flex-direction:column;
  overflow:hidden;
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
img{ max-width:100%; display:block; }
button{ font-family: inherit; }
input, textarea{ font-family: inherit; font-size: 14px; }
a{ color: var(--accent); }

::selection{ background: var(--accent-2); color: var(--ink); }

/* focus visibility */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, [tabindex]:focus-visible{
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce){
  *{ animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* =========================================================
   TOP BAR
========================================================= */
.topbar{
  height: var(--topbar-h);
  display:flex;
  align-items:center;
  gap:24px;
  padding: 0 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top:0;
  z-index: 40;
  flex: none;
}
.topbar__brand{
  display:flex;
  align-items:center;
  gap:10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: 0.01em;
  color: var(--accent);
  white-space: nowrap;
}
.topbar__mark{ width:30px; height:30px; border-radius:8px; }

.topbar__templates{
  display:flex;
  gap:6px;
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 4px;
  border-radius: 999px;
}
.tpl-btn{
  display:flex; align-items:center; gap:8px;
  border:none; background:transparent; cursor:pointer;
  padding: 7px 14px 7px 8px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  transition: background .18s ease, color .18s ease;
}
.tpl-btn:hover{ color: var(--ink); }
.tpl-btn.is-active{ background: var(--accent); color:#fff; }
.tpl-swatch{
  width:16px; height:16px; border-radius:4px; display:inline-block; flex:none;
  border: 1px solid rgba(0,0,0,0.08);
}
.tpl-swatch--sidebar{ background: linear-gradient(90deg, var(--accent) 38%, #fff 38%); }
.tpl-swatch--classic{ background:#fff; position:relative; }
.tpl-swatch--classic::after{
  content:""; position:absolute; left:3px; right:3px; top:6px; height:2px; background: var(--accent-2);
}

.theme-picker{ position:relative; }
.theme-picker__toggle{
  display:flex; align-items:center; gap:9px;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 999px;
  padding: 7px 14px 7px 8px;
  font-size: 13px; font-weight:600; color: var(--ink-soft);
  cursor:pointer;
  transition: border-color .15s ease, color .15s ease;
}
.theme-picker__toggle:hover{ border-color: var(--resume-accent); color: var(--ink); }
.theme-picker__swatch{
  width:20px; height:20px; border-radius:50%; flex:none;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.08);
  background: linear-gradient(135deg, var(--resume-accent) 50%, var(--resume-accent-2) 50%);
}
.theme-picker__panel{
  position:absolute; top: calc(100% + 8px); left:0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 12px;
  display:grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  width: 280px;
  max-height: 280px;
  overflow-y: auto;
  z-index: 50;
}
.theme-picker__panel::-webkit-scrollbar{ width: 8px; }
.theme-picker__panel::-webkit-scrollbar-thumb{ background: var(--line); border-radius: 10px; }
.theme-picker__panel::-webkit-scrollbar-track{ background: transparent; }
.theme-swatch{
  width:36px; height:36px; border-radius:50%; border: 2px solid transparent;
  padding:2px; cursor:pointer;
  display:flex; align-items:center; justify-content:center;
}
.theme-swatch__inner{
  width:100%; height:100%; border-radius:50%;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.08);
}
.theme-swatch:hover{ border-color: var(--line); }
.theme-swatch.is-active{ border-color: var(--ink); }

.topbar__actions{ margin-left:auto; display:flex; gap:10px; }

.btn{
  display:inline-flex; align-items:center; gap:8px;
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 9px 18px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
  white-space: nowrap;
}
.btn:active{ transform: translateY(1px); }
.btn--primary{ background: var(--accent); color:#fff; box-shadow: var(--shadow-sm); }
.btn--primary:hover{ background:#0c3128; box-shadow: var(--shadow-md); }
.btn--ghost{ background: transparent; color: var(--ink-soft); border-color: var(--line); }
.btn--ghost:hover{ border-color: var(--accent); color: var(--accent); }

.topbar__mobile-toggle{ display:none; }

/* =========================================================
   APP SHELL / GRID
========================================================= */
.app{
  display:grid;
  grid-template-columns: minmax(420px, 560px) 1fr;
  flex: 1;
  min-height: 0;
}

.panel{ min-width:0; min-height:0; height:100%; }

.panel--form{
  display:flex;
  min-height:0;
  border-right: 1px solid var(--line);
  background: var(--surface);
}

.panel--preview{
  display:flex;
  flex-direction:column;
  min-height:0;
  background: var(--paper);
  padding: 36px 40px 60px;
  overflow-y: auto;
}

/* =========================================================
   TAB RAIL (signature element — dossier folder tabs)
========================================================= */
.tabrail{
  flex: none;
  width: 46px;
  background: var(--accent);
  display:flex;
  flex-direction: column;
  align-items: center;
  padding-top: 18px;
  gap: 2px;
}
.tabrail__btn{
  width: 100%;
  border:none;
  background: transparent;
  color: rgba(255,255,255,0.55);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  padding: 12px 0;
  cursor:pointer;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  border-left: 2px solid transparent;
  transition: color .15s ease, border-color .15s ease, background .15s ease;
}
.tabrail__btn:hover{ color: #fff; }
.tabrail__btn.is-active{
  color: #fff;
  background: rgba(255,255,255,0.08);
  border-left-color: var(--accent-2);
}

/* =========================================================
   FORM SCROLL AREA
========================================================= */
.form-scroll{
  flex:1;
  min-width:0;
  overflow-y: auto;
  padding: 8px 36px 120px;
}
.form-scroll::-webkit-scrollbar,
.panel--preview::-webkit-scrollbar{ width: 10px; }
.form-scroll::-webkit-scrollbar-thumb,
.panel--preview::-webkit-scrollbar-thumb{ background: var(--line); border-radius: 10px; }
.form-scroll::-webkit-scrollbar-track,
.panel--preview::-webkit-scrollbar-track{ background: transparent; }

.fsection{
  padding: 34px 0 30px;
  border-bottom: 1px solid var(--line-soft);
}
.fsection:first-child{ padding-top: 26px; }
.fsection:last-child{ border-bottom:none; }

.fsection__head{
  display:flex;
  gap: 14px;
  margin-bottom: 20px;
}
.fsection__index{
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent-2);
  background: var(--accent);
  width: 28px; height: 28px;
  border-radius: 50%;
  display:flex; align-items:center; justify-content:center;
  flex: none;
  margin-top: 2px;
}
.fsection__head h2{
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 600;
  margin: 0 0 3px;
  color: var(--ink);
}
.fsection__head p{
  margin:0;
  font-size: 13px;
  color: var(--muted);
}
.fsection__sub{
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 4px 0 12px;
}

/* =========================================================
   FORM FIELDS
========================================================= */
.grid{ display:grid; gap: 16px; }
.grid--2{ grid-template-columns: 1fr 1fr; }

.field{ margin-bottom: 16px; }
.field label{
  display:block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 6px;
}
.hint-inline{ font-weight: 400; color: var(--muted); }
.hint{ font-size: 12px; color: var(--muted); margin: 6px 0 0; }

.field input,
.field textarea,
.item-grid input,
.item-grid textarea{
  width:100%;
  padding: 10px 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink);
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.field input:focus,
.field textarea:focus,
.item-grid input:focus,
.item-grid textarea:focus{
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(15,61,51,0.1);
}
.field textarea, .item-grid textarea{ resize: vertical; min-height: 80px; line-height: 1.5; }

/* Photo upload */
.photo-field{ display:flex; gap:16px; align-items:flex-start; margin-bottom: 22px; }
.photo-drop{
  width: 76px; height: 76px;
  border-radius: 50%;
  border: 1.5px dashed var(--line);
  display:flex; align-items:center; justify-content:center;
  cursor:pointer;
  flex: none;
  overflow: hidden;
  background: var(--paper);
  transition: border-color .15s ease;
}
.photo-drop:hover{ border-color: var(--accent); }
.photo-drop img{ width:100%; height:100%; object-fit:cover; }
.photo-placeholder{
  display:flex; flex-direction:column; align-items:center; gap:4px;
  color: var(--muted); font-size: 10.5px; font-weight:600;
}
.photo-field__actions{ padding-top: 8px; }
.link-btn{
  border:none; background:none; padding:0; cursor:pointer;
  color: var(--danger); font-size: 12.5px; font-weight:600;
  text-decoration: underline; text-underline-offset: 2px;
}

/* Repeatable item cards */
.repeat-list{ display:flex; flex-direction:column; gap:14px; margin-bottom: 14px; }
.item-card{
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px 16px 14px;
  background: var(--paper);
  position: relative;
}
.item-card__top{
  display:flex; justify-content:space-between; align-items:center;
  margin-bottom: 12px;
}
.item-card__label{
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.item-remove{
  border:none; background:none; cursor:pointer;
  color: var(--muted); width:22px; height:22px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  transition: background .15s ease, color .15s ease;
}
.item-remove:hover{ background: rgba(179,67,43,0.1); color: var(--danger); }

.item-grid{ display:grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
.item-grid .span-2{ grid-column: 1 / -1; }
.item-grid label{
  font-size: 11px; font-weight:600; color: var(--muted);
  display:block; margin-bottom: 4px;
}

.date-row{ display:grid; grid-template-columns: 1fr 1fr auto; gap:10px; align-items:end; }
.current-check{
  display:flex; align-items:center; gap:6px;
  font-size: 11.5px; color: var(--ink-soft); white-space:nowrap; padding-bottom: 10px;
}
.current-check input{ width:auto; }

/* Skill / language rows (tight) */
.repeat-list--tight .item-card{ padding: 10px 12px; }
.tight-row{ display:flex; align-items:center; gap:12px; }
.tight-row input[type="text"]{ flex: 1 1 auto; }
.dot-rating{ display:flex; gap:5px; flex: none; }
.dot-rating button{
  width:14px; height:14px; border-radius:50%;
  border: 1.5px solid var(--accent);
  background: transparent; cursor:pointer; padding:0;
  transition: background .12s ease;
}
.dot-rating button.is-filled{ background: var(--accent); }

.level-select{
  flex: none;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  font-size: 12.5px;
  color: var(--ink-soft);
}

.add-btn{
  align-self:flex-start;
  border: 1.5px dashed var(--line);
  background: transparent;
  color: var(--accent);
  font-weight: 700;
  font-size: 13px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  cursor:pointer;
  transition: border-color .15s ease, background .15s ease;
}
.add-btn:hover{ border-color: var(--accent); background: var(--accent-soft); }

/* =========================================================
   PREVIEW PANEL
========================================================= */
.preview-toolbar{
  display:flex; align-items:baseline; gap:10px; margin-bottom: 18px;
}
.preview-toolbar__label{
  font-family: var(--font-display);
  font-size: 15px; font-weight:600; color: var(--ink);
}
.preview-toolbar__hint{
  font-family: var(--font-mono);
  font-size: 11px; color: var(--muted);
}

.preview-scale-wrapper{
  width: 100%;
  overflow: visible;
}

.resume-page{
  width: 794px;
  min-height: 1123px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  transform-origin: top left;
  position: relative;
}
.resume-page::before{
  /* subtle top edge to read as a physical sheet */
  content:"";
  position:absolute; inset:0;
  box-shadow: inset 0 0 0 1px rgba(30,42,36,0.05);
  pointer-events:none;
}

/* =========================================================
   TEMPLATE: SIDEBAR
========================================================= */
.resume-page[data-template="sidebar"]{
  display:flex;
  font-family: var(--font-body);
  color: var(--ink);
}
.rp-side{
  width: 34%;
  background: var(--resume-accent);
  color: #fff;
  padding: 44px 26px;
}
.rp-side__photo{
  width: 108px; height:108px; border-radius:50%;
  overflow:hidden; margin-bottom: 20px;
  border: 3px solid rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.08);
}
.rp-side__photo img{ width:100%; height:100%; object-fit:cover; }
.rp-side h1{
  font-family: var(--font-display);
  font-size: 25px; font-weight:600; margin:0 0 4px; line-height:1.15;
}
.rp-side .rp-role{
  font-family: var(--font-mono);
  font-size: 12px; color: var(--resume-accent-2);
  letter-spacing: 0.03em;
  margin: 0 0 26px;
}
.rp-side__block{ margin-bottom: 24px; }
.rp-side__block h3{
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--resume-accent-2);
  margin: 0 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255,255,255,0.2);
}
.rp-contact-row{
  display:flex; gap:8px; font-size: 11.5px; margin-bottom:8px; line-height:1.4;
  color: rgba(255,255,255,0.92);
  word-break: break-word;
}
.rp-contact-row svg{ flex:none; margin-top:1px; opacity:0.8; }

.rp-skill-row{ margin-bottom: 10px; }
.rp-skill-row__top{ display:flex; justify-content:space-between; font-size: 11.5px; margin-bottom: 4px; }
.rp-dots{ display:flex; gap:4px; }
.rp-dots i{ width:6px; height:6px; border-radius:50%; background: rgba(255,255,255,0.25); display:block; }
.rp-dots i.on{ background: var(--resume-accent-2); }

.rp-lang-row{ display:flex; justify-content:space-between; font-size: 11.5px; margin-bottom:7px; color: rgba(255,255,255,0.9); }
.rp-lang-row span:last-child{ color: var(--resume-accent-2); font-family: var(--font-mono); font-size:10.5px; }

.rp-chip-wrap{ display:flex; flex-wrap:wrap; gap:6px; }
.rp-chip{
  font-size: 10.5px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(255,255,255,0.1);
  color: #fff;
}

.rp-main{ width:66%; padding: 46px 40px; }
.rp-main__section{ margin-bottom: 26px; }
.rp-main__section:last-child{ margin-bottom:0; }
.rp-main__section h3{
  font-family: var(--font-display);
  font-size: 15px; font-weight:600;
  color: var(--resume-accent);
  letter-spacing: 0.02em;
  margin: 0 0 12px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--accent-soft);
}
.rp-summary{ font-size: 12.5px; line-height:1.65; color: var(--ink-soft); }

.rp-entry{ margin-bottom: 16px; }
.rp-entry:last-child{ margin-bottom:0; }
.rp-entry__row{ display:flex; justify-content:space-between; gap:10px; align-items:baseline; }
.rp-entry__title{ font-size: 13.5px; font-weight:700; color: var(--ink); }
.rp-entry__meta{ font-size: 11px; color: var(--ink-soft); margin: 1px 0 6px; }
.rp-entry__date{
  font-family: var(--font-mono);
  font-size: 10.5px; color: var(--muted); white-space:nowrap; flex:none;
}
.rp-entry ul{ margin: 6px 0 0; padding-left: 16px; }
.rp-entry ul li{ font-size: 12px; line-height:1.55; color: var(--ink-soft); margin-bottom: 3px; }
.rp-entry p.rp-desc{ font-size: 12px; line-height: 1.55; color: var(--ink-soft); margin: 4px 0 0; }
.rp-entry a{ font-size: 11px; color: var(--resume-accent); }

/* keep long entries from being sliced across a PDF page break */
.rp-entry, .rp-side__block, .rp-skill-row, .rc-entry{
  break-inside: avoid;
  page-break-inside: avoid;
}

/* =========================================================
   TEMPLATE: CLASSIC
========================================================= */
.resume-page[data-template="classic"]{
  padding: 54px 58px;
  font-family: var(--font-body);
  color: var(--ink);
}
.rc-header{ text-align:center; margin-bottom: 22px; }
.rc-header h1{
  font-family: var(--font-display);
  font-size: 32px; font-weight:700; margin:0 0 6px;
  letter-spacing: 0.01em;
}
.rc-header .rc-role{
  font-size: 13px; letter-spacing: 0.14em; text-transform:uppercase;
  color: var(--resume-accent); font-weight:600; margin:0 0 12px;
}
.rc-contact{
  display:flex; justify-content:center; flex-wrap:wrap; gap: 6px 14px;
  font-size: 11.5px; color: var(--muted);
}
.rc-contact span{ display:inline-flex; align-items:center; gap:5px; }
.rc-rule{ height:2px; background: var(--resume-accent); width:64px; margin: 18px auto; }

.rc-section{ margin-bottom: 22px; }
.rc-section:last-child{ margin-bottom:0; }
.rc-section h3{
  font-family: var(--font-mono);
  font-size: 11.5px; letter-spacing: 0.16em; text-transform:uppercase;
  color: var(--resume-accent);
  margin: 0 0 12px;
  display:flex; align-items:center; gap:10px;
}
.rc-section h3::after{ content:""; flex:1; height:1px; background: var(--line); }

.rc-summary{ font-size: 12.5px; line-height:1.7; color: var(--ink-soft); text-align:center; max-width: 560px; margin:0 auto; }

.rc-entry{ margin-bottom: 15px; }
.rc-entry:last-child{ margin-bottom:0; }
.rc-entry__row{ display:flex; justify-content:space-between; gap:10px; }
.rc-entry__title{ font-size: 13.5px; font-weight:700; }
.rc-entry__org{ font-size: 12px; color: var(--ink-soft); font-style: italic; }
.rc-entry__date{ font-family: var(--font-mono); font-size: 10.5px; color: var(--muted); white-space:nowrap; }
.rc-entry ul{ margin:6px 0 0; padding-left:18px; }
.rc-entry ul li{ font-size: 12px; line-height:1.55; color: var(--ink-soft); margin-bottom:3px; }
.rc-entry p.rp-desc{ font-size:12px; line-height:1.55; color:var(--ink-soft); margin:4px 0 0; }

.rc-skills-grid{ display:grid; grid-template-columns: repeat(2, 1fr); gap: 6px 24px; }
.rc-skill-row{ display:flex; justify-content:space-between; font-size:12px; padding: 3px 0; border-bottom: 1px dotted var(--line); }
.rc-skill-row span:last-child{ font-family: var(--font-mono); font-size:10.5px; color: var(--muted); }

.rc-inline-list{ font-size:12px; color: var(--ink-soft); }
.rc-inline-list span{ }

/* shared empty state inside preview */
.rp-empty{ font-size: 11.5px; color: var(--muted); font-style: italic; }

/* =========================================================
   TOAST
========================================================= */
.toast{
  position: fixed;
  bottom: 24px; left: 50%;
  transform: translate(-50%, 12px);
  background: var(--ink);
  color: #fff;
  padding: 11px 20px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events:none;
  transition: opacity .2s ease, transform .2s ease;
  z-index: 100;
}
.toast.is-visible{ opacity:1; transform: translate(-50%, 0); }

/* =========================================================
   RESPONSIVE
========================================================= */
@media (max-width: 1080px){
  .app{ grid-template-columns: minmax(380px, 480px) 1fr; }
  .panel--preview{ padding: 28px; }
}

@media (max-width: 860px){
  .topbar{ padding: 0 14px; gap: 10px; }
  .topbar__templates{ order: 3; width:100%; justify-content:center; margin-top:0; }
  .topbar__actions{ order: 5; margin-left:auto; flex-wrap:wrap; row-gap:8px; }

  .app{ grid-template-columns: 1fr; }
  .panel--form, .panel--preview{ grid-column: 1 / -1; }
  .panel--form{ border-right:none; }

  /* mobile edit/preview switch */
  .topbar{ flex-wrap: wrap; height:auto; padding: 10px 14px; row-gap:10px; }
  .topbar__brand{ order: 1; }
  .theme-picker{ order: 4; }
  .topbar__mobile-toggle{
    display:flex; align-items:center; gap:8px;
    order: 2; margin-left:auto; border:none; background:none; cursor:pointer;
    font-size: 12px; font-weight:700; color: var(--ink-soft);
  }
  .mv-switch{
    width: 38px; height: 22px; border-radius:999px; background: var(--line);
    position:relative; transition: background .2s ease;
  }
  .mv-knob{
    position:absolute; top:2px; left:2px; width:18px; height:18px; border-radius:50%;
    background: var(--accent); transition: transform .2s ease;
  }
  .topbar__mobile-toggle[aria-pressed="true"] .mv-knob{ transform: translateX(16px); }
  .mv-label--edit{ color: var(--accent); }
  .mv-label--preview{ color: var(--muted); }
  .topbar__mobile-toggle[aria-pressed="true"] .mv-label--edit{ color: var(--muted); }
  .topbar__mobile-toggle[aria-pressed="true"] .mv-label--preview{ color: var(--accent); }

  .app{ position:relative; }
  .panel--form{ display:none; }
  .panel--preview{ display:none; }
  .app.is-editing .panel--form{ display:flex; }
  .app.is-previewing .panel--preview{ display:block; }

  .form-scroll{ padding: 8px 18px 100px; }
  .tabrail{ width: 38px; }
  .tabrail__btn{ font-size:10px; padding: 9px 0; }

  .grid--2{ grid-template-columns: 1fr; }
  .item-grid{ grid-template-columns: 1fr; }
  .date-row{ grid-template-columns: 1fr 1fr; }
  .current-check{ grid-column: 1 / -1; padding-bottom:0; }

  .panel--preview{ padding: 18px; }
}

@media (max-width: 480px){
  .topbar__brand span{ display:none; }
  .btn-label{ display:none; }
  .theme-picker__label{ display:none; }

  .btn{ padding: 9px; border-radius:50%; }
  .btn svg{ margin:0; }
  .theme-picker__toggle{ padding: 7px; border-radius:50%; }
  .topbar__actions{ gap:8px; }
}
