/* =====================================================================
   Produktion och press – stil
   ===================================================================== */
:root {
  --bg: #1d2b1d;           /* mörkt Valmet-grönt, som i referensen */
  --bg-2: #243424;
  --track: #2d3f2d;
  --line: #b8bdb5;
  --disc: rgba(170, 200, 165, .14);
  --ink: #f4f6f8;
  --ink-2: #aab4c0;
  --ink-3: #6b7785;
  --accent: #5cc95f;       /* Valmet-grönt */
  --accent-2: #2e9c3a;
  --pink: #f2a9d8;
  --blue: #9ed0fb;
  --blue-badge: #5aa9f5;
  --grey: #d6d6d6;
  --white: #ffffff;
  --green: #bfeac0;
  --alarm: #ff3b30;
  --radius: 16px;
  --ease: cubic-bezier(.65, 0, .25, 1);
  --paper: #f3efe4;        /* papper för stämpelkort och skiftrapport */
  --paper-ink: #1b2419;
  --ink-purple: #4a2a7a;   /* stämpelfärg */
  --hand: 'Caveat', 'Segoe Print', 'Bradley Hand', cursive;
  --mono: 'Roboto Mono', 'SFMono-Regular', Menlo, Consolas, monospace;
  --font: 'Maven Pro', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --lb: 11vh; /* letterbox-höjd */
}

* { box-sizing: border-box; }
html { color-scheme: dark; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); font-family: var(--font); overflow: hidden; -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; }
#app { position: fixed; inset: 0; overflow: hidden; overflow: clip; }
.layer, .tl-viewport, .scene__world, .env { overflow: clip; }

.layer { position: absolute; inset: 0; visibility: hidden; opacity: 0; transition: opacity .6s ease, visibility 0s .6s; }
.layer.is-active { visibility: visible; opacity: 1; transition: opacity .6s ease; }
.scene.layer { transition: none; }

.eyebrow { text-transform: uppercase; letter-spacing: .16em; font-size: calc(12px * var(--text-scale, 1)); font-weight: 600; color: var(--accent); margin: 0; }

