@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800&family=Sora:wght@600;700;800&display=swap");

:root {
  color-scheme: light;
  --signal-green: #3f6f5b;
  --cloud-rice: #f6f4ee;
  --fresh-basil: #88a06b;
  --persimmon: #d86f45;
  --graphite: #252a27;
  --ink: var(--graphite);
  --muted: #5f6962;
  --line: #d7d8cf;
  --surface: var(--cloud-rice);
  --panel: #fffdf8;
  --mobile-bg: #dfe9d6;
  --accent: var(--signal-green);
  --accent-dark: #315949;
  --warm: var(--persimmon);
  --soft: #edf2e8;
  --shadow: 0 18px 60px rgba(37, 42, 39, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--cloud-rice);
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  overflow-x: hidden;
  background: #171615;
}

.landing-page {
  min-height: 100vh;
  background: var(--cloud-rice);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.login-showcase {
  width: min(430px, calc(100% - 32px));
  min-height: min(100vh, 760px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(280px, 380px);
  align-items: stretch;
  justify-content: center;
  padding: 32px 0;
}

.login-single {
  width: min(390px, calc(100% - 28px));
}

.login-phone {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: min(690px, calc(100vh - 64px));
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 26px;
  padding: 26px;
  border: 1px solid rgba(255, 253, 248, 0.14);
  border-radius: 26px;
  overflow: hidden;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.28);
}

.login-phone-dark {
  color: #ffffff;
  background:
    linear-gradient(180deg, rgba(12, 25, 20, 0.98), rgba(18, 29, 25, 0.96)),
    url("assets/cleaning-timer-hero.png") 60% center / cover;
}

.phone-status {
  min-height: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0;
}

.login-phone-dark .phone-status {
  color: rgba(255, 255, 255, 0.92);
}

.phone-brand-block {
  align-self: center;
  display: grid;
  justify-items: center;
  gap: 10px;
  text-align: center;
}

.leaf-mark {
  width: 74px;
  height: 74px;
  position: relative;
}

.leaf-mark::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 8px;
  width: 4px;
  height: 46px;
  border-radius: 999px;
  background: currentColor;
  transform: translateX(-50%);
  opacity: 0.9;
}

.leaf-mark span {
  position: absolute;
  width: 22px;
  height: 34px;
  border-radius: 999px 999px 2px 999px;
  background: currentColor;
}

.leaf-mark span:nth-child(1) {
  left: 26px;
  top: 0;
  transform: rotate(8deg);
}

.leaf-mark span:nth-child(2) {
  left: 8px;
  top: 26px;
  transform: rotate(-42deg);
}

.leaf-mark span:nth-child(3) {
  right: 8px;
  top: 26px;
  transform: rotate(42deg) scaleX(-1);
}

.login-phone-dark .leaf-mark {
  color: var(--fresh-basil);
}

.phone-brand {
  margin: 0;
  font-family: Sora, Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: clamp(1.7rem, 3.4vw, 2.25rem);
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.brand-rule {
  width: 24px;
  height: 3px;
  margin: 4px 0 8px;
  border-radius: 999px;
  background: currentColor;
}

.login-phone-dark .brand-rule {
  color: var(--fresh-basil);
}

.phone-copy,
.phone-subcopy {
  max-width: 230px;
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.45;
}

.phone-copy {
  font-weight: 700;
}

.phone-subcopy {
  color: inherit;
  opacity: 0.86;
}

.phone-login-form {
  align-self: end;
  display: grid;
  gap: 14px;
}

.auth-mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.auth-mode-tab {
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.78);
  background: transparent;
  font-size: 0.78rem;
  font-weight: 850;
}

.auth-mode-tab.is-active {
  color: #111b16;
  background: var(--fresh-basil);
}

.phone-input {
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 8px;
  padding: 0 16px;
  font-size: 0.92rem;
  font-weight: 700;
}

.phone-input input {
  flex: 1;
}

.phone-input {
  color: rgba(255, 255, 255, 0.84);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(14px);
}

