/*
Theme Name: Omslag
Theme URI: https://example.se/
Author: Du
Description: Ett spelbloggstema byggt kring stora omslag och korta rubriker. Startsidan är en vägg av omslag där senaste inlägget tar hela bredden.
Version: 1.14.1
Requires at least: 6.0
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: omslag
*/

/* ---------- Tokens ---------- */
:root {
  --bg: #F3F0F8;
  --surface: #FFFFFF;
  --ink: #1A1530;
  --muted: #5E5775;
  --line: #DAD4E6;
  --accent: #FFC83D;
  --on-accent: #1A1530;
  --scrim: rgba(18, 13, 36, 0.88);

  --display: "Big Shoulders Display", "Oswald", "Arial Narrow", Impact, sans-serif;
  --text: "Source Serif 4", Georgia, "Times New Roman", serif;
  --ui: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --gap: 6px;
  --wrap: 1440px;
  --measure: 66ch;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #17132A;
    --surface: #221C3B;
    --ink: #F1EDF7;
    --muted: #A69FBE;
    --line: #342C55;
  }
}
:root[data-theme="dark"] {
  --bg: #17132A;
  --surface: #221C3B;
  --ink: #F1EDF7;
  --muted: #A69FBE;
  --line: #342C55;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1rem/1.5 var(--ui);
}
img, video, iframe { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.screen-reader-text, .skip-link:not(:focus) {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}
.skip-link:focus {
  position: fixed; top: 12px; left: 12px; z-index: 100;
  background: var(--accent); color: var(--on-accent); padding: .6rem 1rem;
}
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gap); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: flex; align-items: center; gap: 1.5rem;
  min-height: 64px; padding: 0 clamp(12px, 2vw, 24px);
  max-width: var(--wrap); margin: 0 auto;
}
.site-logo {
  font: 900 2rem/1 var(--display);
  text-decoration: none; letter-spacing: -0.01em; white-space: nowrap;
}
.site-logo img { max-height: 40px; width: auto; }
.site-nav { flex: 1; min-width: 0; }
.site-nav ul {
  display: flex; gap: 1.25rem; list-style: none; margin: 0; padding: 0;
  overflow-x: auto; scrollbar-width: none;
}
.site-nav ul::-webkit-scrollbar { display: none; }
.site-nav a {
  display: block; padding: .5rem 0; white-space: nowrap;
  font: 600 .95rem/1 var(--ui); text-decoration: none; color: var(--muted);
}
.site-nav a:hover, .site-nav .current-menu-item > a, .site-nav .current-cat > a { color: var(--ink); }
.site-search { display: flex; }
.site-search input {
  width: 9rem; font: inherit; font-size: .9rem;
  padding: .5rem .75rem; border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); color: var(--ink);
}
@media (max-width: 720px) {
  .site-header__inner { flex-wrap: wrap; gap: 0 1rem; padding-top: .5rem; }
  .site-nav { order: 3; flex-basis: 100%; }
  .site-search { margin-left: auto; }
  .site-search input { width: 7.5rem; }
}

/* ---------- The wall of covers ---------- */
.wall {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--gap);
  padding: var(--gap);
  max-width: var(--wrap); margin: 0 auto;
}
.tile { position: relative; grid-column: span 2; overflow: hidden; background: var(--surface); }
.tile--lead { grid-column: 1 / -1; }
.tile--lg { grid-column: span 3; }

.tile__link { display: block; height: 100%; text-decoration: none; color: #fff; }
.tile__media {
  position: relative; aspect-ratio: 3 / 4; overflow: hidden;
  background: linear-gradient(150deg, var(--c, var(--accent)), #2A1F52 75%);
}
.tile--lead .tile__media { aspect-ratio: 21 / 9; }
.tile--lg .tile__media { aspect-ratio: 4 / 3; }
.tile__media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .5s cubic-bezier(.2,.7,.2,1);
}
.tile__link:hover .tile__media img { transform: scale(1.04); }
.tile__media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, var(--scrim) 0%, rgba(18,13,36,.55) 35%, transparent 65%);
}
.tile__body {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 1;
  padding: clamp(14px, 2vw, 28px);
  display: flex; flex-direction: column; align-items: flex-start; gap: .55rem;
}
.tile__title {
  margin: 0; font: 800 clamp(1.4rem, 2.1vw, 2rem)/1.08 var(--display);
  letter-spacing: -0.005em; text-wrap: balance;
  text-shadow: 0 1px 12px rgba(0,0,0,.35);
}
.tile--lg .tile__title { font-size: clamp(2rem, 3.6vw, 3.4rem); }
.tile--lead .tile__title { font-size: clamp(2.8rem, 7.5vw, 7rem); max-width: 14ch; line-height: 1; }
.tile__meta { margin: 0; font: 500 .82rem/1 var(--ui); color: rgba(255,255,255,.8); }
.tile--lead .tile__meta { font-size: .95rem; }

.chip {
  display: inline-block; padding: .32rem .6rem;
  background: var(--c, var(--accent)); color: var(--on-accent);
  font: 700 .78rem/1 var(--ui); border-radius: 3px; text-decoration: none;
}

@media (max-width: 900px) {
  .tile, .tile--lg { grid-column: span 3; }
  .tile.tile--lead { grid-column: 1 / -1; }
  .tile--lg .tile__media { aspect-ratio: 3 / 4; }
  .tile--lg .tile__title { font-size: clamp(1.4rem, 3.4vw, 2rem); }
  .tile--lead .tile__media { aspect-ratio: 4 / 5; }
}
@media (max-width: 560px) {
  .tile__title { font-size: 1.3rem; }
  .tile__body { padding: 12px; gap: .4rem; }
  .tile__meta { display: none; }
  .tile--lead .tile__meta { display: block; }
}

/* ---------- Section heads & pagination ---------- */
.page-head { max-width: var(--wrap); margin: 0 auto; padding: clamp(28px, 5vw, 64px) clamp(12px, 2vw, 24px) 12px; }
.page-head h1 { margin: 0; font: 900 clamp(2.6rem, 8vw, 6rem)/1.02 var(--display); }
.page-head p { margin: .75rem 0 0; color: var(--muted); max-width: 60ch; }
.load-more { display: flex; justify-content: center; padding: 32px 12px 64px; }
.load-more a, .button {
  display: inline-block; padding: .9rem 1.6rem; border-radius: 999px;
  background: var(--accent); color: var(--on-accent);
  font: 700 1rem/1 var(--ui); text-decoration: none; border: 0; cursor: pointer;
}
.load-more a[aria-busy="true"] { opacity: .6; pointer-events: none; }
.empty { padding: 64px 24px; text-align: center; color: var(--muted); }

/* ---------- Single post ---------- */
.post-hero { position: relative; max-width: var(--wrap); margin: 0 auto; padding: var(--gap); }
.post-hero__media { aspect-ratio: 16 / 9; max-height: 72vh; width: 100%; overflow: hidden; background: var(--surface); }
.post-hero__media img { width: 100%; height: 100%; object-fit: cover; }
.post-head { max-width: 1000px; margin: 0 auto; padding: clamp(24px, 4vw, 48px) clamp(16px, 3vw, 32px) 0; }
.post-head h1 {
  margin: .9rem 0 1rem; font: 900 clamp(2.6rem, 7vw, 5.6rem)/1.04 var(--display);
  text-wrap: balance;
}
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1.1rem; color: var(--muted); font-size: .92rem; }
.post-meta strong { color: var(--ink); font-weight: 600; }
.post-lede { font: 400 clamp(1.2rem, 2vw, 1.45rem)/1.5 var(--text); color: var(--muted); margin: 1.5rem 0 0; max-width: var(--measure); }

