/* Cardlamp — „pod lampom“: ivory karton danju, ink uveče, pine čoja, mesingani okviri.
   Tipografija: Grenze (naslovi, kao stari bečki/panonski omoti špila) + Atkinson Hyperlegible Next (tekst i UI). */

/* ================= 1. TOKENI ================= */
:root {
  --ink: #1F1B16;
  --ivory: #F3EBDC;
  --pine: #1F4D3A;
  --brass: #B8893B;
  --brass-hi: #E3C27A;
  --card-paper: #FBF6EC;
  --card-line: #D6C8AE;

  --page: #F3EBDC;
  --page-tex: url("/assets/bg/paper_ivory.webp");
  --surface: #FBF6EC;
  --surface-2: #EEE3CE;
  --surface-3: #E4D6BC;
  --text: #1F1B16;
  --text-2: #5B5044;
  --line: #D9CCB3;
  --brass-text: #7A5719;
  --accent: #1F4D3A;
  --accent-hover: #296148;
  --on-accent: #FBF6EC;
  --red: #A6342B;
  --topbar-bg: rgba(243, 235, 220, 0.9);
  --shadow-1: 0 1px 2px rgba(31, 27, 22, 0.08), 0 8px 22px -12px rgba(31, 27, 22, 0.35);
  --shadow-2: 0 2px 6px rgba(31, 27, 22, 0.1), 0 24px 48px -20px rgba(31, 27, 22, 0.5);
  --focus-ring: 0 0 0 3px var(--page), 0 0 0 5px var(--accent);

  --font-display: "Grenze", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-text: "Atkinson Hyperlegible Next", "Atkinson Hyperlegible", "Segoe UI", system-ui, -apple-system, sans-serif;
  --wrap: 1240px;
  --wrap-wide: 1480px;
  --gutter: clamp(16px, 4vw, 40px);
  --topbar-h: 68px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
  --spd: 1;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --page: #1F1B16;
  --page-tex: url("/assets/bg/paper_ink.webp");
  --surface: #2A241D;
  --surface-2: #342C23;
  --surface-3: #403629;
  --text: #F3EBDC;
  --text-2: #C4B59C;
  --line: #4A3F31;
  --brass-text: #DDB86F;
  --accent: #2F6E52;
  --accent-hover: #388363;
  --on-accent: #FBF6EC;
  --red: #E57A6C;
  --topbar-bg: rgba(31, 27, 22, 0.88);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4), 0 10px 24px -12px rgba(0, 0, 0, 0.75);
  --shadow-2: 0 2px 6px rgba(0, 0, 0, 0.4), 0 28px 56px -20px rgba(0, 0, 0, 0.85);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --page: #1F1B16; --page-tex: url("/assets/bg/paper_ink.webp"); --surface: #2A241D; --surface-2: #342C23; --surface-3: #403629;
    --text: #F3EBDC; --text-2: #C4B59C; --line: #4A3F31; --brass-text: #DDB86F; --accent: #2F6E52; --accent-hover: #388363;
    --red: #E57A6C; --topbar-bg: rgba(31, 27, 22, 0.88); color-scheme: dark;
  }
}
:root[data-speed="fast"] { --spd: 0.6; }
:root[data-speed="slow"] { --spd: 1.6; }

/* ================= 2. OSNOVA ================= */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--topbar-h) + 16px); }
body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--page);
  background-image: var(--page-tex);
  background-size: 512px;
  color: var(--text);
  font-family: var(--font-text);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { max-width: 100%; }
img { height: auto; }
h1, h2, h3, h4 { margin: 0; line-height: 1.12; text-wrap: balance; }
h1, h2 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.005em; }
h3, h4 { font-weight: 700; }
p { margin: 0; text-wrap: pretty; }
a { color: var(--accent); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
:root[data-theme="dark"] a { color: var(--brass-text); }
a:hover { text-decoration-thickness: 2px; }
button { font: inherit; color: inherit; }
:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: fixed; top: 8px; left: 8px; z-index: 200; padding: 10px 16px; background: var(--accent); color: var(--on-accent) !important; border-radius: 8px; transform: translateY(-160%); transition: transform 0.2s; }
.skip:focus { transform: none; }
.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.main { display: block; }

/* tema: blagi prelaz kad view-transitions ne postoje */
html.theme-fade, html.theme-fade * { transition: background-color 0.5s var(--ease-io), color 0.5s var(--ease-io), border-color 0.5s var(--ease-io) !important; }
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-new(root) { z-index: 2; }