/* ------------------------------------------------------------ knappar */
.btn { border: 0; border-radius: 999px; padding: 12px 22px; font-weight: 600; cursor: pointer; transition: transform .2s, background .2s, opacity .2s; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .35; cursor: not-allowed; }
.btn--primary { background: var(--accent); color: #06210a; }
.btn--primary:not(:disabled):hover { background: #67d671; }
.btn--ghost { background: rgba(255,255,255,.08); color: var(--ink); box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); }
.btn--ghost:hover { background: rgba(255,255,255,.14); }
.btn--lg { padding: 16px 30px; font-size: calc(18px * var(--text-scale, 1)); }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255,255,255,.22); background: rgba(12,16,12,.72); color: #fff; cursor: pointer; font-size: calc(17px * var(--text-scale, 1)); display: grid; place-items: center; }
.icon-btn.is-armed { width: auto; padding: 0 14px; border-radius: 999px; font-size: calc(13px * var(--text-scale, 1)); font-weight: 700; background: var(--alarm); }
.icon-btn svg { width: 20px; height: 20px; display: block; }
.icon-btn:hover { background: rgba(255,255,255,.16); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

/* ===================================================================== INTRO */
/* Startsidan: helskärm i Olas sovrum, väckarklockan blinkar 06:00, texten till höger */
.intro { background: #0c0f14; overflow: hidden; }
.intro .intro__stage { animation: introPush 24s linear both; }
@keyframes introPush { from { transform: translate(-50%, -50%) scale(1.04); } to { transform: translate(-50%, -50%) scale(1.12); } }
.intro__shade { position: absolute; inset: 0; background:
  linear-gradient(90deg, rgba(8,10,14,0) 30%, rgba(8,10,14,.55) 52%, rgba(8,10,14,.86) 78%),
  linear-gradient(rgba(8,10,14,.55), transparent 22%, transparent 75%, rgba(8,10,14,.6)); }
.intro__top { position: absolute; z-index: 2; top: clamp(20px, 4vw, 44px); left: clamp(16px, 5vw, 64px); right: clamp(16px, 5vw, 64px); display: flex; align-items: center; gap: 18px; }
.intro__logo { height: clamp(26px, 3vw, 36px); width: auto; }
.intro__meta { font: 500 calc(12px * var(--text-scale, 1))/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: #c9d3c6; padding-left: 18px; border-left: 1px solid rgba(255,255,255,.25); }
.intro__copy { position: absolute; z-index: 2; right: clamp(16px, 6vw, 96px); top: 50%; transform: translateY(-46%); width: min(560px, 44vw); }
.intro__copy > * { animation: rise 1s var(--ease) both; }
.intro__copy > :nth-child(1) { animation-delay: .5s; }
.intro__copy > :nth-child(2) { animation-delay: .62s; }
.intro__copy > :nth-child(3) { animation-delay: .74s; }
.intro__copy > :nth-child(4) { animation-delay: .86s; }
.intro__kicker { margin: 0 0 18px; font: 400 calc(14px * var(--text-scale, 1))/1.4 var(--mono); letter-spacing: .06em; color: #7dff5a; text-shadow: 0 0 10px rgba(125,255,90,.5); }
.intro__title { margin: 0 0 24px; font: 800 calc(clamp(48px, 6.6vw, 112px) * var(--text-scale, 1))/.9 var(--font); letter-spacing: -.035em; color: #f4f6f2; text-wrap: balance; }
.intro__title em { font-style: normal; font-weight: 400; color: #a7b8a3; }
.intro__lead { margin: 0 0 34px; font-size: calc(clamp(16px, 1.35vw, 19px) * var(--text-scale, 1)); line-height: 1.6; color: #d3dad0; }
.intro__actions { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.intro__start { display: inline-flex; align-items: center; gap: 14px; padding: 16px 18px 16px 26px; border-radius: 10px; border: 0; background: #fff; color: #142014; font: 600 calc(18px * var(--text-scale, 1))/1 var(--font); cursor: pointer; box-shadow: 0 0 0 1px rgba(255,255,255,.6), 0 0 26px 4px rgba(150,230,140,.35); transition: transform .2s var(--ease), box-shadow .3s; }
.intro__start:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px #fff, 0 0 40px 8px rgba(150,230,140,.5); }
.intro__arrow { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 7px; background: var(--bg); color: #fff; font-size: calc(16px * var(--text-scale, 1)); }
.intro__start:hover .intro__arrow { animation: nudge .8s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateX(3px); } }
.intro__pace { margin-top: 22px; }
.pace-toggle { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; padding: 8px 0; border: 0; background: none; color: #e6ece3; font: 500 calc(15px * var(--text-scale, 1))/1.3 var(--font); cursor: pointer; text-align: left; }
.pace-toggle__box { width: 20px; height: 20px; border-radius: 5px; border: 2px solid #c9d3c6; display: grid; place-items: center; flex: none; }
.pace-toggle.is-on .pace-toggle__box { background: var(--accent); border-color: var(--accent); }
.pace-toggle.is-on .pace-toggle__box::after { content: '✓'; color: #0d2a0e; font-size: calc(13px * var(--text-scale, 1)); font-weight: 800; }
.pace-toggle__sub { flex-basis: 100%; padding-left: 30px; font-size: calc(13px * var(--text-scale, 1)); color: #b9c4b5; }
.icon-btn--pace { font: 700 calc(14px * var(--text-scale, 1))/1 var(--font); }
.icon-btn--pace.is-on { background: var(--accent); color: #0d2a0e; }
/* i egen takt: liten pil som visar att man klickar vidare */
.cap.is-waiting::after { content: 'Klicka för att fortsätta ›'; display: block; margin-top: 10px; font: 500 calc(13px * var(--text-scale, 1))/1 var(--font); color: #cfd8cc; animation: blinkSoft 1.6s ease-in-out infinite; }
@keyframes blinkSoft { 50% { opacity: .55; } }
.intro__sound { font: 400 calc(13px * var(--text-scale, 1))/1 var(--mono); color: #c9d3c6; }

@media (max-width: 860px) {
  .intro .intro__stage { animation: none; top: 24%; transform: translate(-33%, -50%); }
  .intro__shade { background: linear-gradient(rgba(8,10,14,.6), rgba(8,10,14,.1) 25%, rgba(8,10,14,.3) 45%, rgba(10,13,17,.94) 66%, #0c0f14 79%); }
  .intro__copy { top: auto; bottom: max(28px, env(safe-area-inset-bottom, 0px)); left: 16px; right: 16px; width: auto; transform: none; }
  .intro__meta { display: none; }
}
@media (prefers-reduced-motion: reduce) { .intro .intro__stage { animation: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } }

/* ===================================================================== TIDSLINJE (lodrät) */
.timeline { background: radial-gradient(70% 60% at 50% 45%, #233423 0%, var(--bg) 75%); }
.timeline::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(60% 60% at 50% 45%, transparent, rgba(255,0,0,.22)); opacity: 0; transition: opacity 1s; }
.timeline.is-alarm::after { opacity: 1; animation: alarmBreath 2.4s ease-in-out infinite; }
@keyframes alarmBreath { 50% { opacity: .55; } }

.tl-header { position: absolute; z-index: 5; top: 0; left: 0; right: 0; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 22px 24px 40px; background: linear-gradient(var(--bg) 40%, transparent); pointer-events: none; }
.tl-header > * { pointer-events: auto; }
.tl-logo { height: clamp(34px, 5vw, 56px); width: auto; }
.tl-header__actions { justify-self: end; display: flex; gap: 8px; }

.tl-viewport { position: absolute; inset: 0; cursor: grab; touch-action: none; }
.tl-viewport:active { cursor: grabbing; }
.tl-world { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform; }
.tl-lines { position: absolute; left: 0; top: 0; width: 1px; height: 1px; overflow: visible; }
.track { stroke: var(--track); stroke-width: 12; stroke-linecap: round; }
.seg { stroke: var(--line); stroke-width: 8; stroke-linecap: round; transition: stroke .6s; }
.branch { fill: none; stroke: var(--line); stroke-width: 8; stroke-linecap: round; opacity: .9; }
.is-alarm .branch { stroke: var(--alarm); filter: drop-shadow(0 0 8px rgba(255,59,48,.8)); animation: branchPulse 1.2s ease-in-out infinite; }
@keyframes branchPulse { 50% { stroke-opacity: .45; } }
.is-healed .seg { stroke: #9fe3a0; filter: drop-shadow(0 0 6px rgba(92,201,95,.6)); }

.tl-pulse { position: absolute; left: 0; width: 30px; height: 30px; margin: -15px 0 0 -15px; border-radius: 50%; background: #d6ffd8; box-shadow: 0 0 20px 8px rgba(92,201,95,.9), 0 0 60px 24px rgba(92,201,95,.5); z-index: 3; }

/* ------------------------------------------------------------ punkt */
.node { position: absolute; width: 0; height: 0; padding: 0; border: 0; background: none; cursor: default; transition: left .9s var(--ease), top .9s var(--ease), opacity .6s, filter .8s; --dir: 1; }
.node--left { --dir: -1; }
.node.is-new { opacity: 0; }

.node__dot { position: absolute; z-index: 2; left: -15px; top: -15px; width: 30px; height: 30px; border-radius: 50%; background: #8f9a8c; box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px rgba(255,255,255,.35); transition: .4s; }
.node.is-played .node__dot { background: #c9cec6; }
.node.is-next .node__dot, .node.is-culprit .node__dot { background: #f2f4f0; box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px #fff, 0 0 20px 4px rgba(255,255,255,.5); }

/* tunn arm från linjen till plattformen */
.node__arm { position: absolute; z-index: 0; top: -1px; height: 2px; width: 145px; background: rgba(200,210,195,.35); }
.node--right .node__arm { left: 0; }
.node--left .node__arm { right: 0; }

/* plattform med föremål */
.node__plat { position: absolute; z-index: 1; top: 0; width: 250px; height: 0; }
.node--right .node__plat { left: 145px; }
.node--left .node__plat { right: 145px; }
.node__disc { position: absolute; left: 0; top: -58px; width: 250px; height: 116px; border-radius: 50%; background: var(--disc); transition: box-shadow .5s, background .5s; }
.node__prop { position: absolute; left: 50%; bottom: -14px; width: 190px; height: 190px; transform: translateX(-50%); transition: transform .5s var(--ease), filter .6s, opacity .6s; pointer-events: none; }
.node__prop svg, .node__prop img { width: 100%; height: 100%; display: block; object-fit: contain; object-position: 50% 100%; filter: drop-shadow(0 10px 12px rgba(0,0,0,.35)); }
.node__badge { position: absolute; right: 6px; top: -150px; min-width: 40px; height: 40px; padding: 0 8px; border-radius: 999px; background: var(--blue-badge); color: #fff; font-weight: 800; font-size: calc(17px * var(--text-scale, 1)); display: grid; place-items: center; box-shadow: 0 6px 14px rgba(0,0,0,.35); transition: opacity .5s; }

/* tidsetikett på motsatt sida */
.node__label { position: absolute; top: -18px; display: flex; flex-direction: column; gap: 6px; width: 220px; }
.node--right .node__label { right: 32px; align-items: flex-end; text-align: right; }
.node--left .node__label { left: 32px; align-items: flex-start; text-align: left; }
.node__pill { display: inline-block; padding: 7px 12px; border-radius: 7px; background: #b4bdb1; color: #142014; font: 600 calc(17px * var(--text-scale, 1))/1 var(--font); font-variant-numeric: tabular-nums; letter-spacing: .02em; transition: .4s; white-space: nowrap; }
.node__title { font-size: calc(14px * var(--text-scale, 1)); color: #d0d8cd; line-height: 1.3; max-width: 200px; }
.node__cta { font-size: calc(12px * var(--text-scale, 1)); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }

/* tillstånd: framtida, spelad, aktiv */
.node.is-future .node__prop { opacity: .16; filter: grayscale(1) blur(1.5px); }
.node.is-future .node__pill { background: #3f4f3e; color: #d5ddd2; }
.node.is-future .node__badge { opacity: .35; }
.node.is-future .node__disc { background: rgba(170,200,165,.07); }
.node.is-played .node__prop { opacity: .55; filter: grayscale(.85) sepia(.5) hue-rotate(50deg) saturate(1.4) brightness(.8); }
.node.is-played .node__badge { opacity: .6; }

.node.is-next, .node.is-culprit { cursor: pointer; z-index: 5; }
.node.is-next .node__pill { background: #fff; color: #142014; box-shadow: 0 0 0 1px rgba(255,255,255,.6), 0 0 22px 4px rgba(150,230,140,.55); }
.node.is-next .node__title { color: #fff; font-weight: 600; }
.node.is-next .node__disc { background: rgba(170,200,165,.24); box-shadow: 0 0 0 4px var(--accent), 0 0 34px 8px rgba(92,201,95,.45); animation: rim 2s ease-in-out infinite; }
.node.is-next .node__prop { animation: floaty 3.2s ease-in-out infinite; }
.node.is-next:hover .node__prop { transform: translateX(-50%) translateY(-10px) scale(1.06); animation: none; }
@keyframes rim { 50% { box-shadow: 0 0 0 4px var(--accent), 0 0 54px 16px rgba(92,201,95,.6); } }
@keyframes floaty { 50% { transform: translateX(-50%) translateY(-8px); } }

.node.is-chain .node__disc { box-shadow: 0 0 0 4px var(--alarm), 0 0 40px 10px rgba(255,59,48,.6); }
.node.is-chain .node__pill { background: var(--alarm); color: #fff; }
.node.is-culprit .node__disc { animation: culprit 1s ease-in-out infinite; background: rgba(255,176,32,.18); }
.node.is-culprit .node__pill { background: #ffb020; color: #3a2400; }
.node.is-culprit .node__cta { color: #ffb020; }
.node.is-culprit .node__prop { animation: floaty 2s ease-in-out infinite; }
@keyframes culprit { 0%, 100% { box-shadow: 0 0 0 5px #ffb020, 0 0 30px 8px rgba(255,176,32,.6); } 50% { box-shadow: 0 0 0 5px #fff4d6, 0 0 70px 24px rgba(255,176,32,.95); } }
.node.is-diving .node__prop { opacity: 0; transition-duration: .3s; }

.node.is-dissolving { opacity: 0 !important; filter: blur(12px); transition-duration: 1.2s; }
.node.is-dissolving .node__plat { transform: translateY(-40px) scale(.8); transition: transform 1.2s; }

.tl-banner { position: absolute; left: 50%; bottom: max(5vh, 20px); transform: translate(-50%, 20px); opacity: 0; transition: .5s var(--ease); background: #121a12; border: 1px solid rgba(255,255,255,.18); border-left-width: 1px; border-radius: 4px; padding: 14px 22px; text-align: center; max-width: min(560px, calc(100vw - 32px)); pointer-events: none; }
.tl-banner.is-on { opacity: 1; transform: translate(-50%, 0); }
.tl-banner small { display: block; color: #d3dad0; margin-top: 4px; font-size: calc(13px * var(--text-scale, 1)); }
.tl-banner__time { font-weight: 800; color: var(--accent); margin-right: 6px; font-variant-numeric: tabular-nums; }
.tl-banner--alarm { border-color: #ff6b5f; }
.tl-banner--alarm strong { color: #ff8a82; }
.tl-banner--good { border-color: var(--accent); }
.tl-banner--good strong { color: #8be495; }

/* ===================================================================== PORTAL + SPOLA */
.portal { position: fixed; z-index: 30; border-radius: 50%; pointer-events: none; opacity: 0; transform: translate(-50%, -50%);
  box-shadow: 0 0 0 3px rgba(220,255,215,.95), 0 0 40px 10px rgba(92,201,95,.6), inset 0 0 40px 10px rgba(200,255,195,.45); }
.portal.is-on { opacity: 1; }

.rewind { position: fixed; inset: 0; z-index: 40; display: grid; place-content: center; text-align: center; background: rgba(5,8,12,.85); opacity: 0; visibility: hidden; transition: opacity .4s, visibility 0s .4s; }
.rewind.is-on { opacity: 1; visibility: visible; transition: opacity .3s; }
.rewind__lines { position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgba(255,255,255,.05) 0 2px, transparent 2px 5px); animation: vhs .25s steps(3) infinite; }
.rewind__lines::after { content: ''; position: absolute; left: 0; right: 0; height: 12vh; background: linear-gradient(transparent, rgba(255,255,255,.12), transparent); animation: vhsBar 1s linear infinite; }
@keyframes vhs { 50% { transform: translateY(3px); } }
@keyframes vhsBar { from { top: 110%; } to { top: -20%; } }
.rewind__clock { font-family: 'Share Tech Mono', monospace; font-size: calc(clamp(80px, 18vw, 200px) * var(--text-scale, 1)); color: #fff; text-shadow: -4px 0 rgba(255,0,80,.7), 4px 0 rgba(0,200,255,.7); position: relative; }
.rewind__label { font-weight: 700; letter-spacing: .3em; text-transform: uppercase; color: #ffb020; position: relative; }

/* ===================================================================== SCEN */
.scene { background: #000; z-index: 20; }
.scene__world { position: absolute; inset: 0; overflow: hidden; transform-origin: 50% 50%; }
.stage { position: absolute; left: 50%; top: 50%; width: max(100vw, 177.78vh); height: max(56.25vw, 100vh); transform: translate(-50%, -50%); }
.is-cinematic .stage { animation: kenburns 30s linear both; }
@keyframes kenburns { from { transform: translate(-50%, -50%) scale(1); } to { transform: translate(-50%, -50%) scale(1.08); } }
.env { position: absolute; inset: 0; overflow: hidden; background: #111; }
.env__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.env__tone { position: absolute; inset: 0; pointer-events: none; }
.env__tone--dim { background: rgba(10,14,30,.35); }
.env__tone--dark { background: linear-gradient(rgba(8,12,28,.55), rgba(8,12,28,.35)); }
.env__tone--warm { background: radial-gradient(70% 60% at 50% 40%, rgba(255,190,110,.22), rgba(120,60,10,.12)); mix-blend-mode: soft-light; }
.hotspots { position: absolute; inset: 0; pointer-events: none; }

.fx { position: absolute; inset: 0; pointer-events: none; }
.fx--vignette { background: radial-gradient(120% 90% at 50% 50%, transparent 55%, rgba(0,0,0,.55)); }
.fx--grain { opacity: .07; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); animation: grain .5s steps(4) infinite; mix-blend-mode: overlay; }
@keyframes grain { 25% { transform: translate(-2%, 1%); } 50% { transform: translate(1%, -2%); } 75% { transform: translate(2%, 2%); } }
.fx--tint.is-alarm { animation: strobe 1.1s linear infinite; mix-blend-mode: multiply; }
@keyframes strobe { 0%, 45% { background: rgba(255,30,20,.28); } 50%, 100% { background: rgba(60,0,0,.12); } }
.is-shake .scene__world { animation: shake .5s linear 3; }
@keyframes shake { 20% { transform: translate(-6px, 3px); } 40% { transform: translate(5px, -4px); } 60% { transform: translate(-3px, 2px); } 80% { transform: translate(4px, 3px); } }

/* ögonlock (snooze) */
.is-dozing .hud { opacity: .12; transition-duration: 1.4s; }
@property --open { syntax: '<number>'; inherits: true; initial-value: 1; }
.eyelids { --open: 1; position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
/* mjuka, välvda ögonlock – suddiga kanter som en riktig blinkning */
.eyelids i { position: absolute; left: -20%; right: -20%; height: 64%; background: #000; filter: blur(18px); }
.eyelids i:first-child { top: -10%; border-radius: 0 0 50% 50% / 0 0 55% 55%; transform: translateY(calc(var(--open) * -104%)); }
.eyelids i:last-child { bottom: -10%; border-radius: 50% 50% 0 0 / 55% 55% 0 0; transform: translateY(calc(var(--open) * 104%)); }
/* mörkare i kanterna när ögonen är halvslutna */
.eyelids::after { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse 70% 45% at 50% 50%, transparent 35%, rgba(0,0,0,.85)); opacity: calc((1 - var(--open)) * 1.3); }

/* alarmklockans display ovanpå videon */
.ov-clock { position: absolute; left: 29%; top: 58.1%; width: 8.2%; height: 6.6%; border-radius: 6px; background: #050806; color: #7dff5a; font-family: 'Share Tech Mono', monospace; font-size: calc(calc(max(100vw, 177.78vh) * 0.0235) * var(--text-scale, 1)); display: grid; place-items: center; text-shadow: 0 0 6px rgba(125,255,90,.9), 0 0 18px rgba(125,255,90,.5); letter-spacing: .02em; animation: ledBlink 1s steps(1) infinite; }
@keyframes ledBlink { 50% { color: rgba(125,255,90,.25); text-shadow: none; } }

/* ------------------------------------------------------------ HUD */
.hud { position: absolute; top: 0; left: 0; right: 0; z-index: 6; display: flex; align-items: center; gap: 16px; padding: 18px 24px; background: linear-gradient(rgba(6,8,6,.82), rgba(6,8,6,.5) 60%, transparent); transition: transform .7s var(--ease), opacity .7s; }
.is-cinematic .hud, .is-summary .hud { transform: translateY(-110%); opacity: 0; }
.hud__who { display: flex; align-items: center; gap: 12px; }
.hud__who strong { display: block; font-size: calc(15px * var(--text-scale, 1)); }
.hud__who span { font-size: calc(13px * var(--text-scale, 1)); color: #dfe5dc; }
.avatar.has-photo { background: #3f4f3e no-repeat 50% 4% / 260%; }
.avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--accent); color: #06210a; display: grid; place-items: center; font-weight: 800; font-size: calc(18px * var(--text-scale, 1)); box-shadow: 0 0 0 3px rgba(255,255,255,.25); }
.hud__clock { margin: 0 auto; font-family: 'Share Tech Mono', monospace; font-size: calc(30px * var(--text-scale, 1)); padding: 4px 16px; border-radius: 12px; background: rgba(0,0,0,.4); border: 1px solid rgba(255,255,255,.15); letter-spacing: .04em; }
.hud__clock.flip { animation: flip .6s var(--ease); }
@keyframes flip { 0% { transform: rotateX(90deg); opacity: 0; } 100% { transform: none; opacity: 1; } }
.hud__right { display: flex; align-items: center; gap: 14px; }
.hud__progress { position: relative; display: flex; gap: 9px; align-items: center; padding: 0 2px; }
.hud__progress::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 2px; margin-top: -1px; background: rgba(255,255,255,.28); }
.pdot { position: relative; width: 2px; height: 8px; background: rgba(255,255,255,.45); transition: .4s; }
.pdot.is-done { background: #fff; height: 10px; }
.pdot.is-now { width: 4px; height: 18px; border-radius: 1px; background: var(--accent); box-shadow: 0 0 0 2px rgba(6,8,6,.8); }

/* ------------------------------------------------------------ letterbox */
.letterbox i { position: absolute; left: 0; right: 0; height: var(--lb); background: #000; z-index: 5; transition: transform .8s var(--ease); }
.letterbox i:first-child { top: 0; transform: translateY(-100%); }
.letterbox i:last-child { bottom: 0; transform: translateY(100%); }
.is-cinematic .letterbox i { transform: none; }

/* ------------------------------------------------------------ titelkort */
.titlecard { position: absolute; z-index: 7; left: 6vw; bottom: 22vh; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; pointer-events: none; }
.titlecard__time, .titlecard__place { background: rgba(16,20,16,.78); padding: .08em .28em; border-radius: 6px; }
.titlecard__place { padding: .35em .7em; }
.titlecard__time { font-family: 'Share Tech Mono', monospace; font-size: calc(clamp(56px, 10vw, 120px) * var(--text-scale, 1)); line-height: 1; text-shadow: 0 4px 30px rgba(0,0,0,.6); }
.titlecard__place { font-size: calc(clamp(16px, 2vw, 22px) * var(--text-scale, 1)); text-transform: uppercase; letter-spacing: .3em; color: rgba(255,255,255,.85); text-shadow: 0 2px 12px rgba(0,0,0,.7); }
.titlecard > * { opacity: 0; transform: translateX(-30px); filter: blur(8px); transition: .8s var(--ease); }
.titlecard.is-on > * { opacity: 1; transform: none; filter: none; }
.titlecard.is-on .titlecard__place { transition-delay: .15s; }

/* ------------------------------------------------------------ repliker */
.captions { position: absolute; z-index: 8; inset: 0; pointer-events: none; }
/* pratruta: mörk, halvgenomskinlig, monospace, namnet inline och en liten pil mot den som pratar */
.cap { position: absolute; max-width: min(560px, calc(100vw - 32px)); padding: 24px 28px; border-radius: 6px; background: rgba(24,24,24,.78); color: #f2f2f0; font-family: var(--mono); font-size: calc(clamp(16px, 1.45vw, 21px) * var(--text-scale, 1)); line-height: 1.5; letter-spacing: .01em; opacity: 0; transition: opacity .3s ease, transform .35s var(--ease); }
.cap--left { left: max(16px, 7vw); top: 20vh; transform: translateY(10px); }
.cap--right { right: max(16px, 7vw); top: 26vh; transform: translateY(10px); }
.cap--center { left: 50%; bottom: 9vh; transform: translate(-50%, 10px); }
.cap.is-in { opacity: 1; transform: none; }
.cap--center.is-in { transform: translate(-50%, 0); }
.cap.is-out { opacity: 0; }
.cap__tail { position: absolute; top: 72%; width: 0; height: 0; border-top: 8px solid transparent; border-bottom: 8px solid transparent; }
.cap--left .cap__tail { right: -12px; border-left: 12px solid rgba(24,24,24,.78); }
.cap--right .cap__tail { left: -12px; border-right: 12px solid rgba(24,24,24,.78); }
.cap__who { color: inherit; }
.cap__ghost { visibility: hidden; }
.cap--inner { color: #d9e2d6; font-style: italic; }
.cap--inner .cap__who { font-style: normal; color: #a9c9a6; }
.cap--narr { color: #d5d8d2; }
.cap--small { font-size: calc(clamp(14px, 1.2vw, 17px) * var(--text-scale, 1)); }
.cap--big { background: none; font-family: var(--font); font-size: calc(clamp(30px, 4.4vw, 52px) * var(--text-scale, 1)); font-weight: 800; text-align: center; text-shadow: 0 2px 20px #000; white-space: nowrap; bottom: 40vh; }
.is-cinematic .cap--center { bottom: calc(var(--lb) + 3vh); }
.is-cinematic .cap--left { top: calc(var(--lb) + 7vh); }
.is-cinematic .cap--right { top: calc(var(--lb) + 13vh); }
@media (max-width: 720px) {
  .cap--left, .cap--right { left: 16px; right: 16px; top: 16vh; }
  .cap__tail { display: none; }
  .cap--center { width: calc(100vw - 32px); }
}

/* ------------------------------------------------------------ minne ("detta påverkar…") */
.memory { position: absolute; z-index: 9; top: 90px; left: 24px; pointer-events: none; }
.mem { position: relative; display: flex; align-items: center; gap: 14px; max-width: min(420px, calc(100vw - 32px)); padding: 14px 18px 14px 14px; background: #161a16; color: #fff; font-weight: 600; font-size: calc(16px * var(--text-scale, 1)); border-radius: 2px; box-shadow: 0 12px 30px rgba(0,0,0,.4); animation: memIn .6s var(--ease) both; }
/* varningstejp upptill och nertill */
.mem::before, .mem::after { content: ''; position: absolute; left: 0; right: 0; height: 5px; background: repeating-linear-gradient(-45deg, #ffd400 0 8px, #111 8px 16px); }
.mem::before { top: -5px; } .mem::after { bottom: -5px; }
.mem__sign { flex: none; width: 34px; height: 31px; }
.mem.is-out { animation: memOut .4s ease both; }
@keyframes memIn { from { opacity: 0; transform: translateX(-40px); } }
@keyframes memOut { to { opacity: 0; transform: translateX(-20px); } }

/* ------------------------------------------------------------ val */
.choice { position: absolute; z-index: 10; left: 50%; bottom: 5vh; transform: translate(-50%, 40px); width: min(880px, calc(100vw - 32px)); opacity: 0; pointer-events: none; transition: .5s var(--ease); }
.choice.is-on { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.choice__head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.choice__prompt { margin: 0; padding: 10px 18px; border-radius: 8px; background: rgba(16,20,16,.82); font-size: calc(clamp(22px, 2.6vw, 32px) * var(--text-scale, 1)); font-weight: 800; letter-spacing: -.01em; }
.choice__badge { flex: none; width: 46px; height: 46px; border-radius: 50%; background: var(--blue-badge); display: grid; place-items: center; font-weight: 800; font-size: calc(20px * var(--text-scale, 1)); box-shadow: 0 0 0 4px rgba(90,169,245,.3); }
.choice__chip { flex: none; font-size: calc(11px * var(--text-scale, 1)); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; padding: 6px 10px; border-radius: 999px; background: var(--pink); color: #4a1036; }
.choice--key .choice__chip { background: var(--blue); color: #0c2b48; }
.choice__opts { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.choice__opts--grid { display: grid; grid-template-columns: 1fr 1fr; }
.choice__opts--grid .opt { max-width: none; }
@media (max-width: 560px) { .choice__opts--grid { grid-template-columns: 1fr; } .opt { min-height: 56px; padding: 12px 18px; } }
/* valknappar: ljust frostat glas, vit kant, mörk centrerad text */
.opt { position: relative; flex: 1 1 260px; max-width: 520px; min-height: 76px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-align: center; padding: 18px 28px; border-radius: 12px; border: 1.5px solid rgba(255,255,255,.75); background: rgba(236,239,234,.84); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2); color: #151815; font: 500 calc(clamp(16px, 1.35vw, 19px) * var(--text-scale, 1))/1.3 var(--font); cursor: pointer; box-shadow: 0 6px 24px rgba(0,0,0,.18); transition: transform .2s var(--ease), background .2s, box-shadow .2s, opacity .3s; }
.opt:hover:not(:disabled) { transform: translateY(-3px); background: rgba(245,247,243,.78); box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.opt:active:not(:disabled) { transform: scale(.98); }
.opt kbd { display: none; }
.opt small { display: block; font-weight: 500; font-size: .82em; color: #333a32; margin-top: 2px; }
.opt__tag { position: absolute; top: -10px; right: 12px; font-size: calc(12px * var(--text-scale, 1)); text-transform: uppercase; letter-spacing: .1em; font-weight: 700; background: #ffb020; color: #3a2400; padding: 3px 8px; border-radius: 999px; }
.opt__tag--new { background: var(--accent); color: #0d2a0e; }
.opt.is-fresh { animation: freshIn .9s var(--ease) backwards .25s, freshGlow 2.4s ease-in-out infinite 1.2s; }
@keyframes freshIn { from { opacity: 0; transform: translateY(14px) scale(.96); } }
@keyframes freshGlow { 50% { box-shadow: 0 0 0 2px rgba(92,201,95,.7), 0 0 28px 4px rgba(92,201,95,.45); } }
.opt:disabled { opacity: .45; cursor: not-allowed; text-decoration: line-through; }
.choice.is-picked .opt:not(.is-picked) { opacity: 0; transform: scale(.96); }
.opt.is-picked { background: rgba(255,255,255,.95); border-color: #fff; box-shadow: 0 0 0 3px rgba(92,201,95,.85), 0 10px 30px rgba(0,0,0,.25); transform: scale(1.02); }
.choice__timer { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; padding: 8px 14px; border-radius: 8px; background: rgba(16,20,16,.82); font-size: calc(14px * var(--text-scale, 1)); color: #e6ece3; }
.choice__timer i { flex: 1; height: 6px; border-radius: 3px; background: rgba(255,255,255,.15); overflow: hidden; }
.choice__timer b { display: block; height: 100%; background: var(--accent); transform-origin: left; }
.choice.is-urgent .choice__timer b { background: var(--alarm); }
.choice.is-urgent .choice__prompt { animation: urgent .6s ease-in-out infinite; }
@keyframes urgent { 50% { transform: translateX(2px); } }

/* hotspots i scenen */
.hotspot { position: absolute; pointer-events: auto; background: none; border: 0; cursor: pointer; padding: 0; }
.hotspot__pulse { position: absolute; inset: 0; border-radius: 22%; box-shadow: 0 0 0 2px rgba(255,255,255,.9), 0 0 30px 6px rgba(79,196,90,.55); animation: hot 1.6s ease-in-out infinite; }
.hotspot:hover .hotspot__pulse { box-shadow: 0 0 0 3px #fff, 0 0 40px 12px rgba(79,196,90,.8); }
.hotspot__label { position: absolute; left: 50%; bottom: calc(100% + 10px); transform: translateX(-50%); white-space: nowrap; background: #fff; color: #111; font-weight: 700; font-size: calc(13px * var(--text-scale, 1)); padding: 6px 12px; border-radius: 999px; }
@keyframes hot { 50% { transform: scale(1.06); opacity: .65; } }

.skip { position: absolute; z-index: 11; right: 22px; bottom: calc(var(--lb) + 14px); color: #fff; background: rgba(12,16,12,.8); border: 1px solid rgba(255,255,255,.2); border-radius: 999px; padding: 8px 14px; font-size: calc(13px * var(--text-scale, 1)); cursor: pointer; opacity: 0; pointer-events: none; transition: .4s; }
.skip.is-on { opacity: 1; pointer-events: auto; }
.skip.is-on:hover { opacity: 1; }

/* ------------------------------------------------------------ paneler */
.panel-host { position: absolute; inset: 0; z-index: 12; pointer-events: none; }
.panel { position: absolute; inset: 0; display: grid; place-items: center; padding: 16px; pointer-events: auto; opacity: 0; transition: opacity .45s var(--ease); }
.panel.is-on { opacity: 1; }
.panel > * { transform: translateY(30px) scale(.97); transition: transform .6s var(--ease); }
.panel.is-on > * { transform: none; }

/* spegeln: karusell med spegelvända personer */
.panel--mirror { padding: 72px 16px 16px; overflow: hidden; }
.mirror__wrap { display: grid; align-content: center; justify-items: center; gap: 18px; }
.mirror__head { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.mirror__sub { margin: 0; padding: 6px 14px; border-radius: 6px; background: rgba(14,20,14,.8); font-size: calc(16px * var(--text-scale, 1)); color: #e6ece3; }
.mirror__stage { display: grid; grid-template-columns: auto minmax(0, 380px); grid-template-areas: "mirror info" "tabs info"; gap: 16px 56px; align-items: center; justify-items: center; }
.mirror__prompt { margin: 0; padding: 10px 20px; border-radius: 8px; background: rgba(14,20,14,.8); font-size: calc(clamp(22px, 2.6vw, 34px) * var(--text-scale, 1)); }
.mirror { grid-area: mirror; position: relative; display: grid; place-items: center; }
.mirror__frame { --h: min(60vh, 560px); width: calc(var(--h) * .66); height: var(--h); padding: 12px; border-radius: 50% 50% 14px 14px / 28% 28% 14px 14px;
  background: linear-gradient(135deg, #eef2f5, #8e99a4 30%, #f6f8fa 52%, #7c8792 75%, #dfe5ea); box-shadow: 0 30px 70px rgba(0,0,0,.55), inset 0 0 0 1px rgba(255,255,255,.6); }
.mirror__glass { position: relative; width: 100%; height: 100%; overflow: hidden; border-radius: inherit; cursor: grab; touch-action: pan-y;
  background: radial-gradient(90% 60% at 50% 35%, #4b5a73, #262f3f 70%), #262f3f; box-shadow: inset 0 0 40px rgba(0,0,0,.55); }
.mirror__glass:active { cursor: grabbing; }
.mirror__glass:focus-visible { outline: 3px solid var(--accent); outline-offset: 6px; }
.mirror__track { --drag: 0px; position: absolute; inset: 0; }
.mirror__slide { position: absolute; left: 50%; bottom: 3%; height: 92%; margin: 0; aspect-ratio: .42; transform-origin: 50% 100%;
  transform: translateX(calc(-50% + var(--off) * 78% + var(--drag))) scale(calc(1 - .28 * var(--a)));
  opacity: calc(1 - .55 * var(--a)); filter: blur(calc(var(--a) * 3px)) brightness(calc(1 - .25 * var(--a)));
  transition: transform .55s var(--ease), opacity .55s, filter .55s; z-index: calc(2 - var(--a)); }
.mirror__track.is-drag .mirror__slide { transition: none; }
/* spegelbild: vänd och lätt kall ton */
.mirror__slide img { width: 100%; height: 100%; object-fit: contain; object-position: 50% 100%; transform: scaleX(-1); filter: saturate(.92) contrast(1.02); pointer-events: none; user-select: none; }
.mirror__slide:not(.is-center) { cursor: pointer; }
.mirror__sheen { position: absolute; inset: 0; pointer-events: none; z-index: 5;
  background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.16) 42%, transparent 50%, transparent 64%, rgba(255,255,255,.08) 70%, transparent 76%),
              radial-gradient(70% 40% at 50% 0%, rgba(255,255,255,.12), transparent 70%),
              linear-gradient(transparent 80%, rgba(20,26,36,.5)); }
.mirror__nav { position: absolute; top: 50%; width: 52px; height: 52px; margin-top: -26px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.75); background: rgba(236,239,234,.86); color: #151815; display: grid; place-items: center; cursor: pointer; box-shadow: 0 8px 22px rgba(0,0,0,.3); transition: transform .2s var(--ease); }
.mirror__nav svg { width: 24px; height: 24px; }
.mirror__nav:hover { transform: scale(1.08); }
.mirror__nav--prev { left: -72px; } .mirror__nav--next { right: -72px; }
.mirror__tabs { grid-area: tabs; display: flex; gap: 8px; padding: 6px; border-radius: 999px; background: rgba(14,20,14,.8); }
.mirror__tab { display: inline-flex; align-items: center; gap: 8px; padding: 5px 14px 5px 5px; text-align: left; line-height: 1.15; border-radius: 999px; border: 0; background: transparent; color: #dfe5dc; font: 600 calc(15px * var(--text-scale, 1))/1 var(--font); cursor: pointer; }
.mirror__tab[aria-selected="true"] { background: #fff; color: #142014; }
.mirror__tab small { display: block; font: 500 calc(12px * var(--text-scale, 1))/1.2 var(--mono); letter-spacing: .06em; opacity: .85; }
.mirror__face { flex: none; width: 34px; height: 34px; border-radius: 50%; background: #3f4f3e no-repeat 50% 4% / 260%; }
.mirror__info { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 0; padding: 0; width: 380px; max-width: 100%; text-shadow: 0 1px 12px rgba(0,0,0,.6); }
/* stor konturbokstav för dagen, bakom rubriken */
.mirror__letter { position: absolute; top: -70px; right: -8px; font: 800 calc(300px * var(--text-scale, 1))/1 var(--font); color: transparent; -webkit-text-stroke: 2px rgba(232,238,228,.38); letter-spacing: -.04em; pointer-events: none; user-select: none; text-shadow: none; }
.mirror__day { position: relative; margin: 0 0 6px; font-size: calc(15px * var(--text-scale, 1)); font-weight: 600; color: #c9d3c6; }
.mirror__theme { position: relative; margin: 0 0 10px; font: 800 calc(clamp(30px, 3vw, 40px) * var(--text-scale, 1))/1.05 var(--font); letter-spacing: -.02em; color: #fff; text-wrap: balance; }
.mirror__who { position: relative; margin: 0 0 18px; padding-bottom: 18px; font-size: calc(16px * var(--text-scale, 1)); color: #dfe5dc; border-bottom: 1px solid rgba(255,255,255,.3); width: 100%; }
.mirror__desc { position: relative; margin: 0 0 22px; font-size: calc(17px * var(--text-scale, 1)); line-height: 1.6; color: #eef2ec; min-height: 8em; }
.mirror__info.is-swap > * { animation: swapIn .5s var(--ease) both; }
.mirror__info.is-swap .mirror__letter { animation: letterIn .6s var(--ease) both; }
.mirror__info.is-swap .mirror__theme { animation-delay: .05s; }
.mirror__info.is-swap .mirror__desc { animation-delay: .1s; }
@keyframes swapIn { from { opacity: 0; transform: translateY(10px); } }
@keyframes letterIn { from { opacity: 0; transform: translateX(-24px); } }
.mirror__pick.opt { flex: none; min-height: 52px; padding: 12px 28px; align-self: flex-start; text-shadow: none; }
.panel--mirror.is-picked .mirror__slide.is-center { transform: translateX(-50%) scale(1.04); filter: brightness(1.15); }
.panel--mirror.is-picked .mirror__sheen { animation: sheenFlash .9s ease; }
@keyframes sheenFlash { 40% { background-color: rgba(255,255,255,.25); } }
@media (max-width: 720px) {
  .panel--mirror { padding-top: 64px; }
  .mirror__wrap { gap: 10px; }
  .mirror__nav { width: 44px; height: 44px; margin-top: -22px; }
  .mirror__nav--prev { left: -8px; } .mirror__nav--next { right: -8px; }
  .mirror__stage { grid-template-columns: 1fr; grid-template-areas: "mirror" "tabs" "info"; gap: 10px; }
  .mirror__sub { display: none; }
  .mirror__frame { --h: min(36vh, 380px) !important; }
  .mirror__theme { font-size: calc(24px * var(--text-scale, 1)); margin-bottom: 4px; }
  .mirror__who { margin-bottom: 8px; padding-bottom: 8px; font-size: calc(14px * var(--text-scale, 1)); }
  .mirror__desc { margin-bottom: 10px; font-size: calc(15px * var(--text-scale, 1)); line-height: 1.5; }
  .mirror__frame { --h: min(42vh, 380px); }
  .mirror__info { padding: 56px 4px 0; width: auto; }
  .mirror__letter { font-size: calc(150px * var(--text-scale, 1)); top: -36px; right: 0; }
  .mirror__desc { min-height: 0; font-size: calc(16px * var(--text-scale, 1)); }
  .mirror__pick.opt { align-self: stretch; }
  .mirror__tab { padding-right: 10px; font-size: calc(14px * var(--text-scale, 1)); }
}

/* agenda: dagsvy som en riktig kalender */
.panel--agenda { padding: 72px 16px 16px; }
.dcal { width: min(400px, 100%); height: min(760px, calc(100% - 8px)); display: flex; flex-direction: column; background: #fff; color: #1d1f1d; border-radius: 14px; overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,.55); }
.dcal__head { display: flex; align-items: baseline; justify-content: space-between; padding: 16px 18px 6px; }
.dcal__head b { font-size: calc(22px * var(--text-scale, 1)); }
.dcal__head span { font-size: calc(14px * var(--text-scale, 1)); color: #555b55; }
.dcal__week { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; padding: 6px 12px 10px; border-bottom: 1px solid #e3e6e2; }
.dcal__wd { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: calc(12px * var(--text-scale, 1)); color: #555b55; }
.dcal__wd b { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: calc(15px * var(--text-scale, 1)); color: #1d1f1d; }
.dcal__wd.is-today { color: #b3261e; font-weight: 700; }
.dcal__wd.is-today b { background: #b3261e; color: #fff; }
.dcal__grid { position: relative; flex: 1; min-height: 0; overflow: hidden; }
.dcal__hours { position: relative; height: calc(var(--hours) * var(--hh)); margin: 10px 12px 14px 52px; --hh: 54px; }
.dcal__h { position: absolute; left: -46px; right: 0; height: 0; border-top: 1px solid #e3e6e2; }
.dcal__h span { position: absolute; left: 0; top: -8px; font-size: calc(12px * var(--text-scale, 1)); color: #555b55; font-variant-numeric: tabular-nums; }
.dcal__ev { position: absolute; left: 4px; right: 4px; min-height: 22px; padding: 4px 8px; border-radius: 6px; border-left: 4px solid; font-size: calc(13px * var(--text-scale, 1)); line-height: 1.25; overflow: hidden; animation: rise .45s var(--ease) both; animation-delay: calc(var(--i) * .1s + .3s); }
.dcal__ev time { display: block; font-size: calc(11.5px * var(--text-scale, 1)); font-weight: 600; opacity: .85; font-variant-numeric: tabular-nums; }
.dcal__ev b { font-weight: 600; }
.dcal__ev--blue { background: #e3effc; border-color: #2f6fd1; color: #123766; }
.dcal__ev--green { background: #e3f2e1; border-color: #2e9c3a; color: #17451d; }
.dcal__ev--grey { background: #eef0ee; border-color: #8b938a; color: #353b35; }
.dcal__ev--purple { background: #ece6f8; border-color: #6a47b8; color: #33215e; }
.dcal__ev.is-clash { box-shadow: 0 0 0 2px #b3261e; }
.dcal__ev.half-l { right: calc(50% + 2px); } .dcal__ev.half-r { left: calc(50% + 2px); }
.dcal__ev.half-l, .dcal__ev.half-r { min-height: 54px; font-size: calc(12.5px * var(--text-scale, 1)); overflow-wrap: normal; }
.dcal__clash { position: absolute; right: 2px; z-index: 3; padding: 3px 8px; border-radius: 999px; background: #b3261e; color: #fff; font-size: calc(12px * var(--text-scale, 1)); font-weight: 700; transform: translateY(-50%); animation: rise .45s var(--ease) both 1s; }
.dcal__now { position: absolute; left: -6px; right: 0; height: 2px; background: #b3261e; z-index: 2; }
.dcal__now::before { content: ''; position: absolute; left: -4px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: #b3261e; }
.is-tight .dcal__ev:not(.half-l):not(.half-r) time { display: inline; margin-right: 6px; }
.is-tight .dcal__ev { padding-block: 2px; }
.dcal__foot { padding: 12px 16px 16px; border-top: 1px solid #e3e6e2; }
.dcal__foot .btn { width: 100%; background: #1d2b1d; color: #fff; border-radius: 8px; }

/* mail */
.mailwin { width: min(620px, 100%); background: #fbfbfc; color: #111; border-radius: 14px; overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.mailwin__bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; background: #e9ecef; font-size: calc(13px * var(--text-scale, 1)); color: #555; }
.mailwin__bar i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.mailwin__bar i:nth-child(2) { background: #febc2e; } .mailwin__bar i:nth-child(3) { background: #28c840; }
.mailwin__bar span { margin-left: 10px; font-weight: 600; }
.mailwin__help { margin: 0; padding: 14px 18px 6px; font-size: calc(14px * var(--text-scale, 1)); color: #444; }
.mailwin__list { list-style: none; margin: 0; padding: 6px 12px; }
.mail { width: 100%; display: flex; gap: 14px; align-items: center; text-align: left; padding: 14px 10px; border: 0; border-radius: 10px; background: none; cursor: pointer; color: #111; border-bottom: 1px solid #eee; transition: background .2s; }
.mail:hover { background: #eef5ff; }
.mail__rank { flex: none; width: 34px; height: 34px; border-radius: 50%; border: 2px dashed #bbb; display: grid; place-items: center; font-weight: 800; color: #fff; transition: .3s var(--ease); }
.mail.is-ranked .mail__rank { background: var(--blue-badge); border: 0; transform: scale(1.1); }
.mail__body { display: flex; flex-direction: column; min-width: 0; }
.mail__body b { font-size: calc(12px * var(--text-scale, 1)); color: #666; font-weight: 600; }
.mail__body strong { font-size: calc(15px * var(--text-scale, 1)); }
.mail__body small { color: #777; font-size: calc(13px * var(--text-scale, 1)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mailwin__foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 18px; background: #f2f4f6; }
.mailwin .btn--ghost { color: #333; box-shadow: inset 0 0 0 1px #ccc; background: #fff; }

/* kalender (dubbelbokning) */
.cal { width: min(560px, 100%); background: #fff; color: #111; border-radius: 16px; padding: 18px; box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.cal__head { font-weight: 700; margin-bottom: 12px; }
.cal__grid { position: relative; height: 150px; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid #eee; }
.cal__h { font-size: calc(13px * var(--text-scale, 1)); color: #555b55; padding-top: 6px; border-left: 1px solid #eee; padding-left: 6px; }
.ev { position: absolute; top: 34px; left: 16.6%; width: 33%; padding: 10px; border-radius: 8px; font-size: calc(13px * var(--text-scale, 1)); font-weight: 600; color: #fff; transition: transform 1.2s var(--ease), opacity 1.2s, top .5s var(--ease); }
.ev--a { background: #2f6fd1; }
.ev--b { background: #6a47b8; }
.ev--lisa { left: 50%; top: 92px; background: var(--accent-2); }
.panel--cal.is-clash .ev--a { top: 26px; box-shadow: 0 0 0 3px var(--alarm); }
.panel--cal.is-clash .ev--b { top: 64px; box-shadow: 0 0 0 3px var(--alarm); }
.panel--cal.move-a .ev--a { transform: translateX(260%); opacity: 0; }
.panel--cal.move-b .ev--b { transform: translateX(260%); opacity: 0; }

/* stora frågan */
.panel--question { background: rgba(0,0,0,.82); align-content: center; gap: 30px; text-align: center; }
.panel--question h2 { font-size: calc(clamp(32px, 5.5vw, 68px) * var(--text-scale, 1)); max-width: 14em; margin: 0; line-height: 1.05; letter-spacing: -.02em; animation: rise 1.4s var(--ease) both .2s; }
.panel--question .btn, .phone .btn { border-radius: 12px; border: 1.5px solid rgba(255,255,255,.75); background: rgba(232,234,230,.55); backdrop-filter: blur(14px); color: #151815; font-weight: 500; }
.phone .btn { background: #1d2b1d; color: #fff; border-color: #1d2b1d; }
.panel--question .btn { animation: rise 1s var(--ease) both 1.2s; }

/* reflektion (kursens slut): en skiftrapport på papper, ett blad i taget, över hemfärden i skymningen */
.panel--reflect { place-items: center; overflow: hidden; padding: max(3vh, 16px) 16px; background: radial-gradient(80% 70% at 50% 50%, rgba(8,12,8,.25), rgba(8,12,8,.55)); }
.refl { position: relative; width: min(640px, 100%); display: flex; flex-direction: column; gap: 14px; padding: clamp(22px, 4vw, 40px) clamp(22px, 4vw, 44px) clamp(22px, 4vw, 36px); border-radius: 3px; color: var(--paper-ink);
  background: linear-gradient(rgba(255,255,255,.35), transparent 30%), var(--paper);
  box-shadow: 0 1px 0 rgba(0,0,0,.08), 0 30px 70px rgba(0,0,0,.5); transform: rotate(-.4deg); }
.refl__head { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 10px; border-bottom: 2px solid var(--paper-ink); font: 500 calc(12px * var(--text-scale, 1))/1.2 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--paper-ink); }
.refl__page { color: #4c574a; }
.refl__dots { display: flex; gap: 4px; }
.refl__dots i { flex: 1; height: 3px; background: rgba(27,36,25,.15); transition: background .4s; }
.refl__dots i.is-done { background: rgba(27,36,25,.55); }
.refl__dots i.is-now { background: var(--accent-2); }
.refl__body { min-height: 0; display: flex; flex-direction: column; gap: 16px; transition: opacity .32s ease, transform .32s var(--ease); }
.refl__body.is-out { opacity: 0; transform: translateY(8px); }
.refl__eyebrow { margin: 0; font: 500 calc(13px * var(--text-scale, 1))/1 var(--mono); letter-spacing: .08em; color: #2e6b3a; text-transform: uppercase; }
.refl__q { margin: 0; font: 700 calc(clamp(22px, 2.6vw, 30px) * var(--text-scale, 1))/1.25 var(--font); letter-spacing: -.01em; text-wrap: balance; color: var(--paper-ink); }
.refl__q--big { font-size: calc(clamp(28px, 3.6vw, 42px) * var(--text-scale, 1)); }
.refl__hint { margin: -6px 0 0; font-size: calc(14px * var(--text-scale, 1)); color: #4c574a; }
.refl__lead { margin: 0; font-size: calc(18px * var(--text-scale, 1)); line-height: 1.55; color: #2c3a2a; max-width: 34em; }
.refl__opts { display: flex; flex-direction: column; gap: 8px; }
.refl .opt { flex: none; max-width: none; min-height: 54px; text-align: left; align-items: flex-start; padding: 13px 18px; border-radius: 4px; border: 1.5px solid rgba(27,36,25,.35); background: #fbf9f3; color: var(--paper-ink); box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; font-weight: 500; }
.refl .opt:hover:not(:disabled) { background: #fff; border-color: var(--paper-ink); transform: none; box-shadow: none; }
.refl .opt.is-picked { background: #e2ecd8; border-color: #2e6b3a; box-shadow: inset 4px 0 0 #2e6b3a; transform: none; }
.refl .opt.is-dim { opacity: 1; color: #4c574a; }
.refl__reply { margin: 0; padding: 12px 0 0; border-top: 1px dashed rgba(27,36,25,.35); font: 400 calc(clamp(15px, 1.3vw, 17px) * var(--text-scale, 1))/1.6 var(--mono); color: #2c3a2a; animation: rise .6s var(--ease) both; }
.refl__foot { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; animation: rise .6s var(--ease) both .15s; }
.refl .btn { border-radius: 4px; }
.refl .btn--primary { background: var(--paper-ink); color: #fff; }
.refl .btn--primary:not(:disabled):hover { background: #2e3e2b; }
.refl .btn--primary:disabled { background: #8b938a; color: #f3efe4; opacity: 1; }
.refl .btn--ghost { color: var(--paper-ink); background: transparent; box-shadow: inset 0 0 0 1.5px rgba(27,36,25,.4); }
/* fritext skrivs "för hand" på linjerat papper */
.refl__text { width: 100%; resize: vertical; min-height: 72px; padding: 6px 4px; border: 0; border-bottom: 1.5px solid rgba(27,36,25,.4); border-radius: 0; color: #1f3b8a; font: 700 calc(24px * var(--text-scale, 1))/32px var(--hand);
  background: repeating-linear-gradient(transparent 0 31px, rgba(27,36,25,.18) 31px 32px); }
.refl__text:focus { outline: none; border-bottom-color: #2e6b3a; background-color: rgba(255,255,255,.4); }
.refl__text:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 2px; }
.refl__text::placeholder { color: #6b7469; font-weight: 500; }

.recap { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.recap li { display: grid; grid-template-columns: 64px 1fr; gap: 14px; padding: 10px 0; border-bottom: 1px solid rgba(27,36,25,.14); font-size: calc(16px * var(--text-scale, 1)); line-height: 1.45; color: #2c3a2a; animation: rise .5s var(--ease) both; animation-delay: calc(var(--i) * .1s + .1s); }
.recap li.is-key { color: var(--paper-ink); font-weight: 600; }
.recap time { font: 500 calc(14px * var(--text-scale, 1))/1.6 var(--mono); color: #4c574a; }
.recap li.is-key time { color: #2e6b3a; }
.recap s { display: block; color: #5d665b; font-weight: 400; text-decoration-color: #b3261e; text-decoration-thickness: 2px; }

.scale { display: flex; justify-content: space-between; gap: 8px; padding-top: 4px; }
.scale__pt { flex: 1; height: 52px; border-radius: 4px; border: 1.5px solid rgba(27,36,25,.4); background: #fbf9f3; cursor: pointer; display: grid; place-items: center; transition: background .2s, border-color .2s; color: var(--paper-ink); font: 600 calc(17px * var(--text-scale, 1))/1 var(--mono); }
.scale__pt i { display: none; }
.scale__pt::before { content: attr(data-v); }
.scale__pt:hover { border-color: var(--paper-ink); background: #fff; }
.scale__pt.is-on { background: #e2ecd8; border-color: #2e6b3a; }
.scale__pt[aria-checked="true"] { background: var(--paper-ink); color: #fff; border-color: var(--paper-ink); }
.scale__labels { display: flex; justify-content: space-between; font-size: calc(14px * var(--text-scale, 1)); color: #4c574a; margin-top: -6px; }

.takeaways { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0; counter-reset: tk; }
.takeaways li { position: relative; padding: 12px 0 12px 44px; border-bottom: 1px solid rgba(27,36,25,.14); font-size: calc(17px * var(--text-scale, 1)); line-height: 1.55; color: #2c3a2a; animation: rise .6s var(--ease) both; animation-delay: calc(var(--i) * .2s + .1s); counter-increment: tk; }
.takeaways li::before { content: counter(tk); position: absolute; left: 0; top: 12px; width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--paper-ink); display: grid; place-items: center; font: 600 calc(14px * var(--text-scale, 1))/1 var(--mono); }
.takeaways strong { display: block; color: var(--paper-ink); font-size: calc(18px * var(--text-scale, 1)); margin-bottom: 2px; }

.commits { display: grid; gap: 6px; }
.commit { display: flex; gap: 14px; align-items: center; padding: 11px 4px; border-bottom: 1px solid rgba(27,36,25,.14); cursor: pointer; font-weight: 500; color: var(--paper-ink); }
.commit:hover { background: rgba(255,255,255,.5); }
.commit input { position: absolute; opacity: 0; pointer-events: none; }
.commit__box { flex: none; width: 24px; height: 24px; border-radius: 3px; border: 2px solid var(--paper-ink); display: grid; place-items: center; background: #fbf9f3; }
.commit input:checked + .commit__box::after { content: '✓'; color: #1f3b8a; font: 700 calc(26px * var(--text-scale, 1))/1 var(--hand); transform: translate(2px, -3px) rotate(-6deg); }
.commit:has(input:checked) { color: var(--paper-ink); }
.commit input:focus-visible + .commit__box { outline: 3px solid var(--accent-2); outline-offset: 2px; }

.pledge { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 14px 0 6px; border-top: 2px solid var(--paper-ink); }
.pledge blockquote { margin: 0; font: 700 calc(26px * var(--text-scale, 1))/1.25 var(--hand); color: #1f3b8a; }
.pledge__stamp { align-self: flex-end; margin-top: 6px; padding: 6px 12px; border: 3px solid var(--ink-purple); border-radius: 4px; color: var(--ink-purple); font: 700 calc(15px * var(--text-scale, 1))/1 var(--mono); letter-spacing: .2em; text-transform: uppercase; transform: rotate(-8deg); opacity: .85; animation: stampIn .35s cubic-bezier(.3,1.6,.5,1) .8s both; }
.done-msg { margin: 10px 0 0; font-weight: 700; color: #2e6b3a; font-size: calc(16px * var(--text-scale, 1)); }
.is-reflect .hud { transform: translateY(-110%); opacity: 0; }

/* hemfärden i skymningen */
.bil--dusk .bil__sky { background: linear-gradient(#141a33 0%, #3b3460 30%, #a8566a 50%, #e8955f 57%, #f4c58a 61%); }
.bil--dusk .bil__sun { top: 52%; left: 40%; transform: translate(-50%, -50%) scale(1.8); background: radial-gradient(#ffe2b0, #ff9a5a 40%, rgba(255,120,80,0) 70%); }
.bil--dusk .bil__hills { background: #2a2440; }
.bil--dusk .bil__trees { background: #14131f; }
.bil--dusk .bil__road { background: linear-gradient(#3e3a48, #1d1c22); }
.bil--dusk .bil__dashes i { animation-duration: 2s; }
.bil--dusk .bil__posts i { animation-duration: 3.6s; }
.bil--dusk { animation-duration: 5s; }

/* ===================================================================== RITADE MILJÖER
   Allt är i % så det fungerar både i fullskärm och i nodens lilla portal. */

/* ---- generisk siluett */
.person { position: absolute; width: calc(6% * var(--s)); height: calc(26% * var(--s)); transform: translate(-50%, -100%); transform-origin: 50% 100%; animation: breathe 4s ease-in-out infinite; }
.person__head { position: absolute; left: 50%; top: 0; width: 46%; aspect-ratio: 1; transform: translateX(-50%); border-radius: 50%; background: var(--pc, #2a2f38); }
.person__body { position: absolute; left: 0; right: 0; top: 30%; bottom: 0; border-radius: 45% 45% 8% 8% / 30% 30% 4% 4%; background: var(--pc, #2a2f38); }
.p--b { animation-delay: -1.3s; } .p--c { animation-delay: -2.4s; }
.p--front { --pc: #0d1014; filter: blur(2px); }
.p--lisa { --pc: #3b3346; }
.p--lisa .person__head { box-shadow: 0 -8% 0 4% #2a2133; }
.p--bag { --pc: #3d4a3a; }
.p--bag::after { content: ''; position: absolute; right: -18%; top: 36%; width: 34%; height: 34%; border-radius: 20%; background: #6b4b2a; }
.p--worker { --pc: #1b1f24; }
.p--worker .person__head { box-shadow: inset 0 18% 0 0 #f2c200; }
.p--old { animation-delay: -2s; }
@keyframes breathe { 50% { transform: translate(-50%, -100%) scaleY(1.012); } }

/* ---- bilen */
.bil { position: absolute; inset: 0; overflow: hidden; animation: bump 3.2s ease-in-out infinite; }
@keyframes bump { 25% { transform: translateY(.25%); } 55% { transform: translateY(-.2%) rotate(.15deg); } 80% { transform: translateY(.15%); } }
.bil__sky { position: absolute; inset: 0; background: linear-gradient(#1a2547 0%, #4a4f7a 28%, #d98a6a 48%, #f3c38c 56%, #f7dbb0 60%); }
.bil__sun { position: absolute; left: 58%; top: 46%; width: 12%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(#fff6d8, #ffd27a 40%, rgba(255,180,90,0) 70%); transform: translate(-50%, -50%) scale(2.2); }
.bil__hills { position: absolute; left: 0; right: 0; top: 50%; height: 12%; background: #3a3550; clip-path: polygon(0 60%, 10% 30%, 22% 55%, 35% 20%, 48% 50%, 60% 35%, 72% 60%, 85% 25%, 100% 50%, 100% 100%, 0 100%); }
.bil__trees { position: absolute; left: 0; right: 0; top: 54%; height: 8%; background: #1d2230; clip-path: polygon(0 100%, 0 40%, 3% 0, 6% 40%, 9% 10%, 12% 45%, 16% 5%, 20% 50%, 24% 20%, 28% 60%, 70% 60%, 74% 15%, 78% 50%, 82% 0, 86% 45%, 90% 10%, 94% 40%, 97% 5%, 100% 30%, 100% 100%); }
.bil__road { position: absolute; left: 0; right: 0; top: 60%; bottom: 0; background: linear-gradient(#55525a, #2a2a30); clip-path: polygon(47% 0, 53% 0, 100% 100%, 0 100%); }
.bil__road::before { content: ''; position: absolute; inset: 0; background: linear-gradient(#f4f0d0, #f4f0d0) no-repeat; clip-path: polygon(47.3% 0, 47.6% 0, 6% 100%, 4% 100%, 47.3% 0, 52.4% 0, 52.7% 0, 96% 100%, 94% 100%, 52.4% 0); }
.bil__dashes i { position: absolute; left: 50%; width: .5%; height: 2%; background: #f4f0d0; transform: translateX(-50%); animation: dash 1.2s cubic-bezier(.6,0,1,1) infinite; }
.bil__dashes i:nth-child(2) { animation-delay: -.3s; } .bil__dashes i:nth-child(3) { animation-delay: -.6s; } .bil__dashes i:nth-child(4) { animation-delay: -.9s; }
@keyframes dash { 0% { top: 60%; width: .3%; height: 1%; opacity: .4; } 100% { top: 104%; width: 2.6%; height: 12%; opacity: 1; } }
.bil__posts i { position: absolute; bottom: 30%; width: .6%; height: 22%; background: #222; left: 104%; animation: post 2.2s linear infinite; }
.bil__posts i:nth-child(2) { animation-delay: -.73s; } .bil__posts i:nth-child(3) { animation-delay: -1.46s; }
@keyframes post { 0% { left: 64%; height: 2%; bottom: 40%; opacity: .5; } 100% { left: 115%; height: 60%; bottom: 15%; opacity: 1; } }
.bil__cabin { position: absolute; inset: 0; pointer-events: none; }
.bil__pillar { position: absolute; top: 0; bottom: 0; width: 22%; background: #0b0d12; }
.bil__pillar--l { left: 0; clip-path: polygon(0 0, 60% 0, 100% 100%, 0 100%); }
.bil__pillar--r { right: 0; clip-path: polygon(40% 0, 100% 0, 100% 100%, 0 100%); }
.bil__roof { position: absolute; left: 0; right: 0; top: 0; height: 9%; background: linear-gradient(#07090c, #14171d); border-radius: 0 0 50% 50% / 0 0 100% 100%; }
.bil__mirror { position: absolute; left: 50%; top: 6%; width: 14%; height: 7%; transform: translateX(-50%); background: linear-gradient(#3a3f4a, #20242c); border-radius: 12px; box-shadow: 0 4px 10px rgba(0,0,0,.5); }
.bil__dash { position: absolute; left: 0; right: 0; bottom: 0; height: 24%; background: linear-gradient(#1a1d24, #0a0b0e); border-radius: 50% 50% 0 0 / 30% 30% 0 0; }
.bil__wheel { position: absolute; left: 22%; bottom: -26%; width: 34%; aspect-ratio: 1; border-radius: 50%; border: 2.2vw solid #121418; box-shadow: inset 0 0 0 .4vw #1f232a; }
.bil__radio { position: absolute; left: 50%; bottom: 9%; transform: translateX(-50%); font-family: 'Share Tech Mono', monospace; font-size: calc(1.4vw * var(--text-scale, 1)); color: #7dd3ff; background: #050709; padding: .4% 1.4%; border-radius: 6px; text-shadow: 0 0 8px rgba(125,211,255,.7); }

/* ---- mötesrum */
.mote { position: absolute; inset: 0; overflow: hidden; }
.mote__wall { position: absolute; inset: 0; background: linear-gradient(180deg, #c9c3b6 0%, #b8b1a3 60%, #8d867a 100%); }
.mote__window { position: absolute; right: 6%; top: 10%; width: 22%; height: 48%; background: linear-gradient(160deg, #e9f2f8, #b9d3e6); box-shadow: inset 0 0 0 10px #ddd8cc; }
.mote__window::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent 48%, #ddd8cc 48% 52%, transparent 52%); }
.mote__light { position: absolute; inset: 0; background: linear-gradient(115deg, transparent 50%, rgba(255,244,220,.25) 62%, transparent 78%); pointer-events: none; }
.mote__board { position: absolute; left: 8%; top: 12%; width: 38%; height: 36%; background: #fbfbf8; border: 6px solid #9da3a8; border-radius: 4px; padding: 2% 2.5%; font-family: 'Segoe Print', 'Comic Sans MS', cursive; color: #1f3d8a; font-size: calc(1.7vw * var(--text-scale, 1)); line-height: 1.5; box-shadow: 0 10px 20px rgba(0,0,0,.15); }
.mote__board p { margin: 0; }
.mote__board b { color: #d02a2a; }
.mote__table { position: absolute; left: 4%; right: 4%; bottom: -8%; height: 42%; background: linear-gradient(#6b4a30, #4a3220); clip-path: polygon(14% 0, 86% 0, 100% 100%, 0 100%); }
.mote--dark .mote__wall { background: linear-gradient(#2a2f3a, #1b1f27); }
.mote--dark .mote__window { opacity: .25; }
.mote--dark .mote__light { background: radial-gradient(60% 50% at 30% 30%, rgba(120,170,255,.25), transparent 70%); }
.mote__screen { position: absolute; left: 8%; top: 9%; width: 42%; height: 40%; background: #0e1a2b; border-radius: 6px; box-shadow: 0 0 60px rgba(90,169,245,.35); color: #cfe6ff; padding: 2%; display: flex; flex-direction: column; font-size: calc(1.5vw * var(--text-scale, 1)); }
.mote__screen .bars { flex: 1; display: flex; align-items: flex-end; gap: 8%; padding: 4% 6% 2%; }
.mote__screen .bars i { flex: 1; background: #3f86d9; border-radius: 4px 4px 0 0; }
.mote__screen .bars i.goal { background: repeating-linear-gradient(45deg, #ffb020 0 8px, #ff8a00 8px 16px); }
.mote__screen em { font-style: normal; color: #ffb020; font-weight: 700; }
.mote--dark .person { --pc: #0f1218; }

/* ---- korridor */
.korr { position: absolute; inset: 0; overflow: hidden; animation: walk 18s ease-out both; }
@keyframes walk { from { transform: scale(1); } to { transform: scale(1.08); } }
.korr > div { position: absolute; inset: 0; }
.korr__end { background: radial-gradient(circle at 50% 46%, #fff 0 4%, #dfe7ee 12%); clip-path: polygon(40% 33%, 60% 33%, 60% 60%, 40% 60%); }
.korr__ceil { background: linear-gradient(#cfd3d6, #e7eaec); clip-path: polygon(0 0, 100% 0, 60% 33%, 40% 33%); }
.korr__ceil i { position: absolute; left: 50%; height: 2%; background: #fffbe8; box-shadow: 0 0 30px 10px rgba(255,250,220,.7); transform: translateX(-50%); border-radius: 3px; }
.korr__ceil i:nth-child(1) { top: 4%; width: 34%; height: 3%; }
.korr__ceil i:nth-child(2) { top: 15%; width: 20%; }
.korr__ceil i:nth-child(3) { top: 23%; width: 12%; height: 1.4%; }
.korr__ceil i:nth-child(4) { top: 28.5%; width: 7%; height: 1%; }
.korr__wall { background: linear-gradient(90deg, #bfc6cc, #d7dce0); }
.korr__wall--l { clip-path: polygon(0 0, 40% 33%, 40% 60%, 0 100%); }
.korr__wall--r { clip-path: polygon(100% 0, 60% 33%, 60% 60%, 100% 100%); background: linear-gradient(270deg, #b6bdc4, #d2d8dc); }
.korr__wall i { position: absolute; background: #6f5a45; }
.korr__wall--l i:nth-child(1) { left: 8%; top: 18%; width: 9%; height: 66%; clip-path: polygon(0 0, 100% 18%, 100% 85%, 0 100%); }
.korr__wall--l i:nth-child(2) { left: 28%; top: 30%; width: 4%; height: 36%; clip-path: polygon(0 0, 100% 12%, 100% 90%, 0 100%); }
.korr__wall--r i:nth-child(1) { right: 10%; top: 20%; width: 8%; height: 62%; clip-path: polygon(0 18%, 100% 0, 100% 100%, 0 85%); }
.korr__wall--r i:nth-child(2) { right: 30%; top: 31%; width: 3.5%; height: 34%; clip-path: polygon(0 12%, 100% 0, 100% 100%, 0 90%); }
.korr__floor { background: linear-gradient(#8f969c, #5d646b); clip-path: polygon(40% 60%, 60% 60%, 100% 100%, 0 100%); }
.korr__floor::after { content: ''; position: absolute; inset: 0; background: radial-gradient(40% 30% at 50% 62%, rgba(255,255,255,.35), transparent); }
.korr--warm .korr__end { background: radial-gradient(circle at 50% 46%, #fff6dc 0 6%, #ffc773 30%); }
.korr--warm .korr__wall, .korr--warm .korr__ceil, .korr--warm .korr__floor { filter: sepia(.45) saturate(1.3) brightness(.95); }
.korr--warm::after { content: ''; position: absolute; inset: 0; background: radial-gradient(50% 50% at 50% 48%, rgba(255,190,90,.35), transparent 70%); }

/* ---- fabrik / maskin */
.fab { position: absolute; inset: 0; overflow: hidden; }
.fab__bg { position: absolute; inset: 0; background: linear-gradient(#1b2229, #2a333c 55%, #1a1f24); }
.fab__bg::after { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 45%; background: repeating-linear-gradient(90deg, transparent 0 7%, rgba(255,255,255,.04) 7% 7.5%); }
.fab__lamps i { position: absolute; top: 0; width: 26%; height: 80%; background: linear-gradient(rgba(255,240,200,.28), transparent); clip-path: polygon(45% 0, 55% 0, 100% 100%, 0 100%); }
.fab__lamps i:nth-child(1) { left: 6%; } .fab__lamps i:nth-child(2) { left: 37%; } .fab__lamps i:nth-child(3) { left: 68%; }
.fab__floor { position: absolute; left: 0; right: 0; bottom: 0; height: 32%; background: linear-gradient(#3a4148, #23282d); }
.fab__floor::after { content: ''; position: absolute; left: 6%; right: 6%; top: 18%; height: 4%; background: repeating-linear-gradient(-45deg, #f2c200 0 14px, #1a1a1a 14px 28px); opacity: .8; }
.fab__machine { position: absolute; left: 30%; width: 40%; top: 22%; height: 52%; }
.fab__body { position: absolute; inset: 0; background: linear-gradient(#4f8a5a, #3b6b45); border-radius: 6px; box-shadow: inset 0 -20px 40px rgba(0,0,0,.35), 0 20px 40px rgba(0,0,0,.5); }
.fab__roller { position: absolute; left: 10%; right: 10%; top: 26%; height: 16%; border-radius: 999px; background: repeating-linear-gradient(90deg, #9aa3ab 0 6%, #6c757d 6% 12%); background-size: 200% 100%; animation: roll .6s linear infinite; box-shadow: inset 0 -8px 12px rgba(0,0,0,.5), inset 0 6px 8px rgba(255,255,255,.3); }
.fab__roller--2 { top: 46%; animation-direction: reverse; }
@keyframes roll { to { background-position: 24% 0; } }
.fab__hazard { position: absolute; left: 0; right: 0; bottom: 0; height: 12%; background: repeating-linear-gradient(-45deg, #f2c200 0 16px, #111 16px 32px); border-radius: 0 0 6px 6px; }
.fab__guard { position: absolute; left: 6%; right: 6%; top: 20%; height: 44%; border: 4px solid #c9d2d9; border-radius: 6px; background: repeating-linear-gradient(0deg, transparent 0 8px, rgba(200,210,220,.6) 8px 10px), repeating-linear-gradient(90deg, transparent 0 8px, rgba(200,210,220,.6) 8px 10px); transform-origin: 50% 0; transform: perspective(400px) rotateX(-68deg) translateY(-30%); }
.fab__gap { position: absolute; left: 10%; right: 10%; top: 24%; height: 40%; border-radius: 8px; box-shadow: 0 0 0 2px rgba(255,80,60,.0); animation: gapGlow 2s ease-in-out infinite; }
@keyframes gapGlow { 50% { box-shadow: 0 0 30px 6px rgba(255,80,60,.35); } }
.fab__panel { position: absolute; right: -9%; top: 18%; width: 8%; height: 40%; background: #2b3036; border-radius: 4px; display: flex; flex-direction: column; gap: 10%; align-items: center; justify-content: center; }
.fab__panel i { width: 46%; aspect-ratio: 1; border-radius: 50%; background: #3bd15a; box-shadow: 0 0 10px #3bd15a; }
.fab__panel i:nth-child(2) { background: #f2c200; box-shadow: 0 0 10px #f2c200; }
.fab__panel i:nth-child(3) { background: #d33; box-shadow: none; }
.fab__steam i { position: absolute; bottom: 45%; width: 6%; aspect-ratio: 1; border-radius: 50%; background: rgba(255,255,255,.18); filter: blur(6px); animation: steam 4s ease-out infinite; }
.fab__steam i:nth-child(1) { left: 36%; } .fab__steam i:nth-child(2) { left: 52%; animation-delay: -1.3s; } .fab__steam i:nth-child(3) { left: 64%; animation-delay: -2.6s; }
@keyframes steam { from { transform: translateY(0) scale(.6); opacity: .8; } to { transform: translateY(-260%) scale(2.4); opacity: 0; } }
.fab__beacon { display: none; }
.fab--alarm .fab__beacon { display: block; position: absolute; left: 72%; top: 16%; width: 4%; aspect-ratio: 1; border-radius: 50% 50% 10% 10%; background: #ff2a1a; box-shadow: 0 0 40px 20px rgba(255,40,20,.8); animation: beacon .55s steps(2) infinite; }
@keyframes beacon { 50% { box-shadow: 0 0 6px 2px rgba(255,40,20,.4); background: #6a0d06; } }
.fab--alarm .fab__roller { animation: none; }
.fab--alarm .fab__panel i { background: #333; box-shadow: none; }
.fab--alarm .fab__panel i:nth-child(3) { background: #ff2a1a; box-shadow: 0 0 14px #ff2a1a; }
.fab--alarm .fab__lamps i { background: linear-gradient(rgba(255,60,40,.3), transparent); }

/* ---- spegel */
.spegel { position: absolute; inset: 0; overflow: hidden; background: #1b1e2a; }
.spegel__bg { filter: blur(14px) brightness(.45) saturate(.8); transform: scale(1.1); }
.spegel__frame { position: absolute; left: 50%; top: 50%; width: 46%; height: 84%; transform: translate(-50%, -50%); border-radius: 48% 48% 10px 10px / 30% 30% 10px 10px; padding: 1.2%; background: linear-gradient(135deg, #e8edf2, #8f9aa6, #f3f6f9, #7d8894); box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.spegel__glass { width: 100%; height: 100%; border-radius: inherit; background: linear-gradient(160deg, rgba(220,230,245,.35), rgba(120,140,170,.25) 40%, rgba(220,230,245,.3)), #3a4256; position: relative; overflow: hidden; }
.spegel__glass::after { content: ''; position: absolute; inset: -20%; background: radial-gradient(40% 30% at 30% 30%, rgba(255,255,255,.35), transparent 70%); animation: fog 8s ease-in-out infinite alternate; }
@keyframes fog { to { transform: translate(20%, 25%); opacity: .5; } }

/* ---- sammanfattning */
.env--summary { background: linear-gradient(160deg, #e3f7e2, #bfeac0 60%, #a7dfaa); }
.summ i { position: absolute; border-radius: 50%; filter: blur(40px); opacity: .6; animation: float 12s ease-in-out infinite alternate; }
.summ i:nth-child(1) { width: 40%; aspect-ratio: 1; left: -8%; top: -10%; background: #fff; }
.summ i:nth-child(2) { width: 30%; aspect-ratio: 1; right: -6%; top: 30%; background: #8fd994; animation-delay: -4s; }
.summ i:nth-child(3) { width: 26%; aspect-ratio: 1; left: 30%; bottom: -12%; background: #d4f5d0; animation-delay: -8s; }
@keyframes float { to { transform: translate(8%, 6%) scale(1.1); } }
.is-summary .fx--vignette, .is-summary .fx--grain { display: none; }


/* ===================================================================== MOBIL */
@media (max-width: 720px) {
  .tl-header { padding: 14px 16px 30px; }
  .hud { padding: 12px 16px; gap: 10px; }
  .hud__who span, .hud__progress { display: none; }
  .hud__clock { font-size: calc(22px * var(--text-scale, 1)); }
  .titlecard { left: 16px; bottom: 30vh; }
  .choice { bottom: 3vh; }
  .opt { padding: 13px 14px; font-size: calc(15px * var(--text-scale, 1)); }
  .memory { top: 74px; left: 16px; right: 16px; }
  .pcard { width: 150px; padding: 16px 10px; }
  .pcard__face { width: 64px; height: 64px; }
}

@media (prefers-reduced-motion: reduce) {
  .fx--grain, .is-cinematic .stage, .korr, .bil, .person { animation: none !important; }
}
