/* ═══════════════════════════════════════
   DESIGN TOKENS
═══════════════════════════════════════ */
:root {
  /* Surfaces */
  --bg:          #e8f0ed;   /* fallback for gradient backgrounds */
  --app-gradient:
    radial-gradient(circle at 14% 12%, rgba(255, 196, 120, 0.45) 0%, rgba(255, 196, 120, 0.22) 24%, transparent 48%),
    radial-gradient(circle at 88% 16%, rgba(154, 137, 205, 0.42) 0%, rgba(154, 137, 205, 0.20) 28%, transparent 54%),
    radial-gradient(circle at 22% 86%, rgba(72, 160, 138, 0.30) 0%, rgba(72, 160, 138, 0.16) 30%, transparent 58%),
    radial-gradient(circle at 86% 78%, rgba(224, 107, 82, 0.30) 0%, rgba(224, 107, 82, 0.14) 26%, transparent 52%),
    linear-gradient(135deg, #f7efe1 0%, #e6f3ee 43%, #f1e9f8 100%);
  --surface:     #ffffff;
  --surface2:    #f2f7f5;
  --surface3:    #e4eeea;

  /* Borders */
  --rule:        #c8d8d2;
  --rule-strong: #a8c0b8;

  /* Ink */
  --ink:         #1a2e28;   /* deep teal-black */
  --ink-mid:     #3a5a52;
  --ink-light:   #7a9e94;
  --ink-ghost:   #b0ccc4;

  /* Accent — dark teal (from shield/wall left half) */
  --blue:        #1e5a4e;
  --blue-mid:    #2d7a6a;
  --blue-pale:   #d0ebe4;
  --blue-ghost:  #e8f5f0;

  /* Accent — warm coral/terracotta (from rocket + shield right half) */
  --warm:        #d4513a;
  --warm-mid:    #e06b52;
  --warm-pale:   #fae6e2;
  --warm-ghost:  #fdf3f0;

  /* Semantic */
  --green:       #2a6e4a;
  --green-pale:  #d8f0e4;
  --red:         #c03030;
  --red-pale:    #fae0e0;

  /* Lilac/lavender from illustrations */
  --lilac:       #9888c8;
  --lilac-pale:  #ede8f8;

  /* Felt texture — coarser weave for contrast with glossy buttons */
  --felt-texture: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='felt'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3CfeBlend in='SourceGraphic' mode='multiply'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23felt)' opacity='0.09'/%3E%3C/svg%3E");

  /* Rough paper texture — embedded SVG grain/fiber layer */
  --paper-texture: none;
  --bokeh-texture: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 1600'%3E%3Cdefs%3E%3Cfilter id='b'%3E%3CfeGaussianBlur stdDeviation='28'/%3E%3C/filter%3E%3C/defs%3E%3Cg filter='url(%23b)'%3E%3Ccircle cx='120' cy='150' r='120' fill='%23ffffff' fill-opacity='0.24'/%3E%3Ccircle cx='300' cy='360' r='72' fill='%23d0ebe4' fill-opacity='0.34'/%3E%3Ccircle cx='920' cy='190' r='140' fill='%23fdf3f0' fill-opacity='0.32'/%3E%3Ccircle cx='1040' cy='540' r='90' fill='%23ffffff' fill-opacity='0.18'/%3E%3Ccircle cx='880' cy='840' r='150' fill='%23ede8f8' fill-opacity='0.22'/%3E%3Ccircle cx='220' cy='980' r='110' fill='%23ffffff' fill-opacity='0.16'/%3E%3Ccircle cx='1030' cy='1180' r='130' fill='%23d0ebe4' fill-opacity='0.24'/%3E%3Ccircle cx='420' cy='1320' r='170' fill='%23fdf3f0' fill-opacity='0.2'/%3E%3Ccircle cx='130' cy='1460' r='84' fill='%23ffffff' fill-opacity='0.16'/%3E%3C/g%3E%3C/svg%3E");
}

/* ═══════════════════════════════════════
   GLOBAL RESET & SHELL
═══════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  background-image: var(--app-gradient);
  background-size: cover;
  background-repeat: no-repeat;
  color: var(--ink);
}

/* Continuous gradient background on every view */
.tool-view {
  display: none;
  position: fixed;
  inset: 0;
  overflow-y: auto;
  overflow-x: hidden;
  background: var(--bg);
  background-image: var(--app-gradient);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}
.tool-view.active { display: block !important; }

.tool-view::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.34;
  background:
    radial-gradient(ellipse at 18% 22%, rgba(255,255,255,0.24) 0%, transparent 38%),
    radial-gradient(ellipse at 78% 72%, rgba(77,56,34,0.055) 0%, transparent 44%),
    radial-gradient(ellipse at 45% 55%, rgba(255,255,255,0.12) 0%, transparent 52%),
    linear-gradient(95deg, rgba(255,255,255,0.10), rgba(0,0,0,0.025), rgba(255,255,255,0.08));
  background-size: cover;
  background-repeat: no-repeat;
}


/* Continuous texture overlay — no tiled image seams */
.tool-view::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.26;
  background:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,0.35) 0 1px, transparent 1.5px),
    radial-gradient(circle at 75% 65%, rgba(30,90,78,0.16) 0 1px, transparent 1.6px),
    radial-gradient(circle at 55% 18%, rgba(212,81,58,0.12) 0 1px, transparent 1.8px),
    linear-gradient(110deg, rgba(255,255,255,0.16), rgba(255,255,255,0) 34%, rgba(0,0,0,0.035) 70%, rgba(255,255,255,0.10));
  background-size: 37px 37px, 53px 53px, 71px 71px, cover;
  background-position: 0 0, 13px 17px, 31px 7px, center;
}

/* Home button */
.home-btn {
  position: fixed;
  bottom: 1.5rem;
  left: 1.5rem;
  z-index: 9999;
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: rgba(255,255,255,0.88);
  color: var(--ink-mid);
  border: 1px solid var(--rule-strong);
  border-radius: 20px;
  padding: 0.45rem 0.9rem;
  cursor: pointer;
  backdrop-filter: blur(8px);
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  transition: all 0.15s;
  display: none;
}
.home-btn:hover {
  background: white;
  color: var(--blue);
  border-color: var(--blue);
}
.home-btn.light-bg { /* same style — all backgrounds are now light */ }
.home-btn.visible { display: block; }

/* ═══════════════════════════════════════
   HOME SCREEN
═══════════════════════════════════════ */
#view-home.active { display: block; }

#view-home {
  display: none;
  background: var(--bg);
  background-image: var(--app-gradient);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  min-height: 100vh;
  font-family: 'DM Mono', monospace;
  color: var(--ink);
}

#view-home::after {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at 24% 16%, rgba(255,255,255,0.30) 0%, transparent 42%),
    radial-gradient(ellipse at 78% 72%, rgba(255,255,255,0.18) 0%, transparent 46%);
  pointer-events: none;
  z-index: 0;
}

.home-inner {
  position: relative;
  z-index: 2;
  max-width: 680px;
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
}

.home-header { margin-bottom: 2.5rem; position: relative; }

.home-settings-btn {
  position: absolute;
  top: 0;
  right: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--rule);
  background: var(--surface);
  color: var(--ink-mid);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.home-settings-btn:hover { color: var(--ink); border-color: var(--rule-strong); }
.home-settings-btn:active { transform: scale(0.94); }

.home-wordmark {
  font-family: 'Playfair Display', serif;
  font-size: 2.6rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--ink);
}
.home-wordmark span {
  color: #6f4a8e;
  font-style: italic;
}

.home-tagline {
  margin-top: 0.5rem;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-light);
}

/* ── STATUS PANEL ── */
#status-panel {
  margin-bottom: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

#waidrn-card {
  display: none;
  background: var(--red-pale);
  border: 1px solid rgba(184,48,48,0.2);
  border-radius: 8px;
  padding: 0.9rem 1.1rem;
  gap: 0.8rem;
  align-items: center;
}
#waidrn-card.visible { display: flex; }

.waidrn-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--red);
  flex-shrink: 0;
  animation: blink 1.4s ease-in-out infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0.3} }

