/* Calendar on your Wall — design system.
   Deliberately single-theme: the product is print, the site is paper. */

:root {
    --paper: #F7F5EF;
    --card: #FDFCF8;
    --ink: #221F26;
    --ox: #7A2231;
    --ox-hover: #641B28;
    --hairline: #DCD8CD;
    --muted: #6E6A73;
    --weekend: #F6F2E9;
    --blush: #FAEEE7;
    --labelbg: #F2EFE6;
    --nav-bg: rgba(247, 245, 239, 0.85);

    --display: "Bodoni Moda", "Didot", "Bodoni 72", Georgia, serif;
    --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;

    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
    --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

@font-face {
    font-family: "Bodoni Moda";
    src: url("/assets/fonts/BodoniModa-400.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Bodoni Moda";
    src: url("/assets/fonts/BodoniModa-700.ttf") format("truetype");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Bodoni Moda";
    src: url("/assets/fonts/BodoniModa-400-italic.ttf") format("truetype");
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; } /* survive display rules on toggled elements */
html { scroll-behavior: smooth; }
body {
    background: var(--paper);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
body.sheet-open { overflow: hidden; }
::selection { background: var(--ox); color: var(--paper); }
button { font-family: inherit; }

.eyebrow {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--ox);
}

/* ---------------- buttons ---------------- */
.btn {
    font-size: 13.5px;
    font-weight: 600;
    border-radius: 999px;
    padding: 10px 20px;
    border: 1px solid transparent;
    cursor: pointer;
    white-space: nowrap;
    background: transparent;
    color: var(--ink);
    transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out),
        background 0.25s, color 0.25s, border-color 0.25s;
}
.btn:hover { transform: translateY(-1.5px); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: 2px solid var(--ox); outline-offset: 3px; }
.btn-ox { background: var(--ox); color: var(--paper); }
.btn-ox:hover { background: var(--ox-hover); box-shadow: 0 10px 24px rgba(122, 34, 49, 0.28); }
.btn-ghost { border-color: var(--hairline); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-sm { font-size: 12.5px; padding: 7px 14px; }

/* ---------------- nav ---------------- */
.nav {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 22px;
    padding: 14px clamp(16px, 5vw, 56px);
    background: var(--nav-bg);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.4s var(--ease-out);
}
.nav.scrolled { border-bottom-color: var(--hairline); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); min-width: 0; margin-right: auto; }
.mark { display: grid; grid-template-columns: repeat(7, 3px); gap: 1.5px; flex: 0 0 auto; }
.mark i { width: 3px; height: 3px; background: var(--ink); opacity: 0.75; border-radius: 0.5px; }
.mark i.t { background: var(--ox); opacity: 1; }
.brand span {
    font-family: var(--display);
    font-style: italic;
    font-size: 17px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.nav nav { display: flex; gap: 22px; }
.nav nav.page-back { display: flex; } /* survives the mobile nav hide */
.nav nav a { color: var(--muted); text-decoration: none; font-size: 13.5px; transition: color 0.25s; }
.nav nav a:hover { color: var(--ink); }
#authSignedOut { display: flex; align-items: center; gap: 10px; }
#authSignedIn { position: relative; }
.avatar {
    width: 34px; height: 34px;
    border-radius: 50%;
    background: var(--ox);
    color: var(--paper);
    border: none;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}
.user-menu {
    position: absolute;
    right: 0;
    top: 44px;
    background: var(--card);
    border: 1px solid var(--hairline);
    border-radius: 12px;
    box-shadow: 0 18px 44px rgba(24, 20, 28, 0.18);
    padding: 14px;
    min-width: 220px;
    display: none;
    flex-direction: column;
    gap: 10px;
}
.user-menu.open { display: flex; }
.user-menu .who { display: flex; flex-direction: column; gap: 2px; }
.user-menu .who b { font-size: 14px; }
.user-menu .who span { font-size: 12px; color: var(--muted); word-break: break-all; }

/* ---------------- hero ---------------- */
.hero {
    max-width: 1240px;
    margin: 0 auto;
    padding: clamp(40px, 7vh, 88px) clamp(16px, 5vw, 56px) 64px;
    display: grid;
    grid-template-columns: minmax(0, 48fr) minmax(0, 52fr);
    gap: clamp(28px, 5vw, 72px);
    align-items: center;
}
.hero-copy { display: flex; flex-direction: column; gap: 24px; }
.hero-h {
    font-family: var(--display);
    font-weight: 400;
    font-size: clamp(46px, 7vw, 100px);
    line-height: 1.02;
    letter-spacing: -0.01em;
    text-wrap: balance;
}
.hero-h em { font-style: italic; color: var(--ox); }
.hero-h .line { display: block; overflow: hidden; }
/* Load sequence is pure CSS — the page must render fully even if JS fails. */
@keyframes rise { from { transform: translateY(110%); } to { transform: translateY(0); } }
@keyframes fadeup { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.hero-h .line > span { display: block; animation: rise 1s var(--ease-out) both; }
.hero-h .line:nth-child(2) > span { animation-delay: 0.12s; }
.hero-sub { max-width: 44ch; color: var(--muted); font-size: 17px; }
.today-line {
    font-family: var(--mono);
    font-size: 12.5px;
    letter-spacing: 0.04em;
    display: flex;
    align-items: center;
    gap: 10px;
}
.today-line::before {
    content: "";
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--ox);
    flex: 0 0 auto;
    animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(122, 34, 49, 0.35); }
    50% { box-shadow: 0 0 0 6px rgba(122, 34, 49, 0); }
}
.today-line b { color: var(--ox); }
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.hero .eyebrow { animation: fadeup 0.9s var(--ease-out) 0.25s both; }
.hero-sub { animation: fadeup 0.9s var(--ease-out) 0.35s both; }
.today-line { animation: fadeup 0.9s var(--ease-out) 0.45s both; }
.hero-ctas { animation: fadeup 0.9s var(--ease-out) 0.55s both; }

.stage {
    perspective: 1400px;
    min-width: 0;
    animation: fadeup 1.1s var(--ease-out) 0.3s both;
}
.poster {
    background: var(--card);
    border: 1px solid #E7E3D7;
    box-shadow:
        0 1px 2px rgba(24, 20, 28, 0.08),
        0 12px 28px rgba(24, 20, 28, 0.14),
        0 40px 80px rgba(24, 20, 28, 0.18);
    padding: clamp(12px, 1.6vw, 22px);
    will-change: transform;
}
.poster-head { display: flex; align-items: baseline; justify-content: space-between; margin: 2px 4px 10px; }
.poster-head .yr { font-family: var(--display); font-size: clamp(20px, 2.4vw, 30px); }
.poster-head .cap { font-family: var(--mono); font-size: 8px; letter-spacing: 0.28em; color: #A29C8E; }
.poster-foot {
    text-align: center;
    font-family: var(--mono);
    font-size: 7.5px;
    letter-spacing: 0.3em;
    color: #B5AFA1;
    margin-top: 10px;
}

/* ---------------- year grid ---------------- */
.ycal { display: flex; flex-direction: column; gap: 2px; }
.mrow { display: flex; gap: 2px; }
.mlabel {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--mono);
    font-weight: 700;
    color: var(--cal-accent, var(--ox));
    background: var(--cal-labelbg, var(--labelbg));
}
.drow {
    position: relative;
    flex: 1;
    display: grid;
    grid-template-columns: repeat(31, 1fr);
    gap: 1px;
    background: #E4E0D4;
    border: 1px solid #E4E0D4;
    min-width: 0;
}
.dcell { position: relative; background: #FFFFFF; min-width: 0; }
.dcell.blank { background: var(--cal-labelbg, var(--labelbg)); }
.dcell.wkend { background: var(--cal-weekend, var(--weekend)); }
.dcell.holiday { background: var(--cal-blush, var(--blush)); }
.dcell.past {
    background-image: repeating-linear-gradient(-45deg,
        rgba(34, 31, 38, 0.05) 0 1px, transparent 1px 4px);
}
.dcell.today { box-shadow: inset 0 0 0 1.5px var(--cal-accent, var(--ox)); z-index: 1; }
.dnum { position: absolute; top: 1px; left: 2.5px; font-family: var(--mono); color: #2A2730; }
.dsun .dnum, .holiday .dnum { color: var(--cal-accent, var(--ox)); font-weight: 700; }
.dow { position: absolute; top: 1px; right: 2.5px; font-family: var(--mono); color: #C2BCAE; }
.hstar { position: absolute; bottom: -1px; right: 2px; color: var(--cal-accent, var(--ox)); line-height: 1; }
.bar {
    position: absolute;
    z-index: 2; /* above the today cell's z-index:1 outline */
    border-radius: 3px;
    display: flex;
    align-items: center;
    padding: 0 5px;
    overflow: hidden;
    cursor: pointer;
    transform-origin: left center;
    transform: scaleX(0);
    transition: transform 0.8s var(--ease-out), filter 0.2s;
    border: none;
}
.bar:hover { filter: brightness(1.08); }
.bar:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }
.ycal.drawn .bar { transform: scaleX(1); }
.bar span {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.bar.dark span { color: var(--card); }
.bar.light span { color: var(--ink); }

/* hero poster sizing */
.ycal.hero-size .mrow { height: clamp(13px, 1.9vw, 20px) !important; }
.ycal.hero-size .mlabel { width: clamp(22px, 2.6vw, 30px); font-size: 7px; }
.ycal.hero-size .dnum, .ycal.hero-size .dow { display: none; }
.ycal.hero-size .bar { height: 5px; bottom: 2px !important; pointer-events: none; }
.ycal.hero-size .bar span { display: none; }
.ycal.hero-size .hstar { font-size: 6px; }
.ycal.hero-size .dcell.today { box-shadow: inset 0 0 0 1px var(--cal-accent, var(--ox)); }

/* editor sizing */
.ycal.editor-size .mlabel { width: 46px; font-size: 11px; }
.ycal.editor-size .dnum { font-size: 9.5px; }
.ycal.editor-size .dow { font-size: 7px; }
.ycal.editor-size .bar { height: 14px; }
.ycal.editor-size .hstar { font-size: 9px; }
.ycal.editor-size .dcell:not(.blank) { cursor: pointer; transition: background 0.2s; }
.ycal.editor-size .dcell:not(.blank):hover { background: #FBF3E9; }

/* ---------------- marquee ---------------- */
.marquee {
    border-top: 1px solid var(--hairline);
    border-bottom: 1px solid var(--hairline);
    overflow: hidden;
    padding: 13px 0;
    white-space: nowrap;
}
.marquee-track { display: inline-block; animation: marquee 46s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
.marquee span {
    font-family: var(--mono);
    font-size: 11.5px;
    letter-spacing: 0.18em;
    color: var(--muted);
    margin: 0 18px;
}
.marquee b { color: var(--ox); font-weight: 400; }

/* ---------------- sections ---------------- */
section.block { padding: clamp(64px, 10vh, 120px) clamp(16px, 5vw, 56px); }
.sec-inner { max-width: 1140px; margin: 0 auto; }
.sec-head { display: flex; flex-direction: column; gap: 14px; margin-bottom: clamp(32px, 5vh, 56px); }
.sec-head h2 {
    font-family: var(--display);
    font-weight: 400;
    font-size: clamp(32px, 4.2vw, 54px);
    line-height: 1.08;
    text-wrap: balance;
}
.sec-head h2 em { font-style: italic; color: var(--ox); }
.sec-head p { color: var(--muted); max-width: 56ch; }

.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
    /* Fallback: reveal on a timer even if JS (IntersectionObserver) never runs */
    animation: fadeup 0.9s var(--ease-out) 2.2s forwards;
}
.reveal.in { opacity: 1; transform: none; animation: none; }

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 4vw, 48px); }
.step { border-top: 1px solid var(--hairline); padding-top: 20px; }
.step .rn { font-family: var(--display); font-style: italic; font-size: 30px; color: var(--ox); line-height: 1; }
.step h3 { margin: 12px 0 8px; font-size: 17px; letter-spacing: -0.01em; }
.step p { font-size: 14.5px; color: var(--muted); }

/* ---------------- editor ---------------- */
.editor-sec { background: linear-gradient(180deg, transparent, rgba(122, 34, 49, 0.035), transparent); }
.editor-stage {
    position: relative;
    background: var(--card);
    border: 1px solid var(--hairline);
    border-radius: 14px;
    box-shadow: 0 24px 64px rgba(24, 20, 28, 0.12);
}
.ed-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    border-bottom: 1px solid var(--hairline);
    flex-wrap: wrap;
}
.yearpills { display: flex; gap: 4px; }
.yearpill {
    font-family: var(--mono);
    font-size: 12px;
    padding: 6px 14px;
    border-radius: 999px;
    color: var(--muted);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: background 0.25s, color 0.25s;
}
.yearpill.on { background: var(--ink); color: var(--paper); }
.chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.03em;
    padding: 6px 12px;
    border: 1px solid var(--hairline);
    border-radius: 999px;
    color: var(--muted);
    background: transparent;
    white-space: nowrap;
    cursor: pointer;
    transition: border-color 0.25s;
}
.chip:hover { border-color: var(--ink); }
.chip.on::before {
    content: "";
    width: 7px; height: 7px;
    border-radius: 50%;
    background: #2E6B4F;
}
.ed-toolbar .grow { flex: 1; }
.ed-scroll { overflow-x: auto; }
.ed-pad { padding: 20px; min-width: 940px; }
#monthCards { padding: 4px 0 12px; }

/* ---------------- mobile month cards ---------------- */
.mcard { border-bottom: 1px solid var(--hairline); padding: 18px 16px 20px; }
.mcard:last-child { border-bottom: none; }
.mcard-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.mcard-head h3 { font-family: var(--display); font-weight: 400; font-size: 22px; }
.mcard-add {
    background: none;
    border: 1px solid var(--hairline);
    border-radius: 999px;
    color: var(--ox);
    font-size: 12.5px;
    font-weight: 600;
    padding: 6px 12px;
    cursor: pointer;
}
.mini {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}
.mini-dow {
    font-family: var(--mono);
    font-size: 9px;
    color: #B5AFA1;
    text-align: center;
    padding-bottom: 2px;
}
.mini-cell {
    position: relative;
    aspect-ratio: 1;
    min-height: 40px;
    border: none;
    border-radius: 8px;
    background: #FFFFFF;
    font-family: var(--mono);
    font-size: 12px;
    color: var(--ink);
    cursor: pointer;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 6px;
}
.mini-cell.empty { background: transparent; pointer-events: none; }
.mini-cell.sun { color: var(--cal-accent, var(--ox)); font-weight: 700; }
.mini-cell.holiday { background: var(--cal-blush, var(--blush)); color: var(--cal-accent, var(--ox)); font-weight: 700; }
.mini-cell.today { box-shadow: inset 0 0 0 1.5px var(--cal-accent, var(--ox)); }
.mini-cell:active { background: #FBF3E9; }
.mini-dots {
    position: absolute;
    bottom: 5px;
    display: flex;
    gap: 2px;
}
.mini-dots i { width: 5px; height: 5px; border-radius: 50%; display: block; }
.mcard-events { list-style: none; margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.mcard-event {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    background: #FFFFFF;
    border: 1px solid var(--hairline);
    border-radius: 10px;
    padding: 11px 12px;
    cursor: pointer;
    text-align: left;
    min-height: 44px;
}
.mcard-event i { width: 10px; height: 10px; border-radius: 3px; flex: 0 0 auto; }
.mcard-event-title { font-size: 14px; font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mcard-event-date { font-family: var(--mono); font-size: 11px; color: var(--muted); flex: 0 0 auto; }

/* ---------------- event editor ---------------- */
.editor-pop {
    position: absolute;
    z-index: 72; /* above the full-screen stage (65) */
    width: 280px;
    background: var(--card);
    border: 1px solid var(--hairline);
    border-radius: 12px;
    box-shadow: 0 24px 56px rgba(24, 20, 28, 0.28);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    opacity: 0;
    transform: scale(0.86) translateY(6px);
    transform-origin: top left;
    pointer-events: none;
    transition: opacity 0.22s var(--ease-out), transform 0.4s var(--spring);
}
.editor-pop.open { opacity: 1; transform: none; pointer-events: auto; }
.editor-pop .pdate {
    font-family: var(--mono);
    font-size: 10.5px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ox);
}
.editor-pop input[type="text"] {
    font-family: var(--display);
    font-style: italic;
    font-size: 19px;
    border: none;
    border-bottom: 1px solid var(--hairline);
    background: transparent;
    padding: 2px 0 8px;
    color: var(--ink);
    width: 100%;
}
.editor-pop input[type="text"]:focus { outline: none; border-bottom-color: var(--ox); }
.swatches { display: flex; gap: 9px; align-items: center; }
.sw {
    width: 22px; height: 22px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: transform 0.25s var(--spring), box-shadow 0.2s;
}
.sw:hover { transform: scale(1.15); }
.sw.sel { box-shadow: 0 0 0 2px var(--card), 0 0 0 3.5px var(--ink); }
.sw:focus-visible { outline: 2px solid var(--ox); outline-offset: 2px; }
input[type="color"].sw { background: conic-gradient(#3D5A99, #2E6B4F, #C8862A, #7E4E8E, #3D5A99); }
input[type="color"].sw::-webkit-color-swatch-wrapper { padding: 0; opacity: 0; }
input[type="color"].sw::-webkit-color-swatch { border: none; opacity: 0; }
.ed-dates { display: flex; gap: 8px; }
.ed-dates label {
    flex: 1;
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: 0.1em;
    color: #B5AFA1;
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}
.ed-dates input {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--ink);
    border: 1px solid var(--hairline);
    border-radius: 6px;
    padding: 7px 8px;
    background: transparent;
    width: 100%;
    min-height: 36px;
}
.ed-error { color: var(--ox); font-size: 12.5px; display: none; }
.ed-actions { display: flex; gap: 8px; align-items: center; }
.ed-actions .del {
    color: var(--ox);
    font-size: 12.5px;
    font-weight: 700;
    margin-right: auto;
    background: none;
    border: none;
    cursor: pointer;
}
.scrim {
    position: fixed;
    inset: 0;
    background: rgba(24, 20, 28, 0.4);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    z-index: 71; /* above the full-screen stage, below the sheet */
}
.scrim.show { opacity: 1; pointer-events: auto; }

/* ---------------- settings ---------------- */
.modal {
    position: fixed;
    inset: 0;
    z-index: 70;
    background: rgba(24, 20, 28, 0.4);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.modal.open { display: flex; }
.modal-card {
    background: var(--card);
    border-radius: 16px;
    border: 1px solid var(--hairline);
    box-shadow: 0 32px 80px rgba(24, 20, 28, 0.3);
    width: min(560px, 100%);
    max-height: min(80vh, 700px);
    overflow-y: auto;
    padding: 26px;
    display: flex;
    flex-direction: column;
    gap: 22px;
}
.modal-head { display: flex; align-items: center; justify-content: space-between; }
.modal-head h2 { font-family: var(--display); font-weight: 400; font-size: 26px; }
.modal-close { background: none; border: none; font-size: 24px; color: var(--muted); cursor: pointer; line-height: 1; }
.set-group { display: flex; flex-direction: column; gap: 10px; }
.set-group > b { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ox); font-weight: 400; }
.set-group p { font-size: 13.5px; color: var(--muted); }
.set-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.set-row select {
    font-family: var(--sans);
    font-size: 14px;
    padding: 9px 12px;
    border: 1px solid var(--hairline);
    border-radius: 8px;
    background: var(--card);
    color: var(--ink);
    min-height: 40px;
}
.theme-dots {
    display: flex;
    gap: 9px;
    align-items: center;
    justify-content: center;
    margin-top: 18px;
}
/* visual circle drawn in ::before; the button itself is a larger tap target */
.tdot {
    position: relative;
    width: 30px; height: 30px;
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 0;
}
.tdot::before {
    content: "";
    position: absolute;
    inset: 4px;
    border-radius: 50%;
    background: var(--dot);
    border: 1px solid rgba(0, 0, 0, 0.1);
    transition: transform 0.25s var(--spring), box-shadow 0.2s;
}
.tdot:hover::before { transform: scale(1.15); }
.tdot.sel::before { box-shadow: 0 0 0 2px var(--paper), 0 0 0 3px var(--ink); }
.tdot:focus-visible { outline: 2px solid var(--ox); outline-offset: 1px; border-radius: 50%; }
.ed-toolbar .theme-dots { margin: 0; gap: 2px; }
.ed-toolbar .tdot { width: 28px; height: 28px; }
.ed-toolbar .tdot::before { inset: 5px; }
.ed-toolbar .tdot.sel::before { box-shadow: 0 0 0 2px var(--card), 0 0 0 2.5px var(--ink); }

.theme-row { display: flex; gap: 10px; flex-wrap: wrap; }
.theme-opt {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--hairline);
    border-radius: 999px;
    background: transparent;
    padding: 8px 14px 8px 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
    cursor: pointer;
    transition: border-color 0.25s, box-shadow 0.25s;
}
.theme-opt i {
    width: 20px; height: 20px;
    border-radius: 50%;
    display: block;
    border: 1px solid rgba(0, 0, 0, 0.08);
}
.theme-opt:hover { border-color: var(--ink); }
.theme-opt.sel { border-color: var(--ink); box-shadow: 0 0 0 1.5px var(--ink); }
.theme-opt:focus-visible { outline: 2px solid var(--ox); outline-offset: 2px; }

.gcal-connected {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13.5px;
}
.gcal-connected .dot { width: 8px; height: 8px; border-radius: 50%; background: #2E6B4F; }
.toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    cursor: pointer;
}
.toggle input { width: 42px; height: 24px; accent-color: var(--ox); cursor: pointer; }
.sync-busy {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--mono);
    font-size: 11.5px;
    letter-spacing: 0.04em;
    color: var(--ox);
    margin-top: 8px;
}
.spinner {
    width: 14px; height: 14px;
    flex: 0 0 auto;
    border: 2px solid var(--hairline);
    border-top-color: var(--ox);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------- full-screen editor ---------------- */
.editor-stage.full {
    position: fixed;
    inset: 0;
    z-index: 65;
    border-radius: 0;
    border: none;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.editor-stage.full .ed-toolbar { background: var(--card); }
.editor-stage.full .ed-scroll {
    flex: 1;
    overflow: auto;
    display: flex;
    flex-direction: column;
}
.editor-stage.full .ed-pad {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.editor-stage.full .ycal.editor-size { flex: 1; }
/* rows stretch to fill the viewport; inline lane heights become minimums */
.editor-stage.full .mrow { height: auto !important; min-height: 46px; flex: 1; }
.editor-stage.full .dnum { font-size: 11px; }
.editor-stage.full .dow { font-size: 8px; }
.editor-stage.full #monthCards { flex: 1; overflow: auto; }
body.editor-full { overflow: hidden; }

/* ---------------- studio mode (owners land here) ---------------- */
body.studio .hero,
body.studio .marquee,
body.studio #how,
body.studio #pricing,
body.studio .editor-sec .sec-head,
body.studio footer.colophon { display: none; }
body.studio .nav nav { display: none; }
/* nav (and its account dropdown) must paint above the fixed workspace */
body.studio .nav { border-bottom-color: var(--hairline); z-index: 66; }
body.studio .editor-stage.full { top: var(--nav-h, 64px); }

/* ---------------- purchases + owned state ---------------- */
.owned-note {
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: 0.04em;
    color: #2E6B4F;
}
.purch-list { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.purch-list li {
    font-size: 14px;
    display: flex;
    justify-content: space-between;
    gap: 14px;
    border: 1px solid var(--hairline);
    border-radius: 8px;
    padding: 9px 12px;
}
.purch-list li span { font-family: var(--mono); font-size: 11.5px; color: var(--muted); }

/* ---------------- pricing ---------------- */
.price-card {
    max-width: 640px;
    margin: 0 auto;
    border: 1.5px solid var(--ink);
    padding: clamp(32px, 5vw, 52px);
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 18px;
    align-items: center;
    background: var(--card);
}
.price-big { font-family: var(--display); font-size: clamp(64px, 9vw, 104px); line-height: 0.9; }
.price-big sup { font-size: 0.35em; vertical-align: 1.2em; color: var(--ox); }
.price-note { font-family: var(--mono); font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); }
.price-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, minmax(180px, 1fr));
    gap: 8px 36px;
    text-align: left;
    font-size: 14.5px;
    margin-top: 6px;
}
.price-list li::before { content: "— "; color: var(--ox); }

/* ---------------- footer / toast / busy ---------------- */
footer.colophon {
    padding: 40px clamp(16px, 5vw, 56px) 56px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 14px;
    align-items: center;
}
.foot-links { display: flex; gap: 20px; flex-wrap: wrap; justify-content: center; }
.foot-links a {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--muted);
    text-decoration: none;
}
.foot-links a:hover { color: var(--ink); }
.foot-note { font-family: var(--mono); font-size: 10px; letter-spacing: 0.24em; text-transform: uppercase; color: #B5AFA1; }

.toast {
    position: fixed;
    left: 50%;
    bottom: 28px;
    transform: translate(-50%, 20px);
    background: var(--ink);
    color: var(--paper);
    font-size: 13.5px;
    padding: 10px 18px;
    border-radius: 999px;
    max-width: min(90vw, 480px);
    text-align: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s var(--ease-out), transform 0.45s var(--spring);
    z-index: 90;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: var(--ox); }

.busy {
    position: fixed;
    inset: 0;
    z-index: 80;
    background: rgba(247, 245, 239, 0.8);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    font-family: var(--display);
    font-style: italic;
    font-size: 22px;
    color: var(--ox);
}
.busy.show { display: flex; }

/* ---------------- content pages (about / privacy / terms) ---------------- */
.page-wrap {
    max-width: 780px;
    margin: 0 auto;
    padding: clamp(36px, 6vh, 64px) clamp(20px, 5vw, 32px) 72px;
}
.page-title {
    font-family: var(--display);
    font-weight: 400;
    font-size: clamp(34px, 5vw, 54px);
    line-height: 1.05;
    margin: 10px 0 16px;
    text-wrap: balance;
}
.page-title em { font-style: italic; color: var(--ox); }
.page-updated {
    display: inline-block;
    font-family: var(--mono);
    font-size: 10.5px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--muted);
    border: 1px solid var(--hairline);
    border-radius: 999px;
    padding: 5px 12px;
    margin-bottom: 36px;
}
.prose section { margin-bottom: 36px; }
.prose h2 {
    font-family: var(--display);
    font-weight: 400;
    font-size: 26px;
    line-height: 1.15;
    margin-bottom: 10px;
}
.prose h3 { font-size: 15px; margin: 18px 0 6px; }
.prose p { margin-bottom: 12px; color: #46424C; max-width: 70ch; }
.prose ul {
    list-style: none;
    margin: 8px 0 14px;
    display: flex;
    flex-direction: column;
    gap: 7px;
    color: #46424C;
}
.prose li { padding-left: 1.5em; position: relative; }
.prose li::before { content: "—"; color: var(--ox); position: absolute; left: 0; }
.prose a { color: var(--ox); text-decoration: underline; text-underline-offset: 2px; }
.prose a:hover { color: var(--ox-hover); }

/* ---------------- responsive ---------------- */
@media (max-width: 1000px) {
    .nav nav { display: none; }
}
@media (max-width: 520px) {
    #authSignedOut .btn { display: none; }
    .nav { gap: 12px; }
}
@media (max-width: 839px) {
    .hero { grid-template-columns: 1fr; padding-bottom: 40px; }
    .steps { grid-template-columns: 1fr; }
    .price-list { grid-template-columns: 1fr; }
    .ed-toolbar { gap: 8px; padding: 10px 12px; }
    .ed-toolbar .btn { font-size: 12px; padding: 7px 12px; }
    #holidayChip { display: none; }
    .editor-stage { border-radius: 12px; }
    .brand span { font-size: 15px; }

    /* editor becomes a bottom sheet */
    .editor-pop {
        position: fixed;
        left: 0 !important;
        right: 0;
        top: auto !important;
        bottom: 0;
        width: 100%;
        border-radius: 18px 18px 0 0;
        padding: 20px 20px calc(20px + env(safe-area-inset-bottom));
        transform: translateY(100%);
        transition: opacity 0.2s, transform 0.45s var(--ease-out);
    }
    .editor-pop.open { transform: translateY(0); }
    .editor-pop input[type="text"] { font-size: 22px; }
    .ed-actions .btn { min-height: 44px; }

    .modal { padding: 0; align-items: flex-end; }
    .modal-card {
        width: 100%;
        max-height: 88vh;
        border-radius: 18px 18px 0 0;
        padding: 22px 20px calc(24px + env(safe-area-inset-bottom));
    }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .hero-h .line > span, .hero .eyebrow, .hero-sub, .today-line, .hero-ctas, .stage,
    .reveal, .bar, .editor-pop, .toast {
        animation: none !important;
        transition: none !important;
        transform: none !important;
        opacity: 1 !important;
    }
    .marquee-track { animation: none; }
    .today-line::before { animation: none; }
}
