@import url("https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=Cabin:wght@400;500;600;700&family=Source+Serif+4:opsz,wght@8..60,400;8..60,500&family=DM+Mono:wght@400;500&display=swap");
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
:root {
    --bg: #0a0a0a;
    --surf: #131313;
    --surf2: #1a1a1a;
    --surf3: #202020;
    --border: #252525;
    --border2: #2e2e2e;
    --border3: #444;
    --text: #e2e0d9;
    --muted: #555;
    --muted2: #888;
    --muted3: #aaa;
    --accent: #ee0000;
    --accent-h: #f4ff5e;
    --accent-dim: #ee0000;
    --accent-bg: #181b00;
    --danger: #f05858;
    --ok: #4ade80;
    --ref: #58a8f0;
    --fh: "Syne", sans-serif;
    --fb: -apple-system, system-ui, sans-serif;
    --r: 8px;
    --lh: 21px;
    --pad: 14px;
    --sb-w: min(300px, 85vw);
    --banner-h: 44px;
    --fserif: "Cabin", "Source Serif 4", Georgia, serif;
    --fsans: -apple-system, system-ui, sans-serif;
    --fmono: "DM Mono", ui-monospace, "SFMono-Regular", monospace;
}
html,
body {
    height: 100%;
    overflow: hidden;
}
body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--fb);
    font-size: 13px;
    display: flex;
    flex-direction: column;
    -webkit-tap-highlight-color: transparent;
}

/* AUTH */
.auth-screen {
    position: fixed;
    inset: 0;
    background: var(--bg);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
}
.auth-screen.hidden {
    display: none;
}
.auth-box {
    background: var(--surf);
    border: 1px solid var(--border2);
    border-radius: 12px;
    padding: 40px 44px;
    max-width: 380px;
    width: 90%;
    text-align: center;
}
.auth-logo {
    font-family: var(--fh);
    font-weight: 800;
    font-size: 24px;
    color: var(--accent);
    margin-bottom: 6px;
}
.auth-sub {
    font-size: 11px;
    color: var(--muted2);
    margin-bottom: 30px;
    line-height: 1.6;
}
.auth-note {
    font-size: 10px;
    color: var(--muted);
    line-height: 1.7;
    margin-top: 20px;
}
.btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    background: var(--surf2);
    border: 1px solid var(--border2);
    border-radius: 7px;
    padding: 12px 20px;
    color: var(--text);
    font-family: var(--fh);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    cursor: pointer;
    transition: all 0.12s;
}
.btn-google:hover {
    border-color: var(--border3);
    background: var(--surf3);
}

/* SIDEBAR */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sb-w);
    background: var(--surf);
    border-right: 1px solid var(--border2);
    z-index: 200;
    transform: translateX(-100%);
    transition: transform 0.26s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    padding: 14px;
}
.sidebar.open {
    transform: translateX(0);
}
.sidebar-scrim {
    position: fixed;
    inset: 0;
    background: #0008;
    z-index: 190;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.26s;
}
.sidebar-scrim.on {
    opacity: 1;
    pointer-events: auto;
}
.sb-header {
    font-family: var(--fh);
    font-weight: 800;
    font-size: 18px;
    color: var(--accent);
    padding: 4px 6px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.sb-close {
    background: none;
    border: 1px solid var(--border2);
    color: var(--muted2);
    font-size: 13px;
    line-height: 1;
    width: 26px;
    height: 26px;
    border-radius: 7px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.sb-close:hover {
    border-color: var(--border3);
    color: var(--text);
}
.sb-btn {
    display: block;
    width: 100%;
    text-align: left;
    background: var(--surf2);
    border: 1px solid var(--border2);
    color: var(--text);
    font-family: var(--fh);
    font-size: 12px;
    font-weight: 700;
    padding: 12px 14px;
    border-radius: 9px;
    cursor: pointer;
    margin-bottom: 8px;
}
.sb-btn:hover {
    border-color: var(--border3);
}
.tree-list {
    display: none;
    flex-direction: column;
    gap: 6px;
    margin: -2px 0 8px;
    padding-left: 6px;
}
.tree-list.open {
    display: flex;
}
.tl-item {
    text-align: left;
    background: none;
    border: 1px solid var(--border);
    color: var(--muted3);
    font-family: var(--fb);
    font-size: 12px;
    padding: 9px 12px;
    border-radius: 8px;
    cursor: pointer;
}
.tl-item:hover {
    border-color: var(--border3);
    color: var(--text);
}
.tl-item.current {
    color: var(--accent);
    border-color: var(--accent-dim);
}
.tl-item.new {
    color: var(--muted2);
    font-family: var(--fh);
    font-weight: 700;
}
.sb-label {
    font-size: 9px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
    font-family: var(--fh);
    padding: 8px 6px 6px;
}
.runs-list {
    flex: 1;
    overflow-y: auto;
}
.runs-empty {
    padding: 14px 6px;
    font-size: 11px;
    color: var(--muted);
    font-style: italic;
}
.run-item {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
    margin-bottom: 6px;
    cursor: pointer;
    transition: all 0.12s;
    background: var(--surf2);
}
.run-item:hover {
    border-color: var(--border3);
    background: var(--surf3);
}
.run-item.current {
    border-color: var(--border3);
    background: var(--surf3);
}
.run-item-title {
    font-family: var(--fserif);
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.run-item-title.untitled {
    font-style: italic;
    color: var(--muted2);
    font-weight: 400;
}
.run-item-when {
    font-family: var(--fh);
    font-size: 10px;
    font-weight: 700;
    color: var(--muted2);
    margin-top: 4px;
}
.run-item-meta {
    font-size: 9px;
    color: var(--muted);
    margin-top: 2px;
}
.run-item.draft .run-item-meta {
    color: var(--muted2);
}
.sb-bottom {
    border-top: 1px solid var(--border);
    padding-top: 10px;
    margin-top: 8px;
}
.sb-account {
    display: flex;
    align-items: center;
    gap: 8px;
}
.auth-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 1px solid var(--border2);
}
.sync-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--muted);
    transition: background 0.3s;
}
.sync-dot.ok {
    background: var(--accent);
}
.sync-dot.syncing {
    background: var(--accent-dim);
    animation: blink 0.8s infinite;
}
.sync-dot.err {
    background: var(--danger);
}
@keyframes blink {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0.3;
    }
}
.sb-mini {
    font-size: 10px;
    font-family: var(--fh);
    font-weight: 700;
    color: var(--muted2);
    background: none;
    border: 1px solid var(--border2);
    border-radius: 6px;
    padding: 6px 10px;
    cursor: pointer;
}
.sb-mini:hover {
    border-color: var(--border3);
    color: var(--text);
}

