/* ==========================================================================
   Sunrise Entertainment LLC — sun-ent.com
   Hand-built static stylesheet. No framework, no build step, no CDN.
   --------------------------------------------------------------------------
   Contents
     1. Design tokens (light + dark)
     2. Reset & base
     3. Accessibility helpers
     4. Layout primitives
     5. Header / nav / theme toggle
     6. Hero
     7. Game cards & store badges
     8. Content sections (prose, legal pages)
     9. Contact form
    10. Footer
    11. Cookie consent
    12. Motion & print
   ========================================================================== */

/* ---------- 1. Design tokens ---------------------------------------------- */

:root {
  color-scheme: light dark;

  /* Brand — sampled from the Sunrise Entertainment logo (sunEntLogo.png) */
  --brand-orange: #ff6a1c;   /* sunrise rays, outer */
  --brand-amber: #f8b018;    /* sunrise rays, inner */
  --brand-green: #a6ca0f;    /* horizon, light */
  --brand-green-deep: #7a9800; /* horizon, shadow */
  --brand-gradient: linear-gradient(90deg, #ff6a1c 0%, #f8b018 45%, #a6ca0f 70%, #7a9800 100%);

  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue",
    Helvetica, Arial, "Noto Sans", sans-serif;
  --font-display: var(--font-sans);

  /* Spacing / rhythm */
  --gutter: clamp(1.25rem, 5vw, 3rem);
  --measure: 68ch;
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;

  /* Motion */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur: 0.22s;
}

/* Light theme (default) */
:root,
:root[data-theme="light"] {
  --bg: #ffffff;
  --bg-alt: #f7f4ee;
  --bg-soft: #fbf9f5;
  --card: #ffffff;
  --card-hover: #fdfbf7;
  --text: #1b1813;
  --text-muted: #5b5649;
  --border: #e8e3d8;
  --border-strong: #cfc8b9;
  --shadow: 0 1px 2px rgb(27 24 19 / 0.05), 0 8px 24px -12px rgb(27 24 19 / 0.16);
  --shadow-lg: 0 2px 4px rgb(27 24 19 / 0.06), 0 24px 48px -20px rgb(27 24 19 / 0.22);
  /* Text-safe brand tones (pass WCAG AA on white) */
  --accent: #b8460b;         /* logo orange, deepened for text and buttons */
  --accent-hover: #9a3a07;
  --accent-soft: #fff1e7;
  --accent-2: #5b7300;       /* logo green, deepened for text */
  --accent-2-soft: #f3f8dc;
  --btn-bg: var(--accent);
  --btn-fg: #ffffff;
  --focus: #b8460b;
  --topbar: #1b1813;
  --danger: #b3291a;
}

/* Dark theme — follows the OS unless the visitor has chosen otherwise */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121210;
    --bg-alt: #191915;
    --bg-soft: #171713;
    --card: #1d1d18;
    --card-hover: #24241e;
    --text: #f5f3ec;
    --text-muted: #aeaa9c;
    --border: #2f2e27;
    --border-strong: #48463c;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.5), 0 8px 24px -12px rgb(0 0 0 / 0.7);
    --shadow-lg: 0 2px 4px rgb(0 0 0 / 0.5), 0 24px 48px -20px rgb(0 0 0 / 0.8);
    --accent: #ff8a3d;
    --accent-hover: #ffa262;
    --accent-soft: #2b1c12;
    --accent-2: #b5d82a;
    --accent-2-soft: #1f2511;
    --btn-bg: #ff7a2a;
    --btn-fg: #160d06;
    --focus: #f8b018;
    --topbar: #000000;
    --danger: #ff8f7d;
  }
}

:root[data-theme="dark"] {
  --bg: #121210;
  --bg-alt: #191915;
  --bg-soft: #171713;
  --card: #1d1d18;
  --card-hover: #24241e;
  --text: #f5f3ec;
  --text-muted: #aeaa9c;
  --border: #2f2e27;
  --border-strong: #48463c;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.5), 0 8px 24px -12px rgb(0 0 0 / 0.7);
  --shadow-lg: 0 2px 4px rgb(0 0 0 / 0.5), 0 24px 48px -20px rgb(0 0 0 / 0.8);
  --accent: #ff8a3d;
  --accent-hover: #ffa262;
  --accent-soft: #2b1c12;
  --accent-2: #b5d82a;
  --accent-2-soft: #1f2511;
  --btn-bg: #ff7a2a;
  --btn-fg: #160d06;
  --focus: #f8b018;
  --topbar: #000000;
  --danger: #ff8f7d;
}

/* ---------- 2. Reset & base ------------------------------------------------ */

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

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

img,
svg,
picture { display: block; max-width: 100%; height: auto; }

input,
button,
textarea,
select { font: inherit; color: inherit; }

button { cursor: pointer; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.1;
  letter-spacing: -0.022em;
  font-weight: 800;
  text-wrap: balance;
}

p, li { text-wrap: pretty; }

a {
  color: inherit;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 0.08em;
}

/* ---------- 3. Accessibility helpers --------------------------------------- */

