:root {
  --eazo-safe-area-top: max(56px, env(safe-area-inset-top, 0px));
  --eazo-safe-area-bottom: max(34px, env(safe-area-inset-bottom, 0px));
  --paper: #fbf6ed;
  --paper-deep: #f1e7d9;
  --ink: #2e2823;
  --muted: #8a8076;
  --quiet: #d9d0c5;
  --line: #e5dacf;
  --accent: #b9858f;
  --accent-soft: #ead3d7;
  --rose-ink: #744b55;
  --void: #25190f;
  --shadow: 0 24px 80px rgba(63, 42, 25, .10), 0 4px 24px rgba(63, 42, 25, .06);
  --serif: Georgia, 'Times New Roman', Times, 'Noto Serif SC', 'Songti SC', serif;
  --sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans SC', 'PingFang SC', sans-serif;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background:
    radial-gradient(circle at 12% -8%, rgba(185,133,143,.18), transparent 34%),
    radial-gradient(circle at 92% 4%, rgba(232,149,74,.11), transparent 32%),
    linear-gradient(135deg, #fffaf2 0%, var(--paper) 48%, #f6eee4 100%);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .23;
  background-image:
    linear-gradient(rgba(46,40,35,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(46,40,35,.018) 1px, transparent 1px);
  background-size: 18px 18px, 18px 18px;
  mix-blend-mode: multiply;
}

button {
  font: inherit;
  color: inherit;
  border: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
button:disabled { cursor: not-allowed; }

.app {
  width: 100%;
  min-height: 100svh;
  padding-top: var(--eazo-safe-area-top);
  padding-bottom: var(--eazo-safe-area-bottom);
  display: flex;
  justify-content: center;
}

.shell {
  width: min(100%, 820px);
  padding: 18px clamp(18px, 5vw, 44px) 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.brand { min-width: 0; }

.eyebrow, .micro {
  margin: 0;
  font-size: 11px;
  line-height: 1.3;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}

.brand-name {
  margin: 2px 0 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(18px, 5vw, 24px);
  line-height: 1.15;
  letter-spacing: -.02em;
}

.language-toggle {
  min-width: 100px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,250,242,.72);
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  padding: 3px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.6);
  flex: 0 0 auto;
}

.language-toggle button {
  min-height: 36px;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.language-toggle button.active {
  background: var(--accent);
  color: #fffaf4;
  box-shadow: 0 6px 18px rgba(185,133,143,.22);
}

/* Accessible hidden native locale select bound to the Eazo runtime */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

main {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  gap: 18px;
}

.panel {
  width: 100%;
  max-width: 560px;
  border: 1px solid rgba(108,85,63,.16);
  background: rgba(255,250,242,.82);
  box-shadow: var(--shadow);
  border-radius: 26px;
  padding: clamp(20px, 5vw, 36px);
  position: relative;
  overflow: hidden;
}

.panel::after {
  content: "";
  position: absolute;
  inset: 1px;
  border: 1px solid rgba(255,255,255,.48);
  border-radius: 24px;
  pointer-events: none;
}

.stage-head {
  text-align: center;
  margin-bottom: 18px;
}

h1, h2 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -.035em;
  margin: 0;
  color: var(--ink);
}

h1 { font-size: clamp(34px, 10vw, 56px); line-height: .98; }
h2 { font-size: clamp(30px, 8vw, 46px); line-height: 1.02; }

.instruction {
  max-width: 430px;
  margin: 12px auto 0;
  color: #625a51;
  font-size: 14px;
  line-height: 1.48;
}

.month-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
  margin-bottom: 12px;
}

.month-title {
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 400;
  margin: 0;
}

.availability {
  color: var(--rose-ink);
  background: rgba(234,211,215,.62);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
}

.weekdays, .calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 5px;
}

.weekdays {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-align: center;
}

.day {
  min-width: 0;
  min-height: 48px;
  border-radius: 13px;
  background: rgba(247,240,231,.66);
  border: 1px solid rgba(218,207,195,.75);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  padding: 6px;
  position: relative;
  overflow: hidden;
  transition: opacity .32s ease, background-color .32s ease, border-color .32s ease, transform .24s ease;
}

.day .num {
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1;
}

.day .reason {
  width: 100%;
  min-height: 13px;
  color: #958a7f;
  font-size: 8.5px;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: .9;
}

.day.open {
  background: #fffaf4;
  border-color: rgba(185,133,143,.58);
  box-shadow: inset 0 0 0 1px rgba(185,133,143,.1), 0 7px 18px rgba(185,133,143,.08);
}

.day.open::before {
  content: "";
  position: absolute;
  right: 7px;
  top: 7px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  opacity: .75;
}

