@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@500;600;700;800;900&display=swap");

@font-face {
  font-family: "BSC Display";
  src: url("assets/bsc-display.otf") format("opentype");
  font-display: swap;
}

:root {
  --brown: #612717;
  --brown-deep: #3b160d;
  --brown-soft: #7a431f;
  --yellow: #e3ba59;
  --gold: #d9902c;
  --clay: #b46424;
  --orange: #f2a039;
  --cream: #fae1ca;
  --paper: #f8f0e5;
  --white: #fffaf4;
  --ink: #2d160f;
  --muted: #715247;
  --border: rgba(105, 34, 16, 0.32);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

.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;
}

html { min-height: 100%; background: var(--brown); }

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--cream);
  font-family: "Montserrat", Arial, Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button { font: inherit; }
button:focus-visible, a:focus-visible { outline: 4px solid var(--orange); outline-offset: 4px; }

.page-shell {
  width: min(100%, 760px);
  min-height: 100vh;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle, rgba(105, 34, 16, .09) 1.2px, transparent 1.5px) 0 0 / 17px 17px,
    var(--cream);
}

.page-shell::before,
.page-shell::after {
  content: "";
  position: fixed;
  z-index: 0;
  width: 250px;
  height: 250px;
  border-radius: 48% 52% 36% 64% / 54% 42% 58% 46%;
  pointer-events: none;
}

.page-shell::before { top: 58px; left: max(-180px, calc(50vw - 560px)); background: var(--yellow); transform: rotate(19deg); }
.page-shell::after { right: max(-190px, calc(50vw - 570px)); bottom: -100px; background: var(--orange); transform: rotate(-20deg); }

.site-header {
  width: 100%;
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px clamp(18px, 5vw, 36px);
  position: relative;
  z-index: 20;
  background: var(--cream);
  border-bottom: 3px solid var(--brown);
}

.brand-button { display: flex; align-items: center; border: 0; background: transparent; padding: 0; cursor: pointer; }
.brand-logo { display: block; width: auto; height: 58px; }

.icon-button {
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 14px;
  border: 3px solid var(--brown);
  background: var(--yellow);
  color: var(--brown);
  box-shadow: 4px 4px 0 var(--brown);
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}

.icon-button:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--brown); }
.icon-button:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--brown); }
.icon-button svg, .button svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 2.3; stroke-linecap: round; stroke-linejoin: round; }

main { min-height: calc(100vh - 88px); position: relative; z-index: 2; }
.page-shell.is-home .site-header { display: none; }
.page-shell.is-home main { min-height: 100vh; }

.screen {
  display: none;
  width: 100%;
  min-height: calc(100vh - 88px);
  padding: 32px clamp(20px, 6vw, 48px) 44px;
  animation: enter .32s ease both;
}

.screen.is-active { display: flex; flex-direction: column; }

