:root {
  color-scheme: light;
  --paper: #f7f7f4;
  --ink: #22211e;
  --muted: #68645e;
  --line: #deddd7;
  --yellow: #ffe1a6;
  --side: clamp(21px, 5vw, 29px);
  font: 16px/1.45 system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
h1, p, figure, ul { margin: 0; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: wait; opacity: .55; }
button:focus-visible, a:focus-visible, input:focus-visible {
  outline: 2px solid #8e590d;
  outline-offset: 3px;
}

.screen {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  max-width: 550px;
  margin-inline: auto;
  padding: max(12px, env(safe-area-inset-top)) var(--side)
    max(19px, calc(12px + env(safe-area-inset-bottom)));
}

.toolbar {
  min-height: 49px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 650;
  letter-spacing: -.025em;
}

.wordmark img { width: 32px; height: 32px; border-radius: 8px; }
.plain, .primary {
  border: 0;
  background: transparent;
  min-height: 46px;
  padding: 8px 12px;
  border-radius: 15px;
  font-weight: 540;
}
.plain { color: var(--ink); }
.back { min-width: 46px; margin-inline-start: -12px; display: grid; place-items: center; }
.back::before {
  content: '';
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  width: 10px;
  height: 10px;
  transform: rotate(45deg);
}
.edit { margin-inline-end: -12px; }
.primary {
  background: linear-gradient(170deg, #ffedc7 3%, var(--yellow) 66%, #ffedc9);
  box-shadow: inset 0 0 0 1px #eabf71, inset 0 2px 3px #fff8e7, 0 4px 10px #ad6b1420;
}
.check { margin-inline-end: 8px; font-size: 1.1em; }

.copy { margin-block: clamp(21px, 4vh, 42px) 25px; }
.time, .quiet { color: var(--muted); }
.time { font-size: .91rem; }
h1 {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(2rem, 7.5vw, 3.2rem);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -.035em;
  margin-top: 10px;
  overflow-wrap: anywhere;
}

.illustration { margin-block: 8px 14px; }
.illustration img {
  display: block;
  width: 100%;
  max-height: 26vh;
  border-radius: 19px;
  object-fit: contain;
}
.message { color: var(--muted); margin-top: 11px; overflow-wrap: anywhere; white-space: pre-line; }
.steps { line-height: 1.5; overflow-wrap: anywhere; }
.next {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding: 13px 0;
  margin-top: 22px;
}
.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: auto;
  padding-top: 28px;
}
.done-state { margin-top: auto; padding-top: 28px; }

.agenda-title { margin-block: 25px 14px; }
.agenda { list-style: none; padding: 0; }
.agenda li { border-bottom: 1px solid var(--line); }
.agenda a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding-block: 17px;
  color: inherit;
  text-decoration: none;
}
.event-text { display: grid; gap: 2px; min-width: 0; }
.event-title { overflow-wrap: anywhere; font-weight: 550; }
.event-date { color: var(--muted); font-size: .86rem; }
.agenda img { width: 58px; height: 38px; object-fit: cover; border-radius: 8px; }
.setup { display: flex; flex-wrap: wrap; gap: 8px; margin-block: 8px 16px; }
.feedback {
  position: fixed;
  inset: auto var(--side) max(84px, calc(env(safe-area-inset-bottom) + 82px));
  max-width: 470px;
  margin-inline: auto;
  padding: 11px 14px;
  color: #fff;
  background: #34332e;
  border-radius: 11px;
}

dialog {
  border: 1px solid var(--line);
  padding: 20px;
  border-radius: 20px;
  width: min(90vw, 410px);
  background: var(--paper);
  color: var(--ink);
}
dialog::backdrop { background: #22211e45; }
dialog form { display: grid; gap: 12px; }
dialog input {
  width: 100%;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 10px;
  min-height: 46px;
}
dialog .actions { margin: 0; padding: 0; }
