:root {
  color-scheme: light;
  --ink: #333333;
  --muted: #69757d;
  --subtle: #8a969e;
  --line: #e8ded2;
  --surface: #ffffff;
  --surface-soft: #faf6f0;
  --page: #efe6da;
  --accent: #e89b5c;
  --accent-dark: #b86d35;
  --accent-soft: #f7e2cf;
  --blue: #315f92;
  --blue-soft: #e4edf6;
  --rose: #a13c46;
  --rose-soft: #f6e5e6;
  --amber: #8a5a12;
  --amber-soft: #f2ead7;
  --shadow: 0 18px 45px rgba(24, 33, 38, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100%;
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 20% 10%, rgba(232, 155, 92, 0.12), transparent 28%),
    radial-gradient(circle at 80% 0%, rgba(232, 155, 92, 0.08), transparent 26%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.68), rgba(255, 255, 255, 0)),
    var(--page);
}

button,
input,
.button-link {
  font: inherit;
}

button,
.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 0;
  border-radius: 7px;
  background: var(--accent);
  color: #ffffff;
  cursor: pointer;
  font-weight: 750;
  padding: 0 16px;
  text-decoration: none;
}

button:hover,
.button-link:hover {
  background: var(--accent-dark);
  color: #ffffff;
}

button:focus-visible,
input:focus-visible,
.button-link:focus-visible {
  outline: 3px solid rgba(49, 95, 146, 0.28);
  outline-offset: 2px;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(34px, 5vw, 58px);
  letter-spacing: 0;
  line-height: 0.98;
}

h2 {
  font-size: 19px;
  line-height: 1.2;
}

a {
  color: var(--accent-dark);
}

.app-shell {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 32px;
}

.topbar,
.brand,
.top-actions,
.section-heading,
.button-row,
.message-head {
  display: flex;
  align-items: center;
}

.topbar,
.section-heading,
.button-row,
.message-head {
  justify-content: space-between;
  gap: 16px;
}

.topbar {
  position: relative;
  min-height: 52px;
  margin-bottom: 26px;
}

.brand {
  gap: 10px;
  color: var(--ink);
  font-weight: 850;
  text-decoration: none;
}

.top-actions {
  gap: 18px;
}

#userBadge {
  position: absolute;
  left: 50%;
  color: var(--accent-dark);
  font-weight: 850;
  transform: translateX(-50%);
}

.top-link {
  color: var(--accent-dark);
  font-weight: 800;
  text-decoration: none;
}

.top-actions > .top-link:not(.link-button) {
  margin-right: 8px;
}

.top-link:hover,
.top-link:focus-visible {
  color: var(--ink);
  text-decoration: underline;
}

.link-button {
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
  font-family: inherit;
  font-size: inherit;
  font-weight: 800;
  cursor: pointer;
}

.handwritten-logo {
  font-family: "Segoe Print", "Bradley Hand ITC", "Comic Sans MS", cursive;
  font-size: 42px;
  font-weight: 700;
  letter-spacing: 0;
}

