:root {
  color-scheme: light;
  --ink: #1d1d1f;
  --muted: #62626a;
  --label: #44444a;
  --line: #dcdad4;
  --bg: #f4f3ef;
  --panel: #fff;
  --subtle: #eceae4;
  --hover: #f6f5f1;
  --icon-hover: #ebe9e3;
  --entry-bg: #fbfaf8;
  --field-bg: #fff;
  --field-border: #c8c6bf;
  --readonly-bg: #f6f5f1;
  --segment-active: #fff;
  --stage: #e6e4de;
  --stage-text: #4e4e54;
  --brand: #1f4e5f;
  --brand-dark: #17404e;
  --brand-text: #1f4e5f;
  --on-brand: #fff;
  --selected-bg: #e8f0f2;
  --selected-text: #17404e;
  --danger: #a4262c;
  --danger-border: #e0bcbd;
  --warning: #8a4b00;
  --toast-bg: #26262a;
  --toast-text: #fff;
  --radius: 10px;
  --topbar-h: 60px;
  --tabbar-h: 0px;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 15px;
  line-height: 1.45;
  color: var(--ink);
}

:root[data-theme='dark'] {
  color-scheme: dark;
  --ink: #ececef;
  --muted: #a6a6b0;
  --label: #c9c9d0;
  --line: #33353a;
  --bg: #16171a;
  --panel: #1f2125;
  --subtle: #2a2c31;
  --hover: #2a2c31;
  --icon-hover: #33353a;
  --entry-bg: #191b1e;
  --field-bg: #16171a;
  --field-border: #54575f;
  --readonly-bg: #16171a;
  --segment-active: #3e4148;
  --stage: #101114;
  --stage-text: #b6b6bf;
  --brand: #2f7f98;
  --brand-dark: #276d83;
  --brand-text: #7cc4d8;
  --on-brand: #fff;
  --selected-bg: #1d3a44;
  --selected-text: #bfe3ed;
  --danger: #ff9499;
  --danger-border: #6b3336;
  --warning: #f0b160;
  --toast-bg: #ececef;
  --toast-text: #1d1d1f;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--brand-text); }
:focus-visible { outline: 2px solid var(--brand-text); outline-offset: 2px; }

/* Top bar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 20px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}
.brand { font-weight: 700; font-size: 17px; color: var(--brand-text); text-decoration: none; letter-spacing: -0.01em; white-space: nowrap; }
.brand { display: flex; align-items: center; flex: none; }
.brand img { display: block; height: 40px; width: auto; border-radius: 6px; }
@media (max-width: 520px) { .brand img { height: 34px; } }
.actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.theme-btn { order: 1; flex: none; margin-left: -8px; font-size: 19px; color: var(--ink); }
.about-btn { order: 1; flex: none; margin-left: -4px; }
.about-btn .about-icon { display: none; font-size: 18px; line-height: 1; }
.save-state { font-size: 13px; color: var(--muted); margin-right: 6px; white-space: nowrap; }

.segmented { display: inline-flex; padding: 3px; background: var(--subtle); border-radius: 9px; }
.segmented button {
  border: 0;
  background: none;
  padding: 5px 16px;
  min-height: 32px;
  border-radius: 7px;
  font-weight: 600;
  color: var(--muted);
}
.segmented button[aria-pressed='true'] { background: var(--segment-active); color: var(--ink); box-shadow: 0 1px 2px rgb(0 0 0 / 0.14); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 7px 14px;
  background: var(--panel);
  color: var(--ink);
  border: 1px solid var(--field-border);
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { background: var(--hover); }
.btn:disabled { opacity: 0.6; cursor: progress; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.btn-primary:hover { background: var(--brand-dark); }
.btn-danger { color: var(--danger); border-color: var(--danger-border); }

.link-btn { border: 0; background: none; padding: 4px 0; color: var(--brand-text); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

/* Layout */
.workspace { display: grid; grid-template-columns: minmax(420px, 1fr) minmax(0, 1.15fr); height: calc(100% - var(--topbar-h)); }
.editor { overflow-y: auto; border-right: 1px solid var(--line); }
.editor-inner { max-width: 680px; margin: 0 auto; padding: 18px 20px 48px; }
.version { margin: 18px 0 0; font-size: 12px; color: var(--muted); text-align: center; }
.profile-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.profile-bar label { font-size: 13px; font-weight: 600; color: var(--label); }
.profile-bar select, .profile-row input {
  min-height: 38px;
  padding: 6px 10px;
  background: var(--field-bg);
  border: 1px solid var(--field-border);
  border-radius: 8px;
}
.profile-bar select { flex: 1; min-width: 0; font-weight: 600; }
.profile-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; max-height: 50vh; overflow-y: auto; }
.profile-row { display: flex; gap: 8px; }
.premium-tag { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: var(--selected-bg); color: var(--selected-text); font-size: 11px; font-weight: 700; letter-spacing: 0.02em; vertical-align: middle; }
.template-choice .premium-tag { display: block; width: fit-content; margin: 3px auto 0; }
.template-choice.is-locked .template-thumb { opacity: 0.8; }
.address-choice.is-locked { cursor: default; opacity: 0.75; }
.address-upgrade { align-self: flex-start; margin-left: 26px; font-size: 13px; }
.section-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.section-tools .btn:last-child { margin-left: auto; }
.add-section { margin-top: 4px; }
.add-section .field-hint { margin-top: 6px; }
.add-section-hint { margin: 6px 2px 0; }
.premium-list { margin: 10px 0 14px; padding-left: 20px; display: flex; flex-direction: column; gap: 5px; }
.address-picker { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.address-choice { display: flex; align-items: flex-start; gap: 9px; cursor: pointer; }
.address-choice input { margin-top: 4px; }
.address-choice > span { display: flex; flex-direction: column; font-size: 14px; }
.address-input { display: flex; align-items: center; gap: 4px; padding-left: 26px; font-size: 14px; }
.address-input span { white-space: nowrap; }
.address-input input { flex: 1; min-width: 0; min-height: 38px; padding: 6px 10px; background: var(--field-bg); border: 1px solid var(--field-border); border-radius: 8px; }
.address-input input:disabled { opacity: 0.55; }
.address-picker .field-hint { padding-left: 26px; min-height: 1em; }
.field-hint.is-error { color: var(--danger); }
.field-hint.is-ok { color: var(--brand-text); font-weight: 600; }
.change-address { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.change-address summary { cursor: pointer; font-weight: 600; font-size: 14px; }
.change-address > p { margin: 8px 0 0; }
.export-list { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.export-row { display: flex; align-items: center; gap: 8px; }
.export-text { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 14px; }
.profile-row input { flex: 1; min-width: 0; }
.editor-intro { margin-bottom: 14px; }
.editor-intro p { margin: 0 0 4px; color: var(--muted); }
.editor-tools { display: flex; gap: 16px; font-size: 14px; }

/* Cards */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 10px; }
.card > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 48px;
  padding: 10px 16px;
  cursor: pointer;
  font-weight: 650;
  list-style: none;
  border-radius: var(--radius);
}
.card > summary::-webkit-details-marker { display: none; }
.card > summary::after { content: ''; width: 8px; height: 8px; flex: none; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg) translate(-2px, -2px); transition: transform 0.12s; }
.card[open] > summary::after { transform: rotate(225deg) translate(-2px, -2px); }
.count { margin-left: 8px; font-weight: 500; color: var(--muted); font-size: 13px; }
.card-title { flex: 1; }
.drag-handle { flex: none; width: 30px; height: 32px; margin: -4px -2px -4px -8px; padding: 0; border: 0; border-radius: 6px; background: none; color: var(--muted); font-size: 15px; font-weight: 700; letter-spacing: -3px; line-height: 1; cursor: grab; touch-action: none; }
.drag-handle:hover { background: var(--icon-hover); color: var(--ink); }
.sections-hint { margin: 4px 2px 10px; }
.section-list.is-sorting { user-select: none; -webkit-user-select: none; }
.section-list.is-sorting, .section-list.is-sorting * { cursor: grabbing !important; }
/* While a card is held, every card folds up to its title bar. */
.section-list.is-sorting .card-body { display: none; }
.section-list.is-sorting .card > summary::after { display: none; }
.card.is-dragging { position: relative; z-index: 6; border-color: var(--brand-text); box-shadow: 0 10px 28px rgb(0 0 0 / 0.28); }
.card-body { padding: 2px 16px 16px; }

