:root {
  --bg: #07080a;
  --ink: #f5f1e8;
  --muted: rgba(245, 241, 232, 0.58);
  --gold: #e2bd7a;
  --gold-bright: #f0d49a;
  --gold-deep: #a8813f;
  --line: rgba(245, 241, 232, 0.12);
  --serif: 'Playfair Display', 'Iowan Old Style', Georgia, serif;
  --sans: 'Inter', -apple-system, 'Segoe UI', system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 0.68, 0.24, 1);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 1px solid var(--gold);
  outline-offset: 4px;
}

/* -------------------------------------------------------------------------- */
/* Bakgrund                                                                    */
/* -------------------------------------------------------------------------- */

.media {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: #07080a url("/images/interior-night.jpg") center / cover no-repeat;
  pointer-events: none;
  transition: opacity 0.55s var(--ease), filter 0.55s var(--ease);
}

.ambient {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: url("/images/interior-night.jpg") center / cover no-repeat;
  transform: scale(1.02);
  animation: ambientDrift 28s ease-in-out infinite alternate;
}

@keyframes ambientDrift {
  from {
    transform: scale(1.02);
  }
  to {
    transform: scale(1.06);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ambient {
    animation: none;
  }
}

body.is-celebrating .media {
  opacity: 0.35;
  filter: blur(4px) saturate(0.85);
}

.layer {
  position: absolute;
  inset: -4%;
  z-index: 1;
  opacity: 0;
  transition: opacity 1.25s ease;
  will-change: opacity, transform;
}

.layer img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
  filter: saturate(1.02) contrast(1.02);
}

.layer.is-active {
  opacity: 1;
}

.layer.kb-a {
  animation: kbA 16s ease-out both;
}

.layer.kb-b {
  animation: kbB 16s ease-out both;
}

.veil {
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(90deg, rgba(5, 6, 8, 0.93) 0%, rgba(5, 6, 8, 0.78) 34%, rgba(5, 6, 8, 0.26) 62%, rgba(5, 6, 8, 0.62) 100%),
    linear-gradient(0deg, rgba(5, 6, 8, 0.96) 0%, rgba(5, 6, 8, 0.35) 28%, rgba(5, 6, 8, 0) 58%),
    linear-gradient(180deg, rgba(5, 6, 8, 0.86) 0%, rgba(5, 6, 8, 0.1) 22%, rgba(5, 6, 8, 0) 42%);
}

.grain {
  position: absolute;
  inset: 0;
  z-index: 3;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
}

.media.is-typo .layer {
  opacity: 0 !important;
}

.media.is-typo .ambient {
  filter: saturate(1) brightness(1.15);
}

.media.is-typo .veil {
  background:
    linear-gradient(90deg, rgba(5, 6, 8, 0.8) 0%, rgba(5, 6, 8, 0.72) 36%, rgba(5, 6, 8, 0.48) 64%, rgba(5, 6, 8, 0.22) 100%),
    linear-gradient(0deg, rgba(5, 6, 8, 0.94) 0%, rgba(5, 6, 8, 0.4) 30%, rgba(5, 6, 8, 0.03) 62%),
    linear-gradient(180deg, rgba(5, 6, 8, 0.82) 0%, rgba(5, 6, 8, 0.1) 26%, rgba(5, 6, 8, 0) 48%);
}

/* -------------------------------------------------------------------------- */
/* Layout                                                                      */
/* -------------------------------------------------------------------------- */

.app {
  position: fixed;
  inset: 0;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(300px, 24vw, 340px);
  grid-template-rows: auto minmax(0, 1fr) auto;
  grid-template-areas:
    'top top'
    'stage qr'
    'rail rail';
  gap: clamp(14px, 1.6vh, 24px) clamp(20px, 2.4vw, 44px);
  padding: clamp(22px, 3.2vh, 46px) clamp(24px, 3vw, 52px) clamp(18px, 2.4vh, 32px);
  transition: opacity 0.55s var(--ease), filter 0.55s var(--ease);
}

body.is-celebrating .app {
  opacity: 0.14;
  filter: blur(10px);
  pointer-events: none;
}

/* -------------------------------------------------------------------------- */
/* Topprad                                                                     */
/* -------------------------------------------------------------------------- */

