/* Stoei Card — app-specific layout only.
 * The Stoei Core kit in /ds/ (tokens, base, stoei, app-shell) provides the
 * reset, base type, buttons, cards, inputs and the auth card. The look
 * (colours, fonts, corners) is set in public/css/theme.css. Everything here
 * reads the --st-* settings only: no hardcoded look values.
 * Check: php tools/check-css.php (in Stoei Core) with the kit files,
 * theme.css and this file. */

/* ─── Auth screen extras (on top of .st-auth-wrap/.st-auth-card) ─── */
/* Light/dark switch, top-right of the login screen */
.fc-auth-theme {
    position: fixed;
    top: max(0.75rem, env(safe-area-inset-top));
    right: max(0.75rem, env(safe-area-inset-right));
    color: var(--st-color-text-soft);
}
.fc-auth-logo {
    display: flex;
    flex-direction: column;
    gap: var(--st-space-2);
    font-size: var(--st-text-14);
    margin-bottom: var(--st-space-2);
}
.fc-auth-stoei {
    font-style: italic;
}
.fc-auth-tagline {
    margin-bottom: var(--st-space-6);
    font-size: var(--st-text-5);
}
.fc-field {
    display: block;
    margin-bottom: var(--st-space-4);
}
.fc-field .st-label {
    display: block;
    margin-bottom: var(--st-space-1);
}
.fc-hint {
    margin: -0.5rem 0 var(--st-space-4);
    font-size: var(--st-text-1);
}
.fc-auth-error {
    margin: 0 0 var(--st-space-4);
    color: var(--st-color-accent);
    font-size: var(--st-text-3);
}
.fc-auth-submit,
.fc-editor-save .st-btn,
.fc-pc-actions .st-btn,
.fc-pc-link, .fc-pc-cta {
    width: 100%;
    justify-content: center;
}

/* ─── App shell ─────────────────────────────────────────────────── */
.fc-topbar {
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--st-space-3);
    padding: var(--st-space-3) var(--st-space-4);
    padding-top: max(0.75rem, env(safe-area-inset-top));
    background: var(--st-color-sidebar);
    border-bottom: 1px solid var(--st-color-sidebar-line);
}
.fc-brand {
    font-size: var(--st-text-10);
    text-decoration: none;
}
.fc-brand:hover {
    text-decoration: none;
    opacity: 1;
}
/* "Lock" button in the Vault view header sits to the right */
.fc-vault-lock {
    margin-left: auto;
}

/* ─── Burger + off-canvas drawer nav ────────────────────────────── */
.fc-burger {
    background: none;
    border: none;
    color: var(--st-color-on-sidebar); /* the top bar is dark in both themes */
    font-size: var(--st-text-10);
    line-height: 1;
    padding: var(--st-space-1) var(--st-space-2);
    cursor: pointer;
    flex-shrink: 0;
}
/* Search lives in the sticky top bar (Home only) */
/* Light/dark switch, beside the menu button in the dark top bar */
.fc-topbar-theme {
    color: var(--st-color-on-sidebar);
}
.fc-burger-dark {
    color: var(--st-color-on-sidebar);
    font-size: var(--st-text-8);
}
.fc-nav-overlay {
    position: fixed;
    inset: 0;
    background: var(--st-color-backdrop);
    z-index: 30;
}
.fc-drawer-nav {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: min(82vw, 280px);
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    z-index: 31;
    padding: var(--st-space-3);
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    overflow-y: auto;
    padding-top: max(0.75rem, env(safe-area-inset-top));
}
.fc-drawer-nav.open {
    transform: translateX(0);
}
.fc-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--st-space-3);
    padding: var(--st-space-1);
}
.fc-drawer-foot {
    margin-top: auto;
    border-top: 1px solid var(--st-color-sidebar-line);
    padding-top: var(--st-space-2);
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.fc-main {
    max-width: 720px;
    margin: 0 auto;
    padding: var(--st-space-4) var(--st-space-4) var(--st-space-10);
}
.fc-loading,
.fc-empty {
    text-align: center;
    padding: var(--st-space-8) 0;
}

/* ─── View header: title + primary action, left-aligned ─────────── */
.fc-view-head {
    display: flex;
    align-items: baseline;
    gap: var(--st-space-4);
    margin: var(--st-space-1) 0 var(--st-space-4);
}
.fc-title {
    font-size: var(--st-text-13);
}

/* Muted text action (New category / Add field) — accent on hover, never a
 * loud filled button, never top-right. */
.fc-action-link {
    background: none;
    border: none;
    padding: 0;
    font-family: inherit;
    font-size: var(--st-text-3);
    font-weight: 600;
    color: var(--st-color-text-muted);
    cursor: pointer;
    transition: color var(--st-motion);
}
.fc-action-link:hover {
    color: var(--st-color-accent);
}
.fc-add-field {
    margin: var(--st-space-2) 0 0.1rem;
}

/* ─── Accordion sections + quick-jump chips (Home) ──────────────── */
.fc-acc-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--st-space-2);
    width: 100%;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    /* Buttons don't inherit text colour by default — without this the heading
       inside renders in the UA's dark button colour (dark-on-dark in dark mode). */
    color: inherit;
    text-align: left;
    padding: var(--st-space-2) var(--st-space-2) var(--st-space-2);
}
.fc-acc-chevron {
    color: var(--st-color-text-muted);
    flex-shrink: 0;
    transition: transform 0.15s ease;
}
.fc-accordion.collapsed .fc-acc-chevron {
    transform: rotate(-90deg);
}
.fc-accordion.collapsed .fc-acc-body {
    display: none;
}
.fc-acc-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--st-space-3);
    flex-wrap: wrap;
    margin-bottom: var(--st-space-3);
}
.fc-chips,
.fc-card-row-actions,
.fc-ed-optbtns,
.fc-user-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--st-space-2);
}
.fc-chip {
    cursor: pointer;
}
.fc-acc-all {
    display: flex;
    gap: var(--st-space-3);
}

/* Inactive section panels stay mounted in the DOM (auto-save queue, open
   ⚙ options, etc. survive a tab switch) — just hidden. */
.fc-panel-hidden {
    display: none;
}

/* ─── Category cards ────────────────────────────────────────────── */
.fc-category {
    padding: var(--st-space-2) var(--st-space-2) var(--st-space-3);
    margin-bottom: var(--st-space-4);
}
.fc-cat-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--st-space-2);
    padding: var(--st-space-2) var(--st-space-2) var(--st-space-2);
}
.fc-cat-name {
    font-size: var(--st-text-7);
    font-weight: 700;
}
.fc-cat-actions {
    display: flex;
    gap: 0.1rem;
    flex-shrink: 0;
}
.fc-cat-edit {
    display: flex;
    align-items: center;
    gap: var(--st-space-2);
    width: 100%;
}
.fc-cat-edit .st-input {
    flex: 1;
}