/* ================= 3. DUGMAD I SITNI DIJELOVI ================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px;
  border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface-2); color: var(--text);
  font-family: var(--font-text); font-weight: 700; font-size: 0.98rem; line-height: 1.1;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform 0.18s var(--ease), background-color 0.18s, box-shadow 0.18s, border-color 0.18s;
}
.btn:hover:not(:disabled) { transform: translateY(-1px); text-decoration: none; background: var(--surface-3); }
.btn:active:not(:disabled) { transform: translateY(0) scale(0.98); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary { background: var(--accent); color: var(--on-accent) !important; border-color: transparent; box-shadow: inset 0 0 0 1px rgba(227, 194, 122, 0.45), 0 6px 14px -8px rgba(20, 50, 36, 0.8); }
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); }
.btn-ghost { background: transparent; border: 1.5px solid currentColor; color: var(--text) !important; }
.btn-ghost:hover:not(:disabled) { background: color-mix(in srgb, var(--text) 8%, transparent); }
.btn-quiet { background: transparent; border-color: var(--line); color: var(--text) !important; }
.btn-quiet:hover:not(:disabled) { background: var(--surface-2); }
.btn-quiet-dark { background: rgba(255, 245, 225, 0.08); border-color: rgba(227, 194, 122, 0.55); color: #F6EEDF !important; }
.btn-quiet-dark:hover:not(:disabled) { background: rgba(255, 245, 225, 0.16); }
.btn-brass { background: linear-gradient(180deg, #E3C27A, #B8893B); color: #1F1B16 !important; border-color: #F0D79C; box-shadow: inset 0 1px 0 rgba(255, 248, 225, 0.55), 0 6px 14px -8px rgba(80, 50, 10, 0.8); }
.btn-brass:hover:not(:disabled) { filter: brightness(1.05); background: linear-gradient(180deg, #E8C985, #BE913F); }
.btn-light { background: var(--card-paper); color: #1F1B16 !important; border-color: var(--card-line); }
.btn-light:hover:not(:disabled) { background: #F3EAD6; }
.btn-danger { background: #9E2F27; color: #FFF7EE !important; border-color: #C24A40; }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: 0.9rem; border-radius: 8px; }
.btn-lg { min-height: 54px; padding: 0 28px; font-size: 1.06rem; border-radius: 12px; }
.btn-block { width: 100%; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 12px 0 0; }
.chips li { font-size: 0.86rem; font-weight: 600; padding: 3px 11px; border-radius: 999px; background: color-mix(in srgb, currentColor 9%, transparent); border: 1px solid color-mix(in srgb, currentColor 26%, transparent); }

.medallion {
  flex: none; display: grid; place-items: center;
  width: 92px; height: 92px; border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #FFF9EE, #EFE2C7 70%);
  box-shadow: 0 0 0 3px var(--brass), 0 0 0 7px rgba(31, 27, 22, 0.22), 0 14px 26px -10px rgba(0, 0, 0, 0.6);
}
.medallion img { width: 80%; height: auto; }
.medallion-sm { width: 72px; height: 72px; }

/* ================= 4. ZAGLAVLJE ================= */
.topbar {
  position: sticky; top: 0; z-index: 60;
  height: var(--topbar-h);
  background: var(--topbar-bg);
  -webkit-backdrop-filter: saturate(1.2) blur(10px);
  backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid color-mix(in srgb, var(--brass) 45%, transparent);
  transition: background-color 0.35s var(--ease-io), border-color 0.35s;
}
.topbar-in { height: 100%; max-width: calc(var(--wrap-wide) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); display: flex; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text) !important; text-decoration: none !important; }
.brand-lamp { width: 40px; height: 40px; filter: drop-shadow(0 4px 10px rgba(227, 180, 90, 0.45)); transition: filter 0.4s; }
.brand-word { font-family: var(--font-display); font-weight: 700; font-size: 1.7rem; letter-spacing: 0.005em; line-height: 1; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { position: relative; padding: 8px 12px; color: var(--text); font-weight: 600; font-size: 0.98rem; text-decoration: none; border-radius: 8px; }
.nav a::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 3px; height: 2px; background: var(--brass); transform: scaleX(0); transform-origin: left; transition: transform 0.3s var(--ease); }
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.lang-mini { display: flex; gap: 2px; margin-right: 6px; }
.lang-mini a { padding: 6px 7px; font-size: 0.8rem; font-weight: 700; color: var(--text-2); text-decoration: none; border-radius: 6px; letter-spacing: 0.04em; }
.lang-mini a:hover { color: var(--text); background: color-mix(in srgb, var(--text) 7%, transparent); }
.lang-mini a[aria-current="true"] { color: var(--text); box-shadow: inset 0 -2px 0 var(--brass); border-radius: 0; }
.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; border: 1px solid transparent; background: transparent; color: var(--text) !important; cursor: pointer; transition: background-color 0.2s, transform 0.2s var(--ease); }
.icon-btn:hover { background: color-mix(in srgb, var(--text) 8%, transparent); }
.icon-btn:active { transform: scale(0.94); }
.lamp-btn .ico-sun { display: none; }
:root[data-theme="dark"] .lamp-btn .ico-lamp { display: none; }
:root[data-theme="dark"] .lamp-btn .ico-sun { display: block; color: #E8C985; }
.lamp-btn .ico-lamp { color: var(--brass-text); }

/* početna: zaglavlje preko ilustracije dok se ne skroluje */
.main-home { margin-top: calc(-1 * var(--topbar-h)); }
[data-page="home"] .topbar:not(.scrolled) { background: transparent; border-color: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }

/* ================= 5. HERO ================= */
.hero { position: relative; isolation: isolate; }
.hero-art {
  position: relative; aspect-ratio: 16 / 9; width: 100%;
  background-color: #EDE2CC;
  background-image: url("/assets/bg/hero_day-1600.webp");
  background-size: cover; background-position: 50% 50%;
  overflow: hidden;
}
:root[data-theme="dark"] .hero-art { background-color: #1A1410; background-image: url("/assets/bg/hero_evening-1600.webp"); }
@media (max-width: 899px) {
  .hero-art { background-image: url("/assets/bg/hero_day-960.webp"); }
  :root[data-theme="dark"] .hero-art { background-image: url("/assets/bg/hero_evening-960.webp"); }
}
@media (min-width: 1700px) {
  .hero-art { background-image: url("/assets/bg/hero_day-2560.webp"); }
  :root[data-theme="dark"] .hero-art { background-image: url("/assets/bg/hero_evening-2560.webp"); }
}
.hero-art::before { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; }

/* karte koje leže na nacrtanom stolu */
.hero-fan {
  --fan-x: 61%; --fan-y: 60%;
  position: absolute; left: var(--fan-x); top: var(--fan-y);
  width: 9.4%; aspect-ratio: 5 / 7;
  translate: -50% -50%;
  transform: perspective(900px) rotateX(44deg);
  transform-style: preserve-3d;
  z-index: 1;
}
:root[data-theme="dark"] .hero-fan { --fan-x: 57%; --fan-y: 57%; }
.hf-card {
  position: absolute; inset: 0;
  rotate: calc((var(--i) - 2) * 11deg);
  transform-origin: 50% 135%;
  transition: rotate calc(0.55s * var(--spd)) var(--ease), translate calc(0.55s * var(--spd)) var(--ease);
  filter: drop-shadow(0 10px 8px rgba(20, 12, 6, 0.45));
}
.hf-card svg { width: 100%; height: auto; display: block; border-radius: 7%; }
.hero-fan:hover .hf-card { rotate: calc((var(--i) - 2) * 17deg); }
.hero-fan .hf-card:hover { translate: 0 -10%; }
.hero-fan.deal .hf-card { animation: heroDeal calc(0.9s * var(--spd)) var(--ease) backwards; animation-delay: calc(var(--i) * 120ms * var(--spd) + 250ms); }
@keyframes heroDeal {
  0% { translate: 260% -420%; rotate: 160deg; opacity: 0; }
  30% { opacity: 1; }
}

.hero-copy { position: relative; z-index: 2; padding-top: 28px; padding-bottom: 40px; }
.hero-title { font-size: clamp(2.6rem, 9vw, 3.4rem); font-weight: 600; line-height: 0.98; letter-spacing: -0.01em; max-width: 13ch; }
.hero-lead { margin-top: 20px; font-size: 1.13rem; max-width: 34rem; color: var(--text-2); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-continue { margin-top: 18px; font-weight: 600; }
.hero-continue a { font-weight: 700; }
.hero-note { margin-top: 16px; font-size: 0.92rem; color: var(--text-2); }

@media (min-width: 900px) {
  .hero { min-height: min(100vh, 56.25vw); display: flex; align-items: center; }
  .hero-art { position: absolute; inset: 0; aspect-ratio: auto; }
  .hero-art::before { background: linear-gradient(90deg, rgba(243, 235, 220, 0.94) 0%, rgba(243, 235, 220, 0.78) 26%, rgba(243, 235, 220, 0) 46%); }
  :root[data-theme="dark"] .hero-art::before { background: linear-gradient(90deg, rgba(18, 13, 9, 0.82) 0%, rgba(18, 13, 9, 0.55) 28%, rgba(18, 13, 9, 0) 46%); }
  .hero-copy { max-width: calc(var(--wrap-wide) + 2 * var(--gutter)); padding-top: calc(var(--topbar-h) + 24px); padding-bottom: 56px; }
  .hero-text { max-width: min(34rem, 40vw); }
  .hero-title { font-size: clamp(3.2rem, 5.4vw, 5.6rem); }
  .hero-lead { color: var(--text); opacity: 0.86; }
}
@media (max-width: 899px) {
  .main-home { margin-top: 0; }
  [data-page="home"] .topbar:not(.scrolled) { background: var(--topbar-bg); border-color: color-mix(in srgb, var(--brass) 45%, transparent); }
  .hero-fan { width: 12%; }
}

/* ================= 6. SEKCIJE POČETNE ================= */
.sec-head { display: grid; gap: 8px; margin-bottom: 36px; max-width: 46rem; }
.sec-head h2 { font-size: clamp(2.1rem, 4vw, 3.1rem); }
.sec-head p { color: var(--text-2); font-size: 1.1rem; }
.shelf { padding: clamp(64px, 8vw, 112px) 0 clamp(56px, 7vw, 96px); }

.covers { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(18px, 2.4vw, 32px); }
.cover {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border-radius: 18px;
  box-shadow: var(--shadow-1); border: 1px solid var(--line);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.cover:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); }
.cover-link { display: flex; flex-direction: column; flex: 1; color: inherit !important; text-decoration: none !important; border-radius: 18px; }
.cover-felt {
  position: relative; display: grid; place-items: center; overflow: hidden;
  aspect-ratio: 16 / 10; border-radius: 17px 17px 0 0;
  background-color: var(--felt, #1F4D3A); background-image: radial-gradient(ellipse 70% 60% at 50% 30%, rgba(255, 226, 160, 0.28), transparent 70%), radial-gradient(ellipse at 50% 50%, transparent 40%, rgba(0, 0, 0, 0.45)), var(--felt-tex, url("/assets/bg/felt_pine.webp"));
  background-size: auto, auto, 420px;
  box-shadow: inset 0 0 0 6px rgba(0, 0, 0, 0.16), inset 0 0 0 7.5px rgba(227, 194, 122, 0.6);
}
.cover-art { position: relative; z-index: 2; width: 44%; filter: drop-shadow(0 14px 16px rgba(0, 0, 0, 0.45)); transition: transform 0.5s var(--ease); }
.cover:hover .cover-art { transform: translateY(-6px) scale(1.04); }
.cover-peek { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.cover-peek img { position: absolute; left: 50%; bottom: -62%; width: 21%; border-radius: 6%; box-shadow: 0 8px 18px rgba(0, 0, 0, 0.5); outline: 3px solid #FBF6EC; transition: bottom 0.55s var(--ease), rotate 0.55s var(--ease); }
.cover-peek img:first-child { translate: -96% 0; rotate: -12deg; }
.cover-peek img:last-child { translate: -4% 0; rotate: 10deg; }
.cover:hover .cover-peek img { bottom: 8%; }
.cover:hover .cover-peek img:first-child { rotate: -20deg; }
.cover:hover .cover-peek img:last-child { rotate: 18deg; }
.cover-label { display: grid; gap: 6px; padding: 20px 22px 70px; }
.cover-name { font-family: var(--font-display); font-weight: 600; font-size: 2rem; line-height: 1; }
.cover-pitch { color: var(--text-2); }
.cover-meta { font-size: 0.9rem; font-weight: 700; color: var(--brass-text); }
.cover-actions { position: absolute; left: 22px; right: 22px; bottom: 20px; display: flex; gap: 8px; }

/* trake sa ilustracijama */
.band { position: relative; isolation: isolate; display: flex; align-items: center; min-height: clamp(440px, 40vw, 640px); padding: 56px 0; overflow: hidden; background: #2B2119; }
.band-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 70% 50%; z-index: -1; }
.band-in { width: 100%; }
.note {
  position: relative; max-width: 32rem; padding: 34px 34px 32px;
  background: var(--surface); color: var(--text);
  border-radius: 6px; box-shadow: var(--shadow-2);
}
.note::before { content: ""; position: absolute; inset: 9px; border: 1px solid color-mix(in srgb, var(--brass) 70%, transparent); border-radius: 3px; pointer-events: none; }
.note h2 { font-size: clamp(1.9rem, 3vw, 2.5rem); margin-bottom: 14px; }
.note p { color: var(--text-2); }
.note .btn { margin-top: 22px; }
.note-ic { position: absolute; top: -30px; right: 26px; width: 72px; height: 72px; filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.35)); }
.note-meta { margin-top: 12px; font-weight: 700; color: var(--brass-text) !important; font-variant-numeric: tabular-nums; }
.note-meta:empty { display: none; }
.note-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.note-actions .btn { margin-top: 22px; }
.steps { list-style: none; counter-reset: st; padding: 0; margin: 6px 0 0; display: grid; gap: 14px; }
.steps li { counter-increment: st; position: relative; padding-left: 52px; min-height: 38px; color: var(--text-2); }
.steps li::before { content: counter(st); position: absolute; left: 0; top: -2px; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; color: #1F1B16; background: radial-gradient(circle at 35% 30%, #F1D58E, #B8893B 75%); box-shadow: inset 0 0 0 1.5px rgba(80, 50, 10, 0.35); }
.rule-links { list-style: none; padding: 0; margin: 20px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.rule-links a { display: inline-block; padding: 6px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--page); color: var(--text) !important; font-weight: 600; font-size: 0.95rem; text-decoration: none; }
.rule-links a:hover { border-color: var(--brass); }

/* katalog */
.catalog { padding: clamp(64px, 8vw, 110px) 0; }
.cat-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.cat-head h2 { font-size: clamp(2.3rem, 4.4vw, 3.4rem); display: flex; align-items: baseline; gap: 14px; }
.cat-count { font-family: var(--font-text); font-size: 1rem; font-weight: 700; color: var(--brass-text); font-variant-numeric: tabular-nums; }
.search { display: flex; align-items: center; gap: 10px; width: min(100%, 440px); min-height: 54px; padding: 0 18px; border-radius: 999px; background: var(--surface); border: 1.5px solid var(--line); color: var(--text-2); box-shadow: var(--shadow-1); transition: border-color 0.2s, box-shadow 0.2s; }
.search:focus-within { border-color: var(--accent); box-shadow: var(--focus-ring); }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; font-size: 1.05rem; }
.search input::placeholder { color: var(--text-2); opacity: 0.75; }
.cat-jump { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0 0; }
.cat-jump a { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 8px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text) !important; font-weight: 600; font-size: 0.95rem; text-decoration: none; transition: border-color 0.2s, transform 0.2s var(--ease); }
.cat-jump a:hover { border-color: var(--brass); transform: translateY(-1px); }
.cat-jump img { width: 28px; height: 28px; }
.catalog.searching .cat-jump { display: none; }
.cat-empty { margin-top: 40px; font-size: 1.1rem; color: var(--text-2); }
.cat-sec { margin-top: 64px; scroll-margin-top: calc(var(--topbar-h) + 12px); }
.cat-sec[hidden] { display: none; }
.cat-sec-head { display: flex; align-items: center; gap: 16px; padding-bottom: 16px; margin-bottom: 28px; border-bottom: 1px solid var(--line); }
.cat-sec-head img { width: 64px; height: 64px; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.2)); }
.cat-sec-head h3 { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.7rem, 2.6vw, 2.2rem); display: flex; align-items: baseline; gap: 10px; }
.cat-n { font-family: var(--font-text); font-size: 0.95rem; font-weight: 700; color: var(--brass-text); }
.cat-sec-head p { color: var(--text-2); margin-top: 4px; }