.topbar {
  grid-area: top;
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.6vw, 40px);
  padding-bottom: clamp(12px, 1.8vh, 20px);
  border-bottom: 1px solid var(--line);
  z-index: 3;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.monogram {
  position: relative;
  width: clamp(40px, 3.4vw, 52px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 1px solid rgba(226, 189, 122, 0.5);
  color: var(--gold);
  font-family: var(--serif);
  font-size: clamp(13px, 1.05vw, 17px);
  letter-spacing: 0.08em;
  flex: none;
}

.monogram::after {
  content: '';
  position: absolute;
  inset: 3px;
  border: 1px solid rgba(226, 189, 122, 0.18);
}

.brand-copy {
  min-width: 0;
}

.brand-copy h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(17px, 1.5vw, 23px);
  letter-spacing: 0.01em;
  line-height: 1.1;
  white-space: nowrap;
}

.brand-copy h1 em {
  font-style: italic;
  color: var(--gold);
}

.brand-copy p {
  margin: 5px 0 0;
  font-size: clamp(8px, 0.68vw, 10px);
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.summary {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.summary-score {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--serif);
  font-size: clamp(28px, 2.6vw, 40px);
  line-height: 1;
  color: var(--gold-bright);
}

.summary-star {
  width: clamp(15px, 1.2vw, 19px);
  fill: var(--gold);
  filter: drop-shadow(0 0 10px rgba(226, 189, 122, 0.35));
}

.summary-label {
  display: block;
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(245, 241, 232, 0.4);
  margin-bottom: 3px;
}

.summary-copy p {
  margin: 0;
  font-size: clamp(10px, 0.82vw, 12px);
  color: var(--muted);
}

.live {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-left: clamp(18px, 2vw, 32px);
  border-left: 1px solid var(--line);
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
}

.live-pill i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  animation: ping 2.4s infinite;
}

#clock {
  font-variant-numeric: tabular-nums;
  font-size: clamp(12px, 1vw, 14px);
  letter-spacing: 0.05em;
  color: rgba(245, 241, 232, 0.75);
}

.fullscreen-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 32px;
  margin-left: 2px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: rgba(245, 241, 232, 0.03);
  color: rgba(245, 241, 232, 0.62);
  font-family: var(--sans);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.14em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  touch-action: manipulation;
  transition:
    color 0.2s var(--ease),
    border-color 0.2s var(--ease),
    background 0.2s var(--ease),
    opacity 0.45s var(--ease),
    transform 0.45s var(--ease);
}

.fullscreen-toggle.is-idle {
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
}

.fullscreen-toggle:hover {
  border-color: rgba(226, 189, 122, 0.42);
  background: rgba(226, 189, 122, 0.08);
  color: var(--ink);
}

.fullscreen-toggle:active {
  transform: translateY(1px);
}

.fullscreen-toggle.is-active {
  border-color: rgba(226, 189, 122, 0.42);
  color: var(--gold-bright);
}

.fullscreen-toggle[hidden] {
  display: none;
}

.fs-icon {
  display: block;
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.fullscreen-toggle .fs-icon--exit {
  display: none;
}

.fullscreen-toggle.is-active .fs-icon--enter {
  display: none;
}

.fullscreen-toggle.is-active .fs-icon--exit {
  display: block;
}

body.is-paused .live-pill i {
  animation: none;
  background: rgba(245, 241, 232, 0.35);
  box-shadow: none;
}

/* -------------------------------------------------------------------------- */
/* Recensionen                                                                 */
/* -------------------------------------------------------------------------- */

.stage {
  grid-area: stage;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(250px, 0.92fr);
  align-items: end;
  gap: clamp(14px, 1.7vw, 30px);
  min-width: 0;
  min-height: 0;
  z-index: 3;
}

/* Fotokortet ---------------------------------------------------------------- */

.shot {
  display: flex;
  align-self: stretch;
  margin: 0;
  min-width: 0;
  min-height: 0;
}

.shot-media {
  position: relative;
  flex: 1;
  width: 100%;
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(226, 189, 122, 0.26);
  border-radius: clamp(14px, 1.3vw, 22px);
  background: #0b0c0f;
  box-shadow: 0 34px 90px -44px rgba(0, 0, 0, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  isolation: isolate;
}

.shot-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.03);
  transition: opacity 1s ease;
}

