/* SlovoBoj website: v4 "Vedro" from the app (src/Slovoboj.App/Controls/DesignTokens.cs) — the blue sky, white tiles
   and cards with a darker bottom edge and a soft shadow, yellow for what is selected, Nunito. The page has one look
   (as the app): it always sits on the dark sky, so there is no separate dark mode. */

@font-face { font-family: "Nunito"; font-style: normal; font-weight: 400; font-display: swap; src: url(/static/fonts/nunito-400.4c532b8977.woff2) format("woff2"); }
@font-face { font-family: "Nunito"; font-style: normal; font-weight: 700; font-display: swap; src: url(/static/fonts/nunito-700.8de780afa7.woff2) format("woff2"); }
@font-face { font-family: "Nunito"; font-style: normal; font-weight: 900; font-display: swap; src: url(/static/fonts/nunito-900.cf0d2f02db.woff2) format("woff2"); }

:root {
  --sky-top: #1c5e9d;
  --sky-bottom: #0f3468;
  --band: #081f47;
  --ink: #1f2d4d;
  --muted-ink: #5c6b8a;
  --link: #1c5e9d;
  --yellow: #ffd23f;
  --yellow-edge: #c99200;
  --orange: #ff8f3c;
  --orange-edge: #c25c14;
  --white: #fff;
  --on-sky-soft: rgba(255, 255, 255, .78);
  --glass: rgba(255, 255, 255, .12);
  --glass-hover: rgba(255, 255, 255, .2);
  --glass-border: rgba(255, 255, 255, .28);
  --card-edge: #c3d3e6;
  --card-tint: #e9f0f9;
  --shadow: 0 14px 30px rgba(4, 18, 45, .28);
  --header: 60px;
  --gutter: 16px;
  --radius: 20px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%; text-size-adjust: 100%;
  /* Anchors (the help's contents, #main) land below the sticky header, not under it. */
  scroll-padding-top: calc(var(--header) + env(safe-area-inset-top));
}
html.no-scroll { overflow: hidden; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--sky-bottom);
  color: var(--white);
  font: 400 1.0625rem/1.6 "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