:where(a, button, input, textarea, select, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translate(-50%, -150%);
  z-index: 200;
  background: var(--btn-bg);
  color: var(--btn-fg);
  padding: 0.7rem 1.4rem;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  font-weight: 700;
  text-decoration: none;
  transition: transform var(--dur) var(--ease);
}
.skip-link:focus { transform: translate(-50%, 0); }

/* ---------- 4. Layout primitives ------------------------------------------- */

.wrap {
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.wrap--narrow { max-width: 760px; }

.section { padding-block: clamp(3.5rem, 9vw, 6.5rem); }
.section--alt { background: var(--bg-soft); }
.section--bordered { border-top: 1px solid var(--border); }

.section__head {
  text-align: center;
  max-width: 44ch;
  margin-inline: auto;
  margin-bottom: clamp(2.25rem, 5vw, 3.5rem);
}
.section__head h2 {
  font-size: clamp(1.9rem, 4.4vw, 2.75rem);
  margin-bottom: 0.65rem;
}
.section__head p { color: var(--text-muted); font-size: 1.075rem; }

main { flex: 1 0 auto; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.8rem 1.5rem;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-weight: 650;
  font-size: 1rem;
  line-height: 1.2;
  text-decoration: none;
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease),
    background-color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.btn:hover { transform: translateY(-2px); opacity: 0.9; }
.btn:active { transform: translateY(0); }

.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}
.btn--ghost:hover { background: var(--card-hover); opacity: 1; }

.btn--brand {
  background-color: var(--btn-bg);
  background-image: none;
  color: var(--btn-fg);
  border-color: transparent;
}

/* ---------- 5. Header ------------------------------------------------------ */

.topbar {
  height: 14px;
  background: var(--topbar);
  border-bottom: 3px solid transparent;
  border-image: linear-gradient(90deg, var(--brand-orange), var(--brand-amber), var(--brand-green)) 1;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--border);
}
@supports not (backdrop-filter: blur(1px)) {
  .site-header { background: var(--bg); }
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 68px;
  padding-block: 0.6rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: 1.0625rem;
  margin-right: auto;
}
.brand img { width: 38px; height: 38px; }
.brand span { white-space: nowrap; }
@media (max-width: 420px) {
  .brand span { display: none; }
}

.nav { display: flex; align-items: center; gap: 0.25rem; }
.nav a {
  padding: 0.5rem 0.8rem;
  border-radius: 999px;
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.95rem;
  transition: color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.nav a:hover { color: var(--text); background: var(--card-hover); }
.nav a[aria-current="page"] { color: var(--text); }

@media (max-width: 760px) {
  .nav { display: none; }
  .nav.is-open {
    display: flex;
    position: absolute;
    inset: 100% 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 0.5rem var(--gutter) 1rem;
    box-shadow: var(--shadow);
  }
  .nav.is-open a { padding: 0.85rem 0.6rem; border-radius: var(--radius-sm); font-size: 1.05rem; }
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease);
  flex: none;
}
.icon-btn:hover { background: var(--card-hover); border-color: var(--border-strong); }
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

/* Theme toggle: show the icon for the mode you'd switch *to*. */
.theme-toggle .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: block; }
}
:root[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: block; }
:root[data-theme="light"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: none; }

.nav-toggle { display: none; }
@media (max-width: 760px) { .nav-toggle { display: inline-grid; } }

/* ---------- 6. Hero -------------------------------------------------------- */

.hero {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  padding-block: clamp(3.5rem, 12vw, 7.5rem);
  text-align: center;
  position: relative;
  overflow: hidden;
}
/* A soft sunrise behind the wordmark — no hard edges at any viewport size. */
.hero::after {
  content: "";
  position: absolute;
  inset: -45% -10% auto -10%;
  height: 150%;
  background: radial-gradient(
    closest-side circle at 50% 62%,
    color-mix(in srgb, var(--brand-amber) 20%, transparent),
    color-mix(in srgb, var(--brand-amber) 7%, transparent) 55%,
    transparent 78%
  );
  pointer-events: none;
}
.hero > * { position: relative; z-index: 1; }

.hero h1 {
  font-size: clamp(2.6rem, 9vw, 5.6rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  margin-bottom: 1rem;
}
.hero p {
  color: var(--text-muted);
  font-size: clamp(1.05rem, 2.2vw, 1.3rem);
  max-width: 54ch;
  margin-inline: auto;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 2rem;
}

/* Page banner used on the interior pages */
.page-head {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  padding-block: clamp(2.5rem, 7vw, 4.5rem);
}
.page-head h1 { font-size: clamp(2rem, 5.5vw, 3.25rem); margin-bottom: 0.6rem; }
.page-head p { color: var(--text-muted); max-width: var(--measure); }

/* ---------- 7. Game cards & store badges ----------------------------------- */

.games {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(258px, 1fr));
  gap: clamp(1.25rem, 3vw, 2rem);
  align-items: stretch;
}

.game {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.9rem;
  padding: clamp(1.5rem, 3vw, 2.15rem) 1.35rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
    border-color var(--dur) var(--ease);
}
.game:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-strong);
}

