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

html,
body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
max-width: 100%;
}

/* Reserve the page scrollbar before content grows; focus mode uses the full viewport. */
html:not(.sc-focus-mode) {
  scrollbar-gutter: stable;
}

body {
  font-family: var(--sc-page-font-ui, system-ui, -apple-system, BlinkMacSystemFont, "Inter", sans-serif);
  color: #e5e7eb;
  background: transparent;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
 scroll-behavior: auto;
}

/* Links */
a {
  color: #9ca3ff;
  text-decoration: none;
}
a:hover { text-decoration: underline; }

/* Keep native control fragments below the shared fixed header. */
html:not(.sc-share-route) :where(#optionsInput, #wheelCanvas, #tab-results) {
  scroll-margin-top: calc(var(--header-h, 3.2rem) + 1rem);
}

/* Layout */
.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.3rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: none;
  white-space: nowrap;
}

.btn--primary {
  background-color: var(--sc-brand, #3E6F82);
  border-color: var(--sc-brand, #3E6F82);
  color: #ffffff;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.65);
}
.btn--primary:hover {
  background-color: var(--sc-brand-hover, #345A69);
  border-color: var(--sc-brand-hover, #345A69);
  box-shadow: 0 22px 44px rgba(15, 23, 42, 0.8);
  
}
.btn--primary:active {
  background-color: var(--sc-brand-active, #174F5E);
  border-color: var(--sc-brand-active, #174F5E);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.7);
}

.btn--ghost {
  background-color: #111827;
  border-color: #374151;
  color: #e5e7eb;
}
.btn--ghost:hover {
  background-color: #1f2937;
  border-color: #4b5563;
}

.btn--full { width: 100%; }

/* Main layout */
main { padding-top: 1rem; }

/* Hero */
.hero { padding: 2.5rem 0 3.5rem; }

@media (max-width: 849.98px){
  .hero{
    padding-top: calc(3.2rem + 2.5rem);
  }
}

@media (max-width: 640px){
  .hero{
    padding-top: calc(2.9rem + 2.5rem);
  }
}

.hero__grid {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}
/* Cards / inputs */
.inputs-card {
  background-color: #111827;
  border-radius: 1.1rem;
  padding: 1.1rem 1.2rem 1.2rem;
  box-shadow: none;
  border: 1px solid #1f2937;
}

.inputs-card__label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
  color: #e5e7eb;
}

#optionsInput {
  width: 100%;
  border-radius: 0.8rem;
  border: 1px solid #374151;
  padding: 0.65rem 0.75rem;
  font: inherit;
  resize: vertical;
  min-height: 7rem;
  background-color: #020617;
  color: #e5e7eb;
}

#optionsInput::placeholder { color: #6b7280; }

#optionsInput:focus {
  outline: none;
  border-color: var(--sc-brand, #3E6F82);
  box-shadow: 0 0 0 1px var(--sc-brand-ring, rgba(232, 196, 104, 0.72));
}

.inputs-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.8rem;
}

.inputs-card__hint {
  margin: 0.7rem 0 0;
  font-size: 0.8rem;
  color: #6b7280;
}

/* Info section */
.info { padding: 2.2rem 0 3rem; }

.info__grid {
  display: grid;
  gap: 2rem;
}

.info h2 {
  font-size: 1.5rem;
  margin-bottom: 0.6rem;
  color: #e5e7eb;
}

.info h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: #e5e7eb;
}

.steps {
  padding-left: 1.3rem;
  margin: 0;
  color: #9ca3af;
}

.steps li { margin-bottom: 0.3rem; }

.uses {
  list-style: disc;
  padding-left: 1.1rem;
  margin: 0;
  color: #9ca3af;
}

.uses li { margin-bottom: 0.25rem; }

/* Wheel area */
.hero__wheel {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  align-items: stretch;
}

/* Match spin button + result width to wheel and center them */
.hero__wheel .btn--full,
.hero__wheel .result {
  width: 100%;
  max-width: min(620px, 96vw);
  align-self: center;
}

/* Wheel + spin button + result all share same width and are centered */
.hero__wheel .wheel-wrapper,
.hero__wheel #spinButton,
.hero__wheel #resultBox {
  max-width: min(620px, 96vw);
  margin-left: auto;
  margin-right: auto;
}



/* =========================================
   TABLET+ (≥768px)
   - Wheel LEFT
   - Entries (inputs-card) RIGHT
   ========================================= */
@media (min-width: 768px){
  .hero__grid{
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
    grid-template-areas: "wheel content";
    column-gap: 3rem;
    align-items: center;
  }

  .hero__wheel{ grid-area: wheel; }
  .hero__content{ grid-area: content; }
}

/* =========================================
   MOBILE (<768px)
   - Wheel first, entries below
   - DOM and visual order stay aligned
   ========================================= */
@media (max-width: 767px){
  .hero .hero__grid{
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "wheel" "content";
  }

  .hero .hero__wheel{ grid-area: wheel; }
  .hero .hero__content{ grid-area: content; }
}

/* =========================================
   DESKTOP (≥1024px)
   - Hero fills screen height
   - 20px right padding
   - 50px bottom gap
   - Right panel stretches tall; textarea fills
   ========================================= */
@media (min-width: 1024px){

  .hero{
    padding-top: 0;
    padding-bottom: 50px;
  }

  .hero > .container.hero__grid{
    max-width: none;
    width: 100%;
    padding-left: 20px;
    padding-right: 20px;

    min-height: calc(100svh - 4.5rem - 50px);

    grid-template-columns: minmax(0, 1fr) minmax(520px, 640px);
    grid-template-areas: "wheel content";
    column-gap: 3rem;
    align-items: stretch;
  }

  .hero__wheel{
    grid-area: wheel;
    justify-self: start;
    align-self: center;
  }

  .hero__content{
    grid-area: content;
    justify-self: end;
    align-self: stretch;
    height: 100%;
    width: 100%;
    max-width: 640px;

    display: flex;
    flex-direction: column;
  }

  .inputs-card{
    height: 100%;
    display: flex;
    flex-direction: column;
  }

  #optionsInput{
    flex: 1;
    min-height: 0;
    resize: none;
    overflow: auto;
  }
}
/* Slimmer entries panel (keep it tall) */
@media (min-width: 1024px){

  /* make the right column narrower */
  .hero > .container.hero__grid{
    grid-template-columns: minmax(0, 1fr) minmax(420px, 520px);
  }

  /* keep content aligned and match the new width */
  .hero__content{
    max-width: 520px;
  }

  /* reduce left/right padding inside the card (still tall) */
  .inputs-card{
    padding-left: 0.95rem;
    padding-right: 0.95rem;
  }

  /* slightly tighter textarea padding (optional but looks slimmer) */
  #optionsInput{
    padding-left: 0.65rem;
    padding-right: 0.65rem;
  }
}
@media (min-width: 1024px){
  :root{
    --entries-w-min: 350px;  /* smallest it can get */
    --entries-w-max: 450px;  /* normal size */
    --entries-padding-x: 0.9rem; /* inner left/right padding */
  }

  .hero > .container.hero__grid{
    grid-template-columns: minmax(0, 1fr) minmax(var(--entries-w-min), var(--entries-w-max));
  }

  .hero__content{
    max-width: var(--entries-w-max);
  }

  .inputs-card{
    padding-left: var(--entries-padding-x);
    padding-right: var(--entries-padding-x);
  }
}
/* =========================================
   TABLET+ (≥768px)
   - Wheel LEFT
   - Entries RIGHT
   ========================================= */