/* Square icon buttons with adequate touch targets (override .st-btn--ghost) */
.fc-icon {
    justify-content: center;
    min-width: 2.2rem;
    min-height: 2.2rem;
    padding: var(--st-space-1);
    border-color: transparent;
    font-size: var(--st-text-5);
    line-height: 1;
}

/* ─── Field rows ────────────────────────────────────────────────── */
.fc-fields,
.fc-drawer-line,
.fc-cd-flist {
    display: flex;
    flex-direction: column;
}
.fc-field-row {
    display: flex;
    align-items: center;
    gap: var(--st-space-2);
    padding: var(--st-space-2);
    border-top: 1px solid var(--st-color-line);
}
.fc-field-main,
.fc-addr-line .fc-field-main {
    flex: 1;
    min-width: 0;
}
.fc-field-label {
    display: block;
    margin-bottom: 0.1rem;
}
.fc-value {
    display: block;
    font-size: var(--st-text-5);
    color: var(--st-color-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.fc-value-empty {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    padding: 0.1rem 0;
    font-family: inherit;
    font-size: var(--st-text-5);
    color: var(--st-color-text-muted);
    font-style: italic;
    cursor: pointer;
}
/* Tap the value itself to copy (frontend) */
.fc-copyable {
    cursor: pointer;
}
.fc-copyable:active {
    color: var(--st-color-accent);
}
.fc-field-actions {
    display: flex;
    align-items: center;
    gap: var(--st-space-1);
    flex-shrink: 0;
}
/* Primary copy affordance — icon + text, touch-friendly on mobile & desktop. */
.fc-copy {
    min-height: 2.4rem;
    padding: var(--st-space-2) var(--st-space-4);
    font-size: var(--st-text-3);
    font-weight: 600;
}

/* Field picker grouping (Cards) */
.fc-avail-cat {
    margin-top: var(--st-space-2);
}
.fc-avail-cat-name {
    display: block;
    margin: var(--st-space-2) 0 0.1rem;
}

/* ─── Entities (sub-headings inside a section) ───────────────────── */
.fc-entity {
    border-top: 1px solid var(--st-color-line);
    margin-top: var(--st-space-2);
    padding: var(--st-space-1) var(--st-space-1) var(--st-space-1);
}
.fc-entity-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--st-space-2);
    padding: var(--st-space-1) var(--st-space-1) var(--st-space-1);
}
.fc-entity-name,
.fc-drawer-title {
    font-weight: 700;
    font-size: var(--st-text-5);
}
.fc-entity-form {
    display: flex;
    flex-direction: column;
    gap: var(--st-space-2);
    padding: var(--st-space-3);
    margin: var(--st-space-2) 0;
}

/* ─── Inline field editor (Admin auto-save) ─────────────────────── */
.fc-fe {
    padding: var(--st-space-2) var(--st-space-2);
    border-top: 1px solid var(--st-color-line);
}
.fc-fe-row,
.fc-card-row-main,
.fc-cd-head {
    display: flex;
    align-items: center;
    gap: var(--st-space-2);
}
.fc-fe-label {
    flex: 1;
    min-width: 0;
    font-weight: 600;
}
.fc-fe-val {
    margin-top: var(--st-space-1);
}
.fc-fe-opts {
    display: flex;
    gap: var(--st-space-2);
    margin-top: var(--st-space-2);
    flex-wrap: wrap;
}
.fc-fe-opt {
    display: flex;
    flex-direction: column;
    gap: var(--st-space-1);
    flex: 1;
    min-width: 140px;
}
/* Section/entity name inputs read as headings until focused */
.fc-sec-name,
.fc-ent-name {
    flex: 1;
    min-width: 0;
    border-color: transparent;
    background: transparent;
    font-weight: 700;
    font-family: var(--st-font-display);
}
.fc-sec-name {
    font-size: var(--st-text-7);
    letter-spacing: 0.01em;
}
.fc-sec-name:focus,
.fc-ent-name:focus {
    border-color: var(--st-color-accent);
    background: var(--st-color-bg);
}

/* ─── Inline forms ──────────────────────────────────────────────── */
.fc-cat-form {
    display: flex;
    flex-direction: column;
    gap: var(--st-space-3);
    margin-bottom: var(--st-space-4);
}
.fc-field-form,
.fc-group-form {
    display: flex;
    flex-direction: column;
    gap: var(--st-space-2);
    padding: var(--st-space-3) var(--st-space-2);
    border-top: 1px solid var(--st-color-line);
}
.fc-form-actions,
.fc-ed-addbtns {
    display: flex;
    gap: var(--st-space-2);
}

/* ─── Admin: add actions, group form, drawers ───────────────────── */
.fc-add-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--st-space-4);
    margin: var(--st-space-2) 0 0.1rem;
}
.fc-value-multi {
    white-space: pre-wrap;
    overflow: visible;
}
.fc-opt {
    font-weight: 400;
    text-transform: none;
    letter-spacing: normal;
    color: var(--st-color-text-faint);
}

/* A repeatable structured item (e.g. an address) */
.fc-drawer {
    padding: var(--st-space-2);
    border-top: 1px solid var(--st-color-line);
}
.fc-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--st-space-2);
}
/* Subsection accordion: the heading toggles; "Copy all" stays put alongside. */
.fc-ent-toggle {
    display: flex;
    align-items: center;
    gap: var(--st-space-2);
    flex: 1;
    min-width: 0;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    color: inherit;
    padding: 0.15rem 0;
}
.fc-ent-accordion.collapsed .fc-ent-toggle .fc-acc-chevron {
    transform: rotate(-90deg);
}
.fc-ent-accordion.collapsed .fc-ent-body {
    display: none;
}
.fc-drawer-body {
    display: flex;
    flex-direction: column;
    gap: var(--st-space-1);
    margin-top: var(--st-space-1);
    padding-left: var(--st-space-1);
}

/* Frontend: a copyable address line (label/value + its own Copy button) */
.fc-addr-line {
    display: flex;
    align-items: center;
    gap: var(--st-space-2);
    padding: var(--st-space-1) 0;
}
.fc-copy-sm {
    min-height: 2rem;
    padding: var(--st-space-1) var(--st-space-2);
    font-size: var(--st-text-1);
}

/* ─── Search bar (frontend) ─────────────────────────────────────── */
.fc-search-bar {
    position: sticky;
    top: 0;
    z-index: 4;
    max-width: 720px;
    margin: 0 auto;
    padding: var(--st-space-3) var(--st-space-4) var(--st-space-1);
    background: var(--st-color-bg);
}
.fc-search {
    width: 100%;
}

