/* Slagalica Duel website. Colours are the app's own (packages/theme/src/brand.ts). */
@font-face { font-family: "Nunito"; font-weight: 600; font-display: swap; src: url("/assets/nunito-600.woff") format("woff"); }
@font-face { font-family: "Nunito"; font-weight: 800; font-display: swap; src: url("/assets/nunito-800.woff") format("woff"); }
@font-face { font-family: "Nunito"; font-weight: 900; font-display: swap; src: url("/assets/nunito-900.woff") format("woff"); }

:root {
  --stage: #2b1660;
  --stage-deep: #1d0d47;
  --surface: #3a1f7a;
  --surface-raised: #4c2a96;
  --text: #ffffff;
  --muted: #cbbdf2;
  --tile: #fff3d6;
  --tile-shade: #d8c191;
  --on-tile: #2b1660;
  --blue: #2468d8;
  --blue-shade: #16489e;
  --red: #d93b4b;
  --red-shade: #9a2331;
  --yellow: #ffc83d;
  --yellow-shade: #c88f0c;
  --mint: #2ed3b7;
  --gutter: 16px;
  --measure: 34rem;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--stage-deep);
  color: var(--text);
  font: 600 17px/1.55 "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--yellow); }
:focus-visible { outline: 3px solid var(--mint); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 var(--gutter); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Stage (hero) ---------- */
.stage {
  background:
    radial-gradient(60rem 36rem at 70% 20%, #4a2a9c 0%, transparent 60%),
    linear-gradient(180deg, var(--stage) 0%, var(--stage-deep) 100%);
  padding: 20px 0 64px;
  overflow: hidden;
}
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.topbar img { width: 40px; height: 40px; border-radius: 10px; }
.topbar nav a { color: var(--muted); text-decoration: none; font-weight: 800; font-size: 15px; display: inline-block; padding: 12px 2px; }
.topbar nav a:hover { color: var(--text); }

.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  align-items: center;
  margin-top: 16px;
}
.hero .zarko { width: min(180px, 48vw); justify-self: center; margin-bottom: -6px; }
@media (min-width: 900px) {
  .hero { grid-template-columns: 1.25fr 0.75fr; gap: 32px; margin-top: 40px; }
  .hero .zarko { order: 2; width: 100%; max-width: 380px; margin: 0; }
}

/* The name spelled in game tiles: the page's one signature element. */
.tiles {
  --size: clamp(30px, 9.2vw, 70px);
  margin: 0 0 22px;
  display: flex;
  flex-direction: column;
  gap: calc(var(--size) * 0.12);
  font: 900 calc(var(--size) * 0.6) / 1 "Nunito", system-ui, sans-serif;
}
.tiles .row { display: flex; gap: calc(var(--size) * 0.09); }
.tile {
  width: var(--size);
  height: var(--size);
  display: grid;
  place-items: center;
  border-radius: calc(var(--size) * 0.16);
  background: var(--tile);
  color: var(--on-tile);
  box-shadow: 0 calc(var(--size) * 0.09) 0 var(--tile-shade);
}
.tile.blue { background: var(--blue); color: #fff; box-shadow: 0 calc(var(--size) * 0.09) 0 var(--blue-shade); }
.tile.red { background: var(--red); color: #fff; box-shadow: 0 calc(var(--size) * 0.09) 0 var(--red-shade); }
@media (prefers-reduced-motion: no-preference) {
  .tiles .tile { animation: drop 420ms cubic-bezier(.2, 1.4, .4, 1) both; animation-delay: calc(var(--i) * 45ms + 120ms); }
  @keyframes drop { from { opacity: 0; transform: translateY(-40%) scale(.8); } to { opacity: 1; transform: none; } }
}

.lede { font-size: clamp(19px, 2.4vw, 23px); font-weight: 800; line-height: 1.35; max-width: var(--measure); margin: 0 0 8px; }
.sub { color: var(--muted); max-width: var(--measure); margin: 0 0 24px; }

/* ---------- Buttons ---------- */
.stores { display: flex; flex-wrap: wrap; gap: 14px; }
.btn {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  min-height: 60px;
  min-width: 160px;
  padding: 8px 20px 10px;
  border-radius: 16px;
  text-decoration: none;
  line-height: 1.15;
  background: var(--surface-raised);
  color: var(--text);
  box-shadow: 0 5px 0 var(--surface);
  transition: transform 80ms, box-shadow 80ms;
}
.btn small { font-size: 13px; font-weight: 800; opacity: .85; }
.btn strong { font-size: 20px; font-weight: 900; }
.btn.primary { background: var(--yellow); color: var(--on-tile); box-shadow: 0 5px 0 var(--yellow-shade); }
a.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--surface); }
a.btn.primary:active { box-shadow: 0 1px 0 var(--yellow-shade); }
.btn[aria-disabled="true"] { background: transparent; box-shadow: inset 0 0 0 2px var(--surface-raised); color: var(--muted); cursor: default; }

/* ---------- Sections ---------- */
section { padding: 64px 0; }
h2 { font-weight: 900; font-size: clamp(28px, 4vw, 40px); line-height: 1.1; margin: 0 0 12px; letter-spacing: -0.01em; }
h3 { font-weight: 900; font-size: 21px; margin: 14px 0 4px; }
.intro { color: var(--muted); max-width: var(--measure); margin: 0 0 32px; }

.games {
  list-style: none;
  margin: 0 calc(var(--gutter) * -1);
  padding: 0 var(--gutter) 12px;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(200px, 62vw);
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 var(--gutter);
}
.games li { scroll-snap-align: start; }
.games img {
  width: 100%;
  aspect-ratio: 1 / 2;
  object-fit: cover;
  object-position: top;
  border-radius: 22px;
  box-shadow: 0 0 0 3px var(--surface), 0 14px 30px rgba(10, 2, 30, .45);
}
.games p { color: var(--muted); margin: 0; font-size: 16px; }
@media (min-width: 900px) {
  .games { grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); overflow: visible; margin: 0; padding: 0; gap: 48px 36px; }
  .games li { display: grid; grid-template-columns: 150px 1fr; gap: 0 20px; align-items: center; }
  .games img { grid-row: span 2; border-radius: 16px; }
  .games h3 { margin: 0; align-self: end; }
  .games p { align-self: start; }
}