@media (min-width: 768px){
  .hero__grid{
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
    grid-template-areas: "wheel content";
    column-gap: 3rem;
    align-items: center;
  }

  .hero__wheel{ grid-area: wheel; }
  .hero__content{ grid-area: content; }
}

/* ✅ Remove the "Spin the wheel" button + all status text ("Wheel updated...") */
#spinButton,
#resultBox{
  display: none !important;
}

/* =========================================
   DESKTOP (≥1024px)
   - Keep entries panel same (right)
   - Make wheel centered in the whole page
   - Keep tall layout
   ========================================= */
@media (min-width: 1024px){

  :root{
    --entries-w-min: 350px;
    --entries-w-max: 450px;
    --entries-padding-x: 0.9rem;
    --bottom-gap: 50px;
    --top-gap: 1rem; /* your main padding-top */
  }

  .hero{
    padding-top: 0;
    padding-bottom: var(--bottom-gap);
  }

  .hero > .container.hero__grid{
    max-width: none;
    width: 100%;
    padding-left: 20px;
    padding-right: 20px;

    /* fill viewport nicely while keeping your top gap + bottom gap */
    min-height: calc(100svh - var(--bottom-gap) - var(--top-gap));

    /* ✅ 3 columns: left spacer | wheel (center) | entries (right) */
    grid-template-columns:
      minmax(var(--entries-w-min), var(--entries-w-max))
      minmax(0, 1fr)
      minmax(var(--entries-w-min), var(--entries-w-max));

    grid-template-areas: "spacer wheel content";
    column-gap: 3rem;
    align-items: stretch;
  }

  /* ✅ Wheel in the middle of the page */
  .hero__wheel{
    grid-area: wheel;
    justify-self: center;
    align-self: center;
  }

  /* ✅ Entries stay on the right (same) */
  .hero__content{
    grid-area: content;
    justify-self: end;
    align-self: stretch;

    width: 100%;
    max-width: var(--entries-w-max);

    display: flex;
    flex-direction: column;
  }

  /* keep entries tall */
  .inputs-card{
    height: 100%;
    display: flex;
    flex-direction: column;

    padding-left: var(--entries-padding-x);
    padding-right: var(--entries-padding-x);
  }

  #optionsInput{
    flex: 1;
    min-height: 0;
    resize: none;
    overflow: auto;
  }
}
@media (min-width: 1024px){
  .hero__wheel{ justify-self: center !important; }
}
/* ===== FIX: hero fits in the first screen (no initial scroll) ===== */
@media (min-width: 1024px){

  :root{
    --header-h: 3.2rem;   /* match fixed header overlay height */
    --hero-top: 16px;     /* gap under header (control this) */
    --hero-bottom: 15px;  /* bottom breathing room (control this) */
  }

  /* Header is fixed and transparent; keep the old visual gap inside the hero */
  main{ padding-top: 0 !important; }

  /* Control the visible gaps */
  .hero{
    padding-top: calc(var(--header-h) + var(--hero-top)) !important;
    padding-bottom: var(--hero-bottom) !important;
  }

  /* Make hero grid fit exactly inside the remaining viewport space */
  .hero > .container.hero__grid{
    min-height: calc(100svh - var(--header-h) - var(--hero-top) - var(--hero-bottom)) !important;
  }

  /* Keep entries card inside the screen */
  .inputs-card{
    max-height: 100% !important;
  }

  /* textarea scrolls inside the card instead of pushing page down */
  #optionsInput{
    min-height: 0;
    overflow: auto;
  }
}






