/* The live home screen on the landing page. Sizes inside .lp-screen are iOS points
   (an iPhone 17 Pro is 402 wide); the screen is scaled to fit its frame. */
:root {
  --q-do-first-fill: #C86556;
  --q-schedule-fill: #418AD1;
  --q-delegate-fill: #239D6A;
  --q-drop-fill: #868686;
}

@media (prefers-color-scheme: dark) {
  :root {
    --q-do-first-fill: #E68677;
    --q-schedule-fill: #67AAED;
    --q-delegate-fill: #57BC8A;
    --q-drop-fill: #9A9A9A;
  }
}

.q-doFirst { --qfill: var(--q-do-first-fill); --qink: var(--do-first); --qtint: var(--do-first-tint); }
.q-schedule { --qfill: var(--q-schedule-fill); --qink: var(--schedule); --qtint: var(--schedule-tint); }
.q-delegate { --qfill: var(--q-delegate-fill); --qink: var(--delegate); --qtint: var(--delegate-tint); }
.q-drop { --qfill: var(--q-drop-fill); --qink: var(--drop); --qtint: var(--drop-tint); }

/* Stage: a plain block on desktop; on phones it pins the screen while it grows. */
.lp-stage { justify-self: center; width: 100%; max-width: 300px; }
.lp-sticky { display: flex; justify-content: center; }
.lp-device {
  position: relative;
  width: 100%;
  aspect-ratio: 402 / 874;
  border-radius: 40px;
  overflow: hidden;
  background: var(--background);
  box-shadow: 0 0 0 1px var(--hairline), 0 30px 60px -30px rgba(0, 0, 0, 0.35);
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  isolation: isolate;
}
.lp-device.is-pointer-hidden, .lp-device.is-pointer-hidden * { cursor: none !important; }
.lp-fallback { display: block; }
.lp-fallback img { display: block; width: 100%; height: auto; border-radius: 40px; border: 1px solid var(--hairline); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.35); }
.lp-stage.is-live .lp-fallback { display: none; }

.lp-caption { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 16px; font-size: 13px; color: var(--tertiary-ink); text-align: center; }
.lp-sound { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 0; border-radius: 999px; background: var(--fill); color: var(--secondary-ink); font: inherit; font-weight: 600; cursor: pointer; }
.lp-sound:hover { color: var(--ink); }
.lp-sound:focus-visible { outline: 2px solid var(--schedule); outline-offset: 2px; }
.lp-sound svg { width: 15px; height: 15px; }

@media (max-width: 760px) {
  .lp-stage.is-live { justify-self: stretch; max-width: none; width: auto; margin: -24px -20px 0; }
  .lp-stage.is-live .lp-sticky { position: sticky; top: 0; height: 100vh; height: 100dvh; align-items: center; overflow: hidden; }
  .lp-stage.is-live .lp-device { flex: none; aspect-ratio: auto; }
  .lp-stage.is-live .lp-caption { display: none; }
}

/* Screen */
.lp-screen {
  position: absolute;
  left: 0;
  top: 0;
  width: 402px;
  transform-origin: 0 0;
  overflow: hidden;
  background: var(--background);
  color: var(--ink);
  font: 17px/1.3 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  letter-spacing: -0.2px;
  touch-action: pan-y;
  --lp-status: 54px;
  --lp-safe: 34px;
}
.lp-screen * { box-sizing: border-box; }
.lp-screen [hidden] { display: none !important; }
:where(.lp-screen button) { font: inherit; letter-spacing: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; text-align: inherit; -webkit-tap-highlight-color: transparent; }
:where(.lp-screen button):focus { outline: none; }
:where(.lp-screen button):focus-visible { outline: 2px solid var(--q-schedule-fill); outline-offset: 2px; border-radius: 12px; }
.lp-screen svg { display: block; }

.lp-press { transition: scale 0.18s cubic-bezier(0.25, 1, 0.5, 1); }
.lp-press:active, .lp-press.is-pressed { scale: var(--press, 0.97); }

.lp-status { position: relative; height: var(--lp-status); flex: none; display: flex; align-items: center; justify-content: space-between; padding: 6px 30px 0 46px; overflow: hidden; }
.lp-time { width: 60px; text-align: center; font-weight: 600; font-size: 17px; letter-spacing: -0.3px; }
.lp-status-icons { display: flex; align-items: center; gap: 6px; color: var(--ink); }

.lp-home { position: absolute; inset: 0; display: flex; flex-direction: column; }