.game__icon {
  width: 112px;
  height: 112px;
  border-radius: 24px;
  box-shadow: 0 6px 18px -8px rgb(0 0 0 / 0.45);
  border: 1px solid color-mix(in srgb, var(--text) 10%, transparent);
}
.game__title { font-size: 1.2rem; font-weight: 750; }
.game__tag {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.game__blurb {
  color: var(--text-muted);
  font-size: 0.95rem;
  flex: 1 0 auto;
}

.stores {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  width: 100%;
  max-width: 230px;
  margin-top: 0.35rem;
}

/*
  Plain, accessible store links. These are intentionally NOT recreations of
  Apple's or Google's official badge artwork — those marks must be downloaded
  from each vendor's brand resource page and used unmodified. See README.md
  for the swap-in instructions; the markup already supports it.
*/
.store-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 0.95rem;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: var(--card);
  text-decoration: none;
  text-align: left;
  transition: background-color var(--dur) var(--ease), transform var(--dur) var(--ease),
    border-color var(--dur) var(--ease);
}
.store-link:hover { background: var(--card-hover); transform: translateY(-1px); border-color: var(--text-muted); }
.store-link svg { width: 20px; height: 20px; flex: none; fill: currentColor; }
.store-link__text { display: flex; flex-direction: column; line-height: 1.2; }
.store-link__kicker { font-size: 0.66rem; color: var(--text-muted); letter-spacing: 0.04em; }
.store-link__name { font-size: 0.93rem; font-weight: 700; }

.store-badge-img { height: 44px; width: auto; }

/* ---------- 8. Content sections -------------------------------------------- */

.prose { max-width: var(--measure); }
.prose > * + * { margin-top: 1.05rem; }
.prose h2 {
  font-size: clamp(1.4rem, 3vw, 1.85rem);
  margin-top: 2.75rem;
  padding-top: 0.25rem;
  scroll-margin-top: 6rem;
}
.prose h3 { font-size: 1.15rem; margin-top: 1.9rem; font-weight: 750; }
.prose ul, .prose ol { padding-left: 1.35rem; }
.prose li + li { margin-top: 0.4rem; }
.prose a { color: var(--text); text-decoration: underline; text-decoration-color: var(--brand-orange); }
.prose a:hover { text-decoration-thickness: 0.16em; }

/* A button inside prose is still a button — don't let the link rule recolour it. */
.prose a.btn { color: var(--btn-fg); text-decoration: none; }
.prose a.btn--ghost { color: var(--text); }
.prose strong { font-weight: 700; }

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  display: block;
  overflow-x: auto;
}
.prose th, .prose td {
  border: 1px solid var(--border);
  padding: 0.6rem 0.75rem;
  text-align: left;
  vertical-align: top;
}
.prose th { background: var(--bg-soft); font-weight: 700; }

.callout {
  border: 1px solid var(--border);
  border-left: 4px solid var(--brand-amber);
  background: var(--bg-soft);
  padding: 1rem 1.15rem;
  border-radius: var(--radius-sm);
}

.meta-line {
  font-size: 0.9rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  padding-bottom: 1rem;
}

.toc {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem 1.35rem;
}
.toc h2 { font-size: 0.8rem; margin: 0 0 0.6rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); }
.toc ol { margin: 0; padding-left: 1.2rem; font-size: 0.95rem; }
.toc li + li { margin-top: 0.1rem; }
.toc a { display: inline-block; padding-block: 0.22rem; min-height: 24px; }

/* Support / FAQ */
.faq { border-top: 1px solid var(--border); }
.faq details {
  border-bottom: 1px solid var(--border);
  padding: 0.35rem 0;
}
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 1rem 2.25rem 1rem 0;
  font-weight: 650;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 0.35rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--text-muted);
  line-height: 1;
}
.faq details[open] summary::after { content: "\2212"; }
.faq details > *:not(summary) { padding-bottom: 1rem; color: var(--text-muted); max-width: var(--measure); }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.15rem;
}
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem;
}
.card h3 { font-size: 1.05rem; margin-bottom: 0.4rem; }
.card h3 a { display: inline-block; padding-block: 0.2rem; min-height: 24px; }
.card p { color: var(--text-muted); font-size: 0.95rem; }
.card a { color: var(--text); }

/* ---------- 9. Contact form ------------------------------------------------ */

.form { max-width: 620px; }
.form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 560px) { .form__row { grid-template-columns: 1fr; } }

.field { display: flex; flex-direction: column; gap: 0.35rem; margin-bottom: 1.1rem; }
.field label { font-weight: 650; font-size: 0.93rem; }
.field .hint { font-size: 0.82rem; color: var(--text-muted); }
.req { color: var(--danger); font-weight: 700; }

.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field input[type="url"],
.field input[type="password"],
.field select,
.field textarea {
  width: 100%;
  padding: 0.72rem 0.85rem;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--card);
  color: var(--text);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.field textarea { min-height: 150px; resize: vertical; }