.entry {
  max-width: var(--measure); margin: 0 auto;
  padding: clamp(24px, 4vw, 40px) clamp(16px, 3vw, 32px) 48px;
  font: 400 1.18rem/1.72 var(--text);
}
.entry > * { margin-top: 0; margin-bottom: 1.3em; }
.entry h2, .entry h3 { font-family: var(--display); line-height: 1.12; margin-top: 1.8em; margin-bottom: .5em; }
.entry h2 { font-size: 2.3rem; font-weight: 800; }
.entry h3 { font-size: 1.7rem; font-weight: 700; }
.entry a { text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.entry blockquote {
  margin-left: 0; padding-left: 1.2rem; border-left: 4px solid var(--accent);
  font-size: 1.35rem; font-style: italic;
}
.entry figure { margin-left: 0; margin-right: 0; }
.entry figcaption, .wp-element-caption { font: 400 .85rem/1.4 var(--ui); color: var(--muted); margin-top: .5rem; }
.entry .alignwide { width: min(1100px, 92vw); max-width: none; margin-left: 50%; transform: translateX(-50%); }
.entry .alignfull { width: 100vw; max-width: none; margin-left: 50%; transform: translateX(-50%); }
.entry pre { overflow-x: auto; background: var(--surface); padding: 1rem; font-size: .9rem; }
.entry table { display: block; overflow-x: auto; border-collapse: collapse; }
.entry td, .entry th { border: 1px solid var(--line); padding: .5rem .75rem; }

.post-tags { max-width: var(--measure); margin: 0 auto; padding: 0 clamp(16px, 3vw, 32px) 32px; display: flex; flex-wrap: wrap; gap: .5rem; }
.post-tags a { font-size: .85rem; padding: .35rem .7rem; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--muted); }

.related { border-top: 1px solid var(--line); margin-top: 24px; }
.related h2 { max-width: var(--wrap); margin: 0 auto; padding: 32px clamp(12px, 2vw, 24px) 8px; font: 800 2rem/1.1 var(--display); }

/* ---------- Comments ---------- */
.comments { max-width: var(--measure); margin: 0 auto; padding: 0 clamp(16px, 3vw, 32px) 48px; }
.comments h2 { font: 800 1.8rem/1 var(--display); }
.comment-list { list-style: none; padding: 0; }
.comment-list .comment { padding: 1rem 0; border-top: 1px solid var(--line); }
.comment-form input:not([type=submit]):not([type=checkbox]), .comment-form textarea {
  width: 100%; font: inherit; padding: .7rem; border: 1px solid var(--line); background: var(--surface); color: var(--ink);
}
.comment-form input[type=submit] {
  padding: .9rem 1.6rem; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--accent); color: var(--on-accent); font: 700 1rem/1 var(--ui);
}

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); margin-top: 32px; }
.site-footer__inner {
  max-width: var(--wrap); margin: 0 auto; padding: 40px clamp(12px, 2vw, 24px);
  display: flex; flex-wrap: wrap; gap: 1.5rem 3rem; align-items: flex-end; justify-content: space-between;
}
.site-footer .site-logo { font-size: 2.6rem; }
.site-footer p { margin: .4rem 0 0; color: var(--muted); }
.site-footer ul { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; list-style: none; margin: 0; padding: 0; }
.site-footer ul a { color: var(--muted); text-decoration: none; font-size: .92rem; }
.site-footer ul a:hover { color: var(--ink); }

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

/* ---------- Betygsmätaren ---------- */
.tile__meta { display: flex; flex-wrap: wrap; gap: .3rem .9rem; }