/* ─── Auth switch / multi-user bits ─────────────────────────────── */
.fc-auth-switch {
    margin-top: var(--st-space-4);
    text-align: center;
    font-size: var(--st-text-3);
}
.fc-admin-notice {
    display: block;
    margin-bottom: var(--st-space-4);
    padding: var(--st-space-3) var(--st-space-4);
    background: var(--st-color-accent-tint);
    color: var(--st-color-accent);
    font-weight: 600;
    border: 1px solid var(--st-color-accent);
}
.fc-pending-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--st-space-3);
    flex-wrap: wrap;
    padding: var(--st-space-2) 0;
    border-top: 1px solid var(--st-color-line);
}

/* ─── Publish toggles ───────────────────────────────────────────── */
.fc-pubtoggle {
    background: none;
    border: 1px solid var(--st-color-line);
    color: var(--st-color-text-muted);
    border-radius: var(--st-radius-full);
    padding: var(--st-space-1) var(--st-space-3);
    font-size: var(--st-text-1);
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    flex-shrink: 0;
}
.fc-pub-name {
    flex: 1;
    min-width: 0;
    font-size: var(--st-text-5);
}

/* ─── Settings cards ────────────────────────────────────────────── */
.fc-settings-card {
    margin-bottom: var(--st-space-4);
    padding: var(--st-space-5);
}
.fc-settings-card .fc-cat-name {
    margin-bottom: var(--st-space-2);
}
.fc-settings-note {
    margin-bottom: var(--st-space-4);
}
.fc-settings-status {
    margin-left: var(--st-space-2);
    font-size: var(--st-text-3);
}

/* ─── Cards builder ─────────────────────────────────────────────── */
.fc-card-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--st-space-3);
    padding: var(--st-space-4) var(--st-space-4);
    margin-bottom: var(--st-space-3);
    flex-wrap: wrap;
}
.fc-toggle {
    display: flex;
    align-items: center;
    gap: var(--st-space-2);
    margin: var(--st-space-2) 0 var(--st-space-3);
    font-size: var(--st-text-3);
    cursor: pointer;
}
.fc-block-body {
    display: flex;
    flex-direction: column;
    gap: var(--st-space-2);
    padding: var(--st-space-2);
}
.fc-block-item {
    border-top: 1px solid var(--st-color-line);
    padding-top: var(--st-space-2);
    display: flex;
    flex-direction: column;
    gap: var(--st-space-2);
}
.fc-vr,
.fc-cd-pv-top,
.fc-set-intro {
    display: flex;
    flex-direction: column;
    gap: var(--st-space-1);
}
.fc-add-block {
    padding: var(--st-space-4);
    margin-bottom: var(--st-space-4);
    display: flex;
    flex-direction: column;
    gap: var(--st-space-2);
}
.fc-editor-save {
    position: sticky;
    bottom: 0;
    padding: var(--st-space-3) 0;
    background: linear-gradient(transparent, var(--st-color-bg) 45%);
}

/* "Save contact" CTA on public card / profile */
.fc-pc-actions {
    display: flex;
    margin: var(--st-space-2) 0 var(--st-space-3);
}

/* ─── Reminders (Home) ──────────────────────────────────────────── */
.fc-reminders {
    margin-bottom: var(--st-space-4);
    border-left: 3px solid var(--st-color-accent);
}
.fc-reminders .fc-cat-name {
    color: var(--st-color-accent);
}
.fc-rem-name {
    display: block;
    font-weight: 600;
    font-size: var(--st-text-5);
}
.fc-rem-date {
    font-size: var(--st-text-1);
}
.fc-rem-tag {
    font-size: var(--st-text-1);
    color: var(--st-color-accent);
    font-weight: 600;
    text-transform: none;
    letter-spacing: normal;
}

/* ─── QR code block ─────────────────────────────────────────────── */
.fc-qr {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--st-space-2);
    margin-top: var(--st-space-5);
    padding-top: var(--st-space-4);
    border-top: 1px solid var(--st-color-line);
}
.fc-qr img {
    width: 180px;
    height: 180px;
    image-rendering: pixelated;
    background: var(--st-color-qr-bg);
    border-radius: var(--st-radius-1);
    padding: var(--st-space-2);
}

/* ─── Public card page ──────────────────────────────────────────── */
.fc-public {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
.fc-card-public {
    max-width: 480px;
    width: 100%;
}
.fc-pc-card {
    display: flex;
    flex-direction: column;
    gap: var(--st-space-4);
    padding: var(--st-space-6);
    margin-top: var(--st-space-4);
}
.fc-pc-identity {
    text-align: center;
}
.fc-pc-name {
    font-size: var(--st-text-13);
}
.fc-pc-title {
    color: var(--st-color-text-muted);
    margin-top: 0.15rem;
}
.fc-pc-socials {
    display: flex;
    flex-wrap: wrap;
    gap: var(--st-space-2);
    justify-content: center;
}
.fc-pc-bio {
    line-height: 1.6;
}
.fc-public-footer {
    margin-top: auto;
    text-align: center;
    padding: var(--st-space-5);
}

/* ─── Modal dialogs (on-brand confirm/prompt) ───────────────────── */
.fc-modal-overlay {
    position: fixed;
    inset: 0;
    background: var(--st-color-backdrop);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--st-space-4);
    z-index: 50;
}
.fc-modal {
    background: var(--st-color-surface);
    border: 1px solid var(--st-color-line);
    border-radius: var(--st-radius-3);
    box-shadow: var(--st-shadow-3);
    padding: var(--st-space-5);
    width: 100%;
    max-width: 380px;
}
.fc-modal-title {
    font-size: var(--st-text-7);
    margin-bottom: var(--st-space-2);
}
.fc-modal-body {
    margin-bottom: var(--st-space-4);
    line-height: 1.5;
}
.fc-modal-body .st-input {
    margin-top: var(--st-space-2);
}
.fc-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: var(--st-space-2);
}

/* ─── Toast (one-tap copy confirmation) ─────────────────────────── */
.fc-toast {
    position: fixed;
    left: 50%;
    bottom: calc(1.75rem + env(safe-area-inset-bottom));
    transform: translate(-50%, 0.75rem);
    background: var(--st-color-text);
    color: var(--st-color-surface);
    padding: var(--st-space-3) var(--st-space-5);
    border-radius: var(--st-radius-full);
    font-size: var(--st-text-5);
    font-weight: 600;
    box-shadow: var(--st-shadow-2);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--st-motion),
        transform var(--st-motion);
    z-index: 20;
}
.fc-toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* ─── Mobile: stack the copy button under the text, full width ──── */
@media (max-width: 480px) {
    .fc-field-row,
    .fc-addr-line,
    .fc-drawer-head,
    .fc-fe-row {
        flex-direction: column;
        align-items: stretch;
        gap: var(--st-space-2);
    }
    /* All these rows stack on mobile, so let their actions span the full width
       and sit on their own line. On the Edit field editor (`.fc-fe-row`) this
       gives the label input the whole first line instead of fighting the
       gear/reorder/delete icons for room. */
    .fc-field-row .fc-field-actions,
    .fc-addr-line .fc-field-actions,
    .fc-drawer-head .fc-field-actions,
    .fc-fe-row .fc-field-actions {
        width: 100%;
        justify-content: flex-end;
    }
    /* Copy buttons go full width and centred when stacked */
    .fc-copy {
        width: 100%;
        justify-content: center;
    }
    .fc-drawer-head .fc-copy {
        width: 100%;
    }
}

