*, *::before, *::after { box-sizing: border-box; }

:root {
    --bg: #0f0f0f;
    --surface: #1a1a1a;
    --border: #2a2a2a;
    --text: #e8e8e8;
    --muted: #888;
    --accent: #c8a96e;
}

body {
    margin: 0;
    font-family: system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
}

a { color: inherit; text-decoration: none; }

/* ── site nav ── */
.site-nav {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 0 1.5rem;
    height: 48px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 680px) {
    .site-nav {
        gap: 0;
        padding: 0 0.75rem;
    }

    .site-nav-links {
        gap: 0;
    }

    .site-nav-link {
        padding: 0.3rem 0.5rem;
        font-size: 0.72rem;
        letter-spacing: 0.04em;
    }
}

.site-nav-logo {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
}

.site-nav-links {
    display: flex;
    gap: 0.25rem;
    margin-left: auto;
}

.site-nav-link {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    padding: 0.3rem 0.7rem;
    transition: color 0.15s;
}

.site-nav-link:hover { color: var(--text); }
.site-nav-link--active { color: var(--accent); }

/* ── prompt list ── */
.prompt-list {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    margin-top: 0.5rem;
}

.prompt-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--surface);
    padding: 0.9rem 1rem;
    transition: background 0.15s;
}

.prompt-row:hover { background: #222; }

.prompt-row-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text);
    min-width: 200px;
}

.prompt-row-slug {
    font-size: 0.75rem;
    color: var(--muted);
    font-family: monospace;
}

.prompt-row-inactive {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
    border: 1px solid var(--border);
    padding: 0.1rem 0.4rem;
}

.prompt-row-arrow {
    margin-left: auto;
    color: var(--muted);
    font-size: 0.85rem;
}

/* ── prompt edit form ── */
.prompt-form {
    max-width: 800px;
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.prompt-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.prompt-field--inline {
    flex-direction: row;
    align-items: center;
}

.prompt-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
}

.prompt-hint {
    text-transform: none;
    letter-spacing: 0;
    font-weight: 400;
}

.prompt-input {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0.6rem 0.75rem;
    font-size: 0.9rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.15s;
}

.prompt-input:focus { border-color: var(--accent); }

.prompt-textarea {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0.65rem 0.75rem;
    font-size: 0.82rem;
    font-family: monospace;
    line-height: 1.6;
    outline: none;
    resize: vertical;
    transition: border-color 0.15s;
}

.prompt-textarea:focus { border-color: var(--accent); }

.prompt-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.prompt-cancel {
    font-size: 0.8rem;
    color: var(--muted);
    transition: color 0.15s;
}

.prompt-cancel:hover { color: var(--text); }

/* ── hello page ── */
.hello-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    text-align: center;
}

.home-main {
    max-width: 480px;
    text-align: center;
}

.home-main h1 {
    font-size: 2.8rem;
    font-weight: 200;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin: 0 0 0.75rem;
}

.home-tagline {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--accent);
    margin: 0 0 1.75rem;
}

.home-desc {
    font-size: 0.95rem;
    color: var(--muted);
    line-height: 1.7;
    margin: 0 0 2.5rem;
}

.home-cta-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.home-cta {
    display: inline-block;
    padding: 0.65rem 2rem;
    border: 1px solid var(--accent);
    color: var(--accent);
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: background 0.15s, color 0.15s;
}

.home-cta:hover {
    background: var(--accent);
    color: #0f0f0f;
}

.home-cta--secondary {
    border-color: var(--border);
    color: var(--muted);
}

.home-cta--secondary:hover {
    background: var(--border);
    color: var(--text);
}

/* ── landing page ── */
.lp-body {
    background: var(--bg);
    color: var(--text);
}

.lp-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2.5rem;
    height: 52px;
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(15,15,15,0.92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
}

.lp-nav-logo {
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent);
}

.lp-nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.lp-nav-link {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    transition: color 0.15s;
}

.lp-nav-link:hover { color: var(--text); }

.lp-nav-cta {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent);
    border: 1px solid var(--accent);
    padding: 0.35rem 1rem;
    transition: background 0.15s, color 0.15s;
}

.lp-nav-cta:hover {
    background: var(--accent);
    color: #0f0f0f;
}