.rating {
  display: grid; grid-template-columns: minmax(200px, 260px) 1fr; gap: 1.25rem 2rem; align-items: center;
  margin: 2.4em 0; padding: clamp(20px, 3vw, 32px);
  background: var(--surface); border-radius: 8px; font-family: var(--ui);
}
.rating p { margin: 0; }
.gauge { color: var(--ink); }
.gauge svg { display: block; width: 100%; height: auto; overflow: visible; }
.gauge__needle {
  transform-box: view-box; transform-origin: 100px 100px;
  transform: rotate(var(--angle));
  transition: transform 1.5s cubic-bezier(.3, 1.45, .45, 1);
}
.js .gauge:not(.is-visible) .gauge__needle { transform: rotate(-90deg); }
.gauge__scale {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-top: .35rem; font: 700 .85rem/1 var(--ui); color: var(--muted);
}
.rating--solo { grid-template-columns: 1fr; justify-items: center; }
.rating--solo .gauge { width: min(320px, 100%); }
.rating__verdict { font: 400 1.2rem/1.5 var(--text); }
.rating__facts { display: flex; flex-wrap: wrap; gap: .3rem 1rem; margin-top: .9rem !important; font-size: .9rem; color: var(--muted); }
@media (max-width: 600px) {
  .rating { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .gauge { max-width: 260px; margin: 0 auto; width: 100%; }
  .rating__facts { justify-content: center; }
}

/* ---------- Helbredd: bild, video, inbäddning ---------- */
body { overflow-x: clip; }
.entry .alignfull, .entry .alignwide { margin-top: 2em; margin-bottom: 2em; }
.entry .wp-block-video video,
.entry .wp-block-image img { width: 100%; }
.entry .wp-block-video.alignfull video { max-height: 90vh; background: #000; }
.entry .wp-block-video.alignfull figcaption,
.entry .wp-block-image.alignfull figcaption { padding: 0 clamp(16px, 3vw, 32px); }
.entry .wp-block-embed.alignfull .wp-block-embed__wrapper,
.entry .wp-block-embed.alignwide .wp-block-embed__wrapper { position: relative; aspect-ratio: 16 / 9; }
.entry .wp-block-embed.alignfull iframe,
.entry .wp-block-embed.alignwide iframe { position: absolute; inset: 0; width: 100%; height: 100%; }
.entry .wp-block-embed iframe { max-width: 100%; }

/* ---------- Slider (Galleri med stilen "Slider") ---------- */
.slider { position: relative; }
.entry .slider { margin-top: 2em; margin-bottom: 2em; }
.entry .wp-block-gallery.is-style-slider,
.entry .wp-block-gallery.is-style-slider.has-nested-images {
  display: flex !important; flex-wrap: nowrap !important; gap: 0 !important;
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory;
  scroll-behavior: smooth; scrollbar-width: none; margin: 0 !important; padding: 0;
  background: #000;
}
.entry .wp-block-gallery.is-style-slider::-webkit-scrollbar { display: none; }
.entry .wp-block-gallery.is-style-slider.has-nested-images figure.wp-block-image:not(#omslag) {
  flex: 0 0 100% !important; width: 100% !important; max-width: 100%; margin: 0 !important;
  scroll-snap-align: center; position: relative; aspect-ratio: 16 / 9;
}
.entry .wp-block-gallery.is-style-slider.has-nested-images figure.wp-block-image:not(#omslag) img {
  width: 100% !important; height: 100% !important; object-fit: cover;
}
.entry .wp-block-gallery.is-style-slider.has-nested-images figure.wp-block-image figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; margin: 0; padding: 2.5rem 1rem .8rem;
  background: linear-gradient(to top, rgba(0,0,0,.75), transparent); color: #fff;
  font: 500 .9rem/1.4 var(--ui); text-align: left; max-height: none;
}
.entry .wp-block-gallery.is-style-slider > .blocks-gallery-caption { display: none; }
.entry .slider__caption { font: 400 .85rem/1.4 var(--ui); color: var(--muted); margin: -1.4em 0 2em; padding: 0 clamp(16px, 3vw, 32px); }
.slider__btn {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 48px; height: 48px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(18, 13, 36, .7); color: #fff; font-size: 1.5rem; line-height: 1;
  display: grid; place-items: center;
}
.slider__btn:hover { background: rgba(18, 13, 36, .9); }
.slider__btn[disabled] { opacity: .3; cursor: default; }
.slider__btn--prev { left: 12px; }
.slider__btn--next { right: 12px; }
.slider__count {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  padding: .35rem .65rem; border-radius: 999px; background: rgba(18, 13, 36, .7);
  color: #fff; font: 600 .8rem/1 var(--ui);
}
@media (max-width: 600px) {
  .slider__btn { width: 38px; height: 38px; font-size: 1.2rem; }
  .entry .wp-block-gallery.is-style-slider.has-nested-images figure.wp-block-image:not(#omslag) { aspect-ratio: 4 / 3; }
}

/* ---------- Video på omslaget ---------- */
.tile__play {
  position: absolute; z-index: 1; left: 50%; top: 42%;
  width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%;
  background: rgba(18, 13, 36, .55); border: 2px solid rgba(255, 255, 255, .9);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  transition: transform .2s ease, background-color .2s ease;
}
.tile__play::before {
  content: ""; position: absolute; left: 50%; top: 50%; margin: -11px 0 0 -7px;
  border-style: solid; border-width: 11px 0 11px 18px; border-color: transparent transparent transparent #fff;
}
.tile--lead .tile__play { width: 92px; height: 92px; margin: -46px 0 0 -46px; top: 45%; }
.tile--lead .tile__play::before { margin: -15px 0 0 -9px; border-width: 15px 0 15px 25px; }
.tile__link:hover .tile__play { transform: scale(1.08); background: var(--c, var(--accent)); }
.tile__link:hover .tile__play { border-color: var(--c, var(--accent)); }

.tile__player { position: absolute; inset: 0; z-index: 3; background: #000; }
.tile__player video, .tile__player iframe { width: 100%; height: 100%; border: 0; object-fit: contain; display: block; }
.tile__close, .tile__open {
  position: absolute; z-index: 4; top: 10px;
  background: rgba(18, 13, 36, .75); color: #fff; border: 0; cursor: pointer;
  font: 600 .85rem/1 var(--ui); text-decoration: none;
}
.tile__close { right: 10px; width: 36px; height: 36px; border-radius: 50%; font-size: 1.3rem; display: grid; place-items: center; }
.tile__open { left: 10px; padding: .6rem .8rem; border-radius: 999px; }
.tile__close:hover, .tile__open:hover { background: var(--c, var(--accent)); color: var(--on-accent); }
.tile.is-playing .tile__link { visibility: hidden; }

.post-hero--video .post-hero__media { background: #000; }
.post-hero--video video, .post-hero--video iframe { width: 100%; height: 100%; border: 0; display: block; object-fit: contain; }

/* ---------- Pixelloggan ---------- */
.site-logo--pixel { display: block; line-height: 0; }
.site-logo--pixel svg { display: block; height: 34px; width: auto; max-width: 100%; }
.site-footer .site-logo--pixel svg { height: 52px; }
.site-logo--pixel:hover svg { filter: drop-shadow(0 0 6px rgba(95, 246, 230, .55)); }
.rr-spark { animation: rr-blink 2.4s steps(1, end) infinite; }
.rr-spark--b { animation-delay: .8s; }
.rr-spark--c { animation-delay: 1.6s; }
@keyframes rr-blink { 0%, 60% { opacity: 1; } 61%, 100% { opacity: 0; } }
@media (max-width: 720px) {
  .site-header .site-logo--pixel svg { height: 26px; }
}

/* ---------- Galleri: Rutnät och Mosaik ---------- */
.entry .wp-block-gallery.is-style-rutnat.has-nested-images,
.entry .wp-block-gallery.is-style-mosaik.has-nested-images {
  display: grid !important; gap: 6px !important; margin-top: 2em; margin-bottom: 2em;
}
.entry .wp-block-gallery.is-style-rutnat.has-nested-images { grid-template-columns: repeat(3, 1fr); }
.entry .wp-block-gallery.is-style-mosaik.has-nested-images { grid-template-columns: repeat(4, 1fr); grid-auto-flow: dense; }
.entry .wp-block-gallery.is-style-rutnat.has-nested-images figure.wp-block-image:not(#omslag),
.entry .wp-block-gallery.is-style-mosaik.has-nested-images figure.wp-block-image:not(#omslag) {
  width: auto !important; margin: 0 !important; aspect-ratio: 1; position: relative; overflow: hidden; cursor: zoom-in;
}
.entry .wp-block-gallery.is-style-mosaik.has-nested-images figure.wp-block-image:first-child:not(#omslag) {
  grid-column: span 2; grid-row: span 2;
}
.entry .wp-block-gallery.is-style-rutnat.has-nested-images figure.wp-block-image:not(#omslag) img,
.entry .wp-block-gallery.is-style-mosaik.has-nested-images figure.wp-block-image:not(#omslag) img {
  width: 100% !important; height: 100% !important; object-fit: cover; transition: transform .4s cubic-bezier(.2,.7,.2,1);
}
.entry .wp-block-gallery.is-style-rutnat figure.wp-block-image:hover img,
.entry .wp-block-gallery.is-style-mosaik figure.wp-block-image:hover img { transform: scale(1.04); }
.entry .wp-block-gallery.is-style-rutnat figure.wp-block-image figcaption,
.entry .wp-block-gallery.is-style-mosaik figure.wp-block-image figcaption { display: none; }
.entry .wp-block-gallery.is-style-rutnat > .blocks-gallery-caption,
.entry .wp-block-gallery.is-style-mosaik > .blocks-gallery-caption {
  grid-column: 1 / -1; font: 400 .85rem/1.4 var(--ui); color: var(--muted); text-align: left; margin: .2rem 0 0;
}
@media (max-width: 600px) {
  .entry .wp-block-gallery.is-style-rutnat.has-nested-images { grid-template-columns: repeat(2, 1fr); }
  .entry .wp-block-gallery.is-style-mosaik.has-nested-images { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Ljuslåda ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center;
  background: rgba(10, 7, 22, .94); padding: env(safe-area-inset-top, 0px) 0 env(safe-area-inset-bottom, 0px);
}
.lightbox[hidden] { display: none; }
.lightbox__figure { margin: 0; max-width: 94vw; max-height: 86vh; display: flex; flex-direction: column; align-items: center; }
.lightbox__figure img { max-width: 94vw; max-height: 80vh; width: auto; height: auto; object-fit: contain; }
.lightbox__figure figcaption { color: #fff; font: 400 .9rem/1.4 var(--ui); margin-top: .7rem; text-align: center; }
.lightbox button {
  position: absolute; border: 0; cursor: pointer; background: rgba(255,255,255,.12); color: #fff;
  width: 48px; height: 48px; border-radius: 50%; font-size: 1.6rem; line-height: 1; display: grid; place-items: center;
}
.lightbox button:hover { background: var(--accent); color: var(--on-accent); }
.lightbox__close { top: calc(14px + env(safe-area-inset-top, 0px)); right: 14px; }
.lightbox__prev { left: 14px; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 14px; top: 50%; transform: translateY(-50%); }
.lightbox__count { position: absolute; top: calc(24px + env(safe-area-inset-top, 0px)); left: 18px; color: #fff; font: 600 .85rem/1 var(--ui); }
body.has-lightbox { overflow: hidden; }

/* ---------- Prisuppgifter ---------- */
.prices { line-height: 1.4; margin: 2.4em 0; padding: clamp(18px, 3vw, 28px); background: var(--surface); border-radius: 8px; font-family: var(--ui); }
.prices__title { margin: 0 0 1rem !important; font: 800 1.9rem/1.1 var(--display) !important; }
.prices__head, .prices__row { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)); gap: .75rem; align-items: center; }
.prices__head { font-size: .8rem; font-weight: 700; color: var(--muted); padding-bottom: .5rem; border-bottom: 1px solid var(--line); }
.prices__list { list-style: none; margin: 0; padding: 0; }
.prices__row { padding: .8rem 0; border-bottom: 1px solid var(--line); }
.prices__game { text-decoration: none !important; display: flex; flex-direction: column; min-width: 0; }
.prices__game strong { font-weight: 700; font-size: 1rem; line-height: 1.3; }
.prices__game span { font-size: .82rem; color: var(--muted); }
.prices__game:hover strong { color: var(--c, var(--accent)); }
.prices__cell { display: flex; flex-direction: column; font-variant-numeric: tabular-nums; }
.prices__sek { font-weight: 700; font-size: 1rem; white-space: nowrap; }
.prices__usd { font-size: .8rem; color: var(--muted); }
.prices__na { color: var(--muted); }
.prices__source { margin: .9rem 0 0 !important; font-size: .82rem; line-height: 1.5; color: var(--muted); }
.prices__links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.prices__links a {
  display: inline-block; padding: .5rem .9rem; border-radius: 999px; border: 1px solid var(--line);
  text-decoration: none !important; font-weight: 600; font-size: .95rem;
}
.prices__links a:hover { border-color: var(--c, var(--accent)); }
@media (max-width: 600px) {
  .prices__head { display: none; }
  .prices__row { grid-template-columns: repeat(3, 1fr); row-gap: .5rem; }
  .prices__game { grid-column: 1 / -1; }
  .prices__cell::before { content: attr(data-label); font-size: .75rem; color: var(--muted); }
  .prices__sek { font-size: .9rem; }
}

/* ---------- Hero på startsidan ---------- */
.has-hero .wall { padding-top: 0; }
.has-hero .tile--lead {
  grid-column: 1 / -1; width: 100vw; margin-left: calc(50% - 50vw); margin-bottom: 0;
}
.has-hero .tile--lead .tile__media { aspect-ratio: auto; height: min(88vh, 920px); min-height: 460px; }
@supports (height: 1svh) { .has-hero .tile--lead .tile__media { height: min(88svh, 920px); } }
.has-hero .tile--lead .tile__media::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 34%; z-index: 1; pointer-events: none;
  background: linear-gradient(to bottom, rgba(12, 8, 28, .72), rgba(12, 8, 28, 0));
}
.has-hero .tile--lead .tile__body {
  padding-left: max(clamp(14px, 2vw, 28px), calc((100vw - var(--wrap)) / 2 + 24px));
  padding-right: max(clamp(14px, 2vw, 28px), calc((100vw - var(--wrap)) / 2 + 24px));
  padding-bottom: clamp(28px, 5vw, 64px);
}
.has-hero .tile--lead .tile__title { font-size: clamp(3rem, 8vw, 7.5rem); }

/* Menyn ovanpå heron (kräver JavaScript, annars vanlig meny). */
.js .has-hero .site-header {
  position: fixed; left: 0; right: 0; top: 0;
  background: transparent; border-bottom-color: transparent; color: #fff;
  transition: background-color .25s ease, border-color .25s ease, color .25s ease;
}
.js .has-hero.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .js .has-hero.admin-bar .site-header { top: 46px; } }
.js .has-hero .site-header:not(.is-solid) .site-nav a { color: rgba(255, 255, 255, .85); text-shadow: 0 1px 8px rgba(0, 0, 0, .4); }
.js .has-hero .site-header:not(.is-solid) .site-nav a:hover { color: #fff; }
.js .has-hero .site-header:not(.is-solid) .site-search input {
  background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .35); color: #fff;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.js .has-hero .site-header:not(.is-solid) .site-search input::placeholder { color: rgba(255, 255, 255, .75); }
.js .has-hero .site-header.is-solid { background: var(--bg); border-bottom-color: var(--line); color: var(--ink); }
.js .has-hero .tile--lead .tile__close,
.js .has-hero .tile--lead .tile__open { top: calc(var(--header-h, 64px) + 10px); }

/* Heron: rubrik, kategori och lästid inne i bilden, inte i en mörk list längst ner. */
.has-hero .tile--lead .tile__media::after {
  background:
    linear-gradient(90deg, rgba(12, 8, 28, .78) 0%, rgba(12, 8, 28, .45) 38%, rgba(12, 8, 28, 0) 68%),
    linear-gradient(to top, rgba(12, 8, 28, .35) 0%, rgba(12, 8, 28, 0) 30%);
}
.has-hero .tile--lead .tile__body {
  top: 0; bottom: 0; justify-content: flex-end;
  padding-bottom: clamp(72px, 17vh, 190px);
}
.has-hero .tile--lead .tile__title { max-width: 12ch; }
@media (max-width: 720px) {
  .has-hero .tile--lead .tile__media::after {
    background: linear-gradient(to top, rgba(12, 8, 28, .15) 0%, rgba(12, 8, 28, .7) 30%, rgba(12, 8, 28, .45) 55%, rgba(12, 8, 28, 0) 75%);
  }
  .has-hero .tile--lead .tile__body { padding-bottom: clamp(56px, 13vh, 120px); }
}

/* Loggans vita högdager: vit på mörkt och över heron, ljust turkos på ljus bakgrund. */
:root { --logo-hi: #8FF0E6; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --logo-hi: #FFFFFF; } }
:root[data-theme="dark"] { --logo-hi: #FFFFFF; }
.js .has-hero .site-header:not(.is-solid) { --logo-hi: #FFFFFF; }


/* Videofil utan omslagsbild: första bildrutan fyller omslaget. */
.tile__media .tile__still { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.tile__link:hover .tile__media .tile__still { transform: scale(1.04); transition: transform .5s cubic-bezier(.2,.7,.2,1); }

/* =========================================================
   Forumrutan på startsidan
   ========================================================= */
.tile--forum { background: var(--surface); --c: var(--accent); }
.forum-tile {
  display: flex; flex-direction: column; height: 100%;
  padding: clamp(16px, 1.8vw, 24px); font-family: var(--ui);
  border-top: 4px solid transparent;
  border-image: linear-gradient(90deg, #5FF6E6, #FF4FB0) 1;
}
@media (min-width: 1200px) { .tile--forum { aspect-ratio: 3 / 4; } }
.forum-tile__head { display: flex; flex-direction: column; align-items: flex-start; gap: .5rem; margin-bottom: .6rem; }
.forum-tile__title { margin: 0; font: 800 clamp(1.5rem, 2.1vw, 2rem)/1.08 var(--display); }
.forum-tile__list { list-style: none; margin: 0; padding: 0; flex: 1; display: flex; flex-direction: column; }
.forum-tile__item { border-top: 1px solid var(--line); }
.forum-tile__item:first-child { border-top: 0; }
.forum-tile__link { display: block; padding: .62rem 0; text-decoration: none; color: var(--ink); }
.forum-tile__topic {
  display: block; font-weight: 700; font-size: .98rem; line-height: 1.3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.forum-tile__link:hover .forum-tile__topic { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }
.forum-tile__meta { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .6rem; margin-top: .3rem; font-size: .78rem; color: var(--muted); }
.forum-tile__cat {
  display: inline-block; padding: .18rem .45rem; border-radius: 3px;
  background: var(--c); color: var(--on-accent); font-weight: 700; font-size: .72rem; line-height: 1.2;
}
.forum-tile__count { margin-left: auto; font-variant-numeric: tabular-nums; }
.forum-tile__empty { color: var(--muted); margin: .5rem 0 1rem; flex: 1; }
.forum-tile__all {
  align-self: flex-start; margin-top: .8rem; padding: .6rem 1rem; border-radius: 999px;
  background: var(--accent); color: var(--on-accent); font-weight: 700; font-size: .9rem; text-decoration: none;
}
.forum-tile__all:hover { filter: brightness(1.08); }
@media (max-width: 1199px) { .forum-tile__item:nth-child(n+6) { display: none; } }
@media (max-width: 900px) { .tile--forum { grid-column: span 3; } }
@media (max-width: 560px) {
  .tile--forum { grid-column: 1 / -1; }
  .forum-tile__item:nth-child(n+6) { display: list-item; }
}

/* =========================================================
   Forumsidorna (bbPress) i temats stil
   ========================================================= */
.forum-page { --row-alt: color-mix(in srgb, var(--surface) 55%, transparent); }
.forum-page__head h1 { margin-top: .6rem; }
.forum-wrap { max-width: 1100px; margin: 0 auto; padding: 8px clamp(12px, 2vw, 24px) 48px; }

#bbpress-forums { font: 400 1rem/1.5 var(--ui) !important; color: var(--ink); background: transparent; overflow: visible; }
#bbpress-forums a { color: var(--ink); }
#bbpress-forums a:hover { color: var(--ink); text-decoration-color: var(--accent); }
#bbpress-forums .bbp-breadcrumb { float: none; margin: 0 0 14px; font-size: .9rem; color: var(--muted); }
#bbpress-forums .bbp-breadcrumb p { margin: 0; }
#bbpress-forums .bbp-breadcrumb a { color: var(--muted); text-decoration: none; }
#bbpress-forums .bbp-breadcrumb a:hover { color: var(--ink); }
#bbpress-forums .bbp-breadcrumb-current { color: var(--ink); font-weight: 600; }

/* Listor: forum, trådar, svar, sökresultat */
#bbpress-forums ul.bbp-forums, #bbpress-forums ul.bbp-topics, #bbpress-forums ul.bbp-replies,
#bbpress-forums ul.bbp-search-results, #bbpress-forums ul.bbp-lead-topic {
  font-size: 1rem !important; border: 1px solid var(--line) !important; border-radius: 8px;
  overflow: hidden; background: transparent; list-style: none; margin: 0 0 24px; padding: 0;
}
#bbpress-forums li.bbp-header, #bbpress-forums li.bbp-footer {
  background: var(--surface) !important; border-color: var(--line) !important; color: var(--muted);
  font: 700 .8rem/1.3 var(--ui); text-transform: none; padding: 10px 16px !important; text-align: left;
}
#bbpress-forums li.bbp-footer { display: none; }
#bbpress-forums li.bbp-body { background: transparent; }
#bbpress-forums div.odd, #bbpress-forums ul.odd { background-color: transparent !important; }
#bbpress-forums div.even, #bbpress-forums ul.even { background-color: var(--row-alt) !important; }
#bbpress-forums .super-sticky, #bbpress-forums .sticky,
#bbpress-forums .super-sticky.odd, #bbpress-forums .sticky.odd,
#bbpress-forums .super-sticky.even, #bbpress-forums .sticky.even {
  background-color: color-mix(in srgb, var(--accent) 14%, transparent) !important;
}

/* Rader som rutnät i stället för flytande kolumner */
#bbpress-forums ul.forum-titles, #bbpress-forums li.bbp-body ul.forum, #bbpress-forums li.bbp-body ul.topic {
  display: grid; grid-template-columns: minmax(0, 1fr) 5.5rem 5.5rem minmax(9rem, 13rem);
  gap: .5rem 1rem; align-items: center; list-style: none; margin: 0; padding: 0;
}
#bbpress-forums li.bbp-body ul.forum, #bbpress-forums li.bbp-body ul.topic {
  border-top: 1px solid var(--line) !important; padding: 14px 16px !important; overflow: visible;
}
#bbpress-forums li.bbp-body ul.forum:first-child, #bbpress-forums li.bbp-body ul.topic:first-child { border-top: 0 !important; }
#bbpress-forums li.bbp-forum-info, #bbpress-forums li.bbp-topic-title,
#bbpress-forums li.bbp-forum-topic-count, #bbpress-forums li.bbp-forum-reply-count,
#bbpress-forums li.bbp-topic-voice-count, #bbpress-forums li.bbp-topic-reply-count,
#bbpress-forums li.bbp-forum-freshness, #bbpress-forums li.bbp-topic-freshness {
  float: none !important; width: auto !important; margin: 0; padding: 0; list-style: none;
}
#bbpress-forums li.bbp-forum-topic-count, #bbpress-forums li.bbp-forum-reply-count,
#bbpress-forums li.bbp-topic-voice-count, #bbpress-forums li.bbp-topic-reply-count {
  text-align: center; font-variant-numeric: tabular-nums; color: var(--muted);
}
#bbpress-forums li.bbp-forum-freshness, #bbpress-forums li.bbp-topic-freshness { text-align: left; font-size: .85rem; color: var(--muted); }
#bbpress-forums a.bbp-forum-title, #bbpress-forums a.bbp-topic-permalink {
  font: 800 1.35rem/1.15 var(--display); text-decoration: none; display: inline-block;
}
#bbpress-forums a.bbp-topic-permalink { font: 700 1.05rem/1.3 var(--ui); }
#bbpress-forums a.bbp-forum-title:hover, #bbpress-forums a.bbp-topic-permalink:hover { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }
#bbpress-forums .bbp-forum-content, #bbpress-forums p.bbp-topic-meta, #bbpress-forums .bbp-topic-meta {
  font-size: .85rem !important; color: var(--muted); margin: .25rem 0 0 !important;
}
#bbpress-forums .bbp-topic-meta a, #bbpress-forums .bbp-forum-freshness a, #bbpress-forums .bbp-topic-freshness a { color: var(--muted); }
#bbpress-forums .bbp-author-avatar img.avatar, #bbpress-forums p.bbp-topic-meta img.avatar { border-radius: 50%; vertical-align: middle; }
#bbpress-forums ul.bbp-forums-list { margin: .4rem 0 0; padding: 0; border: 0; list-style: none; display: flex; flex-wrap: wrap; gap: .3rem .8rem; font-size: .85rem; }

@media (max-width: 720px) {
  #bbpress-forums ul.forum-titles, #bbpress-forums li.bbp-body ul.forum, #bbpress-forums li.bbp-body ul.topic { grid-template-columns: minmax(0, 1fr) auto; }
  #bbpress-forums li.bbp-forum-topic-count, #bbpress-forums li.bbp-topic-voice-count,
  #bbpress-forums li.bbp-forum-freshness, #bbpress-forums li.bbp-topic-freshness,
  #bbpress-forums ul.forum-titles li:not(:first-child):not(.bbp-forum-reply-count):not(.bbp-topic-reply-count) { display: none; }
}

/* Trådar och svar */
#bbpress-forums div.bbp-forum-header, #bbpress-forums div.bbp-topic-header, #bbpress-forums div.bbp-reply-header {
  background: var(--surface) !important; border-top: 1px solid var(--line) !important; padding: 8px 16px; font-size: .82rem; color: var(--muted);
}
#bbpress-forums .bbp-meta { display: flex; justify-content: space-between; }
#bbpress-forums .bbp-meta .bbp-reply-permalink, #bbpress-forums .bbp-meta .bbp-topic-permalink { float: none; color: var(--muted); margin: 0; }
#bbpress-forums .bbp-body > div.topic, #bbpress-forums .bbp-body > div.reply { display: flex; gap: 1.2rem; padding: 18px 16px; }
#bbpress-forums div.bbp-reply-author, #bbpress-forums div.bbp-topic-author {
  float: none !important; width: 110px !important; flex: 0 0 110px; margin: 0 !important; text-align: center; font-size: .85rem;
}
#bbpress-forums div.bbp-reply-author img.avatar, #bbpress-forums div.bbp-topic-author img.avatar { width: 64px; height: 64px; margin: 0 auto 6px; display: block; }
#bbpress-forums div.bbp-reply-author .bbp-author-name, #bbpress-forums div.bbp-topic-author .bbp-author-name { font-weight: 700; color: var(--ink); display: block; word-break: break-word; }
#bbpress-forums div.bbp-reply-author .bbp-author-role, #bbpress-forums div.bbp-topic-author .bbp-author-role { font-size: .75rem; color: var(--muted); font-style: normal; }
#bbpress-forums div.bbp-reply-content, #bbpress-forums div.bbp-topic-content {
  margin: 0 !important; padding: 0 !important; flex: 1; min-width: 0; font: 400 1.05rem/1.65 var(--text); color: var(--ink);
}
#bbpress-forums div.bbp-reply-content p, #bbpress-forums div.bbp-topic-content p { margin: 0 0 .9em; }
#bbpress-forums div.bbp-reply-content img, #bbpress-forums div.bbp-topic-content img { max-width: 100%; height: auto; }
#bbpress-forums div.bbp-reply-content blockquote, #bbpress-forums div.bbp-topic-content blockquote {
  margin: 0 0 1em; padding: .6em 1em; border-left: 4px solid var(--accent); background: var(--row-alt);
}
#bbpress-forums .bbp-admin-links { font-size: .75rem; color: var(--muted); }
#bbpress-forums .bbp-admin-links a { color: var(--muted); }
@media (max-width: 600px) {
  #bbpress-forums .bbp-body > div.topic, #bbpress-forums .bbp-body > div.reply { flex-direction: column; gap: .6rem; }
  #bbpress-forums div.bbp-reply-author, #bbpress-forums div.bbp-topic-author { width: auto !important; flex-basis: auto; display: flex; align-items: center; gap: .6rem; text-align: left; }
  #bbpress-forums div.bbp-reply-author img.avatar, #bbpress-forums div.bbp-topic-author img.avatar { width: 40px; height: 40px; margin: 0; }
  #bbpress-forums div.bbp-reply-author br { display: none; }
}