/* WORKSPACE */
.workspace {
    flex: 1;
    overflow: hidden;
    position: relative;
}
.ws-track {
    display: flex;
    width: 200%;
    height: 100%;
    transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
}
.pane {
    flex: 0 0 50%;
    width: 50%;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    transition: opacity 0.2s;
}
.pane.inactive {
    opacity: 0.5;
}

/* RUN */
.pane-run {
    display: block;
}
.corner-btn {
    position: absolute;
    z-index: 8;
    background: rgba(18, 18, 18, 0.6);
    border: 1px solid var(--border2);
    color: var(--muted2);
    font-family: var(--fh);
    font-weight: 700;
    font-size: 12px;
    padding: 8px 13px;
    border-radius: 8px;
    cursor: pointer;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    transition: all 0.12s;
}
.corner-btn:hover {
    color: var(--text);
    border-color: var(--border3);
}
.corner-btn.tl {
    top: 12px;
    left: 12px;
}
.corner-btn.tr {
    top: 12px;
    right: 12px;
}
.corner-btn.bl {
    bottom: 14px;
    left: 12px;
}
.corner-btn.tr.lit {
    color: var(--accent);
    border-color: var(--accent-dim);
}
.corner-btn svg {
    display: block;
}
.corner-btn.tl.menu {
    left: 12px;
    padding: 7px 8px;
    transition:
        transform 0.26s cubic-bezier(0.4, 0, 0.2, 1),
        color 0.12s,
        border-color 0.12s;
}
/* when the sidebar is open the menu icon rides out to the panel's right edge and acts as a close button */
body.sidebar-open .corner-btn.menu {
    transform: translateX(calc(var(--sb-w) - 4px));
    z-index: 210;
    color: var(--accent);
    border-color: var(--accent-dim);
}

/* sidebar search bar */
.sb-search {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    background: var(--surf2);
    border: 1px solid var(--border2);
    border-radius: 9px;
    color: var(--muted2);
    font-family: var(--fb);
    font-size: 12px;
    padding: 11px 13px;
    cursor: pointer;
    margin-bottom: 8px;
    text-align: left;
}
.sb-search:hover {
    border-color: var(--border3);
    color: var(--text);
}
.sb-search svg {
    flex-shrink: 0;
}

/* NOTIFICATION BANNER */
.noti-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--banner-h);
    z-index: 150;
    display: none;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
    background: var(--accent-bg);
    border-bottom: 1px solid var(--accent-dim);
}
.noti-banner.show {
    display: flex;
}
body.has-banner .corner-btn.tl {
    top: calc(var(--banner-h) + 10px);
}
body.has-banner .corner-btn.tr {
    top: calc(var(--banner-h) + 10px);
}
.noti-banner-txt {
    flex: 1;
    font-size: 12px;
    color: var(--text);
    font-family: var(--fh);
    font-weight: 700;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.noti-banner-time {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--accent-dim);
    border-radius: 6px;
    color: var(--text);
    font-family: var(--fb);
    font-size: 12px;
    padding: 4px 6px;
    color-scheme: dark;
}
.noti-banner-status {
    font-size: 11px;
    color: var(--accent);
    font-family: var(--fb);
}
.noti-banner-btn,
.noti-banner-test,
.noti-banner-x {
    font-family: var(--fh);
    font-weight: 700;
    font-size: 11px;
    border-radius: 7px;
    padding: 7px 12px;
    cursor: pointer;
    border: 1px solid var(--accent-dim);
    white-space: nowrap;
}
.noti-banner-btn {
    background: var(--accent);
    color: #000;
    border-color: var(--accent);
}
.noti-banner-test {
    background: transparent;
    color: var(--accent);
}
.noti-banner-x {
    background: transparent;
    color: var(--muted2);
    border-color: var(--border3);
}
.noti-banner-x:hover {
    color: var(--text);
}
@media (max-width: 680px) {
    .noti-banner {
        gap: 6px;
        padding: 0 8px;
    }
    .noti-banner-txt {
        font-size: 11px;
    }
    .noti-banner-btn,
    .noti-banner-test,
    .noti-banner-x {
        padding: 6px 8px;
        font-size: 10px;
    }
}