.modes { display: grid; gap: 28px; margin: 0; padding: 0; list-style: none; }
.modes li { display: grid; grid-template-columns: 52px 1fr; gap: 16px; align-items: start; }
.modes .tile { --size: 52px; font: 900 26px/1 "Nunito", system-ui, sans-serif; }
.modes h3 { margin-top: 2px; }
.modes p { color: var(--muted); margin: 0; max-width: var(--measure); }
@media (min-width: 900px) { .modes { grid-template-columns: repeat(3, 1fr); gap: 40px; } }

.band { background: var(--stage); }
.closing { display: grid; gap: 24px; align-items: center; justify-items: start; }
.closing img { width: 150px; }
@media (min-width: 700px) { .closing { grid-template-columns: 170px 1fr; } }

/* ---------- Footer ---------- */
footer { padding: 40px 0 120px; color: var(--muted); font-size: 14px; }
footer nav { display: flex; flex-wrap: wrap; gap: 0 22px; margin-bottom: 14px; }
footer nav a { display: inline-block; padding: 11px 0; }
footer nav a, footer button.link { color: var(--text); font: 800 15px "Nunito", system-ui, sans-serif; text-decoration: none; }
footer nav a:hover, footer button.link:hover { text-decoration: underline; }
footer p { margin: 4px 0; max-width: 46rem; }
button.link { background: none; border: 0; padding: 0; cursor: pointer; }

/* ---------- Link pages (invites, tournaments, matches) ---------- */
.card { max-width: 30rem; margin: 24px auto 0; text-align: center; }
.card .zarko { width: 170px; margin: 0 auto 8px; }
.card h1 { font-weight: 900; font-size: clamp(28px, 7vw, 38px); line-height: 1.1; margin: 0 0 10px; }
.card p { color: var(--muted); margin: 0 auto 20px; }
.card .stores { justify-content: center; }
.card .open { margin: 4px auto 28px; }
.code { display: flex; gap: 6px; justify-content: center; margin: 4px 0 26px; }
.code[hidden] { display: none; }
.code .tile { --size: 42px; font: 900 24px/1 "Nunito", system-ui, sans-serif; }
.code .dash { width: 14px; }
.note { font-size: 15px; }

/* ---------- Consent ---------- */
.consent {
  position: fixed;
  left: 12px; right: 12px; bottom: 12px;
  max-width: 34rem;
  margin: 0 auto;
  padding: 16px 18px;
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 0 0 2px var(--surface-raised), 0 16px 40px rgba(5, 0, 20, .6);
  z-index: 10;
}
.consent p { margin: 0 0 12px; font-size: 15px; }
.consent .actions { display: flex; flex-wrap: wrap; gap: 10px; }
.consent button {
  font: 900 16px "Nunito", system-ui, sans-serif;
  border: 0; border-radius: 12px; padding: 10px 18px; cursor: pointer;
  background: var(--surface-raised); color: var(--text);
}
.consent button.yes { background: var(--yellow); color: var(--on-tile); }