/* hero */
.lp-hero {
    min-height: 88vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 6rem 2rem;
    position: relative;
    border-bottom: 1px solid var(--border);
}

.lp-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 80% 60% at 50% 40%, rgba(200,169,110,0.06) 0%, transparent 70%);
    pointer-events: none;
}

.lp-hero-inner {
    max-width: 680px;
    position: relative;
}

.lp-eyebrow {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--accent);
    margin: 0 0 1.5rem;
}

.lp-hero-title {
    font-size: clamp(2.2rem, 6vw, 4rem);
    font-weight: 200;
    letter-spacing: 0.04em;
    line-height: 1.15;
    margin: 0 0 1.75rem;
}

.lp-hero-sub {
    font-size: 1rem;
    color: var(--muted);
    line-height: 1.75;
    max-width: 520px;
    margin: 0 auto 2.5rem;
}

.lp-hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* buttons */
.lp-btn {
    display: inline-block;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.7rem 2rem;
    border: 1px solid transparent;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.lp-btn--primary {
    background: var(--accent);
    color: #0f0f0f;
    border-color: var(--accent);
}

.lp-btn--primary:hover {
    background: #d4b87a;
    border-color: #d4b87a;
}

.lp-btn--ghost {
    border-color: var(--border);
    color: var(--muted);
}

.lp-btn--ghost:hover {
    border-color: var(--muted);
    color: var(--text);
}

.lp-btn--lg {
    padding: 0.9rem 2.5rem;
    font-size: 0.85rem;
}

/* sections */
.lp-section {
    padding: 6rem 2rem;
    border-bottom: 1px solid var(--border);
}

.lp-section--alt {
    background: var(--surface);
}

.lp-section--cta {
    background: transparent;
    text-align: center;
}

.lp-container {
    max-width: 960px;
    margin: 0 auto;
}

.lp-section-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--accent);
    margin: 0 0 0.75rem;
}

.lp-section-title {
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    font-weight: 200;
    letter-spacing: 0.02em;
    line-height: 1.25;
    margin: 0 0 3.5rem;
}

/* features grid */
.lp-features {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 2px;
    border: 1px solid var(--border);
}

.lp-feature {
    padding: 2rem;
    border: 1px solid var(--border);
    margin: -1px;
}

.lp-feature-icon {
    font-size: 1.4rem;
    color: var(--accent);
    margin-bottom: 1rem;
    opacity: 0.7;
}

.lp-feature h3 {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0 0 0.75rem;
}

.lp-feature p {
    font-size: 0.88rem;
    color: var(--muted);
    line-height: 1.7;
    margin: 0;
}

/* steps */
.lp-steps {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 3rem 2rem;
}

.lp-step {
    display: flex;
    gap: 1.25rem;
}

.lp-step-num {
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    color: var(--accent);
    padding-top: 0.15rem;
    flex-shrink: 0;
}

.lp-step h4 {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0 0 0.6rem;
}

.lp-step p {
    font-size: 0.87rem;
    color: var(--muted);
    line-height: 1.7;
    margin: 0;
}

/* cta block */
.lp-cta-block {
    max-width: 560px;
    text-align: center;
}

.lp-cta-title {
    font-size: clamp(1.4rem, 3.5vw, 2rem);
    font-weight: 200;
    letter-spacing: 0.02em;
    margin: 0 0 1rem;
}

.lp-cta-sub {
    font-size: 0.92rem;
    color: var(--muted);
    line-height: 1.7;
    margin: 0 0 2rem;
}

/* footer */
.lp-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 2.5rem;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
    gap: 0.5rem;
}

.lp-footer-logo {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent);
}

.lp-footer-copy {
    font-size: 0.72rem;
    color: var(--muted);
    letter-spacing: 0.05em;
}

@media (max-width: 680px) {
    .lp-nav { padding: 0 1rem; }
    .lp-hero { padding: 4rem 1.25rem; min-height: 70vh; }
    .lp-section { padding: 4rem 1.25rem; }
    .lp-steps { grid-template-columns: 1fr; gap: 2rem; }
    .lp-footer { padding: 1.25rem 1rem; }
}

/* ── dashboard ── */
.dash {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

@media (max-width: 680px) {
    .dash {
        padding: 1.25rem 1rem;
    }
}

.dash-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 1.25rem;
}