/* NOTIF POPOVER */
.notif-pop {
    display: none;
    position: absolute;
    left: 8px;
    right: 8px;
    bottom: 52px;
    background: var(--surf2);
    border: 1px solid var(--border3);
    border-radius: 11px;
    padding: 14px;
    z-index: 20;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.6);
}
.notif-pop.on {
    display: block;
}
.np-title {
    font-family: var(--fh);
    font-weight: 800;
    font-size: 13px;
    color: var(--accent);
    margin-bottom: 10px;
}
.np-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}
.np-label {
    font-size: 11px;
    color: var(--muted2);
}
.np-time {
    background: var(--surf);
    border: 1px solid var(--border2);
    border-radius: 6px;
    color: var(--text);
    font-family: var(--fb);
    font-size: 12px;
    padding: 5px 7px;
    color-scheme: dark;
}
.np-status {
    font-size: 10px;
    color: var(--muted2);
    min-height: 12px;
    margin-bottom: 8px;
}
.np-actions {
    display: flex;
    gap: 8px;
}
.np-btn {
    flex: 1;
    font-family: var(--fh);
    font-weight: 700;
    font-size: 11px;
    background: none;
    border: 1px solid var(--border3);
    border-radius: 7px;
    color: var(--text);
    padding: 8px 6px;
    cursor: pointer;
}
.np-btn:hover {
    border-color: var(--accent-dim);
}
.np-btn.on {
    border-color: var(--accent-dim);
    color: var(--accent);
}
.sb-mini.icon {
    padding: 6px 8px;
    line-height: 0;
}
.sb-mini.icon svg {
    display: block;
}

/* SEARCH OVERLAY */
.search-ov {
    position: fixed;
    inset: 0;
    z-index: 260;
    background: var(--bg);
    display: none;
    flex-direction: column;
    padding: 18px;
}
.search-ov.on {
    display: flex;
}
.search-top {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}
.search-inp {
    flex: 1;
    background: var(--surf);
    border: 1px solid var(--border3);
    border-radius: 10px;
    color: var(--text);
    font-family: var(--fb);
    font-size: 16px;
    padding: 12px 14px;
    outline: none;
}
.search-inp:focus {
    border-color: var(--accent);
}
.search-hint {
    font-size: 11px;
    color: var(--muted);
    font-style: italic;
    padding: 0 2px 10px;
}
.search-results {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.search-result {
    text-align: left;
    width: 100%;
    background: var(--surf);
    border: 1px solid var(--border2);
    border-radius: 10px;
    padding: 13px 15px;
    cursor: pointer;
}
.search-result:hover {
    border-color: var(--border3);
    background: var(--surf2);
}
.sr-top {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 5px;
}
.sr-node {
    font-family: var(--fh);
    font-weight: 700;
    font-size: 11px;
    color: var(--muted2);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.sr-date {
    font-size: 10px;
    color: var(--muted);
    flex-shrink: 0;
}
.sr-text {
    font-family: var(--fserif);
    font-size: 14px;
    color: var(--text);
    line-height: 1.45;
}
.sr-text mark {
    background: rgba(224, 121, 63, 0.32);
    color: var(--accent-h);
    border-radius: 2px;
}
.search-empty {
    color: var(--muted);
    font-style: italic;
    font-size: 13px;
    padding: 24px 2px;
}
.sb-btn.primary {
    background: var(--accent-bg);
    border-color: var(--accent-dim);
    color: var(--accent);
}
.run-area {
    position: absolute;
    inset: 0;
    overflow: hidden;
}
.run-canvas-wrap {
    position: absolute;
    inset: 0;
    overflow: hidden;
}
#runCanvas {
    width: 100%;
    height: 100%;
    display: block;
}
#runVp {
    transform-origin: 0 0;
}
.focus-layer {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 66px 24px 24px;
    background: rgba(0, 0, 0, 0);
    backdrop-filter: blur(0);
    -webkit-backdrop-filter: blur(0);
    transition:
        background-color 0.5s ease,
        backdrop-filter 0.5s ease;
}
.focus-layer.entry {
    align-items: center;
    padding: 24px;
}
.focus-layer.blurred {
    background: rgba(6, 6, 6, 0.62);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.focus-layer.black {
    background: #000;
}
.focus-layer.clear {
    background: rgba(0, 0, 0, 0);
    backdrop-filter: blur(0);
    -webkit-backdrop-filter: blur(0);
}
/* mid-transition: blur stays on, only the tint is removed */
.focus-layer.untint {
    background: rgba(0, 0, 0, 0);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.focus-inner {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    max-width: 640px;
    transition: opacity 0.3s ease;
}
.focus-layer.entry .focus-inner {
    align-items: center;
    text-align: center;
}
.focus-card {
    width: 100%;
    text-align: left;
}
.focus-layer.entry .focus-card {
    text-align: center;
}
.fc-title {
    font-family: var(--fserif);
    font-size: 20px;
    font-weight: 500;
    line-height: 1.5;
    color: var(--text);
}
.focus-layer.entry .fc-title {
    font-size: 30px;
    line-height: 1.3;
    font-weight: 600;
}
.end-mark {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--accent-bg);
    border: 1px solid var(--accent-dim);
    color: var(--accent);
    font-size: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}
.focus-input {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    margin-top: 16px;
}
.focus-layer.entry .focus-input {
    align-items: center;
}
.prompt-input {
    width: 100%;
    background: rgba(18, 18, 18, 0.92);
    border: 1px solid var(--border3);
    border-radius: 12px;
    color: var(--text);
    font-family: var(--fsans);
    font-size: 19px;
    line-height: 1.5;
    padding: 13px 15px;
    outline: none;
    resize: none;
    max-height: 360px;
    overflow-y: auto;
}
.prompt-input:focus {
    border-color: var(--accent);
}
.enter-btn {
    margin-top: 12px;
    font-family: var(--fh);
    font-weight: 700;
    font-size: 13px;
    background: var(--accent);
    color: #000;
    border: none;
    border-radius: 9px;
    padding: 11px 20px;
    cursor: pointer;
}
.enter-btn:hover {
    background: var(--accent-h);
}
.focus-choices {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    margin-top: 20px;
    width: 100%;
}
.focus-layer.entry .focus-choices {
    align-items: center;
}
.opt {
    align-self: flex-start;
    width: auto;
    max-width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border3);
    color: var(--text);
    font-family: var(--fsans);
    font-size: 16px;
    padding: 11px 20px;
    border-radius: 9px;
    cursor: pointer;
    transition: all 0.12s;
}
.focus-layer.entry .opt {
    align-self: center;
}
.opt:hover {
    border-color: var(--accent);
    color: var(--accent);
}
.opt.multi {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.opt.multi.on {
    border-color: var(--accent);
    color: var(--accent);
}
.opt .cbox {
    width: 13px;
    height: 13px;
    border-radius: 4px;
    border: 1.5px solid var(--border3);
}
.opt.multi.on .cbox {
    background: var(--accent);
    border-color: var(--accent);
}
.opt.go {
    background: var(--accent);
    color: #000;
    border-color: var(--accent);
    font-family: var(--fh);
    font-weight: 700;
}
.opt.go:hover {
    background: var(--accent-h);
    color: #000;
}
.opt.go:disabled {
    background: var(--surf3);
    color: var(--muted);
    border-color: var(--border2);
    cursor: not-allowed;
}
.recall {
    background: #0b1016;
    border: 1px solid #15202c;
    border-radius: 9px;
    padding: 11px 13px;
    margin-bottom: 16px;
    text-align: left;
}
.recall-hd {
    font-size: 9px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ref);
    font-family: var(--fh);
    margin-bottom: 7px;
}
.recall-empty {
    font-size: 11px;
    color: var(--muted);
    font-style: italic;
}
.recall-row {
    display: flex;
    gap: 8px;
    padding: 3px 0;
    font-size: 11px;
    line-height: 1.4;
}
.recall-date {
    color: var(--muted);
    flex-shrink: 0;
}
.recall-txt {
    color: var(--muted3);
}
.transcript {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 55vh;
    overflow-y: auto;
    text-align: left;
    width: 100%;
}
.ts-item {
    background: var(--surf);
    border: 1px solid var(--border);
    border-radius: 9px;
    padding: 12px 14px;
}
.ts-q {
    font-family: var(--fh);
    font-size: 12px;
    font-weight: 700;
    color: var(--muted3);
    margin-bottom: 5px;
}
.ts-a {
    font-size: 13px;
    color: var(--text);
    line-height: 1.5;
    white-space: pre-wrap;
}
.ts-empty {
    color: var(--muted);
    font-style: italic;
}