/* ---------- Content pages (SEO pages: /slagalica-*, /igre/*, /turniri, /cesta-pitanja) ---------- */
.topbar .right { display: flex; align-items: center; gap: 18px; }
.topbar nav { display: flex; gap: 18px; }
.cta {
  display: inline-block;
  padding: 7px 16px 8px;
  border-radius: 12px;
  background: var(--yellow);
  color: var(--on-tile);
  font: 900 15px/1.2 "Nunito", system-ui, sans-serif;
  text-decoration: none;
  box-shadow: 0 3px 0 var(--yellow-shade);
}
@media (max-width: 599px) { .topbar nav .wide { display: none; } }

.page-head { padding: 20px 0 44px; }
.crumbs { margin: 18px 0 4px; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 4px 8px; font-size: 14px; color: var(--muted); }
.crumbs li + li::before { content: "›"; margin-right: 8px; opacity: .7; }
.crumbs a { color: var(--muted); text-decoration: none; display: inline-block; padding: 10px 0; }
.crumbs a:hover { color: var(--text); text-decoration: underline; }
.page-head h1 { font-weight: 900; font-size: clamp(32px, 5.4vw, 52px); line-height: 1.05; letter-spacing: -0.015em; margin: 0 0 14px; max-width: 22ch; }
.page-head .lede { margin: 0; }
.head-grid { display: grid; gap: 20px; align-items: center; }
.head-grid .shot { width: 150px; border-radius: 16px; box-shadow: 0 0 0 3px var(--surface), 0 14px 30px rgba(10, 2, 30, .45); }
@media (min-width: 800px) { .head-grid.has-shot { grid-template-columns: 1fr 190px; } .head-grid .shot { width: 190px; } }

.prose { max-width: 44rem; padding: 48px 0 16px; }
.prose h2 { font-size: clamp(25px, 3.4vw, 32px); margin: 44px 0 10px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 19px; margin: 26px 0 4px; }
.prose p, .prose li { color: #e7e0fa; }
.prose p { margin: 0 0 14px; }
.prose ul, .prose ol { margin: 0 0 16px; padding-left: 1.3em; }
.prose li { margin: 6px 0; }
.prose li::marker { color: var(--yellow); font-weight: 900; }
.prose strong { color: var(--text); font-weight: 900; }
.prose .table { overflow-x: auto; margin: 6px 0 20px; }
.prose table { border-collapse: collapse; width: 100%; min-width: 30rem; font-size: 16px; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--surface-raised); }
.prose th { color: var(--muted); font-weight: 800; font-size: 14px; }
.prose td:first-child { font-weight: 900; color: var(--text); white-space: nowrap; }
.callout { margin: 20px 0; padding: 16px 18px; border-radius: 16px; background: var(--surface); box-shadow: inset 4px 0 0 var(--yellow); }
.callout p:last-child { margin-bottom: 0; }

.faq details { border-bottom: 1px solid var(--surface-raised); padding: 4px 0; }
.faq summary { cursor: pointer; list-style: none; padding: 14px 32px 14px 0; position: relative; font: 900 19px/1.3 "Nunito", system-ui, sans-serif; color: var(--text); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 10px; font-size: 26px; color: var(--yellow); }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 16px; }

