:root {
  --paper: #f6f2ea;
  --paper-a: rgba(248, 245, 238, 0.86);
  --ink: #23221f;
  --ink-2: #5b5852;
  --ink-3: #8c877d;
  --line: rgba(35, 34, 31, 0.12);
  --accent: #c0623b;
  --accent-2: #a04f2e;
  --serif: 'Fraunces', Georgia, serif;
  --sans: 'Manrope', system-ui, -apple-system, sans-serif;
  --r: 14px;
  --shadow: 0 10px 40px rgba(30, 25, 15, 0.14), 0 1px 3px rgba(30, 25, 15, 0.08);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #dfe4e6; color: var(--ink); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; cursor: pointer; }
#viewport { position: fixed; inset: 0; }
#viewport canvas { display: block; outline: none; }
.labels { position: absolute; inset: 0; pointer-events: none; }

/* glerspjöld */
.glass, #story, #storynav, #explore, #legend, #areas, #topright .seg, #topright .icon, #menu .drop, #brand {
  background: var(--paper-a); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border: 1px solid rgba(255, 255, 255, 0.6); box-shadow: var(--shadow);
}

#brand { position: fixed; top: 18px; left: 18px; padding: 10px 16px 11px; border-radius: var(--r); z-index: 5; }
#brand .logo { font-family: var(--serif); font-size: 26px; font-weight: 400; letter-spacing: 0.01em; line-height: 1; }
#brand .sub { font-size: 11.5px; color: var(--ink-2); margin-top: 4px; letter-spacing: 0.02em; }

#topright { position: fixed; top: 18px; right: 18px; display: flex; gap: 8px; align-items: center; z-index: 6; }
.seg { display: flex; padding: 4px; border-radius: 999px; }
.seg button { border: 0; background: transparent; padding: 8px 16px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--ink-2); transition: all .2s; }
.seg button.active { background: var(--ink); color: var(--paper); }
.icon { width: 40px; height: 40px; border-radius: 999px; display: grid; place-items: center; border: 0; padding: 0; background: var(--paper-a); }
.icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon:hover { color: var(--accent); }
.icon:disabled { opacity: .35; cursor: default; }
#menu { position: relative; }
#menu .drop { position: absolute; right: 0; top: 48px; width: 250px; border-radius: var(--r); padding: 8px; display: none; flex-direction: column; gap: 2px; }
#menu.open .drop { display: flex; }
#menu .drop a, #menu .drop button, #menu .drop label { display: flex; gap: 8px; align-items: center; padding: 9px 10px; border-radius: 8px; color: var(--ink); text-decoration: none; font-size: 13px; border: 0; background: none; text-align: left; }
#menu .drop a:hover, #menu .drop button:hover, #menu .drop label:hover { background: rgba(0, 0, 0, 0.05); }
#menu .kbd, #menu .note { font-size: 11px; color: var(--ink-3); padding: 6px 10px; }
#menu .note:empty { display: none; }

/* ---- Kynning ---- */
#story {
  position: fixed; left: 18px; bottom: 84px; width: min(420px, calc(100vw - 36px)); border-radius: var(--r);
  padding: 18px 20px 16px; z-index: 5; transition: opacity .25s, transform .25s;
}
#story.swap { opacity: 0; transform: translateY(6px); }
.st-top { display: flex; justify-content: space-between; align-items: baseline; }
.kicker { font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }
.count { font-size: 11px; color: var(--ink-3); font-variant-numeric: tabular-nums; letter-spacing: .06em; }
#story h1 { font-family: var(--serif); font-weight: 400; font-size: 30px; line-height: 1.08; margin: 6px 0 8px; letter-spacing: -0.01em; }
#st-lead { margin: 0; font-size: 14.5px; line-height: 1.5; color: var(--ink-2); }
#st-rest { display: none; font-size: 13.5px; line-height: 1.55; color: var(--ink-2); max-height: 34vh; overflow: auto; margin-top: 8px; }
#st-rest p { margin: 0 0 8px; }
#st-rest ul { margin: 0 0 8px; padding-left: 18px; }
#story.expanded #st-rest { display: block; }
.st-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin-top: 12px; }
#st-stats { display: flex; flex-wrap: wrap; gap: 6px; }
#st-stats:empty { display: none; }
.chip { display: flex; flex-direction: column; padding: 6px 10px 7px; border-radius: 10px; background: rgba(255, 255, 255, 0.7); border: 1px solid var(--line); }
.chip b { font-family: var(--serif); font-weight: 500; font-size: 17px; line-height: 1.1; }
.chip span { font-size: 10.5px; color: var(--ink-3); letter-spacing: 0.02em; }
.more { border: 0; background: none; font-size: 12px; font-weight: 600; color: var(--ink-2); padding: 4px 0; white-space: nowrap; }
.more::after { content: ' ▾'; }
#story.expanded .more::after { content: ' ▴'; }