main { flex: 1; display: flex; flex-direction: column; }
img { max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; border-radius: 6px; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.skip {
  position: absolute; z-index: 20; left: var(--gutter); top: -80px;
  padding: 10px 18px; border-radius: 999px; background: var(--yellow); color: var(--ink);
  font-weight: 700; text-decoration: none;
}
.skip:focus { top: 10px; }

/* Round glass button (the app's RoundButton Glass) */
.round {
  display: grid; place-items: center; width: 48px; height: 48px; padding: 0;
  border: 1px solid var(--glass-border); border-radius: 50%; background: var(--glass); color: var(--white);
  cursor: pointer; transition: background .15s ease, opacity .15s ease;
}
.round:hover { background: var(--glass-hover); }
.round:disabled { opacity: .35; cursor: default; }
.round svg { width: 22px; height: 22px; }

/* ----- Header ----- */

/* Stays on top while the page scrolls. */
.site-header { position: sticky; top: 0; z-index: 10; background: var(--band); padding-top: env(safe-area-inset-top); }
.bar {
  max-width: 1200px; height: var(--header); margin: 0 auto;
  padding: 0 max(var(--gutter), env(safe-area-inset-right)) 0 max(var(--gutter), env(safe-area-inset-left));
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 900; font-size: 1.375rem; line-height: 1; text-decoration: none; color: var(--white);
}
.brand img { width: 36px; height: 36px; border-radius: 10px; box-shadow: 0 2px 0 rgba(0, 0, 0, .3); }
.brand b { font-weight: 900; color: var(--yellow); }
.top-nav { display: flex; align-items: center; gap: 6px; }
.nav-link { padding: 8px 14px; border-radius: 999px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.nav-link:hover { background: var(--glass); }
.nav-link[aria-current] { color: var(--yellow); }
/* The links stand in the bar while they fit (German and French are the longest); below that they are in the menu. */
.nav-menu { display: none; }
@media (max-width: 880px) {
  .nav-link { display: none; }
  .nav-menu { display: block; }
}

/* The header's menus: the page links (narrow screens) and the language */
.dropdown { position: relative; }
.dropdown summary {
  display: flex; align-items: center; gap: 6px; height: 40px; padding: 0 10px 0 12px;
  border: 1px solid var(--glass-border); border-radius: 999px; background: var(--glass);
  font-weight: 900; font-size: .9375rem; letter-spacing: .04em; list-style: none; cursor: pointer; user-select: none;
}
.dropdown summary::-webkit-details-marker { display: none; }
.dropdown summary:hover { background: var(--glass-hover); }
.dropdown summary svg { width: 18px; height: 18px; }
.nav-menu summary { width: 40px; justify-content: center; padding: 0; }
.nav-menu summary svg { width: 20px; height: 20px; }
.dropdown .chevron { transition: transform .15s ease; }
.dropdown[open] .chevron { transform: rotate(180deg); }
.dropdown ul {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 180px; margin: 0; padding: 6px; list-style: none;
  border-radius: 16px; background: var(--white); color: var(--ink); box-shadow: 0 4px 0 var(--card-edge), var(--shadow);
}
.nav-menu ul { min-width: 220px; }
.dropdown a { display: block; padding: 9px 14px; border-radius: 10px; font-weight: 700; text-decoration: none; }
.dropdown a:hover { background: var(--card-tint); }
.dropdown a[aria-current] { background: var(--yellow); }

/* ----- Hero: photo with the logo over its calmer bottom third ----- */

/* Tall photo (4:5) on portrait screens, wide (16:9) on landscape ones; never so high that the Google Play badge
   under it drops below the first screen (the 140px). */
.hero {
  position: relative; overflow: hidden; container-type: size; background: var(--sky-bottom);
  height: max(300px, min(125vw, calc(100vh - var(--header) - 140px)));
  height: max(300px, min(125vw, calc(100svh - var(--header) - 140px)));
}
@media (orientation: landscape) {
  .hero {
    height: max(280px, min(56.25vw, calc(100vh - var(--header) - 140px)));
    height: max(280px, min(56.25vw, calc(100svh - var(--header) - 140px)));
  }
}
.hero-scene { position: absolute; inset: 0; opacity: 0; transition: opacity 1.4s ease; }
.hero-scene.is-active { opacity: 1; }
.hero-scene img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.hero-overlay {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end; text-align: center;
  padding: 0 var(--gutter) 14px;
  padding-bottom: clamp(12px, 4cqh, 34px);
  background: linear-gradient(to top, var(--sky-bottom) 0%, rgba(15, 52, 104, .72) 20%, rgba(15, 52, 104, 0) 52%);
}
.hero h1 { margin: 0; line-height: 0; }
.hero-logo {
  width: min(80vw, 460px);
  width: min(80cqw, 460px, 72cqh);
  height: auto;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .35));
}
.hero-tagline {
  max-width: 46ch; margin: 2px 0 0;
  font-weight: 700; font-size: clamp(1rem, .85rem + .8vw, 1.375rem); line-height: 1.35;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .55);
}
.hero-tagline, .get-note, .get-title, .get-soon, .lead, .card h2, .showcase-heading, .showcase-text h3, .doc-card h1,
.doc-card h2 { text-wrap: balance; }

/* ----- Everything under the hero sits on the app's sky: gradient and three soft white circles ----- */

/* The first circle hangs low enough not to touch the hero's bottom edge. */
.sky {
  flex: 1;
  background:
    radial-gradient(circle at 96% 700px, rgba(255, 255, 255, .05) 0 min(40vw, 400px), transparent calc(min(40vw, 400px) + 1px)),
    radial-gradient(circle at 4% 62%, rgba(255, 255, 255, .05) 0 min(44vw, 440px), transparent calc(min(44vw, 440px) + 1px)),
    radial-gradient(circle at 94% 92%, rgba(255, 255, 255, .05) 0 min(30vw, 300px), transparent calc(min(30vw, 300px) + 1px)),
    linear-gradient(180deg, var(--sky-bottom) 0, var(--sky-top) 38%, var(--sky-bottom) 100%);
}
.doc-page .sky { background-color: var(--sky-bottom); }

/* ----- Get: each device's way to the game (templates/_get.html) ----- */