.shot-img.is-active {
  opacity: 1;
  animation: shotDrift 18s ease-out both;
}

@keyframes shotDrift {
  from {
    transform: scale(1.03);
  }
  to {
    transform: scale(1.09) translate3d(-0.6%, -0.5%, 0);
  }
}

.shot-shade {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(
      180deg,
      rgba(6, 7, 9, 0.62) 0%,
      rgba(6, 7, 9, 0.08) 22%,
      rgba(6, 7, 9, 0) 44%,
      rgba(6, 7, 9, 0.34) 74%,
      rgba(6, 7, 9, 0.88) 100%
    );
}

.shot-top {
  position: absolute;
  inset: 0 0 auto;
  z-index: 3;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 10px;
  padding: clamp(12px, 1.4vw, 20px);
}

.shot-score {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 13px 9px;
  border: 1px solid rgba(226, 189, 122, 0.5);
  border-radius: 999px;
  background: rgba(8, 9, 11, 0.62);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 12px 30px -18px rgba(0, 0, 0, 0.9);
  color: var(--gold-bright);
  line-height: 1;
  white-space: nowrap;
}

.shot-score b {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(22px, 1.9vw, 30px);
}

.shot-score svg {
  width: clamp(13px, 1.1vw, 17px);
  height: auto;
  align-self: center;
  fill: var(--gold);
  filter: drop-shadow(0 0 10px rgba(226, 189, 122, 0.4));
}

.shot-score-label {
  align-self: center;
  margin-left: 1px;
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(245, 241, 232, 0.55);
}

.shot-author {
  position: absolute;
  inset: auto 0 0;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: clamp(14px, 1.6vw, 22px);
}

.shot-author-copy {
  min-width: 0;
}

.shot-author-name {
  display: block;
  font-size: clamp(13px, 1vw, 15px);
  font-weight: 500;
  color: #fbf8f1;
  text-shadow: 0 1px 18px rgba(0, 0, 0, 0.6);
}

.shot-author-meta {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  font-size: clamp(10px, 0.8vw, 12px);
  color: rgba(245, 241, 232, 0.68);
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Kommentaren --------------------------------------------------------------- */

.review {
  display: flex;
  flex-direction: column;
  align-self: end;
  justify-content: center;
  max-height: 100%;
  min-width: 0;
  min-height: 0;
  padding: clamp(18px, 2vw, 34px);
  overflow: hidden;
  border: 1px solid rgba(245, 241, 232, 0.1);
  border-radius: clamp(14px, 1.3vw, 22px);
  background:
    radial-gradient(120% 120% at 100% 0%, rgba(226, 189, 122, 0.08), transparent 55%),
    linear-gradient(158deg, rgba(22, 21, 18, 0.82), rgba(8, 9, 11, 0.88));
  box-shadow: 0 34px 90px -46px #000, inset 0 1px 0 rgba(255, 255, 255, 0.05);
  -webkit-backdrop-filter: blur(18px) saturate(1.05);
  backdrop-filter: blur(18px) saturate(1.05);
}

.review-inner.go > * {
  animation: rise 0.85s var(--ease) both;
}

.review-inner.go > *:nth-child(1) {
  animation-delay: 0.04s;
}

.review-inner.go > *:nth-child(2) {
  animation-delay: 0.14s;
}

.review-inner.go > *:nth-child(3) {
  animation-delay: 0.24s;
}

.review-inner.go > *:nth-child(4) {
  animation-delay: 0.38s;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 clamp(11px, 1.5vh, 19px);
  font-size: clamp(9px, 0.72vw, 11px);
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--muted);
}

.eyebrow b {
  color: rgba(245, 241, 232, 0.9);
  font-weight: 500;
}

.eyebrow-line {
  width: 26px;
  height: 1px;
  background: linear-gradient(90deg, var(--gold), transparent);
}

.src-icon {
  width: 15px;
  height: 15px;
  flex: none;
}

.src-icon--qr {
  color: var(--gold);
}

.stars {
  display: flex;
  gap: clamp(4px, 0.4vw, 7px);
  margin-bottom: clamp(12px, 1.7vh, 20px);
}