.dash-header h1 {
    font-size: 1.5rem;
    font-weight: 400;
    letter-spacing: 0.05em;
    margin: 0;
}

.stat {
    font-size: 0.85rem;
    color: var(--muted);
}

.stat strong {
    color: var(--accent);
    font-weight: 600;
    margin-right: 0.25rem;
}

.stat--link {
    transition: color 0.15s;
}

.stat--link:hover {
    color: var(--text);
}

/* ── board grid ── */
.board-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
}

.board-card {
    background: var(--surface);
    padding: 1.25rem 1rem;
    transition: background 0.15s;
}

.board-card:hover { background: #222; }

.board-name {
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.4rem;
}

.board-count {
    font-size: 0.75rem;
    color: var(--muted);
}

.board-count span {
    color: var(--accent);
    font-weight: 600;
}

/* ── back link ── */
.back-link {
    font-size: 0.8rem;
    color: var(--muted);
    white-space: nowrap;
    transition: color 0.15s;
}
.back-link:hover { color: var(--text); }

/* ── image grid ── */
.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 3px;
}

.image-cell {
    display: block;
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--surface);
}

.image-cell--recognized {
    outline: 1px solid var(--accent);
}

.image-cell img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.2s, opacity 0.2s;
    opacity: 0.9;
}

.image-cell:hover img {
    transform: scale(1.04);
    opacity: 1;
}

.empty {
    color: var(--muted);
    font-size: 0.9rem;
    padding: 2rem 0;
}

/* ── image detail ── */
.img-detail-title {
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--muted);
    margin: 0;
    font-family: monospace;
}

.img-detail-wrap {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 2rem;
    align-items: start;
}

@media (max-width: 960px) {
    .img-detail-wrap { grid-template-columns: 1fr; }

    .img-detail-pane {
        position: static;
    }
}

.img-detail-pane {
    position: sticky;
    top: 1.5rem;
}

@media (max-width: 680px) {
    .img-detail-pane {
        position: static;
    }
}

.img-detail-img {
    width: 100%;
    display: block;
    max-height: 80vh;
    object-fit: contain;
    background: var(--surface);
}