#userBadge {
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.eyebrow {
  margin-bottom: 8px;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.lede {
  max-width: 620px;
  margin-top: 18px;
  color: #415058;
  font-size: 19px;
  line-height: 1.45;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 20px;
}

.auth-view {
  min-height: calc(100vh - 130px);
}

.phonebook-scene {
  display: grid;
  place-items: center;
  padding: 18px 0 34px;
}

.phonebook {
  position: relative;
  width: min(980px, 100%);
  min-height: 620px;
}

.book-cover {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, 410px);
  gap: 34px;
  align-items: center;
  min-height: 620px;
  overflow: hidden;
  border: 1px solid #704c33;
  border-radius: 8px;
  background:
    radial-gradient(circle at 24% 16%, rgba(255, 255, 255, 0.13), transparent 24%),
    linear-gradient(90deg, rgba(94, 54, 28, 0.24), rgba(255, 255, 255, 0) 12%, rgba(99, 63, 37, 0.12) 52%, rgba(255, 255, 255, 0) 58%),
    repeating-linear-gradient(88deg, rgba(255, 255, 255, 0.08) 0 2px, rgba(74, 39, 18, 0.025) 2px 5px),
    linear-gradient(135deg, #f3c08d, #e89b5c 42%, #c9783e);
  box-shadow: 0 28px 70px rgba(24, 33, 38, 0.28);
  padding: 56px 72px 56px 96px;
}

.book-cover::before {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(255, 232, 198, 0.2);
  border-radius: 7px;
  pointer-events: none;
}

.book-cover::after {
  content: "";
  position: absolute;
  inset: auto 18% -44px 18%;
  height: 110px;
  border-radius: 50%;
  background: rgba(29, 19, 14, 0.24);
  filter: blur(18px);
}

.cover-copy {
  position: relative;
  z-index: 1;
  color: var(--ink);
  text-shadow: 0 1px 12px rgba(255, 255, 255, 0.32);
}

.cover-copy .eyebrow {
  color: #7d4520;
}

.cover-copy .handwritten-logo {
  display: block;
  margin-bottom: 18px;
  font-size: clamp(64px, 9vw, 112px);
  line-height: 0.9;
}

.cover-copy .lede {
  max-width: 520px;
  color: #5d4a3c;
}

.hero-tagline {
  font-size: 22px;
  font-weight: 800;
}

.cover-how-link {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 26px;
  color: #4f2b15;
  font-family: "Segoe Print", "Bradley Hand ITC", "Comic Sans MS", cursive;
  font-size: clamp(28px, 3.4vw, 40px);
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  text-shadow: 0 1px 12px rgba(255, 255, 255, 0.36);
  transform: translateX(-50%) rotate(-1deg);
}

.cover-how-link::after {
  content: "";
  position: absolute;
  left: 4px;
  right: 2px;
  bottom: -7px;
  height: 9px;
  border-bottom: 3px solid rgba(79, 43, 21, 0.72);
  border-radius: 50%;
}

.cover-how-link:hover,
.cover-how-link:focus-visible {
  color: #3a1e0e;
}

.book-rings {
  position: absolute;
  z-index: 3;
  top: 78px;
  bottom: 78px;
  left: 18px;
  display: grid;
  align-content: space-between;
}

.book-rings span {
  position: relative;
  width: 76px;
  height: 34px;
  border: 6px solid #d8c7a7;
  border-right-color: transparent;
  border-radius: 28px 0 0 28px;
  background: transparent;
  box-shadow:
    inset 2px 2px 2px rgba(255, 255, 255, 0.78),
    0 5px 12px rgba(58, 35, 20, 0.24);
}

.book-rings span::before,
.book-rings span::after {
  content: "";
  position: absolute;
  right: -7px;
  width: 14px;
  height: 9px;
  border-radius: 999px;
  background: #7d5134;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.28);
}

.book-rings span::before {
  top: -6px;
}

.book-rings span::after {
  bottom: -6px;
}

.book-rings i {
  position: absolute;
  top: 7px;
  left: 9px;
  width: 46px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0));
}

.auth-card {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 18px;
  border: 1px solid rgba(115, 80, 48, 0.38);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(232, 155, 92, 0.18) 1px, transparent 1px) 28px 0 / 1px 100% no-repeat,
    radial-gradient(circle at 16% 18%, rgba(120, 86, 49, 0.04) 0 1px, transparent 1px) 0 0 / 18px 18px,
    radial-gradient(circle at 72% 62%, rgba(120, 86, 49, 0.03) 0 1px, transparent 1px) 0 0 / 22px 22px,
    repeating-linear-gradient(180deg, #fffdf8 0 34px, #f1e9dc 35px 36px);
  box-shadow: 0 18px 44px rgba(31, 20, 13, 0.24);
  padding: 24px 24px 22px 42px;
  transform: rotate(-1.2deg);
}

.paper-label {
  width: 100%;
  border: 1px solid rgba(93, 63, 36, 0.22);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.64);
  padding: 12px 14px;
}

.hand-note {
  position: relative;
  display: inline-block;
  margin-bottom: 2px;
  color: #7d5b37;
  font-family: "Segoe Print", "Bradley Hand ITC", "Comic Sans MS", cursive;
  font-size: clamp(20px, 2vw, 24px);
  line-height: 1.2;
  white-space: nowrap;
}

.hand-note::after {
  content: "";
  position: absolute;
  left: 4px;
  right: 2px;
  bottom: -8px;
  height: 10px;
  border-bottom: 3px solid rgba(232, 155, 92, 0.92);
  border-radius: 50%;
  transform: rotate(-1deg);
}

.hand-form label {
  color: #5b5149;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
}

.hand-form input {
  border-color: rgba(90, 69, 51, 0.22);
  background: rgba(255, 255, 255, 0.86);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
}