/* Every element of the block names the devices it is for; static/device.js names this one. Without it (no JavaScript)
   the elements for "nojs" show. Android phones and tablets share "android". */
html:not([data-device]) .get [data-show]:not([data-show~="nojs"]),
html[data-device="desktop"] .get [data-show]:not([data-show~="desktop"]),
html[data-device="ipad"] .get [data-show]:not([data-show~="ipad"]),
html[data-device^="android"] .get [data-show]:not([data-show~="android"]),
html[data-device="iphone"] .get [data-show]:not([data-show~="iphone"]) { display: none; }

.get { padding: 16px var(--gutter) 24px; text-align: center; }
.get-main { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 20px 32px; }
.get-buttons { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: center; gap: 14px 18px; }
.play-badge { display: inline-block; border-radius: 10px; transition: transform .15s ease; }
.play-badge:hover { transform: translateY(-2px); }
.play-badge img { display: block; width: auto; height: 56px; }
/* The app's FlatButton shape with dark ink on its face (white on orange tires the eye on a monitor): yellow with a
   play disc for the game in the browser, white for the iPhone beta; a caption under the name. */
.get-button {
  display: inline-flex; flex-direction: column; justify-content: center; min-width: 240px; min-height: 56px;
  padding: 8px 26px 9px; border-radius: 999px; text-decoration: none; line-height: 1.2;
  background: var(--yellow); color: var(--ink); box-shadow: 0 4px 0 var(--yellow-edge), 0 10px 22px rgba(4, 18, 45, .28);
  transition: transform .15s ease;
}
.get-button:hover { transform: translateY(-2px); }
.get-button strong { font-weight: 900; font-size: 1.125rem; }
.get-button small { margin-top: 2px; font-weight: 700; font-size: .8125rem; }
.get-light { background: var(--white); color: var(--ink); box-shadow: 0 4px 0 var(--card-edge), 0 10px 22px rgba(4, 18, 45, .28); }
.get-web { flex-direction: row; align-items: center; gap: 14px; min-height: 68px; padding: 10px 30px 10px 10px; text-align: left; }
.get-play-icon {
  flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--ink);
}
.get-play-icon svg { width: 26px; height: 26px; margin-left: 3px; }
.get-play-icon svg g { fill: var(--yellow); }
.get-play-text { display: flex; flex-direction: column; }
.get-web strong { font-size: 1.5rem; line-height: 1.1; }
.get-iphone { display: flex; flex-direction: column; align-items: center; }
.get-steps {
  margin: 10px 0 0; padding-left: 1.3em; text-align: left;
  color: var(--on-sky-soft); font-size: .875rem; line-height: 1.45;
}
.get-qr { display: flex; align-items: center; gap: 14px; max-width: 280px; text-align: left; }
.qr-card {
  flex: none; display: block; padding: 10px; border-radius: 14px; background: var(--white);
  box-shadow: 0 3px 0 var(--card-edge);
}
.qr-card .qr { display: block; width: 96px; height: 96px; }
.get-qr p { margin: 0; font-weight: 700; font-size: .9375rem; line-height: 1.35; }
.get-browser-link { display: inline-block; margin-top: 12px; font-weight: 700; font-size: .875rem; color: var(--on-sky-soft); }
/* One line; it breaks only where the screen is too narrow for it (then balanced). */
.get-soon { margin: 14px auto 0; font-weight: 900; font-size: 1.125rem; line-height: 1.35; }
.get-note { margin: 10px 0 0; color: var(--on-sky-soft); font-size: .875rem; line-height: 1.4; }
.get-end { padding: 40px var(--gutter) 60px; }
.get-title { margin: 0 0 18px; font-weight: 900; font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); line-height: 1.2; }

/* ----- Multiplayer, the game's main draw: three screens of a match beside its points ----- */

.versus {
  display: grid; gap: 8px 56px; max-width: 1100px; width: 100%; margin: 0 auto;
  padding: 36px var(--gutter) 24px;
  grid-template-areas: "head" "phones" "more";
}
/* Beside the phones the title starts level with the top of the screenshots (the phones' top padding, less the space
   the line box keeps above the capitals). */
