:root {
    --primary: #8b4513;
    --secondary: #d2691e;
    --bg: #f9f7f1;
    --text: #333;
    --white: #ffffff;
    --light-gray: #e0e0e0;
    --border: #ddd;
    --warm-border: #e8ddd0;
    --warm-bg: #fdfbf7;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    font-size: 16px;
}

.app-wrapper {
    max-width: 480px;
    margin: 0 auto;
    background: var(--bg);
    min-height: 100vh;
}

/* Header */
.app-header {
    background: var(--primary);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    /* needed for absolute-centred loaf icon */
    isolation: isolate;
}
.header-loaf {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    top: 50%;
    margin-top: -16px;
}
@keyframes hdrFloatLoaf {
    0%, 100% { transform: translateY(0px); }
    50%       { transform: translateY(-3px); }
}
.hdr-loaf-float {
    animation: hdrFloatLoaf 3.2s ease-in-out infinite;
}
.header-logo {
    color: white;
    font-size: 18px;
    font-weight: 500;
    letter-spacing: 0.3px;
}
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}
.btn-login {
    background: rgba(255,255,255,0.18);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 6px;
    color: white;
    font-size: 13px;
    padding: 5px 10px;
    cursor: pointer;
}
.btn-hamburger {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    padding: 4px;
    width: 28px;
    height: 28px;
}
.btn-hamburger span {
    display: block;
    width: 20px;
    height: 2px;
    background: white;
    border-radius: 2px;
}

/* ── Environment Banner (replaces privacy banner) ── */
#env-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    background: #fef9f0;
    border-bottom: 1px solid #f0e0c0;
    font-size: 13px;
    color: #6b4a1e;
    min-height: 38px;
    gap: 8px;
}

.env-data {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    flex: 1;
    min-width: 0;
    gap: 0;
}

.env-icon {
    margin-right: 5px;
    font-size: 13px;
}

.env-city {
    font-weight: 600;
    color: var(--primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}

.env-sep {
    color: #d0c0b0;
    margin: 0 3px;
}

.env-field {
    white-space: nowrap;
    font-size: 12px;
}

.env-field strong {
    color: var(--primary);
}

.env-prompt {
    display: flex;
    align-items: center;
    color: var(--secondary);
    font-size: 13px;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.env-locating {
    color: #999;
    font-style: italic;
    font-size: 13px;
}

.env-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    margin-left: auto;
}

.env-learn-more {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 11px;
    cursor: pointer;
    padding: 2px 4px;
    text-decoration: underline;
    white-space: nowrap;
    font-weight: 500;
}

.env-add-btn,
.env-edit-btn {
    background: none;
    border: 1px solid #d0c0b0;
    border-radius: 50%;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    color: var(--primary);
    padding: 0;
    line-height: 1;
}

.env-add-btn:hover,
.env-edit-btn:hover {
    background: #f0e0c0;
}

/* ── Environment Learn More Popup ── */
#env-learn-more-popup {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 1000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 16px;
}

.env-popup-inner {
    background: var(--bg);
    border-radius: 12px;
    padding: 20px;
    max-width: 420px;
    width: 100%;
    position: relative;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text);
}

.env-popup-inner p {
    margin: 0 0 12px 0;
}

.env-popup-inner p:last-child {
    margin-bottom: 0;
}

.env-popup-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    color: #999;
    padding: 4px;
    line-height: 1;
}

/* ── Environment Edit Panel ── */
#env-edit-panel {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 1000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.env-edit-inner {
    background: var(--bg);
    border-radius: 16px 16px 0 0;
    padding: 20px 20px 32px;
    max-width: 480px;
    width: 100%;
}

.env-edit-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.env-edit-title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--primary);
    text-transform: uppercase;
}

.env-edit-close {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #999;
    padding: 4px;
    line-height: 1;
}

.env-edit-unit-toggle {
    display: flex;
    gap: 6px;
    margin-bottom: 20px;
}

.env-unit-btn {
    flex: 1;
    padding: 7px;
    border: 1px solid var(--warm-border);
    border-radius: 6px;
    background: white;
    font-size: 13px;
    cursor: pointer;
    color: var(--text);
}

.env-unit-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.env-edit-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    gap: 12px;
}

.env-edit-label {
    font-size: 14px;
    color: var(--text);
    flex: 1;
}