.phone-input input {
  min-width: 0;
  border: 0;
  color: #ffffff;
  background: transparent;
  outline: 0;
}

.phone-input input::placeholder {
  color: rgba(255, 255, 255, 0.74);
}

.field-icon {
  width: 18px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  border: 1.5px solid currentColor;
  border-radius: 4px;
  font-size: 0.62rem;
  font-weight: 850;
  line-height: 1;
  opacity: 0.9;
}

.phone-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 4px 0 22px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 0.78rem;
  font-weight: 800;
}

.phone-options label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.phone-options input {
  width: 18px;
  height: 18px;
  accent-color: var(--fresh-basil);
}

.phone-options a {
  color: var(--fresh-basil);
  text-decoration-color: rgba(136, 160, 107, 0.45);
  text-underline-offset: 3px;
}

.phone-login-button {
  min-height: 62px;
  border: 0;
  border-radius: 8px;
  color: #ffffff;
  background: linear-gradient(90deg, var(--signal-green), var(--fresh-basil));
  font-weight: 850;
}

.phone-login-button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.auth-status {
  min-height: 34px;
  margin: -8px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.78rem;
  font-weight: 750;
  line-height: 1.35;
}

.onboarding-page {
  width: min(760px, calc(100% - 28px));
  padding: 28px 0;
}

.onboarding-panel {
  display: grid;
  gap: 24px;
  max-height: calc(100vh - 56px);
  overflow: auto;
  padding: 26px;
  border: 1px solid rgba(255, 253, 248, 0.14);
  border-radius: 18px;
  color: #ffffff;
  background:
    linear-gradient(180deg, rgba(12, 25, 20, 0.98), rgba(18, 29, 25, 0.96)),
    url("assets/cleaning-timer-hero.png") 60% center / cover;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.28);
}

.onboarding-header {
  display: grid;
  gap: 10px;
}

.onboarding-header h1,
.onboarding-header p {
  margin: 0;
}

.onboarding-header h1 {
  font-family: Sora, Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: clamp(1.6rem, 4vw, 2.35rem);
  line-height: 1.05;
}

.onboarding-header p,
.room-setup-section p {
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.45;
}

.home-profile-form,
.onboarding-fieldset,
.room-setup-section,
.core-room-list,
.extra-room-list {
  display: grid;
  gap: 16px;
}

.onboarding-fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.onboarding-fieldset legend,
.onboarding-room-card label {
  margin-bottom: 8px;
  font-size: 0.88rem;
  font-weight: 850;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.choice-card {
  min-height: 54px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  font-weight: 850;
}

.choice-card input {
  width: 18px;
  height: 18px;
  accent-color: var(--fresh-basil);
}

.core-room-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.extra-room-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.onboarding-room-card,
.onboarding-room-card label {
  display: grid;
  gap: 8px;
}

.onboarding-room-card {
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.16);
}

.onboarding-room-card.is-selected {
  border-color: rgba(136, 160, 107, 0.76);
  background: rgba(136, 160, 107, 0.18);
}

.onboarding-room-card.is-locked {
  border-color: rgba(136, 160, 107, 0.5);
}

.room-toggle-button {
  min-height: 48px;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  padding: 0 12px;
  color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.08);
  font: inherit;
  font-weight: 850;
}

.onboarding-room-card.is-selected .room-toggle-button {
  color: #111b16;
  background: var(--fresh-basil);
  border-color: var(--fresh-basil);
}

.onboarding-room-card.is-locked .room-toggle-button {
  cursor: default;
}

.onboarding-room-card input {
  min-height: 48px;
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  padding: 0 12px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  font: inherit;
  outline: 0;
}

.onboarding-room-card input::placeholder {
  color: rgba(255, 255, 255, 0.65);
}

.room-setup-section h2,
.room-setup-section p {
  margin: 0;
}

.room-setup-section h2 {
  font-size: 1.05rem;
}

.onboarding-status {
  margin-top: 0;
}

