@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/clubhouse-fonts/nunito.woff2") format("woff2");
}

@font-face {
  font-family: "Baloo 2";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/clubhouse-fonts/baloo-2.woff2") format("woff2");
}

:root {
  color-scheme: light;
  --club-ink: #29283a;
  --club-ink-soft: #686577;
  --club-paper: #fffaf0;
  --club-paper-strong: #fffdf8;
  --club-cream: #f6eddd;
  --club-periwinkle: #625aa7;
  --club-periwinkle-dark: #474279;
  --club-teal: #2f8582;
  --club-coral: #b44f47;
  --club-gold: #e8b949;
  --club-sage: #79a985;
  --club-wood: #9c6643;
  --club-wood-dark: #71462f;
  --club-line: rgba(52, 45, 67, 0.13);
  --club-shadow: 0 22px 56px rgba(76, 59, 84, 0.14), 0 5px 16px rgba(76, 59, 84, 0.08);
  --club-shadow-small: 0 9px 24px rgba(76, 59, 84, 0.13), 0 2px 5px rgba(76, 59, 84, 0.08);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--club-ink);
  font-family: "Nunito", system-ui, sans-serif;
  background-color: var(--club-cream);
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 4px solid rgba(47, 133, 130, 0.32);
  outline-offset: 3px;
}

.clubhouse-page {
  overflow-x: hidden;
  background:
    radial-gradient(circle at 10% 5%, rgba(121, 169, 133, 0.18), transparent 23rem),
    radial-gradient(circle at 92% 3%, rgba(98, 90, 167, 0.16), transparent 26rem),
    linear-gradient(rgba(255, 253, 248, 0.34), rgba(255, 250, 240, 0.74)),
    repeating-linear-gradient(0deg, transparent 0 27px, rgba(80, 57, 39, 0.025) 27px 28px),
    var(--club-cream);
}

.clubhouse-shell {
  width: min(1220px, calc(100% - 34px));
  margin: 0 auto;
  padding: 42px 0 34px;
}

.clubhouse-hero {
  position: relative;
  z-index: 1;
  border: 1px solid rgba(92, 76, 60, 0.13);
  border-radius: 28px;
  background: rgba(255, 253, 248, 0.96);
  box-shadow: var(--club-shadow);
}

.clubhouse-roof {
  position: absolute;
  z-index: -1;
  top: -31px;
  right: 28px;
  left: 28px;
  height: 58px;
  border-radius: 26px 26px 9px 9px;
  background: linear-gradient(135deg, #514a91, var(--club-periwinkle));
  clip-path: polygon(0 100%, 8% 38%, 50% 0, 92% 38%, 100% 100%);
  box-shadow: 0 9px 0 rgba(71, 66, 121, 0.16);
}

.clubhouse-hero-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  min-height: 158px;
  padding: 31px 34px 24px;
}

.clubhouse-monogram {
  display: grid;
  width: 80px;
  height: 80px;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, 0.7);
  border-radius: 25px;
  color: #fff;
  background: var(--club-teal);
  box-shadow: 0 8px 0 #226765, 0 13px 24px rgba(47, 133, 130, 0.2);
  font-family: "Baloo 2", sans-serif;
  font-size: 27px;
  font-weight: 800;
  letter-spacing: -0.04em;
  transform: rotate(-2deg);
}