.waidrn-label {
  font-size: 0.58rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 0.15rem;
  opacity: 0.8;
}
.waidrn-task { font-size: 0.88rem; color: var(--ink); line-height: 1.4; }
.waidrn-meta { font-size: 0.62rem; color: var(--ink-light); margin-top: 0.1rem; }

.waidrn-resume-btn {
  margin-left: auto;
  font-family: 'DM Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: white;
  border: 1px solid rgba(184,48,48,0.3);
  color: var(--red);
  border-radius: 20px;
  padding: 0.35rem 0.8rem;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.12s;
  flex-shrink: 0;
}
.waidrn-resume-btn:hover { background: var(--red-pale); border-color: var(--red); }

#top3-card {
  display: none;
  background: var(--green-pale);
  border: 1px solid rgba(42,110,74,0.2);
  border-radius: 8px;
  padding: 0.9rem 1.1rem;
}
#top3-card.visible { display: block; }

.top3-home-label {
  font-size: 0.58rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 0.6rem;
  opacity: 0.8;
}

.top3-home-items { display: flex; flex-direction: column; gap: 0.4rem; }

.top3-home-item {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  font-size: 0.82rem;
  color: var(--ink);
  line-height: 1.4;
}

.top3-home-num {
  font-family: 'Playfair Display', serif;
  font-size: 0.75rem;
  color: var(--green);
  flex-shrink: 0;
  width: 0.8rem;
}

.top3-clear-btn {
  font-family: 'DM Mono', monospace;
  font-size: 0.55rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: none;
  border: none;
  color: var(--ink-light);
  cursor: pointer;
  padding: 0;
  margin-top: 0.6rem;
  transition: color 0.12s;
}
.top3-clear-btn:hover { color: var(--ink-mid); }

/* ── TOOL GRID ── */
.tools-grid {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  padding-left: clamp(2.6rem, 7vw, 4.75rem);
}

.tool-card {
  background: linear-gradient(160deg, rgba(255,255,255,0.98) 0%, rgba(240,248,244,0.92) 100%);
  border: 1px solid rgba(255,255,255,0.9);
  border-radius: 12px;
  min-height: clamp(8.1rem, 15vw, 9.7rem);
  padding: 1.45rem 1.4rem 1.45rem clamp(4.7rem, 11vw, 6.65rem);
  cursor: pointer;
  transition: all 0.18s;
  display: flex;
  align-items: center;
  gap: 1.2rem;
  text-align: left;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.9) inset,
    0 2px 8px rgba(30,90,78,0.12),
    0 1px 2px rgba(30,90,78,0.08);
  position: relative;
  overflow: visible;
}

/* Gloss highlight streak */
.tool-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 45%;
  background: linear-gradient(180deg, rgba(255,255,255,0.45) 0%, rgba(255,255,255,0) 100%);
  border-radius: 12px 12px 0 0;
  pointer-events: none;
  z-index: 0;
}

.tool-card:hover {
  border-color: rgba(255,255,255,1);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.95) inset,
    0 4px 16px rgba(30,90,78,0.18),
    0 2px 4px rgba(30,90,78,0.1);
  transform: translateY(-2px);
}

.tool-icon {
  font-size: 1.6rem;
  flex-shrink: 0;
  width: clamp(6.4rem, 14vw, 8.4rem);
  height: clamp(6.4rem, 14vw, 8.4rem);
  text-align: center;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(30,90,78,0.2), 0 2px 5px rgba(0,0,0,0.13);
  position: absolute;
  left: clamp(-3.15rem, -5vw, -2.35rem);
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
}

.tool-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 22px;
}
.tool-info { flex: 1; position: relative; z-index: 1; }

.tool-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 0.25rem;
}

.tool-desc { font-size: 0.7rem; color: var(--ink-light); line-height: 1.5; letter-spacing: 0.01em; }

.tool-arrow { color: var(--ink-ghost); font-size: 1rem; flex-shrink: 0; transition: color 0.15s; position: relative; z-index: 1; }
.tool-card:hover .tool-arrow { color: var(--warm); }

.tool-active-badge {
  font-size: 0.55rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--red-pale);
  border: 1px solid rgba(184,48,48,0.25);
  color: var(--red);
  border-radius: 20px;
  padding: 0.2rem 0.6rem;
  white-space: nowrap;
  display: none;
}
.tool-active-badge.visible { display: inline-block; }

.pro-tip-card {
  margin-top: 1.6rem;
  margin-left: clamp(-3.15rem, -5vw, -2.35rem);
  background: linear-gradient(135deg, #172b3c 0%, #2c3455 52%, #563b72 100%);
  border: 1px solid rgba(202,184,238,0.32);
  border-radius: 12px;
  padding: 1.2rem 1.4rem 3.2rem;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.12) inset,
    0 8px 22px rgba(30,46,72,0.22),
    0 2px 5px rgba(30,46,72,0.14);
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
  display: block;
  align-self: stretch;
}

.pro-tip-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 48%;
  background: radial-gradient(circle at 88% 8%, rgba(182,139,214,0.38) 0%, rgba(182,139,214,0) 52%);
  pointer-events: none;
}

.pro-tip-label {
  position: relative;
  z-index: 1;
  font-size: 0.58rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #cbb4ed;
  opacity: 1;
  margin-bottom: 0.65rem;
}

.pro-tip-text {
  position: relative;
  z-index: 1;
  font-size: 0.82rem;
  line-height: 1.65;
  color: #f8f4ec;
}

.pro-tip-next {
  position: relative;
  z-index: 1;
  position: absolute;
  right: 1rem;
  bottom: 0.95rem;
  border: 1px solid rgba(231,223,247,0.35);
  background: rgba(255,255,255,0.12);
  color: #f8f4ec;
  border-radius: 999px;
  padding: 0.38rem 0.8rem;
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-family: 'DM Mono', monospace;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.pro-tip-next:hover {
  transform: translateY(-1px);
  background: rgba(255,255,255,0.22);
  border-color: rgba(255,255,255,0.52);
}

.home-footer {
  margin-top: 2.5rem;
  font-size: 0.6rem;
  color: var(--ink-ghost);
  letter-spacing: 0.1em;
  text-align: center;
  text-transform: uppercase;
}

/* ── GLOSSY BUTTON TREATMENT (all primary buttons) ── */
.s-btn-primary, .g-btn-primary, .g-btn-green, .g-btn-accent,
.m-btn-dawn, .m-btn-gold, .p-gen-btn, .p-out-btn.primary {
  position: relative;
  overflow: hidden;
}
.s-btn-primary::after, .g-btn-primary::after, .g-btn-green::after, .g-btn-accent::after,
.m-btn-dawn::after, .m-btn-gold::after, .p-gen-btn::after, .p-out-btn.primary::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 50%;
  background: linear-gradient(180deg, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0) 100%);
  pointer-events: none;
  border-radius: inherit;
}

/* ═══════════════════════════════════════
   STUCK PROMPT STYLES
═══════════════════════════════════════ */
#view-stuck { background: transparent; min-height: 100vh; font-family: 'DM Mono', monospace; font-weight: 300; color: var(--ink); }

#stuck-topbar {
  position: fixed; top: 0; left: 0; right: 0;
  padding: 1.2rem 2rem;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--rule);
  background: rgba(240,238,233,0.92);
  backdrop-filter: blur(8px);
  z-index: 10;
}
.stuck-brand { font-family: 'Playfair Display', serif; font-size: 1rem; color: var(--warm); letter-spacing: 0.05em; }
#stuck-step-label { font-size: 0.7rem; color: var(--ink-light); letter-spacing: 0.1em; text-transform: uppercase; }

#stuck-app {
  position: relative; z-index: 2; min-height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 5rem 2rem;
}
#stuck-stage { width: 100%; max-width: 600px; display: flex; flex-direction: column; gap: 1.5rem; }

.s-card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 2.5rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  opacity: 0; transform: translateY(16px);
  animation: sFadeUp 0.5s ease forwards;
}
@keyframes sFadeUp { to { opacity:1; transform:translateY(0); } }