/* Formulär */
#bbpress-forums fieldset.bbp-form {
  border: 1px solid var(--line) !important; border-radius: 8px; padding: 18px 20px !important; margin: 0 0 20px; background: var(--surface);
}
#bbpress-forums fieldset.bbp-form legend { font: 800 1.4rem/1.1 var(--display); padding: 0 .4rem; color: var(--ink); }
#bbpress-forums fieldset.bbp-form fieldset.bbp-form { border: 0 !important; padding: 0 !important; background: transparent; }
#bbpress-forums fieldset.bbp-form label { font-weight: 600; font-size: .9rem; }
#bbpress-forums input[type="text"], #bbpress-forums input[type="email"], #bbpress-forums input[type="password"],
#bbpress-forums input[type="url"], #bbpress-forums input[type="search"], #bbpress-forums select, #bbpress-forums textarea,
#bbpress-forums .bbp-the-content-wrapper textarea.bbp-the-content {
  width: 100%; max-width: 100%; font: 400 1rem/1.5 var(--ui); color: var(--ink);
  background: var(--bg) !important; border: 1px solid var(--line) !important; border-radius: 6px; padding: .6rem .75rem; box-sizing: border-box;
}
#bbpress-forums .bbp-the-content-wrapper textarea.bbp-the-content { min-height: 160px; }
#bbpress-forums div.bbp-the-content-wrapper div.quicktags-toolbar { background: var(--surface); border-color: var(--line); }
#bbpress-forums .button, #bbpress-forums button.button, #bbpress-forums .bbp-submit-wrapper button,
#bbpress-forums #bbp_search_submit {
  display: inline-block; padding: .75rem 1.3rem !important; border: 0 !important; border-radius: 999px !important;
  background: var(--accent) !important; color: var(--on-accent) !important; font: 700 .95rem/1 var(--ui) !important; cursor: pointer; box-shadow: none !important;
}
#bbpress-forums .bbp-submit-wrapper { float: none; margin-top: 12px; }
#bbpress-forums .bbp-search-form { float: none; margin: 0 0 16px; display: flex; gap: .5rem; }
#bbpress-forums .bbp-search-form form > div { display: flex; gap: .5rem; }