/* EDITOR */
.pane-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 12px;
    height: 44px;
    border-bottom: 1px solid var(--border2);
    flex-shrink: 0;
}
.pane-title {
    font-family: var(--fh);
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 36vw;
}
.pstatus {
    font-size: 10px;
    color: var(--muted);
    font-family: var(--fb);
}
.pstatus.ok {
    color: var(--accent);
}
.pstatus.err {
    color: var(--danger);
}
.icon-btn {
    font-size: 16px;
    line-height: 1;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid var(--border2);
    background: none;
    color: var(--muted2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.12s;
    flex-shrink: 0;
}
.icon-btn:hover {
    border-color: var(--border3);
    color: var(--text);
}
.pill {
    font-size: 10px;
    font-family: var(--fh);
    font-weight: 700;
    letter-spacing: 0.05em;
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid var(--border2);
    color: var(--muted2);
    cursor: pointer;
    transition: all 0.12s;
    background: none;
    white-space: nowrap;
}
.pill:hover {
    border-color: var(--border3);
    color: var(--text);
}
.pill.run-pill {
    border-color: var(--accent-dim);
    color: var(--accent);
    background: var(--accent-bg);
    margin-left: auto;
}
.pill.run-pill:hover {
    background: #3a2410;
}
.edit-workspace {
    flex: 1;
    display: flex;
    overflow: hidden;
}
.edit-canvas-wrap {
    flex: 1.1;
    position: relative;
    overflow: hidden;
    background: var(--bg);
}
#editCanvas {
    width: 100%;
    height: 100%;
    display: block;
    cursor: grab;
}
#editCanvas:active {
    cursor: grabbing;
}
#editVp {
    transform-origin: 0 0;
}
.c-empty {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: var(--muted);
}
.c-empty-t {
    font-family: var(--fh);
    font-size: 13px;
    color: var(--muted2);
}
.c-empty-s {
    font-size: 11px;
}
.drag-hint {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: #000;
    font-family: var(--fh);
    font-weight: 700;
    font-size: 11px;
    padding: 6px 12px;
    border-radius: 6px;
    display: none;
    z-index: 6;
    pointer-events: none;
}
.drag-hint.on {
    display: block;
}
.edit-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    border-left: 1px solid var(--border2);
    min-width: 0;
}
.editor-body {
    flex: 1;
    display: flex;
    overflow: hidden;
    position: relative;
    background: var(--surf);
}
.lnums {
    width: 40px;
    flex-shrink: 0;
    padding: var(--pad) 0;
    font-size: 11px;
    font-family: var(--fb);
    color: var(--muted);
    line-height: var(--lh);
    text-align: right;
    padding-right: 7px;
    overflow: hidden;
    user-select: none;
    border-right: 1px solid var(--border);
    white-space: pre;
}
.editor-inner {
    flex: 1;
    position: relative;
    overflow: hidden;
}
.hl-layer {
    position: absolute;
    inset: 0;
    padding: var(--pad);
    font-size: 12px;
    font-family: var(--fb);
    line-height: var(--lh);
    white-space: pre;
    overflow: hidden;
    pointer-events: none;
    tab-size: 2;
    color: var(--text);
}
.line-hl {
    position: absolute;
    left: 0;
    right: 0;
    background: rgba(224, 121, 63, 0.1);
    pointer-events: none;
    z-index: 0;
}
.linter-line-hl {
    position: absolute;
    left: 0;
    right: 0;
    background: rgba(240, 88, 88, 0.08);
    pointer-events: none;
    z-index: 0;
    border-left: 2px solid var(--danger);
}
#src-ta {
    position: absolute;
    inset: 0;
    background: transparent;
    border: none;
    color: transparent;
    caret-color: var(--accent);
    font-size: 12px;
    font-family: var(--fb);
    line-height: var(--lh);
    padding: var(--pad);
    outline: none;
    resize: none;
    overflow: auto;
    white-space: pre;
    tab-size: 2;
    z-index: 2;
}
#src-ta::selection {
    background: rgba(224, 121, 63, 0.28);
}
.h-title {
    color: var(--accent);
}
.h-arrow {
    color: var(--accent-dim);
}
.h-dest {
    color: var(--ref);
}
.h-opt {
    color: var(--text);
}
.h-cmt {
    color: var(--muted);
}
.h-ref {
    color: var(--ref);
}
.h-bad {
    color: var(--danger);
    text-decoration: wavy underline;
}
.editor-schema {
    border-top: 1px solid var(--border);
    padding: 7px 12px;
    font-size: 10px;
    color: var(--muted);
    line-height: 1.7;
    flex-shrink: 0;
    font-family: var(--fb);
    white-space: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
}
.editor-schema::-webkit-scrollbar {
    display: none;
}
.editor-schema .k {
    color: var(--accent);
}
.editor-schema .o {
    color: var(--text);
}
.editor-schema .a {
    color: var(--accent-dim);
}
.editor-schema .d {
    color: var(--ref);
}
.editor-schema .r {
    color: var(--ref);
}
.linter-panel {
    border-top: 1px solid var(--border2);
    background: var(--surf);
    flex-shrink: 0;
    max-height: 110px;
    overflow-y: auto;
}
.linter-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 5px 12px;
    border-bottom: 1px solid var(--border);
    font-size: 10px;
}
.linter-row:last-child {
    border-bottom: none;
}
.linter-sev {
    font-family: var(--fh);
    font-weight: 700;
    font-size: 9px;
    padding: 1px 6px;
    border-radius: 2px;
    flex-shrink: 0;
    margin-top: 1px;
}
.linter-sev.err {
    background: #3a0a0a;
    color: var(--danger);
}
.linter-sev.warn {
    background: #3a2710;
    color: var(--accent);
}
.linter-msg {
    color: var(--muted3);
    flex: 1;
    line-height: 1.5;
}
.linter-line {
    color: var(--muted);
    font-size: 9px;
    margin-left: auto;
    flex-shrink: 0;
}
.run-responses {
    border-top: 1px solid var(--border2);
    background: var(--surf);
    flex-shrink: 0;
    max-height: 130px;
    overflow-y: auto;
    padding: 10px 12px;
}
.rr-title {
    font-size: 9px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
    font-family: var(--fh);
    margin-bottom: 8px;
}
.rr-item {
    margin-bottom: 8px;
}
.rr-node {
    font-size: 10px;
    color: var(--muted2);
    font-family: var(--fh);
    font-weight: 700;
}
.rr-ans {
    font-size: 11px;
    color: var(--muted3);
    line-height: 1.4;
    white-space: pre-wrap;
}