/* Top bar */
.lp-topbar { flex: none; display: flex; align-items: center; gap: 8px; min-height: 54px; padding: 6px 20px 4px; }
.lp-unsorted { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px 0 7px; border-radius: 999px; background: var(--ink); color: var(--surface); font-size: 15px; font-weight: 600; white-space: nowrap; transform-origin: left center; --press: 0.95; }
.lp-unsorted .lp-count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 999px; background: var(--surface); color: var(--ink); font-size: 13px; }
.lp-flex { flex: 1; }
.lp-icon { width: 44px; height: 44px; display: grid; place-items: center; }
.lp-icon > span { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--fill); color: var(--secondary-ink); }

/* Ladder */
.lp-scroll { position: relative; flex: 1; min-height: 0; padding: 4px 0 12px; }
.lp-ladder { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 0 16px; }
.lp-rung { position: relative; border-radius: 24px; }
.lp-rung-bg, .lp-rung-flash, .lp-wash { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; }
.lp-rung-bg { background: var(--surface); }
.lp-rung.quiet > .lp-rung-bg { opacity: 0.55; }
.lp-rung-flash { background: var(--qtint); opacity: 0; }
.lp-rung-body { position: relative; display: flex; flex-direction: column; }
.lp-rung.task.large > .lp-rung-body { padding: 16px 18px 18px; gap: 14px; }
.lp-rung.task.medium > .lp-rung-body { padding: 14px 16px 16px; gap: 11px; }
.lp-rung.delegate > .lp-rung-body { padding: 13px 16px; gap: 6px; }
.lp-rung.count > .lp-rung-body { padding: 12px 16px; }

.lp-head { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 28px; --press: 0.98; }
.lp-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--qfill); }
.lp-qtitle { flex: none; font-size: 13px; font-weight: 600; color: var(--qink); white-space: nowrap; }
.lp-rung.task .lp-qtitle { font-size: 15px; }
.lp-detail { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; letter-spacing: 0; color: var(--tertiary-ink); }
.lp-head .lp-flex { min-width: 8px; }
.lp-countwrap { flex: none; display: flex; align-items: center; gap: 3px; color: var(--tertiary-ink); }
.lp-head .lp-count { font-size: 15px; font-weight: 700; color: var(--ink); }
.lp-head .lp-count.muted { color: var(--tertiary-ink); }
.lp-count { display: inline-grid; font-variant-numeric: tabular-nums; }
.lp-count > span { grid-area: 1 / 1; text-align: center; }
.lp-streak { flex: none; padding: 2px 7px; border-radius: 999px; background: var(--qtint); color: var(--qink); font-size: 11px; font-weight: 700; letter-spacing: 0; white-space: nowrap; }