.modal .field textarea { min-height: 96px; }
.field input:hover, .field textarea:hover, .field select:hover { border-color: var(--text-muted); }
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--brand-orange);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-amber) 35%, transparent);
  outline: none;
}
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: var(--danger); }
.field .error { font-size: 0.85rem; color: var(--danger, #c2321f); font-weight: 600; }
.field .error:empty { display: none; }

.consent-field {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.7rem;
  align-items: start;
  margin-bottom: 1.35rem;
  font-size: 0.93rem;
  color: var(--text-muted);
}
.consent-field input[type="checkbox"] {
  width: 20px; height: 20px;
  margin-top: 0.15rem;
  accent-color: var(--brand-green-deep);
}
.consent-field a { color: var(--text); }

/* Honeypot — hidden from humans, offered to bots. */
.hp {
  position: absolute !important;
  left: -9999px;
  opacity: 0;
  height: 0;
  width: 0;
  pointer-events: none;
}

.form__status {
  margin-top: 1rem;
  padding: 0.9rem 1.1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-soft);
  font-size: 0.95rem;
  display: none;
}
.form__status.is-visible { display: block; }
.form__status.is-ok { border-color: var(--brand-green); background: color-mix(in srgb, var(--brand-green) 14%, var(--bg)); }
.form__status.is-error { border-color: var(--danger); background: color-mix(in srgb, var(--danger) 12%, var(--bg)); }

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

.contact-aside ul { list-style: none; padding: 0; }
.contact-aside li + li { margin-top: 1.1rem; }
.contact-aside dt { font-weight: 700; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-muted); }
.contact-aside dd { margin: 0.15rem 0 1rem; }
.contact-aside a { color: var(--text); }
.contact-aside dd > a:only-child { display: inline-block; padding-block: 0.2rem; min-height: 24px; }

/* ---------- 10. Footer ------------------------------------------------------ */

.site-footer {
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
  padding-block: clamp(2.5rem, 6vw, 4rem) 2rem;
  margin-top: auto;
  font-size: 0.94rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(auto-fit, minmax(150px, 1fr));
  gap: clamp(1.75rem, 4vw, 3rem);
}
.site-footer h2 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-muted);
  margin-bottom: 0.8rem;
  font-weight: 700;
}
.site-footer ul { list-style: none; padding: 0; }
.site-footer li + li { margin-top: 0.15rem; }
.site-footer a { color: var(--text-muted); text-decoration: none; }
.site-footer a:hover { color: var(--text); text-decoration: underline; }

/* WCAG 2.2 AA §2.5.8 — every standalone link is at least 24×24 CSS pixels. */
.site-footer li a,
.site-footer li button.linkish {
  display: inline-block;
  padding-block: 0.28rem;
  min-height: 24px;
}
.site-footer button.linkish {
  background: none; border: 0; padding-inline: 0;
  color: var(--text-muted); font-size: inherit; text-align: left;
}
.site-footer button.linkish:hover { color: var(--text); text-decoration: underline; }

.footer-brand { display: inline-flex; align-items: center; gap: 0.65rem; font-weight: 800; margin-bottom: 0.7rem; }
.footer-brand img { width: 32px; height: 32px; }
.footer-about { color: var(--text-muted); max-width: 34ch; }

.social { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.1rem; }
.social a {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.95rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
}
.social a:hover {
  background: var(--card-hover);
  border-color: var(--border-strong);
  color: var(--text);
  text-decoration: none;
}

.footer-bottom {
  margin-top: clamp(2rem, 5vw, 3rem);
  padding-top: 1.35rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
  color: var(--text-muted);
  font-size: 0.88rem;
}

/* ---------- 11. Cookie consent ---------------------------------------------- */

.consent {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 300;
  padding: var(--gutter);
  padding-block: 1.1rem;
  display: none;
}
.consent.is-open { display: block; }

.consent__panel {
  max-width: 1120px;
  margin-inline: auto;
  background: var(--card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: clamp(1.15rem, 3vw, 1.6rem);
}
.consent__title { font-size: 1.05rem; font-weight: 750; margin-bottom: 0.4rem; }
.consent__text { color: var(--text-muted); font-size: 0.94rem; max-width: 72ch; }
.consent__text a { color: var(--text); }
.consent__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.1rem;
}
.consent__actions .btn { padding: 0.65rem 1.25rem; font-size: 0.95rem; }
@media (max-width: 560px) {
  .consent__actions { flex-direction: column-reverse; }
  .consent__actions .btn { width: 100%; }
}

.consent__options {
  margin-top: 1.1rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--border);
  display: grid;
  gap: 0.9rem;
}
.consent__options[hidden] { display: none; }
.consent-opt {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem;
  align-items: start;
}
.consent-opt input[type="checkbox"] { width: 20px; height: 20px; margin-top: 0.15rem; accent-color: var(--brand-green-deep); }
.consent-opt strong { display: block; font-size: 0.95rem; }
.consent-opt span { color: var(--text-muted); font-size: 0.88rem; }

/* ---------- 12. Motion & print ---------------------------------------------- */

/*
  Scroll reveal only ever hides content when JavaScript is running to bring it
  back. Without JS (or if a script fails) the `js` class is never set and every
  .reveal element renders normally.
*/
.js .reveal { opacity: 0; transform: translateY(14px); }
.reveal.is-in {
  opacity: 1;
  transform: none;
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

@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;
    scroll-behavior: auto !important;
  }
  .js .reveal, .reveal { opacity: 1; transform: none; }
  .btn:hover, .game:hover, .store-link:hover { transform: none; }
}