/* COMMITMENTS */
.cmt-ov {
    position: fixed;
    inset: 0;
    z-index: 250;
    background: var(--bg);
    display: none;
    flex-direction: column;
    padding: 18px;
}
.cmt-ov.on {
    display: flex;
}
.cmt-top {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}
.cmt-title {
    font-family: var(--fh);
    font-weight: 800;
    font-size: 18px;
    flex: 1;
}
.cmt-top .run-pill {
    margin-left: 0;
}
.cmt-msg {
    color: var(--danger);
    font-size: 11px;
    min-height: 14px;
}
.cmt-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.cmt-item {
    text-align: left;
    background: var(--surf);
    border: 1px solid var(--border2);
    border-radius: 11px;
    padding: 16px;
    cursor: pointer;
    width: 100%;
}
.cmt-item:hover {
    border-color: var(--border3);
}
.cmt-item-text {
    font-family: var(--fserif);
    font-size: 16px;
    color: var(--text);
    line-height: 1.4;
}
.cmt-item-date {
    font-size: 11px;
    color: var(--muted2);
    margin-top: 6px;
}
.cmt-empty {
    color: var(--muted);
    font-style: italic;
    font-size: 13px;
    padding: 20px 2px;
}
.cmt-notes-wrap {
    padding-top: 16px;
}
.cmt-notes-label {
    font-size: 11px;
    color: var(--muted2);
    margin-bottom: 8px;
    font-style: italic;
}
.cmt-notes {
    width: 100%;
    min-height: 110px;
    max-height: 34vh;
    background: var(--surf);
    border: 1px solid var(--border2);
    border-radius: 10px;
    color: var(--text);
    font-family: var(--fb);
    font-size: 14px;
    line-height: 1.5;
    padding: 12px;
    outline: none;
    resize: vertical;
}

