/* Sunup morning (js/morning.js): the task list, "I want to scroll", ride the wave, the after-Sunup plan, the tuck-in
 * and the honest week. Loaded after app.css; uses its colour variables. */

/* evidence labels used only here: "Small but real" and "Early" (app.css has strong / moderate / fun) */
.evid.small { --dot: #7FB8D6; } .evid.small summary { color: #3F6F8C; }
.evid.early { --dot: #B8AFCB; } .evid.early summary { color: var(--muted); }

/* ---------- Today: "This morning" ---------- */
.mo-list { margin: 10px 0 14px; padding: 12px; }
.mo-list-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 2px 4px 8px; }
.mo-list-head h2 { margin: 0; font-size: var(--fs-xl); }
.mo-list-head .small { font-weight: 800; }
.mo-tasks { display: grid; gap: 6px; }
.mo-task { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: 0; border-radius: 16px; background: var(--cream); font: inherit; color: var(--ink); text-align: left; cursor: pointer; transition: background .15s; }
.mo-task:active { transform: translateY(1px); }
.mo-task .mo-ic { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; background: #fff; font-size: 20px; color: #B2741E; }
.mo-task b { display: block; font-size: var(--fs-md); }
.mo-task small { display: block; color: var(--muted); font-weight: 700; font-size: var(--fs-xs); }
.mo-task .mo-tick { margin-left: auto; flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 2.5px solid #E2CFB4; color: transparent; font-size: 16px; }
.mo-task.done { background: #F2F8EA; }
.mo-task.done b { text-decoration: line-through; text-decoration-color: rgba(58, 51, 80, .35); }
.mo-task.done .mo-ic { color: #5E8C4A; }
.mo-task.done .mo-tick { background: #8DB36B; border-color: #8DB36B; color: #fff; }
.mo-task.busy { background: linear-gradient(180deg, #2B2A5C, #3E3470); color: #fff; }
.mo-task.busy small { color: #CFC8E8; }
.mo-task .mo-n { margin-left: auto; font-size: var(--fs-xs); font-weight: 800; color: var(--muted); white-space: nowrap; }
.mo-fog { display: flex; gap: 10px; align-items: flex-start; margin: 0 2px 10px; padding: 10px 12px; border-radius: 14px; background: #FFF4D6; font-size: var(--fs-sm); font-weight: 700; }
.mo-fog .ico { flex: none; font-size: 20px; color: #B2741E; margin-top: 1px; }
.mo-pledge { margin: 8px 4px 0; font-size: var(--fs-xs); color: var(--muted); font-weight: 700; }

/* "I want to scroll": always there, never loud */
.mo-urge-btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin: 10px 0; padding: 12px 14px; border: 2px dashed #CBBEDF; border-radius: 18px; background: rgba(255, 255, 255, .7); font: inherit; font-weight: 800; color: #5B4F8A; cursor: pointer; }
.mo-urge-btn small { font-weight: 700; color: var(--muted); }
.mo-urge-btn .ico { font-size: 20px; }

/* after Sunup: the plan and "scroll-free so far" */
.mo-plan { display: grid; gap: 8px; text-align: left; }
.mo-plan h3 { margin: 0; }
.mo-plan .mo-line { margin: 0; font-weight: 800; font-size: var(--fs-lg); }
.mo-plan .mo-line .ico { color: #B2741E; }
.mo-free { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: linear-gradient(180deg, #F2F8EA, #E6F1DA); }
.mo-free b { font-size: var(--fs-2xl); font-weight: var(--fw-display); line-height: 1; }
.mo-free small { display: block; color: var(--muted); font-weight: 700; font-size: var(--fs-xs); }
.mo-free.slipped { background: #F4EFF8; }
.mo-check { margin: 0; }
.mo-check .kicker { margin-bottom: 6px; }
.mo-check .chips-row { justify-content: flex-start; margin: 0; }

/* evening: the tuck-in tile */
.mo-tuck-tile { display: flex; align-items: center; gap: 12px; width: 100%; margin: 12px 0; padding: 12px 14px; border: 0; border-radius: 20px; background: linear-gradient(180deg, #2E2B63, #433A7A); color: #fff; box-shadow: 0 3px 0 #1E1D45, var(--shadow); font: inherit; text-align: left; cursor: pointer; }
.mo-tuck-tile b { display: block; font-size: var(--fs-md); }
.mo-tuck-tile small { display: block; color: #CFC8E8; font-weight: 700; font-size: var(--fs-sm); }
.mo-tuck-tile .sunling-solo { flex: none; }

/* Progress: the forgiving week and the honest week */
.mo-week .mo-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin: 10px 0 6px; }
.mo-week .mo-days span { display: grid; justify-items: center; gap: 4px; font-size: var(--fs-xs); font-weight: 800; color: var(--muted); }
.mo-week .mo-days i { display: grid; place-items: center; width: 100%; aspect-ratio: 1; border-radius: 12px; background: #F4EDE2; font-style: normal; font-size: var(--fs-md); color: transparent; }
.mo-week .mo-days i .ico { opacity: 0; }
.mo-week .mo-days .done i { background: #FFE9A8; }
.mo-week .mo-days .done i .ico { opacity: 1; color: #F2A33A; }
.mo-week .mo-days .today i { outline: 2px solid #F2A33A; }
.mo-week .mo-days .future i { background: #FBF7F0; }
.mo-week h3 { margin: 0; }
.mo-week .mo-goal { margin: 0; font-weight: 800; }
.mo-honest h3 { margin: 0 0 2px; }
.mo-bars { display: grid; gap: 6px; margin: 12px 0; }
.mo-bar { display: grid; grid-template-columns: 52px 1fr 64px; align-items: center; gap: 8px; font-size: var(--fs-xs); font-weight: 800; color: var(--muted); }
.mo-bar i { display: block; height: 14px; border-radius: 99px; background: #F4EDE2; overflow: hidden; }
.mo-bar i b { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #F7C948, #F2A33A); }
.mo-bar.now { color: var(--ink); }
.mo-big-num { margin: 6px 0 0; font-size: var(--fs-3xl); font-weight: var(--fw-display); line-height: 1; }
.mo-big-num small { font-size: var(--fs-sm); font-weight: 800; color: var(--muted); }
.mo-facts { list-style: none; padding: 0; margin: 10px 0; display: grid; gap: 6px; }
.mo-facts li { display: flex; justify-content: space-between; gap: 10px; background: var(--cream); padding: 9px 12px; border-radius: 12px; font-weight: 700; font-size: var(--fs-sm); }
.mo-facts li b { white-space: nowrap; }
.mo-ask { margin-top: 10px; }
.mo-more { margin: 8px 0 0; }
.mo-more summary { cursor: pointer; font-size: var(--fs-xs); font-weight: 800; color: var(--muted); list-style: none; display: inline-flex; align-items: center; gap: 4px; }
.mo-more summary::-webkit-details-marker { display: none; }
.mo-more summary::before { content: '›'; display: inline-block; transition: transform .15s; }
.mo-more[open] summary::before { transform: rotate(90deg); }
.mo-more p { margin: 6px 0 0; }
.mo-ask .chips-row { justify-content: flex-start; }
.btnchip[aria-pressed="true"] { background: var(--tab-on); outline: 2px solid var(--btn-edge); }

/* Me: My morning */
.mo-pick { display: grid; gap: 0; }

/* ---------- the sheets (morning.js) ---------- */
.mo-ui { position: fixed; inset: 0; z-index: 70; display: flex; align-items: flex-end; justify-content: center; background: rgba(30, 26, 66, .5); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); animation: fadein .3s ease; }
.mo-sheet { position: relative; width: min(480px, 100%); box-sizing: border-box; background: var(--paper); border-radius: 28px 28px 0 0; padding: 18px 20px calc(20px + env(safe-area-inset-bottom)); box-shadow: var(--shadow-lg); max-height: 100%; overflow-y: auto; animation: mo-up .35s cubic-bezier(.2, .9, .3, 1.15); }
.mo-sheet.center { text-align: center; }
.mo-sheet h2 { margin: 4px 0 6px; font-size: var(--fs-xl); text-align: center; }
.mo-sheet .x { position: absolute; top: 12px; right: 12px; }
.mo-sheet .kicker { margin: 14px 0 8px; }
.mo-sheet .evid { margin: 12px auto; }
.mo-sheet .btn.big { margin-top: 6px; }
.mo-wide { display: flex; width: 100%; justify-content: center; margin: 10px 0 0; }
.mo-hero { display: grid; justify-items: center; }
.mo-sub { color: var(--muted); margin: 0 0 12px; }
.mo-ui .tiny { font-size: var(--fs-xs); color: var(--muted); margin: 8px 0 0; }
.mo-ui .center-block { display: block; margin: 8px auto 0; }
.mo-step { min-height: 2.6em; display: grid; place-items: center; }
.mo-dots { display: flex; justify-content: center; gap: 6px; margin: 0 0 10px; }
.mo-dots i { width: 10px; height: 10px; border-radius: 50%; background: #EADFCF; }
.mo-dots i.on { background: #F2A33A; }
.mo-jump .sunling-solo { animation: mo-jump .7s ease-in-out infinite alternate; transform-origin: 50% 100%; }
.mo-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.mo-chips button, .mo-next button, .mo-swaps button { font: inherit; font-weight: 800; border: 0; border-radius: 14px; background: #fff; color: var(--ink); box-shadow: 0 2px 0 var(--line); cursor: pointer; padding: 9px 12px; font-size: var(--fs-sm); }
.mo-chips button[aria-checked="true"], .mo-chips button[aria-pressed="true"], .mo-next button[aria-checked="true"] { background: var(--tab-on); outline: 2.5px solid var(--btn-edge); }
.mo-next { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mo-next button { display: grid; justify-items: center; gap: 4px; padding: 12px 6px; }
.mo-next button .ico { font-size: 26px; color: #B2741E; }
.mo-swaps { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; text-align: left; margin: 4px 0 6px; }
.mo-swaps button { display: flex; align-items: center; gap: 10px; padding: 12px; }
.mo-swaps button .ico { flex: none; font-size: 24px; color: #5E8C4A; }
.mo-swaps small { display: block; color: var(--muted); font-size: var(--fs-2xs); }
.mo-ifthen { margin: 14px 0 0; padding: 12px 14px; border-radius: 14px; background: #fff; box-shadow: var(--shadow); font-family: var(--font-hand); font-size: var(--fs-lg); line-height: 1.35; color: #4A3B6A; }
.mo-ifthen b { font-weight: 700; color: var(--ink); }
.mo-field { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 10px 0 0; padding: 10px 14px; border-radius: 16px; background: #fff; box-shadow: var(--shadow); font-weight: 800; }
.mo-field input { font: inherit; font-weight: 800; font-size: var(--fs-lg); border: 0; background: var(--cream); border-radius: 10px; padding: 6px 10px; color: var(--ink); }
.mo-field.col { flex-direction: column; align-items: stretch; gap: 8px; }
.mo-field.col input { font-size: var(--fs-md); padding: 10px 12px; }
.mo-faces { display: flex; justify-content: space-between; gap: 4px; margin: 8px 0 4px; }
.mo-faces button { flex: 1; display: grid; justify-items: center; gap: 2px; font: inherit; border: 0; background: #fff; box-shadow: 0 2px 0 var(--line); padding: 8px 2px; border-radius: 14px; cursor: pointer; color: var(--ink); }
.mo-faces span { font-size: var(--fs-2xl); transition: transform .15s; }
.mo-faces small { font-size: var(--fs-2xs); font-weight: 800; }
.mo-faces button[aria-checked="true"] { background: var(--tab-on); outline: 2.5px solid var(--btn-edge); }
.mo-faces button[aria-checked="true"] span { transform: scale(1.15); }
.mo-giftline { margin: 12px 0 0; padding: 10px 14px; border-radius: 16px; background: #FFE9A8; color: #5A3F0E; font-weight: 800; font-size: var(--fs-sm); }
.mo-mood { margin: 12px 0; text-align: center; }
.mo-mood .kicker { margin-bottom: 4px; }
.mo-sheet .toggle { margin-top: 12px; }

/* ride the wave: calm, dim, nothing else to do */
.mo-ui.ride { background: #1B1A45; -webkit-backdrop-filter: none; backdrop-filter: none; align-items: center; }
.mo-ride { width: min(440px, 100%); box-sizing: border-box; padding: calc(20px + env(safe-area-inset-top)) 22px calc(20px + env(safe-area-inset-bottom)); text-align: center; color: #DCD6F2; max-height: 100%; overflow-y: auto; }
.mo-ride .kicker { color: #A9A1CC; }
.mo-ride h2 { margin: 6px 0; font-size: var(--fs-2xl); color: #fff; }
.mo-ride .mo-sub { color: #B9B2D8; }
.mo-ride .link { color: #A9A1CC; }
.mo-wave { position: relative; margin: 10px auto 0; max-width: 340px; padding-top: 34px; }
.mo-wave svg { display: block; width: 100%; height: auto; }
.mo-sea { fill: #3E5C9A; }
.mo-crest { fill: none; stroke: #9FC6E6; stroke-width: 3; stroke-linecap: round; }
.mo-surfer { position: absolute; left: 50%; top: 0; transform: translate(-50%, 20px); transition: none; }
.mo-ride .evid { background: rgba(255, 255, 255, .92); }

/* Sunup closed / goodnight: nearly black, so the phone can be put down */
.mo-ui.closed { background: #12112C; -webkit-backdrop-filter: none; backdrop-filter: none; align-items: center; cursor: pointer; }
.mo-closed { width: min(440px, 100%); padding: 20px 24px; text-align: center; color: #CFC8E8; }
.mo-closed h2 { margin: 8px 0 10px; font-size: var(--fs-2xl); color: #fff; }
.mo-closed .mo-big { font-size: var(--fs-lg); font-weight: 800; color: #FFE39A; margin: 0 0 6px; }
.mo-closed p { margin: 6px 0; }
.mo-closed .mo-hint { margin-top: 22px; font-size: var(--fs-sm); color: #8F88AE; }
.mo-closed.night .mo-big { color: #C5E4F4; }

@keyframes mo-up { from { transform: translateY(24px); opacity: 0; } }
@keyframes mo-jump { from { transform: translateY(0) scale(1, 1); } to { transform: translateY(-10px) scale(1.02, .98); } }
@media (prefers-reduced-motion: reduce) { .mo-sheet, .mo-jump .sunling-solo { animation: none; } }

/* Tuck-in: tomorrow's to-do list ("Tomorrow I will…"), and the "Planned last night" card on Today */
.mo-ui.mo-same, .mo-ui.mo-same .mo-sheet { animation: none; }
.mo-todos > label { display: flex; align-items: center; gap: 6px; }
.mo-todo-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; counter-reset: todo; }
.mo-todo-list li { display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 12px; border-radius: 12px; background: var(--cream); font-weight: 800; counter-increment: todo; }
.mo-todo-list li::before { content: counter(todo); display: grid; place-items: center; flex: none; width: 22px; height: 22px; border-radius: 50%; background: #fff; color: var(--muted); font-size: var(--fs-xs); }
.mo-todo-list li.main::before { background: var(--tab-on); color: var(--ink); }
.mo-todo-list li span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.mo-todo-x { display: grid; place-items: center; flex: none; width: 30px; height: 30px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); font-size: 16px; cursor: pointer; }
.mo-todo-x:hover, .mo-todo-x:focus-visible { background: #fff; color: var(--ink); }
.mo-todo-add { display: flex; gap: 8px; }
.mo-todo-add input { flex: 1; min-width: 0; }
.mo-todo-add .btn { flex: none; padding-inline: 14px; }
.mo-todo-note { color: var(--muted); font-weight: 700; font-size: var(--fs-xs); }
.mo-todo-night ol { margin: 4px 0 0; padding-left: 1.4em; text-align: left; display: inline-block; }
.mo-todo-night p { margin: 0; }
.plan-card { margin: 10px 0; padding: 12px 14px; border-radius: 18px; background: #fff; box-shadow: 0 3px 0 var(--line), var(--shadow); }
.plan-card .row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.plan-card h3 { margin: 0; font-size: var(--fs-md); display: flex; align-items: center; gap: 6px; }
.plan-card .row small { color: var(--muted); font-weight: 800; font-size: var(--fs-xs); white-space: nowrap; }
.plan-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; }
.plan-list label { display: flex; align-items: center; gap: 10px; padding: 7px 4px; border-radius: 10px; font-weight: 800; cursor: pointer; }
.plan-list input { flex: none; width: 22px; height: 22px; accent-color: var(--btn-edge); }
.plan-list li.main label span::after { content: ' · main thing'; color: var(--muted); font-weight: 700; font-size: var(--fs-xs); }
.plan-list li.done label span { color: var(--muted); text-decoration: line-through; }