@media print {
  .site-header, .topbar, .consent, .site-footer .social, .skip-link, .hero__actions { display: none !important; }
  body { background: #fff; color: #000; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.85em; word-break: break-all; }
}

/* ---------- 13. Sponsor page ---------------------------------------------- */

.ref-banner {
  display: inline-block;
  margin: 0 0 1rem;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--bg-soft);
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 600;
}
.ref-banner[hidden] { display: none; }

/* ---------- 14. Home page copy & artwork (Oct 2026) ----------------------- */

.hero__mark {
  width: clamp(72px, 12vw, 104px);
  height: auto;
  margin: 0 auto 1.25rem;
  filter: drop-shadow(0 8px 18px rgb(0 0 0 / 0.18));
}
.hero .hero__tagline {
  color: var(--text);
  font-weight: 700;
  font-size: clamp(1.2rem, 3vw, 1.65rem);
  letter-spacing: -0.01em;
  margin-bottom: 1rem;
}
.hero p + p { margin-top: 0.75rem; }

.section__head:has(.section__lede) { max-width: 60ch; }
.section__head .section__lede,
.section__lede {
  color: var(--text);
  font-weight: 700;
  font-size: 1.2rem;
  margin-bottom: 0.6rem;
}
.section__head p + p { margin-top: 0.6rem; }

.game__lede {
  font-weight: 650;
  font-size: 1rem;
  margin-top: -0.35rem;
}
.game picture { display: block; line-height: 0; }

.ad-split {
  display: grid;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}
.ad-split .section__head { text-align: left; margin-inline: 0; margin-bottom: 1.5rem; }
@media (min-width: 820px) {
  .ad-split { grid-template-columns: 1.4fr 1fr; }
}
.ad-sample {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  background: var(--bg-soft);
}
.ad-sample picture { display: flex; justify-content: center; width: 100%; line-height: 0; }
.ad-sample img {
  width: min(100%, 260px);
  height: auto;
  border-radius: 18px;
  border: 6px solid #15130f;
  box-shadow: var(--shadow-lg);
}
.ad-sample figcaption { color: var(--text-muted); font-size: 0.9rem; }


/* ---------- 15. Brand colour layer (from the Sunrise Entertainment logo) --- */
/*  Neutral, warm surfaces; orange is the one action colour, green is the
    supporting accent. Bright logo tones are used only where no text sits on
    them (rules, glows, strips), so everything stays AA-legible.            */

/* Logo gradient strip across the very top */
.topbar { border-image: var(--brand-gradient) 1; }

/* Links inside content read as brand orange */
main p a:not(.btn):not(.store-link),
main li a:not(.btn),
main dd a,
.prose a { color: var(--accent); text-decoration-color: color-mix(in srgb, var(--accent) 45%, transparent); }
main p a:not(.btn):not(.store-link):hover,
main li a:not(.btn):hover,
main dd a:hover,
.prose a:hover { color: var(--accent-hover); text-decoration-color: currentColor; }

/* Buttons */
.btn:not(.btn--ghost):hover { background-color: var(--accent-hover); opacity: 1; }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

/* Navigation */
.nav a:hover { color: var(--text); background: var(--accent-soft); }
.nav a[aria-current="page"] { color: var(--accent); font-weight: 650; }
.theme-toggle:hover { border-color: var(--accent); }

/* Hero: soft sunrise glow, orange above, a hint of green horizon below */
.hero {
  background:
    radial-gradient(120% 70% at 50% 115%, color-mix(in srgb, var(--brand-green) 12%, transparent), transparent 60%),
    var(--bg-alt);
}
.hero::after {
  background: radial-gradient(
    closest-side circle at 50% 62%,
    color-mix(in srgb, var(--brand-amber) 26%, transparent),
    color-mix(in srgb, var(--brand-orange) 8%, transparent) 55%,
    transparent 78%
  );
}
.hero .hero__tagline { color: var(--accent); }
.page-head { background: var(--bg-alt); border-bottom-color: var(--border); position: relative; }
.page-head::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px;
  background: var(--brand-gradient); opacity: 0.85;
}

/* Section heads: a short logo-gradient rule under each h2 */
.section__head h2::after {
  content: "";
  display: block;
  width: 56px; height: 4px; border-radius: 4px;
  margin: 0.7rem auto 0;
  background: var(--brand-gradient);
}
.ad-split .section__head h2::after { margin-left: 0; }
.section__head .section__lede, .section__lede { color: var(--text); }

/* Game cards */
.game__tag { color: var(--accent-2); }
.game__lede { color: var(--text); }
.game:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
.store-link:hover { border-color: var(--accent); background: var(--accent-soft); }
.store-link svg { color: var(--accent); }

/* Content cards (About etc.) */
.card { transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.card:hover { border-color: color-mix(in srgb, var(--accent) 35%, var(--border)); box-shadow: var(--shadow); }
.callout { border-left-color: var(--brand-orange); background: var(--accent-soft); }

/* Forms */
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-amber) 30%, transparent);
}
.consent-field input[type="checkbox"], .consent-opt input[type="checkbox"] { accent-color: var(--accent); }