.s-card-label { font-size: 0.65rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--warm); margin-bottom: 1.2rem; }
.s-card-question { font-family: 'Playfair Display', serif; font-size: 1.55rem; line-height: 1.5; color: var(--ink); }
.s-card-question em { color: var(--warm); font-style: italic; }
.s-card-sub { font-size: 0.75rem; color: var(--ink-light); line-height: 1.6; margin-top: 0.8rem; }

.s-textarea {
  width: 100%; background: var(--surface2); border: 1.5px solid var(--rule);
  border-radius: 6px; color: var(--ink); font-family: 'DM Mono', monospace;
  font-weight: 300; font-size: 0.9rem; line-height: 1.7; padding: 1rem 1.2rem;
  resize: none; min-height: 100px; outline: none; transition: border-color 0.2s;
}
.s-textarea:focus { border-color: var(--blue-mid); }
.s-textarea::placeholder { color: var(--ink-ghost); }

.s-btn-row { display: flex; gap: 0.8rem; flex-wrap: wrap; }

.s-btn-primary {
  background: var(--blue); color: white;
  font-family: 'DM Mono', monospace; font-size: 0.75rem; font-weight: 400;
  letter-spacing: 0.08em; text-transform: uppercase; border: none;
  border-radius: 6px; padding: 0.75rem 1.5rem; cursor: pointer; transition: all 0.15s;
}
.s-btn-primary:hover { background: var(--blue-mid); }

.s-btn-ghost {
  background: transparent; color: var(--ink-light); border: 1.5px solid var(--rule);
  font-family: 'DM Mono', monospace; font-size: 0.75rem; letter-spacing: 0.08em;
  text-transform: uppercase; border-radius: 6px; padding: 0.75rem 1.5rem;
  cursor: pointer; transition: all 0.15s;
}
.s-btn-ghost:hover { color: var(--ink); border-color: var(--rule-strong); }

.s-btn-danger {
  background: transparent; color: var(--red); border: 1.5px solid rgba(184,48,48,0.3);
  font-family: 'DM Mono', monospace; font-size: 0.75rem; letter-spacing: 0.08em;
  text-transform: uppercase; border-radius: 6px; padding: 0.75rem 1.5rem;
  cursor: pointer; transition: all 0.15s;
}
.s-btn-danger:hover { background: var(--red-pale); }

.s-choices { display: flex; flex-direction: column; gap: 0.6rem; }
.s-choice-btn {
  text-align: left; background: var(--surface2); border: 1.5px solid var(--rule);
  color: var(--ink); font-family: 'DM Mono', monospace; font-size: 0.82rem;
  padding: 1rem 1.2rem; letter-spacing: 0; text-transform: none; border-radius: 6px;
  cursor: pointer; transition: all 0.15s;
}
.s-choice-btn:hover { border-color: var(--blue-mid); background: var(--blue-ghost); color: var(--blue); }

#stuck-timer-display {
  font-family: 'Playfair Display', serif; font-size: 4rem; color: var(--blue);
  text-align: center; letter-spacing: 0.05em; margin: 0.5rem 0;
}
.stuck-timer-label {
  text-align: center; font-size: 0.7rem; color: var(--ink-light);
  letter-spacing: 0.15em; text-transform: uppercase; margin-bottom: 1.5rem;
}

.s-summary-item { display: flex; flex-direction: column; gap: 0.3rem; padding: 0.8rem 0; border-bottom: 1px solid var(--rule); }
.s-summary-item:last-child { border-bottom: none; }
.s-summary-label { font-size: 0.6rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--warm); }
.s-summary-value { font-size: 0.85rem; color: var(--ink); line-height: 1.6; }

@keyframes sPulse { 0%,100%{opacity:1} 50%{opacity:0.6} }
.s-pulsing { animation: sPulse 1.5s ease-in-out infinite; }
.s-glow { color: var(--green) !important; }

/* ═══════════════════════════════════════
   FOCUS GUARD STYLES
═══════════════════════════════════════ */
#view-guard { background: transparent; min-height: 100vh; font-family: 'Syne', sans-serif; color: var(--ink); }

.g-inner { position: relative; z-index: 2; min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 2rem 1.5rem 5rem; }

.g-screen { width: 100%; max-width: 520px; display: none; flex-direction: column; gap: 0; }
.g-screen.active { display: flex; }

.g-masthead { margin-bottom: 2.5rem; }
.g-masthead h1 { font-size: 2.8rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1; color: var(--ink); }
.g-masthead h1 span { color: var(--warm); }
.g-masthead p { margin-top: 0.6rem; font-family: 'Syne Mono', monospace; font-size: 0.72rem; color: var(--ink-light); letter-spacing: 0.08em; text-transform: uppercase; }

.g-field-group { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 1.2rem; }
.g-label { font-family: 'Syne Mono', monospace; font-size: 0.65rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--ink-mid); }

.g-input, .g-select, .g-textarea {
  width: 100%; background: var(--surface); border: 1.5px solid var(--rule);
  border-radius: 6px; color: var(--ink); font-family: 'Syne', sans-serif;
  font-size: 1rem; padding: 0.9rem 1rem; outline: none; transition: border-color 0.15s; -webkit-appearance: none;
}
.g-input:focus, .g-select:focus, .g-textarea:focus { border-color: var(--blue-mid); }
.g-input::placeholder, .g-textarea::placeholder { color: var(--ink-ghost); }
.g-textarea { resize: none; min-height: 90px; line-height: 1.5; }
.g-select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239898a8' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 1rem center; padding-right: 2.5rem;
}

.g-divider { height: 1px; background: var(--rule); margin: 1.5rem 0; }

.g-btn {
  font-family: 'Syne', sans-serif; font-weight: 700; font-size: 0.85rem;
  letter-spacing: 0.05em; text-transform: uppercase; border: none; border-radius: 6px;
  cursor: pointer; padding: 1rem 2rem; transition: all 0.12s;
  display: inline-flex; align-items: center; gap: 0.5rem;
}
.g-btn-primary { background: var(--blue); color: white; width: 100%; justify-content: center; font-size: 1rem; }
.g-btn-primary:hover { background: var(--blue-mid); }
.g-btn-accent { background: var(--warm); color: white; }
.g-btn-accent:hover { background: var(--warm-mid); }
.g-btn-ghost { background: transparent; color: var(--ink-mid); border: 1.5px solid var(--rule); }
.g-btn-ghost:hover { border-color: var(--rule-strong); color: var(--ink); }
.g-btn-green { background: var(--green); color: white; }
.g-btn-green:hover { background: #1e5035; }

.g-task-card { background: var(--surface); border: 1.5px solid var(--rule); border-radius: 6px; padding: 1.8rem; position: relative; overflow: hidden; margin-bottom: 1.2rem; box-shadow: 0 1px 4px rgba(0,0,0,0.05); }
.g-task-card::before { content: ''; position: absolute; left:0; top:0; bottom:0; width:4px; background: var(--blue); }
.g-task-label { font-family: 'Syne Mono', monospace; font-size: 0.62rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-light); margin-bottom: 0.6rem; }
.g-task-text { font-size: 1.3rem; font-weight: 700; line-height: 1.35; color: var(--ink); }

.g-timer-section { display: flex; flex-direction: column; align-items: center; padding: 2rem; background: var(--surface); border: 1.5px solid var(--rule); border-radius: 6px; gap: 0.8rem; margin-bottom: 1.2rem; box-shadow: 0 1px 4px rgba(0,0,0,0.05); }
.g-ring-container { position: relative; width: 140px; height: 140px; }
.g-ring-svg { transform: rotate(-90deg); width: 140px; height: 140px; }
.g-ring-track { fill: none; stroke: var(--rule); stroke-width: 8; }
.g-ring-fill { fill: none; stroke: var(--warm); stroke-width: 8; stroke-linecap: round; stroke-dasharray: 376; stroke-dashoffset: 0; transition: stroke-dashoffset 1s linear; }
.g-ring-time { position: absolute; top:50%; left:50%; transform:translate(-50%,-50%); font-family:'Syne Mono',monospace; font-size:2rem; color: var(--ink); }
.g-next-ping-label { font-family:'Syne Mono',monospace; font-size:0.65rem; color: var(--ink-light); letter-spacing:0.1em; text-transform:uppercase; }
.g-window-note { font-family:'Syne Mono',monospace; font-size:0.6rem; color: var(--warm); letter-spacing:0.06em; margin-top:0.4rem; opacity:0.8; }

