/* Soft Habit V3: sand surfaces, editorial titles and sage accept and outlined reject choices. */
.lc-consent {
    --lc-background: #fbf8f2;
    --lc-text: #1a1a1a;
    --lc-primary: #6a9169;
    --lc-on-primary: #1a1a1a;
    --lc-accent: var(--lc-primary);
    --lc-on-accent: var(--lc-on-primary);
    --lc-link: var(--lc-text);
    --lc-focus: var(--lc-text);
    --lc-font-heading: var(--font-serif, Georgia), serif;
    --lc-font-button: var(--lc-font-body);
    --lc-font-body: var(--font-inter, -apple-system), BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --lc-bottom: 24px;
    --lc-viewport-height: 100dvh;
    --lc-line: color-mix(in srgb, var(--lc-text) 22%, var(--lc-background));
    --lc-tint: color-mix(in srgb, var(--lc-text) 5%, var(--lc-background));
    --lc-shadow: 0 18px 40px rgb(58 48 34 / 14%);
    color: var(--lc-text);
    font: var(--lc-body-weight, 400) 15px/1.6 var(--lc-font-body);
    text-align: left;
    text-transform: none;
    letter-spacing: normal;
    -webkit-text-size-adjust: 100%;
    color-scheme: light;
}
.lc-consent[data-theme="soft-habit"] {
    --lc-accent: #8a6f3f;
    --lc-on-accent: #fbf8f2;
    --lc-link: #6f5930;
    --lc-focus: #8a6f3f;
    --lc-line: #d9cfbe;
    --lc-tint: #f4ede1;
}
.lc-consent *, .lc-consent *::before, .lc-consent *::after { box-sizing: border-box; }
.lc-consent [hidden], .lc-dialog:not([open]) { display: none !important; }
.lc-consent ::selection { background: var(--lc-primary); color: var(--lc-selection-text); }
.lc-consent :focus-visible { outline: 2px solid var(--lc-focus); outline-offset: 3px; }
.lc-consent .lc-title, .lc-consent .lc-category-title, .lc-consent .lc-service-name,
.lc-consent p, .lc-consent dl, .lc-consent dd { padding: 0; margin: 0; color: inherit; font-family: inherit; }
.lc-banner, .lc-launcher, .lc-notice {
    position: fixed;
    z-index: 2147483000;
    left: max(24px, env(safe-area-inset-left));
    bottom: max(var(--lc-bottom), env(safe-area-inset-bottom));
}
.lc-consent[data-position="right"] .lc-banner,
.lc-consent[data-position="right"] .lc-launcher,
.lc-consent[data-position="right"] .lc-notice { left: auto; right: max(24px, env(safe-area-inset-right)); }
.lc-banner {
    width: min(460px, calc(100vw - 48px));
    max-height: calc(var(--lc-viewport-height) - max(var(--lc-bottom), env(safe-area-inset-bottom)) - 16px);
    padding: 26px;
    overflow-y: auto;
    overscroll-behavior: contain;
    border: 0;
    border-radius: 18px;
    background: var(--lc-background);
    box-shadow: var(--lc-shadow);
    scrollbar-width: thin;
    scrollbar-color: var(--lc-text) var(--lc-background);
}
.lc-consent .lc-title { font-family: var(--lc-font-heading); color: var(--lc-title-color, var(--lc-text)); font-size: 28px; line-height: 1.12; font-weight: var(--lc-heading-weight, 500); letter-spacing: -.01em; text-wrap: balance; }
.lc-consent .lc-message { margin-top: 12px; font-size: 15px; line-height: 1.6; overflow-wrap: anywhere; }
.lc-consent .lc-policy-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 7px 0;
    margin-top: 3px;
    color: var(--lc-link);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.5;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    overflow-wrap: anywhere;
}
.lc-consent .lc-policy-link:hover { text-decoration-thickness: 2px; }
.lc-consent .lc-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    margin: 0;
    padding: 11px 14px;
    border: 0;
    border-radius: 12px;
    color: var(--lc-text);
    background: transparent;
    box-shadow: none;
    font: var(--lc-button-weight, 500) 14px/1.45 var(--lc-font-button);
    text-align: center;
    text-transform: none;
    text-decoration: none;
    letter-spacing: 0;
    white-space: normal;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-appearance: none;
    appearance: none;
    transition: filter 160ms ease-out, background-color 160ms ease-out;
}
.lc-consent .lc-button::before, .lc-consent .lc-button::after { display: none; }
.lc-consent .lc-button:disabled { cursor: wait; opacity: .65; }
.lc-consent .lc-button:hover:not(:disabled) { background: var(--lc-tint); color: var(--lc-secondary-text); }
.lc-equal-actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.lc-banner .lc-equal-actions { margin-top: 18px; }
.lc-consent .lc-button-choice { width: 100%; min-height: 48px; background: var(--lc-primary); color: var(--lc-on-primary); }
.lc-consent .lc-button-choice:hover:not(:disabled) { color: var(--lc-on-primary); background: var(--lc-primary); box-shadow: inset 0 0 0 1px currentColor; }
.lc-consent .lc-button-reject { background: var(--lc-reject-background); color: var(--lc-reject-text); border: 1px solid var(--lc-reject-border); }
.lc-consent .lc-button-reject:hover:not(:disabled) { color: var(--lc-reject-text); background: var(--lc-reject-background); box-shadow: inset 0 0 0 1px currentColor; }
.lc-consent .lc-button-choice:active:not(:disabled) { box-shadow: inset 0 0 0 1px currentColor; }
.lc-consent .lc-button-preferences { width: 100%; margin-top: 8px; background: var(--lc-tint); color: var(--lc-secondary-text); }
.lc-consent .lc-button-preferences:hover:not(:disabled) { text-decoration: underline; text-underline-offset: 3px; }
.lc-consent .lc-launcher {
    min-height: 44px;
    padding: 10px 15px;
    border-radius: 12px;
    background: var(--lc-background);
    color: var(--lc-text);
    box-shadow: 0 10px 24px rgb(58 48 34 / 10%);
    font-size: 13px;
    font-weight: 500;
}
.lc-consent .lc-launcher:hover:not(:disabled) { color: var(--lc-text); background: var(--lc-background); text-decoration: underline; text-underline-offset: 3px; }
.lc-dialog {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    width: min(620px, calc(100vw - 48px));
    max-width: none;
    max-height: calc(100vh - 48px);
    max-height: calc(100dvh - 48px);
    margin: auto;
    padding: 0;
    border: 0;
    border-radius: 18px;
    overflow: hidden;
    background: var(--lc-background);
    color: var(--lc-text);
    box-shadow: 0 18px 40px rgb(58 48 34 / 14%);
    font: inherit;
    text-align: left;
}
.lc-dialog::backdrop { background: rgb(26 26 26 / 40%); }
.lc-dialog-header { display: flex; align-items: center; gap: 16px; padding: 20px 22px 14px 28px; flex-shrink: 0; }
.lc-dialog-header .lc-title { flex: 1; font-size: 28px; }
.lc-consent .lc-close { flex-shrink: 0; width: 44px; height: 44px; padding: 12px; border-radius: 12px; }
.lc-close svg { display: block; flex-shrink: 0; }
.lc-dialog-body {
    flex: 1 1 auto;
    min-height: 40px;
    padding: 0 28px 22px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: var(--lc-text) var(--lc-background);
    scroll-padding: 16px;
}
.lc-consent .lc-introduction { margin-bottom: 8px; font-size: 14px; line-height: 1.6; }
.lc-consent .lc-reload-note { margin-bottom: 23px; font-size: 12px; line-height: 1.6; }
.lc-category { padding: 17px 0 14px; border-top: 1px solid var(--lc-line); }
.lc-category-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.lc-consent .lc-category-title { font-size: 16px; line-height: 1.35; font-weight: 600; letter-spacing: 0; }
.lc-always-active { flex-shrink: 0; font-size: 12px; line-height: 1.4; font-weight: 600; }
.lc-consent .lc-category-description { max-width: 70ch; margin-top: 7px; font-size: 13px; line-height: 1.65; overflow-wrap: anywhere; }
.lc-toggle { position: relative; display: flex; flex-shrink: 0; align-items: center; justify-content: flex-end; gap: 8px; min-height: 44px; min-width: 79px; cursor: pointer; }
.lc-toggle-input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.lc-toggle-track { position: relative; display: block; width: 40px; height: 24px; border: 1px solid var(--lc-text); border-radius: 12px; background: var(--lc-background); transition: background-color 140ms ease-out; }
.lc-toggle-track::after { position: absolute; top: 3px; left: 3px; display: block; width: 16px; height: 16px; border-radius: 50%; background: var(--lc-text); content: ''; transition: transform 140ms ease-out; }
.lc-toggle-input:checked + .lc-toggle-track { background: var(--lc-accent); border-color: var(--lc-accent); }
.lc-toggle-input:checked + .lc-toggle-track::after { transform: translateX(16px); background: var(--lc-on-accent); }
.lc-toggle-input:focus-visible { outline: none; }
.lc-toggle-input:focus-visible + .lc-toggle-track { outline: 2px solid var(--lc-focus); outline-offset: 3px; }
.lc-toggle-state { width: 26px; font-size: 12px; font-weight: 600; }
.lc-inventory { margin-top: 2px; font-size: 13px; }
.lc-inventory > summary { width: fit-content; min-height: 44px; padding: 11px 0; font-weight: 550; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.lc-inventory > summary::marker { color: var(--lc-text); font-size: 10px; }
.lc-service { color: var(--lc-secondary-text); margin: 3px 0 14px; padding: 13px 15px; background: var(--lc-tint); border-radius: 10px; }
.lc-consent .lc-service-name { margin-bottom: 9px; font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.lc-service-field { display: grid; grid-template-columns: 106px minmax(0, 1fr); gap: 12px; padding: 3px 0; }
.lc-service-field dt { margin: 0; font-weight: 600; }
.lc-service-field dd { overflow-wrap: anywhere; }
.lc-consent .lc-empty { margin: 0 0 12px; font-size: 13px; line-height: 1.65; }
.lc-consent .lc-inventory-note { margin-top: 15px; font-size: 12px; line-height: 1.6; }
.lc-consent .lc-version { margin-top: 8px; font-size: 11px; font-variant-numeric: tabular-nums; }
.lc-dialog-footer { flex-shrink: 0; padding: 17px 28px 12px; border-top: 1px solid var(--lc-line); background: var(--lc-background); }
.lc-consent .lc-button-save { width: 100%; min-height: 46px; margin-top: 8px; background: var(--lc-tint); color: var(--lc-secondary-text); border: 1px solid var(--lc-line); }
.lc-consent .lc-button-save:hover:not(:disabled) { text-decoration: underline; text-underline-offset: 3px; }
.lc-consent .lc-button-withdraw { width: 100%; margin-top: 3px; padding: 10px 4px; font-size: 12px; font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }
.lc-consent .lc-modal-status:not(:empty) { padding: 7px 0; font-size: 13px; }
.lc-notice {
    width: min(380px, calc(100vw - 48px));
    bottom: calc(max(var(--lc-bottom), env(safe-area-inset-bottom)) + 56px);
    padding: 13px 16px;
    border-radius: 12px;
    background: var(--lc-background);
    color: var(--lc-text);
    box-shadow: var(--lc-shadow);
    font-size: 13px;
    visibility: hidden;
    pointer-events: none;
}
.lc-notice-visible { visibility: visible; }
.lc-spacer { height: 0; width: 100%; pointer-events: none; }
.lc-modal-fallback::before { position: fixed; inset: 0; z-index: 2147483001; background: rgb(26 26 26 / 40%); content: ''; }
.lc-modal-fallback .lc-dialog { z-index: 2147483002; }
@media (max-width: 600px) {
    .lc-banner, .lc-launcher, .lc-notice { left: max(12px, env(safe-area-inset-left)); bottom: max(var(--lc-bottom), 12px, env(safe-area-inset-bottom)); }
    .lc-consent[data-position="right"] .lc-banner,
    .lc-consent[data-position="right"] .lc-launcher,
    .lc-consent[data-position="right"] .lc-notice { right: max(12px, env(safe-area-inset-right)); }
    .lc-banner { width: calc(100vw - 24px - env(safe-area-inset-left) - env(safe-area-inset-right)); padding: 20px; }
    .lc-consent .lc-title { font-size: 26px; }
    .lc-consent .lc-message { font-size: 14px; margin-top: 10px; }
    .lc-banner .lc-equal-actions { margin-top: 14px; }
    .lc-equal-actions { gap: 8px; }
    .lc-consent .lc-button-choice { padding-left: 8px; padding-right: 8px; }
    .lc-dialog { width: calc(100vw - 24px - env(safe-area-inset-left) - env(safe-area-inset-right)); max-height: calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); border-radius: 18px; }
    .lc-dialog-header { gap: 10px; padding: 14px 12px 8px 20px; }
    .lc-dialog-header .lc-title { font-size: 26px; }
    .lc-dialog-body { padding: 0 20px 18px; }
    .lc-dialog-footer { padding: 13px 20px 9px; }
    .lc-category-heading { gap: 10px; }
    .lc-consent .lc-category-title { font-size: 15px; }
    .lc-always-active { font-size: 11px; }
    .lc-toggle { gap: 5px; min-width: 71px; }
    .lc-toggle-state { width: 23px; font-size: 11px; }
    .lc-service-field { grid-template-columns: 1fr; gap: 1px; padding: 5px 0; }
    .lc-notice { width: calc(100vw - 24px); bottom: calc(max(var(--lc-bottom), 12px, env(safe-area-inset-bottom)) + 56px); }
}
@media (max-height: 460px) {
    .lc-dialog-header { padding-top: 6px; padding-bottom: 4px; }
    .lc-dialog-footer { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding-top: 8px; padding-bottom: 6px; }
    .lc-dialog-footer .lc-equal-actions { grid-column: 1 / -1; }
    .lc-dialog-footer .lc-button-save, .lc-dialog-footer .lc-button-withdraw { margin: 0; }
    .lc-dialog-footer .lc-modal-status { grid-column: 1 / -1; }
    .lc-dialog-body { min-height: 30px; }
}
@media (prefers-reduced-motion: reduce) {
    .lc-consent *, .lc-consent *::before, .lc-consent *::after { transition: none !important; scroll-behavior: auto !important; }
}
@media (forced-colors: active) {
    .lc-banner, .lc-dialog, .lc-consent .lc-launcher, .lc-notice { border: 1px solid CanvasText; }
    .lc-consent .lc-button-choice, .lc-consent .lc-button-save { border: 1px solid ButtonText; }
    .lc-toggle-track { forced-color-adjust: none; background: Canvas; border-color: CanvasText; }
    .lc-toggle-track::after { background: CanvasText; }
    .lc-toggle-input:checked + .lc-toggle-track { background: Highlight; border-color: Highlight; }
    .lc-toggle-input:checked + .lc-toggle-track::after { background: HighlightText; }
}

.lc-consent .lc-button-accept { font-size: var(--lc-accept-font-size, 14px); font-weight: var(--lc-accept-font-weight, 500); }

.lc-consent .lc-button-choice, .lc-consent .lc-button-preferences, .lc-consent .lc-button-save { border-radius: var(--lc-button-radius, 12px); }
.lc-consent .lc-button-accept { border: var(--lc-button-border-width, 0px) solid var(--lc-button-border-color); }