/* Advertise sample panel */
.ad-sample { border-color: color-mix(in srgb, var(--accent) 35%, var(--border)); background: var(--accent-soft); }

/* Footer */
.site-footer { position: relative; }
.site-footer::before {
  content: ""; position: absolute; top: -1px; left: 0; right: 0; height: 3px;
  background: var(--brand-gradient); opacity: 0.85;
}
.site-footer a:hover, .site-footer button.linkish:hover { color: var(--accent); }

/* Sponsor referral pill */
.ref-banner { border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); background: var(--accent-soft); }

::selection { background: color-mix(in srgb, var(--brand-amber) 40%, transparent); }

/* ---------- 16. Advertiser sign-in & modal -------------------------------- */

.auth {
  padding-block: clamp(2.5rem, 7vw, 5rem);
  background:
    radial-gradient(70% 60% at 85% 0%, color-mix(in srgb, var(--brand-amber) 14%, transparent), transparent 70%),
    radial-gradient(60% 60% at 0% 100%, color-mix(in srgb, var(--brand-green) 10%, transparent), transparent 70%),
    var(--bg-alt);
  border-bottom: 1px solid var(--border);
}
.auth__grid { display: grid; gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
@media (min-width: 880px) { .auth__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; } }

.auth-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  max-width: 460px;
  width: 100%;
  justify-self: center;
  position: relative;
  overflow: hidden;
}
.auth-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: var(--brand-gradient);
}
.eyebrow {
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent-2); margin-bottom: 0.35rem;
}
.auth-card h1 { font-size: clamp(1.8rem, 4vw, 2.3rem); margin-bottom: 0.35rem; }
.auth-card__intro { color: var(--text-muted); margin-bottom: 1.5rem; }
.auth-card fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.auth-card fieldset[disabled] { opacity: 0.6; }
.auth-card__foot { margin-top: 1.4rem; font-size: 0.92rem; color: var(--text-muted); }

.field__labelrow { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.field__labelrow .linkish {
  background: none; border: 0; padding: 0.2rem 0; min-height: 24px; cursor: pointer;
  color: var(--accent); font: inherit; font-size: 0.88rem; font-weight: 600;
}
.btn--block { width: 100%; margin-top: 0.5rem; }
.btn--sm { padding: 0.5rem 1rem; font-size: 0.92rem; }

.spinner {
  display: none; width: 1em; height: 1em; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent;
  animation: spin 0.7s linear infinite;
}
.btn.is-loading .spinner { display: inline-block; }
.btn[disabled] { cursor: progress; opacity: 0.85; transform: none; }
@keyframes spin { to { transform: rotate(360deg); } }

.auth-alert {
  margin-top: 1.25rem;
  padding: 1rem 1.1rem;
  border: 1px solid color-mix(in srgb, var(--danger) 45%, var(--border));
  border-left: 4px solid var(--danger);
  background: color-mix(in srgb, var(--danger) 7%, var(--card));
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
}
.auth-alert:focus { outline: none; }
.auth-alert__title { font-weight: 750; margin-bottom: 0.2rem; }
.auth-alert .btn { margin-top: 0.8rem; }
.auth-alert strong { overflow-wrap: anywhere; }

.auth-side { max-width: 480px; justify-self: center; }
.auth-side h2 { font-size: clamp(1.5rem, 3.4vw, 2rem); margin-bottom: 0.6rem; }
.auth-side h2::after {
  content: ""; display: block; width: 56px; height: 4px; border-radius: 4px; margin-top: 0.7rem;
  background: var(--brand-gradient);
}
.auth-side > p { color: var(--text-muted); }
.ticks { list-style: none; padding: 0; margin: 1.25rem 0 1.6rem; display: grid; gap: 0.55rem; }
.ticks li { position: relative; padding-left: 1.9rem; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: 0.3em; width: 1.15rem; height: 1.15rem; border-radius: 50%;
  background: var(--accent-2-soft) center / 0.75rem no-repeat
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237a9800' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
  border: 1px solid color-mix(in srgb, var(--brand-green-deep) 35%, transparent);
}
.auth-side__more { margin-top: 1rem; font-size: 0.95rem; }

/* Modal dialog */
.modal {
  margin: auto;
  width: min(640px, calc(100vw - 2rem));
  max-height: calc(100dvh - 2rem);
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(1.25rem, 4vw, 2rem);
  background: var(--card);
  color: var(--text);
  box-shadow: var(--shadow-lg);
}
.modal::backdrop { background: rgb(15 12 8 / 0.55); backdrop-filter: blur(3px); }
.modal[open] { animation: modal-in 0.2s var(--ease); }
@keyframes modal-in { from { opacity: 0; transform: translateY(8px) scale(0.98); } }
.modal__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 0.4rem; }
.modal__head h2 { font-size: clamp(1.3rem, 3vw, 1.6rem); }
.modal__close svg { stroke: currentColor; stroke-width: 2; fill: none; }
.modal__intro { color: var(--text-muted); margin-bottom: 1.25rem; font-size: 0.97rem; }
.modal__actions { display: flex; justify-content: flex-end; gap: 0.6rem; flex-wrap: wrap; margin-top: 0.5rem; }
@media (prefers-reduced-motion: reduce) { .modal[open] { animation: none; } .spinner { animation-duration: 2s; } }

