/* One photograph, one shared visual language on web and in the Android shell. */
:root {
  --sage: #a3bdb0;
  --sage-dark: #24443f;
  --sage-darker: #102f2d;
  --warm: #a3bdb0;
  --ink: #f1ede2;
  --muted: #d0dfd8;
  --r: 22px;
  --pad: clamp(16px, 3vw, 44px);
  --gap: 24px;
  color-scheme: dark;
}
body, #app { background: #102f2d; color: var(--ink); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: fixed; z-index: 300; left: 16px; top: -100px; padding: 12px 20px; background: var(--ink); color: #102f2d; border-radius: 12px; }
.skip-link:focus { top: 12px; }
#scene-stack { height: 100svh; pointer-events: none; }
#lake-background { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; }
#hero-veil { background: linear-gradient(180deg, transparent 0%, transparent 24%, rgba(7,25,26,.08) 34%, rgba(7,25,26,.58) 52%, rgba(7,25,26,.77) 100%); }
#content {
  max-width: 1480px;
  padding-bottom: 28px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  grid-template-areas: "header header" "quote quote" "timer tasks" "music stats" "account account" "footer footer";
  align-items: start;
  column-gap: clamp(32px, 5vw, 84px);
  row-gap: 24px;
}
.brand-row { grid-area: header; gap: 20px; min-height: 52px; flex-wrap: wrap; color: #102f2d; }
.brand { align-items: center; gap: 10px; flex-shrink: 0; }
.brand-icon { width: 48px; height: 48px; }
.brand-mark { font-size: 25px; font-weight: 650; letter-spacing: -.6px; }
.brand-actions { margin-left: auto; gap: 10px; }
.brand-btn { width: 44px; height: 44px; background: rgba(241,237,226,.85); color: #102f2d; border-color: #102f2d40; font-size: 18px; }
.brand-btn:hover { background: #f1ede2; }
.workspace-nav { display: flex; gap: 8px; margin: 0 auto; }
.workspace-nav button { border: 0; border-radius: 12px; background: rgba(241,237,226,.7); color: #102f2d; padding: 12px 20px; min-height: 44px; cursor: pointer; font-weight: 550; }
.workspace-nav button[aria-current] { background: #102f2d; color: var(--ink); }
.brand-row .save-status { order: 4; width: 100%; text-align: right; margin-top: -8px; color: #102f2d; font-size: 12px; }
.brand-row .save-status[data-error=true] { color: #fff; background: #672e2a; padding: 8px 12px; border-radius: 10px; }
.quote-carousel { grid-area: quote; justify-self: center; justify-content: flex-start; padding-top: 10px; min-height: clamp(156px, 24svh, 250px); }
#main-quote { font-size: clamp(16px, 1.5vw, 21px); font-weight: 450; color: #102f2d; line-height: 1.5; max-width: 560px; text-wrap: balance; text-shadow: 0 1px 10px #ffffff90; }
#main-quote-attr { color: #193e39; font-size: 11px; font-weight: 650; margin-top: 9px; letter-spacing: 1.4px; }
.timer-block { grid-area: timer; gap: 20px; align-self: center; position: relative; padding: 20px 12px; border-radius: 30px; isolation: isolate; }
.timer-block::before { content: ""; position: absolute; inset: -12px -22px; z-index: -1; border-radius: 35%; background: radial-gradient(ellipse, rgba(8,30,31,.66), rgba(8,30,31,.26) 58%, transparent 74%); pointer-events: none; }
.active-strip { order: 0; width: 100%; gap: 8px; }
.active-cap { font-size: 11px; color: var(--muted); letter-spacing: 1.8px; }
#active-task-text { color: var(--ink); font-size: clamp(23px, 2.2vw, 32px); font-weight: 600; line-height: 1.25; overflow-wrap: anywhere; text-wrap: balance; }
#active-task-next { font-size: 16px; line-height: 1.5; color: var(--muted); overflow-wrap: anywhere; }
#active-task-next:empty { display: none; }
#queued-task { font-size: 13px; color: #f1ede2; background: #163833; padding: 8px 12px; border-radius: 10px; }
#btn-choose-task { background: #102f2d80; min-height: 44px; padding: 10px 16px; }
.mode-tags { order: 1; gap: 4px; letter-spacing: 0; font-size: 13px; text-transform: none; padding: 4px; border: 1px solid #d0dfd850; border-radius: 24px; background: #102f2dcf; }
.mode-tag { min-height: 44px; padding: 9px 12px; border-radius: 20px; text-transform: none; letter-spacing: 0; border: 0; color: #e0e8e3; }
.mode-tag.active { background: var(--sage); color: #102f2d; font-weight: 600; }
#timer-display { order: 2; font-size: clamp(80px, 8vw, 126px); font-weight: 250; letter-spacing: -3px; color: var(--ink); }
.timer-actions { order: 3; flex-wrap: wrap; justify-content: center; gap: 10px; }
.t-btn { min-height: 46px; font-size: 14px; background: #102f2ddd; border-color: #d0dfd860; color: var(--ink); }
.t-btn-primary { background: var(--ink); color: #102f2d; font-weight: 650; padding: 13px 40px; min-width: 200px; font-size: 18px; }
.t-btn-icon { min-width: 46px; }
.session-row { order: 4; font-size: 12px; color: #e0e8e3; text-transform: none; letter-spacing: .3px; }
.session-dots .dot { width: 7px; height: 7px; background: #d0dfd860; }
.session-dots .dot.done { background: var(--sage); }
.task-panel { grid-area: tasks; }
.panel { background: rgba(12,40,37,.94); border-color: #c9d8cf40; box-shadow: 0 16px 48px #071a1b20; padding: 24px; backdrop-filter: blur(16px); }
.panel h2 { font-size: 22px; font-weight: 600; letter-spacing: -.3px; }
.panel-hint { color: var(--muted); font-size: 12px; }
.task-tabs { border: 0; background: #ffffff08; border-radius: 16px; padding: 3px; }
.task-tab { min-height: 44px; padding: 10px; text-transform: none; color: var(--muted); font-size: 14px; letter-spacing: 0; border-radius: 13px; }
.task-tab.active { background: var(--sage); color: #102f2d; }
.task-tab.active::after { display: none; }
.task-tab-count { font-size: 12px; opacity: 1; }
.task-add { gap: 8px; }
.task-add input, .task-add select, .task-add button { min-height: 46px; font-size: 14px; border-radius: 12px; }
.task-add input { padding: 10px 12px; }
.task-add input::placeholder { color: #d0dfd8; }
.task-add button { background: var(--sage); color: #102f2d; }
.task-list { max-height: 320px; gap: 8px; }
.task { padding: 10px; gap: 8px; flex-wrap: nowrap; background: #ffffff05; border-left-color: #a3bdb060; }
.task.active { background: #a3bdb028; border-left-color: var(--sage); }
.task-text { font-size: 15px; min-height: 44px; }
.task-check { width: 24px; height: 24px; margin: 10px; }
.task-detail { font-size: 12px; opacity: 1; color: var(--muted); }
.task-edit-btn, .task-del { opacity: 1; width: 44px; min-height: 44px; border-radius: 12px; padding: 10px; color: #d0dfd8; background: #ffffff06; }
.task-focus-btn { min-height: 44px; border: 1px solid #d0dfd860; border-radius: 20px; padding: 8px 12px; background: none; color: var(--ink); font-size: 12px; cursor: pointer; }
.task-more { flex-shrink: 0; }
.task-more summary { display: flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; border-radius: 12px; background: #ffffff06; color: #d0dfd8; font-size: 22px; cursor: pointer; list-style: none; }
.task-more summary::-webkit-details-marker { display: none; }
.task-more[open] { align-self: start; }
.task-menu { display: grid; gap: 4px; margin-top: 4px; }
.task-menu button { width: auto; font-size: 12px; }
.task.done { opacity: .65; }
.empty-tasks { font-size: 14px; color: #d0dfd8; line-height: 1.6; font-style: normal; }
.view-toolbar { flex-wrap: wrap; }
.view-toolbar button, .subtle-btn { min-height: 44px; font-size: 13px; padding: 10px 16px; border-color: #d0dfd84d; color: #e0e8e3; }
.view-toolbar button[aria-pressed=true] { background: var(--sage); color: #102f2d; }
.stats-panel { grid-area: stats; }
.panel-title { font-size: 12px; color: var(--muted); letter-spacing: 1px; }
.stat-mini-lbl { font-size: 10px; color: var(--muted); letter-spacing: .3px; }
.goal-cap, .heat-days { color: var(--muted); }
.music-panel { grid-area: music; align-self: start; padding: 14px 18px; }
.music-btn { min-height: 44px; font-size: 13px; color: var(--muted); }
.music-btn.on { background: var(--sage); color: #102f2d; }
#music-vol { height: 28px; min-width: 90px; }
.account-actions { grid-area: account; }
.hero-foot { grid-area: footer; justify-content: center; color: #e0e8e3; font-size: 12px; }
#scene-label { opacity: 1; }
#settings-pop { max-height: calc(100svh - 120px); overflow-y: auto; width: min(340px, calc(100vw - 32px)); background: #102f2dfb; }
.set-row { font-size: 14px; min-height: 44px; }
.set-row input { min-width: 0; }
.set-check { font-size: 14px; min-height: 44px; }
dialog { background: #102f2dfa; max-height: calc(100dvh - 32px); overflow-y: auto; }
dialog p, dialog label { font-size: 14px; }
dialog input:not([type=checkbox]), dialog select { min-height: 44px; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid #f1ede2; outline-offset: 3px; box-shadow: 0 0 0 6px #102f2d; }
#content[data-section=plan] { grid-template-areas: "header header" "quote quote" "tasks tasks" "account account" "footer footer"; }
#content[data-section=progress] { grid-template-areas: "header header" "quote quote" "stats stats" "account account" "footer footer"; }
#content[data-section=plan] > :is(.timer-block,.stats-panel,.music-panel),
#content[data-section=progress] > :is(.timer-block,.task-panel,.music-panel) { display: none; }
#content[data-section=progress] .stats-panel { width: min(800px,100%); justify-self: center; }
#content[data-section=plan] .task-panel { max-width: 1100px; justify-self: center; }
#planning-view button, #planning-view input, #planning-view select { min-height: 44px; }
/* Zen keeps the same sky quote and lake placement without the task backlog. */
#app.zen #content { grid-template-columns: minmax(0,1fr); grid-template-areas: "quote" "timer" "footer"; padding-top: 100px; max-width: 720px; }
#app.zen #content > .quote-carousel { display: flex; }
#app.zen #content > .timer-block { display: flex; }
#app.zen #content > .hero-foot { display: none; }
#app.zen #zen-quote { display: none; }
#zen-music { position: relative; bottom: auto; left: auto; transform: none; margin: 20px auto; padding-bottom: 24px; }
#zen-exit-btn { width: 44px; height: 44px; background: #102f2de6; }
@media (max-width: 900px) {
  #content { max-width: 640px; grid-template-columns: minmax(0,1fr); grid-template-areas: "header" "quote" "timer" "tasks" "music" "stats" "account" "footer"; row-gap: 20px; padding-bottom: calc(100px + env(safe-area-inset-bottom)); }
  #lake-background { object-position: 28% 0; }
  .brand-row { gap: 8px; }
  .brand-mark { font-size: 22px; }
  .brand-icon { width: 40px; height: 40px; }
  .brand-actions { gap: 6px; }
  .brand-row .save-status { text-align: center; margin-top: 0; }
  .workspace-nav { position: fixed; z-index: 50; left: 16px; right: 16px; bottom: calc(12px + env(safe-area-inset-bottom)); margin: 0 auto; max-width: 520px; justify-content: space-around; background: #102f2df5; border: 1px solid #d0dfd850; box-shadow: 0 6px 24px #0005; border-radius: 24px; padding: 6px; }
  .workspace-nav button { flex: 1; min-height: 48px; color: #e0e8e3; background: none; }
  .workspace-nav button[aria-current] { color: #102f2d; background: var(--sage); }
  .quote-carousel { min-height: clamp(116px,19svh,190px); padding-top: 4px; max-width: 95%; }
  #main-quote { font-size: 17px; }
  .timer-block { padding: 14px 0; gap: 16px; }
  .timer-block::before { inset: -12px 0; }
  #active-task-text { font-size: 25px; }
  #timer-display { font-size: clamp(78px,22vw,112px); }
  .panel { padding: 18px; }
  .panel-hint { display: none; }
  #content[data-section=plan] { grid-template-areas: "header" "quote" "tasks" "account" "footer"; }
  #content[data-section=progress] { grid-template-areas: "header" "quote" "stats" "account" "footer"; }
  #app.zen #content { padding-top: 90px; padding-bottom: 0; }
}
@media (max-width: 600px) {
  .task-focus-btn { display: none; }
  .task:not(.done) .task-text::after { content: 'Focus →'; display: block; color: #cdded3; font-size: 12px; padding-top: 5px; }
  .task { gap: 6px; padding: 8px; }
  .task-check { margin: 10px 6px; }
}
@media (max-width: 380px) {
  .brand-row { justify-content: center; }
  .brand-actions { margin-left: 0; }
  .brand-mark { font-size: 20px; }
  .brand-icon { width: 32px; height: 32px; }
  .brand { gap: 6px; }
  .brand-btn { width: 40px; }
  .mode-tag { padding-inline: 9px; font-size: 12px; }
  .task-add { flex-wrap: wrap; }
  .task-add input { min-width: 100%; }
  .stat-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; }
}
@media (prefers-reduced-transparency: reduce) { .panel, .workspace-nav { background: #102f2d; } }
