/* Kigumi web screens: Neon theme, 390px mobile first (PRD R6 themes later). */
:root {
  --bg: #07080D;
  --surface: #10121A;
  --border: #232838;
  --border-dashed: #3A4058;
  --text: #E8F1FF;
  --sub: #8A93AB;
  --soft: #C3CCE0;
  --accent: #00E5FF;
  --accent-ink: #07080D;
  --accent-glow: 0 0 22px rgba(0, 229, 255, 0.45);
  --accent-soft: #04262E;
  --select: #FF2BD6;
  --select-bg: #2A0A26;
  --good: #39FF88;
  --good-bg: #08261A;
  --pain: #FF2E88;
  --pain-bg: #2A0A1C;
  --violet: #B266FF;
  --amber: #FFB020;
  --radius: 14px;
  --sans: 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
  --display: 'Chakra Petch', 'IBM Plex Sans', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font-family: var(--sans); font-size: 15px; line-height: 1.4; -webkit-text-size-adjust: 100%; }
a { color: var(--accent); }
button, input { font: inherit; color: inherit; }

.screen {
  max-width: 430px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: 28px 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.screen > form { display: flex; flex-direction: column; gap: 18px; flex-grow: 1; }
/* In a column form the primary button keeps its height; div.grow takes the space. */
.screen > form > .btn.primary { flex-grow: 0; }
.grow { flex-grow: 1; }

.eyebrow { font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--sub); }
.eyebrow.accent { color: var(--accent); }
.eyebrow.violet { color: var(--violet); }
h1 { margin: 0; font-family: var(--display); font-weight: 600; font-size: 28px; line-height: 1.15; letter-spacing: 0.01em; }
h2 { margin: 0; font-size: 15px; font-weight: 500; }
.head { display: flex; flex-direction: column; gap: 4px; }
.sub { color: var(--sub); font-size: 14px; }
.note { color: var(--sub); font-size: 13px; line-height: 1.45; }
.mono { font-family: var(--mono); }