.env-edit-sublabel {
    font-size: 11px;
    color: #999;
    display: block;
    margin-top: 1px;
}

.env-edit-input-wrap {
    display: flex;
    align-items: center;
    border: 1px solid var(--warm-border);
    border-radius: 8px;
    overflow: hidden;
    background: white;
}

.env-edit-input {
    width: 72px;
    padding: 8px 10px;
    border: none;
    font-size: 15px;
    background: white;
    text-align: right;
    color: var(--text);
    outline: none;
    font-family: inherit;
}

.env-edit-input:focus {
    background: #fffdf9;
}

.env-input-grayed {
    color: #aaa;
    background: #f5f5f5 !important;
}

.env-edit-unit {
    padding: 8px 10px 8px 4px;
    font-size: 13px;
    color: #888;
    background: white;
    white-space: nowrap;
}

.env-edit-footer {
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}

.env-edit-location-label {
    font-size: 12px;
    color: #999;
    flex: 1;
}

.env-edit-footer-btns {
    display: flex;
    gap: 8px;
}

.env-refresh-btn,
.env-request-btn {
    padding: 8px 12px;
    border: 1px solid var(--warm-border);
    border-radius: 8px;
    background: white;
    font-size: 13px;
    cursor: pointer;
    color: var(--secondary);
}

.env-save-btn {
    padding: 8px 18px;
    border: none;
    border-radius: 8px;
    background: var(--primary);
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.env-save-btn:hover {
    opacity: 0.9;
}

/* Body */
.app-body { padding: 14px; }

/* Upload zone */
.upload-zone {
    border: 2px dashed #c4956a;
    border-radius: 12px;
    background: var(--warm-bg);
    padding: 22px 16px;
    text-align: center;
    margin-bottom: 14px;
    cursor: pointer;
}
.upload-zone:active { background: #f4f1ea; }
.upload-zone .upload-icon { font-size: 26px; margin-bottom: 5px; display: block; }
.upload-zone p { font-size: 14px; font-weight: 500; color: var(--primary); margin-bottom: 2px; }
.upload-zone span { font-size: 11px; color: #999; }
.preview-container {
    margin-top: 12px;
    display: none;
    border-radius: 8px;
    overflow: hidden;
    text-align: center;
}
.preview-container img {
    max-width: 100%;
    max-height: 260px;
    object-fit: contain;
}

/* Form elements */
.field-group { margin-bottom: 6px; }
.field-label {
    font-size: 15px;
    color: #666;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 500;
}
.field-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}
.field-label-row .field-label {
    margin-bottom: 0;
}
.field-label-row .help-link {
    font-size: 13px;
    color: var(--secondary);
    text-decoration: none;
    white-space: nowrap;
}
.help-icon { font-size: 13px; color: #b07040; cursor: pointer; }

textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 13px;
    color: var(--text);
    background: white;
    resize: none;
    height: 62px;
    font-family: inherit;
}
select {
    border: 1px solid var(--border);
    border-radius: 7px;
    padding: 7px 10px;
    font-size: 13px;
    color: var(--text);
    background: white;
}
select.full { width: 100%; }

.char-row { display: flex; justify-content: space-between; margin-top: 3px; }
.char-count { font-size: 11px; color: #aaa; }
.help-link { font-size: 11px; color: var(--primary); text-decoration: none; }

/* Radio groups */
.radio-group { display: flex; align-items: center; gap: 16px; }
.radio-opt {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    font-size: 13px;
    color: #444;
}
.radio-opt input[type=radio] {
    accent-color: var(--primary);
    width: 15px;
    height: 15px;
    cursor: pointer;
}

/* Section blocks */
.section-block {
    background: white;
    border: 1px solid var(--warm-border);
    border-radius: 10px;
    padding: 0;
    margin-bottom: 11px;
    overflow: hidden;
}
.section-block-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 0;
}

.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.row-2 select { width: 100%; }

/* Inline field */
.inline-field {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}
.inline-field .field-label { margin-bottom: 0; flex: 1; }
.inline-field select { width: 160px; }

/* More details toggle */
.more-toggle {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 8px 0;
    cursor: pointer;
    color: var(--primary);
    font-size: 13px;
    font-weight: 500;
    border: none;
    background: none;
    width: 100%;
}
.more-toggle .chevron { transition: transform 0.2s; }
.more-toggle.open .chevron { transform: rotate(180deg); }

.more-panel {
    background: var(--warm-bg);
    border: 1px solid var(--warm-border);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 12px;
}
.sub-section { margin-bottom: 13px; }
.sub-section:last-child { margin-bottom: 0; }
.sub-label {
    font-size: 11px;
    font-weight: 500;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 8px;
    padding-bottom: 5px;
    border-bottom: 1px solid var(--warm-border);
}

/* Analyze button */
.btn-analyze {
    width: 100%;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 14px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    margin-top: 4px;
    letter-spacing: 0.2px;
}
.btn-analyze:disabled { opacity: 0.6; cursor: not-allowed; }

#sticky-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 150;
    background: var(--bg);
    border-top: 1px solid var(--warm-border);
    padding: 10px 14px 24px;
    max-width: 480px;
    margin: 0 auto;
}
@media (min-width: 480px) {
    #sticky-bar {
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        width: 480px;
    }
}
.sticky-btn-analyze {
    width: 100%;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 14px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    letter-spacing: 0.2px;
    font-family: inherit;
    transition: opacity 0.15s;
}
.sticky-btn-analyze:hover    { opacity: 0.88; }
.sticky-btn-analyze:disabled { opacity: 0.6; cursor: not-allowed; }
.sticky-btn-save {
    width: 100%;
    background: var(--secondary);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 14px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    letter-spacing: 0.2px;
    font-family: inherit;
    transition: opacity 0.15s;
}
.sticky-btn-save:hover    { opacity: 0.88; }
.sticky-btn-save:disabled { opacity: 0.6; cursor: not-allowed; }
.sticky-local-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin-top: 6px;
    font-size: 11px;
    color: #aaa;
}
.app-body {
    padding-bottom: 100px !important;
}
.app-footer-copy {
    font-size: 11px;
    color: #bbb;
    margin-top: 6px;
}