/* RITUAL screens */
.ritual {
    position: fixed;
    inset: 0;
    z-index: 400;
    background: #000;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
}
.ritual.on {
    display: flex;
}
.ritual-inner {
    width: 100%;
    max-width: 480px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
}
.ritual-title {
    font-family: var(--fh);
    font-weight: 800;
    font-size: 22px;
    color: var(--text);
    text-align: center;
}
.ritual-sub {
    font-family: var(--fsans);
    font-size: 14px;
    color: var(--muted3);
    line-height: 1.5;
    text-align: center;
}
.ritual-text {
    background: #0d0d0d;
    border: 1px solid var(--border2);
    border-radius: 12px;
    color: var(--text);
    font-family: var(--fserif);
    font-size: 18px;
    line-height: 1.5;
    padding: 14px;
    outline: none;
    resize: none;
    min-height: 64px;
}
.ritual-text:focus {
    border-color: var(--border3);
}
.ritual-date-btn {
    background: none;
    border: 1px dashed var(--border3);
    color: var(--muted2);
    font-family: var(--fh);
    font-weight: 700;
    font-size: 13px;
    padding: 13px;
    border-radius: 10px;
    cursor: pointer;
    width: 100%;
}
.ritual-date-btn:hover {
    color: var(--text);
    border-color: var(--accent-dim);
}
.ritual-date-input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    pointer-events: none;
}
.ritual-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    align-items: center;
}
.ritual-actions.col {
    flex-direction: column;
    align-items: stretch;
}
.ritual-enact {
    font-family: var(--fsans);
    font-size: 14px;
    color: var(--muted2);
    text-align: center;
}
.ritual-enact-text {
    font-family: var(--fserif);
    font-size: 24px;
    color: var(--text);
    text-align: center;
    line-height: 1.4;
}
.ritual-enact-body {
    font-family: var(--fsans);
    font-size: 13px;
    color: var(--muted3);
    line-height: 1.6;
    text-align: center;
    margin-top: 2px;
}
.hold-btn {
    position: relative;
    overflow: hidden;
    background: var(--surf2);
    border: 1px solid var(--border3);
    color: var(--text);
    font-family: var(--fh);
    font-weight: 700;
    font-size: 14px;
    padding: 15px 20px;
    border-radius: 10px;
    cursor: pointer;
    user-select: none;
    touch-action: none;
}
.hold-fill {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    background: var(--accent);
    opacity: 0.16;
}
.hold-btn.holding .hold-fill {
    width: 100%;
    transition: width 5s linear;
}
.hold-label {
    position: relative;
    z-index: 1;
}
.hold-btn.ok {
    border-color: #1f3a24;
    color: var(--ok);
}
.hold-btn.ok .hold-fill {
    background: var(--ok);
    opacity: 0.26;
}
.hold-btn.bad {
    border-color: #3a1414;
    color: var(--danger);
}
.hold-btn.bad .hold-fill {
    background: var(--danger);
    opacity: 0.22;
}
.ritual.checkin.breaking .ritual-inner {
    animation: breakdown 0.8s forwards;
}
.ritual.checkin.breaking {
    animation: bgfade 0.8s forwards;
}
@keyframes breakdown {
    0% {
        transform: translateX(0);
    }
    10% {
        transform: translateX(-9px);
    }
    22% {
        transform: translateX(9px);
    }
    34% {
        transform: translateX(-7px);
    }
    46% {
        transform: translateX(7px);
    }
    58% {
        transform: translateX(0);
    }
    100% {
        opacity: 0;
        transform: translateY(46px) scale(0.9);
    }
}
@keyframes bgfade {
    0%,
    55% {
        background: #000;
    }
    100% {
        background: rgba(0, 0, 0, 0);
    }
}

/* MODALS */
.modal-ov {
    position: fixed;
    inset: 0;
    background: #000b;
    z-index: 300;
    display: none;
    align-items: center;
    justify-content: center;
}
.modal-ov.on {
    display: flex;
}
.modal-box {
    background: var(--surf);
    border: 1px solid var(--border2);
    border-radius: 12px;
    padding: 26px 28px;
    max-width: 400px;
    width: 90%;
}
.modal-title {
    font-family: var(--fh);
    font-size: 15px;
    font-weight: 800;
    margin-bottom: 8px;
}
.modal-sub {
    font-size: 11px;
    color: var(--muted2);
    line-height: 1.6;
    margin-bottom: 18px;
}
.modal-inp {
    width: 100%;
    background: var(--surf2);
    border: 1px solid var(--border2);
    border-radius: 6px;
    color: var(--text);
    font-family: var(--fb);
    font-size: 13px;
    padding: 11px 13px;
    outline: none;
    margin-bottom: 14px;
}
.modal-inp:focus {
    border-color: var(--border3);
}
.modal-btns {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}
.btn-cancel {
    background: none;
    border: 1px solid var(--border2);
    color: var(--muted2);
    font-family: var(--fh);
    font-size: 11px;
    font-weight: 700;
    border-radius: 6px;
    padding: 9px 15px;
    cursor: pointer;
}
.btn-cancel:hover {
    border-color: var(--border3);
    color: var(--text);
}
.btn-confirm {
    background: var(--accent);
    color: #000;
    font-family: var(--fh);
    font-size: 11px;
    font-weight: 700;
    border-radius: 6px;
    padding: 9px 15px;
    cursor: pointer;
    border: none;
}
.btn-confirm:hover {
    background: var(--accent-h);
}
.btn-confirm.danger {
    background: var(--danger);
    color: #fff;
}

/* SETTINGS */
.settings-ov {
    position: fixed;
    inset: 0;
    background: var(--bg);
    z-index: 260;
    display: none;
    flex-direction: column;
}
.settings-ov.on {
    display: flex;
}
.settings-top {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
    border-bottom: 1px solid var(--border2);
    flex-shrink: 0;
    height: 46px;
}
.settings-tt {
    font-family: var(--fh);
    font-weight: 800;
    font-size: 13px;
    color: var(--accent);
}
.settings-body {
    flex: 1;
    overflow-y: auto;
    padding: 22px 20px;
    display: flex;
    flex-direction: column;
    gap: 22px;
    max-width: 560px;
    width: 100%;
    margin: 0 auto;
}
.set-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.set-title {
    font-size: 10px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
    font-family: var(--fh);
}
.set-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.set-label {
    font-size: 11px;
    color: var(--muted2);
}
.set-note {
    font-size: 11px;
    color: var(--muted);
    font-style: italic;
}
.set-inp {
    background: var(--surf2);
    border: 1px solid var(--border2);
    border-radius: 6px;
    color: var(--text);
    font-family: var(--fb);
    font-size: 12px;
    padding: 8px 11px;
    outline: none;
    flex: 1;
    min-width: 120px;
}
.set-inp.time {
    flex: 0 0 auto;
    min-width: 0;
}
.set-inp:focus {
    border-color: var(--border3);
}
.btn-mini {
    font-size: 10px;
    font-family: var(--fh);
    font-weight: 700;
    letter-spacing: 0.05em;
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid var(--border2);
    background: none;
    color: var(--muted2);
    transition: all 0.12s;
}
.btn-mini:hover {
    border-color: var(--border3);
    color: var(--text);
}
.btn-mini.on {
    border-color: var(--accent-dim);
    color: var(--accent);
    background: var(--accent-bg);
}
.btn-mini.danger {
    border-color: #3a1414;
    color: var(--danger);
}
.btn-mini.danger:hover {
    background: #1a0a0a;
}