.g-stats-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0.8rem; margin-bottom: 1.2rem; }
.g-stat-box { background: var(--surface); border: 1.5px solid var(--rule); border-radius: 6px; padding: 1rem; text-align: center; box-shadow: 0 1px 3px rgba(0,0,0,0.04); }
.g-stat-value { font-size: 1.6rem; font-weight: 800; line-height: 1; color: var(--blue); }
.g-stat-label { font-family: 'Syne Mono', monospace; font-size: 0.58rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-light); margin-top: 0.3rem; }

.g-action-row { display: flex; gap: 0.8rem; }
.g-action-row .g-btn { flex: 1; justify-content: center; }

.g-done-header { text-align: center; padding: 2.5rem 2rem; background: var(--green-pale); border: 1.5px solid rgba(42,110,74,0.2); border-radius: 6px; margin-bottom: 1.2rem; }
.g-done-checkmark { font-size: 3rem; margin-bottom: 0.5rem; }
.g-done-title { font-size: 2rem; font-weight: 800; color: var(--green); letter-spacing: -0.02em; }
.g-done-sub { font-family: 'Syne Mono', monospace; font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--green); margin-top: 0.4rem; opacity: 0.7; }

.g-summary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; margin-bottom: 1.2rem; }
.g-summary-box { background: var(--surface); border: 1.5px solid var(--rule); border-radius: 6px; padding: 1.2rem; }
.g-summary-box-value { font-size: 2rem; font-weight: 800; line-height: 1; color: var(--blue); }
.g-summary-box-label { font-family: 'Syne Mono', monospace; font-size: 0.6rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-light); margin-top: 0.3rem; }

.g-drift-log { background: var(--surface); border: 1.5px solid var(--rule); border-radius: 6px; padding: 1.5rem; margin-bottom: 1.2rem; }
.g-drift-log-title { font-family: 'Syne Mono', monospace; font-size: 0.65rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--ink-mid); margin-bottom: 0.8rem; }
.g-drift-log-item { display: flex; align-items: baseline; gap: 0.6rem; padding: 0.4rem 0; border-bottom: 1px solid var(--surface2); font-size: 0.82rem; color: var(--ink-mid); }
.g-drift-log-item:last-child { border-bottom: none; }
.g-drift-log-time { font-family: 'Syne Mono', monospace; font-size: 0.65rem; color: var(--ink-light); white-space: nowrap; }

.g-perm-notice { font-family: 'Syne Mono', monospace; font-size: 0.68rem; color: var(--ink-light); text-align: center; padding: 0.8rem; background: var(--surface2); border-radius: 6px; letter-spacing: 0.05em; line-height: 1.5; margin-top: 0.8rem; }

/* Ping overlay */
#g-ping-overlay { display: none; position: fixed; inset: 0; z-index: 800; align-items: center; justify-content: center; padding: 1.5rem; }
#g-ping-overlay.show { display: flex; }
.g-ping-backdrop { position: absolute; inset: 0; background: rgba(28,28,46,0.5); backdrop-filter: blur(6px); animation: gFadeIn 0.2s ease; }
@keyframes gFadeIn { from{opacity:0} to{opacity:1} }
.g-ping-card { position: relative; z-index: 1; background: var(--surface); border-radius: 8px; padding: 2.5rem; max-width: 440px; width: 100%; animation: gSlideUp 0.25s ease; border-top: 4px solid var(--warm); box-shadow: 0 8px 32px rgba(0,0,0,0.15); }
@keyframes gSlideUp { from{opacity:0;transform:translateY(20px)} to{opacity:1;transform:translateY(0)} }
.g-ping-eyebrow { font-family: 'Syne Mono', monospace; font-size: 0.65rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--warm); margin-bottom: 0.8rem; }
.g-ping-question { font-size: 1.5rem; font-weight: 800; line-height: 1.3; color: var(--ink); margin-bottom: 0.5rem; }
.g-ping-task-echo { font-size: 0.9rem; color: var(--ink-mid); line-height: 1.5; padding: 0.8rem 1rem; background: var(--surface2); border-radius: 6px; margin: 1.2rem 0; border-left: 3px solid var(--blue); font-style: italic; }
.g-ping-buttons { display: flex; flex-direction: column; gap: 0.6rem; margin-top: 1rem; }
#g-drifted-panel { display: none; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--rule); }
.g-drift-label { font-family: 'Syne Mono', monospace; font-size: 0.62rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--ink-mid); margin-bottom: 0.5rem; }
.g-drift-choices { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 1rem; }
.g-drift-btn { text-align: left; background: var(--surface2); border: 1.5px solid var(--rule); color: var(--ink); font-family: 'Syne', sans-serif; font-size: 0.82rem; font-weight: 500; padding: 0.75rem 1rem; border-radius: 6px; cursor: pointer; transition: all 0.12s; text-transform: none; letter-spacing: 0; }
.g-drift-btn:hover { border-color: var(--blue-mid); background: var(--blue-ghost); }

/* ═══════════════════════════════════════
   MORNING LAUNCH STYLES
═══════════════════════════════════════ */
#view-morning { background: transparent; min-height: 100vh; font-family: 'Epilogue', sans-serif; font-weight: 300; color: var(--ink); }

.m-inner { position: relative; z-index: 2; min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 2rem 1.5rem 5rem; }

.m-screen { display: none; width: 100%; max-width: 500px; flex-direction: column; gap: 1.4rem; animation: mRiseIn 0.55s cubic-bezier(0.22,1,0.36,1) forwards; }
.m-screen.active { display: flex; }
@keyframes mRiseIn { from{opacity:0;transform:translateY(22px)} to{opacity:1;transform:translateY(0)} }

.m-step-badge { display: inline-block; font-size: 0.62rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--warm); background: var(--warm-ghost); border: 1px solid rgba(200,119,58,0.2); border-radius: 20px; padding: 0.3rem 0.9rem; margin-bottom: 1rem; }
.m-title { font-family: 'Fraunces', serif; font-size: 2.4rem; font-weight: 900; line-height: 1.1; letter-spacing: -0.02em; color: var(--ink); }
.m-title em { font-style: italic; font-weight: 300; color: var(--warm); }
.m-sub { margin-top: 0.6rem; font-size: 0.82rem; color: var(--ink-light); line-height: 1.6; }

.m-card { background: var(--surface); border: 1px solid var(--rule); border-radius: 8px; padding: 1.8rem; box-shadow: 0 1px 4px rgba(0,0,0,0.05); }
.m-card-label { font-size: 0.6rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-light); margin-bottom: 1rem; }

