:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #14141f;
  --bg-tertiary: #1e1e2e;
  --text-primary: #ffffff;
  --text-secondary: #a0a0b0;
  --text-muted: #606070;
  --accent: #00d4ff;
  --accent-secondary: #00ff88;
  --danger: #ff4466;
  --focus-ring: #00d4ff;
  --focus-glow: rgba(0, 212, 255, 0.4);
  --radius-md: 12px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body {
  width: 600px; height: 600px; overflow: hidden;
  background: #000;
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
#app { width: 100%; height: 100%; position: relative; }
.screen { width: 100%; height: 100%; position: absolute; top: 0; left: 0; display: flex; flex-direction: column; }
.screen.hidden { display: none; }
.focusable { transition: all 0.15s ease; border: 2px solid transparent; cursor: pointer; outline: none; }
.focusable:focus { border-color: var(--focus-ring); box-shadow: 0 0 20px var(--focus-glow); }
.hidden { display: none !important; }

/* ---- Top bar ---- */
.topbar {
  display: flex; align-items: center; gap: 12px;
  height: 64px; padding: 0 16px;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--bg-tertiary);
  flex-shrink: 0;
}
.topbar-title {
  font-size: 18px; font-weight: 700; letter-spacing: 2px;
  color: var(--text-secondary); flex: 1;
}
.topbar-prog { font-size: 18px; font-weight: 700; color: var(--accent); }
.iconbtn {
  width: 48px; height: 48px; border-radius: var(--radius-md);
  background: var(--bg-tertiary); color: var(--text-primary);
  font-size: 30px; line-height: 1; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

/* ---- Hint footer ---- */
.hint {
  flex-shrink: 0; height: 48px;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; color: var(--text-muted);
  background: var(--bg-primary);
  border-top: 1px solid var(--bg-tertiary);
}

/* ---- Buttons ---- */
.btn {
  width: 100%; min-height: 88px;
  background: var(--bg-secondary); color: var(--text-primary);
  border-radius: var(--radius-md);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; padding: 8px 16px;
}
.btn-main { font-size: 24px; font-weight: 600; }
.btn-sub { font-size: 16px; color: var(--accent-secondary); }
.btn-accent { background: var(--accent); color: #03212b; }
.btn-accent .btn-main { color: #03212b; }
.btn-ghost { background: var(--bg-tertiary); min-height: 64px; }
.btn-ghost .btn-main { font-size: 20px; color: var(--text-secondary); }

/* ---- Home ---- */
.home-main {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  padding: 18px 24px; gap: 6px; overflow: hidden;
}
.trip-name {
  font-size: 26px; font-weight: 700; color: var(--text-primary);
  text-align: center; max-width: 100%;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.count-wrap { text-align: center; margin: 4px 0; }
.count-num {
  font-size: 120px; font-weight: 800; line-height: 1;
  color: var(--accent); letter-spacing: -2px;
}
.count-num.is-now { color: var(--accent-secondary); }
.count-num.is-past { color: var(--text-muted); font-size: 96px; }
.count-label {
  font-size: 18px; font-weight: 700; letter-spacing: 3px;
  color: var(--text-secondary); margin-top: 4px;
}
.trip-date { font-size: 18px; color: var(--text-secondary); margin-bottom: 10px; }
.home-actions {
  width: 100%; display: flex; flex-direction: column; gap: 10px; margin-top: auto;
}

/* ---- List screens (checklist + name) ---- */
.list-main {
  flex: 1; overflow-y: auto; padding: 14px 16px;
  display: flex; flex-direction: column; gap: 10px;
}
.list-foot {
  flex-shrink: 0; padding: 12px 16px;
  background: var(--bg-primary); border-top: 1px solid var(--bg-tertiary);
}
.check-item {
  width: 100%; min-height: 56px;
  display: flex; align-items: center; gap: 14px;
  padding: 8px 16px; border-radius: var(--radius-md);
  background: var(--bg-secondary);
}
.check-box {
  width: 30px; height: 30px; flex-shrink: 0;
  border-radius: 8px; border: 2px solid var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 800; color: #03212b;
}
.check-item.done .check-box {
  background: var(--accent-secondary); border-color: var(--accent-secondary);
}
.check-label { font-size: 21px; font-weight: 500; flex: 1; }
.check-item.done .check-label {
  color: var(--text-muted); text-decoration: line-through;
}

/* Name presets reuse check-item visuals */
.name-item .check-box { border-radius: 50%; }
.name-item.done .check-box { background: var(--accent); border-color: var(--accent); }

/* ---- Set date ---- */
.date-main {
  flex: 1; display: flex; flex-direction: column;
  padding: 20px 28px; gap: 16px;
}
.date-preview {
  text-align: center; font-size: 30px; font-weight: 700;
  color: var(--accent); padding: 12px 0; margin-bottom: 4px;
}
.date-row {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--bg-secondary); border-radius: var(--radius-md);
  padding: 10px 18px;
}
.date-field-label { font-size: 22px; font-weight: 600; color: var(--text-secondary); }
.stepper { display: flex; align-items: center; gap: 14px; }
.step-btn {
  width: 64px; height: 64px; border-radius: var(--radius-md);
  background: var(--bg-tertiary); color: var(--text-primary);
  font-size: 34px; font-weight: 800; line-height: 1;
  display: flex; align-items: center; justify-content: center;
}
.step-val {
  min-width: 96px; text-align: center;
  font-size: 30px; font-weight: 700; color: var(--text-primary);
}
.date-main .btn-accent { margin-top: auto; }