/* ── Details nudge ── */

.local-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin-top: 7px;
    font-size: 11px;
    color: #aaa;
}

/* Loading */
.loading {
    display: none;
    text-align: center;
    color: var(--primary);
    margin: 16px 0;
    font-size: 14px;
}

/* Results */
.result-box { margin-top: 16px; }

.result-card {
    background: white;
    border-radius: 12px;
    border: 1px solid var(--border);
    overflow: hidden;
}
.result-hdr {
    background: var(--primary);
    color: white;
    padding: 14px 16px;
}
.result-hdr-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}
.result-hdr h2 { font-size: 17px; font-weight: 600; letter-spacing: -0.2px; }
.severity-badge {
    font-size: 12px;
    font-weight: 500;
    background: rgba(255,255,255,0.2);
    padding: 3px 10px;
    border-radius: 20px;
    white-space: nowrap;
}
.severity-major { background: rgba(255,80,80,0.3); }
.severity-minor { background: rgba(255,200,80,0.3); }
.severity-success { background: rgba(80,200,80,0.3); }
.conf-bar { height: 3px; background: rgba(255,255,255,0.25); border-radius: 2px; }
.conf-fill { height: 3px; background: white; border-radius: 2px; }

.ack-block {
    background: #f0f7e8;
    padding: 10px 16px;
    border-bottom: 1px solid #ddedc8;
    font-size: 14px;
    line-height: 1.5;
    color: #3d6020;
}
.result-section {
    padding: 14px 16px;
    border-bottom: 1px solid #f0e8de;
}
.result-section:last-of-type { border-bottom: none; }
.result-section h3 {
    font-size: 11px;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 8px;
}
.result-section p,
.result-section li {
    font-size: 14px;
    line-height: 1.6;
    color: #333;
}
.result-opener {
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    padding: 12px 16px 0;
}