@media (min-width: 900px) {
  .versus {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto 1fr; align-items: start;
    grid-template-areas: "phones head" "phones more";
  }
  .versus-head { padding-top: 18px; }
  .versus .versus-head h2 { margin-top: -.12em; }
}
.versus-head { grid-area: head; }
.versus-phones { grid-area: phones; }
.versus-more { grid-area: more; }
.versus h2 { margin: 0 0 10px; font-weight: 900; font-size: clamp(1.875rem, 1.4rem + 2vw, 2.75rem); line-height: 1.1; text-wrap: balance; }
.versus-head p { margin: 0; font-size: clamp(1.0625rem, 1rem + .3vw, 1.1875rem); line-height: 1.5; }
/* The round in front, the lobby and the result tilted behind it; the sizes follow the column (cqw), so the three
   always fit beside each other. */
.versus-phones {
  container-type: inline-size; display: flex; justify-content: center; align-items: center; padding: 18px 0 26px;
}
.versus-phones img {
  display: block; height: auto; border-radius: 20px; box-shadow: 0 4px 0 rgba(4, 18, 45, .45), var(--shadow);
  width: min(33cqw, 200px);
}
.versus-phones img:nth-child(1) { transform: rotate(-7deg) translate(6%, 7%); }
.versus-phones img:nth-child(3) { transform: rotate(7deg) translate(-6%, 7%); }
.versus-phones img:nth-child(2) { position: relative; z-index: 1; width: min(43cqw, 250px); margin: 0 -9cqw; }
.versus-points {
  display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  margin: 0 0 16px; padding: 0; list-style: none;
}
.versus-points li {
  display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px;
  border: 1px solid var(--glass-border); border-radius: 16px; background: var(--glass);
  color: var(--on-sky-soft); font-size: .9375rem; line-height: 1.45;
}
.versus-points strong { display: block; margin-bottom: 2px; color: var(--white); font-weight: 900; font-size: 1.0625rem; }
.point-icon {
  flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--yellow);
}
.point-icon svg { width: 24px; height: 24px; }

/* ----- Screenshots: a row that scrolls sideways and snaps; a tap opens the lightbox ----- */

.shots-frame { position: relative; max-width: 1320px; margin: 0 auto; }
.shots-track {
  display: flex; gap: 16px; margin: 0; padding: 10px var(--gutter) 26px; list-style: none;
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter);
  scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .35) transparent;
}
.shots-track li { flex: 0 0 clamp(160px, 58vw, 196px); scroll-snap-align: center; }
/* Centred while all of them fit; auto margins collapse to 0 as soon as the row overflows */
.shots-track li:first-child { margin-left: auto; }
.shots-track li:last-child { margin-right: auto; }
.shot {
  display: block; overflow: hidden; border-radius: 18px; cursor: zoom-in;
  box-shadow: 0 4px 0 rgba(4, 18, 45, .45), var(--shadow); transition: transform .2s ease;
}
.shot:hover { transform: translateY(-4px); }
.shot img { display: block; width: 100%; height: auto; }
.shots-arrow { position: absolute; top: calc(50% - 32px); z-index: 1; background: rgba(8, 31, 71, .7); }
.shots-arrow.prev { left: 6px; }
.shots-arrow.next { right: 6px; }
.shots-arrow[hidden] { display: none; }
@media (hover: none) { .shots-arrow { display: none; } }

/* ----- About the game: the store description as white cards ----- */