.landing-nav {
  width: min(1180px, calc(100% - 32px));
  height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand-mark {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  color: var(--graphite);
  font-family: Sora, Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 1.08rem;
  font-weight: 850;
  text-decoration: none;
}

.brand-mark span:nth-child(2) {
  color: var(--persimmon);
}

.nav-action,
.landing-primary,
.landing-secondary {
  min-height: 46px;
  border-radius: 8px;
  font-weight: 850;
}

.nav-action {
  padding: 0 16px;
  border: 1px solid rgba(63, 111, 91, 0.28);
  color: var(--accent-dark);
  background: rgba(255, 253, 248, 0.84);
}

.landing-hero {
  width: min(1180px, calc(100% - 32px));
  min-height: calc(88vh - 72px);
  margin: 0 auto;
  display: grid;
  align-items: center;
  overflow: hidden;
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(37, 42, 39, 0.72) 0%, rgba(37, 42, 39, 0.48) 38%, rgba(37, 42, 39, 0.08) 74%),
    url("assets/cleaning-timer-hero.png") center / cover;
  box-shadow: var(--shadow);
}

.landing-copy {
  width: min(640px, 100%);
  padding: clamp(28px, 7vw, 76px);
  color: #ffffff;
}

.landing-kicker {
  margin: 0 0 16px;
  color: #f2c2ad;
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.landing-copy h1 {
  max-width: 610px;
  margin: 0;
  font-size: clamp(3rem, 7.2vw, 6.7rem);
  line-height: 0.91;
}

.landing-lede {
  max-width: 570px;
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(1.05rem, 2vw, 1.34rem);
  font-weight: 650;
  line-height: 1.55;
}

.landing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.landing-primary,
.landing-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  text-decoration: none;
}

.landing-primary {
  border: 1px solid var(--persimmon);
  color: #ffffff;
  background: var(--persimmon);
}

.landing-secondary {
  border: 1px solid rgba(255, 255, 255, 0.48);
  color: #ffffff;
  background: rgba(255, 253, 248, 0.12);
}

.beta-strip {
  width: min(1180px, calc(100% - 32px));
  margin: 18px auto 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  overflow: hidden;
  border: 1px solid rgba(215, 216, 207, 0.95);
  border-radius: 8px;
  background: rgba(215, 216, 207, 0.95);
}

.beta-strip article {
  min-height: 168px;
  padding: 22px;
  background: var(--panel);
}

.beta-strip span {
  color: var(--persimmon);
  font-size: 0.78rem;
  font-weight: 850;
}

.beta-strip h2 {
  margin: 18px 0 8px;
  color: var(--signal-green);
  font-size: 1.08rem;
}

.beta-strip p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 650;
  line-height: 1.45;
}