.hand-form .button-row {
  margin-top: 4px;
}

.hand-form button {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
}

.free-note {
  position: relative;
  justify-self: start;
  width: 190px;
  min-height: 62px;
  margin: -4px 0 -8px 10px;
  color: #7d5b37;
  font-family: "Segoe Print", "Bradley Hand ITC", "Comic Sans MS", cursive;
  transform: rotate(-5deg);
}

.free-note span {
  position: absolute;
  left: 18px;
  bottom: 0;
  font-size: 25px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.free-note i {
  position: absolute;
  left: 126px;
  top: 18px;
  width: 54px;
  height: 22px;
  border-right: 3px solid rgba(125, 91, 55, 0.86);
  border-bottom: 3px solid rgba(125, 91, 55, 0.86);
  border-radius: 0 0 40px 0;
  transform: rotate(-14deg);
}

.free-note i::before,
.free-note i::after {
  content: "";
  position: absolute;
  top: -6px;
  right: -8px;
  width: 13px;
  height: 3px;
  border-radius: 999px;
  background: rgba(125, 91, 55, 0.86);
  transform-origin: center;
}

.free-note i::before {
  transform: translateX(-4px) rotate(-48deg);
}

.free-note i::after {
  transform: translateX(4px) rotate(48deg);
}

.login-free-note {
  justify-self: end;
  margin: -4px 14px -8px 0;
}

form,
label,
.member-row,
.notify-members,
.outbox-list,
.side-rail {
  display: grid;
  gap: 12px;
}

.form-grid {
  display: grid;
  gap: 12px;
}

.form-grid.two-up {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

input {
  width: 100%;
  min-height: 42px;
  margin-top: 6px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
  color: var(--ink);
  padding: 8px 10px;
}

.secondary,
.ghost {
  background: #e5ece7;
  color: var(--accent-dark);
}

.secondary:hover,
.ghost:hover {
  background: #d6e2dc;
  color: var(--accent-dark);
}

.auth-switch {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  text-align: center;
}

.terms-check {
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  border: 1px solid rgba(90, 69, 51, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.56);
  color: #5b5149;
  padding: 11px;
}

.terms-check input {
  width: 18px;
  min-height: 18px;
  margin: 1px 0 0;
}

.terms-check span {
  font-weight: 650;
  line-height: 1.45;
}

.terms-check a {
  font-weight: 800;
}

.workspace {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  width: min(980px, 100%);
  margin: 0 auto;
}

.dashboard-prompt {
  position: absolute;
  z-index: 8;
  inset: 0;
  display: grid;
  place-items: start center;
  padding-top: 42px;
  background: rgba(255, 253, 248, 0.62);
  backdrop-filter: blur(2px);
}

.dashboard-prompt-card {
  display: grid;
  gap: 14px;
  width: min(440px, calc(100% - 32px));
  border: 1px solid rgba(115, 80, 48, 0.2);
  border-radius: 8px;
  background: #fffdf8;
  box-shadow: var(--shadow);
  padding: 24px;
  text-align: center;
}

.dashboard-prompt-card h2 {
  color: #5d4a3c;
  font-family: "Segoe Print", "Bradley Hand ITC", "Comic Sans MS", cursive;
  font-size: clamp(28px, 4vw, 38px);
}

.dashboard-prompt-actions {
  display: flex;
  justify-content: center;
  gap: 18px;
  align-items: center;
  flex-wrap: wrap;
}

.compose-panel {
  background: #fbfcfb;
}

.circle-panel-heading {
  justify-content: center;
  text-align: center;
}

.section-title-heading {
  justify-content: center;
  text-align: center;
}

.section-title-heading h1,
.section-title-heading h2 {
  margin-top: 8px;
}

.section-title-heading .eyebrow,
.circle-panel-heading .eyebrow {
  font-size: 18px;
}

.icon-button {
  width: 38px;
  min-height: 38px;
  border-radius: 50%;
  padding: 0;
  font-size: 21px;
  line-height: 1;
}

.circle-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin: 14px 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 4px;
}

.circle-tab {
  min-width: 0;
  min-height: 34px;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  overflow: hidden;
  padding: 0 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.circle-tab:hover,
.circle-tab.active {
  background: #ffffff;
  color: var(--accent-dark);
  box-shadow: inset 0 0 0 1px rgba(184, 109, 53, 0.22);
}

.circle-name-summary {
  display: grid;
  justify-items: center;
  gap: 7px;
  margin: 2px 0 12px;
  text-align: center;
}

.circle-name-summary strong {
  color: var(--ink);
  font-size: 19px;
  line-height: 1.1;
}

.circle-name-editor {
  display: grid;
  gap: 10px;
  margin: 0 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 12px;
}

#members {
  display: grid;
  gap: 10px;
  margin: 16px 0;
}

.circle-map {
  margin: 16px 0 14px;
}

.circle-ring {
  position: relative;
  width: min(100%, 312px);
  aspect-ratio: 1;
  margin: 0 auto;
  border: 12px solid var(--accent);
  border-radius: 50%;
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.92) 0 34%, rgba(247, 226, 207, 0.58) 35% 100%);
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.7),
    0 18px 32px rgba(184, 109, 53, 0.16);
}