.clubhouse-eyebrow,
.shelf-eyebrow,
.featured-kicker,
.login-eyebrow {
  margin: 0 0 5px;
  color: var(--club-coral);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.clubhouse-title {
  margin: 0;
  color: var(--club-ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(32px, 4.7vw, 55px);
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.clubhouse-intro {
  margin: 8px 0 0;
  color: var(--club-ink-soft);
  font-size: clamp(15px, 2vw, 18px);
  font-weight: 650;
}

.clubhouse-account {
  min-width: 182px;
}

.clubhouse-nav {
  display: flex;
  align-items: center;
  gap: 9px;
  overflow-x: auto;
  padding: 12px 24px 14px;
  border-top: 1px solid var(--club-line);
  scrollbar-width: none;
}

.clubhouse-nav::-webkit-scrollbar {
  display: none;
}

.clubhouse-nav a {
  flex: 0 0 auto;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 15px;
  border: 1px solid var(--club-line);
  border-radius: 999px;
  color: var(--club-ink);
  text-decoration: none;
  background: #fff;
  font-size: 14px;
  font-weight: 800;
  transition: transform 150ms ease, background-color 150ms ease, border-color 150ms ease;
}

.clubhouse-nav a:hover {
  border-color: rgba(98, 90, 167, 0.35);
  background: #f7f4ff;
  transform: translateY(-2px);
}

.featured-story {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  min-height: 245px;
  margin: 24px 0 42px;
  padding: clamp(28px, 5vw, 52px);
  border-radius: 27px;
  color: #fff;
  background:
    radial-gradient(circle at 88% 20%, rgba(255, 255, 255, 0.15), transparent 16rem),
    linear-gradient(135deg, var(--club-periwinkle-dark), var(--club-periwinkle));
  box-shadow: var(--club-shadow);
}

.featured-story::after {
  position: absolute;
  right: -70px;
  bottom: -95px;
  width: 330px;
  height: 250px;
  border: 28px solid rgba(255, 255, 255, 0.06);
  border-radius: 50%;
  content: "";
}

.featured-copy {
  position: relative;
  z-index: 1;
  max-width: 620px;
}

.featured-kicker {
  color: #f8d77c;
}

.featured-story h2 {
  max-width: 650px;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(31px, 5vw, 50px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.featured-story p {
  max-width: 600px;
  margin: 11px 0 22px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 17px;
  font-weight: 650;
  line-height: 1.5;
}

.featured-action {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 0 21px;
  border-radius: 14px;
  color: var(--club-periwinkle-dark);
  text-decoration: none;
  background: var(--club-paper-strong);
  box-shadow: 0 6px 0 #d7cdbd, 0 12px 24px rgba(31, 26, 54, 0.24);
  font-weight: 850;
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.featured-action:hover {
  transform: translateY(-2px);
}

.featured-action:active {
  box-shadow: 0 2px 0 #d7cdbd, 0 7px 15px rgba(31, 26, 54, 0.2);
  transform: translateY(3px);
}

.featured-illustration {
  position: relative;
  z-index: 1;
  width: 225px;
  height: 170px;
}

.featured-book {
  position: absolute;
  display: grid;
  place-items: center;
  border: 4px solid rgba(255, 255, 255, 0.72);
  border-radius: 15px 20px 20px 15px;
  box-shadow: 0 18px 28px rgba(34, 29, 59, 0.27);
  font-size: 49px;
}

.featured-book.one {
  right: 70px;
  bottom: 10px;
  width: 112px;
  height: 145px;
  background: #e9b94d;
  transform: rotate(-7deg);
}

.featured-book.two {
  right: 0;
  bottom: 4px;
  width: 105px;
  height: 138px;
  background: #73aaa1;
  transform: rotate(7deg);
}

.featured-spark {
  position: absolute;
  top: 1px;
  right: 26px;
  color: #f8d77c;
  font-size: 31px;
}

.game-shelf {
  margin: 0 0 47px;
  scroll-margin-top: 20px;
}

.shelf-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 22px;
  margin: 0 7px 17px;
}

.shelf-heading h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(27px, 4vw, 37px);
  line-height: 1.1;
  letter-spacing: -0.035em;
}

.shelf-heading p {
  max-width: 430px;
  margin: 0;
  color: var(--club-ink-soft);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.45;
  text-align: right;
}

.shelf-eyebrow {
  color: var(--section-color, var(--club-coral));
}

.book-row {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2.4vw, 27px);
  padding: 0 15px 24px;
}

.book-row.two-books {
  grid-template-columns: repeat(2, minmax(0, 330px));
}

.book-row::after {
  position: absolute;
  z-index: -1;
  right: 0;
  bottom: 3px;
  left: 0;
  height: 25px;
  border-radius: 5px 5px 11px 11px;
  content: "";
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent 22%),
    repeating-linear-gradient(90deg, rgba(83, 45, 27, 0.08) 0 1px, transparent 1px 35px),
    var(--club-wood);
  box-shadow: 0 9px 0 var(--club-wood-dark), 0 16px 24px rgba(74, 43, 26, 0.17);
}

.story-book {
  position: relative;
  overflow: hidden;
  min-height: 335px;
  display: flex;
  flex-direction: column;
  padding: 22px 22px 19px 31px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 9px 20px 20px 9px;
  color: var(--book-ink, #fff);
  text-decoration: none;
  background:
    radial-gradient(circle at 78% 15%, rgba(255, 255, 255, 0.22), transparent 9rem),
    linear-gradient(145deg, var(--book-light), var(--book-dark));
  box-shadow: 0 16px 0 -8px rgba(74, 43, 26, 0.17), 0 18px 32px rgba(65, 47, 63, 0.2);
  transform-origin: 50% 100%;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.story-book::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 17px;
  border-right: 1px solid rgba(255, 255, 255, 0.28);
  content: "";
  background: rgba(38, 28, 50, 0.17);
  box-shadow: inset -3px 0 6px rgba(32, 24, 40, 0.13);
}

.story-book::after {
  position: absolute;
  top: 9px;
  right: 5px;
  bottom: 9px;
  width: 5px;
  border-radius: 0 12px 12px 0;
  content: "";
  background: rgba(255, 250, 235, 0.7);
}

.story-book:hover {
  z-index: 2;
  box-shadow: 0 18px 0 -8px rgba(74, 43, 26, 0.17), 0 25px 40px rgba(65, 47, 63, 0.25);
  transform: translateY(-9px) rotate(-0.5deg);
}

.story-book:active {
  transform: translateY(-2px) scale(0.99);
}

.book-topline {
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: currentColor;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.book-badge {
  padding: 5px 9px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  letter-spacing: 0;
  text-transform: none;
}

.book-art {
  align-self: center;
  width: 112px;
  height: 112px;
  display: grid;
  place-items: center;
  margin: 11px 0 12px;
  border: 2px solid rgba(255, 255, 255, 0.52);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.81);
  box-shadow: inset 0 0 0 8px rgba(255, 255, 255, 0.28), 0 10px 22px rgba(33, 28, 42, 0.15);
  font-size: 66px;
}

.book-art img {
  width: 86px;
  height: 86px;
  object-fit: contain;
  filter: drop-shadow(0 5px 7px rgba(47, 38, 48, 0.15));
}

.book-title {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(24px, 3vw, 31px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.025em;
}

.book-summary {
  display: block;
  margin-top: 7px;
  color: currentColor;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.35;
}

.book-open {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.25);
  font-size: 14px;
  font-weight: 850;
}

.book-open b {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border-radius: 50%;
  color: var(--book-dark);
  background: rgba(255, 255, 255, 0.86);
  font-size: 17px;
}

.book-puppy { --book-light: #b45a48; --book-dark: #7d3835; }
.book-fish { --book-light: #317785; --book-dark: #215663; }
.book-fifi { --book-light: #557655; --book-dark: #3b5549; }
.book-sorting { --book-light: #936225; --book-dark: #68401f; }
.book-quiz { --book-light: #665fa8; --book-dark: #454275; }
.book-kuromi { --book-light: #66527d; --book-dark: #3e354f; }
.book-melody { --book-light: #ae576f; --book-dark: #783b55; }

.clubhouse-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 23px 6px 4px;
  border-top: 1px solid var(--club-line);
  color: var(--club-ink-soft);
  font-size: 13px;
  font-weight: 700;
}

.clubhouse-footer strong {
  color: var(--club-ink);
}

/* Login gate */
.clubhouse-login {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 28px;
  background:
    radial-gradient(circle at 8% 12%, rgba(121, 169, 133, 0.25), transparent 25rem),
    radial-gradient(circle at 92% 8%, rgba(98, 90, 167, 0.2), transparent 28rem),
    var(--club-cream);
}

.login-shell {
  overflow: hidden;
  width: min(960px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(390px, 0.9fr);
  border: 1px solid rgba(92, 76, 60, 0.15);
  border-radius: 30px;
  background: var(--club-paper-strong);
  box-shadow: var(--club-shadow);
}

.login-story {
  position: relative;
  overflow: hidden;
  min-height: 620px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 50px;
  color: #fff;
  background:
    radial-gradient(circle at 78% 17%, rgba(255, 255, 255, 0.14), transparent 14rem),
    linear-gradient(150deg, var(--club-periwinkle-dark), var(--club-periwinkle));
}

.login-story::after {
  position: absolute;
  right: -105px;
  bottom: -90px;
  width: 360px;
  height: 360px;
  border: 34px solid rgba(255, 255, 255, 0.06);
  border-radius: 50%;
  content: "";
}

.login-brand,
.login-library {
  position: relative;
  z-index: 1;
}

.login-story .login-eyebrow {
  color: #f8d77c;
}

.login-story h1 {
  max-width: 470px;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(42px, 6vw, 62px);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.login-story p {
  max-width: 470px;
  margin: 14px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 17px;
  font-weight: 650;
  line-height: 1.55;
}

.login-library {
  height: 214px;
  display: flex;
  align-items: end;
  gap: 13px;
  padding: 0 18px 26px;
  border-bottom: 16px solid #71462f;
}

.login-mini-book {
  width: 83px;
  height: var(--height);
  display: grid;
  place-items: center;
  border: 3px solid rgba(255, 255, 255, 0.52);
  border-radius: 8px 15px 15px 8px;
  background: var(--cover);
  box-shadow: 0 13px 22px rgba(31, 26, 54, 0.28);
  font-size: 37px;
  transform: rotate(var(--tilt, 0deg));
}

.login-card {
  align-self: center;
  padding: 46px 42px;
}

.login-card h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 38px;
  line-height: 1.1;
  letter-spacing: -0.035em;
}

.login-lead {
  margin: 8px 0 25px;
  color: var(--club-ink-soft);
  font-size: 15px;
  font-weight: 650;
}

.login-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-bottom: 20px;
  padding: 5px;
  border-radius: 15px;
  background: #eee9df;
}

.login-tab {
  min-height: 44px;
  border: 0;
  border-radius: 11px;
  color: var(--club-ink-soft);
  cursor: pointer;
  background: transparent;
  font-size: 14px;
  font-weight: 800;
}

.login-tab.on {
  color: var(--club-periwinkle-dark);
  background: #fff;
  box-shadow: var(--club-shadow-small);
}

.login-field {
  display: block;
  margin: 0 0 14px;
  color: var(--club-ink);
  font-size: 13px;
  font-weight: 800;
}

.login-field[hidden] {
  display: none;
}

.login-field span {
  display: block;
  margin: 0 0 6px;
}

.login-field input {
  width: 100%;
  min-height: 50px;
  padding: 0 14px;
  border: 2px solid #ddd6cb;
  border-radius: 12px;
  color: var(--club-ink);
  background: #fffcf7;
  font-size: 16px;
  font-weight: 650;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.login-field input:focus {
  border-color: var(--club-teal);
  outline: none;
  box-shadow: 0 0 0 4px rgba(47, 133, 130, 0.12);
}

.login-go {
  width: 100%;
  min-height: 53px;
  margin-top: 4px;
  border: 0;
  border-radius: 13px;
  color: #fff;
  cursor: pointer;
  background: var(--club-teal);
  box-shadow: 0 6px 0 #226765, 0 11px 20px rgba(47, 133, 130, 0.19);
  font-size: 17px;
  font-weight: 850;
  transition: transform 150ms ease, box-shadow 150ms ease, opacity 150ms ease;
}

.login-go:hover {
  transform: translateY(-2px);
}

.login-go:active {
  box-shadow: 0 2px 0 #226765, 0 7px 13px rgba(47, 133, 130, 0.17);
  transform: translateY(3px);
}

.login-go:disabled {
  cursor: wait;
  opacity: 0.65;
}

.login-error {
  min-height: 22px;
  margin: 12px 0 0;
  color: #a33f3b;
  font-size: 14px;
  font-weight: 800;
}

.login-hint {
  margin: 5px 0 0;
  color: var(--club-ink-soft);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.5;
}

@media (max-width: 840px) {
  .clubhouse-shell {
    width: min(100% - 22px, 1220px);
  }

  .clubhouse-hero-main {
    grid-template-columns: auto minmax(0, 1fr);
    padding: 28px 24px 20px;
  }

  .clubhouse-account {
    grid-column: 1 / -1;
    min-width: 0;
  }

  .book-row,
  .book-row.two-books {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .login-shell {
    grid-template-columns: 1fr;
    max-width: 520px;
  }

  .login-story {
    min-height: auto;
    padding: 35px 38px;
  }

  .login-story h1 {
    font-size: 44px;
  }

  .login-library {
    display: none;
  }
}

@media (max-width: 640px) {
  .clubhouse-shell {
    width: min(100% - 16px, 1220px);
    padding-top: 31px;
  }

  .clubhouse-roof {
    top: -22px;
    right: 14px;
    left: 14px;
    height: 42px;
  }

  .clubhouse-hero {
    border-radius: 22px;
  }

  .clubhouse-hero-main {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 13px;
    padding: 22px 16px 16px;
  }

  .clubhouse-monogram {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    box-shadow: 0 5px 0 #226765, 0 9px 16px rgba(47, 133, 130, 0.17);
    font-size: 21px;
  }

  .clubhouse-eyebrow {
    font-size: 10px;
  }

  .clubhouse-title {
    font-size: clamp(26px, 8vw, 36px);
  }

  .clubhouse-intro {
    font-size: 14px;
  }

  .clubhouse-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: visible;
    padding: 10px 13px 12px;
  }

  .clubhouse-nav a {
    min-width: 0;
    justify-content: center;
    padding: 0 9px;
  }

  .clubhouse-nav a:last-child {
    grid-column: 1 / -1;
  }

  .featured-story {
    min-height: 0;
    margin: 16px 0 34px;
    padding: 27px 23px;
    border-radius: 22px;
  }

  .featured-story h2 {
    font-size: 33px;
  }

  .featured-story p {
    font-size: 15px;
  }

  .featured-illustration {
    display: none;
  }

  .shelf-heading {
    display: block;
    margin: 0 7px 13px;
  }

  .shelf-heading p {
    margin-top: 6px;
    text-align: left;
  }

  .book-row,
  .book-row.two-books {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 0 7px 25px;
  }

  .story-book {
    min-height: 282px;
    padding: 15px 13px 14px 23px;
  }

  .book-topline {
    min-height: 24px;
    font-size: 10px;
  }

  .book-topline > span:first-child {
    display: none;
  }

  .book-badge {
    padding: 4px 7px;
  }

  .book-art {
    width: 82px;
    height: 82px;
    margin: 8px auto 10px;
    font-size: 48px;
  }

  .book-art img {
    width: 65px;
    height: 65px;
  }

  .book-title {
    font-size: clamp(20px, 6vw, 24px);
  }

  .book-summary {
    font-size: 13px;
  }

  .book-open {
    padding-top: 10px;
    font-size: 12px;
  }

  .book-open b {
    width: 27px;
    height: 27px;
    font-size: 15px;
  }

  .clubhouse-footer {
    display: block;
    padding-bottom: 9px;
    text-align: center;
  }

  .clubhouse-footer span {
    display: block;
    margin-top: 4px;
  }

  .clubhouse-login {
    padding: 12px;
  }

  .login-shell {
    border-radius: 23px;
  }

  .login-story {
    padding: 26px 25px;
  }

  .login-story h1 {
    font-size: 35px;
  }

  .login-story p {
    margin-top: 8px;
    font-size: 14px;
  }

  .login-card {
    padding: 29px 23px 32px;
  }

  .login-card h2 {
    font-size: 32px;
  }
}

@media (max-width: 370px) {
  .book-row,
  .book-row.two-books {
    grid-template-columns: 1fr;
  }

  .story-book {
    min-height: 305px;
  }

  .book-topline > span:first-child {
    display: inline;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
