:root {
  --paper: #fbf7ef;
  --card: #ffffff;
  --ink: #1f2a44;
  --muted: #5d6473;
  --accent: #e2553b;
  --accent-dark: #c4432b;
  --danger: #b3261e;
  --line: #e8e1d3;
  color-scheme: light;
  font-family: "Inter", "Segoe UI", Roboto, system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
body { margin: 0; line-height: 1.5; }
a { color: var(--ink); }
button { font: inherit; cursor: pointer; }
[hidden] { display: none !important; }

.topbar {
  display: flex; justify-content: space-between; align-items: center;
  max-width: 760px; margin: 0 auto; padding: 20px 24px;
}
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; text-decoration: none; }
.logo-mark {
  display: grid; place-items: center; width: 32px; height: 32px;
  border-radius: 8px; background: var(--ink); color: var(--paper); font-family: Georgia, serif;
}
.who { color: var(--muted); font-size: 14px; }

.page { max-width: 760px; margin: 0 auto; padding: 8px 24px 48px; }
.page h1 { font-family: Georgia, serif; font-size: 34px; margin: 8px 0 20px; }

.card { padding: 24px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-head h2 { margin: 0; font-size: 20px; }
.badge { padding: 2px 10px; border-radius: 999px; background: #e6f4ea; color: #1e5631; font-size: 13px; font-weight: 600; }
.badge.cancelled { background: #f1ece2; color: var(--muted); }

.details { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin: 20px 0 24px; }
.details dt { color: var(--muted); font-size: 13px; }
.details dd { margin: 2px 0 0; font-weight: 600; }

.help { color: var(--muted); font-size: 14px; }

.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 0 20px; border-radius: 10px; border: 1px solid transparent;
  font-weight: 600; text-decoration: none;
}
.button:focus-visible, .close-button:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.button.primary { background: var(--ink); color: #fff; }
.button.secondary { background: var(--card); color: var(--ink); border-color: #cfc7b8; }
.button.danger { background: var(--danger); color: #fff; }
.button.danger-outline { background: var(--card); color: var(--danger); border-color: var(--danger); }
.button:disabled { opacity: .6; cursor: progress; }

.manage-dialog {
  width: min(460px, calc(100% - 32px)); padding: 28px; border: 0; border-radius: 16px;
  color: var(--ink); background: var(--card); box-shadow: 0 20px 60px rgb(31 42 68 / .25);
}
.manage-dialog::backdrop { background: rgb(31 42 68 / .45); }
.manage-dialog h2 { margin: 0 0 8px; padding-right: 40px; font-family: Georgia, serif; }
.manage-dialog form[method="dialog"]:not(.close-form) { margin: 16px 0 0; }
.close-form { position: absolute; top: 12px; right: 12px; margin: 0; }
.close-button {
  width: 36px; height: 36px; border: 0; border-radius: 50%;
  background: var(--paper); color: var(--ink); font-size: 22px; line-height: 1;
}
.muted { color: var(--muted); }
.stack { display: grid; gap: 10px; margin-top: 16px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; margin-top: 20px; }
.error { padding: 12px; border-radius: 10px; background: #fce8e6; color: var(--danger); }