.about { max-width: 1160px; width: 100%; margin: 0 auto; padding: 28px var(--gutter) 8px; }
.lead {
  max-width: 40ch; margin: 0 auto 28px; text-align: center;
  font-weight: 700; font-size: clamp(1.125rem, 1rem + .6vw, 1.375rem); line-height: 1.45;
}
.lead p { margin: 0; }
.cards { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.card {
  padding: 22px 24px 20px; border-radius: var(--radius); background: var(--white); color: var(--ink);
  box-shadow: 0 4px 0 var(--card-edge), var(--shadow);
}
.card-icon {
  display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 12px;
  border-radius: 50%; background: var(--card-tint);
}
.card-icon svg { width: 26px; height: 26px; }
.card h2 { margin: 0 0 8px; font-weight: 900; font-size: 1.3125rem; line-height: 1.25; }
.card p { margin: 0 0 .6em; }
.card p:last-child { margin-bottom: 0; }
.card ul { margin: 0; padding-left: 1.15em; }
.card li { margin: .3em 0; padding-left: .15em; }
.card li::marker { color: var(--orange); }

/* ----- What the game looks like: a screenshot and its text, side by side on a wide screen, alternating ----- */

.showcase { max-width: 1000px; width: 100%; margin: 0 auto; padding: 48px var(--gutter) 8px; }
.showcase-heading {
  margin: 0 0 28px; text-align: center; font-weight: 900; font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); line-height: 1.2;
}
.showcase-row { display: grid; gap: 20px 48px; align-items: center; margin: 0 0 44px; }
.showcase-shot { margin: 0; justify-self: center; }
.showcase-shot img {
  display: block; width: min(300px, 80vw); height: auto; border-radius: 22px;
  box-shadow: 0 4px 0 rgba(4, 18, 45, .45), var(--shadow);
}
.showcase-text h3 { margin: 0 0 10px; font-weight: 900; font-size: clamp(1.3125rem, 1.15rem + .7vw, 1.625rem); line-height: 1.25; }
.showcase-text p { margin: 0 0 .7em; }
.showcase-text ul { margin: 0 0 .8em; padding-left: 1.15em; }
.showcase-text li { margin: .3em 0; }
.showcase-text li::marker { color: var(--yellow); }
.more-link {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 4px;
  font-weight: 900; color: var(--yellow); text-decoration: none;
}
.more-link:hover { text-decoration: underline; }
.more-link svg { width: 18px; height: 18px; }
@media (min-width: 760px) {
  .showcase-row { grid-template-columns: 300px 1fr; }
  .showcase-row:nth-of-type(even) { grid-template-columns: 1fr 300px; }
  .showcase-row:nth-of-type(even) .showcase-shot { order: 2; }
}
@media (max-width: 759.98px) {
  .showcase-text { text-align: center; }
  .showcase-text ul { display: inline-block; text-align: left; }
}

/* ----- Pages with text (help, legal) ----- */