.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field.wide { grid-column: 1 / -1; }
.field > label, .field-label { font-size: 13px; font-weight: 600; color: var(--label); }
.field input, .field textarea, .field select {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  background: var(--field-bg);
  border: 1px solid var(--field-border);
  border-radius: 7px;
}
.field input::placeholder, .field textarea::placeholder { color: var(--muted); opacity: 1; }
.field textarea { resize: vertical; min-height: 96px; line-height: 1.4; }
.field input:focus, .field textarea:focus, .field select:focus { outline: 2px solid var(--brand-text); outline-offset: -1px; border-color: var(--brand-text); }
.field-hint { margin: 0; font-size: 12.5px; color: var(--muted); }

.entry-card { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px 14px; margin-bottom: 10px; background: var(--entry-bg); }
.entry-bar { display: flex; align-items: center; gap: 4px; margin-bottom: 8px; min-height: 32px; }
.entry-name { flex: 1; min-width: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.entry-name.is-empty { color: var(--muted); font-weight: 500; }
.icon-btn { width: 34px; height: 34px; display: inline-grid; place-items: center; border: 0; border-radius: 6px; background: none; color: var(--muted); font-size: 15px; }
.icon-btn:hover:not(:disabled) { background: var(--icon-hover); color: var(--ink); }
.icon-btn:disabled { opacity: 0.3; cursor: default; }
.add-btn { width: 100%; border-style: dashed; color: var(--brand-text); background: none; }

.photo-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.photo-thumb { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; background: var(--subtle); }
.photo-row { position: relative; }
.field input.visually-hidden { position: absolute; width: 1px; height: 1px; min-height: 0; padding: 0; border: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.visually-hidden:focus-visible + .btn { outline: 2px solid var(--brand-text); outline-offset: 2px; }

.choices { display: flex; flex-wrap: wrap; gap: 6px; }
.choice { padding: 6px 13px; min-height: 36px; border: 1px solid var(--field-border); border-radius: 7px; background: var(--field-bg); font-weight: 600; }
.choice[aria-pressed='true'] { border-color: var(--brand-text); background: var(--selected-bg); color: var(--selected-text); box-shadow: inset 0 0 0 1px var(--brand-text); }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.swatch { width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--panel); box-shadow: 0 0 0 1px var(--field-border); padding: 0; }
.swatch[aria-pressed='true'] { box-shadow: 0 0 0 2px var(--ink); }
.custom-color { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.custom-color input { width: 36px; height: 32px; padding: 0; border: 1px solid var(--field-border); border-radius: 6px; background: none; }

/* Template picker. Each thumbnail is a real render, scaled from page width (794px) to 112px. */
.template-group + .template-group { margin-top: 12px; }
.template-group-title { margin: 0 0 6px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.template-grid { display: grid; grid-template-columns: repeat(auto-fill, 112px); gap: 12px 10px; justify-content: space-between; align-items: start; }
.template-item { position: relative; width: 112px; }
.star-btn { position: absolute; top: 5px; right: 5px; z-index: 2; width: 26px; height: 26px; padding: 0; display: flex; align-items: center; justify-content: center; border: 0; border-radius: 50%; background: rgb(255 255 255 / 0.92); color: #5d5d64; font-size: 16px; line-height: 1; box-shadow: 0 0 0 1px rgb(0 0 0 / 0.18); }
.star-btn:hover { color: #1d1d1f; box-shadow: 0 0 0 1.5px rgb(0 0 0 / 0.4); }
.star-btn.is-starred { color: #c98900; background: #fff8e1; box-shadow: 0 0 0 1.5px #e0a800; }
.template-choice { display: block; width: 112px; padding: 0; border: 0; background: none; border-radius: 6px; text-align: center; font-size: 13px; color: var(--ink); }
.template-thumb { display: block; position: relative; width: 112px; height: 158px; margin-bottom: 4px; overflow: hidden; background: #fff; border-radius: 5px; box-shadow: 0 0 0 1px var(--field-border); }
.template-choice:hover .template-thumb { box-shadow: 0 0 0 2px var(--muted); }
.template-choice[aria-pressed='true'] .template-thumb { box-shadow: 0 0 0 2.5px var(--brand-text); }
.template-choice[aria-pressed='true'] .template-name { font-weight: 700; color: var(--brand-text); }
.template-render { display: block; width: 794px; transform: scale(0.141); transform-origin: 0 0; pointer-events: none; }
.template-note { display: block; font-size: 11.5px; color: var(--muted); }

/* Preview. The page itself stays white in both themes, because that's what gets printed. */
.preview { position: relative; overflow-y: auto; background: var(--stage); padding: 12px 24px 40px; }
.preview-meta { display: flex; justify-content: flex-end; min-height: 24px; margin-bottom: 8px; }
.page-count { font-size: 13px; color: var(--stage-text); }
.page-count.is-warning { color: var(--warning); font-weight: 600; }
.preview-stage { width: 100%; }
.preview-page { margin: 0 auto; overflow: hidden; } /* the pages inside draw their own paper and shadow */
#preview-frame { display: block; border: 0; transform-origin: 0 0; background: transparent; color-scheme: light; }

/* Mobile view switch */
.tabbar { display: none; }

/* Dialog */
.dialog { width: min(480px, calc(100vw - 32px)); padding: 22px; border: 0; border-radius: 12px; background: var(--panel); box-shadow: 0 20px 60px rgb(0 0 0 / 0.3); color: var(--ink); }
.dialog::backdrop { background: rgb(20 20 25 / 0.45); }
.dialog h2 { margin: 0 0 8px; font-size: 19px; }
.dialog p { margin: 0 0 12px; }
.dialog .muted { color: var(--muted); font-size: 14px; }
.link-row { display: flex; gap: 8px; margin-bottom: 10px; }
.link-row input { flex: 1; min-width: 0; min-height: 40px; padding: 8px 10px; border: 1px solid var(--field-border); border-radius: 7px; background: var(--readonly-bg); }
.link-status { font-size: 14px; color: var(--muted); }
.link-status.is-stale { color: var(--warning); font-weight: 600; }
.dialog-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.dialog-actions .spacer { flex: 1; }

.account-email { font-weight: 600; overflow-wrap: anywhere; }
.other-links { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.other-links h3 { margin: 0 0 6px; font-size: 14px; }
.other-link { display: flex; align-items: center; gap: 10px; min-height: 36px; font-size: 14px; }
.other-link a { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person-list, .plain-list { list-style: none; margin: 8px 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.plain-list { list-style: disc; padding-left: 20px; gap: 4px; }
.person-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 10px; border: 1px solid var(--field-border); border-radius: 8px; }
.person-name { flex: 1 1 14rem; min-width: 0; overflow-wrap: anywhere; font-weight: 600; }
.person-name .muted { font-weight: 400; }
.person-role { font-size: 13px; color: var(--muted); }
.invite-form { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.invite-row { display: flex; gap: 8px; }
.invite-row input { flex: 1; min-width: 0; }
.badge { flex: none; }
.switch-row { display: flex; flex-direction: row; align-items: center; gap: 8px; font-weight: 600; cursor: pointer; }
.switch-row input { width: 18px; height: 18px; flex: none; }
.range-field label { display: flex; justify-content: space-between; gap: 12px; }
.range-value { font-weight: 400; color: var(--muted); font-variant-numeric: tabular-nums; }
.range-field input[type='range'] { width: 100%; accent-color: var(--brand-text); }
.choice-note { font-size: 13px; color: var(--muted); }
.dialog p.choice-note { margin-bottom: 4px; }
[hidden] { display: none !important; }

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--tabbar-h) + 20px);
  transform: translateX(-50%);
  z-index: 30;
  max-width: min(520px, calc(100vw - 32px));
  padding: 10px 16px;
  background: var(--toast-bg);
  color: var(--toast-text);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgb(0 0 0 / 0.25);
}

@media (max-width: 1000px) {
  :root { --topbar-h: 104px; --tabbar-h: 56px; }
  .topbar { flex-wrap: wrap; align-content: center; gap: 8px 12px; padding: 8px 14px; }
  .actions { flex: 1 1 100%; margin-left: 0; order: 3; }
  .actions .btn { flex: 1; padding-inline: 8px; }
  .wide-only { display: none; }
  .save-state { display: none; }
  .segmented { margin-left: auto; }
  .theme-btn { margin-left: -4px; }

  .workspace { display: block; height: calc(100% - var(--topbar-h) - var(--tabbar-h)); }
  .editor, .preview { height: 100%; }
  .editor { border-right: 0; }
  body[data-view='edit'] .preview, body[data-view='preview'] .editor { display: none; }
  .editor-inner { padding: 14px 14px 32px; }
  .preview { padding: 10px 12px 24px; }

  .tabbar {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 10;
    height: var(--tabbar-h);
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: var(--panel);
    border-top: 1px solid var(--line);
  }
  .tabbar button { border: 0; background: none; font-weight: 600; color: var(--muted); }
  .tabbar button[aria-current='true'] { color: var(--brand-text); box-shadow: inset 0 2.5px 0 var(--brand-text); }
}

@media (max-width: 520px) {
  .about-btn { padding-inline: 10px; min-width: 38px; }
  .about-btn .about-text { display: none; }
  .about-btn .about-icon { display: inline; }
  .fields { grid-template-columns: minmax(0, 1fr); }
  /* 16px stops iOS zooming into focused fields. */
  .field input, .field textarea, .field select, .link-row input { font-size: 16px; }
}

/* About and privacy page */
.doc-body { height: auto; min-height: 100%; background: var(--bg); }
.doc-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px; background: var(--panel); border-bottom: 1px solid var(--line); }
.doc-page { max-width: 760px; margin: 0 auto; padding: 24px 20px 72px; line-height: 1.6; }
.doc-page section { margin-top: 32px; padding-top: 8px; }
.doc-page h1 { margin: 0 0 10px; font-size: 26px; line-height: 1.25; }
.doc-page h2 { margin: 26px 0 6px; font-size: 18px; line-height: 1.3; }
.doc-page p, .doc-page ul { margin: 0 0 12px; }
.doc-page ul { padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
.doc-page .muted { color: var(--muted); }
.doc-page code { padding: 1px 5px; border-radius: 4px; background: var(--subtle); font-size: 0.92em; }
.doc-toc { display: flex; flex-wrap: wrap; gap: 8px 18px; padding-bottom: 12px; border-bottom: 1px solid var(--line); font-weight: 600; }
.doc-table-wrap { overflow-x: auto; margin: 10px 0 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.doc-table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.45; }
.doc-table th, .doc-table td { padding: 9px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.doc-table th { background: var(--subtle); font-size: 13px; }
.doc-table tr:last-child td { border-bottom: 0; }
.doc-table td:first-child { min-width: 9em; font-weight: 600; }
@media (max-width: 520px) { .doc-page { padding: 16px 16px 56px; } .doc-page h1 { font-size: 23px; } }

/* Contact form */
.contact-form { display: flex; flex-direction: column; gap: 12px; max-width: 560px; margin-top: 14px; }
.contact-form .field-hint { text-align: right; }
.contact-form .btn { align-self: flex-start; }
.contact-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.contact-status { min-height: 1.4em; margin: 0; font-weight: 600; }
.contact-status.is-ok { color: var(--brand-text); }
.contact-status.is-error { color: var(--danger); }

/* Import */
.dialog-wide { width: min(640px, calc(100vw - 32px)); }
.import-text { display: block; width: 100%; min-height: 220px; margin-top: 12px; padding: 10px 12px; resize: vertical; background: var(--field-bg); border: 1px solid var(--field-border); border-radius: 8px; font-family: ui-monospace, 'Cascadia Mono', Consolas, Menlo, monospace; font-size: 13px; line-height: 1.5; }
.import-report { margin-top: 10px; font-size: 14px; }
.import-report p { margin: 6px 0 0; }
.import-report ul { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.import-report .tick { margin-right: 8px; color: var(--brand-text); font-weight: 700; }
.import-heading { font-weight: 600; }
.import-report .is-warning, .dialog .is-warning { color: var(--warning); }
.dialog .import-report p { margin-bottom: 0; }
.dialog .address-picker { margin-top: 12px; }

/* Link passwords */
.password-picker { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.password-row { display: flex; flex-wrap: wrap; gap: 8px; padding-left: 26px; }
.password-row[hidden] { display: none; }
.password-row input { flex: 1; min-width: 10rem; min-height: 38px; padding: 6px 10px; background: var(--field-bg); border: 1px solid var(--field-border); border-radius: 8px; }
.password-row .field-hint { flex: 1 1 100%; margin: 0; min-height: 1em; }
.change-address .password-row { padding-left: 0; }
.link-locked { margin: 0 0 10px; font-size: 14px; font-weight: 600; color: var(--brand-text); }

.archive-switch { margin: 4px 0 12px; }
.archive-switch input:disabled + span { opacity: 0.75; }
