
  * { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
  :root {
    --felt: #0c5e39;
    --felt-dark: #06412a;
    --gold: #f5c542;
    --card-bg: #fefefe;
    --card-back: linear-gradient(135deg, #1a3a8c 0%, #0d2659 100%);
    --red: #c92a2a;
    --black: #1a1a1a;
    --shadow: 0 2px 6px rgba(0,0,0,0.3);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.4);
  }
  html, body {
    min-height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background:
      radial-gradient(130% 115% at 50% 6%, #19894f 0%, #0d6038 58%, #0a5230 100%);
    background-attachment: fixed;
    color: white;
    overflow-x: clip;
  }
  header {
    background: var(--felt-dark);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    position: sticky;
    top: 0;
    z-index: 100;
  }
  .logo {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .logo-icon {
    background: var(--gold);
    color: var(--felt-dark);
    width: 32px; height: 32px;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-weight: 900;
  }
  .header-actions { display: flex; gap: 8px; }
  button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    transition: transform 0.1s, background 0.2s;
  }
  button:active { transform: scale(0.96); }
  .btn-primary {
    background: var(--gold);
    color: var(--felt-dark);
  }
  .btn-primary:hover { background: #ffd560; }
  .btn-secondary {
    background: rgba(255,255,255,0.15);
    color: white;
  }
  .btn-secondary:hover { background: rgba(255,255,255,0.25); }
  main { min-height: calc(100vh - 60px); padding: 20px; }
  .screen { display: none; }
  .screen.active { display: block; }

  /* HOME */
  #home { max-width: 1100px; margin: 0 auto; }
  .hero {
    text-align: center;
    padding: 30px 20px 40px;
  }
  .hero h1 {
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 12px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
  }
  .hero p {
    font-size: 18px;
    opacity: 0.9;
    max-width: 500px;
    margin: 0 auto;
  }
  .category-header {
    margin: 26px 0 2px;
    display: flex; align-items: baseline; gap: 10px;
  }
  .category-header h2 { color: var(--gold); font-size: 21px; }
  .category-header .count { font-size: 13px; opacity: 0.6; }
  .category-header:after {
    content: ''; flex: 1; height: 1px;
    background: rgba(245,197,66,0.25); align-self: center;
  }
  .game-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    padding: 14px 0;
  }
  @media (max-width: 920px) {
    .game-grid { grid-template-columns: repeat(3, 1fr); }
  }
  .daily-banner {
    background: var(--gold);
    color: var(--felt-dark);
    border-radius: 8px;
    padding: 13px 20px;
    margin: 8px 0 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: transform 0.15s;
  }
  .daily-banner:hover {
    transform: translateY(-2px);
  }
  .daily-banner:active { transform: translateY(0); }
  .daily-banner-icon {
    font-size: 36px;
    line-height: 1;
  }
  .daily-banner-text { flex: 1; }
  .daily-banner-text h3 {
    font-size: 17px;
    margin-bottom: 2px;
    color: var(--felt-dark);
  }
  .daily-banner-text p {
    font-size: 13.5px;
    opacity: 0.85;
    line-height: 1.3;
    color: var(--felt-dark);
  }
  .daily-banner-arrow {
    font-size: 26px;
    font-weight: 700;
    color: var(--felt-dark);
  }
  .game-card {
    background: rgba(0,0,0,0.22);
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 8px;
    padding: 0;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.2s, border-color 0.2s;
  }
  .game-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(245,197,66,0.55);
  }
  .game-card:hover h3 { color: var(--gold); }
  .game-card-thumb {
    width: 100%;
    height: auto;
    aspect-ratio: 380 / 168;
    object-fit: cover;
    object-position: center;
    display: block;
    background: #0a6b3e;
    border-bottom: 1px solid rgba(0,0,0,0.28);
  }
  .game-card h3 {
    font-size: 15px;
    margin: 0;
    padding: 8px 11px 2px;
    color: #f4f2ec;
    transition: color 0.2s;
  }
  .game-card p {
    font-size: 12px;
    color: rgba(255,255,255,0.82);
    line-height: 1.32;
    margin: 0;
    padding: 0 11px 11px;
  }
  /* Force 2-column grid on mobile so users always see two games side-by-side,
     instead of falling back to 1 column on narrow phones */
  @media (max-width: 600px) {
    .game-grid {
      grid-template-columns: 1fr 1fr;
      gap: 10px;
    }
    .game-card h3 {
      font-size: 14px;
      padding: 7px 9px 2px;
    }
    .category-header h2 { font-size: 18px; }
    .game-card p {
      font-size: 11px;
      line-height: 1.3;
      padding: 0 9px 9px;
    }
    /* Þéttari haus á leikjasíðum svo takkarnir (t.d. "Nýr leikur") klippist
       ekki af í síma. Wordmark falið á leikjasíðum en haldið á forsíðu. */
    header { padding: 10px 12px; }
    .header-actions { gap: 6px; }
    .header-actions button, .header-actions a {
      padding: 7px 11px;
      font-size: 13px;
      white-space: nowrap;
    }
    body:not([data-screen="home"]) .logo span { display: none; }
    body:not([data-screen="home"]) .logo { gap: 0; }
  }
  /* SEO content section — placed below the fold so it doesn't disturb players */
  .seo-content {
    max-width: 880px;
    margin: 40px auto 0;
    padding: 30px 24px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    line-height: 1.65;
  }
  .seo-content h2 {
    font-size: 22px;
    color: var(--gold);
    margin-top: 24px;
    margin-bottom: 10px;
  }
  .seo-content h2:first-child { margin-top: 0; }
  .seo-content p {
    margin-bottom: 12px;
    opacity: 0.9;
    font-size: 15px;
  }
  .seo-content ul {
    margin: 0 0 14px 22px;
    opacity: 0.9;
    font-size: 15px;
  }
  .seo-content ul li { margin-bottom: 6px; }
  .seo-content a {
    color: var(--gold);
    text-decoration: none;
    border-bottom: 1px dashed rgba(245,197,66,0.4);
  }
  .seo-content a:hover { border-bottom-style: solid; }
  .seo-faq details {
    background: rgba(0,0,0,0.18);
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 8px;
    cursor: pointer;
  }
  .seo-faq details summary {
    font-weight: 600;
    color: var(--gold);
    font-size: 15px;
    list-style: none;
    position: relative;
    padding-right: 24px;
  }
  .seo-faq details summary::-webkit-details-marker { display: none; }
  .seo-faq details summary::after {
    content: '+';
    position: absolute;
    right: 0;
    top: 0;
    font-size: 20px;
    line-height: 1;
    transition: transform 0.2s;
  }
  .seo-faq details[open] summary::after { content: '−'; }
  .seo-faq details p {
    margin-top: 10px;
    margin-bottom: 0;
    font-size: 14.5px;
  }
  @media (max-width: 720px) {
    .seo-content { padding: 22px 18px; margin: 30px 12px 0; }
    .seo-content h2 { font-size: 19px; }
    .seo-content p, .seo-content ul { font-size: 14px; }
  }

  /* In-game SEO sections (per-game pages) — slightly smaller, pushed below the fold */
  .game-seo {
    margin-top: 280px;
    max-width: 760px;
  }
  .game-seo h2 { font-size: 19px; }
  .game-seo p, .game-seo ul { font-size: 14.5px; }
  @media (max-width: 720px) {
    .game-seo { margin-top: 160px; }
  }

  .footer-info {
    text-align: center;
    padding: 30px 20px;
    opacity: 0.7;
    font-size: 13px;
  }
  .footer-info a {
    color: var(--gold);
    text-decoration: none;
    margin: 0 8px;
  }
  .footer-info a:hover { text-decoration: underline; }
  .footer-info .footer-links {
    margin-bottom: 10px;
  }

  /* Cookie banner */
  .cookie-banner {
    position: fixed;
    bottom: 16px;
    left: 16px;
    right: 16px;
    max-width: 640px;
    margin: 0 auto;
    background: rgba(20, 50, 35, 0.96);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(245, 197, 66, 0.4);
    border-radius: 14px;
    padding: 16px 20px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    z-index: 2000;
    color: #fff;
    display: none;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
  }
  .cookie-banner.visible { display: flex; }
  .cookie-banner-text {
    flex: 1;
    min-width: 240px;
    font-size: 14px;
    line-height: 1.45;
  }
  .cookie-banner-text a {
    color: var(--gold);
    text-decoration: underline;
  }
  .cookie-banner-buttons {
    display: flex;
    gap: 8px;
  }
  .cookie-banner button {
    border: none;
    border-radius: 8px;
    padding: 9px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
  }
  .cookie-btn-accept {
    background: var(--gold);
    color: var(--felt-dark);
  }
  .cookie-btn-accept:hover { filter: brightness(1.1); }
  .cookie-btn-decline {
    background: rgba(255,255,255,0.1);
    color: #fff;
  }
  .cookie-btn-decline:hover { background: rgba(255,255,255,0.18); }

  /* Content page (about, privacy, contact) */
  .content-page {
    max-width: 760px;
    margin: 0 auto;
    padding: 20px 0 40px;
    line-height: 1.7;
  }
  .content-page h1 {
    font-size: 32px;
    margin-bottom: 8px;
    color: var(--gold);
  }
  .content-page h2 {
    font-size: 22px;
    margin-top: 28px;
    margin-bottom: 10px;
    color: var(--gold);
  }
  .content-page p { margin-bottom: 14px; opacity: 0.92; }
  .content-page ul { margin: 0 0 14px 22px; opacity: 0.92; }
  .content-page ul li { margin-bottom: 6px; }
  .content-page a { color: var(--gold); }
  .content-page .updated {
    font-size: 13px;
    opacity: 0.6;
    margin-bottom: 24px;
  }
  .content-page .contact-form {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 12px;
    padding: 20px;
    margin-top: 16px;
  }
  .content-page .contact-form label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 600;
  }
  .content-page .contact-form input,
  .content-page .contact-form textarea {
    width: 100%;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 8px;
    padding: 10px 12px;
    color: #fff;
    font-family: inherit;
    font-size: 14px;
    margin-bottom: 14px;
    box-sizing: border-box;
  }
  .content-page .contact-form textarea { min-height: 120px; resize: vertical; }
  .content-page .contact-form input:focus,
  .content-page .contact-form textarea:focus {
    outline: 2px solid var(--gold);
    outline-offset: 1px;
  }

  /* CARDS - shared */
  .card {
    width: 70px;
    height: 100px;
    background: var(--card-bg);
    border-radius: 7px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.26), 0 1px 1px rgba(0,0,0,0.16);
    border: 1px solid rgba(0,0,0,0.06);
    position: relative;
    user-select: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 4px 6px;
    color: var(--black);
    font-weight: 700;
  }
  .card.red { color: var(--red); }
  .card.face-down {
    background: var(--card-back);
    color: transparent;
  }
  .card.face-down::before {
    content: "";
    position: absolute;
    inset: 3px;
    border: 1.5px solid rgba(255,255,255,0.32);
    border-radius: 5px;
    background:
      repeating-linear-gradient(45deg, rgba(255,255,255,0.09) 0 2px, transparent 2px 8px),
      repeating-linear-gradient(-45deg, rgba(255,255,255,0.09) 0 2px, transparent 2px 8px);
  }
  .card.face-down::after {
    content: "\2660\FE0E";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(245,197,66,0.9);
    font-size: 1.7em;
    text-shadow: 0 1px 2px rgba(0,0,0,0.35);
  }
  .card-corner {
    font-size: 14px;
    line-height: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .card-corner.bottom {
    align-self: flex-end;
    transform: rotate(180deg);
  }
  .card-suit-large {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
  }
  .card.selected {
    box-shadow: 0 0 0 3px var(--gold), var(--shadow-lg);
    transform: translateY(-6px);
  }
  .card.movable:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

  /* SOLITAIRE */
  /* Grænt spilaborð (eins og Skítakall) á kapla + spilaleiki — ekki þrautir/arkade */
  .solitaire-board, .freecell-board, .spider-board, .golf-board, .pyramid-board, .tripeaks-board,
  .ce-board, .gf-board, .blackjack-board, .war-board {
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 22px 20px;
    -webkit-user-select: none;
    user-select: none;
  }
  .solitaire-board {
    max-width: 720px;
    margin: 0 auto;
  }
  /* Grænt felt-borð á þrautir + borðleiki (Yahtzee, Sudoku, Skák, Jarðsprengja o.fl.) — ekki arkade */
  /* Umgjörð-leikir: felt á heilan leikkassa (hafa nú þegar padding) */
  .dam-main, .ludo-main, .kotra-main, .ss-main, .bingo-main, .skak-main, .mm-main {
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
  }
  /* Rúðunets-leikir: felt-rammi hjúfrar sig að borðinu (litað -grid heldur sínum lit) */
  .yahtzee-board, .sudoku-board, .ol-board, .mj-board, .memory-board, .fp-wrap,
  .ttt-board, .rv-board, .c4-board, .hm-wrap, .ms-board, .myn-boardwrap {
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 20px;
    box-sizing: border-box;
  }
  .top-row {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
    margin-bottom: 24px;
  }
  .pile {
    width: 70px;
    height: 100px;
    border: 2px dashed rgba(255,255,255,0.25);
    border-radius: 8px;
    position: relative;
  }
  .pile-stock { cursor: pointer; }
  .pile-stock.empty::before {
    content: "↻";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.4);
    font-size: 28px;
  }
  .foundation::before {
    content: attr(data-suit);
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.2);
    font-size: 32px;
  }
  .tableau {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
  }
  .tableau-col {
    min-height: 100px;
    position: relative;
  }
  .tableau-col .card,
  .tableau-col .pile {
    position: absolute;
    left: 0;
  }
  .pile .card {
    position: absolute;
    top: 0; left: 0;
  }

  /* FREECELL */
  .freecell-board {
    max-width: 760px;
    margin: 0 auto;
  }
  .freecell-top {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 10px;
    margin-bottom: 24px;
  }
  .freecell-tableau {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 10px;
  }
  .freecell-tableau .tableau-col { min-height: 350px; }
  .free-cell { cursor: pointer; }
  .free-cell::before {
    content: "•";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.2);
    font-size: 28px;
  }

  /* BLACKJACK */
  .blackjack-board {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
  }
  .bj-area {
    margin: 30px 0;
  }
  .bj-label {
    font-size: 16px;
    margin-bottom: 12px;
    opacity: 0.8;
  }
  .bj-cards {
    display: flex;
    justify-content: center;
    gap: 8px;
    min-height: 100px;
    flex-wrap: wrap;
  }
  .bj-score {
    font-size: 20px;
    font-weight: 700;
    margin-top: 8px;
    color: var(--gold);
  }
  .bj-hand {
    margin: 0 auto 10px;
    padding: 10px;
    border-radius: 12px;
    transition: background 0.2s;
    max-width: fit-content;
  }
  .bj-hand.active {
    background: rgba(245,197,66,0.15);
    box-shadow: 0 0 0 2px var(--gold);
  }
  .bj-hand.done { opacity: 0.7; }
  .bj-hand-result {
    font-size: 14px;
    font-weight: 600;
    margin-top: 4px;
    min-height: 18px;
  }
  .bj-hand-result.win { color: var(--gold); }
  .bj-hand-result.lose { color: var(--red); }
  .bj-hand-result.push { color: #aaa; }
  .bj-controls {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 20px;
  }
  .bj-status {
    font-size: 24px;
    font-weight: 700;
    margin: 20px 0;
    min-height: 30px;
  }
  .bj-status.win { color: var(--gold); }
  .bj-status.lose { color: var(--red); }
  .bj-status.push { color: #aaa; }
  .bj-stats {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 20px;
    font-size: 14px;
    opacity: 0.8;
  }

  /* MEMORY */
  .memory-board {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
  }
  .memory-info {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 20px;
    font-size: 18px;
    font-weight: 600;
  }
  .memory-grid {
    display: grid;
    gap: 10px;
    justify-content: center;
    margin: 0 auto;
  }
  .memory-card {
    width: 80px;
    height: 110px;
    background: var(--card-back);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: transparent;
    transition: transform 0.3s, background 0.2s;
    box-shadow: var(--shadow);
  }
  .memory-card.flipped {
    background: var(--card-bg);
    color: var(--black);
  }
  .memory-card.flipped.red { color: var(--red); }
  .memory-card.matched {
    background: rgba(245,197,66,0.3);
    color: var(--gold);
    cursor: default;
  }
  .memory-card.flipped::after,
  .memory-card.matched::after { content: none; }
  .memory-card:not(.flipped):not(.matched)::after {
    content: "";
    position: absolute;
  }

  /* WAR */
  .war-board {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
  }
  .war-arena {
    display: flex;
    justify-content: space-around;
    align-items: center;
    gap: 20px;
    margin: 30px 0;
  }
  .war-side {
    text-align: center;
  }
  .war-side h3 { margin-bottom: 12px; font-size: 18px; }
  .war-deck-info { margin-top: 8px; font-size: 14px; opacity: 0.8; }
  .war-played {
    min-height: 100px;
    display: flex;
    gap: 4px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
  }
  .war-vs {
    font-size: 32px;
    font-weight: 800;
    color: var(--gold);
    opacity: 0.7;
  }
  .war-status {
    font-size: 20px;
    font-weight: 700;
    margin: 20px 0;
    min-height: 30px;
    color: var(--gold);
  }

  /* SPIDER */
  .spider-board {
    max-width: 760px;
    margin: 0 auto;
  }
  .spider-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
  }
  .spider-info {
    font-size: 14px;
    opacity: 0.85;
  }
  .spider-stock-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
  }
  .spider-tableau {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 6px;
  }
  .spider-tableau .tableau-col { min-height: 100px; }
  .spider-tableau .card {
    width: 100%;
    max-width: 60px;
  }
  @media (max-width: 720px) {
    .spider-tableau { gap: 3px; }
    .spider-tableau .card {
      max-width: 100%;
      width: 100%;
      height: 50px;
      padding: 2px 3px;
      font-size: 10px;
    }
    .spider-tableau .card-corner { font-size: 9px; }
    .spider-tableau .card-suit-large { font-size: 16px; }
    .spider-tableau .pile { width: 100%; height: 50px; }
  }

  /* YAHTZEE */
  .yahtzee-board {
    max-width: 520px;
    margin: 0 auto;
  }
  /* Side-by-side layout á desktop — play-area vinstra megin, scorecard hægra megin */
  @media (min-width: 1000px) {
    .yahtzee-board {
      max-width: 1000px;
      display: grid;
      grid-template-areas:
        "header  header"
        "play    score";
      grid-template-columns: 1fr 1fr;
      column-gap: 32px;
      align-items: start;
    }
    .yahtzee-board > .yht-turn-indicator { grid-area: header; }
    .yahtzee-board > .yht-play-area {
      grid-area: play;
      margin: 0;
      position: sticky;
      top: 80px;
      max-width: 460px;
      justify-self: end;
      width: 100%;
    }
    .yahtzee-board > .yht-scorecard-combined {
      grid-area: score;
      margin: 0;
      max-width: 460px;
      justify-self: start;
      width: 100%;
    }
  }
  .dice-row {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
  }
  .die {
    width: 60px;
    height: 60px;
    background: #fefefe;
    border-radius: 12px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    padding: 8px;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: transform 0.15s, background 0.15s;
    user-select: none;
  }
  .die:active { transform: scale(0.94); }
  .die.held {
    background: var(--gold);
    transform: translateY(4px);
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
  }
  .die.disabled {
    cursor: default;
    opacity: 0.7;
  }
  .die.rolling { animation: roll 0.4s; }
  @keyframes roll {
    0% { transform: rotate(0); }
    50% { transform: rotate(180deg) scale(1.1); }
    100% { transform: rotate(360deg); }
  }
  .pip {
    background: #1a1a1a;
    border-radius: 50%;
    width: 9px;
    height: 9px;
    align-self: center;
    justify-self: center;
  }
  .yht-controls {
    text-align: center;
    margin-bottom: 16px;
  }
  .yht-controls button { font-size: 16px; padding: 10px 24px; }
  .yht-hint {
    font-size: 13px;
    opacity: 0.7;
    margin-top: 8px;
    min-height: 18px;
  }
  .yht-scorecard {
    background: rgba(0,0,0,0.2);
    border-radius: 12px;
    padding: 8px;
  }
  .yht-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 9px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
    font-size: 15px;
  }
  .yht-row.scorable:hover { background: rgba(255,255,255,0.08); }
  .yht-row.scorable .yht-value { color: var(--gold); font-weight: 700; }
  .yht-row.locked { opacity: 0.65; cursor: default; }
  .yht-row.locked .yht-value { color: white; font-weight: 600; }
  .yht-row.empty .yht-value { color: rgba(255,255,255,0.3); }
  .yht-section-header {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    opacity: 0.5;
    padding: 8px 12px 4px;
    text-transform: uppercase;
  }
  .yht-totals {
    border-top: 1px solid rgba(255,255,255,0.15);
    margin-top: 6px;
    padding-top: 4px;
  }
  .yht-row.total {
    font-weight: 700;
    cursor: default;
  }
  .yht-row.total.grand .yht-value {
    color: var(--gold);
    font-size: 18px;
  }
  .yht-turn-indicator {
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    min-height: 22px;
  }
  .yht-turn-indicator .turn-name { color: var(--gold); }
  /* Play area — subtle "table within table" treatment around dice */
  .yht-play-area {
    background: rgba(0,0,0,0.18);
    border-radius: 18px;
    padding: 28px 16px 22px;
    margin: 0 auto 18px;
    max-width: 460px;
  }
  .yht-play-area .dice-row { margin-bottom: 18px; }
  .yht-play-area .yht-controls { margin-bottom: 0; }

  /* Combined scorecard — single table with 2 player columns */
  .yht-scorecard-combined {
    background: rgba(0,0,0,0.22);
    border-radius: 14px;
    padding: 10px 6px 12px;
    max-width: 460px;
    margin: 0 auto;
  }
  .yht-sc-headers {
    display: grid;
    grid-template-columns: 1fr 78px 78px;
    padding: 4px 12px 10px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 4px;
    gap: 4px;
  }
  .yht-sc-headers .yht-sc-player {
    text-align: center;
    font-weight: 700;
    font-size: 14px;
    padding: 6px 4px;
    border-radius: 8px;
    line-height: 1.25;
    transition: background 0.2s, color 0.2s;
  }
  .yht-sc-headers .yht-sc-player.active {
    background: var(--gold);
    color: var(--felt-darker, #04361f);
  }
  .yht-sc-headers .yht-sc-player .yht-sc-player-score {
    font-weight: 500;
    font-size: 12px;
    opacity: 0.7;
    display: block;
    margin-top: 1px;
  }
  .yht-sc-headers .yht-sc-player.active .yht-sc-player-score { opacity: 0.85; }
  .yht-sc-row {
    display: grid;
    grid-template-columns: 1fr 78px 78px;
    align-items: center;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 14px;
    gap: 4px;
    transition: background 0.15s;
  }
  .yht-sc-row.scorable { cursor: pointer; }
  .yht-sc-row.scorable:hover { background: rgba(255,255,255,0.07); }
  .yht-sc-cell { text-align: center; }
  .yht-sc-cell.label { text-align: left; font-size: 14px; }
  .yht-sc-row.locked .yht-sc-cell.value { color: white; font-weight: 600; }
  .yht-sc-row .yht-sc-cell.value.suggested { color: var(--gold); font-weight: 700; }
  .yht-sc-row .yht-sc-cell.value.empty { color: rgba(255,255,255,0.3); }
  .yht-sc-section-header {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    opacity: 0.5;
    padding: 10px 12px 4px;
    text-transform: uppercase;
  }
  .yht-sc-totals {
    border-top: 1px solid rgba(255,255,255,0.15);
    margin-top: 6px;
    padding-top: 4px;
  }
  .yht-sc-row.total { font-weight: 700; cursor: default; }
  .yht-sc-row.total.grand .yht-sc-cell.value { color: var(--gold); font-size: 17px; }
  @media (max-width: 720px) {
    /* Mobile: aggressive vertical compression to fit dice + full scorecard
       on a single iPhone screen, without sticky overlay. */
    .yahtzee-board { max-width: none; padding: 0 8px; }

    /* Scorecard — narrow columns, tight rows, smaller text */
    .yht-scorecard-combined { padding: 4px 4px 6px; }
    .yht-sc-headers, .yht-sc-row { grid-template-columns: 1fr 56px 56px; padding: 3px 8px; gap: 2px; font-size: 13px; }
    .yht-sc-headers { padding: 2px 8px 4px; margin-bottom: 2px; }
    .yht-sc-cell, .yht-sc-cell.label { font-size: 13px; }
    .yht-sc-headers .yht-sc-player { font-size: 13px; padding: 3px 2px; line-height: 1.2; }
    .yht-sc-headers .yht-sc-player .yht-sc-player-score { font-size: 11px; }
    .yht-sc-section-header { padding: 4px 8px 1px; font-size: 9px; letter-spacing: 0.4px; }
    .yht-sc-totals { margin-top: 2px; padding-top: 2px; }
    .yht-sc-row.total.grand .yht-sc-cell.value { font-size: 14px; }

    /* Play area — compact panel, no sticky (caused overlay on scorecard) */
    .yht-play-area {
      padding: 8px 8px 6px;
      margin: 0 auto 8px;
      border-radius: 12px;
      max-width: 360px;
    }
    .yht-play-area .dice-row { gap: 5px; margin-bottom: 6px; }
    .yht-play-area .die { width: 40px; height: 40px; padding: 4px; border-radius: 8px; }
    .yht-play-area .pip { width: 6px; height: 6px; }
    .yht-play-area .yht-controls { margin-bottom: 0; }
    .yht-play-area .yht-controls button { font-size: 14px; padding: 5px 18px; }
    .yht-hint { font-size: 10px; margin-top: 2px; opacity: 0.7; }

    /* Turn indicator — small, since "Þín umferð" is implicit when player acts */
    .yht-turn-indicator { font-size: 12px; margin-bottom: 4px; }
  }

  /* TRI-PEAKS */
  .tripeaks-board {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
  }
  .tp-info {
    font-size: 16px;
    margin-bottom: 16px;
    font-weight: 600;
  }
  .tp-peaks {
    position: relative;
    height: 280px;
    margin: 0 auto 20px;
  }
  .tp-peaks .card {
    position: absolute;
    transition: opacity 0.3s;
  }
  .tp-peaks .card.removed {
    opacity: 0;
    pointer-events: none;
  }
  .tp-peaks .card.playable {
    box-shadow: 0 0 0 2px var(--gold), var(--shadow);
  }
  .tp-bottom {
    display: flex;
    justify-content: center;
    gap: 14px;
  }
  @media (max-width: 720px) {
    .tp-peaks { height: 220px; }
  }

  /* SUDOKU */
  .sudoku-board {
    max-width: 480px;
    margin: 0 auto;
    text-align: center;
  }
  .sudoku-info {
    font-size: 14px;
    margin-bottom: 14px;
  }
  .sk-diff-btn {
    background: rgba(255,255,255,0.08);
    color: white;
    padding: 4px 10px;
    font-size: 13px;
    margin: 0 2px;
  }
  .sk-diff-btn.active {
    background: var(--gold);
    color: var(--felt-dark);
  }
  .sudoku-grid {
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    gap: 1px;
    max-width: 450px;
    margin: 0 auto 16px;
    background: rgba(255,255,255,0.3);
    padding: 2px;
    border-radius: 8px;
  }
  .sk-cell {
    aspect-ratio: 1;
    background: var(--felt-dark);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s;
  }
  .sk-cell.given {
    color: white;
    cursor: default;
    background: rgba(0,0,0,0.4);
  }
  .sk-cell.user-filled { color: var(--gold); }
  .sk-cell.selected { background: rgba(245,197,66,0.4) !important; }
  .sk-cell.highlight { background: rgba(245,197,66,0.15); }
  .sk-cell.error { color: var(--red); animation: shake 0.3s; }
  .sk-cell.thick-right { border-right: 2px solid rgba(255,255,255,0.5); }
  .sk-cell.thick-bottom { border-bottom: 2px solid rgba(255,255,255,0.5); }
  @keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-3px); }
    75% { transform: translateX(3px); }
  }
  .sudoku-keys {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 4px;
    max-width: 450px;
    margin: 0 auto;
  }
  .sk-key {
    background: rgba(255,255,255,0.1);
    color: white;
    padding: 12px 0;
    font-size: 18px;
    font-weight: 600;
    border-radius: 6px;
  }
  .sk-key:hover { background: rgba(255,255,255,0.2); }
  .sk-key.erase { font-size: 16px; }

  /* CRAZY EIGHTS */
  .ce-board {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
  }
  .ce-cpu-area, .ce-player-area { margin: 16px 0; }
  .ce-label {
    font-size: 14px;
    opacity: 0.85;
    margin-bottom: 8px;
  }
  .ce-cpu-cards, .ce-player-cards {
    display: flex;
    justify-content: center;
    gap: 4px;
    flex-wrap: wrap;
    min-height: 100px;
  }
  .ce-player-cards .card.playable { box-shadow: 0 0 0 2px var(--gold), var(--shadow); }
  .ce-player-cards .card.unplayable { opacity: 0.55; }
  .ce-middle {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin: 18px 0;
  }
  .ce-deck-info { font-size: 13px; margin-top: 6px; opacity: 0.85; }
  .ce-discard-wrap { position: relative; }
  .ce-suit-indicator {
    margin-top: 6px;
    font-size: 22px;
    font-weight: 700;
    min-height: 26px;
  }
  .ce-suit-indicator.red { color: #ff6b6b; }
  .ce-status {
    font-size: 16px;
    font-weight: 600;
    min-height: 22px;
    margin: 8px 0;
    color: var(--gold);
  }
  .ce-suit-picker {
    margin-top: 16px;
    padding: 12px;
    background: rgba(0,0,0,0.3);
    border-radius: 12px;
  }
  .ce-suit-picker-title { font-size: 14px; opacity: 0.85; margin-bottom: 8px; }
  .ce-suit-picker-row {
    display: flex;
    justify-content: center;
    gap: 12px;
  }
  .ce-suit-btn {
    width: 56px;
    height: 56px;
    background: white;
    color: black;
    font-size: 28px;
    border-radius: 8px;
  }
  .ce-suit-btn.red { color: var(--red); }
  .ce-end-chain {
    text-align: center;
    margin-top: 14px;
  }

  /* PYRAMID */
  .pyramid-board {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
  }
  .pyr-info {
    font-size: 16px;
    margin-bottom: 16px;
    font-weight: 600;
  }
  .pyr-tableau {
    position: relative;
    height: 360px;
    margin: 0 auto 20px;
  }
  .pyr-tableau .card {
    position: absolute;
    transition: opacity 0.3s, box-shadow 0.15s;
  }
  .pyr-tableau .card.removed {
    opacity: 0;
    pointer-events: none;
  }
  .pyr-tableau .card.blocked { opacity: 0.55; }
  .pyr-tableau .card.selected, .pyr-tableau .card.playable {
    box-shadow: 0 0 0 2px var(--gold), var(--shadow);
  }
  .pyr-bottom {
    display: flex;
    justify-content: center;
    gap: 14px;
  }
  @media (max-width: 720px) {
    .pyr-tableau { height: 290px; }
  }

  /* GOLF */
  .golf-board {
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
  }
  .golf-info {
    font-size: 16px;
    margin-bottom: 16px;
    font-weight: 600;
  }
  .golf-tableau {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    max-width: 560px;
    margin: 0 auto 20px;
  }
  .golf-col {
    position: relative;
    min-height: 200px;
  }
  .golf-col .card {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
  }
  .golf-col .card.playable {
    box-shadow: 0 0 0 2px var(--gold), var(--shadow);
  }
  .golf-bottom {
    display: flex;
    justify-content: center;
    gap: 14px;
  }
  @media (max-width: 720px) {
    .golf-tableau { gap: 4px; }
  }

  /* TIC-TAC-TOE */
  .ttt-board { max-width: 400px; margin: 0 auto; text-align: center; }
  .ttt-status { font-size: 18px; font-weight: 600; min-height: 26px; margin-bottom: 16px; color: var(--gold); }
  .ttt-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    max-width: 320px;
    margin: 0 auto 20px;
  }
  .ttt-cell {
    aspect-ratio: 1;
    background: rgba(255,255,255,0.08);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 56px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s;
    user-select: none;
  }
  .ttt-cell:hover { background: rgba(255,255,255,0.16); }
  .ttt-cell.x { color: var(--gold); }
  .ttt-cell.o { color: #5fc7ff; }
  .ttt-cell.win { background: rgba(245,197,66,0.3); }
  .ttt-stats { display: flex; gap: 24px; justify-content: center; font-size: 14px; opacity: 0.85; }

  /* CONNECT FOUR */
  .c4-board { max-width: 480px; margin: 0 auto; text-align: center; }
  .c4-status { font-size: 18px; font-weight: 600; min-height: 26px; margin-bottom: 12px; color: var(--gold); }
  .c4-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    background: #1a4080;
    padding: 6px;
    border-radius: 10px;
    margin: 0 auto 16px;
  }
  .c4-cell {
    aspect-ratio: 1;
    background: var(--felt-dark);
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.15s, transform 0.2s;
  }
  .c4-cell.red { background: #e63946; }
  .c4-cell.yellow { background: #ffd60a; }
  .c4-col-hover .c4-cell:hover ~ .c4-cell { /* placeholder */ }
  .c4-cell.win { box-shadow: 0 0 0 3px white inset; }
  .c4-stats { display: flex; gap: 24px; justify-content: center; font-size: 14px; opacity: 0.85; }

  /* 2048 */
  .t2048-board { max-width: 400px; margin: 0 auto; text-align: center; touch-action: none; }
  .t2048-info { display: flex; justify-content: center; gap: 24px; font-size: 16px; font-weight: 600; margin-bottom: 14px; }
  .t2048-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    background: rgba(0,0,0,0.4);
    padding: 8px;
    border-radius: 10px;
    max-width: 360px;
    margin: 0 auto 12px;
  }
  .t2048-cell {
    aspect-ratio: 1;
    background: rgba(255,255,255,0.08);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 800;
    color: white;
    transition: background 0.15s;
  }
  .t2048-cell[data-v="2"] { background: #efe5d9; color: #644; }
  .t2048-cell[data-v="4"] { background: #ede0c8; color: #644; }
  .t2048-cell[data-v="8"] { background: #f2b179; }
  .t2048-cell[data-v="16"] { background: #f59563; }
  .t2048-cell[data-v="32"] { background: #f67c5f; }
  .t2048-cell[data-v="64"] { background: #f65e3b; }
  .t2048-cell[data-v="128"] { background: #edcf72; font-size: 24px; }
  .t2048-cell[data-v="256"] { background: #edcc61; font-size: 24px; }
  .t2048-cell[data-v="512"] { background: #edc850; font-size: 24px; }
  .t2048-cell[data-v="1024"] { background: #edc53f; font-size: 20px; }
  .t2048-cell[data-v="2048"] { background: #edc22e; font-size: 20px; }
  .t2048-hint { font-size: 13px; opacity: 0.7; }

  /* SNAKE */
  .snake-board { max-width: 420px; margin: 0 auto; text-align: center; }
  .snake-info { display: flex; justify-content: center; gap: 24px; font-size: 16px; font-weight: 600; margin-bottom: 12px; }
  #snake-canvas {
    background: rgba(0,0,0,0.3);
    border-radius: 10px;
    max-width: 100%;
    height: auto;
    touch-action: none;
  }
  .snake-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 14px;
    gap: 8px;
  }
  .snake-dpad {
    width: 64px;
    height: 64px;
    font-size: 28px;
    background: rgba(255,255,255,0.1);
    color: white;
    border-radius: 10px;
  }
  .snake-dpad-row { display: flex; gap: 8px; }

  /* MINESWEEPER */
  .ms-board { max-width: 100%; margin: 0 auto; text-align: center; overflow-x: auto; }
  .ms-info { font-size: 14px; margin-bottom: 14px; }
  .ms-diff-btn {
    background: rgba(255,255,255,0.08);
    color: white;
    padding: 4px 10px;
    font-size: 13px;
    margin: 0 2px;
  }
  .ms-diff-btn.active { background: var(--gold); color: var(--felt-dark); }
  .ms-grid {
    display: inline-grid;
    gap: 1px;
    background: rgba(255,255,255,0.2);
    padding: 1px;
    border-radius: 6px;
    margin: 0 auto 12px;
  }
  .ms-cell {
    width: 34px;
    height: 34px;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }
  .ms-cell.revealed { background: rgba(0,0,0,0.3); cursor: default; }
  .ms-cell.flagged { background: rgba(245,197,66,0.3); }
  .ms-cell.mine { background: var(--red); }
  .ms-cell[data-n="1"] { color: #5fc7ff; }
  .ms-cell[data-n="2"] { color: #6fd06f; }
  .ms-cell[data-n="3"] { color: #ff7676; }
  .ms-cell[data-n="4"] { color: #b074ff; }
  .ms-cell[data-n="5"] { color: #ffb74d; }
  .ms-cell[data-n="6"] { color: #4dd0e1; }
  .ms-cell[data-n="7"] { color: #fff; }
  .ms-cell[data-n="8"] { color: #aaa; }
  .ms-hint { font-size: 12px; opacity: 0.6; max-width: 360px; margin: 0 auto; }
  @media (max-width: 720px) {
    .ms-cell { width: 36px; height: 36px; font-size: 18px; }
  }

  /* REVERSI */
  .rv-board { max-width: 480px; margin: 0 auto; text-align: center; }
  .rv-info { display: flex; justify-content: center; align-items: center; gap: 16px; font-size: 18px; font-weight: 700; margin-bottom: 8px; }
  .rv-status { min-height: 22px; margin-bottom: 12px; color: var(--gold); font-weight: 600; }
  .rv-piece {
    display: inline-block;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    vertical-align: middle;
  }
  .rv-piece.black { background: #1a1a1a; }
  .rv-piece.white { background: #fafafa; }
  .rv-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 2px;
    background: var(--felt-dark);
    padding: 6px;
    border-radius: 8px;
    max-width: 400px;
    margin: 0 auto;
  }
  .rv-cell {
    aspect-ratio: 1;
    background: #0e7c46;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s;
  }
  .rv-cell.valid:hover { background: #11a35a; }
  .rv-cell.valid::after {
    content: "";
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(245,197,66,0.5);
  }
  .rv-cell .rv-piece-large {
    width: 80%;
    height: 80%;
    border-radius: 50%;
    transition: transform 0.2s;
  }
  .rv-cell .rv-piece-large.black { background: #1a1a1a; box-shadow: inset 0 -2px 4px rgba(255,255,255,0.2); }
  .rv-cell .rv-piece-large.white { background: #fafafa; box-shadow: inset 0 -2px 4px rgba(0,0,0,0.2); }
  .rv-cell.valid::after { display: block; }
  .rv-cell:not(.valid)::after { display: none; }

  /* MODAL */
  .modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 200;
    padding: 20px;
  }
  .modal.active { display: flex; }
  .modal-box {
    background: var(--felt-dark);
    border: 2px solid var(--gold);
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    max-width: 400px;
  }
  .modal-box h2 { margin-bottom: 16px; color: var(--gold); }
  .modal-box p { margin-bottom: 20px; }
  .rules-box {
    max-width: 520px;
    text-align: left;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    padding: 24px;
  }
  .modal-close {
    position: absolute;
    top: 12px;
    right: 14px;
    background: transparent;
    color: white;
    font-size: 28px;
    line-height: 1;
    padding: 4px 10px;
    border-radius: 8px;
    opacity: 0.7;
  }
  .modal-close:hover { opacity: 1; background: rgba(255,255,255,0.08); }
  .modal-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 18px;
    border-bottom: 1px solid rgba(255,255,255,0.12);
    padding-bottom: 0;
  }
  .modal-tab {
    background: transparent;
    color: white;
    opacity: 0.6;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    padding: 10px 16px;
    font-weight: 600;
  }
  .modal-tab.active {
    opacity: 1;
    color: var(--gold);
    border-bottom-color: var(--gold);
  }
  .modal-tab-content h2 { text-align: left; }
  .rules-section { margin-bottom: 16px; }
  .rules-section h3 {
    color: var(--gold);
    font-size: 15px;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }
  .rules-section p, .rules-section li {
    line-height: 1.5;
    font-size: 14px;
    margin-bottom: 6px;
    opacity: 0.92;
  }
  .rules-section ul { padding-left: 20px; }
  .stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .stat-card {
    background: rgba(255,255,255,0.06);
    border-radius: 10px;
    padding: 14px;
    text-align: center;
  }
  .stat-card .stat-value {
    font-size: 26px;
    font-weight: 800;
    color: var(--gold);
    line-height: 1;
  }
  .stat-card .stat-label {
    font-size: 12px;
    opacity: 0.75;
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }
  .stats-empty {
    text-align: center;
    opacity: 0.6;
    font-size: 14px;
    padding: 30px 10px;
  }

  /* GO FISH (Veiðimaður) */
  .gf-board {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
  }
  .gf-cpu-area, .gf-player-area {
    background: rgba(0,0,0,0.18);
    border-radius: 12px;
    padding: 12px;
  }
  .gf-label {
    font-size: 14px;
    opacity: 0.75;
    margin-bottom: 8px;
    font-weight: 600;
  }
  .gf-plabel, .ce-plabel, .war-plabel, .bj-plabel {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
  }
  .war-plabel, .bj-plabel { justify-content: center; }
  .war-plabel h3, .bj-plabel .bj-label { margin: 0; }
  .gf-plabel .gf-label, .ce-plabel .ce-label { margin-bottom: 0; opacity: 0.92; }
  .gf-av, .ce-av, .war-av, .bj-av {
    width: 30px; height: 30px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 800; color: #fff; font-size: 14px; flex: none;
    background: #c0603f; box-shadow: 0 0 0 2px rgba(255,255,255,0.14);
  }
  .gf-av-you, .ce-av-you, .war-av-you, .bj-av-you { background: #3f7d5c; }
  .gf-cpu-area.gf-active, .gf-player-area.gf-active,
  .ce-cpu-area.ce-active, .ce-player-area.ce-active {
    background: rgba(245,197,66,0.13);
    box-shadow: inset 0 0 0 1.5px rgba(245,197,66,0.5);
  }
  .gf-cpu-area.gf-active .gf-av, .gf-player-area.gf-active .gf-av,
  .ce-cpu-area.ce-active .ce-av, .ce-player-area.ce-active .ce-av {
    box-shadow: 0 0 0 3px #f5c542;
  }
  .gf-cpu-cards, .gf-player-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    min-height: 100px;
  }
  .gf-player-cards .card {
    cursor: pointer;
    transition: transform 0.15s;
  }
  .gf-player-cards .card.askable:hover {
    transform: translateY(-6px);
    box-shadow: 0 4px 14px rgba(245,197,66,0.35);
  }
  .gf-player-cards .card:not(.askable) {
    opacity: 0.5;
    cursor: default;
  }
  .gf-middle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 8px 0;
  }
  .gf-pond-wrap {
    text-align: center;
  }
  .gf-pond-info {
    font-size: 13px;
    opacity: 0.75;
    margin-top: 6px;
  }
  .gf-status {
    text-align: center;
    font-size: 15px;
    min-height: 22px;
    padding: 6px 0;
    color: var(--gold);
    font-weight: 500;
  }
  .gf-books {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
    min-height: 30px;
  }
  .gf-book {
    background: rgba(245,197,66,0.18);
    border: 1px solid rgba(245,197,66,0.35);
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--gold);
  }
  .gf-score {
    font-size: 14px;
    opacity: 0.85;
    margin-top: 4px;
  }
  /* Modal-style ask helper text */
  .gf-help {
    text-align: center;
    font-size: 13px;
    opacity: 0.7;
    padding: 6px 0;
  }

  /* RESPONSIVE */
  @media (max-width: 720px) {
    .ad-zone-mrec-side { display: none !important; }
  }
  @media (max-width: 1199px) {
    /* Skyscraper þarf nógu mikið hliðarpláss til að flækjast ekki í game UI */
    .ad-zone-skyscraper { display: none !important; }
    .game-aside { display: none !important; }
  }

  /* ============ ORÐALEIT (WORD SEARCH) ============ */
  .ol-board {
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
  }
  .ol-info {
    margin-bottom: 14px;
  }
  .ol-themes {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    margin-bottom: 10px;
  }
  .ol-theme-btn {
    background: rgba(255,255,255,0.08);
    color: white;
    padding: 6px 14px;
    font-size: 13px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
  }
  .ol-theme-btn:hover { background: rgba(255,255,255,0.15); }
  .ol-theme-btn.active {
    background: var(--gold);
    color: var(--felt-dark);
    font-weight: 600;
  }
  .ol-controls {
    font-size: 14px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 6px;
  }
  .ol-diff-btn {
    background: rgba(255,255,255,0.08);
    color: white;
    padding: 4px 10px;
    font-size: 13px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
  }
  .ol-diff-btn:hover { background: rgba(255,255,255,0.15); }
  .ol-diff-btn.active {
    background: var(--gold);
    color: var(--felt-dark);
    font-weight: 600;
  }
  .ol-grid {
    display: grid;
    gap: 2px;
    margin: 0 auto 14px;
    background: rgba(0,0,0,0.18);
    padding: 6px;
    border-radius: 10px;
    width: fit-content;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
  }
  .ol-cell {
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.85);
    color: var(--felt-dark);
    font-weight: 600;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.1s;
  }
  .ol-cell:hover { background: rgba(255,255,255,1); }
  .ol-cell.selected {
    background: var(--gold);
    color: var(--felt-dark);
  }
  .ol-cell.found {
    background: #4caf50;
    color: white;
  }
  .ol-cell.found.selected {
    background: #2e7d32;
  }
  .ol-words {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    justify-content: center;
    padding: 10px;
    background: rgba(0,0,0,0.15);
    border-radius: 8px;
    max-width: 600px;
    margin: 0 auto;
  }
  .ol-word {
    font-size: 14px;
    padding: 2px 6px;
    color: white;
  }
  .ol-word.found {
    text-decoration: line-through;
    opacity: 0.4;
  }

  @media (max-width: 720px) {
    .ol-cell {
      width: 30px;
      height: 30px;
      font-size: 14px;
    }
    .ol-grid { gap: 1px; padding: 4px; }
    .ol-themes { gap: 4px; }
    .ol-theme-btn { padding: 5px 10px; font-size: 12px; }
    .ol-controls { font-size: 12px; gap: 4px; }
    .ol-word { font-size: 13px; }
  }

  /* Even smaller cells for hard difficulty 12x12 on narrow screens */
  @media (max-width: 420px) {
    .ol-grid[style*="repeat(12"] .ol-cell {
      width: 26px;
      height: 26px;
      font-size: 12px;
    }
  }

  /* ============ AD SYSTEM ============ */
  /* All ad slots are HIDDEN by default. JS adds .has-content when AD_SLOTS[slot].active=true */
  .ad-slot { display: none; }
  .ad-slot.has-content { display: flex; }

  .ad-slot {
    margin: 16px auto;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 8px;
  }
  .ad-slot a { display: block; line-height: 0; }
  .ad-slot img { display: block; max-width: 100%; height: auto; }

  /* Slot sizes */
  .ad-zone-leaderboard { width: 100%; max-width: 728px; min-height: 90px; }
  .ad-zone-mrec        { width: 100%; max-width: 300px; min-height: 250px; }
  .ad-zone-skyscraper  {
    /* Sticky innan .game-aside columns. Falinn á < 1200px (sjá responsive). */
    position: sticky;
    top: 80px;
    width: 160px;
    min-height: 600px;
    margin: 0;
  }
  /* Game page layout — main column + optional aside (skyscraper) */
  .game-layout {
    display: flex;
    align-items: flex-start;
    max-width: 1500px;
    margin: 0 auto;
  }
  .game-layout > main {
    flex: 1;
    min-width: 0;
  }
  .game-layout > .game-aside {
    width: 0;
    flex-shrink: 0;
    transition: width 0.25s, padding-left 0.25s;
  }
  /* When skyscraper is active, aside takes 200px of real space on desktop */
  @media (min-width: 1200px) {
    .game-layout:has(.ad-zone-skyscraper.has-content) > .game-aside {
      width: 184px;
      padding-left: 24px;
    }
  }
  .ad-zone-mobile-sticky {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(10,30,20,0.95);
    backdrop-filter: blur(8px);
    border-top: 1px solid rgba(245,197,66,0.2);
    padding: 6px 0;
    z-index: 999;
    margin: 0;
  }
  .ad-zone-mobile-sticky.has-content { display: flex; }

  /* Sidebars: only shown on wide screens, only on game screens */
  .game-with-sidebars {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    align-items: flex-start;
  }
  @media (min-width: 1280px) {
    .game-with-sidebars.has-side-ads {
      grid-template-columns: 160px 1fr 300px;
    }
  }
  @media (max-width: 1279px) {
    .ad-side-left, .ad-side-right { display: none !important; }
  }
  /* Hide mobile-sticky on desktop */
  @media (min-width: 720px) {
    .ad-zone-mobile-sticky { display: none !important; }
  }
  /* Body padding when mobile sticky is active */
  body.has-mobile-sticky main { padding-bottom: 70px; }
  /* ============ END AD SYSTEM ============ */

  /* Fljótandi spilastærðir svo 7/8 dálka raðir passi á mjóa síma */
  @media (max-width: 480px) {
    body[data-screen="freecell"] .freecell-top .pile {
      width: 100%; min-width: 0; height: auto; aspect-ratio: 50 / 72;
    }
    body[data-screen="freecell"] .freecell-tableau .pile { width: 100%; min-width: 0; }
    body[data-screen="freecell"] .card {
      width: 100%; height: auto; aspect-ratio: 50 / 72;
      padding: 2px 3px; font-size: 10px;
    }
    body[data-screen="freecell"] .card-corner { font-size: 9px; }
    body[data-screen="freecell"] .card-suit-large { font-size: 15px; }
  }
  @media (max-width: 420px) {
    body[data-screen="kapall"] .top-row .pile,
    body[data-screen="kapall-3"] .top-row .pile {
      width: 100%; min-width: 0; height: auto; aspect-ratio: 50 / 72;
    }
    body[data-screen="kapall"] .tableau .pile,
    body[data-screen="kapall-3"] .tableau .pile { width: 100%; min-width: 0; }
    body[data-screen="kapall"] .card,
    body[data-screen="kapall-3"] .card {
      width: 100%; height: auto; aspect-ratio: 50 / 72;
      padding: 2px 3px; font-size: 10px;
    }
    body[data-screen="kapall"] .card-corner,
    body[data-screen="kapall-3"] .card-corner { font-size: 9px; }
    body[data-screen="kapall"] .card-suit-large,
    body[data-screen="kapall-3"] .card-suit-large { font-size: 15px; }
  }

  @media (max-width: 768px) {
    .hero h1 { font-size: 32px; }
    .card { width: 50px; height: 72px; padding: 3px 4px; font-size: 12px; }
    .card-corner { font-size: 11px; }
    .card-suit-large { font-size: 22px; }
    .pile { width: 50px; height: 72px; }
    .top-row, .tableau, .freecell-top, .freecell-tableau { gap: 5px; }
    .memory-card { width: 60px; height: 80px; font-size: 28px; }
    main { padding: 12px; }
  }

/* ===================== MAHJONG SOLITAIRE ===================== */
.mj-statusbar{ display:flex; flex-wrap:wrap; gap:8px; align-items:center; justify-content:center; margin:0 auto 8px; }
.mj-statusbar .mj-stat{ background:rgba(0,0,0,0.22); border-radius:8px; padding:6px 12px; font-size:14px; font-weight:600; }
.mj-statusbar .mj-stat b{ color:var(--gold); }
.mj-stage{ width:100%; overflow:hidden; }
.mj-board-fit{ transform-origin:top center; transition:transform .15s; }
.mj-board{ position:relative; margin:6px auto 0; --mjtw:46px; --mjth:60px; }
.mj-tile{
  position:absolute; width:var(--mjtw); height:var(--mjth); border-radius:7px;
  background:#fbf7ec; border:1px solid #b9ad7d; color:#1a1a1a;
  box-shadow:0 0 0 1px rgba(0,0,0,.04) inset, -2px 2px 0 0 #d9cfa6, -3px 3px 0 0 #b9ad7d, -4px 5px 6px rgba(0,0,0,.35);
  display:flex; align-items:center; justify-content:center;
  font-size:calc(var(--mjth) * .62); line-height:1; cursor:pointer; user-select:none; transition:filter .1s;
}
.mj-tile.red{ color:#c0392b; }
.mj-tile.green{ color:#1e7d4f; }
.mj-tile.free:hover{ filter:brightness(1.04); }
.mj-tile.blocked{ cursor:default; }
.mj-tile.blocked::after{ content:""; position:absolute; inset:0; border-radius:7px; background:rgba(6,74,42,.34); }
.mj-tile.sel{ outline:3px solid var(--gold); outline-offset:-1px;
  box-shadow:-2px 2px 0 0 #d9cfa6, -3px 3px 0 0 #b9ad7d, 0 0 14px 3px rgba(245,197,66,.7); }
.mj-tile.hint{ animation:mjpulse .7s ease-in-out 3; }
@keyframes mjpulse{ 0%,100%{ box-shadow:-2px 2px 0 0 #d9cfa6,-3px 3px 0 0 #b9ad7d,-4px 5px 6px rgba(0,0,0,.35);} 50%{ box-shadow:0 0 16px 4px rgba(245,197,66,.9);} }


/* ===================== HENGIMANN ===================== */
.hm-wrap { max-width: 460px; margin: 0 auto; }
.hm-info { display:flex; justify-content:center; gap:16px; padding:6px 0; font-size:14px; }
.hm-info b { color: var(--gold); font-variant-numeric: tabular-nums; }
.hm-themes { display:flex; flex-wrap:wrap; gap:6px; justify-content:center; padding:6px 0 10px; }
.hm-themes button { font-family:inherit; cursor:pointer; border:none; border-radius:14px; padding:6px 12px; font-size:13px; font-weight:600; background:rgba(255,255,255,0.12); color:#fff; }
.hm-themes button.active { background:var(--gold); color:var(--felt-dark); }
.hm-board { display:flex; align-items:center; justify-content:center; gap:14px; background:rgba(0,0,0,0.18); border-radius:14px; padding:12px; }
.hm-gallows line, .hm-gallows circle { stroke:#e8e2d0; stroke-width:4; fill:none; stroke-linecap:round; }
.hm-part { opacity:0; transition:opacity .25s; }
.hm-part.on { opacity:1; }
.hm-status { flex:1; text-align:center; }
.hm-cat { font-size:13px; opacity:0.8; margin-bottom:6px; }
.hm-cat b { color:var(--gold); }
.hm-lives { font-size:13px; opacity:0.8; }
.hm-msg { min-height:24px; font-size:15px; font-weight:600; padding-top:6px; }
.hm-msg.win { color:#8bc34a; }
.hm-msg.lose { color:#e74c3c; }
.hm-word { display:flex; flex-wrap:wrap; gap:6px; justify-content:center; padding:16px 0 12px; }
.hm-slot { width:34px; height:44px; border-radius:8px; background:rgba(0,0,0,0.28); border-bottom:3px solid rgba(255,255,255,0.35); display:flex; align-items:center; justify-content:center; font-size:22px; font-weight:800; transition:background .2s; }
.hm-slot.show { background:rgba(245,197,66,0.18); border-bottom-color:var(--gold); }
.hm-slot.miss { background:rgba(231,76,60,0.25); border-bottom-color:#e74c3c; }
.hm-kb { display:grid; grid-template-columns:repeat(8,1fr); gap:6px; padding-top:6px; }
.hm-kb button { font-family:inherit; cursor:pointer; border:none; border-radius:8px; padding:10px 0; font-size:16px; font-weight:700; background:rgba(255,255,255,0.14); color:#fff; transition:background .15s, opacity .15s; }
.hm-kb button:disabled { cursor:default; }
.hm-kb button.hit { background:#8bc34a; color:#0b3d1e; }
.hm-kb button.missk { background:rgba(231,76,60,0.5); opacity:0.55; }
.hm-next { display:none; margin:14px auto 0; font-family:inherit; cursor:pointer; border:none; border-radius:8px; padding:11px 24px; font-size:15px; font-weight:700; background:var(--gold); color:var(--felt-dark); }
.hm-next.show { display:block; }
.hm-hint { text-align:center; font-size:13px; opacity:0.75; padding-top:12px; }
@media (prefers-reduced-motion: reduce){ .hm-part { transition:none; } }

/* ===================== MÚRBROT ===================== */
.bo-board { max-width: 480px; margin: 0 auto; }
.bo-info { display:flex; align-items:center; justify-content:center; gap:16px; margin:0 auto 8px; font-size:14px; flex-wrap:wrap; }
.bo-info b { color: var(--gold); font-variant-numeric: tabular-nums; }
#bo-canvas { display:block; width:100%; height:auto; background:rgba(0,0,0,0.22); border-radius:12px; box-shadow:0 2px 6px rgba(0,0,0,0.3); touch-action:none; }
.bo-hint { text-align:center; font-size:13px; opacity:0.75; padding-top:8px; line-height:1.5; }

/* ===================== GIMSTEINAR ===================== */
.g3-wrap { max-width: 440px; margin: 0 auto; }
.g3-info { display:flex; align-items:center; justify-content:center; gap:14px; margin:0 auto 6px; font-size:14px; flex-wrap:wrap; }
.g3-info b { color: var(--gold); font-variant-numeric: tabular-nums; }
.g3-goal { padding: 2px 2px 10px; }
.g3-goal-label { font-size:13px; opacity:0.85; padding-bottom:4px; }
.g3-goal-label b { color: var(--gold); }
.g3-goal-bar { height:8px; background:rgba(0,0,0,0.3); border-radius:4px; overflow:hidden; }
.g3-goal-fill { height:100%; width:0%; background:linear-gradient(90deg,var(--gold),#ffb84d); border-radius:4px; transition:width .25s; }
.g3-stage { position:relative; }
.g3-grid { display:grid; grid-template-columns:repeat(8,1fr); gap:4px; background:rgba(0,0,0,0.25); border-radius:14px; padding:8px; box-shadow:0 2px 6px rgba(0,0,0,0.3); touch-action:manipulation; }
.g3-cell { aspect-ratio:1; display:flex; align-items:center; justify-content:center; border-radius:9px; background:rgba(255,255,255,0.07); cursor:pointer; user-select:none; transition:transform .12s, background .12s, opacity .18s; }
.g3-cell .g3-gem { font-size:min(6.4vw,26px); line-height:1; transition:transform .15s; }
.g3-cell.sel { background:rgba(245,197,66,0.35); transform:scale(1.06); }
.g3-cell.pop .g3-gem { transform:scale(0); opacity:0; }
.g3-cell.stripe { box-shadow:inset 0 0 0 2px var(--gold); background:rgba(245,197,66,0.14); }
.g3-cell.bomb { box-shadow:inset 0 0 0 2px #fff; animation:g3pulse 0.9s infinite alternate; }
@keyframes g3pulse { from { background:rgba(255,255,255,0.10); } to { background:rgba(255,255,255,0.30); } }
.g3-float { position:absolute; color:var(--gold); font-weight:800; font-size:17px; pointer-events:none; text-shadow:0 1px 3px rgba(0,0,0,0.6); animation:g3rise 0.85s ease-out forwards; z-index:4; }
@keyframes g3rise { from { opacity:1; transform:translateY(0); } to { opacity:0; transform:translateY(-34px); } }
.g3-toast { text-align:center; color:var(--gold); font-weight:700; min-height:20px; font-size:14px; padding-top:6px; }
.g3-hint { text-align:center; font-size:13px; opacity:0.75; padding-top:8px; }
@media (prefers-reduced-motion: reduce){ .g3-cell.bomb { animation:none; background:rgba(255,255,255,0.2); } .g3-float { animation-duration:0.01s; } }

/* ===================== 15-ÞRAUTIN ===================== */
.fp-wrap { max-width: 440px; margin: 0 auto; }
.fp-info { display:flex; align-items:center; justify-content:center; gap:16px; margin:0 auto 6px; font-size:14px; flex-wrap:wrap; }
.fp-info b { color: var(--gold); font-variant-numeric: tabular-nums; }
.fp-controls { display:flex; justify-content:center; gap:8px; padding:4px 0 12px; flex-wrap:wrap; }
.fp-controls button { font-family:inherit; cursor:pointer; border:none; border-radius:8px; padding:8px 14px; font-size:14px; font-weight:600; background:rgba(255,255,255,0.12); color:#fff; }
.fp-controls button.active { background:var(--gold); color:var(--felt-dark); }
.fp-board { position:relative; margin:0 auto; background:rgba(0,0,0,0.25); border-radius:14px; padding:8px; box-shadow:0 2px 6px rgba(0,0,0,0.3); touch-action:manipulation; }
.fp-tile { position:absolute; display:flex; align-items:center; justify-content:center; background:linear-gradient(160deg,#fdeaa8 0%,var(--gold) 55%,#d9a92e 100%); color:var(--felt-dark); font-weight:800; border-radius:10px; cursor:pointer; box-shadow:0 2px 4px rgba(0,0,0,0.35); user-select:none; transition:left .12s ease, top .12s ease; }
.fp-hint { text-align:center; font-size:13px; opacity:0.75; padding-top:12px; }
@media (prefers-reduced-motion: reduce){ .fp-tile { transition:none; } }

/* ===================== KAPALL DRAG & DROP ===================== */
#sol-tableau .card.movable, #sol-waste .card.movable { touch-action: none; }
.sol-drag {
  position: fixed; z-index: 999; pointer-events: none;
  filter: drop-shadow(0 8px 14px rgba(0,0,0,0.45));
}
.sol-drag .card { position: absolute; left: 0; margin: 0; }

/* ===================== KÚLUSKOT ===================== */
.ks-board{ max-width:480px; margin:0 auto; }
.ks-info{ display:flex; align-items:center; justify-content:center; gap:16px; margin:0 auto 8px; font-size:14px; flex-wrap:wrap; }
.ks-info b{ color:var(--gold); font-variant-numeric:tabular-nums; }
.ks-dots{ display:flex; gap:5px; align-items:center; }
.ks-dots span{ width:9px; height:9px; border-radius:50%; background:rgba(255,255,255,0.25); transition:background .2s; }
.ks-dots span.on{ background:var(--gold); }
#ks-canvas{ display:block; width:100%; height:auto; background:rgba(0,0,0,0.22); border-radius:12px; box-shadow:0 2px 6px rgba(0,0,0,0.3); touch-action:none; cursor:crosshair; }
.ks-hint{ text-align:center; font-size:13px; opacity:0.75; padding-top:8px; }
@media (prefers-reduced-motion: reduce){ .ks-dots span{ transition:none; } }


/* === Multi-page architecture overrides === */
.logo,
.logo:hover,
.logo:visited {
  text-decoration: none;
  color: inherit;
}
.game-card,
.game-card:hover,
.game-card:visited {
  text-decoration: none;
  color: inherit;
}
.game-card h3 { color: #f4f2ec; }
.game-card:hover h3 { color: var(--gold); }
.game-card p  { color: rgba(255,255,255,0.85); }
.daily-banner,
.daily-banner:hover,
.daily-banner:visited { text-decoration: none; color: inherit; }
a.btn-secondary,
a.btn-primary {
  font-family: inherit;
  cursor: pointer;
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 600;
  transition: transform 0.1s, background 0.2s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
a.btn-secondary:hover,
a.btn-primary:hover { text-decoration: none; }
a.btn-secondary:active,
a.btn-primary:active { transform: scale(0.96); }
.site-footer {
  text-align: center;
  padding: 24px 16px;
  margin-top: 40px;
  color: rgba(255,255,255,0.7);
  font-size: 14px;
}
.site-footer nav a {
  color: var(--gold);
  text-decoration: none;
  margin: 0 4px;
}
.site-footer nav a:hover { text-decoration: underline; }
.site-footer p { margin-top: 8px; opacity: 0.7; }
.footer-guides {
  max-width: 1100px;
  margin: 0 auto 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  text-align: left;
}
.footer-guides > h2 {
  font-size: 15px;
  font-weight: 700;
  color: rgba(255,255,255,0.85);
  text-align: center;
  margin-bottom: 18px;
  letter-spacing: 0.02em;
}
.footer-guides .fg-cols {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px 24px;
}
.footer-guides .fg-col h3 {
  font-size: 13px;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 8px;
}
.footer-guides .fg-col ul { list-style: none; margin: 0; padding: 0; }
.footer-guides .fg-col li { margin: 0 0 5px; }
.footer-guides .fg-col a {
  color: rgba(255,255,255,0.62);
  text-decoration: none;
  font-size: 12.5px;
  line-height: 1.35;
}
.footer-guides .fg-col a:hover { color: rgba(255,255,255,0.95); text-decoration: underline; }
@media (max-width: 900px) { .footer-guides .fg-cols { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .footer-guides .fg-cols { grid-template-columns: repeat(2, 1fr); } }
.other-games {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.other-games h2 {
  text-align: center;
  color: var(--gold);
  font-size: 22px;
  margin-bottom: 20px;
}
.game-screen-wrap { width: 100%; }

/* Restore the original homepage width constraint that lived on #home */
body[data-screen="home"] main {
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}


/* === Multi-page architecture overrides === */
a.logo, a.game-card, .header-actions a, footer.site-footer a {
  color: inherit;
  text-decoration: none;
}
a.logo { display: flex; }  /* preserve flex layout when logo becomes <a> */
.header-actions a.btn-secondary { display: inline-flex; align-items: center; }

/* Visually hidden but accessible to screen readers + crawlers — used for
   per-game H1s that don't need to clutter the visible UI */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Game-page wrapper — game UI sits at top, SEO + other-games below */
.game-screen-wrap { max-width: 1100px; margin: 0 auto; }

/* "Other games" navigation block at bottom of each game page */
.other-games {
  max-width: 1100px;
  margin: 40px auto 20px;
  padding: 0 4px;
}
.other-games h2 {
  font-size: 18px;
  font-weight: 600;
  opacity: 0.85;
  margin-bottom: 14px;
  text-align: center;
}
.other-games .game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}
.other-games .game-card { padding: 12px; text-align: center; }
.other-games .game-card-icon { font-size: 28px; margin-bottom: 4px; }
.other-games .game-card h3 { font-size: 14px; margin-bottom: 0; }

/* Footer */
footer.site-footer {
  text-align: center;
  padding: 30px 20px 40px;
  opacity: 0.75;
  font-size: 14px;
}
footer.site-footer nav a {
  margin: 0 6px;
  border-bottom: 1px dotted rgba(255,255,255,0.4);
}
footer.site-footer nav a:hover { border-bottom-style: solid; }
footer.site-footer p { margin-top: 8px; }


/* === Multi-page layout patches (appended by build script) === */

/* Logo and game cards are now <a> elements; remove link styling. */
.logo, .game-card, .daily-banner {
  text-decoration: none;
  color: inherit;
}
.logo:hover, .game-card:hover, .daily-banner:hover {
  text-decoration: none;
}

/* Header "Heim" link styled as a button */
header a.btn-secondary,
.modal-box a.btn-secondary {
  text-decoration: none;
  display: inline-block;
}

/* Footer */
.site-footer {
  text-align: center;
  padding: 30px 20px 80px;
  margin-top: 40px;
  color: rgba(255,255,255,0.65);
  font-size: 14px;
}
.site-footer nav a {
  color: var(--gold);
  text-decoration: none;
  margin: 0 4px;
}
.site-footer nav a:hover { text-decoration: underline; }
.site-footer p { margin-top: 10px; }

/* "Aðrir leikir" navigation block on per-game pages */
.other-games {
  margin: 50px auto 20px;
  max-width: 1200px;
  padding: 0 20px;
}
.other-games h2 {
  text-align: center;
  margin: 0 0 25px;
  color: var(--gold);
  font-size: 22px;
}
.other-games .game-grid { margin: 0; }

/* Wrapper around the game UI on per-game pages, replaces the old #screen div */
.game-screen-wrap { display: block; }

/* === Guides (leiðbeiningar) === */
.breadcrumb { max-width: 760px; margin: 18px auto 0; padding: 0 16px; font-size: 14px; color: rgba(255,255,255,0.7); }
.breadcrumb a { color: var(--gold); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.guide-article { max-width: 760px; margin: 0 auto; padding: 4px 16px 0; line-height: 1.7; }
.guide-article h1 { font-size: 30px; line-height: 1.2; margin: 10px 0 16px; color: var(--gold); }
.guide-article h2 { font-size: 21px; margin: 26px 0 10px; color: var(--gold); }
.guide-article p { margin: 0 0 14px; }
.guide-article ul { margin: 0 0 14px; padding-left: 22px; }
.guide-article li { margin: 0 0 6px; }
.guide-cta { max-width: 760px; margin: 24px auto 8px; padding: 0 16px; text-align: center; }
.guide-cta a { display: inline-block; }
.guide-related { max-width: 760px; margin: 18px auto 0; padding: 0 16px; }
.guide-related h2 { font-size: 18px; margin: 18px 0 10px; }
.guide-related ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.guide-related a { display: inline-block; background: rgba(255,255,255,0.08); color: #fff; padding: 8px 14px; border-radius: 8px; text-decoration: none; font-size: 14px; }
.guide-related a:hover { background: rgba(255,255,255,0.16); }
.guides-index { max-width: 760px; margin: 0 auto; padding: 0 16px; list-style: none; }
.guides-index li { margin: 0 0 12px; }
.guides-index a { display: block; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08); border-radius: 12px; padding: 16px 18px; text-decoration: none; transition: background 0.15s; }
.guides-index a:hover { background: rgba(255,255,255,0.1); }
.guides-index strong { color: var(--gold); font-size: 18px; display: block; margin-bottom: 4px; }
.guides-index span { color: rgba(255,255,255,0.8); font-size: 14px; }
.game-guides { max-width: 1100px; margin: 30px auto 0; padding: 0 16px; }
.game-guides h2 { font-size: 18px; color: var(--gold); margin: 0 0 12px; text-align: center; }
.game-guides ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.game-guides a { display: inline-block; background: rgba(255,255,255,0.08); color: #fff; padding: 8px 14px; border-radius: 8px; text-decoration: none; font-size: 14px; }
.game-guides a:hover { background: rgba(255,255,255,0.16); }