/* MOBILE */
@media (max-width: 680px) {
    .edit-canvas-wrap {
        flex: 1;
    }
    .focus-layer.entry .fc-title {
        font-size: 25px;
    }
    .pane-title {
        max-width: 30vw;
    }
}

/* ===================== v3 SHELL — editor-first + card reflection ===================== */
.editor {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    background: var(--bg);
}
body.has-banner .top-bar {
    margin-top: var(--banner-h);
}
.top-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border2);
    background: var(--surf);
    flex-shrink: 0;
}
.top-bar .brand {
    font-family: var(--fh);
    font-weight: 800;
    font-size: 15px;
    color: var(--accent);
}
.top-bar .account {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}
.top-bar .user-name {
    font-size: 12px;
    color: var(--muted3);
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.reflect-btn {
    font-family: var(--fh);
    font-weight: 800;
    font-size: 13px;
    background: var(--accent);
    color: #000;
    border: none;
    border-radius: 9px;
    padding: 9px 18px;
    cursor: pointer;
}
.reflect-btn:hover {
    background: var(--accent-h);
}
.reflect-btn:disabled {
    opacity: 0.4;
    cursor: default;
}

/* editor home: text LEFT, canvas RIGHT */
.edit-text {
    border-left: none;
    border-right: 1px solid var(--border2);
}
.zoom-ctrls {
    position: absolute;
    right: 12px;
    bottom: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 6;
}
.zoom-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(18, 18, 18, 0.85);
    border: 1px solid var(--border3);
    color: var(--text);
    font-size: 17px;
    line-height: 1;
    cursor: pointer;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}
.zoom-btn:hover {
    border-color: var(--accent-dim);
    color: var(--accent);
}
.lnum-err {
    color: var(--danger);
    font-weight: 700;
}

/* reflection — solid black, single card, blink between cards */
@keyframes blink {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0.3;
    }
}
.reflect-screen {
    position: fixed;
    inset: 0;
    z-index: 400;
    background: #000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.reflect-screen.on {
    display: flex;
}
.rcard {
    width: 100%;
    max-width: 620px;
    max-height: 100%;
    overflow-y: auto;
}
.rcard.blinking {
    animation: blink 0.45s ease;
}
.rcard-idx {
    font-family: var(--fb);
    font-size: 11px;
    letter-spacing: 0.06em;
    color: var(--muted2);
    margin-bottom: 18px;
}
.rcard-recall {
    margin-bottom: 14px;
}
.rcard-prompt {
    font-family: var(--fserif);
    font-size: 26px;
    line-height: 1.35;
    color: var(--text);
    margin-bottom: 22px;
}
.rinput {
    width: 100%;
    background: rgba(20, 20, 20, 0.9);
    border: 1px solid var(--border3);
    border-radius: 12px;
    color: var(--text);
    font-family: var(--fsans);
    font-size: 18px;
    line-height: 1.5;
    padding: 14px 16px;
    outline: none;
    resize: none;
    overflow-y: auto;
}
.rinput:focus {
    border-color: var(--accent);
}
.rcard-choices {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.ropt {
    text-align: left;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border3);
    color: var(--text);
    font-family: var(--fsans);
    font-size: 17px;
    padding: 14px 16px;
    border-radius: 11px;
    cursor: pointer;
}
.ropt:hover {
    border-color: var(--accent);
    color: var(--accent);
}
.rcard-nav {
    display: flex;
    align-items: center;
    margin-top: 18px;
}
.rnav-back,
.rnav-next {
    font-family: var(--fh);
    font-weight: 700;
    font-size: 13px;
    background: none;
    border: 1px solid var(--border3);
    color: var(--muted3);
    border-radius: 9px;
    padding: 10px 16px;
    cursor: pointer;
}
.rnav-next {
    background: var(--accent);
    color: #000;
    border-color: var(--accent);
}
.rnav-back:hover {
    border-color: var(--border3);
    color: var(--text);
}

/* commitment (end) card */
.rcard-end .end-h {
    font-family: var(--fserif);
    font-size: 26px;
    color: var(--text);
    margin-bottom: 8px;
}
.rcard-end .end-sub {
    font-size: 13px;
    color: var(--muted2);
    line-height: 1.5;
    margin-bottom: 18px;
}
.rcard-end .rinput {
    margin-bottom: 12px;
}
.end-actions {
    display: flex;
    align-items: center;
    margin-top: 14px;
}
.end-notes {
    margin-top: 16px;
}
.end-notes-label {
    font-size: 11px;
    color: var(--muted2);
    font-style: italic;
    margin-bottom: 8px;
}
.end-finish {
    display: block;
    margin: 22px auto 0;
    background: none;
    border: none;
    color: var(--muted);
    font-family: var(--fb);
    font-size: 12px;
    text-decoration: underline;
    cursor: pointer;
}
.end-finish:hover {
    color: var(--muted3);
}

/* mobile: text editor on top, canvas on the bottom */
@media (max-width: 680px) {
    .edit-workspace {
        flex-direction: column;
    }
    .edit-text {
        border-right: none;
        border-bottom: 1px solid var(--border2);
        flex: 1.2;
    }
    .edit-canvas-wrap {
        flex: 1;
    }
    .top-bar .brand {
        display: none;
    }
    .rcard-prompt {
        font-size: 22px;
    }
}