.card { background: var(--surface); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.section { display: flex; flex-direction: column; gap: 10px; }

/* Choice chips: a visually hidden radio or checkbox followed by its label. */
.choices { display: grid; gap: 8px; }
.choices.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.choices.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.choices.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.choices.c6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.choices.wrap { display: flex; flex-wrap: wrap; }
.choice { position: relative; display: flex; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice label, .chip {
  flex-grow: 1;
  min-height: 44px;
  padding: 0 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 15px;
  cursor: pointer;
  user-select: none;
}
.card .choice label { background: var(--bg); }
.choice input:checked + label { border: 2px solid var(--select); background: var(--select-bg); font-weight: 600; }
.choice input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }
.choices.big .choice label { min-height: 48px; font-size: 16px; }
.choice.pain-high label { border-color: var(--pain); }

/* Buttons */
.btn {
  min-height: 56px;
  padding: 0 18px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  text-decoration: none;
  cursor: pointer;
}
.btn.primary {
  min-height: 72px;
  flex-grow: 1;
  border: none;
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: var(--accent-glow);
  font-size: 17px;
  font-weight: 600;
}
.btn.tall { min-height: 72px; }
.btn.small { min-height: 44px; font-size: 15px; padding: 0 16px; }
.btn.small.primary { min-height: 44px; flex-grow: 0; font-size: 15px; }
.actions { display: flex; gap: 10px; }
.actions > form { display: flex; flex-grow: 1; }
.actions > form > .btn { flex-grow: 1; }
.actions > a.btn { flex: 1 1 0; }
.actions > form { flex: 1 1 0; }
.stack { display: flex; flex-direction: column; gap: 10px; }

/* Plan timeline */
.timeline { position: relative; display: flex; flex-direction: column; }
.timeline::before { content: ""; position: absolute; left: 47px; top: 34px; bottom: 20px; width: 2px; background: var(--border); }
.tl-label { height: 24px; padding-left: 68px; display: flex; align-items: center; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; }
.tl-row { display: flex; align-items: center; gap: 10px; min-height: 48px; color: inherit; text-decoration: none; padding: 4px 0; }
.tl-time { width: 28px; font-family: var(--mono); font-size: 11px; color: var(--sub); text-align: right; flex-shrink: 0; }
.tl-dot { width: 20px; flex-shrink: 0; display: flex; justify-content: center; position: relative; }
.tl-dot span { width: 14px; height: 14px; border-radius: 50%; box-shadow: 0 0 0 3px var(--bg); }
.tl-body { flex-grow: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.tl-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.tl-name { font-size: 15px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-dose { font-family: var(--mono); font-size: 13px; color: var(--soft); white-space: nowrap; }
.tl-why { font-size: 12px; color: var(--sub); }
.tl-row.done .tl-name, .tl-row.skipped .tl-name { color: var(--sub); }
.tl-row.skipped .tl-name { text-decoration: line-through; }
.tag { font-size: 11px; border: 1px solid var(--border); border-radius: 6px; padding: 1px 6px; color: var(--sub); margin-left: 6px; }

.k-primer { color: var(--violet); } .d-primer { background: var(--violet); }
.k-anchor { color: var(--accent); } .d-anchor { background: var(--accent); }
.k-staple { color: var(--amber); } .d-staple { background: var(--amber); }
.k-accessory { color: var(--select); } .d-accessory { background: var(--select); }
.k-mobility { color: var(--good); } .d-mobility { background: var(--good); }
.k-finisher { color: var(--pain); } .d-finisher { background: var(--pain); }

/* Logger */
.steppers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.stepper { background: var(--surface); border-radius: var(--radius); padding: 14px 10px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.stepper .row { display: flex; align-items: center; gap: 10px; }
.stepper .value { font-family: var(--mono); font-size: 28px; min-width: 2.2ch; text-align: center; }
.step-btn { width: 44px; height: 44px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--bg); color: var(--text); font-size: 22px; display: flex; align-items: center; justify-content: center; text-decoration: none; }
.rounds { display: flex; gap: 8px; }
.round { flex: 1 1 0; min-width: 0; height: 40px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); display: flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 13px; color: var(--sub); white-space: nowrap; overflow: hidden; }
.round.done { background: var(--accent-soft); border-color: var(--accent); color: var(--text); }
.round.now { border: 2px dashed var(--accent); color: var(--text); }
.rest { background: var(--surface); border-radius: var(--radius); padding: 16px 18px; display: flex; align-items: center; gap: 16px; }
.rest .clock { width: 64px; height: 64px; flex-shrink: 0; border-radius: 50%; border: 6px solid var(--border); border-top-color: var(--good); border-right-color: var(--good); display: flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 17px; }
details.card summary { font-size: 15px; font-weight: 500; cursor: pointer; }
.figs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.fig { margin: 0; height: 100px; border: 1px dashed var(--border-dashed); border-radius: var(--radius); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--sub); font-size: 11px; }
.fig strong { font-size: 13px; color: var(--text); font-weight: 400; }
.cues { margin: 0; padding-left: 18px; color: var(--soft); font-size: 14px; line-height: 1.5; }

/* Feedback */
.taps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tap { min-height: 92px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); color: var(--text); display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 4px; padding: 0 16px; text-align: left; text-decoration: none; cursor: pointer; width: 100%; }
.tap strong { font-size: 17px; font-weight: 600; }
.tap span { font-size: 13px; color: var(--sub); }
.tap.good { border: 2px solid var(--good); background: var(--good-bg); }
.tap.pain { border-color: var(--pain); background: var(--pain-bg); }
.taps form { display: flex; }

/* Swap */
.option { background: var(--surface); border-radius: var(--radius); padding: 14px 16px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.option .info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.option .name { font-size: 16px; font-weight: 500; }
.reasons { display: flex; flex-direction: column; gap: 8px; }
.reasons form { display: flex; }
.reason { width: 100%; min-height: 48px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: 15px; text-align: left; padding: 0 16px; cursor: pointer; }

/* Messages */
.alert { border-radius: var(--radius); padding: 16px; border: 1px solid var(--pain); background: var(--pain-bg); display: flex; flex-direction: column; gap: 8px; }
.alert.info { border-color: var(--accent); background: var(--accent-soft); }
.warn-list { margin: 0; padding-left: 18px; }

/* Sign-in and account */
.head p.sub { margin: 4px 0 0; }
.center { text-align: center; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--sub); }
.field input {
  min-height: 56px;
  padding: 0 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 17px;
}
.field input:focus { outline: none; border: 2px solid var(--accent); box-shadow: var(--accent-glow); }
.field input.code { font-family: var(--mono); font-size: 28px; letter-spacing: 0.4em; text-align: center; }
.btn.danger { border-color: var(--pain); color: var(--pain); }
.btn.primary.danger { background: var(--pain); color: var(--accent-ink); box-shadow: 0 0 22px rgba(255, 46, 136, 0.45); }
.head-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.head-link { font-size: 13px; color: var(--sub); text-decoration: none; border: 1px solid var(--border); border-radius: 999px; padding: 4px 12px; white-space: nowrap; }
