:root {
  --bg: #0A1628;
  --card: #111E35;
  --input: #1C2D4A;
  --orange: #FF6B1A;
  --text: #F0F4FF;
  --muted: #8A9DC0;
  --line: #1E3050;
  --danger: #E74C3C;
  --ok: #2ECC71;
  --radius: 16px;
  --tap: 48px;
}
*, *::before, *::after { box-sizing: border-box; }
html {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
}
body {
  width: 100%;
  max-width: 100vw;
  min-height: 100dvh;
  overflow-x: hidden;
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.4;
}
.app {
  width: 100%;
  max-width: 100%;
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  padding-bottom: calc(16px + env(safe-area-inset-bottom));
}
@media (min-width: 600px) {
  .app { max-width: 560px; margin: 0 auto; }
}
.hero {
  background: linear-gradient(165deg, #182540 0%, #0A1628 80%);
  padding: 22px 16px 24px;
  padding-top: calc(16px + env(safe-area-inset-top));
}
.hero-top { display: flex; align-items: center; gap: 12px; }
.hero-top img { width: 48px; height: 48px; border-radius: 12px; }
.kicker { margin: 0; color: var(--orange); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.8rem; }
.hero h1 { margin: 2px 0 0; font-size: 1.45rem; }
.next { margin: 14px 0 0; color: var(--orange); font-weight: 700; font-size: 1.05rem; }
.who { margin: 6px 0 0; color: var(--muted); font-size: 0.95rem; }
.sheet { padding: 14px 12px; display: grid; gap: 12px; width: 100%; }
.note { background: #3a2412; border: 1px solid #7a4a20; color: #f6d8b8; border-radius: 12px; padding: 12px; font-size: 0.95rem; line-height: 1.45; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; width: 100%; }
.card h2 { margin: 0 0 10px; font-size: 1.15rem; }
.hint { margin: 8px 0 0; color: var(--muted); font-size: 0.95rem; line-height: 1.4; }
.err { color: #ffb4b0; font-size: 0.95rem; min-height: 1em; }
.install-card { border-color: #3a2a18; }
.icon-preview { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.icon-preview img { width: 72px; height: 72px; border-radius: 16px; }
.icon-preview strong { display: block; font-size: 1.2rem; }
.icon-preview span { color: var(--muted); font-size: 0.95rem; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.actions .btn { flex: 1 1 140px; }
.row { display: flex; gap: 8px; }
.btn {
  min-height: var(--tap);
  border: 0;
  border-radius: 12px;
  padding: 0 14px;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}
.btn-primary { background: var(--orange); color: #fff; }
.btn-ghost { background: transparent; color: var(--orange); border: 1.5px solid var(--orange); }
.ios-steps { margin: 10px 0 0; padding-left: 20px; color: var(--muted); font-size: 0.95rem; }
.field { display: grid; gap: 6px; margin-top: 10px; font-size: 0.95rem; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%;
  min-height: 48px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--input);
  color: var(--text);
  padding: 10px 12px;
  font: inherit;
  font-size: 16px;
}
.field textarea { min-height: 72px; resize: vertical; }
.days { border: 0; padding: 10px 0 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; color: var(--muted); }
.days legend { font-size: 0.95rem; }
.days label {
  display: flex;
  gap: 6px;
  align-items: center;
  min-height: 44px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 0.95rem;
}
.alarm-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.alarm-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  align-items: center;
  background: var(--input);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
}
.alarm-row .sub { display: block; color: var(--muted); font-size: 0.85rem; }
.toggle { width: 52px; height: 32px; border-radius: 999px; border: 0; background: #2A4570; position: relative; cursor: pointer; }
.toggle[aria-pressed="true"] { background: var(--ok); }
.toggle::after { content: ""; position: absolute; top: 4px; left: 4px; width: 24px; height: 24px; border-radius: 50%; background: #fff; }
.toggle[aria-pressed="true"]::after { transform: translateX(20px); }
.mini { min-height: 44px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--danger); font: inherit; font-size: 16px; font-weight: 700; cursor: pointer; }
.ring { position: fixed; inset: 0; background: rgba(6,16,24,0.94); display: grid; place-content: center; text-align: center; padding: 24px; z-index: 20; }
.ring[hidden] { display: none; }
.ring-kicker { color: var(--orange); letter-spacing: 0.08em; text-transform: uppercase; font-weight: 700; }
.ring-name { font-size: 2.2rem; margin: 8px 0; }
.ring-sub { color: var(--muted); }
.ring .actions { justify-content: center; }
.tabs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
@media (min-width: 420px) { .tabs { grid-template-columns: repeat(4, 1fr); } }
.tab {
  min-height: 44px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--muted);
  border-radius: 12px;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
}
.tab.on { background: var(--orange); border-color: var(--orange); color: #fff; }
.sheet-bg { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 25; display: flex; align-items: flex-end; justify-content: center; }
.sheet-bg[hidden] { display: none; }
.task-sheet {
  width: 100%;
  max-width: 560px;
  max-height: 92dvh;
  overflow: auto;
  background: var(--bg);
  border-radius: 20px 20px 0 0;
  padding: 16px 16px calc(24px + env(safe-area-inset-bottom));
}
.task-sheet h3 { margin: 16px 0 8px; font-size: 0.9rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.fb { background: var(--input); border: 1px solid var(--line); border-radius: 12px; padding: 10px; margin-bottom: 8px; }
.fb img { max-width: 100%; border-radius: 10px; margin-top: 8px; }
.att a { color: var(--orange); word-break: break-all; }
.check { display: flex; gap: 8px; align-items: center; color: var(--muted); margin-top: 8px; min-height: 44px; }
.badge { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; border: 1px solid var(--line); border-radius: 999px; padding: 2px 8px; color: var(--muted); }
.badge.open { color: var(--orange); }
.badge.done { color: var(--ok); }