/* Forgot-password confirmation, shown right under its button */
.fc-auth-done {
    margin-top: var(--st-space-3);
    color: var(--st-color-ok);
}

/* ════════════════════════════════════════════════════════════════
   Spruce-up (13 Nov 2026) — from the "Stoei Card spruce-up" design.
   Light top bar, search under the heading, one-row chips, compact
   copy buttons beside each value, 44px touch targets. Spacing rhythm:
   8 / 12 / 16 / 24px.
════════════════════════════════════════════════════════════════ */
.fc-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* Top bar: paper background, logo + theme switch + menu */
.fc-topbar {
    min-height: 56px;
    /* Even 8px above and below the logo. No notch (safe-area) spacing: the
       pages don't ask to draw under the phone's bars (no viewport-fit=cover),
       because DuckDuckGo on Android reported that space anyway and left an
       empty band above the logo. */
    padding: var(--st-space-2) var(--st-space-2) var(--st-space-2) var(--st-space-4);
    background: var(--st-color-bg);
    border-bottom: 1px solid var(--st-color-line);
    gap: var(--st-space-2);
}
.fc-topbar .fc-brand {
    color: var(--st-color-text);
    margin-right: auto;
}
.fc-topbar .fc-brand .st-logo__app {
    color: var(--st-color-eyebrow);
}
.fc-topbar .fc-burger,
.fc-topbar .fc-topbar-theme {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: var(--st-radius-pill);
    color: var(--st-color-text-soft);
}
.fc-topbar .fc-burger:hover {
    background: var(--st-color-sunk);
}

/* Home: heading + search, above the rendered sections */
.fc-home-head {
    max-width: 720px;
    margin: 0 auto;
    padding: var(--st-space-4) var(--st-space-4) 0;
    display: flex;
    flex-direction: column;
    gap: var(--st-space-3);
}
.fc-home-head .fc-title {
    margin: 0;
}
.fc-search-field {
    display: flex;
    align-items: center;
    gap: var(--st-space-2);
    height: 44px;
    padding: 0 var(--st-space-3);
    border: 1px solid var(--st-color-line-strong);
    border-radius: var(--st-radius-5);
    background: var(--st-color-surface);
    color: var(--st-color-text-muted);
}
.fc-search-field:focus-within {
    border-color: var(--st-color-accent);
    box-shadow: var(--st-ring-field);
}
.fc-search-field input {
    flex: 1;
    min-width: 0;
    height: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    font-family: var(--st-font-body);
    font-size: var(--st-text-5);
    font-weight: 400;
    line-height: 1.375;
    color: var(--st-color-text);
}
.fc-home-main {
    padding-top: var(--st-space-3);
}