/* ===================== v4 — reflect top bar, card, underline input, paywall ========= */
.reflect-screen {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: 0;
}
.reflect-top {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border2);
    position: relative;
    flex-shrink: 0;
}
.reflect-top .brand {
    font-family: var(--fh);
    font-weight: 800;
    font-size: 15px;
    color: var(--accent);
}
.reflect-go {
    font-family: var(--fh);
    font-weight: 700;
    font-size: 14px;
    color: var(--accent);
}
.reflect-return {
    font-family: var(--fh);
    font-weight: 700;
    font-size: 13px;
    background: none;
    border: 1px solid var(--accent-dim);
    color: var(--accent);
    border-radius: 9px;
    padding: 8px 16px;
    cursor: pointer;
}
.reflect-return:hover {
    background: var(--accent-bg);
}
.reflect-prog {
    position: absolute;
    left: 0;
    bottom: -1px;
    height: 2px;
    width: 0;
    background: var(--accent);
    transition: width 0.4s ease;
}
.reflect-body {
    flex: 1;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 56px 24px;
    overflow-y: auto;
}

/* the card */
.rcard {
    width: 100%;
    max-width: 720px;
    max-height: none;
    overflow: visible;
    background: #161616;
    border: 1px solid var(--border2);
    border-radius: 18px;
    padding: 34px 38px;
}
.rcard-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}
.rcard-type {
    font-family: var(--fb);
    font-size: 11px;
    letter-spacing: 0.14em;
    color: var(--muted2);
}
.rcard-idx {
    font-family: var(--fb);
    font-size: 11px;
    color: var(--muted);
    margin-bottom: 0;
}
.rcard-prompt {
    font-family: var(--fh);
    font-weight: 700;
    font-size: 25px;
    line-height: 1.3;
    color: var(--text);
    margin-bottom: 24px;
}

/* google-form style single-line input with an underline that fills on focus */
.rfield {
    position: relative;
    margin-bottom: 6px;
}
.rinput {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border3);
    border-radius: 0;
    color: var(--text);
    font-family: var(--fsans);
    font-size: 18px;
    line-height: 1.4;
    padding: 10px 2px;
    outline: none;
    resize: none;
    overflow: hidden;
}
.rfield-line {
    position: absolute;
    left: 0;
    bottom: 0;
    height: 2px;
    width: 100%;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.25s ease;
    pointer-events: none;
}
.rfield:focus-within .rfield-line {
    transform: scaleX(1);
}

/* paywall */
.paywall {
    position: fixed;
    inset: 0;
    background: var(--bg);
    z-index: 998;
    display: none;
    align-items: center;
    justify-content: center;
}
.paywall.on {
    display: flex;
}
.pay-price {
    font-family: var(--fh);
    font-weight: 800;
    font-size: 30px;
    color: var(--accent);
    margin: 4px 0 10px;
}
.pay-btn {
    margin-top: 8px;
    background: var(--accent);
    color: #000;
    border: none;
    justify-content: center;
}
.pay-btn:hover {
    background: var(--accent-h);
}
.pay-alt {
    display: block;
    margin: 14px auto 0;
    background: none;
    border: none;
    color: var(--muted2);
    font-size: 11px;
    font-family: var(--fb);
    cursor: pointer;
    text-decoration: underline;
}
.pay-alt:hover {
    color: var(--text);
}

@media (max-width: 680px) {
    .reflect-body {
        padding: 28px 14px;
    }
    .rcard {
        padding: 24px 22px;
        border-radius: 14px;
    }
    .rcard-prompt {
        font-size: 21px;
    }
    .reflect-top .brand {
        font-size: 13px;
    }
}

/* ===================== v5 — small tweaks ===================== */
.reflect-return {
    background: none;
    border: 1px solid var(--border3);
    color: var(--muted3);
}
.reflect-return:hover {
    background: none;
    border-color: var(--muted2);
    color: var(--text);
}
.reflect-go {
    font-family: var(--fh);
    font-weight: 800;
}
.rcard {
    max-width: 520px;
    padding: 28px 30px;
}
.rinput {
    font-family: var(--fmono);
    font-size: 16px;
}

/* ===================== v7 — AMOLED DUSK theme (true black, warm ember) ===================== */
:root {
    --bg: #000000; /* true black for AMOLED */
    --surf: #130f0a;
    --surf2: #18130c;
    --surf3: #20180e;
    --border: #2a1f12;
    --border2: #352818;
    --border3: #4d3c24;
    --text: #f0e3cf; /* warm off-white */
    --muted: #6b5c47;
    --muted2: #9c8a6e;
    --muted3: #c4b291;
    --accent: #e0793f; /* dusk ember orange */
    --accent-h: #ffae5c; /* glowing ember highlight */
    --accent-dim: #a85a2c;
    --accent-bg: #2a1709;
    --danger: #c8514a; /* warm rose-red, distinct from ember */
    --ok: #7fae6f;
    --ref: #9b86a8; /* dusky mauve for recall, no green */
    --fprompt: "Source Serif 4", Georgia, serif;
}
/* true black for AMOLED, with a faint warm cast */
.reflect-screen {
    background: #000000;
}
.rcard {
    background: var(--surf);
}
/* prompts & emotional headings in a calm serif */
.rcard-prompt {
    font-family: var(--fprompt);
    font-weight: 500;
    letter-spacing: 0.004em;
    line-height: 1.4;
}
.rcard-end .end-h {
    font-family: var(--fprompt);
    font-weight: 500;
}
.end-sub {
    font-style: italic;
}
/* softer edges, gentler motion */
.rcard {
    border-radius: 16px;
}
.rnav-next,
.reflect-btn {
    transition: background 0.18s ease;
}
/* keep Syne only for product identity */
.auth-logo,
.reflect-top .brand,
.reflect-go {
    font-family: var(--fh);
}