/* =========================================
   BRIDGE LAYOUT (850px–1023px)
   Keep desktop-like positioning, preserve tall entries card,
   let entries shrink smoothly, avoid 1024 jump
   ========================================= */
@media (min-width: 850px) and (max-width: 1023.98px){

  :root{
    /* ✅ You had a hard lock at 350px. Lower this if you want more shrink. */
    --entries-bridge-w: clamp(300px, calc(300px + (100vw - 850px) * 0.86), 450px);
    --entries-bridge-pad-x: 0.9rem;

    /* ✅ copy the viewport-fit hero vars from desktop so height doesn't jump at 1024 */
    --header-h: 3.2rem;
    --hero-top: 16px;
    --hero-bottom: 15px;
  }

  /* ✅ keep same hero vertical behavior as desktop (prevents 1023 collapse) */
  main{ padding-top: 0 !important; }

  .hero{
    padding-top: calc(var(--header-h) + var(--hero-top)) !important;
    padding-bottom: var(--hero-bottom) !important;
  }

  /* Keep desktop-style 3-column positioning */
  .hero > .container.hero__grid{
    grid-template-columns:
      var(--entries-bridge-w)
      minmax(0, 1fr)
      var(--entries-bridge-w) !important;

    grid-template-areas: "spacer wheel content" !important;
    column-gap: 3rem !important;
    align-items: stretch !important;

    padding-left: 20px !important;
    padding-right: 20px !important;

    /* ✅ same “tall hero” logic as desktop */
    min-height: calc(100svh - var(--header-h) - var(--hero-top) - var(--hero-bottom)) !important;
  }

  /* ✅ IMPORTANT: allow grid items to shrink (prevents hidden min-width behavior) */
  .hero__wheel,
  .hero__content{
    min-width: 0 !important;
  }

  /* Keep wheel in bridge middle slot
     NOTE: center may still visually press space because wheel is wide.
     If needed, change center -> end so overflow spills LEFT, not into entries. */
  .hero__wheel{
    grid-area: wheel !important;
    justify-self: center !important;
    align-self: center !important;
  }

  /* ✅ Entries stays on RIGHT and shrinks from the LEFT */
  .hero__content{
    grid-area: content !important;
    justify-self: end !important;
    align-self: stretch !important;

    width: 100% !important;
    max-width: var(--entries-bridge-w) !important;

    display: flex !important;
    flex-direction: column !important;
  }

  /* ✅ Keep card tall like desktop, but allow shrinking */
  .inputs-card{
    height: 100% !important;
    max-height: 100% !important;
    min-width: 0 !important;

    display: flex !important;
    flex-direction: column !important;

    padding-left: var(--entries-bridge-pad-x) !important;
    padding-right: var(--entries-bridge-pad-x) !important;
  }

  #optionsInput{
    flex: 1 !important;
    min-height: 0 !important;
    resize: none !important;
    overflow: auto !important;
  }
}
/* visually hidden but still readable by Google & screen readers */
.sr-only{
  position:absolute!important;
  width:1px!important;height:1px!important;
  padding:0!important;margin:-1px!important;
  overflow:hidden!important;
  clip:rect(0,0,0,0)!important;
  white-space:nowrap!important;
  border:0!important;
}
/* Small, low-emphasis homepage title, sitting in the wheel column directly
   above the wheel. It deliberately matches the landing-page wheel-name title
   (.csmw-panel__name + .scw-wheel-name) so the hero keeps its viewport-fit
   height instead of pushing the wheel and entries down. Hidden on share views
   where the shared wheel's own title leads the page. */
.sc-home-page-title{
  display: flex;
  justify-content: center;
  margin: 0 0 2px;
  padding: 0;
  text-align: center;
  font-size: 13px;
  line-height: 1.25;
  font-weight: 600;
  opacity: 0.65;
}
html.sc-share-route .sc-home-page-title{
  display: none;
}