/* Notiser, sidnumrering, prenumeration */
#bbpress-forums div.bbp-template-notice, #bbpress-forums div.indicator-hint {
  background: var(--surface) !important; border: 1px solid var(--line) !important; border-left: 4px solid var(--accent) !important;
  color: var(--ink) !important; border-radius: 6px; padding: .7rem 1rem !important; margin: 0 0 16px;
}
#bbpress-forums div.bbp-template-notice p, #bbpress-forums div.bbp-template-notice li { margin: 0; font-size: .92rem !important; }
#bbpress-forums div.bbp-template-notice.error, #bbpress-forums div.bbp-template-notice.warning { border-left-color: #FF5C5C !important; }
#bbpress-forums .bbp-pagination { float: none; width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 1rem; font-size: .88rem; color: var(--muted); margin-bottom: 14px; }
#bbpress-forums .bbp-pagination-links a, #bbpress-forums .bbp-pagination-links span.current {
  display: inline-block; min-width: 2rem; padding: .3rem .5rem; margin-left: .2rem; text-align: center;
  border: 1px solid var(--line) !important; border-radius: 6px; background: transparent !important; color: var(--ink); text-decoration: none; opacity: 1;
}
#bbpress-forums .bbp-pagination-links span.current { background: var(--accent) !important; color: var(--on-accent); border-color: var(--accent) !important; }
#bbpress-forums #subscription-toggle, #bbpress-forums #favorite-toggle { float: none; display: inline-block; margin: 0 0 12px; font-size: .88rem; }
#bbpress-forums .bbp-topic-tags { font-size: .85rem; color: var(--muted); }
#bbpress-forums .status-closed, #bbpress-forums .status-closed a { color: var(--muted) !important; }
.forum-page .forum-page__head { max-width: 1100px; margin-left: auto; margin-right: auto; }
.forum-page .forum-page__head h1 { font-size: clamp(2.2rem, 5.5vw, 4.2rem); text-wrap: balance; }
#bbpress-forums ul.bbp-replies li.bbp-header, #bbpress-forums ul.bbp-lead-topic li.bbp-header { display: flex; gap: 1.2rem; }
#bbpress-forums ul.bbp-replies li.bbp-header .bbp-reply-author, #bbpress-forums ul.bbp-lead-topic li.bbp-header .bbp-topic-author { width: 120px; flex: 0 0 120px; float: none; text-align: center; }
#bbpress-forums ul.bbp-replies li.bbp-header .bbp-reply-content, #bbpress-forums ul.bbp-lead-topic li.bbp-header .bbp-topic-content { float: none; margin: 0; padding: 0; font: inherit; color: inherit; }
#bbpress-forums div.bbp-reply-author, #bbpress-forums div.bbp-topic-author { width: 120px !important; flex-basis: 120px; }
#bbpress-forums .bbp-author-link { text-decoration: none; }
#bbpress-forums .bbp-author-link:hover .bbp-author-name { text-decoration: underline; text-decoration-color: var(--accent); }
#bbpress-forums div.bbp-reply-author .bbp-author-name, #bbpress-forums div.bbp-topic-author .bbp-author-name { overflow-wrap: anywhere; font-size: .82rem; }
@media (max-width: 600px) {
  #bbpress-forums ul.bbp-replies li.bbp-header, #bbpress-forums ul.bbp-lead-topic li.bbp-header { display: none; }
  #bbpress-forums div.bbp-reply-author, #bbpress-forums div.bbp-topic-author { width: auto !important; }
}
@media (max-width: 600px) {
  #bbpress-forums div.bbp-reply-author .bbp-author-link, #bbpress-forums div.bbp-topic-author .bbp-author-link { display: inline-flex; align-items: center; gap: .55rem; }
  #bbpress-forums div.bbp-reply-author .bbp-author-name, #bbpress-forums div.bbp-topic-author .bbp-author-name { display: inline; font-size: .9rem; }
  #bbpress-forums div.bbp-reply-author .bbp-author-role, #bbpress-forums div.bbp-topic-author .bbp-author-role { margin-left: auto; }
}
@media (max-width: 600px) {
  #bbpress-forums div.bbp-reply-author, #bbpress-forums div.bbp-topic-author { flex: 0 0 auto; }
}