.affiliate-block {
    padding: 10px 13px;
    background: var(--warm-bg);
    border-top: 1px solid var(--warm-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.affiliate-block p { font-size: 12px; color: #6b4a1e; line-height: 1.4; flex: 1; }
.affiliate-link {
    font-size: 12px;
    color: var(--primary);
    font-weight: 500;
    white-space: nowrap;
    margin-left: 10px;
    text-decoration: none;
}

.no-result {
    text-align: center;
    color: #888;
    font-size: 14px;
    padding: 20px;
}

.two-result-header {
    font-size: 13px;
    color: var(--primary);
    font-weight: 500;
    margin-bottom: 10px;
}

/* Examples panel */
.examples-panel {
    background: var(--warm-bg);
    border: 1px solid var(--warm-border);
    border-radius: 8px;
    padding: 10px 12px;
    margin-top: 6px;
    display: none;
}
.examples-panel p {
    font-size: 12px;
    color: #555;
    margin-bottom: 5px;
    line-height: 1.4;
}
.examples-panel p:last-child { margin-bottom: 0; }

/* Responsive */
@media (min-width: 480px) {
    .app-wrapper { border-left: 1px solid var(--warm-border); border-right: 1px solid var(--warm-border); }
}

/* ── Result card photo thumbnail ── */
.result-photo-wrap {
    width: 100%;
    cursor: pointer;
    border-radius: 10px 10px 0 0;
    overflow: hidden;
    background: #111;
}
.result-photo {
    width: 100%;
    max-height: 120px;
    object-fit: cover;
    display: block;
    border-radius: 10px 10px 0 0;
    transition: max-height 0.35s ease;
}

/* ── Baking inputs summary ── */
.inputs-summary {
    margin: 10px 16px;
    border: 1px solid var(--warm-border, #e8ddd0);
    border-radius: 8px;
    overflow: hidden;
    font-size: 13px;
}
.inputs-summary-toggle {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    align-items: center;
    padding: 9px 12px;
    cursor: pointer;
    background: var(--warm-bg, #fdfbf7);
    user-select: none;
    gap: 8px;
}
.inputs-summary-line {
    color: #666;
    font-size: 12px;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.inputs-chevron {
    color: #999;
    font-size: 14px;
    transition: transform 0.2s ease;
    flex-shrink: 0;
    margin-left: 0;
}
.inputs-detail {
    border-top: 1px solid var(--warm-border, #e8ddd0);
    padding: 8px 12px 8px 24px;
    background: #fff;
}
.inputs-row {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    border-bottom: 1px solid #f0ebe4;
    gap: 12px;
}
.inputs-row:last-child {
    border-bottom: none;
}
.inputs-label {
    color: #999;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    flex-shrink: 0;
    padding-top: 1px;
}
.inputs-value {
    color: #333;
    font-size: 13px;
    text-align: right;
}
/* ── App footer ── */
.app-footer {
    margin-top: 20px;
    padding: 16px 14px 32px;
    text-align: center;
    border-top: 1px solid var(--warm-border);
}
.app-footer-links {
    display: flex;
    justify-content: center;
    gap: 16px;
    font-size: 12px;
}
.app-footer-links a {
    color: #aaa;
    text-decoration: none;
}
.app-footer-links a:hover {
    color: var(--primary);
    text-decoration: underline;
}
.ingredient-weight input {
    padding-right: 22px;
}
/* ── Config-driven form sections ── */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 12px;
    cursor: pointer;
    user-select: none;
    background: var(--warm-bg);
    border-bottom: 1px solid var(--warm-border);
}
.section-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.6px;
}
.section-chevron {
    font-size: 11px;
    color: #aaa;
    transition: transform 0.2s ease;
}
.section-chevron.open { transform: rotate(180deg); }
.section-body {
    padding: 8px 12px 4px;
}
.section-body.hidden { display: none; }
.bread-shape-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    background: white;
    border: 1px solid var(--warm-border);
    border-radius: 10px;
    padding: 10px 12px;
}
.bread-shape-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.add-row-btn {
    background: none;
    border: 1px dashed var(--warm-border);
    border-radius: 8px;
    padding: 7px 10px;
    font-size: 12px;
    color: var(--primary);
    cursor: pointer;
    font-family: inherit;
    width: 100%;
    text-align: left;
    margin-bottom: 8px;
}
input[type="number"] {
    border: 1px solid var(--border);
    border-radius: 7px;
    padding: 7px 10px;
    font-size: 13px;
    color: var(--text);
    background: white;
    font-family: inherit;
    outline: none;
}
input[type="number"]:focus { border-color: var(--primary); }
/* ─── Parameter acknowledgment block ─────────────────────────────────────── */

.parameter-ack {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px;
    margin: 6px 16px 10px;
    padding: 8px 12px;
    background: #f5f0ea;
    border-left: 3px solid #8b4513;
    border-radius: 0 6px 6px 0;
    font-size: 13px;
    line-height: 1.4;
}

.parameter-ack-label {
    font-weight: 600;
    color: #8b4513;
    white-space: nowrap;
    margin-right: 2px;
}

.parameter-ack-items {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.parameter-ack-item {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: #fff;
    border: 1px solid #d4c4b0;
    border-radius: 4px;
    padding: 2px 8px;
    font-size: 12px;
    color: #444;
    white-space: nowrap;
}

.parameter-ack-field {
    color: #8b4513;
    font-weight: 500;
}

/* ─── Result section bullet lists ────────────────────────────────────────── */

.result-bullets {
    margin: 6px 0 0 0;
    padding-left: 18px;
    list-style-type: disc;
}

.result-bullets li {
    margin-bottom: 6px;
    line-height: 1.5;
    font-size: 14px;
    color: #333;
}

/* ── Logbook header user label ── */
.logbook-header-user {
    font-size: 13px;
    color: var(--primary);
    font-weight: 500;
    opacity: 0.7;
}

/* ── Confidence badge ── */
.confidence-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 16px 2px;
    font-size: 12px;
    color: #888;
}
.confidence-pct {
    font-weight: 600;
    color: #555;
    font-size: 13px;
}
.confidence-label {
    color: #999;
}
.confidence-tip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1px solid #ccc;
    font-size: 9px;
    color: #999;
    cursor: help;
    margin-left: 2px;
}

/* ── Heart favourite ── */
.lb-heart {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    opacity: 0.3;
    transition: opacity 0.15s, transform 0.15s;
}
.lb-heart.is-favourite {
    opacity: 1;
}
.lb-heart:active {
    transform: scale(1.3);
}

.logbook-row-conf {
    font-size: 12px;
    color: var(--lb-text-muted, #888);
    margin-right: 6px;
}

/* ── Wrong diagnosis button ── */
.wrong-diagnosis-btn {
    background: none;
    border: none;
    font-size: 11px;
    color: #c87030;
    text-decoration: underline;
    cursor: pointer;
    padding: 0 0 0 8px;
    font-family: inherit;
}
.wrong-diagnosis-btn:disabled {
    color: #4a7c3f;
    text-decoration: none;
    cursor: default;
}

/* ── Correction picker options ── */
.correction-option {
    display: block;
    width: 100%;
    background: white;
    border: 1px solid #e8ddd0;
    border-radius: 10px;
    padding: 14px 16px;
    font-size: 15px;
    font-family: inherit;
    color: #2c1a0e;
    text-align: left;
    cursor: pointer;
    margin-bottom: 8px;
    transition: background 0.15s;
}
.correction-option:hover {
    background: #fdf5ec;
}
.correction-other {
    color: #888;
    font-size: 14px;
    margin-top: 4px;
}

/* ── Photo-only strong warning ── */
.photo-only-warning {
    background: #1a0000;
    border: 1px solid #cc0000;
    border-radius: 8px;
    margin: 10px 16px 0;
    padding: 10px 14px;
    font-size: 13px;
    color: #ff4444;
    line-height: 1.5;
    font-weight: 500;
}

/* ── Diagnosis Strength Bar ── */
.dx-bar-wrap {
    padding: 14px 0 8px;
}
.dx-bar-segments {
    display: flex;
    gap: 8px;
}
.dx-segment {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.dx-segment-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 600;
    color: #888;
}
.dx-segment-track {
    height: 10px;
    background: #e8e0d8;
    border-radius: 5px;
    overflow: hidden;
    position: relative;
}
.dx-segment-fill {
    height: 100%;
    border-radius: 5px;
    width: 0%;
    transition: width 0.4s ease, background-color 0.4s ease;
    background: #e8e0d8;
}
.dx-segment-fill.partial {
    background: linear-gradient(90deg, #e8a04a, #f0b86a);
}
.dx-segment-fill.strong {
    background: linear-gradient(90deg, #4a7c3f, #6aad5a);
}
@keyframes dxPulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.35; }
}
.dx-segment-track.empty .dx-segment-fill {
    animation: dxPulse 1.8s ease-in-out infinite;
    width: 6%;
    background: #ccc;
}

/* ── Scroll invitation ── */
.scroll-invite {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 0 8px;
    gap: 4px;
    font-size: 13px;
    color: #bbb;
    font-weight: 500;
}
.scroll-invite-chevron {
    font-size: 22px;
    color: #ccc;
    animation: scrollBounce 2s ease-in-out infinite;
}
@keyframes scrollBounce {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(5px); }
}