.home-screen {
  min-height: 100vh;
  align-items: center;
  padding: 34px clamp(20px, 6vw, 48px) 30px;
  color: var(--cream);
  background:
    radial-gradient(circle at 14% 10%, rgba(250, 225, 202, .22) 0 1px, transparent 1.5px) 0 0 / 19px 19px,
    linear-gradient(180deg, var(--cream) 0 18%, #874523 38%, var(--brown) 62%, var(--brown-deep) 100%);
}

.home-share-button {
  position: absolute;
  top: 20px;
  right: clamp(18px, 5vw, 34px);
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 2px solid var(--brown);
  border-radius: 50%;
  background: var(--yellow);
  color: var(--brown);
  box-shadow: 4px 4px 0 var(--brown);
  cursor: pointer;
}

.home-share-button:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--brown); }
.home-share-button:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--brown); }
.home-share-button svg, .social-links svg, .hub-link > svg { width: 21px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.home-brand { width: 100%; text-align: center; margin-top: 35px; }
.home-logo { display: block; width: min(76vw, 340px); height: auto; margin: 0 auto 24px; }
.home-brand h1 {
  max-width: none;
  margin: 0 0 10px;
  color: var(--white);
  font-family: "Montserrat", Arial, sans-serif;
  font-size: clamp(31px, 7vw, 44px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -.035em;
}
.home-brand p { max-width: 470px; margin: 0 auto; color: var(--white); font-size: 16px; font-weight: 650; line-height: 1.45; }

.social-links { display: flex; justify-content: center; gap: 10px; margin: 22px 0 28px; }
.social-links a {
  min-width: 82px;
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 12px;
  border: 2px solid rgba(255, 250, 244, .75);
  border-radius: 999px;
  color: var(--white);
  background: rgba(59, 22, 13, .38);
  text-decoration: none;
  font-size: 12px;
  font-weight: 800;
}
.social-links a:hover { background: rgba(59, 22, 13, .62); }
.social-links svg { width: 19px; height: 19px; }
.social-links .fill-icon { fill: currentColor; stroke: none; }

.link-hub { width: min(100%, 560px); display: grid; gap: 13px; }
.hub-link {
  width: 100%;
  min-height: 76px;
  display: grid;
  grid-template-columns: 42px 1fr 22px;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border: 3px solid var(--cream);
  border-radius: 18px;
  background: #8d4926;
  color: var(--white);
  box-shadow: 5px 5px 0 rgba(45, 22, 15, .95);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.hub-link:hover { transform: translate(-1px, -1px); box-shadow: 6px 6px 0 rgba(45, 22, 15, .95); background: #9f542b; }
.hub-link:active { transform: translate(4px, 4px); box-shadow: none; }
.hub-link-featured { background: var(--yellow); color: var(--brown-deep); border-color: var(--brown-deep); }
.hub-link-featured:hover { background: #edc766; }
.hub-link-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: rgba(250, 225, 202, .16); font-family: "BSC Display", Georgia, serif; font-size: 23px; font-weight: 900; }
.hub-link-icon svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.hub-link-featured .hub-link-icon { background: var(--brown); color: var(--yellow); }
.hub-link strong, .hub-link small { display: block; }
.hub-link strong { font-size: 15px; line-height: 1.25; }
.hub-link small { margin-top: 3px; color: inherit; opacity: .86; font-size: 12px; font-weight: 600; line-height: 1.3; }
.hub-link > svg { justify-self: end; width: 20px; }
@keyframes enter {
  from { opacity: 0; transform: translateY(9px); }
  to { opacity: 1; transform: translateY(0); }
}

.eyebrow, .step-label {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 9px;
  padding: 7px 11px;
  color: var(--brown);
  background: var(--yellow);
  border: 2px solid var(--brown);
  box-shadow: none;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .11em;
  text-transform: uppercase;
  transform: none;
}

.eyebrow span { width: 19px; height: 2px; background: currentColor; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: "BSC Display", "Bookman Old Style", Georgia, serif; }

h1 {
  max-width: 640px;
  margin: 23px 0 15px;
  color: var(--brown);
  font-size: clamp(42px, 9vw, 65px);
  line-height: .98;
  letter-spacing: -.045em;
}

h1 em {
  color: var(--brown);
  font-style: normal;
  text-shadow: none;
  background: linear-gradient(transparent 68%, rgba(242, 160, 57, .72) 68% 91%, transparent 91%);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.lede {
  max-width: 590px;
  margin-bottom: 20px;
  color: var(--brown);
  font-size: clamp(16px, 3vw, 18px);
  font-weight: 650;
  line-height: 1.5;
}

.hero-art { min-height: 255px; margin: 4px 0 25px; position: relative; display: grid; place-items: center; }

.sunburst {
  position: absolute;
  width: 238px;
  height: 238px;
  border-radius: 50%;
  border: 4px solid var(--brown);
  background: var(--brown) url("assets/sunburst.webp") center / cover no-repeat;
  box-shadow: none;
}

.hero-card { position: absolute; width: min(76vw, 310px); height: 174px; border: 3px solid var(--brown); border-radius: 8px; }
.hero-card-front { display: grid; grid-template-columns: 1fr 105px; align-items: center; gap: 4px; padding: 19px 15px 19px 21px; background: var(--cream); transform: none; box-shadow: none; }
.hero-card-copy { position: relative; z-index: 2; display: flex; flex-direction: column; }
.hero-people { width: 104px; max-width: none; justify-self: end; filter: none; }
.hero-card-kicker, .hero-card-note { color: var(--brown); font-size: 10px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.hero-card-front strong { margin: 10px 0 11px; color: var(--brown); font-family: "BSC Display", Georgia, serif; font-size: 27px; line-height: .93; letter-spacing: -.035em; }
.hero-card-note { color: var(--brown); }

.action-stack { width: 100%; display: grid; gap: 12px; }

.button {
  min-height: 58px;
  width: 100%;
  border-radius: 16px;
  padding: 14px 22px;
  border: 3px solid var(--brown);
  color: var(--brown);
  font-weight: 900;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}

.button:hover { transform: translate(-1px, -1px); }
.button:active { transform: translate(4px, 4px); box-shadow: none; }
.button-primary { display: flex; justify-content: center; align-items: center; gap: 7px; background: var(--yellow); box-shadow: 5px 6px 0 var(--brown); }
.button-primary:hover { background: #edc766; box-shadow: 6px 7px 0 var(--brown); }
.button-secondary { background: var(--paper); box-shadow: 4px 5px 0 var(--brown); }

.text-button { border: 0; background: transparent; color: var(--brown); font-weight: 900; cursor: pointer; padding: 11px; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }

.group-screen h2, .setup-screen h2, .host-screen h2, .closing-screen h2, .done-screen h2 { color: var(--brown); font-size: clamp(36px, 7vw, 52px); line-height: .98; letter-spacing: -.04em; margin: 20px 0 27px; }

.group-screen { justify-content: center; }
.group-intro { max-width: 560px; margin: -10px 0 25px; color: var(--brown); font-size: 16px; font-weight: 650; line-height: 1.5; }
.assignment-panel {
  width: min(100%, 520px);
  min-height: 168px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 26px;
  padding: 6px 0;
  border: 0;
  background: transparent;
}
.assignment-number {
  width: 142px;
  height: 142px;
  display: grid;
  place-items: center;
  border: 4px solid var(--brown);
  border-radius: 50%;
  background: var(--cream);
  color: var(--brown);
  font-family: "BSC Display", "Bookman Old Style", Georgia, serif;
  font-size: 78px;
  line-height: 1;
}
.assignment-panel.has-number .assignment-number { background: var(--yellow); }
.assignment-number.is-revealing { animation: numberReveal .42s ease both; }
@keyframes numberReveal {
  0% { opacity: 0; transform: scale(.78) rotate(-5deg); }
  100% { opacity: 1; transform: scale(1) rotate(0); }
}
.group-actions { width: min(100%, 520px); display: grid; gap: 10px; }

.setup-list { display: grid; gap: 0; margin: 0 0 30px; border-top: 2px solid var(--brown); }
.setup-list article { display: grid; grid-template-columns: 47px 1fr; gap: 12px; padding: 22px 2px; border: 0; border-bottom: 2px solid var(--brown); border-radius: 0; background: transparent; box-shadow: none; }
.setup-list article:nth-child(2), .setup-list article:nth-child(3) { background: transparent; }
.setup-list .number { width: auto; height: auto; display: block; padding-top: 3px; border: 0; border-radius: 0; background: transparent; color: var(--brown); font-family: "BSC Display", Georgia, serif; font-size: 17px; }
.setup-list h3 { color: var(--brown); font-size: 19px; margin: 1px 0 6px; }
.setup-list p { color: var(--brown); line-height: 1.42; margin: 0; font-size: 14px; font-weight: 600; }
.setup-screen > .text-button, .icebreaker-screen > .text-button, .closing-screen > .text-button { margin-top: 10px; align-self: center; }

.icebreaker-screen, .deck-screen { justify-content: center; }
.card-stage { width: 100%; display: grid; place-items: center; perspective: 1000px; margin: auto 0 27px; }

.prompt-card {
  width: min(100%, 520px);
  min-height: min(61vh, 500px);
  border: 2px solid var(--brown);
  border-radius: 10px;
  background: var(--yellow);
  box-shadow: none;
  position: relative;
  overflow: hidden;
  padding: clamp(25px, 6vw, 42px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.prompt-card::before { content: ""; position: absolute; inset: 9px; border: 1px solid rgba(97, 39, 23, .28); border-radius: 11px; pointer-events: none; }
.prompt-card.is-changing { animation: cardFlip .42s ease both; }
@keyframes cardFlip {
  0% { opacity: 1; transform: rotateY(0) scale(1); }
  48% { opacity: 0; transform: rotateY(11deg) scale(.96); }
  52% { opacity: 0; transform: rotateY(-11deg) scale(.96); }
  100% { opacity: 1; transform: rotateY(0) scale(1); }
}

.card-topline { position: absolute; z-index: 3; top: 28px; left: 28px; right: 28px; display: flex; justify-content: space-between; gap: 10px; color: var(--brown); font-size: 10px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.card-topline span:first-child { padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; transform: none; }
.card-topline span:last-child { width: auto; height: auto; display: block; padding: 0; border: 0; border-radius: 0; background: transparent; color: var(--brown); }
.prompt-card h2 { position: relative; z-index: 2; max-width: 440px; margin: 0; color: var(--brown); font-size: clamp(30px, 6.4vw, 45px); line-height: 1.03; letter-spacing: -.04em; }
.prompt-card > p { position: absolute; left: 30px; right: 30px; bottom: 27px; z-index: 2; color: var(--brown); font-size: 12px; font-weight: 750; margin: 0; }
.quote-mark { position: absolute; top: 58px; left: 18px; color: rgba(105, 34, 16, .13); font-family: Georgia, serif; font-size: 140px; line-height: 1; }

.icebreaker-card { background: var(--yellow); }

.deck-status { width: min(100%, 520px); margin: 0 auto 15px; display: flex; justify-content: space-between; color: var(--brown); font-size: 11px; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; }
.deck-actions { display: grid; grid-template-columns: 1.3fr .7fr; gap: 11px; width: min(100%, 520px); margin: 0 auto; }
.microcopy { margin: 16px auto 0; color: var(--brown); text-align: center; font-size: 12px; font-weight: 700; }

.closing-screen { justify-content: center; position: relative; }
.closing-screen .eyebrow, .closing-screen h2, .closing-prompts, .closing-screen .button, .closing-screen .text-button { position: relative; z-index: 2; }
.closing-prompts { display: grid; gap: 0; margin-bottom: 27px; border-top: 2px solid var(--brown); }
.closing-prompts article { display: grid; grid-template-columns: 38px 1fr; gap: 14px; align-items: start; padding: 19px 2px; border: 0; border-bottom: 2px solid var(--brown); border-radius: 0; background: transparent; box-shadow: none; }
.closing-prompts article:nth-child(2), .closing-prompts article:nth-child(3) { background: transparent; transform: none; }
.closing-prompts article span { width: auto; height: auto; display: block; padding-top: 4px; border: 0; border-radius: 0; background: transparent; color: var(--brown); font-size: 11px; font-weight: 900; }
.closing-prompts p { color: var(--brown); line-height: 1.3; margin: 2px 0 0; font-size: 16px; font-weight: 750; }
.closing-orbit { position: absolute; z-index: 0; width: 330px; height: 330px; right: -170px; top: 20px; border: 4px solid var(--brown); border-radius: 48% 52% 38% 62%; background: var(--orange); transform: rotate(18deg); }
.closing-orbit span { position: absolute; width: 24px; height: 24px; border: 3px solid var(--brown); border-radius: 50%; }
.closing-orbit span:nth-child(1) { left: 7%; top: 12%; background: var(--yellow); }
.closing-orbit span:nth-child(2) { left: -3%; top: 50%; background: var(--cream); }
.closing-orbit span:nth-child(3) { left: 18%; bottom: 6%; background: var(--gold); }
.closing-orbit span:nth-child(4) { right: 17%; bottom: -3%; background: var(--yellow); }

.done-screen { text-align: center; align-items: center; justify-content: center; }
.done-screen h2 { max-width: 540px; margin-bottom: 16px; }
.done-screen > p:not(.script-label) { color: var(--brown); line-height: 1.5; max-width: 470px; margin-bottom: 28px; font-weight: 650; }
.done-screen .button { max-width: 460px; margin-bottom: 11px; }
.done-mark { width: 74px; height: 74px; display: grid; place-items: center; border: 3px solid var(--brown); border-radius: 8px; background: var(--orange); color: var(--brown); font-size: 32px; margin-bottom: 22px; box-shadow: none; transform: none; }
.done-logo { width: min(66vw, 270px); height: auto; margin: 8px auto 3px; }

.host-screen { padding-bottom: 58px; }
.host-callout { padding: 23px; border: 3px solid var(--brown); border-radius: 8px; background: repeating-conic-gradient(from 0deg at 95% 110%, var(--orange) 0 8deg, var(--gold) 8deg 18deg, var(--brown) 18deg 27deg); color: var(--paper); box-shadow: none; margin-bottom: 26px; }
.host-callout strong { display: inline-block; padding: 5px 8px; background: var(--paper); color: var(--brown); border: 2px solid var(--brown); margin-bottom: 9px; text-transform: uppercase; letter-spacing: .1em; font-size: 9px; }
.host-callout p { margin: 0; max-width: 520px; padding: 10px 12px; border-radius: 10px; background: rgba(59, 22, 13, .94); color: var(--paper); font-size: 16px; font-weight: 800; line-height: 1.45; }
.host-sections { display: grid; gap: 0; margin-bottom: 31px; border-top: 2px solid var(--brown); }
.host-sections article { padding: 22px 2px; border: 0; border-bottom: 2px solid var(--brown); border-radius: 0; background: transparent; box-shadow: none; }
.host-sections article:nth-child(2) { background: transparent; }
.host-sections h3 { color: var(--brown); font-size: 21px; margin-bottom: 12px; }
.host-sections ul { margin: 0; padding-left: 18px; color: var(--brown); font-weight: 650; line-height: 1.5; }
.host-sections li + li { margin-top: 7px; }
.timeline { display: grid; gap: 9px; list-style: none; padding: 0; margin: 0; }
.timeline li { display: grid; grid-template-columns: 54px 1fr; gap: 12px; align-items: start; }
.timeline span { display: inline-grid; place-items: center; min-height: 29px; border: 2px solid var(--brown); border-radius: 9px; background: var(--cream); color: var(--brown); font-size: 9px; font-weight: 900; }
.timeline p { margin: 5px 0 0; color: var(--brown); font-size: 14px; font-weight: 650; }
.host-script p { margin: 0; padding: 17px; border: 2px dashed var(--brown); border-radius: 11px; background: var(--cream); color: var(--brown); font-size: 15px; font-weight: 650; line-height: 1.48; }

.toast { position: fixed; left: 50%; bottom: 24px; translate: -50% 20px; z-index: 100; opacity: 0; pointer-events: none; padding: 12px 18px; border: 3px solid var(--brown); border-radius: 12px; background: var(--yellow); color: var(--brown); box-shadow: 4px 5px 0 var(--brown); font-size: 12px; font-weight: 900; transition: opacity .2s ease, translate .2s ease; }
.toast.is-visible { opacity: 1; translate: -50% 0; }
.confetti { position: fixed; inset: 0; z-index: 80; pointer-events: none; overflow: hidden; }
.confetti span { position: absolute; top: -20px; width: 9px; height: 16px; border: 2px solid var(--brown); border-radius: 2px; animation: fall 1.7s ease-in forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(620deg); opacity: .15; } }

@media (min-width: 660px) {
  .page-shell { border-left: 3px solid var(--brown); border-right: 3px solid var(--brown); }
  .welcome-screen { justify-content: center; }
  .hero-art { min-height: 285px; }
  .action-stack { max-width: 520px; }
  .group-screen, .setup-screen, .host-screen { max-width: 650px; margin: 0 auto; }
}

@media (max-width: 420px) {
  .site-header { min-height: 78px; padding-top: 12px; padding-bottom: 12px; }
  .brand-logo { height: 50px; }
  .icon-button { width: 43px; height: 43px; }
  .home-screen { padding-left: 16px; padding-right: 16px; }
  .home-logo { width: min(76vw, 285px); margin-bottom: 18px; }
  .social-links a { min-width: 48px; padding: 10px 13px; }
  .social-links a span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
  .hub-link { grid-template-columns: 38px 1fr 18px; min-height: 72px; padding: 12px 14px; gap: 12px; }
  .hub-link-icon { width: 38px; height: 38px; }
  main { min-height: calc(100vh - 78px); }
  .screen { min-height: calc(100vh - 78px); padding-top: 25px; }
  .hero-art { min-height: 235px; }
  .sunburst { width: 210px; height: 210px; }
  .hero-card { height: 158px; }
  .hero-card-front strong { font-size: 24px; }
  .prompt-card { min-height: 56vh; }
  .deck-actions { grid-template-columns: 1fr; }
  .deck-actions .button-secondary { min-height: 50px; }
}

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