/* Chips: one row you swipe sideways */
.fc-acc-toolbar {
    flex-direction: column;
    flex-wrap: nowrap; /* with wrap, the column grows to the chips' full width */
    align-items: stretch;
    gap: var(--st-space-2);
    margin-bottom: var(--st-space-4);
}
.fc-chips-box {
    position: relative;
    width: 100%;
    min-width: 0;
}
.fc-chips {
    flex-wrap: nowrap;
    gap: var(--st-space-2);
    overflow-x: auto;
    scrollbar-width: none;
    scroll-behavior: smooth;
}
/* Soft fade on whichever side has more chips */
.fc-chips-box.fade-start .fc-chips {
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 56px);
    mask-image: linear-gradient(to right, transparent 0, #000 56px);
}
.fc-chips-box.fade-end .fc-chips {
    -webkit-mask-image: linear-gradient(to left, transparent 0, #000 56px);
    mask-image: linear-gradient(to left, transparent 0, #000 56px);
}
.fc-chips-box.fade-start.fade-end .fc-chips {
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 56px, #000 calc(100% - 56px), transparent 100%);
    mask-image: linear-gradient(to right, transparent 0, #000 56px, #000 calc(100% - 56px), transparent 100%);
}
.fc-chips-arrow {
    position: absolute;
    top: 0;
    z-index: 1;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid var(--st-color-line-strong);
    border-radius: var(--st-radius-pill);
    background: var(--st-color-raised);
    color: var(--st-color-text-soft);
    box-shadow: var(--st-shadow-1);
    cursor: pointer;
}
.fc-chips-arrow[hidden] {
    display: none;
}
.fc-chips-arrow:hover,
.fc-chip:hover,
.fc-ed-optbtn:hover {
    color: var(--st-color-accent);
    border-color: var(--st-color-accent);
}
.fc-chips-prev {
    left: 0;
}
.fc-chips-next {
    right: 0;
}
.fc-chips::-webkit-scrollbar {
    display: none;
}
.fc-chip {
    flex: none;
    height: 36px;
    padding: 0 var(--st-space-4);
    border: 1px solid var(--st-color-line-strong);
    border-radius: var(--st-radius-pill);
    background: var(--st-color-surface);
    font-family: var(--st-font-body);
    font-size: var(--st-text-3);
    font-weight: 500;
    color: var(--st-color-text-soft);
    cursor: pointer;
}
.fc-acc-all {
    gap: var(--st-space-4);
}
.fc-acc-all .fc-action-link {
    min-height: 32px;
    color: var(--st-color-accent);
}

/* Section cards */
.fc-category.fc-accordion {
    padding: 0;
    margin-bottom: var(--st-space-3);
    border-radius: var(--st-radius-card);
    overflow: hidden;
}
.fc-accordion .fc-acc-head {
    min-height: 52px;
    padding: 0 var(--st-space-4);
}
.fc-accordion .fc-acc-head .fc-cat-name {
    flex: 1;
}
.fc-acc-count,
.fc-ed-groupcount,
.fc-ed-note,
.fc-cd-meta,
.fc-cd-fcat {
    font-size: var(--st-text-2);
    color: var(--st-color-text-muted);
}

/* Value rows: label + value, copy button beside */
.fc-field-row,
.fc-addr-line {
    min-height: 56px;
    gap: var(--st-space-3);
    padding: var(--st-space-2) var(--st-space-2) var(--st-space-2) var(--st-space-4);
    border-top: 1px solid var(--st-color-line);
}
.fc-addr-line {
    margin: 0 -8px;
}
.fc-field-label {
    font-size: var(--st-text-1);
    line-height: 16px;
    letter-spacing: 0.04em;
}
.fc-value {
    font-weight: 500;
    line-height: 22px;
    font-variant-numeric: tabular-nums;
}
.fc-copy-icon {
    width: 44px;
    height: 44px;
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: var(--st-radius-4);
    background: var(--st-color-accent-tint);
    color: var(--st-color-accent);
    cursor: pointer;
}
.fc-copy-icon:hover {
    filter: brightness(0.96);
}
.fc-copy-icon:focus-visible,
.fc-copy-all:focus-visible,
.fc-chip:focus-visible,
.fc-ed-switchrow:focus-visible,
.fc-ed-optbtn:focus-visible,
.fc-ed-link:focus-visible {
    outline: 2px solid var(--st-color-accent);
    outline-offset: 2px;
}

/* Groups (e.g. one bank): name toggles, Copy all on the same line */
.fc-accordion .fc-drawer {
    padding: var(--st-space-1) var(--st-space-2) 0;
    border-top: 1px solid var(--st-color-line);
}
.fc-accordion .fc-drawer-head {
    min-height: 44px;
    gap: var(--st-space-2);
}
.fc-accordion .fc-ent-toggle {
    min-height: 44px;
    padding: 0 var(--st-space-2);
    gap: var(--st-space-2);
}
.fc-accordion .fc-drawer-title {
    font-size: var(--st-text-4);
    font-weight: 600;
}
.fc-copy-all {
    height: 36px;
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: var(--st-space-2);
    padding: 0 var(--st-space-3);
    border: 1px solid var(--st-color-line-strong);
    border-radius: var(--st-radius-3);
    background: var(--st-color-raised);
    font-family: var(--st-font-body);
    font-size: var(--st-text-2);
    font-weight: var(--st-weight-strong);
    color: var(--st-color-accent);
    cursor: pointer;
}
.fc-copy-all svg {
    width: 14px;
    height: 14px;
}
.fc-accordion .fc-drawer-body {
    gap: 0;
    margin-top: 0;
    padding-left: 0;
}
.fc-ent-accordion:not(.collapsed) > .fc-drawer-head,
.fc-drawer:not(.fc-ent-accordion) > .fc-drawer-head {
    margin: -4px -8px 0;
    padding: var(--st-space-1) var(--st-space-2);
    background: var(--st-color-sunk);
}
.fc-ent-accordion.collapsed {
    padding-bottom: var(--st-space-1);
}

/* Phones: keep the copy button beside the value (no full-width stacking).
   Edit-page rows (.fc-fe-row) still stack, as before. */
@media (max-width: 480px) {
    .fc-field-row,
    .fc-addr-line,
    .fc-drawer-head {
        flex-direction: row;
        align-items: center;
    }
    .fc-field-row .fc-field-actions,
    .fc-addr-line .fc-field-actions,
    .fc-drawer-head .fc-field-actions {
        width: auto;
    }
    .fc-drawer-head .fc-copy {
        width: auto;
    }
}

/* Login button + inputs: comfortable touch size */
.fc-auth-submit {
    min-height: 48px;
}
.st-auth-card .st-input {
    min-height: 48px;
}

/* Vault (13 Nov 2026): no Lock button; edit values in place */
.fc-vault-head {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--st-space-2);
}
.fc-vault-head .fc-title {
    margin: 0;
}
.fc-vault-note {
    margin: 0;
    font-size: var(--st-text-3);
}
/* Row icon buttons (edit, move, remove): the kit's round icon button
   (.st-icon-btn), in Card's softer square shape and muted color. */
.fc-icon-btn {
    border-radius: var(--st-radius-4);
    color: var(--st-color-text-muted);
}
.fc-icon-btn:hover,
.fc-icon-btn.active {
    color: var(--st-color-text);
}
/* Its options are open */
.fc-icon-btn.active {
    background: var(--st-color-sunk);
}
.fc-vault-editing .fc-field-main {
    display: flex;
    flex-direction: column;
    gap: var(--st-space-2);
}
.fc-vault-input {
    width: 100%;
    min-height: 44px;
    box-sizing: border-box;
}
.fc-vault-actions,
.fc-ed-formbtns {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--st-space-2);
}
.fc-vault-actions .st-btn {
    min-height: 44px;
}
.fc-vault-out {
    margin-left: auto;
    min-height: 44px;
    color: var(--st-color-bad);
}
.fc-vault-msg {
    width: 100%;
    font-size: var(--st-text-3);
    color: var(--st-color-bad);
}
.fc-vault-msg:empty {
    display: none;
}
.fc-category .fc-cat-head .fc-pubtoggle {
    min-height: 36px;
}

/* Vault PIN: a plain text box shown as dots, so browsers don't treat it
   as a password and offer to save or update one. */
.fc-pin-input {
    -webkit-text-security: disc;
    text-security: disc;
    letter-spacing: 0.3em;
    font-variant-numeric: tabular-nums;
}

/* Vault shortcut in the top bar: the kit's round icon button (.st-icon-btn) */
.fc-topbar-vault {
    color: var(--st-color-text-soft);
}
.fc-topbar-vault.active {
    background: var(--st-color-accent-tint);
    color: var(--st-color-accent);
}

/* ════════════════════════════════════════════════════════════════
   Spruce-up, second pass (13 Nov 2026)
════════════════════════════════════════════════════════════════ */

/* Vault: chips + accordions, reusing Home's styles */
.fc-accordion {
    scroll-margin-top: 72px; /* clear the top bar when a chip jumps here */
}
h3.fc-drawer-title {
    margin: 0;
}
.fc-vault-head {
    margin-bottom: var(--st-space-4);
}
.fc-vault-secbar {
    display: flex;
    justify-content: flex-end;
    padding: var(--st-space-3) var(--st-space-4);
    border-top: 1px solid var(--st-color-line);
}
.fc-vault-addnote {
    margin: 0;
    padding: var(--st-space-3) var(--st-space-4);
    border-top: 1px solid var(--st-color-line);
    font-size: var(--st-text-3);
    line-height: 20px;
}
.fc-accordion .fc-vault-addsec {
    padding: var(--st-space-1) var(--st-space-2) 0;
}
.fc-vault-addsec .fc-drawer-head {
    justify-content: space-between;
}
.fc-pubtoggle {
    min-height: 44px;
}

/* Section buttons: 44px touch targets (Home, Vault, Edit) */
.fc-chip {
    height: 44px;
    padding: 0 var(--st-space-4);
}
.fc-chips-arrow {
    width: 44px;
    height: 44px;
}
.fc-chip.is-active {
    border-color: var(--st-color-accent-fill, #2f6d55);
    background: var(--st-color-accent-fill, #2f6d55);
    color: var(--st-color-on-accent);
    font-weight: 600;
}

/* ─── Edit page ─────────────────────────────────────────────── */
.fc-ed-top {
    display: flex;
    flex-direction: column;
    gap: var(--st-space-3);
    margin-bottom: var(--st-space-6);
}
.fc-ed-top .fc-title {
    margin: 0;
}
.fc-ed-panel {
    display: flex;
    flex-direction: column;
    gap: var(--st-space-4);
    /* plain wrapper, not a card: the list inside is the card */
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
}
.fc-ed-panel.fc-panel-hidden {
    display: none;
}
.fc-ed-head {
    display: flex;
    align-items: center;
    gap: var(--st-space-2);
    min-height: 44px;
}
.fc-ed-title {
    flex: 1;
    min-width: 0;
    margin: 0;
    font-size: var(--st-text-9);
    line-height: 1.2;
}
.fc-ed-saved {
    display: inline-flex;
    align-items: center;
    gap: var(--st-space-2);
    font-size: var(--st-text-2);
    color: var(--st-color-accent);
}
.fc-ed-saved.bad {
    color: var(--st-color-bad);
}
.fc-ed-card {
    border: 1px solid var(--st-color-line);
    border-radius: var(--st-radius-card);
    background: var(--st-color-surface);
}
.fc-ed-list {
    overflow: hidden;
}
.fc-ed-row {
    display: flex;
    align-items: flex-end;
    gap: var(--st-space-2);
    padding: var(--st-space-3) var(--st-space-2) var(--st-space-3) var(--st-space-4);
    border-top: 1px solid var(--st-color-line);
}
.fc-ed-list > .fc-ed-row:first-child,
.fc-ed-list > .fc-ed-group:first-child > .fc-ed-grouphead {
    border-top: 0;
}
.fc-ed-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: var(--st-space-2);
}
.fc-ed-label,
.fc-ed-optlabel {
    font-size: var(--st-text-1);
    font-weight: 500;
    line-height: 16px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--st-color-text-muted);
}
.fc-ed-main .st-input,
.fc-ed-main .st-textarea,
.fc-ed-opts .st-input,
.fc-ed-opts .st-select,
.fc-ed-card .st-input,
.fc-ed-card .st-select,
.fc-set .st-input {
    width: 100%;
    min-height: 44px;
    box-sizing: border-box;
    font-size: var(--st-text-5); /* stops phones zooming in */
    background: var(--st-color-raised);
}
/* Options panel under a field or group */
.fc-ed-opts {
    display: flex;
    flex-direction: column;
    gap: var(--st-space-3);
    padding: var(--st-space-3) var(--st-space-4) var(--st-space-4);
    background: var(--st-color-sunk);
    border-top: 1px solid var(--st-color-line);
}
.fc-ed-optgrid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--st-space-3);
}
.fc-ed-optbtn {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    gap: var(--st-space-2);
    padding: 0 var(--st-space-3);
    border: 1px solid var(--st-color-line-strong);
    border-radius: var(--st-radius-4);
    background: var(--st-color-raised);
    font-family: var(--st-font-body);
    font-size: var(--st-text-3);
    font-weight: 500;
    color: var(--st-color-text-soft);
    cursor: pointer;
}
.fc-ed-optbtn.danger {
    margin-left: auto;
    color: var(--st-color-bad);
}
.fc-ed-optbtn.danger:hover {
    border-color: var(--st-color-bad);
}
/* Groups: banded heading row */
.fc-ed-grouphead {
    display: flex;
    align-items: center;
    gap: var(--st-space-2);
    padding: var(--st-space-1) var(--st-space-2) var(--st-space-1) var(--st-space-4);
    border-top: 1px solid var(--st-color-line);
    background: var(--st-color-sunk);
}
.fc-ed-groupname {
    flex: 1;
    min-width: 0;
    margin: 0;
    font-family: var(--st-font-body);
    font-size: var(--st-text-3);
    font-weight: var(--st-weight-strong);
    line-height: 1.3;
    color: var(--st-color-text);
}
.fc-ed-groupadd {
    padding: var(--st-space-1) var(--st-space-4) var(--st-space-2);
    border-top: 1px solid var(--st-color-line);
}
.fc-ed-link {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    gap: var(--st-space-2);
    padding: 0;
    border: 0;
    background: none;
    font-family: var(--st-font-body);
    font-size: var(--st-text-3);
    font-weight: var(--st-weight-strong);
    color: var(--st-color-accent);
    cursor: pointer;
}
.fc-ed-link:hover {
    text-decoration: underline;
}
/* Section options card */
.fc-ed-secopts,
.fc-ed-form {
    display: flex;
    flex-direction: column;
    gap: var(--st-space-3);
    padding: var(--st-space-4);
}
.fc-ed-switchrow {
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: var(--st-space-3);
    padding: 0;
    border: 0;
    background: none;
    font-family: var(--st-font-body);
    font-size: var(--st-text-4);
    font-weight: 500;
    color: var(--st-color-text);
    text-align: left;
    cursor: pointer;
}
.fc-ed-switchtext {
    flex: 1;
}
.fc-switch {
    position: relative;
    flex: none;
    width: 52px;
    height: 32px;
    box-sizing: border-box;
    border: 1px solid var(--st-color-line-strong);
    border-radius: var(--st-radius-pill);
    background: var(--st-color-raised);
}
.fc-switch::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 24px;
    height: 24px;
    border-radius: var(--st-radius-pill);
    background: var(--st-color-text-muted);
    transition: transform 0.15s;
}
[aria-checked="true"] > .fc-switch {
    border-color: var(--st-color-accent-fill, #2f6d55);
    background: var(--st-color-accent-fill, #2f6d55);
}
[aria-checked="true"] > .fc-switch::after {
    transform: translateX(20px);
    background: var(--st-color-on-accent);
}
.fc-ed-vaultnote,
.fc-cd-note,
.fc-pub-intro,
.fc-set-note {
    margin: 0;
    font-size: var(--st-text-3);
    line-height: 20px;
    color: var(--st-color-text-muted);
}
.fc-ed-empty {
    margin: 0;
}
/* New group form */
.fc-ed-formtitle {
    margin: 0;
    font-family: var(--st-font-body);
    font-size: var(--st-text-5);
    font-weight: var(--st-weight-strong);
}
.fc-ed-formbtns .st-btn {
    min-height: 44px;
}
.fc-ed-formmsg {
    font-size: var(--st-text-3);
    color: var(--st-color-bad);
}
/* Add field / Add group */
.fc-ed-add {
    flex: 1;
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--st-space-2);
}
.fc-ed-add-2 {
    border: 1px solid var(--st-color-line-strong);
    background: var(--st-color-surface);
    color: var(--st-color-accent);
}
.fc-ed-newsec {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--st-space-2);
    margin-top: var(--st-space-6);
    padding-top: var(--st-space-4);
    border-top: 1px solid var(--st-color-line);
}