#storynav { position: fixed; left: 18px; bottom: 18px; display: flex; align-items: center; gap: 6px; padding: 5px; border-radius: 999px; z-index: 5; }
#storynav .icon { width: 36px; height: 36px; background: transparent; box-shadow: none; }
#dots { display: flex; gap: 2px; padding: 0 4px; }
#dots button { width: 18px; height: 22px; border: 0; background: none; padding: 0; position: relative; }
#dots button::after { content: ''; position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; border-radius: 50%; transform: translate(-50%, -50%); background: rgba(35, 34, 31, 0.22); transition: all .25s; }
#dots button.past::after { background: rgba(35, 34, 31, 0.5); }
#dots button.active::after { width: 14px; border-radius: 4px; background: var(--accent); }
/* eins orðs heiti kafla við bendil */
#dots button::before {
  content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 10px); transform: translate(-50%, 4px);
  padding: 4px 9px; border-radius: 999px; background: #23221f; color: #f6f3ee; font-size: 12px; line-height: 1.3;
  letter-spacing: .01em; white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity .15s, transform .15s; z-index: 5;
}
#dots button:hover::before, #dots button:focus-visible::before { opacity: 1; transform: translate(-50%, 0); }
#btn-play .pause { display: none; }
#btn-play.on .pause { display: block; } #btn-play.on .play { display: none; }
#btn-play.on { color: var(--accent); }

/* ---- Skoða ---- */
#explore {
  position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); border-radius: var(--r); padding: 8px 12px; z-index: 5;
  display: none; flex-direction: column; gap: 8px; width: max-content; max-width: calc(100vw - 28px);
}
.exrow { display: flex; gap: 16px; align-items: flex-end; flex-wrap: wrap; justify-content: center; }
.exrow + .exrow { border-top: 1px solid var(--line); padding-top: 8px; }
body[data-mode="skoda"] #explore { display: flex; }
body[data-mode="skoda"] #story, body[data-mode="skoda"] #storynav { display: none; }
.grp { display: flex; flex-direction: column; gap: 5px; }
.gl { font-size: 10px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
.row { display: flex; gap: 4px; align-items: center; }
.row.wrap { flex-wrap: wrap; max-width: 620px; }
.tg { border: 1px solid var(--line); background: rgba(255, 255, 255, 0.55); padding: 5px 9px; border-radius: 8px; font-size: 12px; font-weight: 600; color: var(--ink-2); transition: all .15s; }
.tg:hover { border-color: var(--ink-3); }
.tg.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.tg.act { min-width: 34px; }
select { font: inherit; font-size: 12px; font-weight: 600; color: var(--ink); background: rgba(255, 255, 255, 0.7); border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; }
input[type=range] { accent-color: var(--accent); width: 150px; }
#sun-time { font-variant-numeric: tabular-nums; font-size: 12px; font-weight: 600; width: 40px; }

/* skýringar */
#legend { position: fixed; right: 18px; top: 76px; border-radius: 12px; padding: 10px 12px; font-size: 12px; z-index: 4; display: none; max-width: 300px; }
#legend.show { display: block; }
#legend .lt { font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 4px; }
#legend .li { display: flex; align-items: center; gap: 8px; padding: 3px 0; color: var(--ink-2); }
#legend i { width: 18px; height: 8px; border-radius: 3px; flex: none; }
#areas { position: fixed; right: 18px; top: 76px; width: min(420px, calc(100vw - 36px)); border-radius: var(--r); padding: 16px 18px; z-index: 4; display: none; font-size: 12px; max-height: calc(100vh - 170px); overflow: auto; }
#areas.show { display: block; }
#legend.show ~ #areas.show { top: auto; bottom: 18px; }
body[data-mode="skoda"] #areas.show { bottom: auto; top: 76px; }
#areas h3 { font-family: var(--serif); font-weight: 400; font-size: 26px; margin: 2px 0 10px; }
#areas h3 small { font-family: var(--sans); font-size: 12px; color: var(--ink-3); }
.ar-bar { position: relative; height: 14px; border-radius: 7px; background: rgba(0, 0, 0, .06); margin: 6px 0 22px; }
.ar-bar .fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--ink); border-radius: 7px 0 0 7px; }
.ar-bar .fill.link { background: var(--accent); border-radius: 0; }
.ar-bar .band { position: absolute; top: -3px; bottom: -3px; background: rgba(192, 98, 59, .18); }
.ar-bar .tick { position: absolute; top: -5px; bottom: -5px; width: 2px; background: var(--accent); }
.ar-bar .tick span { position: absolute; top: 22px; left: -40px; white-space: nowrap; font-size: 10.5px; color: var(--accent); font-weight: 600; }
.ar-sub { display: flex; gap: 14px; color: var(--ink-2); margin-bottom: 10px; }
.ar-sub .sw { display: inline-block; width: 10px; height: 10px; border-radius: 2px; background: var(--ink); margin-right: 5px; vertical-align: -1px; }
.ar-sub .sw.link { background: var(--accent); }
#areas table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
#areas th { text-align: left; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; padding: 4px 4px; border-bottom: 1px solid var(--line); }
#areas td { padding: 5px 4px; border-bottom: 1px solid var(--line); color: var(--ink-2); }
#areas td em { font-style: normal; font-size: 10.5px; margin-left: 3px; }
#areas td em.pos { color: #5d7a4c; } #areas td em.neg { color: var(--accent); }
.ar-lv { display: flex; gap: 6px; margin-top: 10px; }
.ar-lv div { flex: 1; background: rgba(255, 255, 255, .6); border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; display: flex; flex-direction: column; }
.ar-lv b { font-size: 11px; color: var(--accent); } .ar-lv span { font-weight: 600; }
.ar-foot { margin-top: 10px; color: var(--ink-3); }