.app-shell {
  width: min(1180px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 24px;
  align-items: center;
  padding: 32px 0;
}

.focus-page[hidden] {
  display: none;
}

.is-focus-mode .app-shell {
  display: none;
}

.focus-page {
  width: min(920px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  place-items: center;
  padding: 32px 0;
}

.focus-card {
  width: 100%;
  min-height: min(760px, calc(100vh - 64px));
  display: grid;
  align-content: center;
  justify-items: start;
  padding: clamp(24px, 7vw, 72px);
  border: 1px solid rgba(215, 216, 207, 0.95);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.96);
  box-shadow: var(--shadow);
}

.timer-panel,
.routine-panel {
  background: rgba(255, 253, 248, 0.92);
  border: 1px solid rgba(215, 216, 207, 0.95);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.timer-panel {
  padding: clamp(24px, 5vw, 56px);
}

.routine-panel {
  max-height: calc(100vh - 64px);
  overflow: auto;
  padding: 20px;
}

.user-panel {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid #d8dfcc;
  border-radius: 8px;
  background: #f1f4eb;
}

.user-panel-header {
  display: flex;
  align-items: end;
  gap: 10px;
}

.user-panel-header {
  justify-content: space-between;
  align-items: center;
}

.user-panel-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.user-panel-label {
  margin: 0;
  color: var(--warm);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.user-panel h2 {
  margin: 2px 0 0;
  color: var(--signal-green);
  font-size: 1rem;
}

.account-badge {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.home-profile-module {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid #d8dfcc;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.68);
}

.profile-module-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.profile-module-label {
  margin: 0;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.profile-module-header h3 {
  margin: 2px 0 0;
  color: var(--ink);
  font-size: 0.98rem;
}

.profile-summary-pill {
  flex: 0 0 auto;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border-radius: 999px;
  color: #ffffff;
  background: var(--signal-green);
  font-size: 0.78rem;
  font-weight: 850;
  white-space: nowrap;
}

.profile-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.profile-facts div {
  min-width: 0;
  padding: 8px;
  border-radius: 8px;
  background: var(--soft);
}

.profile-facts dt {
  margin: 0 0 2px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.profile-facts dd {
  margin: 0;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.home-room-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.home-room-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid #cbd9c0;
  border-radius: 999px;
  color: var(--accent-dark);
  background: var(--panel);
  font-size: 0.78rem;
  font-weight: 850;
}

.user-status {
  min-height: 1.2em;
  margin: 0;
  color: var(--persimmon);
  font-size: 0.84rem;
  font-weight: 700;
}

.app-header,
.routine-header,
.controls,
.utility-row,
.action-select {
  display: flex;
  align-items: center;
}

.app-header,
.routine-header,
.utility-row {
  justify-content: space-between;
  gap: 16px;
}

.eyebrow,
.step-counter {
  margin: 0;
  color: var(--warm);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2,
h3,
.time-display {
  font-family: Sora, Inter, ui-sans-serif, system-ui, sans-serif;
}

h1 {
  margin: 4px 0 0;
  font-size: clamp(2.2rem, 5vw, 4.8rem);
  line-height: 0.98;
}

.focus-card h1 {
  margin: 14px 0 14px;
  font-size: clamp(3rem, 10vw, 7.2rem);
  line-height: 0.92;
}

.routine-header h2,
.current-list-panel h3,
.load-list-panel h3 {
  margin: 0;
  font-size: 1rem;
}

.icon-button,
.remove-action {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--panel);
}

.progress-wrap {
  height: 12px;
  margin: 34px 0 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #e4e5dc;
}

.progress-bar {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: var(--signal-green);
  transition: width 220ms ease;
}

.current-action {
  min-height: 330px;
  display: grid;
  align-content: center;
  justify-items: start;
}

.session-summary {
  margin: 0 0 30px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 800;
}

.current-action h2 {
  margin: 12px 0 10px;
  font-size: clamp(2.4rem, 7vw, 6rem);
  line-height: 0.94;
}

.current-action p:not(.step-counter) {
  max-width: 700px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.28rem);
  line-height: 1.55;
}

.time-display {
  margin-top: 34px;
  font-size: clamp(4rem, 12vw, 9rem);
  font-weight: 850;
  line-height: 0.9;
  font-variant-numeric: tabular-nums;
}

.focus-prompt {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1.1rem, 2.4vw, 1.45rem);
  line-height: 1.5;
}

.focus-time-display {
  margin-top: 36px;
  font-family: Sora, Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: clamp(5rem, 18vw, 12rem);
  font-weight: 850;
  line-height: 0.9;
  font-variant-numeric: tabular-nums;
}

.focus-progress-wrap {
  width: 100%;
  height: 14px;
  margin: 34px 0;
  overflow: hidden;
  border-radius: 999px;
  background: #e4e5dc;
}

.controls {
  gap: 12px;
}

.focus-controls {
  width: 100%;
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 12px;
}

.primary-button,
.secondary-button,
.text-button,
.stop-button {
  min-height: 46px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-weight: 800;
}

.primary-button {
  flex: 1;
  color: #ffffff;
  background: var(--accent);
  border-color: var(--accent);
}

.primary-button:hover,
.primary-button:focus-visible {
  background: var(--accent-dark);
}

.secondary-button {
  min-width: 116px;
  color: var(--accent-dark);
  background: var(--soft);
  border-color: #cbd9c0;
}

.text-button {
  min-height: auto;
  padding: 0;
  color: var(--accent-dark);
  background: transparent;
}

.feedback-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.feedback-link:hover,
.feedback-link:focus-visible {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.stop-button {
  color: #ffffff;
  background: var(--persimmon);
  border-color: var(--persimmon);
}

.done-button {
  min-height: 58px;
}

.utility-row {
  margin-top: 18px;
}

.sound-toggle {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-weight: 700;
}

.action-list {
  display: grid;
  gap: 10px;
  margin: 20px 0;
  padding: 0;
  list-style: none;
}

.load-list-panel {
  display: grid;
  gap: 14px;
  margin: 18px 0;
  padding: 14px;
  border: 1px solid #d8dfcc;
  border-radius: 8px;
  background: #fffaf0;
}

.load-list-panel h3,
.session-length-panel h4 {
  color: var(--signal-green);
}

.session-length-panel {
  display: grid;
  gap: 12px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.setup-section {
  display: grid;
  gap: 10px;
  padding-top: 14px;
  border: 1px solid #d8dfcc;
  border-width: 1px 0 0;
  border-radius: 0;
}

.current-list-panel {
  margin-top: 18px;
}

.current-list-panel h3 {
  color: var(--signal-green);
}

.setup-details,
.add-action-details {
  border: 1px solid #d8dfcc;
  border-radius: 8px;
  background: var(--panel);
}

.setup-details {
  padding: 0;
}

.session-length-panel h4 {
  margin: 0;
  font-size: 0.95rem;
}

.selection-summary {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 850;
}

.quick-minutes {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.minute-chip {
  min-height: 40px;
  border: 1px solid #cbd9c0;
  border-radius: 8px;
  color: var(--accent-dark);
  background: var(--panel);
  font-weight: 800;
}

.minute-chip.is-selected {
  color: #ffffff;
  background: var(--signal-green);
  border-color: var(--signal-green);
}

.setup-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 16px;
}

.setup-step-tab {
  min-height: 46px;
  border: 1px solid #cbd9c0;
  border-radius: 8px;
  color: var(--accent-dark);
  background: var(--soft);
  font-weight: 850;
}

.setup-step-tab.is-active {
  color: #ffffff;
  background: var(--signal-green);
  border-color: var(--signal-green);
}

.setup-step-panel {
  display: none;
}

.setup-step-panel.is-active {
  display: grid;
  gap: 14px;
}

.setup-step-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.mobile-start-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 58px;
}

.routine-button-list {
  display: grid;
  gap: 10px;
  max-height: min(46vh, 520px);
  overflow: auto;
  padding-right: 2px;
}

.room-button-grid {
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 8px;
}

.setup-step-kicker {
  display: none;
}

.routine-card {
  min-height: 58px;
  width: 100%;
  display: grid;
  align-content: center;
  gap: 4px;
  border: 1px solid #cbd9c0;
  border-radius: 8px;
  padding: 12px;
  color: var(--ink);
  background: var(--panel);
  text-align: left;
  white-space: normal;
}

.routine-card.is-selected {
  color: #ffffff;
  background: var(--signal-green);
  border-color: var(--signal-green);
}

.routine-card span {
  display: block;
}

.routine-card-name {
  font-weight: 850;
  line-height: 1.18;
}

.routine-card-group {
  margin-top: 4px;
  color: inherit;
  font-size: 0.82rem;
  opacity: 0.78;
}

.room-button-grid .routine-card {
  min-height: 52px;
  padding: 9px 10px;
  gap: 2px;
}

.room-button-grid .routine-card-name {
  font-size: 0.92rem;
  line-height: 1.14;
}

.room-button-grid .routine-card-group {
  margin-top: 2px;
  font-size: 0.72rem;
}

.load-list-panel label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.setup-details label {
  margin-top: 12px;
}

.setup-details summary,
.add-action-details summary {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  color: var(--signal-green);
  font-weight: 850;
  list-style: none;
  cursor: pointer;
}

.setup-details summary::-webkit-details-marker,
.add-action-details summary::-webkit-details-marker {
  display: none;
}

.setup-details summary::after,
.add-action-details summary::after {
  content: "+";
  color: var(--persimmon);
  font-size: 1.25rem;
  line-height: 1;
}

.setup-details[open] summary::after,
.add-action-details[open] summary::after {
  content: "-";
}

.setup-details > label,
.setup-details > .load-button {
  margin: 0 14px 14px;
}

.load-list-panel select,
.load-list-panel input,
.load-list-panel textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--ink);
  background: var(--panel);
}

.load-button {
  width: 100%;
}

.list-status {
  min-height: 1.2em;
  margin: 0;
  color: var(--persimmon);
  font-size: 0.88rem;
  font-weight: 700;
}

.action-item {
  display: grid;
  grid-template-columns: 1fr 42px;
  gap: 8px;
}

.action-select {
  min-height: 56px;
  width: 100%;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--panel);
  text-align: left;
}

.action-item.is-active .action-select {
  border-color: var(--accent);
  background: var(--soft);
}

.action-name {
  font-weight: 800;
}

.action-duration {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
}

.add-action-form {
  display: grid;
  gap: 12px;
  padding: 0 14px 14px;
}

.add-action-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.add-action-form input,
.add-action-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--ink);
  background: var(--panel);
}