.m-btn { font-family: 'Epilogue', sans-serif; font-weight: 500; font-size: 0.9rem; letter-spacing: 0.03em; border: none; border-radius: 6px; cursor: pointer; padding: 1rem 1.5rem; transition: all 0.15s; display: flex; align-items: center; justify-content: center; gap: 0.5rem; }
.m-btn-dawn { background: var(--blue); color: white; width: 100%; font-size: 1rem; box-shadow: 0 3px 12px rgba(30,58,110,0.25); }
.m-btn-dawn:hover { background: var(--blue-mid); box-shadow: 0 4px 16px rgba(30,58,110,0.35); transform: translateY(-1px); }
.m-btn-ghost { background: transparent; color: var(--ink-light); border: 1.5px solid var(--rule); width: 100%; }
.m-btn-ghost:hover { border-color: var(--rule-strong); color: var(--ink); }
.m-btn-gold { background: linear-gradient(135deg, var(--warm) 0%, #b8611e 100%); color: white; width: 100%; font-size: 1rem; font-weight: 600; box-shadow: 0 3px 12px rgba(200,119,58,0.25); }
.m-btn-gold:hover { box-shadow: 0 4px 16px rgba(200,119,58,0.4); transform: translateY(-1px); }

.m-loc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }
.m-loc-btn { background: var(--surface2); border: 1.5px solid var(--rule); border-radius: 8px; padding: 1.5rem 1rem; cursor: pointer; text-align: center; transition: all 0.15s; display: flex; flex-direction: column; align-items: center; gap: 0.5rem; font-family: 'Epilogue', sans-serif; }
.m-loc-btn:hover { background: var(--blue-ghost); border-color: var(--blue-mid); }
.m-loc-icon { font-size: 2rem; }
.m-loc-label { font-size: 0.85rem; font-weight: 500; color: var(--ink); }
.m-loc-sub { font-size: 0.68rem; color: var(--ink-light); }

.m-exercises { display: flex; flex-direction: column; gap: 0.6rem; }
.m-exercise-row { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.2rem; background: var(--surface2); border: 1.5px solid var(--rule); border-radius: 6px; transition: all 0.2s; }
.m-exercise-row.done { background: var(--green-pale); border-color: rgba(42,110,74,0.2); }
.m-exercise-name { font-size: 0.95rem; font-weight: 500; color: var(--ink); transition: color 0.2s; }
.m-exercise-row.done .m-exercise-name { color: var(--green); text-decoration: line-through; opacity: 0.7; }
.m-exercise-right { display: flex; align-items: center; gap: 0.8rem; }
.m-exercise-reps { font-family: 'Fraunces', serif; font-size: 1.3rem; font-weight: 600; color: var(--warm); }
.m-exercise-row.done .m-exercise-reps { opacity: 0.4; }
.m-check-btn { width: 32px; height: 32px; border-radius: 50%; border: 1.5px solid var(--rule-strong); background: transparent; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 0.9rem; transition: all 0.15s; color: var(--ink-light); }
.m-check-btn:hover { border-color: var(--green); color: var(--green); }
.m-exercise-row.done .m-check-btn { background: var(--green); border-color: var(--green); color: white; cursor: default; }
.m-ex-timer-row { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.3rem; }
.m-ex-timer-btn { font-size: 0.65rem; font-family: 'Epilogue', sans-serif; letter-spacing: 0.08em; text-transform: uppercase; background: var(--warm-ghost); border: 1px solid rgba(200,119,58,0.2); border-radius: 20px; color: var(--warm); padding: 0.2rem 0.7rem; cursor: pointer; transition: all 0.12s; }
.m-ex-timer-btn:hover { background: var(--warm-pale); }
.m-ex-timer-display { font-family: 'Fraunces', serif; font-size: 0.9rem; color: var(--warm); min-width: 2.5rem; }

.m-progress-track { height: 3px; background: var(--rule); border-radius: 2px; overflow: hidden; }
.m-progress-fill { height: 100%; background: linear-gradient(90deg, var(--blue), var(--warm)); border-radius: 2px; transition: width 0.4s ease; }

.m-no-email { display: flex; align-items: center; gap: 0.8rem; background: var(--warm-ghost); border: 1px solid rgba(200,119,58,0.2); border-radius: 8px; padding: 0.9rem 1.1rem; }
.m-no-email-icon { font-size: 1.2rem; }
.m-no-email-text { font-size: 0.78rem; color: var(--warm); line-height: 1.4; font-weight: 500; }

.m-priority-inputs { display: flex; flex-direction: column; gap: 0.7rem; }
.m-priority-row { display: flex; align-items: center; gap: 0.8rem; }
.m-priority-num { font-family: 'Fraunces', serif; font-size: 1.6rem; font-weight: 900; color: var(--ink-ghost); width: 1.4rem; flex-shrink: 0; line-height: 1; }
.m-priority-input { flex: 1; background: var(--surface2); border: 1.5px solid var(--rule); border-radius: 6px; color: var(--ink); font-family: 'Epilogue', sans-serif; font-size: 0.92rem; font-weight: 400; padding: 0.8rem 1rem; outline: none; transition: border-color 0.15s; }
.m-priority-input:focus { border-color: var(--blue-mid); }
.m-priority-input::placeholder { color: var(--ink-ghost); }
.m-priority-input.filled { border-color: rgba(42,110,74,0.4); }

.m-done-header { text-align: center; padding: 2rem 0 1rem; }
.m-sunrise-arc { font-size: 3.5rem; display: block; animation: mRisePulse 2s ease-in-out infinite; }
@keyframes mRisePulse { 0%,100%{transform:translateY(0);opacity:1} 50%{transform:translateY(-4px);opacity:0.85} }
.m-done-title { font-family: 'Fraunces', serif; font-size: 2rem; font-weight: 900; letter-spacing: -0.02em; margin-top: 0.5rem; color: var(--ink); }
.m-done-sub-text { font-size: 0.8rem; color: var(--ink-light); margin-top: 0.3rem; }

.m-top3-summary { display: flex; flex-direction: column; gap: 0; }
.m-top3-item { display: flex; align-items: baseline; gap: 0.8rem; padding: 0.85rem 0; border-bottom: 1px solid var(--rule); }
.m-top3-item:last-child { border-bottom: none; }
.m-top3-num { font-family: 'Fraunces', serif; font-size: 1.1rem; font-weight: 600; color: var(--warm); flex-shrink: 0; width: 1.2rem; }
.m-top3-text { font-size: 0.9rem; line-height: 1.4; color: var(--ink); }

.m-done-rule { font-family: 'Fraunces', serif; font-style: italic; font-size: 0.85rem; color: var(--ink-light); text-align: center; line-height: 1.6; padding: 0.5rem 0; }

.m-walk-visual { text-align: center; padding: 1rem 0; }
.m-walk-icon { font-size: 4rem; display: block; animation: mWalkBob 1s ease-in-out infinite; }
@keyframes mWalkBob { 0%,100%{transform:translateY(0) rotate(-2deg)} 50%{transform:translateY(-5px) rotate(2deg)} }
.m-walk-distance { font-family: 'Fraunces', serif; font-size: 1.1rem; font-weight: 600; color: var(--blue); margin-top: 0.8rem; }

.m-step-dots { display: flex; gap: 0.4rem; justify-content: center; }
.m-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--rule-strong); transition: all 0.3s; }
.m-dot.active { background: var(--warm); width: 18px; border-radius: 3px; }
.m-dot.done { background: var(--green); }

/* Check list */
.m-check-list { display: flex; flex-direction: column; gap: 0.15rem; }

.m-check-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.65rem 0.5rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.12s;
}
.m-check-row:hover { background: var(--surface2); }

.m-check-row input[type="checkbox"] {
  width: 16px; height: 16px;
  flex-shrink: 0;
  margin-top: 2px;
  accent-color: var(--blue);
  cursor: pointer;
}

.m-check-text { flex: 1; }
.m-check-title { font-size: 0.88rem; font-weight: 500; color: var(--ink); line-height: 1.3; font-family: 'Epilogue', sans-serif; }
.m-check-desc { font-size: 0.7rem; color: var(--ink-light); line-height: 1.4; margin-top: 0.15rem; }

.m-check-row.disabled { opacity: 0.4; pointer-events: none; }

/* Card textarea */
.m-card-textarea {
  width: 100%;
  background: var(--surface2);
  border: 1.5px solid var(--rule);
  border-radius: 6px;
  color: var(--ink);
  font-family: 'DM Mono', monospace;
  font-size: 0.78rem;
  font-weight: 300;
  line-height: 1.65;
  padding: 0.75rem 0.9rem;
  resize: none;
  outline: none;
  transition: border-color 0.15s;
}
.m-card-textarea:focus { border-color: var(--blue-mid); }
.m-card-textarea::placeholder { color: var(--ink-ghost); }

