* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; }
body {
  margin: 0;
  min-height: 100vh;
  overflow-x: clip;
  font-family: var(--sans);
  font-weight: 400;
  font-size: 16px;
  color: var(--ink);
  line-height: 1.6;
}
img { max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--navy); }
h1, h2, h3 { font-family: var(--serif); line-height: 1.25; font-weight: 700; }
.site-nav, .btn, label, .user-chip, .tabbar { font-weight: 500; }
h1 { font-size: clamp(2.4rem, 4.4vw, 4rem); margin: 0 0 0.35em; }
h2 { font-size: 1.75rem; margin: 0 0 0.4em; }
h3 { font-size: 1.375rem; margin: 0 0 0.3em; }
p { margin: 0 0 0.8em; }
[hidden] { display: none !important; }
.skip {
  position: absolute;
  left: 12px;
  top: 0;
  transform: translateY(-120%);
  background: transparent;
  color: transparent;
  padding: 8px 12px;
  z-index: 20;
}
.skip:focus {
  top: 12px;
  transform: none;
  background: #fff;
  color: var(--navy);
}
.site-header, .site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 28px;
}
.site-header { min-height: var(--header); position: relative; z-index: 40; flex-wrap: nowrap; }
.site-nav { font-size: 16px; }
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  min-height: 48px;
}
.brand-logo { height: 48px; width: auto; display: block; }
.brand-rule { width: 1px; height: 22px; align-self: center; background: currentColor; opacity: 0.45; flex: 0 0 auto; }
.brand-extra { font-family: var(--serif); font-size: 22px; letter-spacing: 0.08em; white-space: nowrap; }
.site-header .brand { gap: 0; align-items: center; min-width: 0; }
.site-header .brand-logo { height: 48px; }
.site-header .brand-rule { margin: 0 18px; }
.site-header .brand-wordmark { height: 46px; width: auto; display: block; flex: 0 0 auto; }
.site-nav { display: flex; flex-wrap: nowrap; align-items: center; justify-content: flex-end; gap: 4px 18px; min-width: 0; }
.site-nav a, .text-button, .chip, .btn {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.site-nav a {
  text-decoration: none;
  padding: 0 4px;
  color: inherit;
}
.site-nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 6px; }
.site-nav > a { white-space: nowrap; }
.drawer-profile, .drawer-foot, .drawer-elephant { display: none; }
.wrap { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }
.page { padding: 12px 0 64px; }
.btn {
  border-radius: 999px;
  padding: 0 28px;
  min-height: 52px;
  max-height: 56px;
  font-size: 18px;
  line-height: 1;
  border: 0;
  background: linear-gradient(90deg, #4fd1ff, #7b5cff 55%, #b36bff);
  color: #fff;
  box-shadow: 0 8px 22px rgba(179, 107, 255, 0.4);
  text-decoration: none;
  cursor: pointer;
}
.btn-ghost { background: transparent; color: var(--navy); box-shadow: none; border: 1.5px solid var(--navy); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; }
.text-button {
  border: 0;
  background: transparent;
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
  padding: 0 4px;
}
.card, .panel {
  background: rgba(255, 252, 245, 0.72);
  border: 1px solid rgba(201, 164, 92, 0.55);
  border-radius: 24px;
  box-shadow: 0 10px 28px rgba(31, 58, 110, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  padding: 24px;
}
.grid { display: grid; gap: 16px; }
.stack { display: grid; gap: 12px; }
label { display: grid; gap: 6px; font-size: 0.95rem; }
input, select {
  min-height: 48px;
  border-radius: 12px;
  border: 1px solid rgba(31, 58, 110, 0.28);
  background: #fff;
  padding: 0 14px;
  font-size: 16px;
}
.user-chip {
  display: none;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  margin-left: 12px;
  padding: 4px 8px 4px 4px;
  border-radius: 999px;
  border: 1px solid rgba(201, 164, 92, 0.7);
  background: rgba(255, 252, 245, 0.82);
  color: var(--navy);
  white-space: nowrap;
}
.chip-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; display: block; }
.theme-paper .chip-avatar,
.theme-paper .avatar-slot img { border: 2px solid #C9A45C; }
.user-chip .user-mark {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--navy);
  color: #fff;
  font-family: var(--serif);
}
.user-chip .text-button { min-height: 36px; color: var(--navy); }
@media (min-width: 1024px) {
  .site-header.is-signed .user-chip { display: inline-flex; }
  .site-header.is-signed [data-session] { display: none; }
}
.check { display: flex; align-items: center; gap: 10px; }
.check input { width: 22px; height: 22px; margin: 0; flex: 0 0 auto; }
.alert {
  background: var(--orange-bg);
  color: #7a3e0c;
  border: 1px solid rgba(196, 106, 26, 0.45);
  border-radius: 14px;
  padding: 12px 14px;
}
.note { color: var(--muted); font-size: 0.92rem; }
.seal {
  display: inline-grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border: 2px solid var(--seal);
  color: var(--seal);
  border-radius: 50%;
  font-family: var(--serif);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  transform: rotate(-8deg);
  background: rgba(255, 252, 245, 0.8);
}
.seal-done { width: auto; height: auto; min-width: 64px; min-height: 28px; padding: 2px 8px; border-radius: 999px; transform: none; font-size: 0.78rem; }
.soon-card { opacity: 1; position: relative; }
.soon-card .seal {
  position: absolute;
  right: 10px;
  top: 10px;
  width: auto;
  height: auto;
  min-width: 0;
  min-height: 0;
  padding: 3px 7px;
  border: 0;
  border-radius: 4px;
  background: #c23a32;
  color: #fff;
  font-size: 12px;
  letter-spacing: 0;
  line-height: 1.2;
  transform: none;
}
.mascot { margin: 0; display: grid; justify-items: start; gap: 8px; }
.mascot img { width: min(180px, 42vw); height: auto; }
.bubble {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 8px 12px;
  font-family: var(--serif);
}
.boot {
  min-height: 50vh;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  text-align: center;
}
.site-footer { align-items: center; padding-bottom: 28px; flex-wrap: wrap; background: transparent; }
.site-footer .brand { gap: 0; align-items: center; }
.site-footer .brand-logo { height: 34px; }
.site-footer .brand-rule { margin: 0 13px; height: 16px; }
.site-footer .brand-wordmark { height: 32px; width: auto; display: block; max-width: none; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 12px; }
.fine { font-size: 0.82rem; color: var(--muted); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.menu-button {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--navy);
  cursor: pointer;
  place-items: center;
}
.menu-button.is-avatar { font-family: var(--serif); font-size: 1.25rem; }
.menu-bars, .menu-bars::before, .menu-bars::after {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  position: relative;
}
.menu-bars::before, .menu-bars::after { content: ""; position: absolute; left: 0; }
.menu-bars::before { top: -6px; }
.menu-bars::after { top: 6px; }
.nav-backdrop {
  position: fixed;
  inset: 0;
  border: 0;
  background: rgba(21, 40, 77, 0.28);
  z-index: 20;
}
@media (max-width: 1023px) {
  .site-header { flex-direction: row; align-items: center; }
  .menu-button { display: inline-grid; }
  .site-nav {
    display: none;
    flex-wrap: nowrap;
    position: fixed;
    z-index: 30;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(320px, 86vw);
    padding: 28px 20px;
    background: var(--paper);
    color: var(--navy);
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    box-shadow: var(--shadow);
  }
  .site-nav.is-open { display: flex; position: fixed; top: 0; right: 0; bottom: 0; left: auto; height: 100dvh; width: min(300px, 100vw); margin: 0; padding: 16px 22px 150px; justify-content: flex-start; align-content: flex-start; background: var(--paper); box-shadow: -20px 0 40px -20px rgba(0, 0, 0, 0.4); overflow: auto; z-index: 80; }
  .site-nav.is-open a, .site-nav.is-open .text-button { color: var(--navy); justify-content: flex-start; text-decoration: none; min-height: 0; }
  .site-nav.is-open > a { padding: 14px 4px; border-bottom: 1px solid rgba(31, 58, 110, 0.14); font-size: 16px; font-weight: 400; }
  .site-nav.is-open [data-session] { display: none; }
  .site-nav.is-open > a[aria-current="page"] { font-weight: 500; text-decoration: none; }
  .drawer-profile, .drawer-foot, .drawer-elephant { display: none; }
  .site-nav.is-open .drawer-profile { display: flex; gap: 12px; align-items: center; margin-bottom: 18px; }
  .site-nav.is-open .drawer-profile img { width: 48px; height: 48px; border: 2px solid #fff; border-radius: 50%; object-fit: cover; }
  .site-nav.is-open .drawer-profile strong { display: block; font-family: var(--serif); font-size: 18px; font-weight: 700; }
  .site-nav.is-open .drawer-profile a { color: var(--navy); font-size: 13px; padding: 0; border: 0; }
  .site-nav.is-open .drawer-foot { display: flex; flex-direction: column; gap: 12px; margin-top: 18px; }
  .site-nav.is-open .drawer-foot a { color: var(--muted); font-size: 13px; padding: 0; border: 0; }
  .site-nav.is-open .drawer-foot .text-button { justify-content: center; width: 100%; margin-top: 22px; height: 44px; border: 1px solid rgba(31, 58, 110, 0.35); border-radius: 10px; background: transparent; }
  .site-nav.is-open .drawer-elephant { display: block; position: absolute; right: 20px; top: max(510px, calc(100dvh - 240px - env(safe-area-inset-bottom))); width: 110px; pointer-events: none; }
  .nav-backdrop { top: 56px; background: rgba(20, 30, 50, 0.35); }
  .site-nav.is-open .drawer-elephant { max-width: none; }
  .site-nav.is-open:has(.drawer-profile) { gap: 0; }
  .site-nav.is-open .drawer-foot .text-button { margin-top: 10px; }
}
@media (max-width: 599px) {
  .site-header, .site-footer { padding: 12px 14px; }
  .site-header .brand-logo { height: 34px; }
  .site-header .brand-wordmark { height: 32.6px; }
  .site-header .brand-rule { margin: 0 13px; height: 16px; }
  .site-footer { align-items: flex-start; flex-direction: column; }
  .wrap { width: min(100% - 24px, 1120px); }
}
@media (min-width: 1024px) {
  .theme-paper .site-header { background: #f7f1e3; z-index: 50; }
  .drawer-profile, .drawer-foot, .drawer-elephant, .nav-backdrop { display: none !important; }
  .site-nav { display: flex; position: static; width: auto; height: auto; flex-direction: row; padding: 0; background: transparent; box-shadow: none; overflow: visible; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}


.sep {
  display: inline-block;
  width: 19px;
  text-align: center;
  vertical-align: middle;
  font-size: 0;
  line-height: 0;
}
.sep::after {
  content: "";
  display: inline-block;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
}
.empty-dash {
  color: #b2a995;
  font-family: var(--serif);
  font-weight: 400;
}

html:has(.learner-drawer[open]) { overflow: hidden; }
.learner-drawer {
  position: fixed; inset: 0 0 0 auto; width: min(320px, 96vw);
  height: 100%; height: 100dvh; max-height: none; max-width: none; margin: 0;
  background: var(--paper); color: var(--navy); border: 0;
  padding: max(16px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right))
    max(18px, env(safe-area-inset-bottom)) 18px;
  overflow: auto; overscroll-behavior: contain;
}
.learner-drawer::backdrop { background: rgb(22 28 49 / .55); }
.learner-drawer-head { display: flex; align-items: center; justify-content: space-between; }
.learner-drawer-head h2 { margin: 0; font-size: 20px; }
.learner-drawer nav { display: grid; margin-top: 12px; }
.learner-drawer a, .learner-drawer button {
  display: flex; align-items: center; min-height: 44px; padding: 6px 10px;
  background: transparent; color: var(--navy); font: inherit; border: 0;
}
.learner-drawer a { border-bottom: 1px solid rgb(31 58 110 / .14); text-decoration: none; }
.learner-drawer [aria-current="page"] { font-weight: 700; }
.learner-drawer :focus-visible { outline: 2px solid var(--navy); outline-offset: -2px; }
img[data-image-fallback][hidden] { display: none !important; }