/* ─── Cards page ────────────────────────────────────────────── */
.fc-cd-top {
    display: flex;
    align-items: center;
    gap: var(--st-space-3);
    margin-bottom: var(--st-space-6);
}
.fc-cd-top .fc-title {
    flex: 1;
    min-width: 0;
    margin: 0;
}
.fc-cd-top-ed {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--st-space-3);
}
.fc-cd-new,
.fc-cd-save {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    gap: var(--st-space-2);
}
.fc-cd-list {
    display: flex;
    flex-direction: column;
    gap: var(--st-space-4);
}
.fc-cd {
    display: flex;
    flex-direction: column;
    gap: var(--st-space-4);
    padding: var(--st-space-4);
    border: 1px solid var(--st-color-line);
    border-radius: var(--st-radius-card);
    background: var(--st-color-surface);
    color: var(--st-color-text);
}
.fc-cd-name {
    flex: 1;
    min-width: 0;
    margin: 0;
    font-family: var(--st-font-body);
    font-size: var(--st-text-6);
    font-weight: var(--st-weight-strong);
    line-height: 1.3;
    color: var(--st-color-text);
}
.fc-cd-badge {
    height: 28px;
    display: inline-flex;
    align-items: center;
    padding: 0 var(--st-space-3);
    border-radius: var(--st-radius-pill);
    background: var(--st-color-accent-tint);
    font-size: var(--st-text-2);
    font-weight: 600;
    color: var(--st-color-accent);
}
/* The card itself: dark ink with cream text in both themes */
.fc-cd-preview {
    display: flex;
    flex-direction: column;
    gap: var(--st-space-4);
    padding: var(--st-space-6);
    border: 1px solid var(--st-color-sidebar-line);
    border-radius: var(--st-radius-6);
    background: var(--st-color-sidebar);
    color: var(--st-color-on-sidebar-strong);
}
.fc-cd-pv-name {
    font-family: var(--st-font-display);
    font-size: var(--st-text-11);
    font-weight: 600;
    line-height: 1.1;
    overflow-wrap: anywhere;
}
.fc-cd-pv-sub {
    font-size: var(--st-text-3);
    color: var(--st-color-on-sidebar-muted);
}
.fc-cd-pv-lines {
    display: flex;
    flex-direction: column;
    gap: var(--st-space-2);
    font-size: var(--st-text-3);
    line-height: 20px;
    overflow-wrap: anywhere;
}
.fc-cd-preview-empty {
    font-size: var(--st-text-3);
    color: var(--st-color-on-sidebar);
}
.fc-cd-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--st-space-2);
}
.fc-cd-act {
    min-height: 56px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--st-space-1);
    padding: var(--st-space-1);
    border: 1px solid var(--st-color-line-strong);
    border-radius: var(--st-radius-4);
    background: var(--st-color-raised);
    font-family: var(--st-font-body);
    font-size: var(--st-text-2);
    font-weight: var(--st-weight-strong);
    color: var(--st-color-accent);
    cursor: pointer;
}
.fc-cd-act:hover,
.fc-cd-act.active {
    border-color: var(--st-color-accent);
}
.fc-cd-act.done,
.fc-cd-copy.done {
    background: var(--st-color-accent-tint);
}
.fc-cd-open {
    align-self: flex-start;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    font-size: var(--st-text-3);
    font-weight: 500;
    color: var(--st-color-accent);
}
.fc-cd-row {
    flex-direction: row;
    align-items: center;
    gap: var(--st-space-3);
    width: 100%;
    min-height: 72px;
    text-align: left;
    font: inherit;
    cursor: pointer;
}
.fc-cd-row:hover {
    border-color: var(--st-color-accent);
}
.fc-cd-row svg {
    flex: none;
    color: var(--st-color-text-muted);
}
.fc-cd-rowmain {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: var(--st-space-1);
}
.fc-qr {
    align-items: center;
}
.fc-qr .st-btn,
.fc-cd-btn2 {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    gap: var(--st-space-2);
    border: 1px solid var(--st-color-line-strong);
    background: var(--st-color-raised);
    color: var(--st-color-accent);
}
/* Editor */
.fc-cd-back {
    min-height: 44px;
}
.fc-cd-box,
.fc-set-card {
    display: flex;
    flex-direction: column;
    gap: var(--st-space-3);
    margin-bottom: var(--st-space-4);
    padding: var(--st-space-4);
}
.fc-cd-boxh {
    margin: 0;
    font-family: var(--st-font-body);
    font-size: var(--st-text-6);
    font-weight: var(--st-weight-strong);
    line-height: 1.3;
}
.fc-cd-link {
    display: flex;
    align-items: center;
    gap: var(--st-space-2);
    padding: var(--st-space-2) var(--st-space-2) var(--st-space-2) var(--st-space-4);
    border: 1px solid var(--st-color-line);
    border-radius: var(--st-radius-5);
    background: var(--st-color-raised);
}
.fc-cd-url {
    flex: 1;
    min-width: 0;
    overflow-wrap: anywhere;
    font-size: var(--st-text-4);
    font-weight: 500;
    color: var(--st-color-text-soft);
}
.fc-cd-copy,
.fc-cd-add {
    min-height: 44px;
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: var(--st-space-2);
    padding: 0 var(--st-space-3);
    border: 0;
    border-radius: var(--st-radius-4);
    background: var(--st-color-accent-tint);
    font-family: var(--st-font-body);
    font-size: var(--st-text-3);
    font-weight: var(--st-weight-strong);
    color: var(--st-color-accent);
    cursor: pointer;
}
.fc-cd-frow {
    display: flex;
    align-items: center;
    gap: var(--st-space-2);
    min-height: 56px;
    border-top: 1px solid var(--st-color-line);
}
.fc-cd-flist > .fc-cd-frow:first-child,
.fc-cd-avail:first-child > .fc-cd-availname {
    border-top: 0;
}
.fc-cd-fmain {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.fc-cd-flabel {
    font-size: var(--st-text-4);
    color: var(--st-color-text);
}
.fc-cd-frow .fc-icon-btn:disabled {
    opacity: 0.35;
    cursor: default;
}
.fc-cd-availname {
    margin: 0;
    padding: var(--st-space-4) 0 var(--st-space-2);
    border-top: 1px solid var(--st-color-line);
    font-family: var(--st-font-body);
    font-size: var(--st-text-1);
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--st-color-text-muted);
}
.fc-cd-group {
    margin: 0;
    padding: var(--st-space-3) 0 var(--st-space-1);
    font-family: var(--st-font-body);
    font-size: var(--st-text-3);
    font-weight: var(--st-weight-strong);
    color: var(--st-color-text-soft);
}
.fc-cd-savebar .danger {
    margin-left: auto;
}