/* ══════════════════════════════════
   SETTINGS VIEW (F7)
══════════════════════════════════ */
#view-settings { background: var(--bg); }
.set-inner {
  max-width: 560px;
  margin: 0 auto;
  padding: 3rem 1.5rem 5rem;
}
.set-header { margin-bottom: 2rem; }
.set-title {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 500;
  color: var(--ink);
}
.set-sub {
  margin-top: 0.4rem;
  font-size: 0.9rem;
  color: var(--ink-light);
  line-height: 1.5;
}
.set-card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 16px;
  padding: 1.4rem 1.4rem 1.5rem;
  margin-bottom: 1.2rem;
}
.set-card-label {
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-light);
  margin-bottom: 0.9rem;
}
.set-status {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink-mid);
  margin-bottom: 1rem;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  background: var(--surface2);
  display: inline-block;
}
.set-status-ok { color: var(--green); background: var(--green-pale); }
.set-status-pending { color: var(--blue); background: var(--blue-ghost); }
.set-status-err { color: var(--red); background: var(--red-pale); }
.set-field-label {
  display: block;
  font-size: 0.8rem;
  color: var(--ink-mid);
  margin-bottom: 0.4rem;
}
.set-input {
  width: 100%;
  box-sizing: border-box;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--surface2);
  border: 1.5px solid var(--rule);
  border-radius: 10px;
  padding: 0.75rem 0.9rem;
  outline: none;
  transition: border-color 0.15s;
}
.set-input:focus { border-color: var(--blue-mid); }
.set-btn-row {
  display: flex;
  gap: 0.6rem;
  margin-top: 0.9rem;
}
.set-btn {
  font-family: 'Epilogue', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: 10px;
  padding: 0.65rem 1.2rem;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: all 0.15s;
}
.set-btn:active { transform: scale(0.97); }
.set-btn-primary { background: var(--blue); color: #fff; }
.set-btn-primary:hover { background: var(--blue-mid); }
.set-btn-ghost { background: transparent; border-color: var(--rule); color: var(--ink-mid); }
.set-btn-ghost:hover { border-color: var(--rule-strong); color: var(--ink); }
.set-hint {
  margin-top: 1rem;
  font-size: 0.78rem;
  color: var(--ink-light);
  line-height: 1.5;
}

/* ── Glyph tool icons (for tools without an illustrated PNG) ── */
.tool-icon-glyph {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.8rem;
  line-height: 1;
}
.tool-icon-reset {
  background: linear-gradient(150deg, var(--lilac) 0%, #6d8fd0 100%);
}
.tool-icon-wedge { background: linear-gradient(150deg, var(--warm-mid) 0%, #c0392b 100%); font-size: 1.5rem; }
.tool-icon-shutdown { background: linear-gradient(150deg, #3a4a7a 0%, #1e2540 100%); font-size: 1.4rem; }

/* ══════════════════════════════════
   RESET VIEW (F4)
══════════════════════════════════ */
#view-reset { background: var(--bg); }
.rst-inner {
  max-width: 520px;
  margin: 0 auto;
  padding: 3.5rem 1.5rem 5rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.rst-screen { display: none; }
.rst-screen.active { display: flex; flex-direction: column; align-items: center; text-align: center; }
.rst-brand {
  font-family: 'Playfair Display', serif;
  font-size: 2.2rem;
  color: var(--ink);
  margin-bottom: 0.5rem;
}
.rst-lead {
  font-size: 0.95rem;
  color: var(--ink-light);
  line-height: 1.5;
  margin-bottom: 2rem;
  max-width: 22rem;
}
.rst-choice {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 1rem;
  text-align: left;
  background: var(--surface);
  border: 1.5px solid var(--rule);
  border-radius: 14px;
  padding: 1.1rem 1.2rem;
  margin-bottom: 0.9rem;
  cursor: pointer;
  transition: all 0.15s;
}
.rst-choice:hover { border-color: var(--lilac); transform: translateY(-2px); box-shadow: 0 6px 18px rgba(152,136,200,0.18); }
.rst-choice:active { transform: scale(0.99); }
.rst-choice-emoji { font-size: 1.9rem; flex-shrink: 0; }
.rst-choice-body { display: flex; flex-direction: column; }
.rst-choice-title { font-family: 'Fraunces', serif; font-size: 1.05rem; font-weight: 600; color: var(--ink); }
.rst-choice-sub { font-size: 0.82rem; color: var(--ink-light); margin-top: 0.15rem; line-height: 1.4; }

/* move timer */
.rst-move-label {
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-light);
  margin-bottom: 0.5rem;
}
.rst-timer {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 4.5rem;
  font-weight: 300;
  color: var(--ink);
  line-height: 1;
  margin-bottom: 1.5rem;
  font-variant-numeric: tabular-nums;
}
.rst-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 2rem;
}
.rst-suggestions span {
  font-size: 0.8rem;
  color: var(--ink-mid);
  background: var(--surface2);
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
}

/* breathe */
.rst-breath-stage {
  height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin-bottom: 1rem;
}
.rst-breath-circle {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #b3a4e0 0%, var(--lilac) 55%, #6d8fd0 100%);
  box-shadow: 0 0 40px rgba(152,136,200,0.5);
  transform: scale(1);
  transition: transform 4s ease-in-out;
}
.rst-breath-circle.rst-breath-in { transform: scale(1.7); }
.rst-breath-circle.rst-breath-hold { transform: scale(1.7); }
.rst-breath-circle.rst-breath-out { transform: scale(1); }
.rst-breath-label {
  position: absolute;
  font-family: 'Fraunces', serif;
  font-size: 1.1rem;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0,0,0,0.25);
  pointer-events: none;
}
.rst-breath-count {
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-light);
}

/* next-step input + buttons */
.rst-input {
  width: 100%;
  box-sizing: border-box;
  font-family: 'IBM Plex Serif', serif;
  font-size: 1rem;
  color: var(--ink);
  background: var(--surface);
  border: 1.5px solid var(--rule);
  border-radius: 12px;
  padding: 0.9rem 1rem;
  outline: none;
  margin-bottom: 1.2rem;
  transition: border-color 0.15s;
}
.rst-input:focus { border-color: var(--lilac); }
.rst-btn-row { display: flex; gap: 0.7rem; }
.rst-btn-col { display: flex; flex-direction: column; gap: 0.7rem; width: 100%; }
.rst-btn {
  font-family: 'Epilogue', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 12px;
  padding: 0.85rem 1.4rem;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: all 0.15s;
}
.rst-btn:active { transform: scale(0.98); }
.rst-btn-wide { width: 100%; }
.rst-btn-primary { background: var(--lilac); color: #fff; }
.rst-btn-primary:hover { background: #8676bd; }
.rst-btn-ghost { background: transparent; border-color: var(--rule); color: var(--ink-mid); }
.rst-btn-ghost:hover { border-color: var(--rule-strong); color: var(--ink); }

/* ══════════════════════════════════
   PARKING LOT (F2)
══════════════════════════════════ */
/* home chip */
#parking-chip {
  display: none;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 0.8rem 1rem;
  cursor: pointer;
  transition: all 0.15s;
}
#parking-chip:hover { border-color: var(--rule-strong); transform: translateY(-1px); }
.parking-chip-icon {
  font-size: 1rem;
  width: 1.8rem; height: 1.8rem;
  display: flex; align-items: center; justify-content: center;
  background: var(--warm-ghost); color: var(--warm);
  border-radius: 8px; flex-shrink: 0; font-weight: 700;
}
.parking-chip-text { font-size: 0.9rem; color: var(--ink); font-weight: 500; }
.parking-chip-sub { font-size: 0.78rem; color: var(--ink-light); font-weight: 400; margin-left: 0.3rem; }

/* park buttons inside Focus Guard (light bg) */
.g-park-btn {
  width: 100%;
  margin-top: 0.8rem;
  font-family: 'Epilogue', sans-serif;
  font-size: 0.82rem;
  color: var(--ink-mid);
  background: rgba(255,255,255,0.5);
  border: 1px dashed var(--rule-strong);
  border-radius: 8px;
  padding: 0.7rem;
  cursor: pointer;
  transition: all 0.15s;
}
.g-park-btn:hover { background: rgba(255,255,255,0.85); color: var(--ink); border-color: var(--warm); }
.g-park-inline {
  width: 100%;
  margin-top: 0.6rem;
  font-family: 'Epilogue', sans-serif;
  font-size: 0.78rem;
  color: var(--warm);
  background: transparent;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.g-park-inline:hover { color: var(--warm-mid); }

/* capture overlay */
#park-overlay { display: none; position: fixed; inset: 0; z-index: 900; align-items: center; justify-content: center; padding: 1.5rem; }
#park-overlay.visible { display: flex; }
.park-backdrop { position: absolute; inset: 0; background: rgba(28,28,46,0.5); backdrop-filter: blur(6px); animation: gFadeIn 0.2s ease; }
.park-card { position: relative; z-index: 1; background: var(--surface); border-radius: 14px; padding: 1.8rem; max-width: 420px; width: 100%; animation: gSlideUp 0.25s ease; border-top: 4px solid var(--warm); box-shadow: 0 8px 32px rgba(0,0,0,0.18); }
.park-eyebrow { font-family: 'Syne Mono', monospace; font-size: 0.65rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--warm); margin-bottom: 0.5rem; }
.park-hint { font-size: 0.85rem; color: var(--ink-light); line-height: 1.5; margin-bottom: 1rem; }
.park-input {
  width: 100%; box-sizing: border-box;
  font-family: 'IBM Plex Serif', serif; font-size: 1rem; color: var(--ink);
  background: var(--surface2); border: 1.5px solid var(--rule); border-radius: 10px;
  padding: 0.8rem 0.9rem; outline: none; margin-bottom: 1rem; transition: border-color 0.15s;
}
.park-input:focus { border-color: var(--warm); }
.park-buttons { display: flex; gap: 0.6rem; }
.park-buttons .g-btn { flex: 1; }

/* list view */
#view-parking { background: var(--bg); }
.park-inner { max-width: 560px; margin: 0 auto; padding: 3rem 1.5rem 5rem; }
.park-header { margin-bottom: 1.8rem; }
.park-title { font-family: 'Playfair Display', serif; font-size: 2rem; color: var(--ink); }
.park-sub { margin-top: 0.4rem; font-size: 0.9rem; color: var(--ink-light); line-height: 1.5; }
.park-item {
  display: flex; align-items: flex-start; gap: 0.8rem;
  background: var(--surface); border: 1px solid var(--rule); border-radius: 12px;
  padding: 1rem 1.1rem; margin-bottom: 0.7rem;
}
.park-item-body { flex: 1; }
.park-item-text { font-family: 'IBM Plex Serif', serif; font-size: 1rem; color: var(--ink); line-height: 1.4; }
.park-item-meta { font-size: 0.75rem; color: var(--ink-light); margin-top: 0.35rem; }
.park-item-del {
  flex-shrink: 0; width: 1.9rem; height: 1.9rem; border-radius: 50%;
  border: 1px solid var(--rule); background: var(--surface2); color: var(--ink-light);
  font-size: 0.85rem; cursor: pointer; transition: all 0.15s;
}
.park-item-del:hover { background: var(--red-pale); color: var(--red); border-color: var(--red-pale); }
.park-empty { font-size: 0.9rem; color: var(--ink-light); line-height: 1.6; text-align: center; padding: 2rem 1rem; }

/* ══════════════════════════════════
   45/15 ULTRADIAN MODE (F6)
══════════════════════════════════ */
.g-mode-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.g-mode-opt {
  display: flex; flex-direction: column; gap: 0.15rem;
  text-align: left; padding: 0.85rem 1rem;
  background: var(--surface); border: 1.5px solid var(--rule); border-radius: 6px;
  cursor: pointer; transition: all 0.12s;
}
.g-mode-opt:hover { border-color: var(--rule-strong); }
.g-mode-opt.active { border-color: var(--blue); background: var(--blue-ghost); box-shadow: 0 0 0 1px var(--blue) inset; }
.g-mode-opt-title { font-family: 'Syne', sans-serif; font-weight: 700; font-size: 0.9rem; color: var(--ink); }
.g-mode-opt-sub { font-family: 'Syne Mono', monospace; font-size: 0.62rem; color: var(--ink-light); letter-spacing: 0.03em; }

/* buffer screen */
.g-buffer-eyebrow { font-family:'Syne Mono',monospace; font-size:0.68rem; letter-spacing:0.18em; text-transform:uppercase; color: var(--green); text-align:center; margin-bottom: 0.5rem; }
.g-buffer-title { font-size: 2rem; font-weight: 800; color: var(--ink); text-align:center; letter-spacing:-0.02em; }
.g-buffer-sub { font-family:'Syne',sans-serif; font-size:0.9rem; color: var(--ink-mid); text-align:center; margin: 0.4rem 0 1.5rem; line-height:1.5; }
.g-ring-fill-buffer { stroke: var(--green); }
.g-buffer-suggestions { display:flex; flex-wrap:wrap; gap:0.5rem; justify-content:center; margin: 1.4rem 0; }
.g-buffer-suggestions span {
  font-family:'Syne Mono',monospace; font-size:0.7rem; letter-spacing:0.04em; text-transform:uppercase;
  color: var(--green); background: var(--green-pale); border-radius: 999px; padding: 0.4rem 0.85rem;
}
.g-btn-locked { opacity: 0.4; cursor: not-allowed; }
.g-btn-locked:hover { background: var(--blue); }
.g-buffer-lock-note { font-family:'Syne Mono',monospace; font-size:0.65rem; color: var(--ink-light); letter-spacing:0.05em; text-align:center; margin-top: 0.9rem; }

/* ══════════════════════════════════
   SETTINGS: reminder toggle + time
══════════════════════════════════ */
.set-reminder-row { display: flex; align-items: center; gap: 0.7rem; flex-wrap: wrap; }
.set-reminder-label { font-size: 0.9rem; color: var(--ink); }
.set-time-input {
  font-family: 'IBM Plex Mono', monospace; font-size: 0.95rem; color: var(--ink);
  background: var(--surface2); border: 1.5px solid var(--rule); border-radius: 8px;
  padding: 0.45rem 0.6rem; outline: none;
}
.set-time-input:focus { border-color: var(--blue-mid); }
.set-toggle { position: relative; display: inline-block; width: 44px; height: 26px; flex-shrink: 0; }
.set-toggle input { opacity: 0; width: 0; height: 0; }
.set-toggle-track { position: absolute; inset: 0; background: var(--rule-strong); border-radius: 999px; transition: background 0.18s; }
.set-toggle-thumb { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; background: #fff; border-radius: 50%; transition: transform 0.18s; box-shadow: 0 1px 3px rgba(0,0,0,0.25); }
.set-toggle input:checked + .set-toggle-track { background: var(--blue); }
.set-toggle input:checked + .set-toggle-track .set-toggle-thumb { transform: translateX(18px); }

/* ══════════════════════════════════
   WEDGE TIMER (F5)
══════════════════════════════════ */
#view-wedge { background: var(--bg); }
.wdg-inner { max-width: 540px; margin: 0 auto; padding: 3rem 1.5rem 5rem; min-height: 100vh; display: flex; flex-direction: column; justify-content: center; }
.wdg-screen { display: none; }
.wdg-screen.active { display: block; }
.wdg-masthead { margin-bottom: 2rem; }
.wdg-brand { font-family: 'Playfair Display', serif; font-size: 2.2rem; color: var(--ink); }
.wdg-tagline { font-size: 0.85rem; color: var(--warm); letter-spacing: 0.02em; margin-top: 0.3rem; }
.wdg-field { margin-bottom: 1.5rem; }
.wdg-label { display: block; font-family: 'Syne Mono', monospace; font-size: 0.65rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--ink-mid); margin-bottom: 0.6rem; }
.wdg-textarea, .wdg-label-input, .wdg-time-input {
  width: 100%; box-sizing: border-box; font-family: 'IBM Plex Serif', serif; font-size: 1rem; color: var(--ink);
  background: var(--surface); border: 1.5px solid var(--rule); border-radius: 10px; padding: 0.8rem 0.9rem; outline: none; transition: border-color 0.15s;
}
.wdg-textarea { resize: none; }
.wdg-textarea:focus, .wdg-label-input:focus, .wdg-time-input:focus { border-color: var(--warm); }
.wdg-presets { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.8rem; }
.wdg-preset {
  display: flex; flex-direction: column; align-items: flex-start;
  font-family: 'Syne', sans-serif; font-size: 0.85rem; color: var(--ink); font-weight: 600;
  background: var(--surface); border: 1.5px solid var(--rule); border-radius: 10px; padding: 0.5rem 0.8rem; cursor: pointer; transition: all 0.15s;
}
.wdg-preset span { font-family: 'IBM Plex Mono', monospace; font-size: 0.7rem; color: var(--ink-light); font-weight: 400; }
.wdg-preset:hover { border-color: var(--warm); }
.wdg-preset.active { border-color: var(--warm); background: var(--warm-ghost); }
.wdg-custom-row { display: flex; gap: 0.6rem; }
.wdg-custom-row .wdg-time-input { flex: 0 0 auto; width: auto; }
.wdg-custom-row .wdg-label-input { flex: 1; }
.wdg-btn {
  font-family: 'Epilogue', sans-serif; font-size: 0.95rem; font-weight: 500; border-radius: 12px; padding: 0.9rem 1.4rem;
  cursor: pointer; border: 1.5px solid transparent; transition: all 0.15s; width: 100%; margin-top: 0.4rem;
}
.wdg-btn:active { transform: scale(0.98); }
.wdg-btn-primary { background: var(--warm); color: #fff; }
.wdg-btn-primary:hover { background: var(--warm-mid); }
.wdg-btn-green { background: var(--green); color: #fff; }
.wdg-btn-ghost { background: transparent; border-color: var(--rule); color: var(--ink-mid); }
.wdg-btn-ghost:hover { border-color: var(--rule-strong); color: var(--ink); }
.wdg-error { color: var(--red); font-size: 0.85rem; margin-top: 0.8rem; min-height: 1rem; text-align: center; }
/* active */
#wdg-active { text-align: center; }
.wdg-active-task-label { font-family: 'Syne Mono', monospace; font-size: 0.65rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--ink-light); margin-bottom: 0.6rem; }
.wdg-active-task { font-family: 'Fraunces', serif; font-size: 1.4rem; font-weight: 600; color: var(--ink); line-height: 1.35; margin-bottom: 2rem; }
.wdg-countdown { font-family: 'IBM Plex Mono', monospace; font-size: 5rem; font-weight: 300; color: var(--ink); line-height: 1; font-variant-numeric: tabular-nums; }
.wdg-countdown.wdg-urgent { color: var(--warm); }
.wdg-countdown.wdg-hit { color: var(--red); }
.wdg-until { font-family: 'Syne Mono', monospace; font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-mid); margin-top: 0.8rem; }
.wdg-warn { font-size: 0.9rem; color: var(--warm); font-weight: 500; min-height: 1.3rem; margin-top: 1rem; }
.wdg-btn-row { display: flex; flex-direction: column; gap: 0.6rem; margin-top: 2rem; }
/* done */
#wdg-done { text-align: center; }
.wdg-done-emoji { font-size: 3rem; margin-bottom: 0.5rem; }
.wdg-done-title { font-family: 'Playfair Display', serif; font-size: 2rem; color: var(--ink); margin-bottom: 0.5rem; }
.wdg-done-sub { font-size: 0.95rem; color: var(--ink-mid); line-height: 1.5; margin-bottom: 2rem; max-width: 24rem; margin-left: auto; margin-right: auto; }

/* wedge home card */
#wedge-home-card {
  display: none; align-items: center; gap: 0.8rem; width: 100%; text-align: left;
  background: var(--warm-ghost); border: 1px solid var(--warm-pale); border-radius: 12px; padding: 0.9rem 1rem; cursor: pointer; transition: all 0.15s;
}
#wedge-home-card:hover { transform: translateY(-1px); border-color: var(--warm-mid); }
.wedge-home-icon { font-size: 1.3rem; flex-shrink: 0; }
.wedge-home-body { display: flex; flex-direction: column; }
.wedge-home-task { font-size: 0.92rem; color: var(--ink); font-weight: 600; }
.wedge-home-meta { font-size: 0.78rem; color: var(--warm); margin-top: 0.15rem; }

/* ══════════════════════════════════
   EVENING SHUTDOWN (F1)
══════════════════════════════════ */
#view-shutdown { background: var(--bg); }
.sd-inner { max-width: 540px; margin: 0 auto; padding: 3rem 1.5rem 5rem; min-height: 100vh; display: flex; flex-direction: column; justify-content: center; }
.sd-screen { display: none; }
.sd-screen.active { display: block; }
.sd-brand { font-family: 'Playfair Display', serif; font-size: 2.2rem; color: var(--ink); margin-bottom: 0.5rem; }
.sd-lead { font-size: 0.95rem; color: var(--ink-light); line-height: 1.6; margin-bottom: 2rem; }
.sd-step-label { font-family: 'Syne Mono', monospace; font-size: 0.65rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--lilac); margin-bottom: 0.4rem; }
.sd-step-title { font-family: 'Fraunces', serif; font-size: 1.5rem; font-weight: 600; color: var(--ink); margin-bottom: 1.4rem; line-height: 1.3; }
.sd-input, .sd-textarea {
  width: 100%; box-sizing: border-box; font-family: 'IBM Plex Serif', serif; font-size: 1rem; color: var(--ink);
  background: var(--surface); border: 1.5px solid var(--rule); border-radius: 10px; padding: 0.8rem 0.9rem; outline: none; margin-bottom: 1.4rem; transition: border-color 0.15s;
}
.sd-textarea { resize: none; }
.sd-input:focus, .sd-textarea:focus { border-color: var(--lilac); }
.sd-btn {
  font-family: 'Epilogue', sans-serif; font-size: 0.95rem; font-weight: 500; border-radius: 12px; padding: 0.9rem 1.4rem;
  cursor: pointer; border: 1.5px solid transparent; transition: all 0.15s; width: 100%; margin-top: 0.4rem;
}
.sd-btn:active { transform: scale(0.98); }
.sd-btn-primary { background: var(--lilac); color: #fff; }
.sd-btn-primary:hover { background: #8676bd; }
.sd-btn-ghost { background: transparent; border-color: var(--rule); color: var(--ink-mid); }
.sd-btn-ghost:hover { border-color: var(--rule-strong); color: var(--ink); }
.sd-empty { font-size: 0.9rem; color: var(--ink-light); line-height: 1.5; padding: 1rem 0 1.5rem; }
/* top3 + parking review items */
.sd-top3-item, .sd-park-item {
  background: var(--surface); border: 1px solid var(--rule); border-radius: 12px; padding: 0.9rem 1rem; margin-bottom: 0.7rem;
}
.sd-top3-text, .sd-park-text { font-family: 'IBM Plex Serif', serif; font-size: 1rem; color: var(--ink); margin-bottom: 0.6rem; line-height: 1.4; }
.sd-top3-btns, .sd-park-btns { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.sd-chip {
  font-family: 'Epilogue', sans-serif; font-size: 0.8rem; color: var(--ink-mid);
  background: var(--surface2); border: 1px solid var(--rule); border-radius: 999px; padding: 0.35rem 0.8rem; cursor: pointer; transition: all 0.15s;
}
.sd-chip:hover { border-color: var(--rule-strong); }
.sd-chip.active { background: var(--lilac); color: #fff; border-color: var(--lilac); }
.sd-chip-del:hover { background: var(--red-pale); color: var(--red); border-color: var(--red-pale); }
.sd-park-kept { opacity: 0.5; }
/* close */
#sd-close { text-align: center; }
.sd-close-moon { font-size: 3rem; margin-bottom: 0.6rem; }
.sd-close-title { font-family: 'Playfair Display', serif; font-size: 2.2rem; color: var(--ink); margin-bottom: 0.6rem; }
.sd-close-sub { font-size: 0.95rem; color: var(--ink-mid); line-height: 1.6; margin-bottom: 2rem; max-width: 24rem; margin-left: auto; margin-right: auto; }

/* Morning Launch starter suggestions (from shutdown) */
.m-starter { margin: 0.4rem 0 1.2rem; }
.m-starter-label { font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-light); margin-bottom: 0.5rem; }
.m-starter-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.m-starter-chip {
  font-family: 'Epilogue', sans-serif; font-size: 0.82rem; color: var(--ink);
  background: rgba(255,255,255,0.65); border: 1px solid var(--rule); border-radius: 999px;
  padding: 0.4rem 0.85rem; cursor: pointer; transition: all 0.15s;
}
.m-starter-chip:hover { background: #fff; border-color: var(--rule-strong); transform: translateY(-1px); }