.star {
  width: clamp(16px, 1.35vw, 21px);
  height: auto;
  fill: rgba(245, 241, 232, 0.16);
  transform-origin: center;
}

.star.is-on {
  fill: var(--gold);
  filter: drop-shadow(0 0 12px rgba(226, 189, 122, 0.35));
}

.review-inner.go .star {
  animation: starPop 0.55s var(--ease) both;
  animation-delay: calc(0.16s + var(--i) * 0.07s);
}

.quote {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(19px, 1.85vw, 31px);
  line-height: 1.34;
  letter-spacing: -0.005em;
  color: #faf7f0;
  text-wrap: pretty;
  text-shadow: 0 2px 40px rgba(0, 0, 0, 0.5);
}

.review-inner.is-long .quote {
  font-size: clamp(17px, 1.6vw, 26px);
  line-height: 1.4;
}

.review-inner.is-xlong .quote {
  font-size: clamp(15px, 1.42vw, 23px);
  line-height: 1.44;
}

.author {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-top: clamp(16px, 2.5vh, 30px);
}

.avatar {
  position: relative;
  width: clamp(43px, 3.4vw, 52px);
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  overflow: hidden;
  font-size: clamp(12px, 0.95vw, 14px);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #211609;
  background: linear-gradient(140deg, #f0d49a, #c39a54);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14), 0 0 0 4px rgba(226, 189, 122, 0.12);
  flex: none;
}

.avatar > span {
  position: relative;
  z-index: 0;
}

.avatar img {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.avatar--sm {
  width: clamp(26px, 2vw, 32px);
  font-size: 10px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.author-name {
  display: block;
  font-size: clamp(13px, 1.05vw, 15px);
  font-weight: 500;
}

.author-meta {
  display: block;
  margin-top: 3px;
  font-size: clamp(10px, 0.82vw, 12px);
  color: var(--muted);
}

/* -------------------------------------------------------------------------- */
/* QR-kort                                                                     */
/* -------------------------------------------------------------------------- */

.qr-wrap {
  grid-area: qr;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 14px;
  z-index: 3;
}

.qr-card {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 14px;
  color: var(--ink);
  border: 1px solid rgba(226, 189, 122, 0.36);
  border-radius: 18px;
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(226, 189, 122, 0.09), transparent 58%),
    rgba(10, 11, 14, 0.76);
  box-shadow: 0 26px 70px -28px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

.qr-code {
  display: block;
  padding: 7px;
  background: #fff;
  border-radius: 10px;
  line-height: 0;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.qr-code:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px -12px rgba(0, 0, 0, 0.75);
}

.qr-code img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
}

.qr-copy {
  min-width: 0;
}

.qr-rating {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0 0 5px;
  color: var(--gold);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1.2;
}

#qrRatingValue {
  font-weight: 600;
}

.qr-star {
  font-size: 11px;
  line-height: 1;
}

.qr-sep {
  opacity: 0.45;
}

.qr-card h2 {
  margin: 0 0 5px;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 20px;
  line-height: 1.1;
  color: var(--ink);
}

.qr-sub {
  margin: 0;
  font-size: 10.5px;
  line-height: 1.45;
  color: var(--muted);
}

.qr-expand {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 8px 0 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--gold);
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.2;
  cursor: pointer;
}

.qr-expand:hover {
  color: var(--gold-bright);
}

.qr-expand svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Stor QR-modal */
.qr-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s var(--ease), visibility 0.35s;
}

.qr-modal.is-open {
  opacity: 1;
  visibility: visible;
}

.qr-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 5, 7, 0.84);
  -webkit-backdrop-filter: blur(18px) saturate(0.85);
  backdrop-filter: blur(18px) saturate(0.85);
}

.qr-modal-card {
  position: relative;
  width: min(440px, 100%);
  padding: 30px 28px 26px;
  text-align: center;
  border: 1px solid rgba(226, 189, 122, 0.4);
  border-radius: 24px;
  background: linear-gradient(160deg, rgba(24, 22, 19, 0.99), rgba(9, 10, 12, 0.99));
  box-shadow: 0 40px 120px -30px #000;
  transform: translateY(14px) scale(0.98);
  transition: transform 0.35s var(--ease);
}

.qr-modal.is-open .qr-modal-card {
  transform: none;
}

