:root {
  color-scheme: light dark;
  font: 100%/1.5 system-ui, sans-serif;
  --bg: #f3f6fc;
  --card: #fff;
  --ink: #182746;
  --muted: #51627d;
  --line: #c9d4e6;
  --primary: #234eab;
  --on-primary: #fff;
  --accent: #b93756;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101828;
    --card: #1a263a;
    --ink: #edf3ff;
    --muted: #b6c5dc;
    --line: #415575;
    --primary: #acc5ff;
    --on-primary: #13294f;
    --accent: #ffa4b5;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--ink); }
main {
  width: min(100% - 2rem, 42rem);
  margin-inline: auto;
  padding-block: clamp(2rem, 8vw, 5rem) max(2rem, env(safe-area-inset-bottom));
}
header { margin-bottom: 2rem; }
header::before { content: ''; display: block; width: 2.5rem; height: .25rem; border-radius: 1rem; background: var(--accent); }
h1 { margin: .35rem 0 .25rem; font-size: clamp(3.25rem, 11vw, 5.4rem); line-height: 1; letter-spacing: -.075em; }
h2, p { margin: 0; }
h2, summary { font-size: 1.25rem; line-height: 1.25; font-weight: 750; }
p { color: var(--muted); }
p + button { margin-top: 1rem; }
header p, .panel > p, details > input { margin-top: .65rem; }
summary { cursor: pointer; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 1rem; padding: clamp(1rem, 4vw, 1.6rem); margin-bottom: 1rem; }
label { display: block; font-weight: 650; }
label span { color: var(--muted); font-weight: 400; }
input, button { font: inherit; }
input {
  width: 100%;
  min-width: 0;
  padding: .55rem .65rem;
  background: var(--bg);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: .45rem;
}
label input { display: block; margin-top: .3rem; }
button {
  min-height: 44px;
  padding: .5rem .8rem;
  color: var(--on-primary);
  background: var(--primary);
  border: 1px solid transparent;
  border-radius: .5rem;
  font-weight: 700;
  cursor: pointer;
}
button.secondary { color: var(--ink); background: var(--card); border-color: var(--line); }
button.danger { color: var(--accent); background: var(--card); }
button:disabled { opacity: .6; cursor: wait; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .8rem; margin-top: 1rem; }
.wide { grid-column: 1 / -1; }
.actions, .list-head { display: flex; align-items: center; flex-wrap: wrap; gap: .55rem; }
.actions { margin-top: .85rem; }
.list-head { justify-content: space-between; }
.notice { font-weight: 650; margin-bottom: 1rem; }
.notice:empty { display: none; }
ul { list-style: none; padding: 0; margin: .65rem 0 0; }
li { border-top: 1px solid var(--line); padding-block: .85rem; overflow-wrap: anywhere; }
li:last-child { padding-bottom: 0; }
li h3 { margin: 0; font-size: 1.05rem; }
li p { margin-top: .25rem; }
li .actions { margin-top: .55rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 400px) {
  .fields { grid-template-columns: minmax(0,1fr); }
}