#compass { position: fixed; right: 18px; bottom: 18px; width: 44px; height: 44px; border-radius: 50%; background: var(--paper-a); box-shadow: var(--shadow); z-index: 4; display: grid; place-items: center; backdrop-filter: blur(10px); }
#compass .needle { width: 44px; height: 44px; position: relative; transition: transform .1s linear; }
#compass .needle::before { content: ''; position: absolute; left: 50%; top: 9px; width: 0; height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; border-bottom: 14px solid var(--accent); transform: translateX(-50%); }
#compass .needle::after { content: ''; position: absolute; left: 50%; bottom: 9px; width: 0; height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 12px solid rgba(35, 34, 31, .3); transform: translateX(-50%); }
#compass span { position: absolute; left: 50%; top: -13px; transform: translateX(-50%); font-size: 9px; font-weight: 700; color: var(--ink-2); }
body[data-mode="skoda"] #compass { bottom: auto; top: 76px; right: auto; left: 18px; }

/* merki í senu */
.room-label { font-size: 10.5px; line-height: 1.15; text-align: center; color: var(--ink); background: rgba(255, 255, 255, .78); padding: 2px 6px; border-radius: 4px; white-space: nowrap; }
.room-label b { display: block; font-weight: 600; font-size: 10.5px; }
.room-label span { color: var(--ink-3); font-size: 9.5px; }
.room-label.small { background: rgba(255, 255, 255, .55); padding: 1px 4px; }
.site-label { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: rgba(40, 38, 34, .62); font-weight: 600; text-shadow: 0 0 6px rgba(255, 255, 255, .9); white-space: nowrap; }
.callout { display: flex; flex-direction: column; align-items: center; pointer-events: none; }
.callout-text { background: var(--ink); color: var(--paper); font-size: 12px; font-weight: 600; padding: 5px 10px; border-radius: 999px; white-space: nowrap; box-shadow: 0 4px 14px rgba(0, 0, 0, .18); letter-spacing: .01em; }
.callout-stem { width: 1.5px; background: var(--ink); opacity: .8; }
.callout-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--paper); border: 2px solid var(--accent); }
.dim-label { background: var(--accent); color: #fff; font-size: 11.5px; font-weight: 700; padding: 3px 8px; border-radius: 6px; white-space: nowrap; }
.d-label { font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 6px; white-space: nowrap; background: rgba(255, 255, 255, .85); color: var(--ink); }
.d-sun { background: rgba(255, 246, 225, .9); color: #8a5a10; font-size: 10px; }
.d-sun-now { background: #e0a54a; color: #fff; font-size: 12px; }
.d-compass { background: none; color: rgba(35, 34, 31, .55); font-size: 13px; font-weight: 700; }
.d-calm { background: rgba(230, 240, 210, .9); color: #435a2f; }
.d-wind { background: #5b7f99; color: #fff; }
.d-level { background: rgba(35, 34, 31, .85); color: #fff; font-weight: 500; }
.d-level b { color: #f2b79c; margin-right: 4px; }

/* hleðsla */
#loading { position: fixed; inset: 0; background: var(--paper); display: grid; place-content: center; text-align: center; z-index: 50; transition: opacity .8s; }
#loading.done { opacity: 0; pointer-events: none; }
#loading .logo { font-family: var(--serif); font-size: 54px; font-weight: 300; }
#loading .msg { color: var(--ink-3); font-size: 13px; margin-top: 6px; }
#loading .bar { width: 160px; height: 2px; background: var(--line); margin: 18px auto 0; overflow: hidden; border-radius: 2px; }
#loading .bar i { display: block; height: 100%; width: 40%; background: var(--accent); animation: ld 1.2s ease-in-out infinite; }
@keyframes ld { 0% { transform: translateX(-100%); } 100% { transform: translateX(250%); } }

body.clean #story, body.clean #storynav, body.clean #explore, body.clean #brand, body.clean #legend, body.clean #compass, body.clean #areas { opacity: 0; pointer-events: none; }
body.clean #topright .seg, body.clean #menu { opacity: 0; }
#story, #storynav, #explore, #brand, #legend, #compass { transition: opacity .3s; }

@media (max-width: 900px) {
  #brand .sub { display: none; }
  #story { width: calc(100vw - 36px); bottom: 76px; padding: 14px 16px; }
  #story h1 { font-size: 24px; }
  #st-lead { font-size: 13.5px; }
  #explore { gap: 10px; padding: 8px 10px; }
  .row.wrap { max-width: 320px; }
  #legend, #areas { top: auto; bottom: 280px; }
  #compass { display: none; }
}
#st-rest .ref, #st-lead .ref { font-size: 11px; color: var(--ink-3); letter-spacing: .02em; border-top: 1px solid var(--line); padding-top: 6px; }
#legend .lsel { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
#legend .lsel .lt { margin: 0; }
@media (max-width: 600px) {
  #brand { padding: 8px 12px; } #brand .logo { font-size: 22px; }
  #topright .seg button { padding: 7px 11px; }
  #story { left: 10px; right: 10px; width: auto; bottom: 66px; padding: 12px 14px; }
  #story h1 { font-size: 21px; }
  #storynav { left: 10px; right: 10px; bottom: 10px; justify-content: space-between; }
  #dots button { width: 13px; }
  #explore { left: 10px; right: 10px; transform: none; width: auto; max-height: 46vh; overflow: auto; }
  #legend, #areas { left: 10px; right: 10px; width: auto; max-width: none; top: 70px; bottom: auto; }
}
#legend label.tgl { cursor: pointer; } #legend label.tgl input { accent-color: var(--accent); margin: 0; }
.dseg { display: none; flex-wrap: wrap; gap: 4px; margin-top: 10px; }
.dseg.show { display: flex; }
.dseg button { border: 1px solid var(--line); background: rgba(255,255,255,.6); border-radius: 999px; padding: 5px 10px; font-size: 11.5px; font-weight: 600; color: var(--ink-2); }
.dseg button.on { background: var(--accent); border-color: var(--accent); color: #fff; }
#ex-seg { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 5; margin: 0; padding: 5px; border-radius: 999px; background: var(--paper-a); box-shadow: var(--shadow); backdrop-filter: blur(14px); max-width: calc(100vw - 420px); justify-content: center; }
body[data-mode="kynning"] #ex-seg { display: none; }
body[data-mode="skoda"] #st-seg { display: none; }
#legend .lt + .li { margin-top: 2px; }
@media (max-width: 900px) { #ex-seg { top: 70px; max-width: calc(100vw - 20px); } }
#story { max-height: 40vh; overflow: auto; }
#story.expanded { max-height: 62vh; }
@media (max-width: 900px) { #story { max-height: 34vh; } }
#areas { width: min(380px, calc(100vw - 36px)); padding: 12px 14px; }
#areas .ar-head { display: flex; justify-content: space-between; align-items: flex-start; }
#areas .ar-col { border: 0; background: none; font-size: 16px; color: var(--ink-3); padding: 2px 6px; }
#areas.collapsed .ar-body { display: none; }
#areas.collapsed .ar-col { transform: rotate(-90deg); }
#areas h3 { font-size: 22px; margin: 2px 0 6px; }
.ar-lvsel { display: flex; gap: 4px; align-items: center; margin: 4px 0 8px; flex-wrap: wrap; }
.ar-lvsel button { border: 1px solid var(--line); background: rgba(255,255,255,.6); border-radius: 7px; padding: 3px 9px; font-size: 11.5px; font-weight: 700; color: var(--ink-2); }
.ar-lvsel button.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.ar-hint { font-size: 10.5px; color: var(--ink-3); margin-left: 4px; }
.ar-cats { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-bottom: 8px; font-size: 11px; color: var(--ink-2); }
.ar-cats i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 4px; vertical-align: -1px; }
#areas td small { color: var(--accent); font-size: 10px; }
#areas tr[data-nr] { cursor: pointer; }
#areas tr.hot td { background: rgba(192, 98, 59, .12); }
#areas td { padding: 4px 4px; font-size: 11.5px; }
#tip { position: fixed; z-index: 30; pointer-events: none; background: var(--ink); color: var(--paper); font-size: 12px; padding: 5px 9px; border-radius: 7px; box-shadow: 0 4px 14px rgba(0,0,0,.2); display: none; white-space: nowrap; }
.area-label { font-size: 10.5px; line-height: 1.15; text-align: center; color: var(--ink); background: rgba(255,255,255,.82); padding: 2px 5px; border-radius: 4px; white-space: nowrap; }
.area-label b { display: block; font-weight: 600; }
.area-label .d { font-size: 9.5px; font-weight: 700; }
.area-label .d.neg { color: #b2452b; } .area-label .d.pos { color: #4f7a45; }
.dseg2 { margin-top: 6px; }
.dseg2 button.on { background: var(--ink); border-color: var(--ink); }
#ex-seg2 { position: fixed; top: 62px; left: 50%; transform: translateX(-50%); z-index: 5; padding: 4px; border-radius: 999px; background: var(--paper-a); box-shadow: var(--shadow); backdrop-filter: blur(14px); margin: 0; }
body[data-mode="kynning"] #ex-seg2 { display: none; }
body[data-mode="skoda"] #st-seg2 { display: none; }
#ex-seg3 { display: none !important; }
body.viz-on .labels { visibility: hidden; }
body.viz-on #legend, body.viz-on #areas, body.viz-on #compass { opacity: 0; pointer-events: none; }
#viz-flat { position: fixed; inset: 0; z-index: 1; background: #1a1a1a; opacity: 0; pointer-events: none; transition: opacity 1.2s ease; overflow: hidden; display: grid; place-items: center; }
#viz-flat.show { opacity: 1; }
#viz-flat img { width: 100%; height: 100%; object-fit: cover; }
#viz-flat.kb img { animation: kenburns 12s cubic-bezier(.2,.6,.3,1) forwards; }
#viz-flat img { transform: scale(1.08); }
@keyframes kenburns { from { transform: scale(1.08); } to { transform: scale(1.0); } }
#viz-caption { position: fixed; right: 18px; bottom: 18px; z-index: 6; max-width: min(520px, calc(100vw - 520px)); color: #fff; font-size: 12.5px; line-height: 1.45; text-shadow: 0 1px 6px rgba(0,0,0,.6); opacity: 0; transition: opacity .8s; pointer-events: none; }
#viz-caption b { display: block; font-family: var(--serif); font-weight: 400; font-size: 18px; margin-bottom: 2px; }
#viz-caption.show { opacity: 1; }
#gallery { position: fixed; inset: 0; z-index: 40; background: rgba(20, 18, 15, .55); display: none; place-items: center; backdrop-filter: blur(6px); }
#gallery.show { display: grid; }
#gallery .g-inner { background: var(--paper); border-radius: var(--r); padding: 16px 18px; width: min(920px, calc(100vw - 32px)); max-height: calc(100vh - 60px); overflow: auto; box-shadow: var(--shadow); }
#gallery .g-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
#gallery .g-x { border: 0; background: none; font-size: 24px; color: var(--ink-2); }
#gallery .g-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
#gallery .g-grid button { border: 0; padding: 0; background: none; text-align: left; border-radius: 10px; overflow: hidden; }
#gallery .g-grid img { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; border-radius: 10px; transition: transform .3s; }
#gallery .g-grid button:hover img { transform: scale(1.03); }
#gallery .g-grid span { display: block; font-size: 12.5px; font-weight: 600; padding: 6px 2px; }
@media (max-width: 900px) { #viz-caption { max-width: calc(100vw - 36px); bottom: auto; top: 76px; } }
#viz-caption { background: linear-gradient(90deg, rgba(20,18,15,.0), rgba(20,18,15,.45) 12%); padding: 10px 14px 10px 26px; border-radius: 10px; }

#viz-vignette { position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: 0; transition: opacity 2s ease; background: radial-gradient(ellipse at 50% 50%, rgba(232,236,236,0) 62%, rgba(232,236,236,.55) 82%, rgba(232,236,236,.95) 100%); }
#viz-vignette.show { opacity: 1; }
#viz-flat { background: #e8ecec; }
.d-issue { background: #fff; color: #b2452b; border: 1.5px solid #b2452b; border-radius: 999px; padding: 1px 7px; font-size: 10.5px; pointer-events: auto; cursor: help; }
.d-issue.ok { background: #e7f1e7; color: #3f7a4b; border-color: #4f8a5b; }
.d-issue.wip { background: rgba(255,255,255,.9); color: #6b665e; border-color: #9a958c; }
#walk-hud { display: none; position: fixed; inset: 0; pointer-events: none; z-index: 4; }
body.walking #walk-hud { display: block; }
#walk-hud .xh { position: absolute; left: 50%; top: 50%; width: 14px; height: 14px; transform: translate(-50%, -50%); }
#walk-hud .xh::before, #walk-hud .xh::after { content: ''; position: absolute; background: rgba(255,255,255,.9); box-shadow: 0 0 2px rgba(0,0,0,.6); }
#walk-hud .xh::before { left: 6px; top: 0; width: 2px; height: 14px; } #walk-hud .xh::after { top: 6px; left: 0; height: 2px; width: 14px; }
#walk-hud .wl { position: absolute; left: 18px; top: 96px; background: var(--paper-a); padding: 6px 12px; border-radius: 10px; font-size: 12px; box-shadow: var(--shadow); display: flex; gap: 10px; align-items: baseline; }
#walk-hud .wl b { color: var(--accent); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; }
#walk-hud .wh { position: absolute; left: 50%; top: 18px; transform: translateX(-50%); background: rgba(35,34,31,.7); color: #fff; font-size: 12px; padding: 6px 12px; border-radius: 999px; transition: opacity .4s; }
#walk-hud.locked .wh { opacity: 0.25; }
body.walking #compass, body.walking .labels { display: none; }
.d-fire { background: #c62d1f; color: #fff; }
#ex-walkmode { display: none; gap: 2px; padding: 2px; border-radius: 9px; background: rgba(0,0,0,.06); margin-left: 4px; }
#ex-walkmode.show { display: inline-flex; }
#ex-walkmode button { border: 0; background: none; padding: 4px 9px; border-radius: 7px; font-size: 12px; font-weight: 600; color: var(--ink-2); }
#ex-walkmode button.on { background: var(--accent); color: #fff; }
#walk-hud .wd { position: absolute; left: 50%; top: calc(50% + 22px); transform: translateX(-50%); background: rgba(35,34,31,.75); color: #fff; font-size: 12px; padding: 4px 10px; border-radius: 999px; opacity: 0; transition: opacity .2s; }

/* ======== Dökkt, gegnsætt útlit (eins og myndatextar) ======== */
:root { --dk: rgba(25, 25, 25, 0.6); --dk2: rgba(25, 25, 25, 0.72); --dk-line: rgba(255, 255, 255, 0.14); --wt: #fff; --wt2: rgba(255, 255, 255, 0.78); --wt3: rgba(255, 255, 255, 0.55); }
#brand { display: none !important; }
#story, #legend, #explore, #topright .seg, #topright .icon, #menu .drop, #areas, #compass, #dotrail, .navarrow, #pillbar .dseg.show, #ex-seg, #ex-seg2, #walk-hud .wl {
  background: var(--dk); color: var(--wt); border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px) saturate(1.1); -webkit-backdrop-filter: blur(16px) saturate(1.1); box-shadow: 0 10px 34px rgba(0, 0, 0, 0.25);
}
/* kaflareitur */
#story { left: 64px; bottom: 22px; width: min(400px, calc(100vw - 140px)); padding: 16px 18px 14px; }
.st-brand { font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--wt3); margin-bottom: 8px; }
#story .kicker { color: #f0b493; }
#story .count { color: var(--wt3); }
#story h1 { color: var(--wt); font-size: 27px; }
#st-lead, #st-rest { color: var(--wt2); }
#st-rest .ref, #st-lead .ref { color: var(--wt3); border-top-color: var(--dk-line); }
.chip { background: rgba(255, 255, 255, 0.08); border-color: var(--dk-line); }
.chip b { color: var(--wt); } .chip span { color: var(--wt3); }
.more { color: var(--wt2); }
/* lóðrétt punktaröð */
#storynav { display: none !important; }
#dotrail { position: fixed; left: 16px; top: 50%; transform: translateY(-50%); width: 28px; padding: 10px 0; border-radius: 999px; z-index: 6; }
body[data-mode="skoda"] #dotrail, body[data-mode="skoda"] .navarrow, body[data-mode="skoda"] #pillbar { display: none; }
#dots { flex-direction: column; align-items: center; gap: 2px; padding: 0; }
#dots button { width: 28px; height: 16px; }
#dots button::after { width: 6px; height: 6px; background: rgba(255, 255, 255, 0.45); }
#dots button.past::after { background: rgba(255, 255, 255, 0.6); }
#dots button.active::after { width: 6px; height: 16px; border-radius: 4px; background: #fff; }
#dots button::before { left: calc(100% + 10px); top: 50%; bottom: auto; transform: translate(-4px, -50%); background: var(--dk2); color: #fff; }
#dots button:hover::before, #dots button:focus-visible::before { transform: translate(0, -50%); }
/* örvar */
.navarrow { position: fixed; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; z-index: 6; cursor: pointer; padding: 0; transition: background .15s, opacity .2s; }
.navarrow svg { width: 22px; height: 22px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.navarrow.left { left: 56px; } .navarrow.right { right: 18px; }
.navarrow:hover { background: rgba(25, 25, 25, 0.8); }
.navarrow:disabled { opacity: .25; cursor: default; }
/* sviðsmyndaröð neðst fyrir miðju */
#pillbar { position: fixed; left: 480px; right: 24px; bottom: 22px; display: flex; justify-content: center; align-items: center; gap: 0; z-index: 5; pointer-events: none; flex-wrap: wrap; row-gap: 6px; }
#pillbar .dseg { margin: 0; padding: 4px; gap: 3px; border-radius: 999px; pointer-events: auto; }
#pillbar .dseg.show { display: flex; }
#pillbar .dseg.show + .dseg.show { margin-left: 10px; position: relative; }
#pillbar .dseg.show + .dseg.show::before { content: ''; position: absolute; left: -6px; top: 22%; bottom: 22%; width: 1px; background: rgba(255, 255, 255, .35); }
#pillbar .dseg button, #ex-seg button, #ex-seg2 button { background: transparent; border: 0; color: #fff; padding: 7px 13px; font-size: 12.5px; border-radius: 999px; transition: background .15s, color .15s; }
#pillbar .dseg button:hover, #ex-seg button:hover, #ex-seg2 button:hover { background: rgba(255, 255, 255, 0.82); color: #111; }
#pillbar .dseg button.on, #ex-seg button.on, #ex-seg2 button.on { background: #fff; color: #111; box-shadow: inset 0 0 0 1px #fff; font-weight: 700; }
/* efst til hægri og valmynd */
#topright .seg button { color: var(--wt2); }
#topright .seg button.active { background: #fff; color: #111; }
#topright .icon { color: #fff; }
#menu .drop a, #menu .drop button, #menu .drop label { color: #fff; }
#menu .drop a:hover, #menu .drop button:hover, #menu .drop label:hover { background: rgba(255, 255, 255, 0.1); }
#menu .kbd, #menu .note { color: var(--wt3); }
#btn-play .pause { display: none; } #btn-play.on .pause { display: inline; } #btn-play.on .play { display: none; }
/* skýringar og flatarmál */
#legend .li { color: var(--wt2); } #legend .lt { color: var(--wt3); }
#legend select { background: rgba(255,255,255,.12); color: #fff; border-color: var(--dk-line); }
#areas h3, #areas td, #areas .ar-sub, #areas .ar-foot { color: var(--wt2); } #areas h3 { color: #fff; }
#areas th { color: var(--wt3); border-color: var(--dk-line); } #areas td { border-color: var(--dk-line); }
#areas .ar-bar { background: rgba(255,255,255,.12); } #areas .ar-bar .fill { background: #fff; } #areas .ar-sub .sw { background: #fff; }
.ar-lv div { background: rgba(255,255,255,.08); border-color: var(--dk-line); } .ar-lv span { color: #fff; }
.ar-lvsel button { background: rgba(255,255,255,.1); color: #fff; border-color: var(--dk-line); } .ar-lvsel button.on { background: #fff; color: #111; }
.ar-cats { color: var(--wt2); } .ar-hint { color: var(--wt3); } #areas .ar-col { color: #fff; }
/* Skoða tækjastika */
#explore .gl { color: var(--wt3); }
#explore .tg { background: rgba(255,255,255,.08); color: var(--wt2); border-color: var(--dk-line); }
#explore .tg:hover { background: rgba(255,255,255,.82); color: #111; }
#explore .tg.on { background: #fff; color: #111; border-color: #fff; }
#explore select { background: rgba(255,255,255,.1); color: #fff; border-color: var(--dk-line); }
#explore select option { color: #111; }
#sun-time { color: #fff; }
.exrow + .exrow { border-top-color: var(--dk-line); }
#compass .needle::after { border-top-color: rgba(255,255,255,.5); } #compass span { color: #fff; }
#walk-hud .wl { color: #fff; }
@media (max-width: 760px) {
  #dotrail { left: 50%; top: 64px; transform: translateX(-50%); width: auto; height: 28px; padding: 0 10px; }
  #dots { flex-direction: row; } #dots button { width: 14px; height: 28px; }
  #dots button.active::after { width: 14px; height: 6px; }
  #dots button::before { display: none; }
  .navarrow { width: 36px; height: 36px; top: auto; bottom: 46vh; } .navarrow.left { left: 8px; } .navarrow.right { right: 8px; }
  #story { left: 10px; right: 10px; width: auto; bottom: 10px; }
  #pillbar { left: 10px; right: 10px; bottom: auto; top: 102px; }
}
#scn-caption { position: fixed; right: 18px; bottom: 80px; z-index: 5; max-width: min(460px, calc(100vw - 560px)); background: var(--dk); color: #fff; border-radius: 12px; padding: 10px 14px 11px; font-size: 12.5px; line-height: 1.45; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid rgba(255,255,255,.08); opacity: 0; transform: translateY(6px); transition: opacity .35s, transform .35s; pointer-events: none; }
#scn-caption.show { opacity: 1; transform: none; }
#scn-caption b { display: block; font-family: var(--serif); font-weight: 400; font-size: 17px; margin-bottom: 2px; }
#scn-caption span { color: rgba(255,255,255,.82); }
body.viz-on #scn-caption, body[data-mode="skoda"] #scn-caption, body.clean #scn-caption { opacity: 0; }
#viz-caption { bottom: 80px; background: var(--dk); border-radius: 12px; padding: 10px 14px; text-shadow: none; }
@media (max-width: 760px) { #scn-caption { left: 10px; right: 10px; max-width: none; bottom: auto; top: 150px; } }
.dot-gap { width: 28px; height: 14px; position: relative; }
.dot-gap::after { content: ''; position: absolute; left: 8px; right: 8px; top: 50%; height: 1px; background: rgba(255,255,255,.35); }
.dot-gap::before { content: attr(data-tip); position: absolute; left: calc(100% + 10px); top: 50%; transform: translateY(-50%); background: var(--dk2); color: #fff; font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; padding: 3px 8px; border-radius: 6px; white-space: nowrap; opacity: 0; transition: opacity .15s; pointer-events: none; }
#dotrail:hover .dot-gap::before { opacity: .9; }
@media (max-width: 760px) { .dot-gap { width: 10px; height: 28px; } .dot-gap::after { left: 50%; right: auto; top: 8px; bottom: 8px; width: 1px; height: auto; } .dot-gap::before { display: none; } }
.navarrow.left { left: 72px; }
@media (max-width: 760px) { .navarrow.left { left: 8px; } #dotrail { top: 58px; } .navarrow { bottom: 50vh; } }
@media (max-width: 760px) { body[data-mode="kynning"] #legend { display: none !important; } #pillbar { top: 100px; } #scn-caption { top: 152px; } }
#hero { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -40%); z-index: 5; text-align: center; padding: 26px 40px 24px; border-radius: 18px; background: rgba(25,25,25,.5); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); color: #fff; opacity: 0; transition: opacity 1.6s ease .6s, transform 1.6s ease .6s; pointer-events: none; border: 1px solid rgba(255,255,255,.08); }
#hero.show { opacity: 1; transform: translate(-50%, -50%); }
#hero .h-title { font-family: var(--serif); font-weight: 300; font-size: clamp(56px, 9vw, 112px); line-height: 1; letter-spacing: .01em; }
#hero .h-sub { font-size: 15px; letter-spacing: .06em; margin-top: 10px; color: rgba(255,255,255,.88); }
#hero .h-line { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; margin-top: 12px; color: rgba(255,255,255,.6); }
body.hero-on #story, body.hero-on #scn-caption, body.hero-on #legend { opacity: 0; pointer-events: none; }
body[data-mode="skoda"] #hero { display: none; }
body.dim-model #viewport { filter: brightness(.55) saturate(.7); transition: filter .8s; }
#viewport { transition: filter .8s; }
#cost { position: fixed; right: 18px; top: 76px; bottom: 80px; width: min(520px, calc(100vw - 560px)); overflow: auto; z-index: 5; display: none; padding: 16px 18px; border-radius: 14px; background: var(--dk); color: #fff; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid rgba(255,255,255,.08); font-size: 12.5px; }
#cost.show { display: block; }
#cost .c-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
#cost .kicker { color: #f0b493; } #cost .c-pl { color: var(--wt3); font-size: 11px; text-align: right; }
#cost .c-big { font-family: var(--serif); font-size: 40px; font-weight: 400; margin: 6px 0 10px; } #cost .c-big small { font-family: var(--sans); font-size: 12px; color: var(--wt3); }
#cost .c-kpis { display: flex; gap: 8px; margin-bottom: 14px; } #cost .c-kpis div { flex: 1; background: rgba(255,255,255,.08); border: 1px solid var(--dk-line); border-radius: 10px; padding: 7px 10px; display: flex; flex-direction: column; }
#cost .c-kpis b { font-family: var(--serif); font-weight: 500; font-size: 18px; } #cost .c-kpis span { color: var(--wt3); font-size: 10.5px; }
#cost .c-row { display: grid; grid-template-columns: 170px 1fr 56px; gap: 8px; align-items: center; padding: 3px 0; }
#cost .c-n { color: var(--wt2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#cost .c-b { height: 10px; background: rgba(255,255,255,.08); border-radius: 3px; overflow: hidden; } #cost .c-b i { display: block; height: 100%; background: #f0b493; border-radius: 3px; }
#cost .c-v { text-align: right; font-variant-numeric: tabular-nums; } #cost .c-unit { text-align: right; color: var(--wt3); font-size: 10.5px; }
#cost .c-foot { margin-top: 12px; border-top: 1px solid var(--dk-line); padding-top: 8px; color: var(--wt2); display: flex; flex-direction: column; gap: 4px; } #cost .c-src { color: var(--wt3); font-size: 11px; }
@media (max-width: 900px) { #cost { left: 10px; right: 10px; width: auto; top: 150px; bottom: 300px; } }

#cost { right: 80px; bottom: auto; max-height: calc(100vh - 170px); width: min(500px, calc(100vw - 620px)); }
#cost .c-b:empty { background: none; border-top: 1px dashed rgba(255,255,255,.25); height: 0; }

/* forsíða: titill neðst til vinstri án kassa */
#hero { left: 0; right: 0; top: auto; bottom: 0; transform: translateY(12px); text-align: left; padding: 140px 64px 52px 72px; border-radius: 0; border: 0; background: linear-gradient(to top, rgba(10,10,12,.62), rgba(10,10,12,.28) 55%, rgba(10,10,12,0)); backdrop-filter: none; -webkit-backdrop-filter: none; }
#hero.show { transform: none; }
#hero .h-title { font-size: clamp(72px, 11vw, 150px); text-shadow: 0 2px 30px rgba(0,0,0,.35); }
#hero .h-sub { font-size: 17px; text-shadow: 0 1px 8px rgba(0,0,0,.5); }
#hero .h-line { text-shadow: 0 1px 6px rgba(0,0,0,.5); }
body.hero-on .labels, body.hero-on #compass { opacity: 0 !important; pointer-events: none; }
body.hero-on #dotrail, body.hero-on .navarrow { opacity: 0; animation: heroIn 1s ease 2s forwards; }
@keyframes heroIn { to { opacity: 1; } }

/* teikningablöð (kafli Aðaluppdrættir) */
#sheets { position: fixed; left: 480px; right: 32px; top: 76px; bottom: 84px; z-index: 2; display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity .6s ease; cursor: zoom-in; }
#sheets.show { opacity: 1; pointer-events: auto; }
#sheets .sh-frame { position: relative; overflow: hidden; background: #fff; box-shadow: 0 18px 50px rgba(0,0,0,.35); border-radius: 2px; flex: none; }
#sheets img { position: absolute; left: 0; top: 0; width: 100%; height: 100%; max-width: none; transition: width 1.4s cubic-bezier(.45,0,.2,1), height 1.4s cubic-bezier(.45,0,.2,1), left 1.4s cubic-bezier(.45,0,.2,1), top 1.4s cubic-bezier(.45,0,.2,1); }
#sheets.full { inset: 0; z-index: 40; background: rgba(20,18,15,.82); padding: 18px; cursor: zoom-out; }
@media (max-width: 900px) { #sheets { left: 16px; right: 16px; top: 70px; bottom: 50%; } }

/* fyrsta persóna: fela Skoða-spjaldið svo það hylji ekki sjónina (F = hætta) */
body.walking #explore { opacity: 0; pointer-events: none; transition: opacity .3s; }

/* stikan sést líka yfir inngangs- og lokaglærum (#intro z 10000) */
#dotrail { z-index: 10001; }
#dots button { height: 18px; }
body.finale #dotrail { opacity: 0; }

/* engin KPI-spjöld í kaflareitum (ákvörðun arkitekts, SAMARK) */
#st-stats { display: none !important; }

/* kaflareitur í sama stíl og myndatexti (#scn-caption): dökkt gler, titill + texti; engin vörumerkislína né teljari */
#story .st-brand, #story #st-count { display: none !important; }
#story { background: var(--dk); color: #fff; border-radius: 12px; border: 1px solid rgba(255,255,255,.08); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); padding: 14px 18px 12px; width: min(520px, calc(100vw - 140px)); }
#story .kicker { font-size: 10.5px; letter-spacing: .12em; }
#story h1 { font-size: 26px; margin: 4px 0 6px; }
#st-lead { font-size: 15px; line-height: 1.5; color: rgba(255,255,255,.92); }
#story .st-foot { margin-top: 6px; }
/* kaflareitur: sama gegnsæja dökka „fade“ og myndatextinn (#viz-caption) — engin móða, skuggi né rammi */
#story { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; box-shadow: none !important; border: 0 !important; background: var(--dk) !important; }
/* myndatextar sviðsmynda og upplýsingaspjöld: sama slæða, engin móða né rammi */
#scn-caption, #cost, #legend { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; box-shadow: none !important; border: 0 !important; background: var(--dk) !important; }
/* kaflaspjald og myndatextar: lóðréttur halli — efst eins og áður, neðst alveg gegnsætt */
#story, #scn-caption, #viz-caption { background: linear-gradient(180deg, rgba(25,25,25,.6) 0%, rgba(25,25,25,.42) 55%, rgba(25,25,25,0) 100%) !important; }
#story, #scn-caption, #viz-caption { text-shadow: 0 1px 8px rgba(0,0,0,.45); }

/* VR í gegnum WiVRn (vrbridge.js) */
.icon.vrbtn { font-size: 12px; font-weight: 700; letter-spacing: 0.04em; color: var(--ink-2); }
.icon.vrbtn.active { background: var(--ink); color: var(--paper); }
#vr-hud { display: none; position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 7; padding: 9px 16px;
  border-radius: 999px; background: rgba(17, 17, 17, 0.78); color: #fff; font-size: 13px; pointer-events: none; }
#vr-hud.show { display: block; }
body.vr-on #story, body.vr-on #explore, body.vr-on #dotrail, body.vr-on .navarrow, body.vr-on #pillbar,
body.vr-on #legend, body.vr-on #areas, body.vr-on #compass, body.vr-on #walk-hud, body.vr-on .labels { display: none !important; }