.qr-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(245, 241, 232, 0.04);
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.qr-modal-close:hover {
  border-color: rgba(226, 189, 122, 0.42);
  color: var(--ink);
}

.qr-modal-kicker {
  display: block;
  color: var(--gold);
  font-size: 9px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.qr-modal-card h2 {
  margin: 8px 0 4px;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.1;
}

.qr-modal-copy {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.qr-modal-code {
  width: min(300px, 72vw);
  margin: 0 auto 18px;
  padding: 12px;
  background: #fff;
  border-radius: 16px;
}

.qr-modal-code img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
}

.qr-modal-button {
  min-height: 42px;
  padding: 0 28px;
  border: 1px solid rgba(226, 189, 122, 0.5);
  border-radius: 2px;
  background: var(--gold);
  color: #17181c;
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
}

.qr-modal-button:hover {
  background: var(--gold-bright);
}

/* -------------------------------------------------------------------------- */
/* Bottenrad                                                                   */
/* -------------------------------------------------------------------------- */

.rail {
  grid-area: rail;
  z-index: 3;
}

.progress {
  height: 2px;
  background: rgba(245, 241, 232, 0.12);
  overflow: hidden;
}

#progressFill {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold-bright));
  box-shadow: 0 0 14px rgba(226, 189, 122, 0.6);
}

.rail-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 12px;
  font-size: 9.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(245, 241, 232, 0.45);
}

.rail-meta #counter {
  font-variant-numeric: tabular-nums;
  min-width: 62px;
}

.dots {
  display: flex;
  align-items: center;
  gap: 6px;
}

.dot {
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: rgba(245, 241, 232, 0.25);
  transition: width 0.5s var(--ease), background 0.5s var(--ease);
}

.dot.is-active {
  width: 18px;
  background: var(--gold);
}

.rail-next {
  color: rgba(245, 241, 232, 0.35);
  text-align: right;
  min-width: 120px;
}

/* -------------------------------------------------------------------------- */
/* Ny recension                                                                */
/* -------------------------------------------------------------------------- */

.takeover {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  background:
    radial-gradient(70% 70% at 50% 45%, rgba(12, 13, 16, 0.86), rgba(4, 5, 7, 0.97) 72%),
    rgba(4, 5, 7, 0.94);
  -webkit-backdrop-filter: blur(24px) saturate(0.85);
  backdrop-filter: blur(24px) saturate(0.85);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s var(--ease), visibility 0.6s;
}

.takeover.is-visible {
  opacity: 1;
  visibility: visible;
}

.takeover-glow {
  position: absolute;
  width: 90vmin;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(226, 189, 122, 0.22), transparent 62%);
  animation: breathe 5s ease-in-out infinite;
  pointer-events: none;
}

.takeover-card {
  position: relative;
  width: min(760px, 78vw);
  text-align: center;
  padding: clamp(24px, 3vw, 48px);
}

.takeover.is-visible .takeover-card {
  animation: cardIn 0.9s var(--ease) both;
}

.takeover-badge {
  display: inline-flex;
  background: rgba(8, 9, 11, 0.65);
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid rgba(226, 189, 122, 0.35);
  border-radius: 999px;
  font-size: 9px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
}

.takeover-badge i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
  animation: ping 1.8s infinite;
}

.takeover .stars--lg {
  justify-content: center;
  margin: clamp(18px, 2.8vh, 30px) 0;
  gap: 10px;
}

.stars--lg .star {
  width: clamp(24px, 2.4vw, 34px);
}

.takeover-quote {
  margin: 0 auto;
  max-width: 34ch;
  font-family: var(--serif);
  font-size: clamp(22px, 2.6vw, 36px);
  line-height: 1.32;
  color: #fbf8f1;
  text-wrap: pretty;
}

