
:root{--blue:#3E5A7D;--magenta:#883E6C}
.spark-meter-art{transition:opacity .18s ease}.spark-meter-choice:focus-visible{outline:3px solid #432452;outline-offset:2px}
.jar-open{display:block;width:320px;max-width:100%;padding:0;margin:10px auto 0;border:0;background:transparent;border-radius:12px;cursor:pointer}.jar-open .jar-graphic{width:300px;height:278px;display:block;margin:0 auto}.jar-total{font:500 21px/1.3 Lora,Georgia,serif;text-align:center;color:#432452;margin:0 0 10px}.jar-hint{text-align:center;font-size:12px;color:#4A716D}.jar-treasure-image{display:block;max-width:100%;height:auto;max-height:350px;object-fit:contain;margin:14px 0}.jar-list{margin-top:16px}.jar-list li{align-items:flex-start}.jar-list summary{font-size:15px;line-height:1.5;overflow-wrap:anywhere}.jar-card .lede{font-size:15px;line-height:1.6}.received-card .connection-pending{padding:12px 14px;border-left:3px solid #877334;background:#f2ecdc;font-size:13px}.complete-row{margin:16px 0}.complete-row .btn{width:100%}.treasure-keep{margin-top:16px}.btn .ui-icon{flex-shrink:0}.btn[disabled]{opacity:.7}.video-body .video-label,.video-body .video-sub,.page-intro h1,.page-intro .lede,.live-spark h2,.live-spark p{color:#fff}.live-spark .eyebrow,.live-spark h3{color:#F4E3A1}
@media(prefers-reduced-motion:reduce){.spark-meter-art{transition:none}}

/* Keep both Home tiles paired, including narrow mobile layouts. */
.home-flow .video-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;align-items:stretch}
.home-flow .video-card{width:100%;min-width:0;height:100%;align-items:stretch}
.home-flow .video-thumb{width:100%;flex:none;aspect-ratio:16/9}
.home-flow .video-body{flex:1;width:100%;box-sizing:border-box}
.home-flow .video-label,.home-flow .video-sub{overflow-wrap:break-word}
.activity-back{display:inline-flex;margin:16px 0}
.daily-activity label{display:block;font-weight:600;color:var(--plum);margin:24px 0 12px;line-height:1.6}
.daily-activity textarea{box-sizing:border-box;display:block;width:100%;resize:vertical;border:1px solid #cdc4d0;border-radius:12px;padding:14px;font-size:16px;line-height:1.6;background:#fffdfa;color:var(--plum)}
.daily-activity .btn{width:100%}.daily-activity .btn[type=submit]{margin:16px 0}
/* v0.6.63 — breathing room above and below Keep my response. */.activity-save-status{color:var(--teal);font-size:14px;line-height:1.6}
.jar-response{border-top:1px solid #ded6ca;margin-top:16px;padding-top:16px;white-space:pre-wrap}

.pick-card{perspective:700px}.pick-front,.pick-back{backface-visibility:hidden;transition:transform .45s ease,opacity .3s ease}
.pick-back{transform:rotateY(-180deg)}.pick-card.revealed .pick-front{transform:rotateY(180deg)}.pick-card.revealed .pick-back{transform:rotateY(0)}
.crystal-dialog{box-sizing:border-box;width:min(350px,calc(100% - 32px));max-height:calc(100dvh - 40px);margin:auto;padding:28px 24px 20px;border:1px solid #c8b778;border-top:4px solid #877334;border-radius:18px;background:#FAF7EF;color:#432452;box-shadow:0 16px 55px #24102d55;overflow:auto}
.crystal-dialog::backdrop{background:#24102dcc}
.crystal-close{display:flex;align-items:center;justify-content:center;position:absolute;right:8px;top:8px;width:44px;height:44px;border:0;background:transparent;color:#432452;font-size:30px;border-radius:12px}
.crystal-message-heading{display:flex;align-items:center;gap:14px;padding-right:12px;margin:14px 0 20px}
.crystal-message-image{display:block;width:68px;height:90px;object-fit:cover;border:2px solid #877334;border-radius:10px}
.crystal-message-heading .heading-kicker{display:block;margin:0}.crystal-message-heading .ui-icon{width:36px;height:36px;margin-bottom:8px}
.crystal-dialog h2{font:500 26px/1.25 Lora,Georgia,serif;margin:0 0 16px;color:#432452}
.crystal-dialog p{font-size:16px;line-height:1.6;margin:0 0 18px}.crystal-dialog .eyebrow{font-size:11px;line-height:1.5;margin:0;color:#877334}
.crystal-small-action{padding:16px;background:#eaf0ec;border-radius:12px;margin:20px 0}.crystal-small-action h3{font:700 12px/1.5 'DM Sans',sans-serif;letter-spacing:.07em;text-transform:uppercase;color:#4A716D;margin:0 0 8px}.crystal-small-action p{margin:0;font-size:15px}
.crystal-dialog .btn{width:100%}.crystal-dialog .fine{font-size:12px;margin:12px 0;color:#716B73}.crystal-done{display:block;background:none;border:0;font:500 14px/1.5 'DM Sans',sans-serif;min-height:44px;padding:6px 0;margin:auto;text-decoration:underline}
/* Home video player dialog (v0.6.48) — wider than the crystal dialog so the
   16:9 player fits; the frame is cleared on close so playback stops. */
.video-dialog{box-sizing:border-box;width:min(560px,calc(100vw - 32px));max-height:calc(100dvh - 40px);margin:auto;padding:0;border:1px solid #c8b778;border-top:4px solid #877334;border-radius:18px;background:#FAF7EF;color:#432452;box-shadow:0 16px 55px #24102d55;overflow:auto}
.video-dialog::backdrop{background:#24102dcc}
.video-dialog .video-frame{display:block;width:100%;aspect-ratio:16/9;border:0;background:#000}
.video-dialog .crystal-close{background:#432452cc;color:#fff;border-radius:50%}
.video-dialog h2{font:500 20px/1.3 Lora,Georgia,serif;margin:16px 20px 8px;color:#432452}
.video-dialog .fine{margin:0 20px 12px}
.video-dialog .btn{width:calc(100% - 40px);margin:0 20px 20px}
@media(prefers-reduced-motion:reduce){.pick-front,.pick-back{transition:none}}

.doorway-brand{justify-content:center;padding-top:10px;padding-bottom:8px}.app-doorway{padding:0;margin:0}.app-shell.doorway{padding-bottom:env(safe-area-inset-bottom)}.app-entrance{position:relative;min-height:calc(100svh - 100px);display:flex;flex-direction:column;justify-content:flex-end;isolation:isolate;overflow:hidden;background:#FAF7EF}
.app-door-half{position:absolute;inset:0;z-index:-2;background:url('./assets/caroline-doorway.jpg') 50% center/auto 100% no-repeat;transition:transform 1.25s cubic-bezier(.65,0,.25,1),filter 1.25s}
.app-door-half.door-left{clip-path:inset(0 50% 0 0)}.app-door-half.door-right{clip-path:inset(0 0 0 50%)}
.app-door-shade{position:absolute;inset:0;z-index:-1;background:linear-gradient(0deg,#31153dff 0%,#31153df0 35%,#31153d55 63%,transparent 85%);transition:opacity .5s}
.app-door-copy{padding:16px 26px 16px;color:#fff;transition:opacity .35s,transform .5s}.app-door-copy .eyebrow{color:#F4E3A1;font-size:11px;margin:0 0 6px}.app-door-copy h1{font:500 28px/1.15 Lora,Georgia,serif;color:#fff;margin:0 0 8px}.app-door-copy h1 em{font-weight:500;color:#F4E3A1}.app-door-copy>p:not(.eyebrow){font-size:15px;line-height:1.6;color:white;margin:0 0 12px}.app-door-copy .btn{width:100%;font-size:16px;min-height:48px}.door-skip{display:flex;align-items:center;justify-content:center;min-height:44px;margin-top:8px;color:white;font-size:13px;text-decoration:underline}
.doors-opening .door-left{transform:translateX(-100%);filter:brightness(.6)}.doors-opening .door-right{transform:translateX(100%);filter:brightness(.6)}.doors-opening .app-door-copy{opacity:0;transform:translateY(15px)}.doors-opening .app-door-shade{opacity:0}.reopen-doors{display:inline-flex;margin-top:12px;font-size:12px}
@media(prefers-reduced-motion:reduce){.app-door-half,.app-door-shade,.app-door-copy{transition:none}}
/* v0.6.23 — Home help rows as Aunty-style divider rows (Caroline's word, Nov 18).
   The three "What would help you today?" rows stop being boxed cards and become
   plain rows separated by thin dividing lines, as on the Aunty app home. Frees
   vertical room so the Community button and the Spark Meter title sit higher.
   Scoped to .home-flow .help-list so the Community tab rows and the
   "See What's Sparking" gateway row keep their card style. */
.home-flow .help{margin:14px 0 12px}
.home-flow .help>h2{margin-bottom:10px}
.home-flow .help-list{display:block;border-top:1px solid #e8ddc2;gap:0}
.home-flow .help-list .help-row{min-height:0;background:transparent;border:0;border-bottom:1px solid #e8ddc2;border-radius:0;padding:13px 2px;box-shadow:none}
.home-flow .help-list .help-row:hover{background:#fdf3d0}
/* v0.6.24 — Daily Spark card restyle + Community divider rows + "Your Spark Over Time" (Caroline's word, Nov 18).
   1. Daily Spark card (Spark tab): book icon off, everything centred, DO TODAY / THE NUDGE and the button in capitals, a star divider above each action step.
   2. Community tab rows as Aunty-style divider rows (same treatment as the Home rows in v0.6.23), with the Community website's own icons.
   3. "Your Spark Over Time" in My Corner — a gentle gold line, never dots. */
#app .live-spark{text-align:center}.live-spark .heading-kicker{justify-content:center;text-align:center}.live-spark .heading-kicker .eyebrow{flex:0 1 auto}
#app .live-spark .heading-kicker{justify-content:center}
#app .live-spark .spark-action{border-top:0;padding-top:0}
#app .live-spark .spark-nudge{margin:0 0 20px}
#app .live-spark .spark-action h3,#app .live-spark .spark-nudge h3{margin:0 0 8px}
.spark-star-divider{display:flex;align-items:center;gap:10px;margin:18px 0}
.spark-star-divider::before,.spark-star-divider::after{content:'';flex:1;height:1px;background:rgba(244,227,161,.45)}
.spark-star-divider img{display:block;width:22px;height:22px;object-fit:contain}
section.help[aria-label="Inside the community"]{margin:14px 0 12px}
section.help[aria-label="Inside the community"]>h2{margin-bottom:10px}
section.help[aria-label="Inside the community"] .help-list{display:block;border-top:1px solid #e8ddc2;gap:0}
section.help[aria-label="Inside the community"] .help-list .help-row{min-height:0;background:transparent;border:0;border-bottom:1px solid #e8ddc2;border-radius:0;padding:13px 2px;box-shadow:none}
section.help[aria-label="Inside the community"] .help-list .help-row:hover{background:#fdf3d0}
.spark-over-time .spark-period{display:flex;gap:6px;margin:14px 0 4px}
.spark-over-time .spark-period button{flex:1;min-height:40px;border:1px solid #e8ddc2;background:#fffdfa;border-radius:10px;font:600 13px/1.2 'DM Sans',sans-serif;color:#432452;cursor:pointer}
.spark-over-time .spark-period button[aria-pressed="true"]{background:#877334;border-color:#877334;color:#fff}
.spark-line-wrap{margin:10px 0 4px}
.spark-line-wrap svg{width:100%;height:auto;display:block}
.spark-zone-label{fill:#8a7f8d;font:500 11px 'DM Sans',sans-serif}
.spark-reflection{font-family:Lora,Georgia,serif;font-size:16px;line-height:1.6;color:#432452;margin:12px 0 6px}
.spark-over-time-lede{font-family:Lora,Georgia,serif;font-size:18px;line-height:1.5;color:#432452;margin:12px 0 8px}

/* v0.6.25 — tighten the three "What would help you today?" rows a touch
   (Caroline's word, Nov 18): less padding above and below each row so the
   page shifts up. Home rows only; Community tab rows untouched. */
.home-flow section.help[aria-label="What would help you today?"] .help-list .help-row{padding:8px 2px;}

/* v0.6.68 — Home help-row icons match the Inside the community row icons
   (Caroline's word, Nov 19). Measured on the VISIBLE glyph core (alpha > 10;
   the near-invisible wisps inflate the raw alpha box, as with the v0.6.63
   bell): at the 48px box the three Home glyphs each render exactly 48.0px,
   while the Community set renders 32.1–40.2px (mean 35.9, median 35.1). A
   36px box scales each Home glyph to 36.0px — the Community mean. Scoped to
   the Home help rows only — Community rows, the See What's Sparking card
   icon and every other icon untouched. CSS, not a geometry change: the
   non-pale geometry entries are shared with card headings elsewhere. */
.home-flow section.help[aria-label="What would help you today?"] .help-icon .ui-icon{width:36px;height:36px;flex-basis:36px;}

/* v0.6.29 — PERMANENT tab-bar anchor. The bottom tab bar must stay glued to
   the viewport bottom on every tab and at every scroll position. Verified
   Nov 18 (12 positions, 480x844 + 390x844, Home + Spark, scroll top/mid/
   bottom): position fixed, bottom 0, rect bottom == viewport height, no
   transformed/filtered ancestor. A full-page ("Capture more") screenshot
   still shows the bar mid-image with content below it — that is a capture
   artifact, not a live fault. This guard re-asserts the anchor AFTER every
   other stylesheet, so a later rule can never silently un-anchor it again.
   Do not move the tab bar inside a transformed/filtered container: that
   would break fixed positioning. */
.tabbar{position:fixed!important;left:0!important;right:0!important;bottom:0!important;z-index:40;transform:none!important;margin-left:auto!important;margin-right:auto!important;}
#tabbar[hidden]{display:none;}

/* v0.6.45 — tab bar polish (Caroline's word, Nov 18, via Lucy):
   (a) Bottom-menu labels ALL CAPS. text-transform only — the underlying
       labels stay "Home" / "Spark" / "Community" / "Wander" / "My Corner".
   (b) Daily Spark card button goes gold (#877334, same gold as the
       STEP INTO THE COMMUNITY button) with white text. Scoped to
       .live-spark so no other button changes colour. */
.tabbar .tab>span:last-child{text-transform:uppercase}
.live-spark .btn-light{background:#877334;border-color:#877334;color:#fff}

/* v0.6.45 fix — inactive tab icons sized UP to the active pale size.
   The icons/*.png files carry a faint alpha haze (alpha 1-8) that corrupts
   a threshold-0 bbox, so their ICON_GEOMETRY entries undersize the visible
   artwork (19-25px vs 32px). The threshold-8 geometry below is each file's
   own visible-artwork geometry (== its pale twin's). Scoped to the tab bar
   only: lobby is also the Home gateway help-icon and daily-spark is also a
   cardHeading icon, so their table entries must not change. The three new
   tab icons were fixed in the table instead (tabbar-only usage). */
.tabbar .tab[href="#/home"]:not(.active) .ui-icon img{width:148.492%!important;height:148.492%!important;left:-24.13%!important;top:-17.865%!important}
.tabbar .tab[href="#/spark"]:not(.active) .ui-icon img{width:141.855%!important;height:141.855%!important;left:-20.588%!important;top:-16.686%!important}
/* v0.6.45 fix — at <=400px the caps MY CORNER wraps (space = wrap point,
   11px caps needs ~60px in a ~59px slot). 10px labels fit on one line. */
@media (max-width:400px){.tabbar .tab{font-size:10px}}

/* v0.6.45 fix 2 — caps labels must never wrap: at 390px MY CORNER has a
   space (a wrap point) and 10px caps still needs ~63px in a ~59px slot.
   nowrap lets the label span use its full width inside the tab (63px in a
   67px tab); neighbours have slack, so nothing overlaps. */
.tabbar .tab>span:last-child{white-space:nowrap}

/* v0.6.45 — pick-a-card instructions, larger and bold (Caroline's word,
   Nov 18): the old .fine line (12px muted) was easy to miss. */
.pick-instructions{font-size:17px;font-weight:700;color:var(--plum);line-height:1.5;margin:4px 0 16px}

/* v0.6.45 - doorway fills the viewport with purple to the bottom (Caroline
   Nov 18: white gap below "Go straight to Home"). The shell becomes a
   100svh flex column so the entrance stretches to fill; plum on the shell
   is the safety net, so any residual strip still reads purple, never white. */
.app-shell.doorway{box-sizing:border-box;min-height:100svh;display:flex;flex-direction:column;background:#31153d;}
.app-shell.doorway main.app-doorway{flex:1 0 auto;display:flex;flex-direction:column;}
.app-shell.doorway .app-entrance{flex:1 0 auto;min-height:0;}

/* v0.6.45 - tap highlight must not stick on touch (Caroline Nov 18: "Share
   Your Spark already highlighted"). Mobile browsers hold :hover after a tap,
   so on touch devices the gold hover is off and only a brief :active flash
   shows while the finger is down. Desktop hover is unchanged. */
@media (hover:none){
  .home-flow .help-list .help-row:hover,
  section.help[aria-label="Inside the community"] .help-list .help-row:hover,
  .help-row:hover{background:transparent}
  .home-flow .help-list .help-row:active,
  section.help[aria-label="Inside the community"] .help-list .help-row:active,
  .help-row:active{background:#fdf3d0}
  .home-flow .checkin-card .spark-meter-choice:hover:not(.selected){background:transparent}
}
.home-flow .checkin-card .spark-meter-choice:active{background:#F7EAC7}

/* v0.6.45 - slider focus ring (Caroline Nov 18: tapping a Lit/Dim/Out row
   put a dark border around the whole slider track). Root cause: the row-tap
   handler called range.focus(), and the base :focus-visible outline traces
   the rotated input's tall bounding box. The focus() call is removed in
   app.js, and the vertical slider's focus ring now sits on the thumb only,
   so keyboard focus stays visible without the pill outline. */
.home-flow .checkin-card .spark-meter-range:focus-visible{outline:none}
.home-flow .checkin-card .spark-meter-range:focus-visible::-webkit-slider-thumb{box-shadow:0 0 0 2px #fff,0 0 0 6px #432452,0 2px 7px #43245233}
.home-flow .checkin-card .spark-meter-range:focus-visible::-moz-range-thumb{box-shadow:0 0 0 2px #fff,0 0 0 6px #432452,0 2px 7px #43245233}

/* v0.6.45 doorway: on short screens (<=740px tall) compact the copy further so
   it clears Caroline's face; the photo reframe (135% zoom, bottom-anchored)
   lifts her face up the frame. Verified at 667/700/768/844. */
@media (max-height:740px){
  .app-door-copy{padding-top:12px;}
  .app-door-copy h1{font-size:26px;margin:0 0 6px;}
  .app-door-copy>p:not(.eyebrow){font-size:14px;line-height:1.5;margin:0 0 10px;}
  .app-door-copy .entry-form{gap:6px;margin-top:4px;}
  .app-door-copy .entry-form input{padding:8px 12px;}
  .app-door-copy .entry-form .btn{margin-top:4px;min-height:46px;}
  .app-door-copy .door-skip{margin-top:4px;min-height:40px;}
}

/* v0.6.45 — Daily Spark card labels as GOLD PILL BUTTONS (Caroline's word,
   Nov 18: the app card still showed plain gold caps text for DO TODAY /
   THE NUDGE, while the approved JPGs show gold pills).
   Values taken EXACTLY from the render template
   (daily-spark-cards/render_new_template.py, draw_pill_label):
   fill GOLD (241,211,145) = #F1D391; text PILL_INK (26,64,50) = #1A4032;
   DM Sans 700; tracking 5 at 38px ~= 0.13em -> letter-spacing 2px at 15px;
   pad_x 30/38 ~= 0.79em -> 12px; pad_y 13/38 ~= 0.34em -> 5px;
   radius = pill_h/2 -> fully rounded (999px).
   The template also draws gold hairlines flanking the pill; the app does
   NOT repeat them — the star divider directly above each label already
   carries full-width gold hairlines, so a second line through the pill
   would double the lines. The pill is opaque gold, so it reads identically
   on all four card tones (plum/teal/blue/magenta). */
#app .live-spark .spark-action h3,#app .live-spark .spark-nudge h3{display:inline-block;background:#F1D391;color:#1A4032;font-family:'DM Sans',sans-serif;font-size:15px;font-weight:700;letter-spacing:2px;line-height:1.35;padding:5px 12px;border-radius:999px;white-space:nowrap;margin:0 0 8px}

/* v0.6.45 — entry-code sign-in (Caroline's word, Nov 18): the code field is
   big and clear (6 digits, grouped); the inline links on the doorway read
   pale gold like the rest of the doorway copy. */
.entry-form .entry-code-input{font:600 28px/1.2 'DM Sans',sans-serif;letter-spacing:.35em;text-indent:.35em;padding:12px 14px;text-align:center;}
.entry-form .fine .text-link{color:#F4E3A1;font-size:13px;}
@media (max-height:740px){
  .app-door-copy .code-form{gap:6px;margin-top:4px;}
  .app-door-copy .code-form .entry-code-input{font-size:24px;padding:9px 12px;}
}

/* v0.6.50 — hide-on-scroll REMOVED (Caroline's word, Nov 18): the tab bar is pinned and never hides, slides, or translates. */
/* v0.6.46 — live received sparks + in-app support cheers. Warm, no counts:
   the received list shows the lights themselves, never a tally. */
.received-list{list-style:none;margin:16px 0 0;padding:0;display:grid;gap:0}
.received-list li{display:flex;align-items:flex-start;gap:10px;padding:12px 0;border-bottom:1px solid #ded6ca}
.received-list li:last-child{border-bottom:0}
.received-list .ui-icon{width:28px;height:28px;flex:0 0 28px}
.received-list li>span:nth-child(2){flex:1}
.received-list li .fine{white-space:nowrap}
.support-list{list-style:none;margin:16px 0 0;padding:0;display:grid;gap:0}
.support-list li{padding-bottom:16px;margin-bottom:16px;border-bottom:1px solid #ded6ca}
.support-list li:last-child{border-bottom:0;margin-bottom:0;padding-bottom:0}
.support-list li p{margin:0 0 10px}
.support-list a.support-post-link{color:inherit;text-decoration:none;display:block}

/* v0.6.53 — small play glyph beside "Tap to watch" (big thumbnail overlay removed). */
.home-flow .video-sub .video-play-mini{display:inline-block;width:11px;height:11px;vertical-align:-1px;margin-right:6px;fill:#F4E3A1;flex:none}

/* v0.6.60 — "Crystals Talk" heading above the Home video row (Caroline, Nov 18):
   the heading is the first child of the grid section, so it spans both columns.
   No font rules of its own: it inherits the base h2 exactly like the
   "Pick up where you left off." heading (Lora, 26px, weight 500, plum). */
.home-flow .video-row>h2{grid-column:1/-1;}
/* v0.6.62 — header actions: bell + gear + door (Lucy's header sketch). */
/* v0.6.84 — Caroline's word Nov 20: header icons at 90% (32px -> 28.8px box,
   community-theme.css) and the gap between them 8px -> 3px. Tap targets stay
   44px; only the visible glyphs shrink. */
.topbar .header-actions{display:flex;align-items:center;gap:3px;margin-left:auto;}
.topbar button.settings-control{background:transparent;border:0;padding:0;cursor:pointer;font:inherit;-webkit-appearance:none;appearance:none;}
section.help[aria-label="Settings"] .help-list{display:block;border-top:1px solid #e8ddc2;gap:0;}
section.help[aria-label="Settings"] .help-list .help-row{min-height:0;background:transparent;border:0;border-bottom:1px solid #e8ddc2;border-radius:0;padding:13px 2px;box-shadow:none;}
section.help[aria-label="Settings"] button.help-row{font:inherit;text-align:left;width:100%;cursor:pointer;}
.page-intro.settings-intro .heading-kicker .ui-icon{width:26px;height:26px;flex-basis:26px}
/* Spark Jar tidy (v0.6.91, Lucy Nov 21): remove one treasure, clear them all.
   Quiet text buttons, not gold — letting go should feel gentle, not loud. */
.jar-remove{display:block;margin:12px 0 0;padding:0;border:0;background:none;color:var(--muted);font-size:13px;font-weight:400;text-decoration:underline;cursor:pointer;min-height:44px;text-align:left}
.jar-clear{display:block;margin:18px auto 0;padding:0;border:0;background:none;color:var(--plum);font-size:14px;font-weight:600;text-decoration:underline;cursor:pointer;min-height:44px}