/* Task rows */
.lp-row { position: relative; }
.lp-row-body { position: relative; display: flex; align-items: center; gap: 12px; min-height: 24px; }
.lp-rung.medium .lp-row-body { gap: 10px; min-height: 20px; }
.lp-row-tint { position: absolute; inset: -4px -8px; border-radius: 12px; background: var(--qtint); opacity: 0; pointer-events: none; }
.lp-check { position: relative; flex: none; width: 24px; height: 24px; }
.lp-rung.medium .lp-check { width: 20px; height: 20px; }
.lp-check::after { content: ""; position: absolute; inset: -10px; }
.lp-check-ring, .lp-check-fill { position: absolute; inset: 0; border-radius: 50%; }
.lp-check-ring { border: 1.75px solid var(--tertiary-ink); }
.lp-check-fill { background: var(--qfill); scale: 0.01; }
.lp-check svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.lp-check path { fill: none; stroke: #fff; stroke-width: 2.64; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.lp-burst { position: absolute; left: 50%; top: 50%; width: 120px; height: 120px; margin: -60px 0 0 -60px; pointer-events: none; z-index: 3; }
.lp-row-title { position: relative; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 17px; text-align: left; }
.lp-rung.medium .lp-row-title { font-size: 15px; }
.lp-pill { position: relative; flex: none; padding: 0 8px; min-height: 22px; line-height: 22px; border-radius: 999px; font-size: 12px; font-weight: 600; letter-spacing: 0; white-space: nowrap; }
.lp-pill.hot { background: var(--q-do-first-fill); color: var(--background); }
.lp-pill.warm { background: var(--do-first-tint); color: var(--do-first); }
.lp-pill.calm { background: var(--fill); color: var(--secondary-ink); }
.lp-pill.blue { background: var(--schedule-tint); color: var(--schedule); }
.lp-speed { position: absolute; left: 36px; top: 50%; margin-top: -8px; display: flex; flex-direction: column; gap: 12px; opacity: 0; transform-origin: right center; pointer-events: none; }
.lp-rung.medium .lp-speed { left: 32px; }
.lp-speed i { display: block; width: 150px; height: 2px; border-radius: 1px; background: linear-gradient(90deg, transparent, var(--qfill)); }
.lp-more { align-self: flex-start; min-height: 28px; margin: -4px 0 0 36px; font-size: 13px; font-weight: 600; color: var(--qink); --press: 0.94; }

.lp-dline { display: flex; align-items: baseline; gap: 6px; }
.lp-dline .who { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; color: var(--secondary-ink); }
.lp-dline .wait { flex: none; font-size: 12px; font-weight: 600; letter-spacing: 0; color: var(--delegate); }

/* Do First is clear */
.lp-rung.cleared { z-index: 2; }
.lp-wash { background: var(--delegate-tint); opacity: 0; transform-origin: left center; }
.lp-cleared-body { position: relative; display: flex; align-items: center; gap: 10px; padding: 13px 16px; }
.lp-stamp { position: relative; flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--q-delegate-fill); color: #fff; display: grid; place-items: center; }
.lp-confetti { position: absolute; left: 50%; top: 50%; width: 320px; height: 320px; margin: -160px 0 0 -160px; pointer-events: none; }
.lp-cleared-text b { display: block; font-size: 15px; font-weight: 600; }
.lp-cleared-text small { display: block; font-size: 12px; letter-spacing: 0; color: var(--tertiary-ink); }

/* Just added */
.lp-just { margin-top: 18px; }
.lp-just-label { padding: 0 20px; margin-bottom: 4px; font-size: 13px; font-weight: 600; color: var(--tertiary-ink); }
.lp-just-list { display: flex; flex-direction: column; gap: 2px; padding: 0 16px; }
.lp-just-row { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 4px; }
.lp-just-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 16px; }
.lp-just-due { flex: none; font-size: 13px; color: var(--secondary-ink); }
.lp-chip-hit { flex: none; min-height: 44px; display: flex; align-items: center; }
.lp-chip { display: inline-grid; align-items: center; height: 26px; padding: 0 10px; border-radius: 999px; overflow: hidden; background: var(--qtint); color: var(--qink); font-size: 13px; font-weight: 600; letter-spacing: 0; white-space: nowrap; }
.lp-chip.unsorted { background: none; box-shadow: inset 0 0 0 1.5px var(--hairline); color: var(--secondary-ink); }
.lp-chip > span { grid-area: 1 / 1; }