.day.closed, .day.past, .month-closed .day {
  opacity: .42;
  background: rgba(230,224,217,.45);
  border-color: rgba(218,207,195,.42);
  color: #81776d;
}

.day.checking {
  color: transparent;
  background: linear-gradient(100deg, #f6efe6 0%, #fffaf4 42%, #ead3d7 50%, #fffaf4 58%, #f6efe6 100%);
  background-size: 230% 100%;
  animation: shimmer .72s ease-in-out 1;
}

.day.checking .reason { color: transparent; }

@keyframes shimmer {
  from { background-position: 120% 0; }
  to { background-position: -70% 0; }
}

.message {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 20px 0 8px;
}

.message p {
  margin: 0;
  max-width: 360px;
  color: #625a51;
  line-height: 1.48;
}

.primary, .secondary, .ghost, .name-button {
  min-height: 44px;
  border-radius: 999px;
  padding: 0 20px;
  white-space: nowrap;
  transition: opacity .25s ease, transform .2s ease, background .25s ease;
}

.primary {
  background: var(--ink);
  color: #fffaf4;
  box-shadow: 0 12px 28px rgba(46,40,35,.16);
}

.secondary {
  background: var(--accent);
  color: #fffaf4;
  box-shadow: 0 12px 28px rgba(185,133,143,.2);
}

.ghost {
  background: transparent;
  color: var(--rose-ink);
  border: 1px solid rgba(185,133,143,.34);
}

.primary:active, .secondary:active, .ghost:active, .day.open:active, .name-button:active { transform: translateY(1px); }

.choice-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 6px;
}

.name-button {
  width: 100%;
  background: #fffaf4;
  border: 1px solid var(--line);
  color: var(--ink);
  text-align: center;
  padding: 0 12px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.name-button.taken {
  opacity: .42;
  background: rgba(230,224,217,.42);
  color: #81776d;
}

.name-button.last {
  grid-column: 1 / -1;
  color: var(--rose-ink);
  border-color: rgba(185,133,143,.45);
}

.status-line {
  min-height: 20px;
  margin: 2px 0 0;
  color: var(--rose-ink);
  font-size: 13px;
  text-align: center;
}

.pass-wrap {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
}

.pass-card {
  width: min(100%, 430px);
  min-height: 286px;
  background:
    radial-gradient(circle at 20% 12%, rgba(255,255,255,.72), transparent 22%),
    linear-gradient(135deg, #fffbf5 0%, #f4eadc 100%);
  border: 1px solid rgba(117,91,66,.2);
  border-radius: 22px;
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.78);
  position: relative;
  overflow: hidden;
  padding: 24px 26px 24px 28px;
}

.pass-card::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  right: 54px;
  border-left: 2px dotted rgba(117,91,66,.28);
}

.pass-card::after {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 16px;
  pointer-events: none;
}

.stub-cut {
  position: absolute;
  top: 16px;
  right: 18px;
  bottom: 16px;
  width: 20px;
  background-image: radial-gradient(circle, rgba(117,91,66,.2) 2px, transparent 2.4px);
  background-size: 10px 10px;
  opacity: .62;
}

.pass-kicker {
  margin: 0 0 18px;
  color: var(--rose-ink);
  position: relative;
  z-index: 1;
}

.pass-number {
  position: relative;
  z-index: 1;
  font-family: var(--serif);
  font-size: clamp(52px, 15vw, 82px);
  line-height: .9;
  letter-spacing: -.05em;
  margin: 0;
  text-shadow: 0 1px 0 rgba(255,255,255,.9);
}

.pass-meta {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 9px;
  margin-top: 24px;
  padding-right: 52px;
}

.pass-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  border-top: 1px solid rgba(117,91,66,.12);
  padding-top: 8px;
  font-size: 13px;
  line-height: 1.35;
}

.pass-row span:first-child { color: var(--muted); }
.pass-row span:last-child { text-align: right; min-width: 0; }

.actions {
  width: min(100%, 430px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.actions .ghost { grid-column: 1 / -1; min-height: 44px; font-size: 13px; }

.months-detail {
  width: min(100%, 430px);
  border-top: 1px solid var(--line);
  padding-top: 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.months-detail[hidden] { display: none; }

.mini-months {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.mini-month {
  min-height: 62px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(230,224,217,.44);
  opacity: .58;
  padding: 9px;
  font-family: var(--serif);
  font-size: 15px;
}

.fade-in { animation: fadeIn .38s ease both; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

@media (min-width: 760px) {
  .shell { padding-top: 26px; }
  .panel { max-width: 680px; }
  .day { min-height: 64px; padding: 9px; }
  .day .reason { font-size: 10px; }
}