/* pločice igara: svaka je karta */
.tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(156px, 1fr)); gap: 34px 22px; }
.tile[hidden] { display: none; }
.tile-link { display: flex; flex-direction: column; gap: 3px; color: var(--text) !important; text-decoration: none !important; border-radius: 12px; }
.tile-link:focus-visible { box-shadow: none; }
.tile-link:focus-visible .tile-card { box-shadow: var(--focus-ring); }
.tile-card {
  --rx: 0deg; --ry: 0deg; --lift: 0px;
  position: relative; display: block; aspect-ratio: 5 / 7;
  border-radius: 11px; background: var(--card-paper);
  border: 1px solid var(--card-line);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset, 0 12px 22px -14px rgba(31, 27, 22, 0.6), 0 2px 4px rgba(31, 27, 22, 0.08);
  transform: perspective(800px) rotateX(var(--rx)) rotateY(var(--ry)) translateY(var(--lift));
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease);
  will-change: transform;
}
.tile-card::before { content: ""; position: absolute; inset: 7px; border: 1px solid rgba(184, 137, 59, 0.75); border-radius: 7px; pointer-events: none; }
.tile-link:hover .tile-card, .tile-link:focus-visible .tile-card { --lift: -6px; box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset, 0 26px 34px -18px rgba(31, 27, 22, 0.7), 0 2px 4px rgba(31, 27, 22, 0.1); }
:root[data-theme="dark"] .tile-card { box-shadow: 0 14px 26px -12px rgba(0, 0, 0, 0.9); }
.tile-oval {
  position: absolute; inset: 19% 13% 19%; border-radius: 50%;
  display: grid; place-items: center;
  background-color: var(--felt, #1F4D3A);
  background-image: radial-gradient(ellipse at 50% 35%, rgba(255, 226, 160, 0.3), transparent 65%), var(--felt-tex, url("/assets/bg/felt_pine.webp"));
  background-size: auto, 300px;
  box-shadow: inset 0 0 0 2px rgba(184, 137, 59, 0.8), inset 0 6px 16px rgba(0, 0, 0, 0.45);
}
.tile-art { width: 92%; height: auto; filter: drop-shadow(0 6px 6px rgba(0, 0, 0, 0.4)); transition: transform 0.45s var(--ease); }
.tile-link:hover .tile-art { transform: scale(1.06) translateY(-3px); }
.tile-idx { position: absolute; top: 11px; left: 12px; display: flex; flex-direction: column; align-items: center; color: #1F1B16; line-height: 0.95; font-family: var(--font-display); }
.tile-idx b { font-weight: 700; font-size: 1.02rem; letter-spacing: -0.02em; }
.tile-idx i { font-style: normal; font-size: 0.92rem; }
.tile-idx.red { color: #A6342B; }
.tile-idx-b { top: auto; left: auto; bottom: 11px; right: 12px; rotate: 180deg; }
.tile-flag { position: absolute; left: 50%; bottom: 7.5%; translate: -50% 0; padding: 1px 9px; border-radius: 999px; background: #1F1B16; color: #EED39A; font-size: 0.72rem; font-weight: 700; white-space: nowrap; }
.tile-flag-daily { background: #1F4D3A; color: #F6EEDF; }
.tile-name { margin-top: 12px; font-weight: 700; font-size: 1.03rem; line-height: 1.25; }
.tile-meta { font-size: 0.86rem; font-weight: 600; color: var(--brass-text); }
.tile-desc { font-size: 0.86rem; line-height: 1.42; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tiles-sm { grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 24px 18px; }
.tiles-sm .tile-name { font-size: 0.96rem; }

/* čoje (zajedničko za pločice, naslovnice i zaglavlja igara) */
[data-felt="pine"] { --felt: #1F4D3A; --felt-tex: url("/assets/bg/felt_pine.webp"); }
[data-felt="navy"] { --felt: #1E3352; --felt-tex: url("/assets/bg/felt_navy.webp"); }
[data-felt="wine"] { --felt: #561F2C; --felt-tex: url("/assets/bg/felt_wine.webp"); }
[data-felt="walnut"] { --felt: #553A26; --felt-tex: url("/assets/bg/felt_walnut.webp"); }
[data-felt="slate"] { --felt: #333C48; --felt-tex: url("/assets/bg/felt_slate.webp"); }

/* aplikacija */
.app-sec { padding: clamp(64px, 8vw, 112px) 0; }
.app-in { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.app-art { margin: 0; border-radius: 16px; overflow: hidden; box-shadow: var(--shadow-2); border: 1px solid var(--line); outline: 6px solid var(--surface); }
.app-img { display: block; width: 100%; height: auto; }
.app-copy h2 { font-size: clamp(2.1rem, 4vw, 3rem); margin-bottom: 16px; }
.app-copy p { color: var(--text-2); font-size: 1.08rem; max-width: 32rem; }
.app-copy .btn { margin-top: 24px; }
.app-manual { margin-top: 18px; font-size: 0.95rem; }

/* ================= 7. PODNOŽJE ================= */
.foot { margin-top: 0; background: #1F1B16 var(--page-tex); background-image: url("/assets/bg/paper_ink.webp"); background-size: 512px; color: #E9DFCC; border-top: 3px solid var(--brass); }
.foot-in { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 40px; padding-top: 64px; padding-bottom: 40px; }
.foot .brand { color: #F3EBDC !important; }
.foot-tag { margin-top: 14px; font-family: var(--font-display); font-size: 1.45rem; color: #F3EBDC; line-height: 1.15; }
.foot-note { margin-top: 12px; color: #BDAF96; font-size: 0.95rem; max-width: 26rem; }
.foot-col h2 { font-family: var(--font-text); font-size: 0.95rem; font-weight: 700; color: #DDB86F; margin-bottom: 12px; }
.foot-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.foot-col a { color: #E9DFCC !important; text-decoration: none; }
.foot-col a:hover { text-decoration: underline; }
.foot-col a[aria-current="true"] { color: #DDB86F !important; font-weight: 700; }
.foot-base { display: flex; justify-content: space-between; gap: 16px; padding-top: 18px; padding-bottom: 28px; border-top: 1px solid rgba(221, 184, 111, 0.22); color: #9E907A; font-size: 0.88rem; }

/* ================= 8. STRANICA IGRE ================= */
.game-head {
  position: relative; color: #F6EEDF; padding: 18px 0 64px;
  background-color: var(--felt, #1F4D3A);
  background-image: radial-gradient(ellipse 60% 120% at 20% 0%, rgba(255, 226, 160, 0.22), transparent 60%), linear-gradient(180deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.42)), var(--felt-tex, url("/assets/bg/felt_pine.webp"));
  background-size: auto, auto, 512px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.3);
}
.game-head a { color: #F3DDA6; }
.crumbs ol { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; font-size: 0.92rem; }
.crumbs li { display: inline-flex; align-items: center; gap: 6px; }
.crumbs li + li::before { content: "/"; opacity: 0.55; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.crumbs [aria-current] { opacity: 0.85; }
.game-title { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 22px; }
.game-title h1 { font-size: clamp(2.3rem, 4.6vw, 3.6rem); color: #FBF6EC; }
.game-lead { margin-top: 8px; max-width: 62ch; color: rgba(246, 238, 223, 0.88); }
.game-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.wrap-table { max-width: calc(var(--wrap-wide) + 2 * var(--gutter)); margin-top: -40px; position: relative; z-index: 2; }
.game-info { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 56px); padding-top: clamp(48px, 6vw, 80px); padding-bottom: clamp(56px, 7vw, 96px); align-items: start; }
.game-info > .faq, .game-info > .related { grid-column: 1 / -1; }
.game-info h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); margin-bottom: 18px; }
.howto-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.howto-head h2 { margin: 0; }
.facts { position: sticky; top: calc(var(--topbar-h) + 20px); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 24px; box-shadow: var(--shadow-1); }
.facts h2 { font-size: 1.7rem; margin-bottom: 10px; }
.facts > p { color: var(--text-2); }
.rules-table { width: 100%; border-collapse: collapse; margin: 6px 0 4px; font-size: 0.98rem; }
.rules-table th, .rules-table td { text-align: left; padding: 10px 6px; border-bottom: 1px dashed var(--line); vertical-align: top; }
.rules-table thead th { font-size: 0.86rem; font-weight: 700; color: var(--brass-text); border-bottom: 1.5px solid var(--brass); }
.rules-table tbody th { font-weight: 600; }
.rules-table td { font-weight: 700; font-variant-numeric: tabular-nums; }
.rules-table tr:last-child th, .rules-table tr:last-child td { border-bottom: 0; }
.fair-line { display: flex; gap: 12px; align-items: flex-start; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 0.95rem; color: var(--text-2); }
.fair-line img { width: 36px; height: 36px; flex: none; }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 0; font-weight: 700; font-size: 1.08rem; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: ""; flex: none; width: 12px; height: 12px; border-right: 2px solid var(--brass-text); border-bottom: 2px solid var(--brass-text); rotate: 45deg; translate: 0 -3px; transition: rotate 0.3s var(--ease); }
.faq-item[open] summary::after { rotate: 225deg; translate: 0 3px; }
.faq-item p { padding: 0 0 20px; color: var(--text-2); max-width: 70ch; }

/* podstranice sa trakom (pravila, dnevna, pravednost) */
.page-band { position: relative; isolation: isolate; overflow: hidden; padding: 22px 0 72px; min-height: clamp(380px, 36vw, 560px); background: #E8DCC4; }
.page-band.band-dark { background: #1A1410; color: #F3EBDC; }
.page-band-short { min-height: clamp(320px, 30vw, 460px); }
.page-band-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 75% 50%; z-index: -1; }
.page-band .crumbs a { color: inherit; }
.band-dark-text .crumbs { color: #1F1B16; }
.page-band.band-dark .crumbs { color: #F3EBDC; }
.page-band-note { position: relative; max-width: 36rem; margin-top: 10px; padding: 30px 32px; background: var(--surface); color: var(--text); border-radius: 6px; box-shadow: var(--shadow-2); }
.page-band-note::before { content: ""; position: absolute; inset: 9px; border: 1px solid color-mix(in srgb, var(--brass) 70%, transparent); border-radius: 3px; pointer-events: none; }
.page-band-note .medallion { position: absolute; top: -26px; right: 26px; }
.page-band-note h1 { font-size: clamp(2.2rem, 4.4vw, 3.3rem); padding-right: 70px; }
.page-lead { margin-top: 12px; color: var(--text-2); }
.page-band-note .btn { margin-top: 22px; }
.page-band-note .steps { margin-top: 20px; }
.page-head { padding: 28px 0 36px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 55%, transparent); }
.page-head-title { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.page-head-title > div { flex: 1 1 22rem; }
.page-head h1 { font-size: clamp(2.3rem, 4.6vw, 3.4rem); }
.blok-wrap { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 48px); padding-top: 40px; padding-bottom: 80px; align-items: start; }
.settings-page { padding-top: 32px; padding-bottom: 80px; max-width: calc(880px + 2 * var(--gutter)); }

/* ================= 9. STO ZA IGRU ================= */
.table-shell {
  --felt: #1F4D3A; --felt-tex: url("/assets/bg/felt_pine.webp");
  position: relative; width: 100%;
  border-radius: 30px; padding: 14px;
  background: radial-gradient(ellipse 80% 60% at 30% 0%, rgba(255, 210, 150, 0.18), transparent 60%), linear-gradient(150deg, #74472A 0%, #4A2C19 45%, #2E1B0F 100%);
  box-shadow: inset 0 1px 0 rgba(255, 222, 170, 0.35), inset 0 -2px 0 rgba(0, 0, 0, 0.45), 0 34px 70px -30px rgba(20, 12, 6, 0.85), 0 10px 22px -10px rgba(20, 12, 6, 0.6);
  color: #FBF6EC;
}
.table-shell::before { content: ""; position: absolute; inset: 7px; border-radius: 24px; border: 1.5px solid rgba(227, 194, 122, 0.7); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35); pointer-events: none; }
.desktop-arena { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 14px; align-items: stretch; min-height: 660px; }
.play-mat {
  position: relative; display: flex; flex-direction: column; justify-content: space-between;
  min-height: 640px; padding: 18px 22px 22px; border-radius: 20px; overflow: hidden;
  background-color: var(--felt);
  background-image: radial-gradient(ellipse 55% 42% at 50% 34%, rgba(255, 228, 165, 0.22), transparent 72%), radial-gradient(ellipse at 50% 50%, transparent 42%, rgba(0, 0, 0, 0.5) 100%), var(--felt-tex);
  background-size: auto, auto, 512px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.45), inset 0 3px 8px rgba(0, 0, 0, 0.45), inset 0 0 80px rgba(0, 0, 0, 0.38);
}
.play-mat > * { position: relative; z-index: 1; }
.play-mat .fx-layer { position: absolute; inset: 0; z-index: 30; pointer-events: none; overflow: hidden; }

.avatar-medallion { display: inline-flex; flex: none; border-radius: 50%; overflow: hidden; background: #FBF6EC; box-shadow: 0 0 0 2px #C99B47, 0 4px 10px rgba(0, 0, 0, 0.45); }
.avatar-medallion img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mat-top-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; min-height: 72px; }
.seat-plate { display: inline-flex; align-items: center; gap: 10px; padding: 5px 16px 5px 5px; border-radius: 999px; background: rgba(14, 10, 7, 0.42); border: 1px solid rgba(227, 194, 122, 0.32); font-size: 0.92rem; font-weight: 700; color: #FBF6EC; transition: background-color 0.3s, border-color 0.3s; }
.seat-plate.active-turn { border-color: #E7C274; background: rgba(184, 137, 59, 0.26); }
.seat-plate.active-turn .avatar-medallion { animation: seatPulse calc(1.6s * var(--spd)) ease-out infinite; }
@keyframes seatPulse {
  0% { box-shadow: 0 0 0 2px #E7C274, 0 0 0 0 rgba(240, 204, 116, 0.7); }
  100% { box-shadow: 0 0 0 2px #E7C274, 0 0 0 14px rgba(240, 204, 116, 0); }
}
.opp-fan { display: flex; align-items: center; padding-left: 4px; }
.opp-fan .mini-back { margin-left: -26px; filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.45)); }
.opp-fan .mini-back:first-child { margin-left: 0; }
.opp-fan .mini-back .card-svg { box-shadow: none; }
.mat-center { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 12px 0; }
.arena-h-row { display: flex; align-items: center; justify-content: center; gap: 26px; width: 100%; flex-wrap: wrap; }
.table-zone { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; min-height: 154px; min-width: min(100%, 320px); max-width: 100%; padding: 14px 20px; border-radius: 18px; background: rgba(0, 0, 0, 0.13); box-shadow: inset 0 0 0 1px rgba(227, 194, 122, 0.22), inset 0 2px 14px rgba(0, 0, 0, 0.25); }
.table-zone > span { color: rgba(251, 246, 236, 0.72); font-weight: 600; }
.trick-seat { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 0.8rem; font-weight: 700; color: #EBDDBE; }
.deck-stack, .captured-pile { display: inline-flex; flex-direction: column; align-items: center; gap: 6px; position: relative; }
.deck-layers { position: relative; }
.deck-layer { position: absolute; inset: 0; pointer-events: none; }
.deck-count-pill { position: absolute; right: -9px; bottom: -7px; z-index: 5; min-width: 28px; text-align: center; padding: 2px 8px; border-radius: 999px; background: #1F1B16; color: #F2D898; border: 1.5px solid #C99B47; font-size: 0.8rem; font-weight: 800; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.45); font-variant-numeric: tabular-nums; }
.stack-caption { font-size: 0.82rem; font-weight: 700; color: rgba(251, 246, 236, 0.82); }
.status-banner { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 7px 20px; border-radius: 10px; text-align: center; background: linear-gradient(180deg, #2E251C, #1F1913); border: 1px solid rgba(227, 194, 122, 0.6); box-shadow: inset 0 1px 0 rgba(255, 230, 180, 0.14), 0 8px 16px -8px rgba(0, 0, 0, 0.7); color: #F6E7C4; font-weight: 700; font-size: 0.98rem; }
.status-banner.win { background: linear-gradient(180deg, #EBCB83, #BC8F40); color: #1F1B16; border-color: #F4DC9B; animation: plaquePop calc(0.6s * var(--spd)) var(--ease); }
@keyframes plaquePop { 0% { transform: scale(0.85); } 60% { transform: scale(1.06); } 100% { transform: scale(1); } }
.status-banner .coach { font-weight: 500; opacity: 0.85; }
.action-row { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; }
.mat-hand-wrap { display: flex; flex-direction: column; align-items: center; padding-top: 6px; }
.hand-row { --ov: 6px; display: flex; flex-wrap: nowrap; justify-content: center; align-items: flex-end; min-height: 150px; width: 100%; padding: 26px 6px 4px; }
.hand-row > .card-btn + .card-btn { margin-left: var(--ov); }
.hand-row.wrap-rows { flex-wrap: wrap; row-gap: 10px; }
.hand-row.wrap-rows > .card-btn + .card-btn { margin-left: 6px; }

.card-btn { position: relative; padding: 0; border: 0; background: none; cursor: pointer; border-radius: 9px; transform-origin: 50% 130%; rotate: var(--rot, 0deg); translate: 0 var(--lift, 0px); transition: translate calc(0.22s * var(--spd)) var(--ease), rotate calc(0.3s * var(--spd)) var(--ease), scale calc(0.22s * var(--spd)) var(--ease), opacity 0.2s, filter 0.2s; }
.card-btn:hover:not(:disabled) { translate: 0 calc(var(--lift, 0px) - 12px); z-index: 10; filter: drop-shadow(0 14px 16px rgba(0, 0, 0, 0.45)); }
.card-btn.selected { translate: 0 calc(var(--lift, 0px) - 22px); scale: 1.04; z-index: 12; filter: drop-shadow(0 16px 20px rgba(227, 194, 122, 0.55)); }
.card-btn.selected::after { content: ""; position: absolute; inset: -4px; border-radius: 12px; border: 2.5px solid #F0CC74; box-shadow: 0 0 18px rgba(240, 204, 116, 0.6); pointer-events: none; }
.card-btn.hinted { translate: 0 calc(var(--lift, 0px) - 14px); z-index: 11; filter: drop-shadow(0 0 14px rgba(240, 204, 116, 0.95)); animation: hintBob calc(1.4s * var(--spd)) ease-in-out infinite; }
@keyframes hintBob { 50% { translate: 0 calc(var(--lift, 0px) - 20px); } }
.card-btn.dimmed { opacity: 0.45; filter: saturate(0.7) brightness(0.9); }
.card-btn:disabled { cursor: default; }
.card-btn:focus-visible { box-shadow: 0 0 0 3px #F0CC74; }
.card-svg { display: block; border-radius: 8px; box-shadow: 0 6px 14px rgba(0, 0, 0, 0.36); }
.card-enter { animation: cardSettle calc(0.32s * var(--spd)) var(--ease); }
@keyframes cardSettle { 0% { transform: translateY(-14px) scale(0.94); opacity: 0.3; } 100% { transform: none; opacity: 1; } }
.flying-card-ghost { position: fixed; z-index: 9999; pointer-events: none; will-change: transform, opacity; filter: drop-shadow(0 18px 24px rgba(0, 0, 0, 0.5)); }
.flying-card-ghost .card-svg { width: 100%; height: auto; }

/* bočna ploča stola */
.desk-sidebar { display: flex; flex-direction: column; gap: 12px; padding: 14px; border-radius: 20px; background: linear-gradient(180deg, rgba(30, 21, 14, 0.85), rgba(22, 15, 10, 0.92)); box-shadow: inset 0 0 0 1px rgba(227, 194, 122, 0.25); color: #F3EBDC; }
.side-card { padding: 12px; border-radius: 12px; background: rgba(255, 240, 210, 0.045); border: 1px solid rgba(255, 240, 210, 0.09); }
.side-title { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin: 0 0 10px; font-size: 0.86rem; font-weight: 700; color: #DDB86F; }
.side-title span:last-child { font-weight: 600; color: rgba(243, 235, 220, 0.55); font-size: 0.78rem; }
.score-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; border-radius: 6px; overflow: hidden; background: #F6EEDC repeating-linear-gradient(180deg, transparent 0 25px, rgba(31, 77, 58, 0.14) 25px 26px); color: #1F1B16; box-shadow: 0 6px 14px -6px rgba(0, 0, 0, 0.6); }
.score-tile { display: flex; flex-direction: column; padding: 8px 12px 10px; min-width: 0; }
.score-tile + .score-tile { border-left: 1.5px solid rgba(166, 52, 43, 0.45); }
.score-tile:nth-child(3) { border-left: 0; border-top: 1px solid rgba(31, 27, 22, 0.15); }
.score-tile:nth-child(4) { border-top: 1px solid rgba(31, 27, 22, 0.15); }
.s-lbl { font-size: 0.8rem; font-weight: 700; color: #5B5044; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.s-val { font-family: var(--font-display); font-weight: 700; font-size: 1.85rem; line-height: 1.05; font-variant-numeric: tabular-nums; }
.s-sub { font-size: 0.76rem; color: #7A5719; font-weight: 600; }
.s-val.bump { animation: scoreBump calc(0.5s * var(--spd)) var(--ease); }
@keyframes scoreBump { 40% { transform: scale(1.18); color: #1F4D3A; } }
.side-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.table-shell .btn { min-height: 40px; padding: 0 14px; font-size: 0.92rem; background: rgba(255, 245, 225, 0.08); border-color: rgba(255, 245, 225, 0.2); color: #FBF6EC; }
.table-shell .btn:hover:not(:disabled) { background: rgba(255, 245, 225, 0.16); }
.table-shell .btn-primary { background: #2F6E52; border-color: rgba(227, 194, 122, 0.4); color: #FBF6EC !important; }
.table-shell .btn-primary:hover:not(:disabled) { background: #388363; }
.table-shell .btn-brass { background: linear-gradient(180deg, #E3C27A, #B8893B); color: #1F1B16 !important; border-color: #F0D79C; }
.table-shell .btn-light { background: #FBF6EC; color: #1F1B16 !important; border-color: #D6C8AE; }
.table-shell .btn-danger { background: #9E2F27; border-color: #C24A40; }
.table-shell .btn-sm { min-height: 34px; font-size: 0.86rem; padding: 0 12px; }
.ctrl-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.ctrl-row:last-child { margin-bottom: 0; }
.ctrl-row label { font-size: 0.88rem; font-weight: 600; color: #D7CBB3; }
.ctrl { min-height: 34px; padding: 4px 10px; border-radius: 8px; border: 1px solid rgba(255, 245, 225, 0.22); background: rgba(0, 0, 0, 0.35); color: #FBF6EC; font: inherit; font-size: 0.88rem; font-weight: 600; }
.ctrl option { color: #1F1B16; background: #FBF6EC; }
.fair-box { padding: 12px; border-radius: 12px; background: rgba(184, 137, 59, 0.1); border: 1px solid rgba(227, 194, 122, 0.35); font-size: 0.86rem; }
.fair-code { display: inline-block; margin: 2px 0 8px; font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 1rem; font-weight: 800; letter-spacing: 0.06em; color: #F2D898; }
.fair-note { margin: 0 0 10px; color: #CFC3AA; font-size: 0.82rem; line-height: 1.45; }
.kbd-grid { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 0.8rem; color: #C9BDA5; }
.kbd { display: inline-flex; align-items: center; gap: 5px; }
.kbd kbd { padding: 1px 6px; border-radius: 5px; background: rgba(255, 245, 225, 0.12); border: 1px solid rgba(255, 245, 225, 0.22); font-family: ui-monospace, monospace; font-size: 0.76rem; color: #FFF; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; font-size: 0.84rem; font-weight: 700; background: rgba(14, 10, 7, 0.4); border: 1px solid rgba(227, 194, 122, 0.3); color: #FBF6EC; }
.badge-brass { background: linear-gradient(180deg, #E3C27A, #B8893B); color: #1F1B16; border-color: #F0D79C; }
.badge-warn { background: #9E2F27; border-color: #C24A40; color: #FFF; }
.mp-box { padding: 10px; border-radius: 10px; background: rgba(0, 0, 0, 0.28); border: 1px solid rgba(255, 245, 225, 0.12); font-size: 0.86rem; }
.mp-row { display: flex; gap: 6px; }
.mp-input { flex: 1; min-width: 0; min-height: 34px; padding: 4px 8px; border-radius: 8px; border: 1px solid rgba(255, 245, 225, 0.25); background: rgba(0, 0, 0, 0.4); color: #FFF; font-family: ui-monospace, monospace; font-weight: 700; text-transform: uppercase; }

/* pasijansi i table */
.sol-top { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.sol-group { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.sol-cols { display: grid; gap: 8px; align-items: start; width: 100%; }
.sol-col { position: relative; min-height: 220px; display: flex; flex-direction: column; align-items: center; }
.sol-card-abs { position: absolute; left: 50%; translate: -50% 0; }
.sol-card-abs:hover:not(:disabled) { translate: -50% -6px; }
.sol-card-abs.selected { translate: -50% -8px; z-index: 30; }
.sol-card-abs.hinted { translate: -50% -8px; animation: none; }
.empty-slot { width: 78px; height: 109px; border-radius: 9px; border: 2px dashed rgba(251, 246, 236, 0.3); background: rgba(0, 0, 0, 0.14); display: flex; align-items: center; justify-content: center; color: rgba(251, 246, 236, 0.6); font-weight: 800; font-size: 1.05rem; cursor: pointer; }
.empty-slot:hover { border-color: #E3C27A; background: rgba(184, 137, 59, 0.14); }
.grid-board { display: grid; gap: 8px; padding: 12px; border-radius: 16px; background: rgba(0, 0, 0, 0.22); box-shadow: inset 0 0 0 1px rgba(227, 194, 122, 0.3); }
.grid-cell { position: relative; min-width: 74px; min-height: 104px; padding: 2px; border-radius: 10px; border: 1.5px dashed rgba(251, 246, 236, 0.25); background: rgba(255, 255, 255, 0.04); display: flex; align-items: center; justify-content: center; cursor: pointer; color: #FBF6EC; transition: border-color 0.15s, background 0.15s, transform 0.15s; }
.grid-cell:hover:not(:disabled) { border-color: #E3C27A; background: rgba(184, 137, 59, 0.14); transform: translateY(-2px); }
.grid-cell.legal-cell { border-style: solid; border-color: #F0CC74; box-shadow: 0 0 12px rgba(240, 204, 116, 0.35); }
.grid-cell.owner-0 { box-shadow: inset 0 0 0 3px #7FC49A; }
.grid-cell.owner-1 { box-shadow: inset 0 0 0 3px #E08A7E; }
.grid-cell.owner-2 { box-shadow: inset 0 0 0 3px #8FB4E0; }
.grid-cell.owner-3 { box-shadow: inset 0 0 0 3px #E8C26A; }
.grid-cell.marker { box-shadow: 0 0 0 3px #F0CC74, 0 0 18px rgba(240, 204, 116, 0.7); }
.meld-strip { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; width: 100%; }
.meld-group { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 10px; border-radius: 12px; background: rgba(0, 0, 0, 0.22); box-shadow: inset 0 0 0 1px rgba(227, 194, 122, 0.3); color: #FBF6EC; }
.meld-cards { display: flex; align-items: center; }
.meld-cards > * { margin-left: -18px; }
.meld-cards > *:first-child { margin-left: 0; }

/* efekti */
.fx-confetti { position: absolute; top: -20px; width: 10px; height: 14px; border-radius: 2px; }
.fx-burst { position: absolute; width: 220px; height: 220px; translate: -50% -50%; pointer-events: none; }
.fx-toast { position: absolute; left: 50%; top: 42%; translate: -50% -50%; padding: 10px 26px; border-radius: 12px; background: linear-gradient(180deg, #EBCB83, #BC8F40); color: #1F1B16; font-family: var(--font-display); font-weight: 700; font-size: 2rem; box-shadow: 0 16px 30px -10px rgba(0, 0, 0, 0.7); white-space: nowrap; }

/* ================= 10. VODIČ „KAKO SE IGRA“ ================= */
.guide-steps { list-style: none; margin: 0; padding: 0; counter-reset: gs; display: grid; gap: 18px; }
.g-step { counter-increment: gs; display: grid; grid-template-columns: minmax(0, 250px) minmax(0, 1fr); gap: 22px; align-items: center; padding: 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1); }
.g-stage { position: relative; display: flex; align-items: center; justify-content: center; gap: 4px; min-height: 150px; padding: 14px 10px; border-radius: 12px; overflow: hidden; background-color: #1F4D3A; background-image: radial-gradient(ellipse at 50% 35%, rgba(255, 226, 160, 0.25), transparent 65%), url("/assets/bg/felt_pine.webp"); background-size: auto, 360px; box-shadow: inset 0 0 0 1px rgba(227, 194, 122, 0.55), inset 0 4px 14px rgba(0, 0, 0, 0.35); }
.g-stage .card-svg { width: 52px; height: auto; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.35); }
.g-stage .g-fly .card-svg { width: 60px; }
.g-stage > * + * { margin-left: -14px; }
.g-step .g-fly { margin-left: 10px; }
.g-step.in .g-fly { animation: guideFly calc(1s * var(--spd)) var(--ease) both; }
@keyframes guideFly { 0% { transform: translate(-70px, 60px) rotate(-16deg) scale(0.8); opacity: 0; } 50% { opacity: 1; } 100% { transform: none; opacity: 1; } }
.g-text h3 { font-size: 1.18rem; display: flex; gap: 12px; align-items: baseline; }
.g-text h3::before { content: counter(gs); flex: none; display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; color: #1F1B16; background: radial-gradient(circle at 35% 30%, #F1D58E, #B8893B 75%); translate: 0 -2px; }
.g-formula { display: inline-block; margin-top: 10px; padding: 3px 10px; border-radius: 6px; background: color-mix(in srgb, var(--brass) 16%, transparent); border: 1px solid color-mix(in srgb, var(--brass) 45%, transparent); font-weight: 700; font-size: 0.92rem; }
.g-text ul { margin: 10px 0 0; padding-left: 20px; color: var(--text-2); }
.g-text li + li { margin-top: 4px; }
.g-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.g-chips span { font-size: 0.82rem; font-weight: 700; padding: 2px 9px; border-radius: 6px; background: var(--surface-2); color: var(--text-2); }

/* ================= 11. PRAVEDNOST I BELA BLOK ================= */
.verifier-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(20px, 3vw, 36px); padding: 48px 0 80px; }
.verifier-box { padding: 26px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1); }
.verifier-box h2 { font-size: 1.9rem; margin-bottom: 8px; }
.verifier-box > p { color: var(--text-2); margin-bottom: 18px; }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-weight: 700; font-size: 0.95rem; }
.input { width: 100%; min-height: 48px; padding: 0 14px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--page); color: var(--text); font: inherit; font-weight: 600; }
.input:focus { outline: 0; border-color: var(--accent); box-shadow: var(--focus-ring); }
.input-mono { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; text-transform: uppercase; letter-spacing: 0.06em; }
.field-row { display: flex; gap: 8px; }
.field-row .input { flex: 1; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.seal-result { margin-top: 20px; padding: 18px 20px; border-radius: 12px; background: #1F1B16 url("/assets/bg/paper_ink.webp"); background-size: 512px; color: #F3EBDC; box-shadow: inset 0 0 0 1px rgba(227, 194, 122, 0.55); }
.seal-result .lbl { font-size: 0.86rem; font-weight: 700; color: #DDB86F; }
.seal-hash { margin: 4px 0; font-family: ui-monospace, monospace; font-size: 1.6rem; font-weight: 800; letter-spacing: 0.08em; color: #F2D898; }
.seal-result small { color: #BDAF96; }
.recent-hand-item { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--page); margin-bottom: 8px; }
.recent-hand-item code { font-weight: 800; }
.tag { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 0.78rem; font-weight: 700; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.muted { color: var(--text-2); }

.blok-pad { padding: 24px; border-radius: 10px; background: #F8F1E1 repeating-linear-gradient(180deg, transparent 0 31px, rgba(31, 77, 58, 0.13) 31px 32px); color: #1F1B16; box-shadow: var(--shadow-2); border-left: 3px double rgba(166, 52, 43, 0.5); }
.blok-pad .btn { min-height: 40px; }
.blok-pad .btn-quiet { color: #1F1B16 !important; border-color: #CDBE9F; background: rgba(255, 255, 255, 0.4); }
.blok-pad .btn-quiet[aria-pressed="true"] { background: #1F4D3A; color: #FBF6EC !important; border-color: #1F4D3A; }
.blok-bar { display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; align-items: center; }
.blok-bar > div { display: flex; flex-wrap: wrap; gap: 6px; }
.blok-scores { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin: 22px 0; }
.blok-total { padding: 14px; border-radius: 10px; text-align: center; background: #1F4D3A url("/assets/bg/felt_pine.webp"); background-size: 360px; color: #FBF6EC; box-shadow: inset 0 0 0 1px rgba(227, 194, 122, 0.6); }
.blok-total .who { font-weight: 700; }
.blok-num { font-family: var(--font-display); font-size: 3rem; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.blok-left { font-size: 0.88rem; color: #EED39A; font-weight: 600; }
.blok-entry { display: grid; gap: 10px; padding: 14px; border-radius: 10px; background: rgba(255, 255, 255, 0.55); border: 1px solid #D9CBAE; }
.blok-entry .row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.blok-entry input { width: 110px; min-height: 44px; padding: 0 10px; border-radius: 8px; border: 1.5px solid #CDBE9F; background: #FFFDF8; color: #1F1B16; font: inherit; font-weight: 700; font-size: 1.1rem; }
.blok-pad .rules-table { margin-top: 18px; }
.blok-pad .rules-table th, .blok-pad .rules-table td { border-color: rgba(31, 27, 22, 0.15); }
.blok-pad .rules-table thead th { color: #7A5719; }

/* ================= 12. POSTAVKE (panel i stranica) ================= */
.settings-sheet { position: fixed; inset: 0 0 0 auto; width: min(460px, 100vw); height: 100%; max-height: 100%; max-width: 100vw; margin: 0; padding: 0; border: 0; background: var(--surface); color: var(--text); box-shadow: -30px 0 60px -20px rgba(0, 0, 0, 0.55); translate: 100% 0; transition: translate calc(0.42s * var(--spd)) var(--ease), display 0.42s allow-discrete, overlay 0.42s allow-discrete; overflow: hidden; }
.settings-sheet[open] { translate: 0 0; display: flex; flex-direction: column; }
@starting-style { .settings-sheet[open] { translate: 100% 0; } }
.settings-sheet::backdrop { background: rgba(20, 14, 9, 0); transition: background-color 0.4s, display 0.4s allow-discrete, overlay 0.4s allow-discrete; }
.settings-sheet[open]::backdrop { background: rgba(20, 14, 9, 0.5); }
@starting-style { .settings-sheet[open]::backdrop { background: rgba(20, 14, 9, 0); } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.sheet-head h2 { font-size: 2rem; }
.sheet-body { flex: 1; overflow-y: auto; padding: 8px 20px 28px; overscroll-behavior: contain; }
.sheet-foot { padding: 12px 20px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.set-preview { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 14px 0 4px; padding: 16px; border-radius: 14px; background-color: var(--felt); background-image: radial-gradient(ellipse at 50% 30%, rgba(255, 226, 160, 0.25), transparent 70%), var(--felt-tex); background-size: auto, 360px; box-shadow: inset 0 0 0 1.5px rgba(227, 194, 122, 0.6), inset 0 4px 16px rgba(0, 0, 0, 0.35); transition: background-color 0.3s; }
.set-preview .card-svg { width: 62px; height: auto; }
.set-preview > * + * { margin-left: -10px; }
.set-group { padding: 18px 0 6px; border-bottom: 1px solid var(--line); }
.set-group:last-child { border-bottom: 0; }
.set-group h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.45rem; margin-bottom: 8px; }
.set-row { display: grid; gap: 8px; padding: 10px 0; }
.set-row.inline { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
.set-label { font-weight: 700; }
.set-hint { display: block; font-size: 0.88rem; font-weight: 400; color: var(--text-2); margin-top: 2px; }
.seg { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.seg label { flex: 1 1 auto; position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span { display: block; text-align: center; padding: 8px 10px; border-radius: 9px; font-weight: 700; font-size: 0.92rem; color: var(--text-2); transition: background-color 0.2s, color 0.2s, box-shadow 0.2s; }
.seg input:checked + span { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18), inset 0 0 0 1px color-mix(in srgb, var(--brass) 60%, transparent); }
.seg input:focus-visible + span { box-shadow: var(--focus-ring); }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatches label { position: relative; }
.swatches input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.swatches span { display: block; width: 44px; height: 44px; border-radius: 50%; background: var(--felt) var(--felt-tex); background-size: 200px; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.15), 0 2px 5px rgba(0, 0, 0, 0.3); transition: box-shadow 0.2s, transform 0.2s var(--ease); }
.swatches input:checked + span { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--brass); transform: scale(1.06); }
.swatches input:focus-visible + span { box-shadow: var(--focus-ring); }
.backs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.backs label { position: relative; display: grid; gap: 4px; justify-items: center; font-size: 0.8rem; font-weight: 600; color: var(--text-2); cursor: pointer; }
.backs input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.backs img { width: 100%; aspect-ratio: 480 / 714; object-fit: cover; border-radius: 6px; outline: 3px solid var(--card-paper); box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3); transition: transform 0.25s var(--ease), box-shadow 0.2s; }
.backs input:checked ~ img { transform: translateY(-3px); box-shadow: 0 0 0 3px var(--card-paper), 0 0 0 5px var(--brass), 0 10px 18px rgba(0, 0, 0, 0.35); }
.backs input:checked ~ span { color: var(--text); }
.backs input:focus-visible ~ img { box-shadow: var(--focus-ring); }
.switch { position: relative; display: inline-block; width: 52px; height: 30px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--line); transition: background-color 0.25s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #FBF6EC; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3); transition: translate 0.25s var(--ease); }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { translate: 22px 0; background: radial-gradient(circle at 35% 30%, #F6E3B0, #D2A556); }
.switch input:focus-visible + span { box-shadow: var(--focus-ring); }
.range { width: 100%; accent-color: var(--accent); }
.range-row { display: flex; align-items: center; gap: 12px; }
.range-row output { min-width: 3.2ch; font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.settings-inline { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 8px 24px 20px; box-shadow: var(--shadow-1); }
.settings-inline .set-preview { margin-top: 18px; }
.set-saved { font-size: 0.9rem; color: var(--text-2); }

/* ================= 13. POKRET NA SKROL ================= */
.js .reveal { opacity: 0; translate: 0 26px; transition: opacity calc(0.8s * var(--spd)) var(--ease), translate calc(0.8s * var(--spd)) var(--ease); }
.js .reveal.in { opacity: 1; translate: 0 0; }
.covers .cover.reveal:nth-child(3n + 2) { transition-delay: 90ms; }
.covers .cover.reveal:nth-child(3n) { transition-delay: 180ms; }

/* smanjeni pokreti (sistem ili postavka) */
:root[data-motion="reduced"] *, :root[data-motion="reduced"] *::before, :root[data-motion="reduced"] *::after {
  animation-duration: 1ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important;
  transition-duration: 1ms !important; transition-delay: 0ms !important; scroll-behavior: auto !important;
}
:root[data-motion="reduced"] .reveal { opacity: 1; translate: none; }

/* ================= 14. PRILAGOĐAVANJE EKRANU ================= */
@media (max-width: 1240px) {
  .desktop-arena { grid-template-columns: minmax(0, 1fr) 270px; }
}
@media (max-width: 1100px) {
  .lang-mini { display: none; }
  .foot-in { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 980px) {
  .covers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .desktop-arena { grid-template-columns: 1fr; min-height: 0; }
  .play-mat { min-height: 520px; }
  .desk-sidebar { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
  .game-info, .blok-wrap, .verifier-grid { grid-template-columns: 1fr; }
  .facts { position: static; }
  .app-in { grid-template-columns: 1fr; }
  .game-title { grid-template-columns: auto minmax(0, 1fr); }
  .game-actions { grid-column: 1 / -1; justify-content: flex-start; }
}
@media (max-width: 760px) {
  :root { --topbar-h: 60px; }
  body { font-size: 1rem; }
  .topbar-in { gap: 10px; }
  .brand-word { font-size: 1.45rem; }
  .brand-lamp { width: 34px; height: 34px; }
  .nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; justify-content: space-around; gap: 0; padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); background: var(--topbar-bg); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-top: 1px solid color-mix(in srgb, var(--brass) 45%, transparent); }
  .nav a { flex: 1; text-align: center; padding: 8px 4px; font-size: 0.86rem; }
  .nav a::after { bottom: 2px; left: 25%; right: 25%; }
  body { padding-bottom: calc(56px + env(safe-area-inset-bottom)); }
  .covers { grid-template-columns: 1fr; }
  .cover-felt { aspect-ratio: 16 / 8; }
  .band { flex-direction: column; align-items: stretch; padding: 0 0 36px; min-height: 0; background: var(--page); }
  .band-img { position: relative; inset: auto; height: auto; aspect-ratio: 16 / 9; object-position: 72% 50%; z-index: 0; }
  .band-in { margin-top: -48px; position: relative; z-index: 1; }
  .note { padding: 28px 22px 24px; }
  .note-ic { width: 60px; height: 60px; top: -26px; right: 18px; }
  .tiles { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 26px 14px; }
  .tile-desc { display: none; }
  .cat-sec-head img { width: 48px; height: 48px; }
  .game-head { padding-bottom: 52px; }
  .medallion { width: 68px; height: 68px; }
  .game-title { gap: 14px; }
  .wrap-table { padding: 0 8px; margin-top: -32px; }
  .table-shell { border-radius: 22px; padding: 8px; }
  .table-shell::before { inset: 4px; border-radius: 18px; }
  .play-mat { padding: 12px 10px 14px; min-height: 480px; border-radius: 16px; }
  .mat-top-row { min-height: 0; gap: 8px; }
  .seat-plate { font-size: 0.82rem; padding: 3px 12px 3px 3px; gap: 6px; }
  .opp-fan { display: none; }
  .arena-h-row { gap: 12px; }
  .table-zone { min-height: 110px; padding: 10px; gap: 6px; }
  .play-mat .table-zone .card-svg, .play-mat .meld-strip .card-svg { width: clamp(46px, 13.5vw, 72px); height: auto; }
  .play-mat .deck-layers, .play-mat .deck-stack, .play-mat .captured-pile .deck-layers { transform: scale(0.78); transform-origin: center; }
  .hand-row { min-height: 110px; padding-top: 22px; }
  .hand-row .card-svg { width: clamp(54px, 17vw, 84px); height: auto; }
  .sol-cols { gap: 3px; }
  .sol-col .card-svg, .sol-top .card-svg { width: 100%; max-width: 64px; height: auto; }
  .sol-col .sol-card-abs { width: 100%; max-width: 64px; }
  .sol-col .empty-slot, .sol-top .empty-slot { width: 100% !important; max-width: 64px; height: auto !important; aspect-ratio: 5 / 7; }
  .grid-cell { min-width: 52px; min-height: 74px; }
  .grid-cell .card-svg { width: 48px; height: auto; }
  .status-banner { font-size: 0.9rem; padding: 6px 14px; }
  .g-step { grid-template-columns: 1fr; }
  .foot-in { grid-template-columns: 1fr; gap: 28px; padding-top: 48px; }
  .backs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .page-band { padding-bottom: 40px; }
  .page-band-note { padding: 26px 20px; }
  .page-band-note h1 { padding-right: 56px; }
}
@media (max-width: 420px) {
  .hero-actions .btn { flex: 1 1 100%; }
  .cat-head h2 { font-size: 2.2rem; }
  .side-actions { grid-template-columns: 1fr 1fr; }
}
@media (hover: none) {
  .card-btn:hover:not(:disabled) { translate: 0 var(--lift, 0px); filter: none; }
  .cover:hover { transform: none; }
}
@media print {
  .topbar, .foot, .nav { display: none; }
}