.img-detail-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* ── flash messages ── */
.msg-list {
    margin-bottom: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.msg {
    font-size: 0.82rem;
    padding: 0.6rem 0.9rem;
    border-left: 3px solid var(--muted);
    background: var(--surface);
    color: var(--text);
}

.msg--success { border-color: #6abf7b; color: #6abf7b; }
.msg--error   { border-color: #e07070; color: #e07070; }

/* ── recognize form ── */
.recog-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: stretch;
}

.recog-select {
    flex: 1;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0.55rem 0.75rem;
    font-size: 0.82rem;
    font-family: inherit;
    outline: none;
    cursor: pointer;
    transition: border-color 0.15s;
}

.recog-select:focus { border-color: var(--accent); }

.recog-select optgroup { color: var(--muted); font-size: 0.72rem; }
.recog-select option  { color: var(--text); background: var(--surface); }

.recog-btn {
    padding: 0.55rem 1.1rem;
    background: var(--accent);
    color: #0f0f0f;
    border: none;
    font-size: 0.8rem;
    font-weight: 600;
    font-family: inherit;
    letter-spacing: 0.04em;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity 0.15s;
}

.recog-btn:hover { opacity: 0.85; }
.recog-btn:active { opacity: 0.7; }

.recog-context {
    flex: 1 0 100%;
    width: 100%;
    box-sizing: border-box;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0.65rem 0.85rem;
    font-size: 0.88rem;
    font-family: inherit;
    outline: none;
    resize: vertical;
    line-height: 1.6;
    transition: border-color 0.15s;
}

.recog-context:focus { border-color: var(--accent); }
.recog-context::placeholder { color: var(--muted); }

.recog-ctx {
    font-size: 0.75rem;
    color: var(--muted);
    font-style: italic;
    border-left: 2px solid var(--border);
    padding-left: 0.6rem;
    margin-bottom: 0.65rem;
    line-height: 1.5;
}

/* ── recognition card ── */
.recog-card {
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 1.25rem 1rem;
}

.recog-meta {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.recog-model {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent);
}

.recog-provider {
    font-size: 0.7rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.recog-date {
    font-size: 0.7rem;
    color: var(--muted);
    margin-left: auto;
}

.recog-cost {
    font-size: 0.7rem;
    color: var(--muted);
}

.recog-prompt-label {
    font-size: 0.7rem;
    color: var(--muted);
    border: 1px solid var(--border);
    padding: 0.1rem 0.4rem;
    border-radius: 2px;
}

.recog-header-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.5rem;
}

.recog-category {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--muted);
}

.sig-chip {
    font-size: 0.65rem;
    padding: 0.15rem 0.5rem;
    border-radius: 2px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
}

.sig-chip--high   { background: #3a1f1f; color: #e07070; border: 1px solid #e07070; }
.sig-chip--medium { background: #2a2010; color: var(--accent); border: 1px solid var(--accent); }
.sig-chip--low    { background: var(--surface); color: var(--muted); border: 1px solid var(--border); }

.recog-desc {
    font-size: 0.88rem;
    line-height: 1.65;
    color: var(--text);
    margin: 0 0 0.6rem;
}

.recog-evidence {
    font-size: 0.82rem;
    line-height: 1.6;
    color: #a0b8a0;
    border-left: 2px solid #4a7a4a;
    padding-left: 0.65rem;
    margin: 0 0 0.75rem;
    font-style: italic;
}

.recog-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.5rem;
}

.tag {
    font-size: 0.7rem;
    padding: 0.2rem 0.55rem;
    background: var(--border);
    color: var(--text);
    border-radius: 2px;
}

.recog-mood {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.mood-chip {
    font-size: 0.7rem;
    padding: 0.2rem 0.55rem;
    border: 1px solid var(--accent);
    color: var(--accent);
    border-radius: 2px;
}

/* ── source identification card ── */
.recog-source {
    border: 1px solid #3a3a1f;
    background: #1e1e10;
    padding: 0.75rem 0.9rem;
    margin-bottom: 0.75rem;
}

.recog-source-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 0.3rem;
    line-height: 1.4;
}

.recog-source-line {
    font-size: 0.78rem;
    color: var(--muted);
    line-height: 1.5;
}

.recog-source-plate {
    font-family: monospace;
    color: var(--text);
    font-size: 0.8rem;
}

.recog-unidentified {
    font-size: 0.78rem;
    color: var(--muted);
    font-style: italic;
    margin: 0 0 0.5rem;
}

.recog-notes {
    font-size: 0.8rem;
    line-height: 1.55;
    color: var(--muted);
    border-left: 2px solid var(--border);
    padding-left: 0.65rem;
    margin: 0 0 0.75rem;
    font-style: italic;
}

/* ── location identification card ── */
.recog-location {
    border: 1px solid #1f3a3a;
    background: #101e1e;
    padding: 0.75rem 0.9rem;
    margin-bottom: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.recog-location-name {
    font-size: 0.88rem;
    font-weight: 600;
    color: #7ec8c8;
    line-height: 1.4;
}

.recog-location-place {
    font-size: 0.78rem;
    color: var(--muted);
    line-height: 1.5;
}

.loc-conf {
    font-size: 0.65rem;
    padding: 0.15rem 0.5rem;
    border-radius: 2px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
    align-self: flex-start;
    margin-top: 0.25rem;
}

.loc-conf--high   { background: #1a3a2a; color: #6abf7b; border: 1px solid #6abf7b; }
.loc-conf--medium { background: #1e2a3a; color: #7ec8c8; border: 1px solid #7ec8c8; }
.loc-conf--low    { background: var(--surface); color: var(--muted); border: 1px solid var(--border); }

/* ── person identification card ── */
.recog-person {
    border: 1px solid #2e1f3a;
    background: #160f1e;
    padding: 0.75rem 0.9rem;
    margin-bottom: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.recog-person--unknown {
    border-color: var(--border);
    background: var(--surface);
}

.recog-person-name {
    font-size: 0.92rem;
    font-weight: 600;
    color: #c4a0e8;
    line-height: 1.4;
}

.recog-person-meta {
    font-size: 0.78rem;
    color: var(--muted);
    line-height: 1.5;
}

.recog-person-medium {
    font-size: 0.72rem;
    color: var(--muted);
    font-style: italic;
    line-height: 1.4;
}

/* ── tag cloud ── */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.5rem 0 3rem;
}

.tag-cloud-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.7rem;
    background: var(--surface);
    border: 1px solid var(--border);
    transition: border-color 0.15s, background 0.15s;
}

.tag-cloud-item:hover {
    border-color: var(--accent);
    background: #222;
}

.tag-cloud-name {
    font-size: 0.82rem;
    color: var(--text);
}

.tag-cloud-count {
    font-size: 0.7rem;
    color: var(--accent);
    font-weight: 600;
}

/* ── privacy page ── */
.privacy-wrap {
    max-width: 720px;
    padding: 0.5rem 0 3rem;
}

.privacy-updated {
    font-size: 0.78rem;
    color: var(--muted);
    margin: 0 0 2rem;
}

.privacy-section {
    margin-bottom: 2rem;
}

.privacy-section h2 {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent);
    margin: 0 0 0.75rem;
}

.privacy-section p,
.privacy-section li {
    font-size: 0.9rem;
    line-height: 1.75;
    color: var(--muted);
}

.privacy-section ul {
    margin: 0.25rem 0 0;
    padding-left: 1.25rem;
}

.privacy-section li {
    margin-bottom: 0.3rem;
}

.privacy-section a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* ── login ── */
.login-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.login-box {
    width: 100%;
    max-width: 360px;
    padding: 2.5rem 2rem;
    background: var(--surface);
    border: 1px solid var(--border);
}

.login-box h1 {
    font-size: 1.4rem;
    font-weight: 300;
    letter-spacing: 0.1em;
    margin: 0 0 2rem;
    text-align: center;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 1.25rem;
}

.field label {
    font-size: 0.75rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.field input {
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0.6rem 0.75rem;
    font-size: 0.95rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.15s;
}

.field input:focus { border-color: var(--accent); }

button[type="submit"] {
    width: 100%;
    padding: 0.7rem;
    background: var(--accent);
    color: #0f0f0f;
    border: none;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: inherit;
    letter-spacing: 0.05em;
    cursor: pointer;
    margin-top: 0.5rem;
    transition: opacity 0.15s;
}

button[type="submit"]:hover { opacity: 0.85; }

.login-error {
    font-size: 0.8rem;
    color: #e07070;
    margin-bottom: 1.25rem;
    text-align: center;
}

/* Favorite button */
.fav-form {
    margin-left: auto;
}

.fav-btn {
    background: none;
    border: 1px solid var(--border);
    color: var(--muted);
    font-size: 1.4rem;
    line-height: 1;
    padding: 0.3rem 0.6rem;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
    width: auto;
    margin: 0;
}

.fav-btn:hover {
    color: var(--accent);
    border-color: var(--accent);
    opacity: 1;
}

.fav-btn--active {
    color: var(--accent);
    border-color: var(--accent);
}

/* Favorites grid overlay marker */
.image-cell--fav::after {
    content: '★';
    position: absolute;
    top: 4px;
    right: 6px;
    font-size: 0.7rem;
    color: var(--accent);
    pointer-events: none;
}

/* Notes section */
.notes-section {
    margin: 2rem 0 1.5rem;
}

.notes-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.note-item {
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 0.75rem;
}

.note-body {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text);
    white-space: pre-wrap;
}

.note-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.5rem;
}

.note-ts {
    font-size: 0.72rem;
    color: var(--muted);
}

.note-delete-form {
    margin: 0;
}

.note-delete-btn {
    background: none;
    border: none;
    color: var(--muted);
    font-size: 1rem;
    line-height: 1;
    padding: 0 0.2rem;
    cursor: pointer;
    width: auto;
    margin: 0;
    transition: color 0.15s;
}

.note-delete-btn:hover {
    color: #e07070;
    opacity: 1;
}

.notes-form {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.notes-textarea {
    width: 100%;
    box-sizing: border-box;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0.6rem 0.75rem;
    font-size: 0.9rem;
    font-family: inherit;
    resize: vertical;
    outline: none;
    transition: border-color 0.15s;
    min-height: 4rem;
}

.notes-textarea:focus {
    border-color: var(--accent);
}

.notes-save-btn {
    align-self: flex-end;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0.5rem 1.25rem;
    font-size: 0.8rem;
    font-family: inherit;
    letter-spacing: 0.05em;
    cursor: pointer;
    width: auto !important;
    margin: 0;
    white-space: nowrap;
    transition: border-color 0.15s, color 0.15s;
}

.notes-save-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    opacity: 1;
}

/* Slug generation */
.slug-gen-form {
    margin-left: auto;
}

.slug-gen-btn {
    background: none;
    border: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.72rem;
    font-family: inherit;
    letter-spacing: 0.04em;
    padding: 0.2rem 0.5rem;
    cursor: pointer;
    width: auto !important;
    margin: 0;
    white-space: nowrap;
    transition: color 0.15s, border-color 0.15s;
}

.slug-gen-btn:hover {
    color: var(--accent);
    border-color: var(--accent);
    opacity: 1;
}

.img-slug-badge {
    font-size: 0.72rem;
    color: var(--accent);
    border: 1px solid var(--accent);
    padding: 0.15rem 0.5rem;
    letter-spacing: 0.03em;
    opacity: 0.8;
    max-width: 240px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Public toggle button */
.pub-btn {
    background: none;
    border: 1px solid var(--border);
    color: var(--muted);
    font-size: 1.2rem;
    line-height: 1;
    padding: 0.3rem 0.6rem;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
    width: auto;
    margin: 0;
}

.pub-btn:hover {
    color: #7eb8f7;
    border-color: #7eb8f7;
    opacity: 1;
}

.pub-btn--active {
    color: #7eb8f7;
    border-color: #7eb8f7;
}

/* Public URL bar */
.pub-url-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--surface);
    border: 1px solid #7eb8f7;
    padding: 0.5rem 0.75rem;
    margin-bottom: 1rem;
    font-size: 0.82rem;
}

.pub-url-label {
    color: #7eb8f7;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    white-space: nowrap;
}

.pub-url-link {
    color: var(--text);
    text-decoration: none;
    word-break: break-all;
}

.pub-url-link:hover {
    color: #7eb8f7;
}

/* Public image page layout */
.pub-image-wrap {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.pub-image-pane {
    flex: 0 0 55%;
    max-width: 55%;
}

.pub-image-info {
    flex: 1;
    padding-top: 0.25rem;
}

@media (max-width: 680px) {
    .pub-image-wrap {
        display: block;
    }

    .pub-image-pane {
        width: 100%;
        margin-bottom: 1.5rem;
    }

    .pub-image-pane img {
        width: 100%;
        height: auto;
        display: block;
    }

    .pub-image-info {
        padding-top: 0;
    }
}

/* Public profile page */
.pub-profile {
    padding: 3rem 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.pub-profile-name {
    font-size: 2rem;
    font-weight: 300;
    letter-spacing: 0.05em;
    margin: 0;
}

.pub-profile-corpus {
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--muted);
    max-width: 680px;
    margin: 0 0 1.5rem;
}

.pub-profile-link {
    font-size: 0.95rem;
    color: var(--accent);
    text-decoration: none;
}

.pub-profile-link:hover {
    opacity: 0.8;
}

.pub-profile-count {
    font-weight: 600;
}

/* Public article page */
.pub-article {
    max-width: 1100px;
    margin: 0 auto;
}

.pub-article-header {
    margin-bottom: 1.5rem;
}

.pub-article-title {
    font-size: 1.8rem;
    font-weight: 400;
    letter-spacing: 0.02em;
    margin: 0 0 0.4rem;
    line-height: 1.3;
    text-transform: capitalize;
}

.pub-article-category {
    font-size: 0.8rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0;
}

.pub-desc {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text);
    margin: 0 0 1rem;
}

@media (max-width: 680px) {
    .pub-article-title {
        font-size: 1.3rem;
        letter-spacing: 0.01em;
    }

    .pub-desc {
        font-size: 0.9rem;
        line-height: 1.6;
    }
}

.pub-tags {
    margin-top: 1rem;
}

.pub-recog-block {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.pub-recog-block--sep {
    margin-top: 1.75rem;
    padding-top: 1.75rem;
    border-top: 1px solid var(--border);
}

.pub-recog-model {
    font-size: 0.68rem;
    color: var(--muted);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin: 0;
    opacity: 0.6;
}

/* reset individual margins inside blocks — gap handles spacing */
.pub-recog-block .pub-desc,
.pub-recog-block .recog-evidence,
.pub-recog-block .recog-notes,
.pub-recog-block .recog-location,
.pub-recog-block .recog-source,
.pub-recog-block .recog-person,
.pub-recog-block .recog-unidentified,
.pub-recog-block .recog-tags,
.pub-recog-block .recog-mood {
    margin: 0;
}

/* Header action buttons group */
.dash-header-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-left: auto;
}

.dash-header-actions .fav-form {
    margin-left: 0;
}

/* Show on public page button */
.show-recog-btn {
    background: none;
    border: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.72rem;
    font-family: inherit;
    letter-spacing: 0.04em;
    padding: 0.2rem 0.5rem;
    cursor: pointer;
    width: auto !important;
    margin: 0;
    white-space: nowrap;
    transition: color 0.15s, border-color 0.15s;
}

.show-recog-btn:hover {
    color: #7eb8f7;
    border-color: #7eb8f7;
    opacity: 1;
}

.show-recog-btn--active {
    color: #7eb8f7;
    border-color: #7eb8f7;
}

.show-recog-btn--always {
    color: var(--accent);
    border-color: var(--accent);
    opacity: 0.6;
    cursor: default;
}

.recog-baseline-note {
    font-size: 0.72rem;
    color: var(--accent);
    opacity: 0.7;
    margin: 0.5rem 0 0;
    letter-spacing: 0.03em;
}

/* ── triboelectrics card ── */
.recog-tribo {
    border: 1px solid #3a2a1f;
    background: #1e1610;
    padding: 0.75rem 0.9rem;
    margin-bottom: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.recog-tribo-metals {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.recog-tribo-assessment {
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--text);
    margin: 0;
}

.recog-tribo-suppression {
    font-size: 0.78rem;
    line-height: 1.55;
    color: #c8a060;
    border-left: 2px solid #5a3a1f;
    padding-left: 0.65rem;
    margin: 0;
    font-style: italic;
}

.recog-tribo-row {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
}

.tribo-label {
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #c8a060;
    opacity: 0.7;
    white-space: nowrap;
    padding-top: 0.2rem;
    flex-shrink: 0;
}

.recog-tribo-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.recog-tribo-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
}

.tribo-chip {
    font-size: 0.65rem;
    padding: 0.15rem 0.5rem;
    border: 1px solid #5a3a1f;
    color: #c8a060;
    letter-spacing: 0.05em;
    text-transform: lowercase;
}

/* ── electrochemical residue card ── */
.recog-electro {
    border: 1px solid #1f3a33;
    background: #101e1a;
    padding: 0.75rem 0.9rem;
    margin-bottom: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.recog-electro-deposits {
    margin: 0;
    padding-left: 1.1rem;
    font-size: 0.8rem;
    line-height: 1.5;
    color: var(--text);
}

.recog-electro-conventional {
    font-size: 0.78rem;
    line-height: 1.55;
    color: #7fc4b0;
    border-left: 2px solid #2f5a4e;
    padding-left: 0.65rem;
    margin: 0;
    font-style: italic;
}

.electro-label {
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #7fc4b0;
    opacity: 0.7;
    white-space: nowrap;
    padding-top: 0.2rem;
    flex-shrink: 0;
}

.electro-chip {
    font-size: 0.65rem;
    padding: 0.15rem 0.5rem;
    border: 1px solid #2f5a4e;
    color: #7fc4b0;
    letter-spacing: 0.05em;
    text-transform: lowercase;
}

/* ── board: select & move ── */
.select-toggle {
    margin-left: auto;
    background: none;
    border: 1px solid var(--border);
    color: var(--muted);
    padding: 0.35rem 0.9rem;
    font-size: 0.78rem;
    font-family: inherit;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
}

.select-toggle:hover,
.select-toggle--active {
    border-color: var(--accent);
    color: var(--accent);
}

.image-grid--selecting .image-cell {
    position: relative;
    cursor: pointer;
}

.image-grid--selecting .image-cell::before {
    content: '';
    position: absolute;
    top: 0.4rem;
    left: 0.4rem;
    z-index: 2;
    width: 1.1rem;
    height: 1.1rem;
    border: 1px solid rgba(255, 255, 255, 0.8);
    background: rgba(0, 0, 0, 0.45);
}

.image-grid--selecting .image-cell--selected {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
}

.image-grid--selecting .image-cell--selected::before {
    content: '✓';
    background: var(--accent);
    border-color: var(--accent);
    color: #0f0f0f;
    font-size: 0.8rem;
    line-height: 1.1rem;
    text-align: center;
}

.image-grid--selecting .image-cell--selected img {
    opacity: 0.6;
    transform: none;
}

.move-bar {
    position: sticky;
    bottom: 0;
    z-index: 10;
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom, 0px));
    background: var(--surface);
    border-top: 1px solid var(--accent);
}