.circle-heart {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  width: 132px;
  height: 132px;
  place-items: center;
  border-radius: 50%;
  background: #fff7ef;
  color: var(--rose);
  font-size: 96px;
  line-height: 1;
  transform: translate(-50%, -50%);
  box-shadow: inset 0 0 0 1px rgba(184, 109, 53, 0.18);
}

.circle-person {
  position: absolute;
  display: grid;
  justify-items: center;
  gap: 5px;
  width: 92px;
  min-height: 82px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  box-shadow: none;
  color: inherit;
  cursor: pointer;
  padding: 8px 6px;
  transform: translate(-50%, -50%);
  text-align: center;
  transition: background 160ms ease, box-shadow 160ms ease, min-height 160ms ease, padding 160ms ease;
}

.circle-person:hover,
.circle-person:focus-visible,
.circle-person.selected {
  min-height: 96px;
  background: rgba(255, 247, 239, 0.92);
  box-shadow: inset 0 0 0 1px rgba(184, 109, 53, 0.18), 0 8px 18px rgba(184, 109, 53, 0.12);
}

.circle-person:hover .person-icon,
.circle-person:focus-visible .person-icon,
.circle-person.selected .person-icon {
  opacity: 1;
  filter: drop-shadow(0 4px 8px rgba(184, 109, 53, 0.22));
}

.circle-person.selected .person-icon::after {
  content: "";
  position: absolute;
  inset: -8px -10px -7px;
  border: 2px solid rgba(184, 109, 53, 0.48);
  border-radius: 999px;
}

.circle-person:focus-visible {
  outline: 2px solid rgba(184, 109, 53, 0.55);
  outline-offset: 6px;
}

.slot-1 {
  top: 14%;
  left: 50%;
}

.slot-2 {
  top: 38%;
  left: 85%;
}

.slot-3 {
  top: 78%;
  left: 72%;
}

.slot-4 {
  top: 78%;
  left: 28%;
}

.slot-5 {
  top: 38%;
  left: 15%;
}

.person-icon {
  position: relative;
  width: 42px;
  height: 42px;
  color: var(--ink);
  opacity: 0.92;
}

.circle-person.pending .person-icon {
  color: var(--blue);
}

.circle-person.empty .person-icon {
  color: var(--subtle);
  opacity: 0.35;
}

.person-head,
.person-shoulders {
  position: absolute;
  left: 50%;
  display: block;
  background: currentColor;
  transform: translateX(-50%);
}

.person-head {
  top: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
}

.person-shoulders {
  top: 23px;
  width: 38px;
  height: 19px;
  border-radius: 19px 19px 6px 6px;
}

.person-label {
  display: grid;
  justify-items: center;
  gap: 3px;
  max-width: 100%;
  min-height: 34px;
}

.person-label strong {
  max-width: 92px;
  overflow: hidden;
  color: var(--ink);
  font-size: 11px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.circle-person.empty .person-label strong {
  color: var(--subtle);
}

.person-label .status {
  min-height: 18px;
  padding: 0 7px;
  font-size: 10px;
}

.member-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 12px;
}

.member-editor-hint {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.member-row-head {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.04em;
  min-height: 24px;
}

.member-editor-mode {
  line-height: 1;
}

.member-status {
  justify-self: end;
}

.invite-tip {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(184, 109, 53, 0.22);
  border-radius: 8px;
  background: #fffaf4;
  color: #5d4a3c;
  padding: 12px;
}

.invite-tip strong {
  font-size: 14px;
}

.invite-tip p,
.invite-tip blockquote {
  margin: 0;
  color: #4d5a61;
  font-size: 13px;
  line-height: 1.45;
}

.invite-tip blockquote {
  border-left: 3px solid rgba(184, 109, 53, 0.36);
  padding-left: 10px;
}

.invite-tip .copy-invite-message {
  justify-self: start;
  min-height: 32px;
  padding: 0 12px;
}

.member-row-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  align-items: center;
}