.takeover-author {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 18px 0 0;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

.takeover-foot {
  display: inline-block;
  margin-top: clamp(22px, 3vh, 36px);
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 9px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: rgba(245, 241, 232, 0.35);
}

/* -------------------------------------------------------------------------- */
/* Animationer                                                                 */
/* -------------------------------------------------------------------------- */

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes starPop {
  0% {
    opacity: 0;
    transform: scale(0.5) rotate(-8deg);
  }
  60% {
    transform: scale(1.12);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes kbA {
  from {
    transform: scale(1.02) translate3d(0, 0, 0);
  }
  to {
    transform: scale(1.06) translate3d(-0.6%, -0.4%, 0);
  }
}

@keyframes kbB {
  from {
    transform: scale(1.07) translate3d(0.6%, 0.3%, 0);
  }
  to {
    transform: scale(1.03) translate3d(0, 0, 0);
  }
}

@keyframes drift {
  from {
    transform: translate3d(0, 0, 0) rotate(-2deg);
  }
  to {
    transform: translate3d(-2%, 2%, 0) rotate(2deg);
  }
}

@keyframes ping {
  0% {
    box-shadow: 0 0 0 0 rgba(226, 189, 122, 0.5);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(226, 189, 122, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(226, 189, 122, 0);
  }
}

@keyframes breathe {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.08);
    opacity: 1;
  }
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(22px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* -------------------------------------------------------------------------- */
/* Anpassningar                                                                */
/* -------------------------------------------------------------------------- */

@media (max-width: 1100px) {
  .brand-copy p {
    letter-spacing: 0.18em;
  }

  .summary-copy p {
    font-size: 10px;
  }
}

/* Anpassad vy: smala fönster, stående skärm och surfplattor (iPad/Safari). */
@media (max-width: 1100px), (orientation: portrait), (any-pointer: coarse) {
  body {
    overflow: auto;
  }

  .app {
    position: relative;
    min-height: 100dvh;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto auto;
    grid-template-areas:
      'top'
      'stage'
      'qr'
      'rail';
    padding: max(20px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right))
      max(20px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
    gap: 18px;
  }

  .topbar {
    flex-wrap: wrap;
    gap: 12px;
  }

  .brand {
    flex: 1 1 100%;
  }

  .summary {
    margin-left: 0;
  }

  .live {
    margin-left: auto;
  }

  .stage {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto;
    gap: 12px;
  }

  .shot {
    display: block;
    align-self: auto;
  }

  .shot-media {
    aspect-ratio: 4 / 3;
    max-height: 40vh;
  }

  .review {
    padding: 16px 18px 20px;
  }

  .quote {
    font-size: clamp(18px, 4.8vw, 28px);
  }

  .review-inner.is-long .quote {
    font-size: clamp(16px, 4.2vw, 25px);
  }

  .review-inner.is-xlong .quote {
    font-size: clamp(15px, 3.8vw, 22px);
  }

  .qr-wrap {
    flex-direction: row;
    align-items: center;
    gap: 16px;
  }

  .qr-card {
    width: 100%;
  }

  .rail {
    position: static;
    padding-top: 4px;
  }

  .rail-meta {
    gap: 10px;
  }

  .rail-meta #counter,
  .rail-next {
    min-width: auto;
  }
}

/* Mellanbredd i landskap (även iPad i landskap): foto och kommentar sida vid
   sida, QR-kortet som centrerad rad under. */
@media (min-width: 861px) and (orientation: landscape) and (max-width: 1100px),
  (min-width: 861px) and (orientation: landscape) and (any-pointer: coarse) {
  .stage {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    grid-template-rows: auto;
    align-items: end;
    gap: clamp(14px, 1.7vw, 24px);
  }

  .shot-media {
    aspect-ratio: 16 / 10;
  }

  .review {
    max-height: none;
    padding: clamp(16px, 1.8vw, 26px);
  }

  .qr-wrap {
    justify-content: center;
  }

  .qr-card {
    width: auto;
    max-width: 660px;
  }
}

@media (max-width: 700px) {
  .live {
    gap: 10px;
    padding-left: 12px;
  }

  .fullscreen-toggle {
    padding: 9px;
  }

  .fullscreen-toggle .fullscreen-label {
    display: none;
  }
}

@media (max-width: 420px) {
  .qr-card {
    grid-template-columns: 78px minmax(0, 1fr);
    gap: 12px;
    padding: 12px;
  }

  .qr-card h2 {
    font-size: 18px;
  }

  .qr-sub {
    font-size: 10px;
  }

  .qr-expand {
    font-size: 10px;
  }

  .qr-modal {
    padding: 16px;
  }

  .qr-modal-card {
    padding: 24px 20px 20px;
  }

  .qr-modal-code {
    width: min(280px, 100%);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