/* ─── Publish page ──────────────────────────────────────────── */
.fc-pub-top {
    display: flex;
    flex-direction: column;
    gap: var(--st-space-2);
    margin-bottom: var(--st-space-4);
}
.fc-pub-top .fc-title {
    margin: 0;
}
.fc-pub-link {
    margin-bottom: var(--st-space-4);
    background: var(--st-color-surface);
}
a.fc-cd-url {
    text-decoration: none;
}
a.fc-cd-url:hover {
    color: var(--st-color-accent);
    text-decoration: underline;
}
.fc-pub-copyicon {
    display: inline-flex;
}
.fc-pub-sec {
    margin-bottom: var(--st-space-4);
    border: 1px solid var(--st-color-line);
    border-radius: var(--st-radius-card);
    background: var(--st-color-surface);
    overflow: hidden;
}
.fc-pub-head {
    display: flex;
    align-items: center;
    gap: var(--st-space-3);
    min-height: 56px;
    padding: var(--st-space-1) var(--st-space-2) var(--st-space-1) var(--st-space-4);
}
.fc-pub-sec.on .fc-pub-head {
    background: var(--st-color-sunk);
}
.fc-pub-name {
    flex: 1;
    min-width: 0;
    margin: 0;
    font-size: var(--st-text-8);
    line-height: 1.2;
}
.fc-pub-msg {
    font-size: var(--st-text-2);
    color: var(--st-color-bad);
}
.fc-pub-msg:empty {
    display: none;
}
.fc-pub-row {
    display: flex;
    align-items: center;
    gap: var(--st-space-3);
    min-height: 56px;
    padding: 0 var(--st-space-2) 0 var(--st-space-4);
    border-top: 1px solid var(--st-color-line);
}
.fc-pub-label {
    flex: 1;
    min-width: 0;
    font-size: var(--st-text-4);
    color: var(--st-color-text);
}
.fc-pub-group {
    margin: 0;
    padding: var(--st-space-4) var(--st-space-4) var(--st-space-2);
    border-top: 1px solid var(--st-color-line);
    font-family: var(--st-font-body);
    font-size: var(--st-text-1);
    font-weight: var(--st-weight-strong);
    line-height: 1.333;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--st-color-text-muted);
}
.fc-pub-none {
    margin: 0;
    padding: var(--st-space-3) var(--st-space-4);
    border-top: 1px solid var(--st-color-line);
    font-size: var(--st-text-3);
    color: var(--st-color-text-muted);
}
/* 44px tap area around the 52×32 switch */
.fc-pub-switch {
    width: 60px;
    height: 44px;
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
}
.fc-pub-switch:focus-visible {
    outline: 2px solid var(--st-color-accent);
    outline-offset: 0;
    border-radius: var(--st-radius-pill);
}
.fc-pub-vault {
    display: inline-flex;
    align-items: center;
    gap: var(--st-space-2);
    padding-right: var(--st-space-2);
    font-size: var(--st-text-2);
    color: var(--st-color-text-muted);
}