.member-row .save-member {
  min-height: 32px;
  padding: 0 14px;
}

.member-row .remove-member {
  justify-self: end;
  min-height: 32px;
  background: transparent;
  color: var(--rose);
  padding: 0;
}

.full-width {
  width: 100%;
}

.notify-members {
  display: grid;
  gap: 14px;
  margin: 8px 0 2px;
}

.notify-circle-choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 8px 0 14px;
}

.notify-circle-choice {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--muted);
  font-weight: 850;
}

.notify-circle-choice:hover,
.notify-circle-choice.active {
  border-color: rgba(184, 109, 53, 0.36);
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.notify-circle-group {
  display: grid;
  gap: 8px;
}

.notify-circle-group h3 {
  color: #5d4a3c;
  font-size: 17px;
}

.notify-check {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  padding: 11px;
}

.notify-check input {
  width: 18px;
  min-height: 18px;
  margin: 0;
}

.notify-check span {
  min-width: 0;
  font-weight: 750;
}

.message {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
  padding: 11px;
}

.success-message {
  border-color: rgba(184, 109, 53, 0.24);
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-weight: 750;
}

.message strong {
  color: var(--ink);
}

.message-body {
  margin-top: 8px;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 850;
  text-transform: capitalize;
}

.status.sent,
.status.delivered,
.status.accepted {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.status.queued,
.status.sending {
  background: var(--blue-soft);
  color: var(--blue);
}

.status.failed,
.status.undelivered {
  background: var(--rose-soft);
  color: var(--rose);
}

.status.simulated,
.status.notice {
  background: var(--amber-soft);
  color: var(--amber);
}

.status.pending {
  background: var(--blue-soft);
  color: var(--blue);
}

.status.active {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

#toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  max-width: min(480px, calc(100% - 32px));
  border-radius: 8px;
  background: var(--ink);
  color: #ffffff;
  opacity: 0;
  padding: 10px 14px;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 5;
}

#toast.show {
  opacity: 1;
}

.claim-page {
  width: min(620px, calc(100% - 32px));
  margin: 14vh auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
  padding: 28px;
}

.claim-page p {
  margin: 12px 0 20px;
  color: var(--muted);
}

.claim-page h2 {
  margin-top: 24px;
  color: #5d4a3c;
  font-size: 24px;
}

.claim-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.site-footer {
  margin-top: 28px;
  border-top: 1px solid rgba(184, 109, 53, 0.18);
  padding: 18px 0 2px;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  justify-content: center;
}

.site-footer a {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  text-decoration: none;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--accent-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal-page {
  width: min(860px, 100%);
  margin: 0 auto;
}

.legal-document {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: clamp(22px, 4vw, 42px);
}

.legal-document h1 {
  margin-bottom: 20px;
  font-size: clamp(34px, 5vw, 52px);
}

.legal-document h2 {
  margin: 28px 0 10px;
  color: var(--ink);
  font-size: 20px;
}

.legal-document p,
.legal-document li {
  color: #4d5a61;
  font-size: 15px;
  line-height: 1.65;
}

.legal-document p + p {
  margin-top: 10px;
}

.legal-document ul {
  display: grid;
  gap: 6px;
  margin: 10px 0 16px;
  padding-left: 24px;
}

.how-page {
  width: min(840px, 100%);
  margin: 0 auto;
}

.notebook-sheet {
  --paper-margin: 58px;
  display: grid;
  gap: 0;
  border: 1px solid rgba(115, 80, 48, 0.28);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(232, 155, 92, 0.2) 1px, transparent 1px) var(--paper-margin) 0 / 1px 100% no-repeat,
    linear-gradient(180deg, #fffdf8 0 138px, transparent 138px),
    repeating-linear-gradient(180deg, #fffdf8 0 38px, #f0e6d6 39px 40px);
  box-shadow: var(--shadow);
  padding: clamp(34px, 5vw, 48px) clamp(22px, 5vw, 54px) clamp(34px, 5vw, 48px) clamp(72px, 9vw, 92px);
}

.notebook-title {
  position: relative;
  display: inline-block;
  justify-self: start;
  margin-bottom: 48px;
  font-family: "Segoe Print", "Bradley Hand ITC", "Comic Sans MS", cursive;
  font-size: clamp(42px, 7vw, 68px);
  line-height: 1;
}

.notebook-title::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 0;
  bottom: -9px;
  height: 14px;
  border-bottom: 4px solid rgba(232, 155, 92, 0.94);
  border-radius: 50%;
  transform: rotate(-1deg);
}

.notebook-steps {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.notebook-steps li {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  padding-bottom: 20px;
}

.notebook-steps li:nth-child(2),
.notebook-steps li:nth-child(4) {
  transform: translateY(14px);
}

.notebook-steps span {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 247, 239, 0.8);
  color: var(--accent-dark);
  font-family: "Segoe Print", "Bradley Hand ITC", "Comic Sans MS", cursive;
  font-size: 22px;
  font-weight: 800;
  box-shadow: inset 0 0 0 2px rgba(232, 155, 92, 0.52);
}

.notebook-steps h2 {
  margin: 0;
  color: #5d4a3c;
  font-family: "Segoe Print", "Bradley Hand ITC", "Comic Sans MS", cursive;
  font-size: clamp(24px, 3vw, 31px);
  line-height: 40px;
}

.notebook-steps p,
.notebook-close {
  color: #4d5a61;
  font-family: "Segoe Print", "Bradley Hand ITC", "Comic Sans MS", cursive;
  font-size: 17px;
  font-weight: 700;
  line-height: 40px;
}

.notebook-steps p {
  transform: translateY(2px);
}

.notebook-steps li:nth-child(2) p,
.notebook-steps li:nth-child(4) p {
  transform: translateY(3px);
}

.notebook-close {
  max-width: 100%;
  margin: 40px auto 0;
  color: #5d4a3c;
  font-family: "Segoe Print", "Bradley Hand ITC", "Comic Sans MS", cursive;
  font-size: clamp(19px, 2.35vw, 24px);
  text-align: center;
  white-space: nowrap;
}

.hidden {
  display: none !important;
}

@media (max-width: 760px) {
  .phonebook {
    min-height: auto;
  }

  .book-cover {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 54px 28px 84px 54px;
  }

  .book-rings {
    top: 56px;
    bottom: 56px;
    left: 12px;
  }

  .book-rings span {
    width: 48px;
    height: 24px;
    border-width: 4px;
  }

  .book-rings span::before,
  .book-rings span::after {
    right: -5px;
    width: 10px;
    height: 7px;
  }

  .circle-ring {
    width: min(100%, 286px);
    border-width: 10px;
  }

  .form-grid.two-up {
    grid-template-columns: 1fr;
  }

  .section-heading,
  .button-row {
    align-items: stretch;
    flex-direction: column;
  }

  .notebook-sheet {
    --paper-margin: 28px;
    padding-left: 44px;
  }

  .notebook-close {
    white-space: normal;
  }
}

@media (max-width: 560px) {
  .app-shell {
    width: min(100% - 20px, 1240px);
    padding-top: 14px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .top-actions {
    width: 100%;
    justify-content: space-between;
  }

  #userBadge {
    position: static;
    transform: none;
  }

  .top-actions > .top-link:not(.link-button) {
    margin-right: 0;
  }

  h1 {
    font-size: 36px;
  }

  .cover-copy .handwritten-logo {
    font-family: "Bradley Hand ITC", "Segoe Print", "Comic Sans MS", cursive;
    font-size: 62px;
    font-weight: 800;
  }

  .hand-note {
    font-family: "Bradley Hand ITC", "Segoe Print", "Comic Sans MS", cursive;
    font-size: 21px;
    font-weight: 800;
    white-space: normal;
  }

  .cover-copy .lede {
    font-size: 16px;
  }

  .auth-card {
    padding: 20px 18px 18px 32px;
    transform: rotate(-0.6deg);
  }

  .free-note {
    justify-self: center;
    margin-left: 0;
    transform: rotate(-3deg);
  }

  .login-free-note {
    margin-right: 0;
  }

  .panel {
    padding: 16px;
  }

  .circle-ring {
    width: min(100%, 260px);
  }

  .circle-heart {
    width: 108px;
    height: 108px;
    font-size: 78px;
  }

  .circle-person {
    width: 78px;
  }

  .person-label strong {
    max-width: 78px;
  }

}