/* Sun AdX */
.adx {
  display: grid; gap: clamp(1.25rem, 4vw, 2.5rem); align-items: center;
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 4vw, 2.5rem); background: var(--card); box-shadow: var(--shadow);
}
@media (min-width: 760px) { .adx { grid-template-columns: 260px 1fr; } }
.adx h2 { font-size: clamp(1.5rem, 3.4vw, 2rem); margin-bottom: 0.6rem; }
.adx p { color: var(--text-muted); }
.adx p + p { margin-top: 0.7rem; }
.adx p strong { color: var(--text); }
.adx__badge {
  display: grid; place-items: center; text-align: center; gap: 0.35rem;
  padding: 1.75rem 1rem; border-radius: var(--radius);
  background: #15130f; color: #fff; position: relative; overflow: hidden;
}
.adx__badge::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--brand-gradient); }
.adx__mark { font-size: 2.2rem; font-weight: 850; letter-spacing: -0.03em; line-height: 1; }
.adx__mark span { color: #f8b018; margin-left: 0.15em; }
.adx__by { font-size: 0.78rem; letter-spacing: 0.04em; color: #d9d4c7; }
.adx-note { font-size: 0.95rem; }
.page-head .eyebrow { margin-bottom: 0.5rem; }

/* Four-step row (Advertise > How it works) */
@media (min-width: 980px) { .cards--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* Sun AdX operator line (advertising pages) */
.footer-operator {
  margin-top: clamp(1.75rem, 4vw, 2.5rem);
  display: flex; align-items: center; gap: 0.9rem 1.1rem; flex-wrap: wrap;
  padding: 1rem 1.15rem;
  border: 1px solid var(--border);
  border-left: 4px solid var(--brand-orange);
  border-radius: var(--radius-sm);
  background: var(--card);
}
.footer-operator p { margin: 0; color: var(--text-muted); font-size: 0.92rem; flex: 1 1 320px; }
.footer-operator strong { color: var(--text); }
.footer-operator__mark {
  flex: none; font-weight: 850; letter-spacing: -0.02em; font-size: 1.05rem;
  padding: 0.35rem 0.7rem; border-radius: 8px; background: #15130f; color: #fff;
}
.footer-operator__mark span { color: #f8b018; margin-left: 0.12em; }

/* Support: game picker cards with icons */
.card--game { display: flex; gap: 1rem; align-items: flex-start; }
.card--game picture { flex: none; line-height: 0; }
.card--game img { width: 56px; height: 56px; border-radius: 13px; border: 1px solid color-mix(in srgb, var(--text) 10%, transparent); box-shadow: 0 4px 12px -6px rgb(0 0 0 / 0.4); }

/* ---------- 17. Chat assistant widget -------------------------------------- */

.chat-root { position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 250; display: flex; flex-direction: column; align-items: flex-end; gap: 0.75rem; font-size: 0.97rem; }
.chat-launcher {
  display: inline-flex; align-items: center; gap: 0.55rem;
  padding: 0.75rem 1.15rem 0.75rem 0.9rem; border-radius: 999px; border: 0;
  background: var(--btn-bg); color: var(--btn-fg); font: inherit; font-weight: 700;
  box-shadow: 0 10px 30px -10px rgb(0 0 0 / 0.45); cursor: pointer;
  transition: transform var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.chat-launcher:hover { transform: translateY(-2px); background: var(--accent-hover); }
.chat-launcher__icon {
  width: 22px; height: 22px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 5.5A2.5 2.5 0 0 1 6.5 3h11A2.5 2.5 0 0 1 20 5.5v8a2.5 2.5 0 0 1-2.5 2.5H10l-4.3 3.6c-.6.5-1.7.1-1.7-.8V16.1A2.5 2.5 0 0 1 4 15.5v-10Z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 5.5A2.5 2.5 0 0 1 6.5 3h11A2.5 2.5 0 0 1 20 5.5v8a2.5 2.5 0 0 1-2.5 2.5H10l-4.3 3.6c-.6.5-1.7.1-1.7-.8V16.1A2.5 2.5 0 0 1 4 15.5v-10Z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.chat-root.is-open .chat-launcher__label { display: none; }
.chat-root.is-open .chat-launcher { padding: 0.75rem; }

.chat-panel {
  width: min(380px, calc(100vw - 32px));
  height: min(600px, calc(100dvh - 110px));
  display: flex; flex-direction: column;
  background: var(--card); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: 0 24px 60px -20px rgb(0 0 0 / 0.45);
  overflow: hidden; position: relative;
}
.chat-panel[hidden] { display: none; }
.chat-panel::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: var(--brand-gradient); }
.chat-head { display: flex; align-items: center; gap: 0.7rem; padding: 1rem 0.75rem 0.8rem 1rem; border-bottom: 1px solid var(--border); }
.chat-head img { width: 32px; height: 32px; flex: none; }
.chat-head__text { flex: 1; min-width: 0; }
.chat-head h2 { font-size: 1rem; line-height: 1.2; }
.chat-head p { font-size: 0.8rem; color: var(--text-muted); line-height: 1.3; }
.chat-reset, .chat-close {
  background: none; border: 1px solid transparent; color: var(--text-muted); cursor: pointer;
  border-radius: 999px; min-width: 32px; min-height: 32px; font: inherit; font-size: 0.82rem; padding: 0 0.55rem;
}
.chat-close { font-size: 1.4rem; line-height: 1; padding: 0; width: 34px; }
.chat-reset:hover, .chat-close:hover { color: var(--text); background: var(--card-hover); border-color: var(--border); }

.chat-log { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: 0.6rem; overscroll-behavior: contain; }
.chat-msg { max-width: 88%; padding: 0.6rem 0.85rem; border-radius: 16px; line-height: 1.5; overflow-wrap: anywhere; }
.chat-msg p + p, .chat-msg p + ul, .chat-msg ul + p { margin-top: 0.45rem; }
.chat-msg ul { padding-left: 1.1rem; margin: 0.2rem 0; }
.chat-msg a { color: var(--accent); }
.chat-msg--assistant { align-self: flex-start; background: var(--bg-alt); border-bottom-left-radius: 5px; }
.chat-msg--user { align-self: flex-end; background: var(--btn-bg); color: var(--btn-fg); border-bottom-right-radius: 5px; white-space: pre-wrap; }
.chat-typing { display: inline-flex; gap: 4px; padding: 0.85rem 0.9rem; }
.chat-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--text-muted); animation: chat-dot 1.2s infinite ease-in-out; }
.chat-typing span:nth-child(2) { animation-delay: 0.15s; }
.chat-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes chat-dot { 0%, 80%, 100% { opacity: 0.3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

.chat-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; padding: 0 1rem 0.75rem; }
.chat-chips[hidden] { display: none; }
.chat-chip {
  border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--border)); background: var(--accent-soft); color: var(--text);
  border-radius: 999px; padding: 0.4rem 0.75rem; font: inherit; font-size: 0.85rem; cursor: pointer; min-height: 32px;
}
.chat-chip:hover { border-color: var(--accent); }

.chat-form { display: flex; align-items: flex-end; gap: 0.5rem; padding: 0.75rem; border-top: 1px solid var(--border); }
.chat-form textarea {
  flex: 1; resize: none; min-height: 42px; max-height: 120px; padding: 0.6rem 0.8rem;
  border: 1px solid var(--border-strong); border-radius: 12px; background: var(--card); color: var(--text); font: inherit; line-height: 1.4;
}
.chat-form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-amber) 30%, transparent); }
.chat-send { flex: none; width: 42px; height: 42px; border-radius: 12px; border: 0; background: var(--btn-bg); color: var(--btn-fg); cursor: pointer; display: grid; place-items: center; }
.chat-send:hover { background: var(--accent-hover); }
.chat-send[disabled] { opacity: 0.6; cursor: progress; }
.chat-send__icon {
  width: 18px; height: 18px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3.4 20.4 21 12 3.4 3.6 3.4 10l12.6 2-12.6 2z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3.4 20.4 21 12 3.4 3.6 3.4 10l12.6 2-12.6 2z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.chat-note { font-size: 0.74rem; color: var(--text-muted); padding: 0 0.9rem 0.8rem; line-height: 1.4; }
.chat-note a { color: var(--accent); }

@media (max-width: 480px) {
  .chat-root.is-open { left: 8px; right: 8px; bottom: 8px; }
  .chat-root.is-open .chat-panel { width: 100%; height: calc(100dvh - 84px); }
}
@media (prefers-reduced-motion: reduce) { .chat-typing span { animation: none; opacity: 0.6; } }
@media print { .chat-root { display: none !important; } }

/* hCaptcha box on forms */
.h-captcha { margin: 0.25rem 0 1.1rem; min-height: 78px; }

/* ---------- 18. Language menu (same design as AllFours.tt) ----------------- */
.lang-pick { position: relative; flex: none; }
.lang-pick > summary { list-style: none; cursor: pointer; width: auto; padding: 0 0.7rem; gap: 0.35rem; grid-auto-flow: column; font-size: 0.8rem; font-weight: 800; letter-spacing: 0.04em; }
.lang-pick > summary::-webkit-details-marker { display: none; }
.lang-pick > summary svg { width: 18px; height: 18px; }
.lang-pick[open] > summary { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.lang-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 130; min-width: 170px; list-style: none; margin: 0; padding: 0.35rem;
  background: var(--card); border: 1px solid var(--border-strong); border-radius: 12px; box-shadow: 0 18px 40px -16px rgb(0 0 0 / 0.45);
}
.lang-menu a { display: flex; align-items: center; gap: 0.65rem; padding: 0.55rem 0.7rem; border-radius: 8px; color: var(--text); text-decoration: none; font-weight: 600; font-size: 0.95rem; }
.lang-menu a b { display: inline-grid; place-items: center; min-width: 2rem; padding: 0.1rem 0.3rem; border-radius: 6px; background: var(--bg-alt); color: var(--text-muted); font-size: 0.72rem; letter-spacing: 0.05em; }
.lang-menu a:hover { background: var(--bg-alt); }
.lang-menu a[aria-current="true"] b { background: var(--btn-bg); color: var(--btn-fg); }