.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); }
.cards a { display: block; height: 100%; padding: 16px 18px 18px; border-radius: 18px; background: var(--surface); text-decoration: none; color: var(--text); box-shadow: 0 4px 0 #24104f; transition: transform 80ms; }
.cards a:hover { background: var(--surface-raised); }
.cards a:active { transform: translateY(3px); }
.cards strong { display: block; font-weight: 900; font-size: 19px; margin-bottom: 2px; }
.cards span { color: var(--muted); font-size: 15px; line-height: 1.45; display: block; }
.game-cards img { width: 64px; aspect-ratio: 1 / 2; object-fit: cover; object-position: top; border-radius: 10px; float: right; margin: 0 0 6px 12px; }

.pager { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 28px 0 0; }
.pager a { color: var(--yellow); font-weight: 900; text-decoration: none; }
.related { padding: 40px 0 8px; }
.related h2 { font-size: 24px; }

/* ---------- Download block: QR cards on computers, one button on phones ---------- */
.get { background: var(--stage); }
.get .intro { margin-bottom: 26px; }
.download { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(240px, 300px)); }
.qr-card {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 20px 20px 22px;
  border-radius: 24px;
  background: var(--surface);
  box-shadow: 0 5px 0 #24104f;
  text-align: center;
}
.qr-os { display: flex; align-items: center; gap: 8px; margin: 0; font: 900 20px/1 "Nunito", system-ui, sans-serif; }
.qr-os i { width: 12px; height: 12px; border-radius: 4px; background: var(--red); }
.qr-card.ios .qr-os i { background: var(--blue); }
.qr-card img, .qr-soon { width: 200px; height: 200px; border-radius: 14px; }
.qr-soon { display: grid; place-items: center; background: var(--stage-deep); color: var(--muted); font: 900 18px/1.3 "Nunito", system-ui, sans-serif; box-shadow: inset 0 0 0 2px var(--surface-raised); padding: 20px; }
.qr-hint { margin: -2px 0 2px; color: var(--muted); font-size: 14px; }
.qr-card .btn { min-width: 0; width: 100%; align-items: center; }
.download.phone { display: block; }
.download.phone .btn { min-width: 240px; align-items: center; }
.download .note { color: var(--muted); font-size: 15px; margin: 12px 0 0; }
.games h3 a, .modes h3 a { color: inherit; text-decoration: none; }
.games h3 a:hover, .modes h3 a:hover { text-decoration: underline; text-decoration-color: var(--yellow); }
.intro a { color: var(--yellow); }
.closing > div { width: 100%; }

/* ---------- v2: answer tile, FAQ per page, next links, dock, hero QR ---------- */
.skip { position: absolute; left: 12px; top: -60px; z-index: 20; padding: 10px 14px; border-radius: 10px; background: var(--yellow); color: var(--on-tile); font-weight: 900; text-decoration: none; }
.skip:focus { top: 12px; }

/* The one signature element: the short answer sits on a game tile. */
.answer {
  margin: 0 0 40px;
  padding: 20px 22px 22px;
  border-radius: 20px;
  background: var(--tile);
  color: var(--on-tile);
  box-shadow: 0 7px 0 var(--tile-shade);
  max-width: 44rem;
}
.answer h2 { font-size: 17px; margin: 0 0 6px; color: #6a4a9e; letter-spacing: 0; }
.answer p { margin: 0; color: var(--on-tile) !important; font-size: 18px; line-height: 1.5; font-weight: 700; }
.answer a { color: #5b3fd1; }
.prose .answer + h2 { margin-top: 0; }

.updated { color: var(--muted); font-size: 14px; margin: 28px 0 0 !important; }
.example { margin: 8px 0 20px; padding: 16px 18px; border-radius: 16px; background: var(--surface); }
.example p:last-child { margin-bottom: 0; }
.example .row { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 12px; }
.example .tile { --size: 36px; font: 900 20px/1 "Nunito", system-ui, sans-serif; }
.example .tile.wide { width: auto; padding: 0 10px; }

.next { padding: 36px 0 8px; max-width: 44rem; }
.next h2 { font-size: 24px; margin: 0 0 8px; }
.next ul { list-style: none; margin: 0; padding: 0; }
.next li { padding: 12px 0; border-top: 1px solid var(--surface-raised); }
.next a { color: var(--text); font-weight: 900; font-size: 19px; text-decoration: none; display: inline-block; padding: 4px 0; }
.next a:hover { text-decoration: underline; text-decoration-color: var(--yellow); }
.next span { display: block; color: var(--muted); font-size: 15px; }
.pager { display: grid; gap: 4px; margin: 28px 0 0; }
.pager a { color: var(--yellow); font-weight: 900; text-decoration: none; display: inline-block; padding: 8px 0; }
.pager a:hover { text-decoration: underline; }

.hero-qr { display: none; }
.hero-qr.on { display: flex; align-items: center; gap: 14px; margin-top: 20px; color: var(--muted); font-size: 15px; max-width: 22rem; }
.hero-qr img { width: 96px; height: 96px; border-radius: 10px; flex: none; }

.dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 9;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  background: rgba(29, 13, 71, .94);
  box-shadow: 0 -1px 0 var(--surface-raised);
  display: flex; align-items: center; gap: 12px;
  transform: translateY(110%);
  transition: transform 200ms ease-out;
}
.dock.on { transform: none; }
.dock img { width: 40px; height: 40px; border-radius: 10px; }
.dock p { margin: 0; flex: 1; font-weight: 900; font-size: 15px; line-height: 1.2; }
.dock p small { display: block; color: var(--muted); font-weight: 700; font-size: 13px; }
.dock .btn { min-height: 46px; min-width: 0; padding: 6px 16px 8px; }
.dock .btn small { font-size: 11px; }
.dock .btn strong { font-size: 17px; }
@media (prefers-reduced-motion: reduce) { .dock { transition: none; } }
/* Tap targets: at least 44 px (inline links inside text are exempt). */
footer nav a { padding: 12px 0; }
.pager a { padding: 10px 0; }
.crumbs a { padding: 11px 0; }
.topbar > a { display: inline-block; padding: 2px; }
.cta { padding: 12px 18px 14px; }
.crumbs li[aria-current] { padding: 11px 0; }
.prose table { min-width: 0; } @media (max-width: 520px) { .prose td:first-child { white-space: normal; } .prose th, .prose td { padding: 9px 8px; } }

/* ---------- Official store badges (unmodified; same height side by side) ---------- */
.badge { display: inline-block; line-height: 0; border-radius: 10px; }
.badge img { height: 52px; width: auto; display: block; }
.badge:focus-visible { outline-offset: 4px; }
.stores { gap: 16px; align-items: center; }
.qr-card .badge img { height: 48px; }
.download.phone .badge img { height: 56px; }
.dock .badge img { height: 40px; }
.hero-qr.on { max-width: 30rem; gap: 12px; }
.hero-qr figure { margin: 0; text-align: center; }
.hero-qr figure img { width: 88px; height: 88px; border-radius: 10px; }
.hero-qr figcaption { font-size: 13px; font-weight: 800; color: var(--muted); margin-top: 4px; }

/* ---------- Layout polish (2026-11-13) ---------- */
/* Download cards: flexible columns so two fit on tablets. */
.download { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); max-width: 640px; }