/* =========================================================
   Quiz
   ========================================================= */
.tile--quiz { grid-column: 1 / -1; background: var(--surface); overflow: hidden; }
.quiz {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  font-family: var(--ui); color: var(--ink); background: var(--surface); position: relative;
}
.quiz__media {
  position: relative; aspect-ratio: 16 / 10; overflow: hidden;
  background: linear-gradient(150deg, #2A1F52, #17132A);
}
.quiz__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.quiz__media--result { display: grid; place-items: center; background: radial-gradient(circle at 50% 70%, #3A2A6A, #17132A 70%); color: #F1EDF7; }
.quiz__media--result .gauge { width: min(420px, 78%); }
.quiz__media--result .gauge__scale { color: rgba(241, 237, 247, .75); font-size: 1rem; }
.quiz__panel { display: flex; flex-direction: column; padding: clamp(18px, 2.4vw, 36px); min-width: 0; }
.quiz__head { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .9rem; margin-bottom: 1rem; }
.quiz__head .chip { --c: #5FF6E6; }
.quiz__title { flex-basis: 100%; margin: .1rem 0 0; font: 800 clamp(1.6rem, 2.6vw, 2.4rem)/1.08 var(--display); }
.quiz__progress { margin: 0; font-size: .85rem; font-weight: 600; color: var(--muted); }
.quiz__bar { flex: 1; min-width: 80px; height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; }
.quiz__bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #5FF6E6, #FF4FB0); transition: width .4s ease; }
.quiz__content { display: flex; flex-direction: column; gap: .9rem; flex: 1; }
.quiz__q { margin: 0; font: 800 clamp(1.35rem, 2vw, 1.9rem)/1.2 var(--display); outline: none; text-wrap: balance; }
.quiz__answers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
.quiz__answer {
  display: flex; align-items: center; gap: .7rem; width: 100%; text-align: left; cursor: pointer;
  padding: .75rem .85rem; border-radius: 10px; border: 2px solid var(--line); background: var(--bg); color: var(--ink);
  font: 600 1rem/1.3 var(--ui); transition: border-color .15s ease, transform .15s ease, background-color .2s ease, opacity .2s ease;
}
.quiz__answer:hover:not(:disabled) { border-color: #5FF6E6; transform: translateY(-1px); }
.quiz__letter {
  flex: 0 0 auto; width: 1.9rem; height: 1.9rem; display: grid; place-items: center; border-radius: 6px;
  background: var(--surface); border: 1px solid var(--line); font-weight: 800; font-size: .85rem;
}
.quiz__answers.is-answered .quiz__answer { cursor: default; opacity: .5; }
.quiz__answers.is-answered .quiz__answer.is-correct,
.quiz__answers.is-answered .quiz__answer.is-wrong { opacity: 1; }
.quiz__answer.is-correct { background: #5CD6C0; border-color: #5CD6C0; color: #10212A; }
.quiz__answer.is-correct .quiz__letter { background: #10212A; color: #5CD6C0; border-color: #10212A; }
.quiz__answer.is-correct .quiz__letter::after { content: "✓"; }
.quiz__answer.is-correct .quiz__letter { font-size: 0; }
.quiz__answer.is-correct .quiz__letter::after { font-size: 1rem; }
.quiz__answer.is-wrong { background: #FF5C8A; border-color: #FF5C8A; color: #2A0716; }
.quiz__answer.is-wrong .quiz__letter { background: #2A0716; color: #FF5C8A; border-color: #2A0716; font-size: 0; }
.quiz__answer.is-wrong .quiz__letter::after { content: "✕"; font-size: 1rem; }
.quiz__feedback { margin: 0; min-height: 1.5em; font-size: .98rem; line-height: 1.45; }
.quiz__feedback.is-right, .quiz__feedback.is-wrong { padding: .55rem .8rem; border-radius: 8px; background: var(--bg); border-left: 4px solid; }
.quiz__feedback.is-right { border-left-color: #5CD6C0; }
.quiz__feedback.is-wrong { border-left-color: #FF5C8A; }
.quiz__explain { display: block; margin-top: .25rem; color: var(--muted); }
.quiz__next, .quiz__more {
  align-self: flex-start; padding: .8rem 1.4rem; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--accent); color: var(--on-accent); font: 700 1rem/1 var(--ui); text-decoration: none;
}
.quiz__more { background: transparent; color: var(--ink); border: 2px solid var(--line); }
.quiz__next:hover { filter: brightness(1.08); }
.quiz__actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.quiz__score { margin: 0; font: 800 clamp(2rem, 3.5vw, 3rem)/1 var(--display); outline: none; }
.quiz__score strong { font-size: 1.5em; background: linear-gradient(180deg, #5FF6E6, #FF4FB0); -webkit-background-clip: text; background-clip: text; color: transparent; }
.quiz__verdict { margin: 0; font: 400 1.15rem/1.45 var(--text); }
.quiz__best { margin: 0; font-size: .9rem; color: var(--muted); }

/* Övertoning mellan frågor */
.quiz__media > *, .quiz__content { transition: opacity .26s ease, transform .26s ease; }
.quiz.is-fading .quiz__media > *, .quiz.is-fading .quiz__content { opacity: 0; transform: translateY(8px); }
.quiz.is-fading .quiz__media img { transform: scale(1.03); }
.quiz.flash-right .quiz__media::after, .quiz.flash-wrong .quiz__media::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; animation: quiz-flash .7s ease-out forwards;
}
.quiz.flash-right .quiz__media::after { box-shadow: inset 0 0 0 6px #5CD6C0; background: rgba(92, 214, 192, .18); }
.quiz.flash-wrong .quiz__media::after { box-shadow: inset 0 0 0 6px #FF5C8A; background: rgba(255, 92, 138, .18); }
@keyframes quiz-flash { from { opacity: 1; } to { opacity: 0; } }

/* Quizets egen sida */
.quiz-page__wrap { max-width: 1200px; margin: 0 auto; padding: 0 clamp(12px, 2vw, 24px) 40px; }
.quiz--page { border-radius: 10px; overflow: hidden; }
.quiz--page .quiz__media { aspect-ratio: 4 / 3; }

@media (max-width: 860px) {
  .quiz { grid-template-columns: 1fr; }
  .quiz__media { aspect-ratio: 16 / 9; }
  .quiz--page .quiz__media { aspect-ratio: 16 / 9; }
}
@media (max-width: 520px) {
  .quiz__answers { grid-template-columns: 1fr; }
  .quiz__answer { padding: .65rem .75rem; }
}

/* Höga mobilfoton i full eller bred bredd beskärs till skärmhöjd. */
.entry .wp-block-image.alignfull img, .entry .wp-block-image.alignwide img {
  width: 100%; max-height: 82vh; object-fit: cover; object-position: center 40%;
}
.entry .wp-block-image:not(.alignfull):not(.alignwide) img { max-height: 90vh; width: auto; margin-left: auto; margin-right: auto; }

/* =========================================================
   Skribenter
   ========================================================= */
.author-ava {
  --s: 32px; --ac: var(--accent);
  flex: 0 0 auto; display: inline-grid; place-items: center; width: var(--s); height: var(--s);
  border-radius: 50%; overflow: hidden; background: var(--ac); color: #1A1530;
  box-shadow: 0 0 0 2px var(--ac), 0 0 0 4px var(--bg);
}
.author-ava__img { width: 100%; height: 100%; object-fit: cover; display: block; }
.author-ava__ini { font: 800 calc(var(--s) * .42)/1 var(--ui); letter-spacing: .02em; }

/* På omslagen */
.tile__author { display: inline-flex; align-items: center; gap: .4rem; font-weight: 700; color: #fff; }
.tile__author .author-ava { box-shadow: 0 0 0 2px var(--ac); }
.tile--lead .tile__author .author-ava { --s: 28px !important; }

/* Under rubriken */
.byline { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--ink); margin-right: .4rem; }
.byline__text { display: flex; flex-direction: column; line-height: 1.2; }
.byline__text strong { font-weight: 700; }
.byline__title { font-size: .8rem; color: var(--ac); font-weight: 600; }
.byline:hover strong { text-decoration: underline; text-decoration-color: var(--ac); text-underline-offset: 3px; }

/* Skribentrutan sist i inlägget */
.author-box {
  max-width: var(--measure); margin: 8px auto 40px; padding: clamp(18px, 3vw, 26px);
  display: flex; gap: 1.2rem; align-items: flex-start; font-family: var(--ui);
  background: var(--surface); border-radius: 10px; border-left: 5px solid var(--ac);
}
.author-box__kicker { margin: 0; font-size: .78rem; font-weight: 700; color: var(--muted); }
.author-box__name { margin: .15rem 0 0; font: 800 1.6rem/1.1 var(--display); }
.author-box__title { font: 700 .8rem/1 var(--ui); color: var(--ac); margin-left: .3rem; vertical-align: middle; }
.author-box__bio { margin: .6rem 0 0; font: 400 1.02rem/1.55 var(--text); }
.author-box__more { display: inline-block; margin-top: .7rem; font-weight: 700; font-size: .92rem; color: var(--ink); text-decoration-color: var(--ac); text-underline-offset: 3px; }
@media (max-width: 560px) { .author-box { flex-direction: column; margin-left: 16px; margin-right: 16px; } }

/* Skribentens sida */
.author-head { display: flex; gap: clamp(16px, 3vw, 32px); align-items: center; }
.author-head .chip { --c: var(--ac); }
.author-head h1 { margin-top: .5rem; }
.author-head__count { font-size: .9rem; }
@media (max-width: 600px) { .author-head { flex-direction: column; align-items: flex-start; } }

/* [skribenter] */
.author-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin: 1.5em 0 2em; font-family: var(--ui); }
.author-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: .35rem; padding: 18px; border-radius: 10px;
  background: var(--surface); text-decoration: none !important; color: var(--ink); border-top: 4px solid var(--ac);
  transition: transform .15s ease;
}
.author-card:hover { transform: translateY(-2px); }
.author-card .author-ava { margin-bottom: .4rem; }
.author-card__name { font: 800 1.35rem/1.1 var(--display); }
.author-card__title { font-size: .8rem; font-weight: 700; color: var(--ac); }
.author-card__bio { font: 400 .95rem/1.45 var(--text); color: var(--muted); }
.author-card__count { margin-top: auto; padding-top: .4rem; font-size: .8rem; font-weight: 600; color: var(--muted); }

/* =========================================================
   Eventbanner
   ========================================================= */
.event-banner {
  position: relative; overflow: hidden; color: #140F2A; font-family: var(--ui);
  background:
    radial-gradient(circle at 1px 1px, rgba(20, 15, 42, .16) 1px, transparent 1.5px) 0 0 / 10px 10px,
    linear-gradient(100deg, #5FF6E6 0%, #8FD8F0 38%, #FF7AC8 70%, #FF3E9A 100%);
  transition: opacity .25s ease, transform .25s ease;
}
.event-banner--wall { grid-column: 1 / -1; width: 100vw; margin-left: calc(50% - 50vw); }
.event-banner.is-closing { opacity: 0; transform: translateY(-6px); }
.event-banner::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .10) 0 2px, transparent 2px 5px);
}
.event-banner__inner {
  position: relative; max-width: var(--wrap); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem 2rem; flex-wrap: wrap;
  padding: clamp(18px, 2.6vw, 30px) clamp(56px, 5vw, 72px) clamp(18px, 2.6vw, 30px) clamp(16px, 2.4vw, 32px);
}
.event-banner__text { min-width: 0; }
.event-banner__kicker {
  display: inline-block; padding: .3rem .6rem; border-radius: 3px; background: #140F2A; color: #5FF6E6;
  font: 800 .75rem/1 var(--ui); letter-spacing: .02em;
}
.event-banner__title { margin: .45rem 0 0; font: 900 clamp(1.7rem, 3.6vw, 3rem)/1.05 var(--display); text-wrap: balance; }
.event-banner__lede { margin: .35rem 0 0; font: 500 clamp(1rem, 1.4vw, 1.15rem)/1.4 var(--ui); max-width: 60ch; }
.event-banner__cta {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: .4rem; padding: .9rem 1.4rem; border-radius: 999px;
  background: #140F2A; color: #fff; font: 800 1rem/1 var(--ui); text-decoration: none;
  box-shadow: 0 4px 0 rgba(20, 15, 42, .35); transition: transform .15s ease, box-shadow .15s ease;
}
.event-banner__cta:hover { transform: translateY(-2px); box-shadow: 0 6px 0 rgba(20, 15, 42, .35); }
.event-banner__close {
  position: absolute; top: 10px; right: 12px; width: 34px; height: 34px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(20, 15, 42, .15); color: #140F2A; font-size: 1.3rem; line-height: 1; display: grid; place-items: center;
}
.event-banner__close:hover { background: rgba(20, 15, 42, .3); }
@media (max-width: 600px) {
  .event-banner__cta { width: 100%; justify-content: center; }
}