.move-bar-count {
    font-size: 0.82rem;
    color: var(--muted);
}

.move-bar-count strong { color: var(--text); }

.move-bar-link {
    background: none;
    border: none;
    color: var(--muted);
    font-family: inherit;
    font-size: 0.78rem;
    cursor: pointer;
    padding: 0.2rem 0.3rem;
    text-decoration: underline;
}

.move-bar-link:hover { color: var(--text); }

.move-bar-select {
    flex: 1 1 14rem;
    min-width: 0;
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--border);
    padding: 0.45rem 0.6rem;
    font-family: inherit;
    font-size: 0.82rem;
}

.move-bar .move-bar-submit {
    width: auto;
    margin: 0;
    padding: 0.5rem 1.2rem;
}

.move-bar .move-bar-submit:disabled {
    opacity: 0.4;
    cursor: default;
}

/* ── virtual boards ── */
.board-section-title {
    font-size: 0.72rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--muted);
    margin: 0 0 0.75rem;
}

.board-grid--virtual { margin-bottom: 2rem; }

.board-card--virtual { border-left: 2px solid var(--accent); }

.vboard-badge {
    font-size: 0.65rem;
    padding: 0.15rem 0.5rem;
    border: 1px solid var(--accent);
    color: var(--accent);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.vboard-delete-form { margin: 0; }

.vboard-delete,
.move-bar .move-bar-remove {
    width: auto;
    margin: 0;
    background: none;
    border: 1px solid #5a2a2a;
    color: #e07070;
    padding: 0.35rem 0.9rem;
    font-size: 0.78rem;
    font-weight: 400;
    font-family: inherit;
    cursor: pointer;
}

.move-bar .move-bar-remove { padding: 0.5rem 1rem; }

.vboard-delete:hover,
.move-bar .move-bar-remove:hover { border-color: #e07070; opacity: 1; }

.move-bar .move-bar-remove:disabled { opacity: 0.4; cursor: default; }

.img-vboards {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 1.25rem;
}

.img-vboards-label {
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    margin-right: 0.25rem;
}

.vboard-chip {
    font-size: 0.75rem;
    padding: 0.15rem 0.55rem;
    border: 1px solid var(--accent);
    color: var(--accent);
    text-decoration: none;
}

.vboard-chip:hover { background: var(--accent); color: #0f0f0f; }

.vboard-new-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.vboard-new-row .board-section-title { margin: 0; }

.vboard-new-form {
    display: flex;
    gap: 0.4rem;
    flex: 0 1 22rem;
    min-width: 0;
}

.vboard-new-form input {
    flex: 1;
    min-width: 0;
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--border);
    padding: 0.45rem 0.6rem;
    font-family: inherit;
    font-size: 0.82rem;
}

.vboard-new-form input:focus { outline: none; border-color: var(--accent); }

.vboard-new-form button[type="submit"] {
    width: auto;
    margin: 0;
    padding: 0.45rem 1rem;
    font-size: 0.8rem;
}

.vboard-empty { padding: 0 0 2rem; }

.vboard-public {
    width: auto;
    margin: 0;
    background: none;
    border: 1px solid var(--border);
    color: var(--muted);
    padding: 0.35rem 0.9rem;
    font-size: 0.78rem;
    font-weight: 400;
    font-family: inherit;
    cursor: pointer;
}

.vboard-public:hover { border-color: #7eb8f7; color: #7eb8f7; opacity: 1; }

.vboard-public--on { border-color: #7eb8f7; color: #7eb8f7; }

.vboard-public-dot { color: #7eb8f7; }

.pub-url-bar { flex-wrap: wrap; }

.pub-url-copy {
    margin-left: auto;
    background: none;
    border: 1px solid #7eb8f7;
    color: #7eb8f7;
    padding: 0.25rem 0.8rem;
    font-size: 0.75rem;
    font-family: inherit;
    cursor: pointer;
}

.pub-url-copy:hover { background: #7eb8f7; color: #0f0f0f; }