/* Content pages: on wide screens a sticky download card balances the reading column. */
.page-body { display: block; }
.side { display: none; }
@media (min-width: 1100px) {
  .page-body { display: grid; grid-template-columns: minmax(0, 44rem) 280px; justify-content: space-between; gap: 64px; }
  .side { display: block; padding: 48px 0 0; }
  .side-card { position: sticky; top: 24px; padding: 22px 22px 24px; border-radius: 24px; background: var(--surface); box-shadow: 0 5px 0 #24104f; }
  .side-card .app { display: flex; align-items: center; gap: 12px; margin: 0 0 12px; font: 900 19px/1.2 "Nunito", system-ui, sans-serif; }
  .side-card .app img { width: 48px; height: 48px; border-radius: 12px; }
  .side-card p { margin: 0 0 16px; color: var(--muted); font-size: 15px; }
  .side-card .stores { flex-direction: column; align-items: flex-start; gap: 12px; }
  .side-card .badge img { height: 44px; }
}

/* Footer: labelled groups; columns on wide screens; extra room only where the phone bar can appear. */
footer .groups { display: grid; gap: 22px; }
footer .fh { margin: 0 0 2px; color: var(--muted); font: 800 13px/1.3 "Nunito", system-ui, sans-serif; letter-spacing: .02em; }
footer .groups nav { margin: 0; }
@media (min-width: 900px) { footer .groups { grid-template-columns: 1.3fr 1fr 1.3fr; gap: 40px; } footer { padding-bottom: 56px; } }
footer .company { margin-top: 24px; font-size: 13px; }

/* Legal pages in the site layout: wide tables scroll inside their box on phones. */
.prose .table.wide table { min-width: 34rem; }
.prose h3[id] { scroll-margin-top: 16px; }

/* 404 */
.card .links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 20px; margin: 22px 0 0; }
.card .links a { color: var(--yellow); font-weight: 900; text-decoration: none; display: inline-block; padding: 10px 0; }
section > .wrap > .prose { padding: 0; }
@media (min-width: 900px) { footer .groups nav { flex-direction: column; align-items: flex-start; gap: 0; } footer .groups nav a, footer .groups nav button.link { padding: 6px 0; } }
/* Tables with 3+ columns become labelled rows on phones: nothing scrolls or gets cut off. */
@media (max-width: 600px) {
  .prose .table.stack { overflow: visible; }
  .prose .table.stack table, .prose .table.stack tbody, .prose .table.stack tr, .prose .table.stack td { display: block; width: 100%; min-width: 0; }
  .prose .table.stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .prose .table.stack tr { padding: 12px 0; border-bottom: 1px solid var(--surface-raised); }
  .prose .table.stack td { border: 0; padding: 3px 0; white-space: normal; }
  .prose .table.stack td:first-child { font-size: 17px; padding-bottom: 4px; }
  .prose .table.stack td:not(:first-child)::before { content: attr(data-label); display: block; color: var(--muted); font-size: 13px; font-weight: 800; }
}