/* ─── Settings page ─────────────────────────────────────────── */
.fc-set > .fc-title {
    margin: 0 0 var(--st-space-4);
}
.fc-set-h {
    margin: 0;
    font-family: var(--st-font-body);
    font-size: var(--st-text-6);
    font-weight: var(--st-weight-strong);
    line-height: 1.3;
    color: var(--st-color-text);
}
.fc-set-form {
    display: flex;
    flex-direction: column;
    gap: var(--st-space-3);
}
.fc-set-check {
    margin: -4px 0 0;
    font-size: var(--st-text-2);
    line-height: 18px;
    color: var(--st-color-text-muted);
}
.fc-set-check:empty {
    display: none;
}
.fc-set-check.bad {
    color: var(--st-color-bad);
}
.fc-set-check.good {
    color: var(--st-color-accent);
}
.fc-set-btn {
    min-height: 44px;
    padding: 0 var(--st-space-5);
}
.fc-set-btn2 {
    border: 1px solid var(--st-color-line-strong);
    background: var(--st-color-raised);
    color: var(--st-color-accent);
}
.fc-set-list {
    margin-bottom: var(--st-space-4);
    overflow: hidden;
}
.fc-set-row {
    width: 100%;
    min-height: 56px;
    display: flex;
    align-items: center;
    gap: var(--st-space-3);
    padding: 0 var(--st-space-4);
    border: 0;
    background: none;
    font-family: var(--st-font-body);
    font-size: var(--st-text-5);
    font-weight: 500;
    color: var(--st-color-text);
    text-align: left;
    cursor: pointer;
}
.fc-set-row + .fc-set-panel + .fc-set-row,
.fc-set-panel + .fc-set-row {
    border-top: 1px solid var(--st-color-line);
}
.fc-set-row:hover {
    background: var(--st-color-sunk);
}
.fc-set-row:focus-visible {
    outline: 2px solid var(--st-color-accent);
    outline-offset: -2px;
}
.fc-set-rowtext {
    flex: 1;
}
.fc-set-row svg {
    flex: none;
    color: var(--st-color-text-muted);
    transition: transform 0.15s;
}
.fc-set-row[aria-expanded="true"] svg {
    transform: rotate(90deg);
}
.fc-set-panel {
    padding: 0 var(--st-space-4) var(--st-space-4);
}
.fc-pending-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--st-space-2);
    padding: var(--st-space-2) 0;
    border-top: 1px solid var(--st-color-line);
}

/* Edit page: a Vault field shows its name and a link to the Vault, no value box. */
.fc-ed-invault {
    display: inline-flex;
    align-items: center;
    gap: var(--st-space-2);
    margin-top: var(--st-space-1);
    color: var(--st-color-text-soft);
    font-size: var(--st-text-3);
    text-decoration: none;
}
.fc-ed-invault:hover { text-decoration: underline; }

/* ─── Vault PIN screen ─────────────────────────────────────────── */
.fc-pin-card {
    max-width: 380px;
}

/* ─── Users page (admin). Action buttons: kit small size, st-btn--sm ── */
.fc-user-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--st-space-3);
    padding: var(--st-space-4) 0;
    border-bottom: var(--st-line-width) solid var(--st-color-line);
}
.fc-user-row:last-child {
    border-bottom: 0;
}
.fc-user-main {
    flex: 1 1 14rem;
    min-width: 0;
}
.fc-user-handle {
    font-weight: var(--st-weight-strong);
}
.fc-user-meta {
    font-size: var(--st-text-2);
}
.fc-user-badges {
    display: flex;
    flex-wrap: wrap;
    gap: var(--st-space-2);
    margin-top: var(--st-space-1);
}
.fc-user-msg {
    flex-basis: 100%;
    margin: 0;
    font-size: var(--st-text-3);
}
