/* RLM - OWN THE DAY!  —  mobile-first styles (approved palette from the concept) */
:root {
  --paper: #f5f3ed; --card: #fffefa; --ink: #243946; --muted: #64737a; --line: #d9e1e2;
  --action: #315c75; --action-text: #fffefa; --soft: #e9f0f3; --error: #994134; --ok: #2f6b4f; --ok-soft: #e4f1ea;
  --warn: #8a6a1f; --warn-soft: #f6efdc; --optional: #6a7d86; --radius: 12px; --nav-h: 64px;
  --fs: 16px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #17252c; --card: #20313b; --ink: #ecf2f4; --muted: #bdcbd0; --line: #455963;
    --action: #a8cfe1; --action-text: #142a35; --soft: #2a414d; --error: #ffb4a5; --ok: #9fd8b8; --ok-soft: #244235;
    --warn: #e8c97a; --warn-soft: #3d3520; --optional: #9fb0b8; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #17252c; --card: #20313b; --ink: #ecf2f4; --muted: #bdcbd0; --line: #455963;
  --action: #a8cfe1; --action-text: #142a35; --soft: #2a414d; --error: #ffb4a5; --ok: #9fd8b8; --ok-soft: #244235;
  --warn: #e8c97a; --warn-soft: #3d3520; --optional: #9fb0b8; color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: var(--fs)/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: var(--paper); overflow-wrap: anywhere; }
[hidden] { display: none !important; }
h1 { font-size: 22px; line-height: 1.2; font-weight: 600; margin: 0; }
h2 { font-size: 20px; line-height: 1.25; font-weight: 600; margin: 0 0 8px; }
h3 { font-size: 17px; font-weight: 600; margin: 0 0 10px; }
p { margin: 0 0 10px; }
small, .muted { color: var(--muted); font-size: 14px; }
a { color: var(--action); }
button { font: inherit; }
button, a, input, select, textarea, summary { touch-action: manipulation; }
:focus-visible { outline: 3px solid #bc703c; outline-offset: 4px; }
.header-tools { display: flex; gap: 6px; }
.brand-home { color: inherit; text-decoration: none; }
.btn[aria-current="page"] { border-color: var(--action); background: var(--soft); }
.text-link { font-weight: 700; text-underline-offset: 5px; display: inline-block; padding: 10px 0; }
.eyebrow { text-transform: uppercase; font-size: 12px; letter-spacing: .14em; font-weight: 800; }
.skip-link { position: absolute; left: 10px; top: -100px; z-index: 20; background: var(--card); padding: 14px; }
.skip-link:focus { top: 8px; }
.schedule-welcome { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 16px; }
.schedule-welcome > span { font-size: 11px; letter-spacing: .1em; font-weight: 800; }

/* The public front door: bold type, a day-planner poster, and a clear path in. */
.welcome { --night: #152e39; --lime: #d5ee78; --cream: #f5f3ed; max-width: 1600px; margin: auto; }
.welcome-header { display: flex; align-items: center; justify-content: space-between; padding: 22px clamp(20px, 5vw, 80px); gap: 24px; border-bottom: 1px solid var(--line); }
.wordmark { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 9px; color: var(--ink); font-weight: 950; text-decoration: none; letter-spacing: -.04em; font-size: 29px; line-height: 1; }
.wordmark span { border-left: 2px solid currentColor; padding-left: 10px; font-size: 13px; letter-spacing: .04em; line-height: 1.2; max-width: 95px; }
.welcome-header nav { display: flex; align-items: center; gap: 25px; }
.welcome-header nav a:not(.btn) { color: var(--ink); font-size: 14px; text-decoration: none; padding-block: 10px; }
.welcome-hero { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(30px, 5vw, 80px); padding: clamp(36px, 6vw, 88px) clamp(20px, 5vw, 80px); }
.hero-copy { align-self: center; }
.hero-copy .eyebrow { max-width: 370px; margin-bottom: 24px; color: var(--action); }
.hero-copy h1 { font-size: clamp(48px, 5.65vw, 86px); font-weight: 950; line-height: .97; letter-spacing: -.065em; margin: 0 0 28px; }
.hero-copy h1 span { color: var(--action); }
.hero-intro { font-size: clamp(17px, 1.5vw, 21px); max-width: 540px; margin-bottom: 25px; }
.hero-copy .btn.primary { background: var(--night); color: var(--cream); border-color: var(--night); gap: 22px; }
.hero-footnote { font-size: 12px; color: var(--muted); margin: 20px 0 0; }
.day-poster { color: var(--cream); background: var(--night); padding: clamp(22px, 3vw, 45px); border-radius: 4px 44px 4px 4px; position: relative; box-shadow: 12px 12px 0 var(--lime); align-self: center; transform: rotate(1deg); }
.poster-heading, .poster-bottom { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 10px; font-weight: 800; letter-spacing: .09em; }
.poster-dot { width: 13px; height: 13px; border-radius: 50%; background: var(--lime); }
.poster-day { font-size: clamp(48px, 5.2vw, 78px); font-weight: 850; line-height: .94; letter-spacing: -.05em; margin: 28px 0; }
.poster-day em { color: var(--lime); font-family: Georgia, serif; font-weight: 500; }
.poster-row { display: flex; gap: 14px; padding: 16px 0; border-top: 1px solid #48616b; }
.poster-row small { display: block; color: #c1cdd0; font-size: 12px; }
.poster-check { color: var(--lime); font-size: 23px; line-height: 1.2; }
.poster-row.open { color: var(--lime); }
.poster-bottom { margin-top: 20px; border-top: 1px solid #48616b; padding-top: 20px; font-size: 8px; }
.poster-caption { color: #c1cdd0; font-size: 10px; margin: 14px 0 0; }
.belief-strip { background: var(--lime); color: var(--night); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; padding: 20px clamp(20px, 5vw, 80px); font-size: 14px; }
.welcome-section { padding: 72px clamp(20px, 5vw, 80px); display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(30px, 5vw, 80px); scroll-margin-top: 20px; }
.section-heading h2, .join-section h2 { font-size: clamp(34px, 3.9vw, 56px); line-height: 1.04; letter-spacing: -.055em; font-weight: 850; margin: 20px 0; }
.section-heading > p:last-child { color: var(--muted); }
.how-list { margin: 0; padding: 0; list-style: none; }
.how-list li { display: flex; gap: 22px; padding: 22px 0; border-top: 1px solid var(--line); }
.how-list li > span { color: var(--action); font-size: 12px; font-weight: 800; padding-top: 3px; }
.how-list h3 { font-size: 21px; letter-spacing: -.02em; margin-bottom: 8px; }
.how-list p { font-size: 15px; color: var(--muted); }
.reward-pitch { margin: 0 clamp(20px, 5vw, 80px); padding: clamp(24px, 4vw, 56px); background: var(--night); color: var(--cream); display: grid; grid-template-columns: 1fr 1fr; gap: 48px; border-radius: 4px; }
.reward-pitch h2 { font-size: clamp(33px, 3.6vw, 54px); line-height: 1; letter-spacing: -.045em; font-weight: 900; margin-top: 24px; }
.reward-pitch h2 span, .reward-pitch a { color: var(--lime); }
.reward-pitch > div:last-child { align-self: center; }
.week-path { display: flex; gap: 8px; margin-top: 28px; }
.week-path > span { flex: 1; border-top: 3px solid var(--lime); padding-top: 10px; font-size: 26px; font-weight: 800; }
.week-path small { color: #c1cdd0; font-size: 8px; letter-spacing: .05em; }
.connection-note { border-left: 5px solid #bd6d43; background: var(--card); padding: 35px; align-self: center; }
.connection-note h3 { font-family: Georgia, serif; font-weight: 400; font-size: clamp(32px, 3vw, 45px); line-height: 1.1; margin: 24px 0; }
.join-section { padding: 64px clamp(20px, 5vw, 80px); background: var(--soft); display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.join-section h2 span { color: var(--action); }
.join-section > div > p { max-width: 480px; }
.login-card { background: var(--card); border: 1px solid var(--line); padding: clamp(20px, 3vw, 40px); border-radius: 16px; width: 100%; max-width: 480px; justify-self: end; }
.login-card h2 { font-size: 26px; margin: 0 0 24px; }
.login-card .text-link { font-size: 13px; margin-top: 12px; }
.welcome-footer { padding: 28px clamp(20px, 5vw, 80px); display: flex; justify-content: space-between; align-items: center; gap: 24px; font-size: 13px; }
.welcome-footer p { margin: 0; color: var(--muted); }
.builder-hero { background: #152e39; color: #f5f3ed; padding: clamp(24px, 5vw, 40px); border-radius: 4px 26px 4px 4px; margin-bottom: 20px; }
.builder-hero h2 { font-size: clamp(32px, 6vw, 48px); font-weight: 900; letter-spacing: -.045em; line-height: 1.04; margin: 18px 0; }
.builder-hero h2 span, .builder-hero a { color: #d5ee78; }
.builder-hero p { max-width: 540px; }
.setup-summary { display: flex; flex-wrap: wrap; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); margin-bottom: 12px; font-size: 12px; }
.setup-summary b { font-size: 22px; margin-right: 4px; }
.build-steps { list-style: none; padding: 0; margin: 28px 0; }
.build-steps > li { display: flex; align-items: flex-start; gap: 18px; padding: 24px 0; border-top: 1px solid var(--line); }
.step-number { display: inline-flex; align-items: center; justify-content: center; min-width: 35px; height: 35px; background: var(--soft); color: var(--action); border-radius: 50%; font-weight: 800; }
.build-steps h3 { font-size: 22px; letter-spacing: -.025em; }
.build-steps p { color: var(--muted); }
.build-steps .note { margin-top: 14px; }
.builder-note { padding: 24px; background: var(--soft); border-left: 4px solid var(--action); }
.guide-page { max-width: 1120px; padding: 32px 20px 70px; margin: auto; }
.guide-intro { max-width: 760px; margin: 20px 0 40px; }
.guide-intro h1 { font-size: clamp(38px, 6vw, 66px); font-weight: 900; letter-spacing: -.05em; line-height: 1.03; margin: 18px 0; }
.guide-layout { display: grid; grid-template-columns: 220px 1fr; gap: 40px; align-items: start; }
.guide-toc { position: sticky; top: 20px; border-top: 3px solid var(--action); padding-top: 15px; }
.guide-toc a { display: block; padding: 9px 0; font-size: 14px; text-decoration: none; }
.guide-content section { padding: 6px 0 30px; margin-bottom: 22px; border-bottom: 1px solid var(--line); scroll-margin-top: 20px; }
.guide-content h2 { font-size: 28px; letter-spacing: -.03em; margin-bottom: 16px; }
.guide-content li { padding-bottom: 12px; }
.guide-content ol, .guide-content ul { padding-left: 22px; }
.guide-content details { border-top: 1px solid var(--line); padding: 16px 0; }
.guide-content summary { cursor: pointer; font-weight: 700; }
.guide-content details p { margin-top: 12px; }
.guide-example { background: var(--soft); padding: 20px; margin: 18px 0; border-radius: 10px; }
.guide-content .btnrow { margin-top: 20px; }
.bucket-control { display: flex; align-items: center; gap: 14px; border: 1px solid var(--line); border-radius: 14px; padding: 12px 18px; background: var(--card); color: var(--ink); cursor: pointer; text-align: left; margin: 0 0 16px auto; max-width: 100%; }
.bucket-control > span:last-child > b { display: block; letter-spacing: .07em; font-size: 11px; }
.bucket-control small { display: block; font-size: 12px; }
.bucket-art { height: 60px; width: 56px; border: 3px solid var(--ink); border-radius: 6px 6px 14px 14px; position: relative; display: flex; align-items: center; justify-content: center; background: var(--soft); overflow: hidden; flex-shrink: 0; transform: rotate(-3deg); }
.bucket-art > b { z-index: 1; color: #152e39; background: #f5f3eddd; font-size: 14px; padding: 2px 4px; border-radius: 4px; }
.bucket-fill { position: absolute; left: 0; right: 0; bottom: 0; background: #d5ee78; transition: height .6s ease; }
.reward-weeks { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; margin-top: 20px; }
.reward-weeks > div { display: flex; flex-direction: column; gap: 3px; background: var(--soft); padding: 12px; border-radius: 8px; }
.reward-weeks > div.met { background: var(--ok-soft); }
.reward-weeks b { font-size: 24px; }.reward-weeks span { font-weight: 700; font-size: 12px; }.reward-weeks small { font-size: 11px; }
.catchup-nudge { padding: 14px 18px; margin-bottom: 18px; border-left: 4px solid #bb7843; background: var(--warn-soft); border-radius: 0 8px 8px 0; }.catchup-nudge p { font-size: 13px; margin: 5px 0 8px; }
.reward-current .bucket-control { margin-left: 0; }.reward-rules { margin-top: 22px; }.reward-rules li { margin-bottom: 10px; }
.challenge-line { padding: 12px 0; border-top: 1px solid var(--line); }
.share-picks { border: 1px solid var(--line); padding: 12px; margin: 16px 0; border-radius: 8px; }.share-picks label, .share-check { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; }.share-picks input,.share-check input { flex-shrink: 0; }.share-code { padding: 14px; margin-top: 16px; background: var(--soft); border-radius: 8px; }
.report-preview { max-height: 55vh; overflow: auto; border: 1px solid var(--line); padding: 16px; margin: 16px 0; }.report-heading { margin-bottom: 24px; }.report-goal { padding: 12px 0; border-top: 1px solid var(--line); }.report-goal small { display: block; }
@media(prefers-reduced-motion:reduce){.bucket-fill{transition:none}}
@media print {.print-controls{display:none}.report-goal{break-inside:avoid}.main{max-width:none;padding:0}@page{size:letter;margin:.6in}}
@media (max-width: 740px) {
  .welcome-hero, .welcome-section, .reward-pitch, .join-section { grid-template-columns: 1fr; }
  .welcome-hero { padding-bottom: 48px; }
  .hero-copy h1 { font-size: clamp(46px, 11vw, 78px); }
  .day-poster { max-width: 560px; width: calc(100% - 12px); transform: none; }
  .poster-day { font-size: 62px; }
  .welcome-header { align-items: flex-start; padding-block: 18px; }
  .welcome-header nav { gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
  .welcome-header nav a:not(.btn) { font-size: 12px; }
  .welcome-header .wordmark { min-width: 105px; }
  .welcome-header .wordmark span { max-width: 65px; font-size: 10px; }
  .welcome-section { padding-block: 45px; gap: 20px; }
  .belief-strip { font-size: 12px; }
  .reward-pitch { gap: 24px; }
  .join-section { gap: 28px; padding-block: 40px; }
  .login-card { justify-self: stretch; max-width: none; }
  .welcome-footer { align-items: flex-start; flex-direction: column; gap: 14px; }
  .guide-layout { grid-template-columns: 1fr; gap: 28px; }
  .guide-toc { position: static; display: flex; flex-wrap: wrap; gap: 4px 20px; }
  .guide-toc h2 { width: 100%; }
}
@media (max-width: 520px) {
  .topbar { flex-wrap: wrap; }
  .topbar .brand { flex-basis: calc(100% - 56px); order: 0; }
  .topbar > .iconbtn { order: 1; }
  .topbar .header-tools { order: 2; }
  .schedule-welcome { align-items: flex-start; flex-direction: column; }
}
@media print {
  .welcome-header nav, .guide-toc, .guide-content .btnrow, .welcome-footer { display: none; }
  .guide-layout { display: block; }
  .guide-content section { break-inside: avoid; }
}

/* layout */
.app { min-height: 100dvh; display: flex; flex-direction: column; }
.topbar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: var(--paper); border-bottom: 1px solid var(--line); padding-block: 12px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); display: flex; align-items: center; gap: 12px; }
.topbar .brand { flex: 1; min-width: 0; }
.topbar .brand small { display: block; font-size: 13px; }
.iconbtn { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; font-size: 20px; cursor: pointer; flex-shrink: 0; }
.main { flex: 1; padding-block: 16px calc(var(--nav-h) + 24px); padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); max-width: 760px; width: 100%; margin: 0 auto; }
.bottomnav { position: fixed; left: 0; right: 0; bottom: 0; height: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px)); background: var(--card); border-top: 1px solid var(--line); display: flex; z-index: 5; padding-bottom: env(safe-area-inset-bottom, 0px); padding-left: env(safe-area-inset-left, 0px); padding-right: env(safe-area-inset-right, 0px); }
.bottomnav button { flex: 1; border: 0; background: none; color: var(--muted); font-size: 12px; font-weight: 500; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; cursor: pointer; padding: 6px 2px; }
.bottomnav button .ic { font-size: 22px; line-height: 1; }
.bottomnav button[aria-current="page"] { color: var(--action); }
.bottomnav button span:last-child, .bottomnav button { white-space: nowrap; }
@media (min-width: 760px) {
  .bottomnav { left: 50%; right: auto; transform: translateX(-50%); width: 760px; height: 56px; border: 1px solid var(--line); border-bottom: 0; border-radius: var(--radius) var(--radius) 0 0; }
  .bottomnav button { flex-direction: row; gap: 8px; font-size: 15px; }
}

/* cards & lists */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 0 0 14px; }
.card.tight { padding: 12px 14px; }
.row { display: flex; gap: 12px; align-items: center; }
.row.between { justify-content: space-between; }
.row.top { align-items: flex-start; }
.grow { flex: 1; min-width: 0; }
.stack > * + * { margin-top: 10px; }
.tag { display: inline-block; background: var(--soft); color: var(--ink); padding: 3px 9px; border-radius: 6px; font-size: 13px; margin: 6px 6px 0 0; }
.tag.done { background: var(--ok-soft); color: var(--ok); }
.tag.partial { background: var(--warn-soft); color: var(--warn); }
.tag.skipped { text-decoration: line-through; }
.tag.optional { color: var(--optional); border: 1px dashed var(--line); background: transparent; }
.tag.fixed { border: 1px solid var(--line); background: transparent; }
.chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; background: var(--card); font-size: 14px; cursor: pointer; color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--action); color: var(--action-text); border-color: var(--action); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 12px; }

/* schedule */
.daystrip { display: grid; grid-template-columns: 32px repeat(7, 1fr) 32px; gap: 4px; align-items: stretch; margin: 0 0 14px; }
.daystrip button { border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 10px; padding: 6px 0; min-height: 56px; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 13px; }
.daystrip button b { font-size: 17px; font-weight: 600; }
.daystrip button .dots { font-size: 10px; letter-spacing: 1px; color: var(--muted); }
.daystrip button[aria-pressed="true"] { background: var(--action); color: var(--action-text); border-color: var(--action); }
.daystrip button[aria-pressed="true"] .dots { color: var(--action-text); }
.daystrip button.today { outline: 2px solid var(--action); outline-offset: -2px; }
.daystrip .arrow { font-size: 18px; min-height: 56px; padding: 0; }
.block { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); margin: 0 0 10px; cursor: pointer; }
.block:active { background: var(--soft); }
.block .time { width: 84px; flex-shrink: 0; font-size: 14px; color: var(--muted); line-height: 1.3; padding-top: 2px; }
.block .time b { display: block; color: var(--ink); font-size: 15px; }
.block .title { font-size: 17px; font-weight: 600; }
.block .grow > small { display: block; }
.block.done .title { color: var(--ok); }
.block.skipped .title, .block.optional .title { color: var(--muted); }
.block.skipped .title { text-decoration: line-through; }
.block.sleep { background: transparent; border-style: dashed; }
.block .check { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line); flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; font-size: 16px; margin-top: 3px; }
.block.done .check { background: var(--ok); border-color: var(--ok); color: #fff; }
.block.partial .check { border-color: var(--warn); color: var(--warn); }
.progress { height: 8px; background: var(--soft); border-radius: 4px; overflow: hidden; margin: 6px 0; }
.progress > i { display: block; height: 100%; background: var(--action); border-radius: 4px; }
.progress.met > i { background: var(--ok); }

/* forms */
label.field { display: block; margin: 0 0 14px; font-weight: 600; font-size: 14px; }
label.field > span { display: block; margin-bottom: 6px; }
input:not([type=checkbox]):not([type=radio]), select, textarea { width: 100%; min-width: 0; border: 1px solid var(--line); border-radius: 9px; padding: 11px 12px; background: var(--card); color: var(--ink); font: 400 16px/1.4 inherit; font-family: inherit; }
textarea { resize: vertical; min-height: 96px; }
input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--action); margin: 0; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 380px) { .pair { grid-template-columns: 1fr; } }
.btn { border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; background: var(--card); color: var(--ink); font-weight: 600; cursor: pointer; min-height: 44px; }
.btn.primary { background: var(--action); color: var(--action-text); border-color: var(--action); }
.btn.danger { color: var(--error); }
.btn.block { width: 100%; display: block; }
.btn.small { padding: 8px 12px; min-height: 36px; font-size: 14px; font-weight: 500; }
.btn:disabled { opacity: .5; cursor: default; }
.btnrow { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.btnrow .btn { flex: 1 1 auto; }
.error { color: var(--error); font-size: 14px; margin: 6px 0 10px; }
.note { color: var(--muted); font-size: 14px; margin: 6px 0 10px; }
.status { color: var(--muted); font-size: 14px; min-height: 1.2em; margin: 8px 0 0; }
.daysel { display: flex; gap: 6px; margin: 6px 0 14px; }
.daysel button { flex: 1; border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 8px; padding: 8px 0; font-size: 14px; cursor: pointer; min-height: 40px; }
.daysel button[aria-pressed="true"] { background: var(--action); color: var(--action-text); border-color: var(--action); }
.mic { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; }
.mic .btn.small[aria-pressed="true"] { background: var(--error); color: #fff; border-color: var(--error); }

/* sheet (bottom dialog) */
.sheet-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 20; display: flex; align-items: flex-end; justify-content: center; }
.sheet { background: var(--paper); width: 100%; max-width: 560px; max-height: 92dvh; overflow: auto; border-radius: 18px 18px 0 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); }
@media (min-width: 600px) { .sheet-backdrop { align-items: center; } .sheet { border-radius: 18px; } }
.sheet h2 { margin-bottom: 4px; }
.actions { display: grid; gap: 10px; margin-top: 12px; }
.actions .btn { text-align: left; }

/* auth */
.auth { max-width: 420px; margin: 8vh auto 0; }
.auth h1 { font-size: 26px; margin-bottom: 4px; }

/* goals */
.goal { padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); margin: 0 0 10px; }
.goal .title { font-size: 17px; font-weight: 600; }
.goal.paused { opacity: .6; }

.weekbar { display: grid; grid-template-columns: 44px 1fr 110px; gap: 10px; align-items: center; padding: 6px 0; font-size: 14px; }
.weekbar .bar { height: 10px; background: var(--soft); border-radius: 5px; overflow: hidden; position: relative; }
.weekbar .bar i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--action); }
.weekbar .bar i.plan { background: var(--line); }
.weekbar .nums { text-align: right; color: var(--muted); }
.toast { position: fixed; left: 50%; bottom: calc(var(--nav-h) + 16px); transform: translateX(-50%); background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 10px; font-size: 14px; z-index: 30; max-width: 90vw; }
@media (min-width: 760px) { .toast { bottom: 24px; } }
.spinner { text-align: center; padding: 40px; color: var(--muted); }
.sample-row { display: grid; grid-template-columns: 120px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.sample-row small { display: block; }
@media (max-width: 380px) { .sample-row { grid-template-columns: 1fr; gap: 2px; } }
table.simple { width: 100%; border-collapse: collapse; font-size: 14px; }
table.simple td, table.simple th { padding: 8px 6px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }

/* These follow the base flex shorthand so the phone header cannot collapse. */
@media (max-width: 600px) {
  .app .topbar { flex-wrap: wrap; gap: 10px; }
  .app .topbar .brand { flex: 1 1 calc(100% - 60px); order: 0; }
  .app .topbar .brand h1 { font-size: 18px; }
  .app .topbar .brand small { font-size: 11px; }
  .app .topbar > .iconbtn { order: 1; }
  .app .topbar .header-tools { flex: 0 0 100%; order: 2; }
  .app .header-tools > * { flex: 1; text-align: center; }
}

/* Member-supplied artwork stays visible behind the plan, never over its text. */
.app:is([data-view="schedule"], [data-view="sample"]) {
  position: relative;
  isolation: isolate;
  --muted: #495b65;
  --optional: #495b65;
}
.app:is([data-view="schedule"], [data-view="sample"])::before {
  content: "";
  position: fixed;
  inset: 78px 0 58px;
  z-index: -1;
  pointer-events: none;
  background: url('./assets/rlm-dogs-watermark.jpg') center 42% / min(1100px, 108vw) auto no-repeat;
  mix-blend-mode: multiply;
  opacity: .96;
}
.app:is([data-view="schedule"], [data-view="sample"]) .main > .card,
.app[data-view="schedule"] .main > .block {
  background: rgb(255 254 250 / .54);
  border-color: #bccbd1;
  box-shadow: 0 2px 9px rgb(21 46 57 / .035);
}
.app[data-view="schedule"] .main > .block:active { background: rgb(227 237 239 / .88); }
.app[data-view="schedule"] .main > .block.sleep { background: rgb(255 254 250 / .28); }
.app[data-view="schedule"] .main > .note,
.app[data-view="sample"] .main > .note {
  background: rgb(245 243 237 / .75);
  border-radius: 6px;
  padding: 6px 8px;
}
:root[data-theme="dark"] .app:is([data-view="schedule"], [data-view="sample"]) {
  --muted: #d3e0e5;
  --optional: #d3e0e5;
}
:root[data-theme="dark"] .app:is([data-view="schedule"], [data-view="sample"])::before {
  filter: invert(1) grayscale(1);
  mix-blend-mode: screen;
  opacity: .55;
}
:root[data-theme="dark"] .app:is([data-view="schedule"], [data-view="sample"]) .main > .card,
:root[data-theme="dark"] .app[data-view="schedule"] .main > .block {
  background: rgb(25 43 53 / .67);
  border-color: #69808b;
}
:root[data-theme="dark"] .app[data-view="schedule"] .main > .note,
:root[data-theme="dark"] .app[data-view="sample"] .main > .note { background: rgb(23 37 44 / .84); }
@media (max-width: 600px) {
  .app:is([data-view="schedule"], [data-view="sample"])::before {
    inset: 112px 0 62px;
    background-size: max(520px, 110vw) auto;
    background-position: 55% 35%;
  }
}
@media print, (forced-colors: active) {
  .app:is([data-view="schedule"], [data-view="sample"])::before { display: none; }
  .app:is([data-view="schedule"], [data-view="sample"]) .main > .card,
  .app[data-view="schedule"] .main > .block { background: var(--card); }
}

.account-controls{display:flex;align-items:center;justify-content:flex-end;gap:14px;flex-wrap:wrap;padding:10px 24px;border-bottom:1px solid var(--line,#d7ddd8);background:var(--paper,#f6f6ed);color:var(--ink,#152e39);font-size:13px}
.account-controls>span{min-width:0;overflow-wrap:anywhere}.account-controls .account-signout{min-height:44px;flex-shrink:0;font-weight:750;border:2px solid currentColor;background:transparent;color:inherit}.signed-out-note{padding:12px 16px;border-left:4px solid #7f9a36;background:#edf3db;color:#152e39;font-size:14px;line-height:1.6}.welcome-login .account-controls{padding:10px 0}.account-controls[hidden]{display:none!important}
@media(max-width:600px){.account-controls{padding:8px 16px;gap:10px;justify-content:space-between}.account-controls>span{flex:1;font-size:12px}.account-controls .account-signout{padding:8px 12px}}