.doc { width: 100%; max-width: 860px; margin: 0 auto; padding: 28px var(--gutter) 56px; }
.doc-card {
  padding: clamp(22px, 5vw, 48px); border-radius: var(--radius); background: var(--white); color: var(--ink);
  box-shadow: 0 4px 0 var(--card-edge), var(--shadow);
}
.doc-card h1 { margin: 0 0 .6em; font-weight: 900; font-size: clamp(1.75rem, 1.35rem + 1.6vw, 2.375rem); line-height: 1.2; }
.doc-card h2 { margin: 1.6em 0 .5em; font-weight: 900; font-size: 1.375rem; line-height: 1.3; }
.doc-card h3 { margin: 1.3em 0 .4em; font-weight: 900; font-size: 1.125rem; }
.doc-card h4 { margin: 1.1em 0 .3em; font-weight: 900; font-size: 1rem; }
.doc-card h2, .doc-card h3, .doc-card h4 { scroll-margin-top: 16px; }
.doc-card a { color: var(--link); }
.doc-card .toc { margin: 0 0 1.6em; padding: 14px 20px; border-radius: 14px; background: var(--card-tint); }
.doc-card .toc ul { margin: 0; padding-left: 1.1em; columns: 2 220px; column-gap: 32px; }
.doc-card .toc li { margin: .2em 0; break-inside: avoid; }
.doc-card .toc a { font-weight: 700; text-decoration: none; }
.doc-card .toc a:hover { text-decoration: underline; }
/* Label / value pairs (legal notice) */
.doc-card dl { display: grid; grid-template-columns: max-content 1fr; gap: 8px 28px; margin: 1.4em 0 0; }
.doc-card dt { font-weight: 700; }
.doc-card dd { margin: 0; }
@media (max-width: 560px) {
  .doc-card dl { grid-template-columns: 1fr; gap: 0; }
  .doc-card dd { margin-bottom: 12px; }
}
.doc-card table { width: 100%; border-collapse: collapse; margin: 1em 0; font-size: .9375rem; }
.doc-card th, .doc-card td { padding: 8px 10px; border-bottom: 1px solid #dfe7f2; text-align: left; vertical-align: top; }
.doc-card li::marker { color: var(--orange); }
/* Screenshots of the game (shot:<name> in the Markdown, build.py): one or several in a row, at their own size. */
.shot-row { display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-start; gap: 18px 24px; margin: 1.2em 0 1.4em; }
.shot-figure { margin: 0; max-width: 100%; text-align: center; }
.shot-figure img {
  display: block; max-width: 100%; height: auto; margin: 0 auto; border-radius: 18px;
  box-shadow: 0 3px 0 var(--card-edge), 0 10px 24px rgba(4, 18, 45, .22);
}
.shot-figure figcaption { max-width: 300px; margin: 10px auto 0; color: #50607f; font-size: .875rem; line-height: 1.4; }
/* Questions and their answers (faq.md: a question is an h3) */
.doc-card h3 + p { margin-top: 0; }
/* The other pages of the game, under the text */
.related { margin-top: 28px; }
.related-title { margin: 0 0 10px; font-weight: 900; color: var(--on-sky-soft); }
.related ul { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.related a {
  display: inline-flex; align-items: center; gap: 6px; padding: 10px 14px 10px 18px;
  border: 1px solid var(--glass-border); border-radius: 999px; background: var(--glass);
  font-weight: 700; text-decoration: none;
}
.related a:hover { background: var(--glass-hover); }
.related svg { width: 18px; height: 18px; }
.notice {
  margin: 0 0 16px; padding: 12px 16px;
  border: 1px solid var(--glass-border); border-radius: 14px; background: var(--glass);
}
.button {
  display: inline-block; padding: 12px 24px; border-radius: 999px;
  background: var(--yellow); color: var(--ink) !important; box-shadow: 0 3px 0 var(--yellow-edge);
  font-weight: 900; text-decoration: none;
}
.button:hover { transform: translateY(-1px); }
.not-found { padding-top: 48px; text-align: center; }

/* ----- Invitation page (templates/invite.html, static/invite.js; pravila-igre-v023, B3.6) ----- */

/* The card shows once the server has answered with a room; the line under it follows the room's state. Without
   JavaScript (no data-device) the card and "checking" stay hidden and only the note shows. */
.invite { width: 100%; max-width: 560px; margin: 0 auto; padding: 32px var(--gutter) 8px; text-align: center; }
.invite-title { margin: 0 0 18px; font-weight: 900; font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); line-height: 1.2; }
.invite-card {
  display: none; padding: 22px clamp(18px, 5vw, 32px) 20px; border-radius: var(--radius); background: var(--white);
  color: var(--ink); box-shadow: 0 4px 0 var(--card-edge), var(--shadow);
}
.invite[data-state="open"] .invite-card,
.invite[data-state="full"] .invite-card,
.invite[data-state="playing"] .invite-card { display: block; }
.invite-name {
  margin: 0 0 14px; font-weight: 900; font-size: clamp(1.625rem, 1.3rem + 1.4vw, 2.125rem); line-height: 1.15;
  overflow-wrap: anywhere;
}
.invite-host { display: inline-flex; align-items: center; gap: 12px; max-width: 100%; text-align: left; }
.invite-avatar { flex: none; width: 52px; height: 52px; }
.invite-avatar .picture { display: block; width: 52px; height: 52px; border-radius: 50%; }
.invite-avatar .initial {
  display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%;
  font-weight: 900; font-size: 24px; line-height: 1;
}
.invite-host-text { display: flex; flex-direction: column; min-width: 0; }
.invite-host-text small { font-weight: 700; font-size: .8125rem; color: var(--muted-ink); }
.invite-host-text strong { font-weight: 900; font-size: 1.25rem; line-height: 1.2; overflow-wrap: anywhere; }
.invite-facts {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 18px 0 0; padding: 0; list-style: none;
}
.invite-facts li {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px;
  background: var(--card-tint); font-weight: 700; font-size: .9375rem; line-height: 1.3;
}
.seat-dots { display: inline-flex; gap: 4px; }
.seat { width: 14px; height: 14px; border-radius: 50%; border: 2px dashed rgba(31, 45, 77, .45); }
.seat.taken { border: 0; background: var(--yellow); box-shadow: inset 0 -2px 0 var(--yellow-edge); }
.invite-flag img { display: block; width: 22px; height: 22px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px var(--white), 0 1px 3px rgba(4, 18, 45, .3); }
.invite-language small { margin-right: 6px; font-weight: 700; color: var(--muted-ink); }
/* The lock and "Private room" on one line, the note about the PIN on its own line under them. */
.invite-private {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 2px 8px; margin: 16px 0 0;
  font-size: .9375rem; line-height: 1.4;
}
.invite-private[hidden], .invite-private [hidden] { display: none; }
.invite-private svg { flex: none; width: 20px; height: 20px; }
.invite-private [data-field="pin-note"]:not([hidden]) { flex-basis: 100%; text-align: center; color: var(--muted-ink); }
.invite-status { display: none; max-width: 46ch; margin: 18px auto 0; font-weight: 900; font-size: 1.125rem; line-height: 1.35; text-wrap: balance; }
.invite[data-state="loading"] [data-status="loading"],
.invite[data-state="open"] [data-status="open"],
.invite[data-state="full"] [data-status="full"],
.invite[data-state="playing"] [data-status="playing"],
.invite[data-state="gone"] [data-status="gone"],
.invite[data-state="error"] [data-status="error"] { display: block; }
.invite[data-state="loading"] [data-status="loading"] { color: var(--on-sky-soft); font-weight: 700; }
html:not([data-device]) .invite [data-status="loading"] { display: none; }
.invite .invite-nojs { display: block; }
/* The computer's button says "Join the room" while the room has a seat (invite.js points it there). */
.get-enter-label { display: none; }
.invite[data-state="open"] ~ .get .get-enter-label { display: block; }
.invite[data-state="open"] ~ .get .get-play-label { display: none; }
/* "Tap the invitation again after installing" only while the room still waits for players. */
.get-after-install { display: none; margin: 12px auto 0; max-width: 40ch; font-weight: 700; font-size: .9375rem; line-height: 1.4; }
.invite[data-state="open"] ~ .get .get-after-install,
.invite[data-state="full"] ~ .get .get-after-install { display: block; }

/* ----- Footer ----- */

.site-footer {
  padding: 32px max(var(--gutter), env(safe-area-inset-right)) calc(24px + env(safe-area-inset-bottom)) max(var(--gutter), env(safe-area-inset-left));
  background: var(--band); color: var(--on-sky-soft); font-size: .9375rem;
}
.footer-inner {
  max-width: 1200px; margin: 0 auto;
  display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.footer-brand p { margin: 12px 0 0; }
.footer-title { margin: 0 0 8px; font-weight: 900; color: var(--white); }
.site-footer a[aria-current] { color: var(--yellow); }
.site-footer ul { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.site-footer a { color: var(--white); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-langs ul { grid-template-columns: repeat(2, max-content); column-gap: 28px; }
.footer-langs a[aria-current] { color: var(--yellow); }
.footer-legal {
  max-width: 1200px; margin: 24px auto 0; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, .12);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 24px; font-size: .8125rem;
}
.footer-legal p { margin: 0; }

/* ----- Lightbox ----- */

.lightbox {
  width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  overflow: hidden; background: rgba(4, 14, 34, .94); color: var(--white); touch-action: pinch-zoom;
}
.lightbox[open] { display: grid; place-items: center; }
.lightbox::backdrop { background: rgba(4, 14, 34, .6); }
.lightbox-image {
  width: auto; height: auto; max-width: calc(100vw - 32px);
  max-height: calc(100vh - 120px); max-height: calc(100dvh - 120px);
  border-radius: 16px; box-shadow: var(--shadow); user-select: none; -webkit-user-drag: none;
}
.lightbox-close { position: absolute; top: max(12px, env(safe-area-inset-top)); right: 12px; }
.lightbox-nav {
  position: absolute; left: 0; right: 0; bottom: max(14px, env(safe-area-inset-bottom));
  display: flex; align-items: center; justify-content: center; gap: 18px;
}
.lightbox-count { min-width: 4ch; font-weight: 900; text-align: center; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