.add-button {
  width: 100%;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(63, 111, 91, 0.28);
  outline-offset: 2px;
}

@media (max-width: 900px) {
  .login-page {
    min-height: auto;
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .login-phone {
    min-height: min(720px, calc(100vh - 48px));
  }

  .landing-hero {
    min-height: 76vh;
    background:
      linear-gradient(180deg, rgba(37, 42, 39, 0.74) 0%, rgba(37, 42, 39, 0.46) 54%, rgba(37, 42, 39, 0.14) 100%),
      url("assets/cleaning-timer-hero.png") 58% center / cover;
  }

  .beta-strip {
    grid-template-columns: 1fr;
  }

  .beta-strip article {
    min-height: auto;
  }

  .app-shell {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .routine-panel {
    max-height: none;
  }
}

@media (max-width: 560px) {
  body {
    background: var(--mobile-bg);
  }

  .login-body {
    background: #0f1512;
  }

  .onboarding-page {
    width: min(100% - 18px, 760px);
    padding: 9px 0;
  }

  .onboarding-panel {
    max-height: none;
    padding: 20px;
    border-radius: 14px;
  }

  .choice-grid,
  .core-room-list,
  .extra-room-list {
    grid-template-columns: 1fr;
  }

  .login-page {
    width: min(100% - 18px, 390px);
    padding: 9px 0;
  }

  .login-phone {
    min-height: calc(100vh - 18px);
    padding: 18px;
    border-radius: 18px;
  }

  .phone-brand {
    font-size: clamp(1.4rem, 7.5vw, 1.9rem);
    letter-spacing: 0.08em;
  }

  .phone-input {
    min-height: 56px;
  }

  .landing-page {
    background: var(--mobile-bg);
  }

  .landing-nav {
    width: min(100% - 24px, 1180px);
    height: 64px;
  }

  .brand-mark {
    font-size: 0.98rem;
  }

  .nav-action {
    min-height: 40px;
    padding: 0 12px;
    font-size: 0.9rem;
  }

  .landing-hero {
    width: min(100% - 24px, 1180px);
    min-height: 70vh;
    align-items: end;
    background:
      linear-gradient(180deg, rgba(37, 42, 39, 0.34) 0%, rgba(37, 42, 39, 0.56) 42%, rgba(37, 42, 39, 0.78) 100%),
      url("assets/cleaning-timer-hero.png") 61% center / cover;
  }

  .landing-copy {
    padding: 22px;
  }

  .landing-copy h1 {
    font-size: clamp(2.7rem, 17vw, 4.2rem);
  }

  .landing-lede {
    margin-top: 18px;
    font-size: 1rem;
  }

  .landing-actions {
    display: grid;
    margin-top: 24px;
  }

  .landing-primary,
  .landing-secondary {
    width: 100%;
    min-height: 52px;
  }

  .beta-strip {
    width: min(100% - 24px, 1180px);
    margin-top: 12px;
  }

  .app-shell {
    width: min(100% - 24px, 1180px);
    min-height: 100vh;
    padding: 12px 0;
    gap: 12px;
  }

  .timer-panel,
  .routine-panel {
    padding: 18px;
    background: var(--panel);
  }

  body:not(.is-focus-mode) .timer-panel {
    display: none;
  }

  .routine-panel {
    min-height: calc(100vh - 24px);
    display: flex;
    flex-direction: column;
    gap: 14px;
    border: 0;
    box-shadow: none;
  }

  .routine-header {
    align-items: center;
  }

  .user-panel {
    margin-bottom: 0;
  }

  .routine-header h2 {
    font-family: Sora, Inter, ui-sans-serif, system-ui, sans-serif;
    font-size: 1.7rem;
    line-height: 1;
    white-space: nowrap;
  }

  .setup-steps {
    margin-top: 0;
  }

  .setup-step-tab {
    min-height: 48px;
  }

  .load-list-panel {
    flex: 1;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
  }

  .load-list-panel h3 {
    display: none;
  }

  .setup-step-kicker {
    display: block;
    margin: 0;
    color: var(--muted);
    font-weight: 850;
  }

  .routine-button-list {
    max-height: min(56vh, 520px);
  }

  .room-button-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .routine-card {
    min-height: 72px;
  }

  .room-button-grid .routine-card {
    min-height: 50px;
    padding: 8px 9px;
  }

  .room-button-grid .routine-card-name {
    font-size: 0.88rem;
    line-height: 1.12;
  }

  .routine-card .routine-card-group {
    display: none;
  }

  .desktop-list-picker {
    display: none;
  }

  .session-length-panel h4 {
    font-family: Sora, Inter, ui-sans-serif, system-ui, sans-serif;
    font-size: 1.45rem;
  }

  .quick-minutes {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .minute-chip {
    min-height: 58px;
    font-size: 1.1rem;
  }

  .load-list-panel select,
  .load-list-panel input,
  .load-list-panel textarea,
  .add-action-form input,
  .add-action-form textarea {
    min-height: 50px;
    font-size: 1rem;
  }

  .primary-button,
  .secondary-button,
  .text-button,
  .stop-button {
    min-height: 52px;
    font-size: 1rem;
  }

  .text-button {
    display: inline-flex;
    align-items: center;
    padding: 0 4px;
  }

  .setup-details summary,
  .add-action-details summary {
    min-height: 52px;
  }

  .current-list-panel {
    flex: 1;
    margin-top: 0;
  }

  .current-list-panel h3 {
    font-family: Sora, Inter, ui-sans-serif, system-ui, sans-serif;
    font-size: 1.8rem;
  }

  .mobile-start-button {
    min-height: 60px;
  }

  .action-list {
    margin: 0;
  }

  .action-item {
    grid-template-columns: 1fr 52px;
  }

  .action-select {
    min-height: 60px;
  }

  .remove-action {
    width: 52px;
    height: 52px;
  }

  .setup-step-controls {
    margin-top: auto;
  }

  .current-action {
    min-height: 280px;
  }

  .controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .controls .primary-button {
    grid-column: 1 / -1;
    order: -1;
  }

  .secondary-button {
    min-width: 0;
  }

  .focus-page {
    width: min(100% - 24px, 920px);
    padding: 12px 0;
  }

  .focus-card {
    min-height: calc(100vh - 24px);
    padding: 22px;
    border: 0;
    box-shadow: none;
  }

  .focus-controls {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .done-button {
    grid-column: 1 / -1;
    min-height: 64px;
  }

  .focus-controls .stop-button {
    grid-column: 1 / -1;
  }
}