/* Capture field */
.lp-bottom { position: relative; flex: none; padding: 0 12px calc(8px + var(--lp-safe)); }
.lp-bottom::before { content: ""; position: absolute; left: 0; right: 0; top: -16px; bottom: 0; background: linear-gradient(to bottom, transparent, var(--background) 35%); pointer-events: none; }
.lp-field { position: relative; display: flex; align-items: flex-end; gap: 8px; min-height: 52px; padding: 0 4px 0 20px; border-radius: 26px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--hairline), 0 6px 18px rgba(28, 27, 25, 0.06); cursor: text; }
.lp-field-text { position: relative; flex: 1; min-width: 0; height: 52px; padding: 15px 0; }
.lp-input { display: block; width: 100%; height: 22px; padding: 0; margin: 0; border: 0; outline: 0; background: none; color: var(--ink); font: inherit; font-size: 17px; line-height: 22px; letter-spacing: inherit; caret-color: var(--q-schedule-fill); }
.lp-placeholder, .lp-voice { position: absolute; left: 0; right: 0; top: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 17px; line-height: 22px; color: var(--tertiary-ink); pointer-events: none; }
.lp-voice { color: var(--ink); }
.lp-voice .listening { color: var(--tertiary-ink); }
.lp-trail { flex: none; width: 44px; height: 44px; margin-bottom: 4px; display: grid; place-items: center; }
.lp-trail > span { position: relative; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--fill); color: var(--ink); }
.lp-trail.send > span { background: var(--ink); color: var(--surface); }
.lp-trail.stop > span { background: var(--q-do-first-fill); color: #fff; }
.lp-level { position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 0 6px var(--q-do-first-fill); opacity: 0.3; transition: scale 0.1s linear, opacity 0.1s linear; }

/* Undo toast */
.lp-toasts { position: absolute; left: 16px; right: 16px; bottom: calc(100% + 8px); pointer-events: none; }
.lp-toast { position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 8px 0 20px; border-radius: 999px; background: var(--ink); color: var(--surface); box-shadow: 0 6px 24px rgba(0, 0, 0, 0.15); pointer-events: auto; }
.lp-toast-msg { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; font-weight: 500; }
.lp-undo { position: relative; min-height: 36px; padding: 0 16px; border-radius: 999px; background: color-mix(in srgb, var(--surface) 16%, transparent); font-size: 15px; font-weight: 700; --press: 0.94; }
.lp-undo svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.lp-undo rect { fill: none; stroke: var(--surface); stroke-opacity: 0.75; stroke-width: 1.5; stroke-linecap: round; }

/* Capture flight */
.lp-ghost { position: absolute; width: 0; height: 0; pointer-events: none; z-index: 30; }
.lp-ghost span { position: absolute; left: 0; top: -11px; white-space: nowrap; font-size: 17px; line-height: 22px; color: var(--ink); transform-origin: left center; }

/* Sort (full-screen cover) */
.lp-cover { position: absolute; inset: 0; z-index: 20; display: flex; flex-direction: column; background: var(--background); }
.lp-cover[hidden] { display: none; }
.lp-tri-head { flex: none; display: flex; align-items: center; justify-content: space-between; min-height: 50px; padding: 6px 20px 0; }
.lp-tri-title { font-size: 17px; font-weight: 600; }
.lp-done { min-height: 44px; font-size: 17px; font-weight: 600; color: var(--schedule); }
.lp-board { position: relative; flex: 1; }
.lp-corner { position: absolute; width: 150px; height: 112px; margin: -56px 0 0 -75px; padding: 0 18px; border-radius: 26px; background: var(--qtint); color: var(--qink); display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 4px; transition: scale 0.2s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.2s; }
.lp-corner::before { content: ""; position: absolute; inset: -3px; border-radius: 29px; box-shadow: inset 0 0 0 3px var(--qfill); opacity: 0; pointer-events: none; }
.lp-corner.hot { scale: 1.04; }
.lp-corner.hot::before { opacity: 1; }
.lp-corner.dim { opacity: 0.32; pointer-events: none; }
.lp-corner b { font-size: 17px; font-weight: 700; }
.lp-corner small { font-size: 12px; font-weight: 500; letter-spacing: 0; opacity: 0.85; }
.lp-badge { position: absolute; top: 10px; right: 10px; display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--qfill); color: var(--surface); font-size: 12px; font-weight: 700; }
.lp-card-pos { position: absolute; width: 0; height: 0; z-index: 2; }
.lp-card { position: absolute; left: -140px; width: 280px; translate: 0 -50%; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; padding: 22px 22px 20px; border-radius: 28px; background: var(--surface); box-shadow: inset 0 0 0 1px rgba(28, 27, 25, 0.04), 0 24px 48px -12px rgba(0, 0, 0, 0.18); touch-action: none; cursor: grab; }
.lp-card h3 { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -0.4px; line-height: 1.27; }
.lp-axes { display: flex; gap: 6px; }
.lp-axis { min-height: 26px; padding: 0 10px; border-radius: 999px; font-size: 13px; font-weight: 600; letter-spacing: 0; line-height: 26px; white-space: nowrap; }
.lp-axis.known { background: var(--ink); color: var(--surface); }
.lp-axis.unknown { box-shadow: inset 0 0 0 1.5px var(--hairline); color: var(--secondary-ink); }
.lp-hint { font-size: 13px; letter-spacing: 0; color: var(--tertiary-ink); }
.lp-worry { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; margin: 6px 0; padding: 0 12px; border-radius: 999px; background: var(--fill); color: var(--secondary-ink); font-size: 13px; font-weight: 600; letter-spacing: 0; }
.lp-sorted { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 32px; text-align: center; }
.lp-sorted-check { position: relative; width: 48px; height: 48px; }
.lp-sorted-check svg { width: 48px; height: 48px; overflow: visible; }
.lp-sorted-check circle, .lp-sorted-check path { fill: none; stroke: var(--q-delegate-fill); stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.lp-sorted h4 { margin: 0; font-size: 22px; font-weight: 700; }
.lp-sorted p { margin: 0; font-size: 15px; color: var(--secondary-ink); }

/* The fingertip that stands in for the cursor */
.lp-finger { position: absolute; left: 0; top: 0; z-index: 50; width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%; background: rgba(110, 110, 110, 0.3); box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.75), 0 2px 10px rgba(0, 0, 0, 0.2); opacity: 0; pointer-events: none; transition: background-color 0.1s; }
.lp-finger.down { background: rgba(80, 80, 80, 0.45); }
.lp-tap-hint { position: absolute; z-index: 40; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; box-shadow: 0 0 0 2px var(--q-do-first-fill); pointer-events: none; opacity: 0; }
