/* Layout: one full-height stage, portrait canvas centred, HTML panels floating over it.
   Single deliberate look: Oslo at night, sodium-amber street light. */
:root {
  --night: #0e0f14;
  --panel: #171920;
  --ink: #f4f1e6;
  --muted: #9aa0b0;
  --amber: #ffb627;
  --cash: #ffd166;
  --good: #7bd389;
  --bad: #ff5a4e;
  --display: "Bungee", "Rubik", system-ui, sans-serif;
  --body: "Rubik", system-ui, sans-serif;
  color-scheme: dark;
}

html, body { height: 100%; }
[hidden] { display: none !important; }
body {
  margin: 0;
  background: var(--night);
  color: var(--ink);
  font-family: var(--body);
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}

#stage {
  position: relative;
  height: 100%;
  display: grid;
  place-items: center;
  padding-left: max(0px, env(safe-area-inset-left, 0px));
  padding-right: max(0px, env(safe-area-inset-right, 0px));
}

#frame { position: relative; }

#game {
  display: block;
  touch-action: none;
  border-radius: 6px;
  box-shadow: 0 0 0 1px #262935, 0 30px 80px rgba(0, 0, 0, 0.6);
}

.panel {
  position: absolute;
  width: min(420px, calc(100% - 32px));
  max-height: calc(100% - 32px);
  overflow-y: auto;
  box-sizing: border-box;
  padding: 28px 24px 24px;
  background: color-mix(in srgb, var(--panel) 94%, transparent);
  border-top: 4px solid var(--amber);
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.eyebrow {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber);
}

h1 {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(36px, 11vw, 52px);
  line-height: 0.95;
  color: var(--ink);
  text-wrap: balance;
}

.lede { margin: 0; font-size: 15px; line-height: 1.45; color: var(--ink); }

.rules {
  margin: 4px 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 7px;
  font-size: 13.5px;
  color: var(--muted);
}
.rules li { display: flex; align-items: center; gap: 10px; }
.dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--c); }

.btn {
  font: 400 17px var(--display);
  color: var(--night);
  background: var(--amber);
  border: 0;
  border-radius: 4px;
  padding: 14px 18px;
  cursor: pointer;
  transition: transform 0.08s ease, filter 0.15s ease;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible, .chip:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px #3a3d48; }

.keys { margin: 0; font-size: 12px; color: var(--muted); text-align: center; }

.val-label { margin: 6px 0 0; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; }
.val {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(30px, 9vw, 42px);
  color: var(--cash);
  font-variant-numeric: tabular-nums;
}
.best { margin: 0; font-size: 13px; font-weight: 600; color: var(--good); }

.stats { margin: 4px 0; display: grid; gap: 0; }
.stats .row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0;
  border-bottom: 1px solid #262935;
  font-size: 14px;
}
.stats dt { color: var(--muted); }
.stats dd { margin: 0; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; min-width: 0; }

.soon { margin: 0; font-size: 12.5px; color: var(--muted); font-style: italic; }

.actions { display: grid; gap: 8px; }

.chip {
  position: absolute;
  bottom: max(12px, env(safe-area-inset-bottom, 0px));
  right: max(12px, env(safe-area-inset-right, 0px));
  font: 600 12px var(--body);
  color: var(--ink);
  background: rgba(14, 15, 20, 0.85);
  border: 1px solid #3a3d48;
  border-radius: 999px;
  padding: 7px 14px;
  cursor: pointer;
  z-index: 2;
}

/* ---------- name field ---------- */
.name-field { display: grid; gap: 6px; font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: 0.04em; }
.name-field input {
  font: 600 16px var(--body);
  color: var(--ink);
  background: #0e0f14;
  border: 2px solid #3a3d48;
  border-radius: 4px;
  padding: 10px 12px;
}
.name-field input:focus-visible { outline: none; border-color: var(--amber); }

/* ---------- conversation ---------- */
#dialog {
  position: absolute;
  left: 10px;
  right: 10px;
  top: 12.5%; /* just below the HUD, so the stopped car stays visible */
  padding: 14px 14px 12px;
  background: #fbf8ee;
  color: #16181f;
  border-radius: 6px;
  box-shadow: 0 6px 0 0 var(--dlg, var(--amber)) inset, 0 20px 50px rgba(0, 0, 0, 0.55);
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 66%;
  overflow-y: auto;
  animation: rise 0.22s ease-out;
}
/* Never squeeze a child: when the dialog is taller than the screen it scrolls instead of letting text run over the table */
#dialog > * { flex-shrink: 0; }
@keyframes rise { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }

.dlg-head { display: flex; align-items: center; gap: 10px; }
.portrait {
  flex: none;
  width: 56px; height: 56px;
  border-radius: 50%;
  display: grid; place-items: center;
  font: 400 16px var(--display);
  color: #16181f;
  background: var(--dlg, var(--amber));
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.18);
}
.dlg-who { min-width: 0; }
.dlg-title { margin: 0; font-size: 10.5px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: #6b6f7c; }
.dlg-name { margin: 0; font: 400 17px var(--display); line-height: 1.15; }
.dlg-text { margin: 0; font-size: 15.5px; line-height: 1.45; min-height: 2.9em; cursor: pointer; white-space: pre-line; }
.dlg-text.bad { color: #b3261e; }
.dlg-table { flex-shrink: 0; display: grid; gap: 0; border-radius: 8px; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.08); font-size: 13.5px; animation: rise 0.35s ease-out; }
.dlg-table .tr { display: flex; justify-content: space-between; gap: 12px; padding: 5px 10px; }
.dlg-table .tr:nth-child(odd) { background: rgba(0,0,0,0.045); }
.dlg-table .tr span { color: #5b5f6b; }
.dlg-table .tr b { font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; color: #16181f; }
.dlg-table .tr b.good { color: #1f7a4d; } .dlg-table .tr b.bad { color: #b3261e; }
.dlg-table .foot { padding: 6px 10px; font-size: 12px; color: #5b5f6b; background: rgba(255,182,39,0.16); }
.dlg-meter { margin-left: auto; flex: none; display: grid; gap: 4px; justify-items: end; }
.dlg-meter span { font-size: 10px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: #6b6f7c; }
.dlg-meter i { display: block; width: 92px; height: 9px; border-radius: 5px; background: rgba(0,0,0,0.12); overflow: hidden; }
.dlg-meter b { display: block; height: 100%; width: 0; border-radius: 5px; background: linear-gradient(90deg, #e63946, #ffb627 45%, #2a9d8f); background-size: 92px 100%; transition: width 0.6s cubic-bezier(.2,.8,.2,1); }
.dlg-meter.up i { animation: meterUp 0.6s; } .dlg-meter.down i { animation: meterDown 0.6s; }
@keyframes meterUp { 30% { box-shadow: 0 0 0 3px rgba(42,157,143,0.45); } }
@keyframes meterDown { 30% { box-shadow: 0 0 0 3px rgba(230,57,70,0.45); } }
@media (max-width: 420px) { .dlg-table { font-size: 12.5px; } .dlg-table .tr { padding: 4px 9px; } .dlg-meter i { width: 70px; } .dlg-meter b { background-size: 70px 100%; } }

.dlg-choices { display: grid; gap: 6px; }
.choice {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 8px;
  align-items: start;
  text-align: left;
  font: 500 14px/1.35 var(--body);
  color: #16181f;
  background: #efe9d8;
  border: 0;
  border-radius: 4px;
  padding: 9px 10px;
  cursor: pointer;
}
.choice:hover:not(:disabled) { background: #e5dcc3; }
.choice:focus-visible { outline: 3px solid #16181f; outline-offset: 1px; }
.choice .num {
  display: grid; place-items: center;
  width: 22px; height: 22px;
  border-radius: 3px;
  font: 700 12px var(--body);
  color: #fbf8ee;
  background: #16181f;
}
.choice .note { display: block; font-size: 12px; color: #6b6f7c; margin-top: 2px; }
.choice:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---------- shared ---------- */
.h2 { margin: 0; font: 400 28px/1 var(--display); color: var(--ink); }
.btn.small { font-size: 13px; padding: 8px 14px; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; filter: none; }
.row-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.row-actions .btn { font-size: 13px; padding: 10px; }

/* ---------- founder creator ---------- */
.creator { display: grid; grid-template-columns: 150px 1fr; gap: 14px; align-items: start; }
.creator-figure { margin: 0; display: grid; gap: 6px; justify-items: center; }
.creator-portrait { width: 150px; height: 150px; display: block; }
.creator-figure figcaption { font-size: 12px; color: var(--muted); text-align: center; line-height: 1.3; }
.creator-opts { display: grid; gap: 4px; min-width: 0; }
.opt { display: grid; grid-template-columns: 62px 26px 1fr 26px; align-items: center; gap: 4px; font-size: 13px; }
.opt-label { color: var(--muted); font-size: 11.5px; font-weight: 600; }
.opt-value { text-align: center; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.arrow {
  width: 26px; height: 26px; border: 0; border-radius: 4px;
  background: #262935; color: var(--ink); font: 700 16px/1 var(--body); cursor: pointer;
}
.arrow:hover { background: #32364a; }
.arrow:focus-visible { outline: 2px solid var(--amber); }
.swatch { display: inline-block; width: 18px; height: 18px; border-radius: 50%; vertical-align: middle; box-shadow: inset 0 0 0 2px rgba(255,255,255,0.25); }
@media (max-width: 400px) {
  .creator { grid-template-columns: 1fr; }
  .opt { grid-template-columns: 70px 30px 1fr 30px; }
}

/* ---------- garage (shared bits; layout further down) ---------- */
.g-note { margin: 0 0 8px; font-size: 12.5px; color: var(--muted); }

.team-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.member { display: flex; align-items: center; gap: 10px; padding: 8px; background: #1e2029; border-radius: 4px; min-width: 0; }
.member-face { flex: none; width: 54px; height: 54px; display: block; border-radius: 50%; }
.member-face.ghost { background: #262935; box-shadow: inset 0 0 0 2px #333745; }
.member-text { display: grid; gap: 3px; min-width: 0; }
.member-text strong { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.member.empty strong { color: var(--muted); font-weight: 500; }
.role { font-size: 11.5px; font-weight: 700; color: var(--c, var(--muted)); }
.role.muted { color: #6b7080; font-weight: 500; }

.shop { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.item {
  display: grid; grid-template-columns: 110px minmax(0, 1fr) auto; gap: 10px; align-items: center;
  padding: 10px; background: #1e2029; border-radius: 4px;
}
.item.up { grid-template-columns: minmax(0, 1fr) auto; }
.item.current { box-shadow: inset 0 0 0 2px var(--amber); }
.car-preview { width: 110px; height: 56px; display: block; }
.item-text { display: grid; gap: 4px; min-width: 0; }
.item-text strong { font-size: 14.5px; }
.item-text p { margin: 0; font-size: 12.5px; color: var(--muted); line-height: 1.35; }
.specs { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 11.5px; color: var(--muted); }
.specs b { color: var(--ink); }
.meter { display: inline-flex; gap: 2px; vertical-align: middle; margin-left: 3px; }
.meter i { width: 6px; height: 8px; border-radius: 1px; background: #343846; }
.meter i.on { background: var(--amber); }
.buy { display: grid; justify-items: end; gap: 4px; text-align: right; }
.price { font-weight: 700; font-variant-numeric: tabular-nums; font-size: 14px; color: var(--cash); }
.tradein, .why { font-size: 11px; color: var(--muted); max-width: 110px; }
.owned { font-size: 12px; font-weight: 700; color: var(--amber); }
@media (max-width: 420px) {
  .item { grid-template-columns: 1fr auto; }
  .item .car-look { grid-column: 1 / -1; justify-self: start; }
  .item .car-preview { width: 140px; height: 64px; }
  .team-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- cap table ---------- */
.cap-bar { display: flex; height: 22px; border-radius: 4px; overflow: hidden; margin: 4px 0 10px; background: #262935; }
.cap-bar span { display: block; height: 100%; min-width: 2px; }
.cap-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.cap-list li { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; gap: 8px; align-items: center; font-size: 13.5px; padding: 6px 0; border-bottom: 1px solid #262935; }
.cap-list .sw { width: 12px; height: 12px; border-radius: 3px; }
.cap-list .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cap-list .pc { font-weight: 700; font-variant-numeric: tabular-nums; }
.cap-warn { margin: 10px 0 0; font-size: 12.5px; color: var(--amber); }
.levels { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 12px; }
.level { padding: 8px 10px; background: #1e2029; border-radius: 4px; font-size: 12px; color: var(--muted); }
.level strong { display: block; font-size: 16px; color: var(--ink); }

/* ---------- team tab ---------- */
.olabel { font-size: 10.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.osub { font-size: 12px; color: var(--muted); line-height: 1.35; }
.synergies { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 2px; }
.syn { display: grid; padding: 6px 9px; border-radius: 4px; background: #191b22; box-shadow: inset 0 0 0 1px #2c303c; font-size: 12px; font-weight: 700; color: #6b7080; }
.syn em { font-style: normal; font-weight: 500; font-size: 10.5px; }
.syn.on { color: var(--ink); box-shadow: inset 0 0 0 1px var(--good); background: rgba(123,211,137,0.08); }
.syn.on em { color: var(--good); }
.ghead { display: flex; justify-content: space-between; align-items: baseline; margin: 14px 0 6px; font: 400 14px var(--display); color: var(--ink); }
.ghead span { font: 600 12px var(--body); color: var(--muted); }
.mlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.stars { color: var(--amber); font-size: 12px; letter-spacing: 1px; flex: none; }
.stars span { color: #3a3d48; }
.mtags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.trait { font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 999px; background: #2a2d3a; color: #c9ccd6; }
.trait.partner { background: rgba(255,182,39,0.15); color: var(--amber); }
.morale { height: 5px; border-radius: 3px; background: #2a2d3a; overflow: hidden; }
.morale span { display: block; height: 100%; }
.fx { margin: 0; font-size: 11.5px; color: var(--muted); line-height: 1.35; }
.mactions { display: flex; flex-wrap: wrap; gap: 5px; }
.mini { font: 600 11.5px var(--body); color: var(--ink); background: #2a2d3a; border: 0; border-radius: 4px; padding: 5px 8px; cursor: pointer; }
.mini b { color: var(--cash); font-weight: 700; }
.mini:hover:not(:disabled) { background: #343846; }
.mini:disabled { opacity: 0.4; cursor: not-allowed; }
.mini.danger { color: #ff8a80; }
.mini:focus-visible, .chipbtn:focus-visible { outline: 2px solid var(--amber); }

/* ---------- score tab ---------- */
.score-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px; background: #1e2029; border-radius: 4px; }
.score-head > div:first-child { display: grid; gap: 2px; }
.score-big { font: 400 34px/1.1 var(--display); color: var(--cash); font-variant-numeric: tabular-nums; }
.rankbox { display: grid; justify-items: center; padding: 8px 14px; border-radius: 4px; background: #0e0f14; font-size: 11px; color: var(--muted); }
.rankbox strong { font: 400 26px/1.1 var(--display); color: var(--ink); }
.catbars { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.catbars li { display: grid; grid-template-columns: 112px minmax(0, 1fr) 56px; gap: 8px; align-items: center; font-size: 12.5px; }
.cname { display: grid; font-weight: 600; }
.cname em { font-style: normal; font-weight: 400; font-size: 10.5px; color: var(--muted); }
.cbar { height: 8px; background: #2a2d3a; border-radius: 4px; overflow: hidden; }
.cbar i { display: block; height: 100%; background: var(--amber); }
.cval { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.tablewrap { overflow-x: auto; margin-top: 10px; }
.rounds { width: 100%; border-collapse: collapse; font-size: 12px; font-variant-numeric: tabular-nums; }
.rounds th { text-align: right; font-weight: 600; color: var(--muted); padding: 5px 6px; border-bottom: 1px solid #2a2d3a; }
.rounds td { text-align: right; padding: 5px 6px; border-bottom: 1px solid #22252e; }
.rounds th:first-child, .rounds td:first-child { text-align: left; }
.rounds tr.best td { color: var(--amber); }
.boards { display: flex; flex-wrap: wrap; gap: 5px; }
.chipbtn { font: 600 11.5px var(--body); color: var(--muted); background: #1e2029; border: 1px solid #2c303c; border-radius: 999px; padding: 5px 10px; cursor: pointer; }
.chipbtn[aria-pressed="true"] { color: var(--night); background: var(--amber); border-color: var(--amber); }
.lb { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; }
.lb li { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 10px; background: #1e2029; border-radius: 4px; }
.lb li.me { box-shadow: inset 0 0 0 1px var(--amber); }
.lbrank { font: 400 15px var(--display); color: var(--muted); }
.lb li:first-child .lbrank { color: var(--amber); }
.lbname { display: grid; min-width: 0; }
.lbname strong { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lbname em { font-style: normal; font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lbval { font-weight: 700; font-size: 13px; font-variant-numeric: tabular-nums; color: var(--cash); }

/* ---------- burn, invest, exit ---------- */
.salary { margin: 0; font-size: 11.5px; color: var(--muted); }
.item.invest { box-shadow: inset 3px 0 0 var(--good); }
.exitbox { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; align-items: center; margin-top: 12px; padding: 12px; background: #1e2029; border-radius: 4px; box-shadow: inset 3px 0 0 var(--cash); }
.exitbox > div { display: grid; gap: 4px; }
.exitbox strong { font-size: 15px; }
.exitbox p { margin: 0; font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.exitbox .exits { color: var(--cash); }
.exitbox .why { grid-column: 1 / -1; text-align: right; }
#over-screen .lb { margin: 4px 0; }

/* ---------- music ---------- */
.music-chip { right: auto; left: max(12px, env(safe-area-inset-left, 0px)); font-size: 15px; padding: 5px 12px; }
.music-chip.off { color: var(--muted); }
.music-panel {
  position: absolute; z-index: 3;
  left: max(12px, env(safe-area-inset-left, 0px));
  bottom: calc(max(12px, env(safe-area-inset-bottom, 0px)) + 42px);
  width: min(300px, calc(100% - 24px));
  display: grid; gap: 10px; padding: 14px;
  background: var(--panel); border-radius: 6px; border-top: 3px solid var(--amber);
  box-shadow: 0 20px 50px rgba(0,0,0,0.55);
}
.music-panel .np { display: grid; gap: 2px; min-width: 0; }
.music-panel .np strong { font: 400 16px var(--display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mctrl { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
.mini.primary { background: var(--amber); color: var(--night); }
.mvol { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: center; font-size: 12px; color: var(--muted); }
.mvol input { width: 100%; accent-color: var(--amber); }
.mlist-tracks { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; max-height: 160px; overflow-y: auto; }
.mlist-tracks li { display: grid; grid-template-columns: 18px minmax(0, 1fr); column-gap: 8px; padding: 6px 8px; border-radius: 4px; cursor: pointer; font-size: 12.5px; }
.mlist-tracks li:hover { background: #262935; }
.mlist-tracks li.on { background: rgba(255,182,39,0.12); }
.mlist-tracks li.on b { color: var(--amber); }
.mlist-tracks span { color: var(--muted); grid-row: span 2; }
.mlist-tracks b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mlist-tracks em { font-style: normal; color: var(--muted); font-size: 11px; }
.mhint { margin: 0; font-size: 11px; color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  #dialog { animation: none; }
  .btn { transition: none; }
}

/* ---------- garage layout: fixed header and footer, scrolling body ---------- */
.panel.garage {
  width: min(560px, calc(100% - 12px));
  height: calc(100% - 12px);
  max-height: calc(100% - 12px);
  box-shadow: 0 0 0 100vmax rgba(5,6,10,0.82), 0 30px 80px rgba(0,0,0,0.7);
  padding: 0;
  gap: 0;
  overflow: hidden;
  background: var(--panel);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}
.g-top { padding: 16px 18px 0; display: grid; gap: 10px; background: var(--panel); border-bottom: 1px solid #262935; }
.g-title { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.g-name { margin: 0; font-size: 12.5px; font-weight: 600; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.g-money { display: grid; grid-template-columns: 1.25fr 1fr; gap: 8px; }
.g-mbox { display: grid; gap: 1px; padding: 9px 12px; background: #1e2029; border-radius: 6px; min-width: 0; }
.g-mbox.cash { background: #0e0f14; box-shadow: inset 0 0 0 1px #2c303c; }
.g-val, .g-cash { font: 400 22px/1.15 var(--display); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-val { color: var(--ink); }
.g-cash { color: var(--cash); }
.g-mbox .best { font-size: 11.5px; }

.tabs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin: 2px -6px 0; }
.tab {
  position: relative; min-width: 0; white-space: nowrap;
  font: 700 clamp(12.5px, 3.7vw, 16px) var(--body); letter-spacing: 0.01em; color: var(--muted); background: transparent;
  border: 0; border-bottom: 3px solid transparent; padding: 13px 2px 12px; cursor: pointer;
}
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--amber); }
.tab:focus-visible { outline: 2px solid var(--amber); outline-offset: -2px; }
.badge {
  position: absolute; top: 3px; margin-left: 3px;
  min-width: 15px; height: 15px; padding: 0 4px; box-sizing: border-box;
  border-radius: 999px; background: var(--bad); color: #fff;
  font: 700 10px/15px var(--body); text-align: center;
}

.g-body { flex: 1; min-height: 0; overflow-y: auto; padding: 14px 18px 18px; overscroll-behavior: contain; }
.tab-body { display: grid; gap: 10px; align-content: start; }
.tab-body > .ghead:first-child { margin-top: 0; }

.g-foot {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px;
  padding: 12px 18px max(12px, env(safe-area-inset-bottom, 0px));
  background: #13151b; border-top: 1px solid #262935;
}
.g-runway { display: grid; gap: 0; min-width: 0; }
.g-runway strong { font: 400 17px/1.2 var(--display); font-variant-numeric: tabular-nums; }
.g-runway .osub { color: var(--good); font-size: 11.5px; font-weight: 600; }
.g-runway.bad strong, .g-runway.bad .osub { color: var(--bad); }
.g-go { display: flex; gap: 8px; align-items: center; }
.g-go .btn { padding: 12px 16px; font-size: 15px; white-space: nowrap; }
.g-go .btn.ghost.small { font: 600 11.5px var(--body); padding: 8px 10px; color: var(--muted); }
.g-go .btn.ghost.small[data-armed] { color: var(--bad); box-shadow: inset 0 0 0 2px var(--bad); }
.g-toast {
  position: absolute; left: 12px; right: 12px; bottom: calc(100% + 8px); margin: 0;
  padding: 10px 12px; border-radius: 6px; font-size: 13px; font-weight: 600;
  background: #233026; color: var(--good); box-shadow: 0 10px 30px rgba(0,0,0,0.5), inset 3px 0 0 var(--good);
  opacity: 0; transform: translateY(6px); pointer-events: none; transition: opacity .2s, transform .2s;
}
.g-toast[data-tone="bad"] { background: #34201f; color: #ff8a80; box-shadow: 0 10px 30px rgba(0,0,0,0.5), inset 3px 0 0 var(--bad); }
.g-toast[data-tone="info"] { background: #2a2618; color: var(--cash); box-shadow: 0 10px 30px rgba(0,0,0,0.5), inset 3px 0 0 var(--amber); }
.g-toast.show { opacity: 1; transform: none; }

/* overview */
.magnus-card { display: grid; gap: 10px; padding: 12px; background: #1e2029; border-radius: 6px; box-shadow: inset 0 3px 0 #e76f51; }
.magnus-head { display: flex; align-items: center; gap: 10px; }
.magnus-head > div { display: grid; }
.magnus-head strong { font: 400 15px var(--display); }
.magnus-face { width: 48px; height: 48px; flex: none; display: block; }
.tips { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.tip { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; align-items: center; padding: 9px 10px; border-radius: 4px; background: #262935; box-shadow: inset 3px 0 0 var(--muted); }
.tip p { margin: 0; font-size: 13px; line-height: 1.4; }
.tip.bad { box-shadow: inset 3px 0 0 var(--bad); background: #2e2124; }
.tip.warn { box-shadow: inset 3px 0 0 var(--amber); }
.tip.good { box-shadow: inset 3px 0 0 var(--good); }
.tip .mini { white-space: nowrap; }
@media (max-width: 420px) { .tip { grid-template-columns: 1fr; } .tip .mini { justify-self: start; } }
.kpis { margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.kpi { display: grid; gap: 1px; padding: 8px 10px; background: #1e2029; border-radius: 4px; min-width: 0; }
.kpi dt { font-size: 10.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.kpi dd { margin: 0; font-size: 14.5px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi em { font-style: normal; font-size: 11px; font-weight: 600; }
.kpi em.up { color: var(--good); }
.kpi em.down { color: var(--bad); }
.kpi.bad dd { color: var(--bad); }

/* burn (a collapsible card) */
.burn { display: grid; gap: 6px; padding: 10px 12px; background: #1e2029; border-radius: 4px; box-shadow: inset 3px 0 0 var(--amber); }
.burn.danger { box-shadow: inset 3px 0 0 var(--bad); }
.burn summary { display: flex; justify-content: space-between; align-items: baseline; cursor: pointer; list-style: none; }
.burn summary::-webkit-details-marker { display: none; }
.burn summary::after { content: '▾'; color: var(--muted); margin-left: 8px; }
.burn[open] summary::after { content: '▴'; }
.burn summary .olabel { margin-right: auto; }
.burn strong { font: 400 17px var(--display); color: var(--ink); font-variant-numeric: tabular-nums; }
.burn.danger strong { color: var(--bad); }
.burn ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; font-size: 12.5px; }
.burn li { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); }
.burn li b { color: var(--ink); font-variant-numeric: tabular-nums; }
.burn li.bill span, .burn li.bill b { color: var(--bad); }
.burn p { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.4; }

/* team */
.ghead .seats { display: inline-flex; align-items: center; gap: 3px; font: 600 12px var(--body); color: var(--muted); }
.seats i { width: 9px; height: 9px; border-radius: 2px; background: #2a2d3a; box-shadow: inset 0 0 0 1px #3a3d48; }
.seats i.on { background: var(--amber); box-shadow: none; }
.seats b { margin-left: 4px; font-weight: 600; }
.mrow { background: #1e2029; border-radius: 6px; overflow: hidden; }
.mrow.founder { box-shadow: inset 0 0 0 1px rgba(255,182,39,0.35); }
.mrow.open { box-shadow: inset 0 0 0 1px var(--amber); }
.mhead {
  width: 100%; display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 10px; align-items: center;
  padding: 8px 10px; background: none; border: 0; color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.mhead:hover { background: #232633; }
.mhead:focus-visible { outline: 2px solid var(--amber); outline-offset: -2px; }
.mhead .member-face { width: 44px; height: 44px; }
.mmain { display: grid; gap: 4px; min-width: 0; }
.mname { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mname .warn { display: inline-grid; place-items: center; width: 15px; height: 15px; margin-left: 6px; border-radius: 50%; background: var(--bad); color: #fff; font: 700 10px var(--body); font-style: normal; vertical-align: 1px; }
.mside { display: grid; justify-items: end; gap: 3px; }
.msal { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.chev { font-size: 11px; color: var(--muted); }
.mdetail { display: grid; gap: 6px; padding: 2px 10px 10px 64px; }
.mdetail .fx b { color: var(--ink); font-weight: 600; }
@media (max-width: 420px) { .mdetail { padding-left: 10px; } }
.office-card { display: grid; gap: 8px; }
.car-top { width: 100%; height: 150px; display: block; border-radius: 8px; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08); background: #23252d; }
#office-canvas { cursor: pointer; }
.office-canvas { width: 100%; aspect-ratio: 480 / 220; display: block; border-radius: 8px; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08); background: #1b1d26; }
.office-canvas.small { width: 120px; flex: none; }
.office-ladder { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
.ostep { display: grid; justify-items: center; gap: 3px; font-size: 10px; font-weight: 700; color: var(--muted); text-align: center; }
.ostep i { display: block; width: 100%; height: 5px; border-radius: 3px; background: rgba(255,255,255,0.1); }
.ostep.done i { background: #2a9d8f; } .ostep.now i { background: var(--amber); } .ostep.now { color: var(--amber); }
.office-next { display: flex; gap: 10px; align-items: center; padding: 10px; border-radius: 8px; background: linear-gradient(120deg, rgba(255,182,39,0.12), rgba(255,182,39,0.03)); box-shadow: inset 0 0 0 1px rgba(255,182,39,0.3); }
.office-next > div { display: grid; gap: 4px; min-width: 0; }
.office-next .btn { justify-self: start; }
@media (max-width: 420px) { .office-canvas.small { width: 92px; } .ostep { font-size: 9px; } }
.office { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 12px; background: #1e2029; border-radius: 6px; }
.office > div { display: grid; gap: 2px; min-width: 0; }
.office strong { font-size: 14px; }
.office .btn { flex: none; line-height: 1.3; text-align: center; }
.syn-box { padding: 10px 12px; background: #191b22; border-radius: 6px; box-shadow: inset 0 0 0 1px #2c303c; }
.syn-box summary { display: flex; justify-content: space-between; cursor: pointer; font: 400 13px var(--display); list-style: none; }
.syn-box summary::-webkit-details-marker { display: none; }
.syn-box summary span { font: 600 12px var(--body); color: var(--muted); }
.syn-box .synergies { margin: 10px 0 0; }

/* shop */
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; background: #0e0f14; border-radius: 6px; }
.seg button { font: 600 13px var(--body); color: var(--muted); background: none; border: 0; border-radius: 4px; padding: 8px 4px; cursor: pointer; }
.seg button[aria-selected="true"] { background: #262935; color: var(--ink); box-shadow: inset 0 -2px 0 var(--amber); }
.seg button:focus-visible { outline: 2px solid var(--amber); }
.item.cant .item-text strong, .item.cant .price { opacity: 0.55; }
.item.is-owned { background: #191b22; }
.item.is-owned .item-text p { opacity: 0.7; }
.pips { display: inline-flex; gap: 3px; margin-left: 8px; vertical-align: 1px; }
.pips i { width: 10px; height: 10px; border-radius: 2px; background: #2a2d3a; }
.pips i.on { background: var(--good); }
.pips i.next { box-shadow: inset 0 0 0 1px var(--good); }
.tab-body .ghead { margin: 6px 0 -2px; }
.tab-body .shop { gap: 6px; }
.tab-body .g-note { margin: 0; }
.tab-body .levels { margin-top: 0; }
.tab-body .exitbox { margin-top: 2px; }
.tab-body .tablewrap { margin-top: 0; }
.tab-body .lb { margin-top: 0; }
/* the music button sits bottom-left of the stage; give it room when the garage fills a narrow screen */
@media (max-width: 560px) {
  #stage:has(#garage-screen:not([hidden])) .g-foot { padding-left: 58px; }
}
@media (prefers-reduced-motion: reduce) { .g-toast { transition: none; } }
@media (max-width: 460px) {
  .g-foot { grid-template-columns: 1fr; gap: 8px; padding-top: 10px; }
  .g-runway { grid-template-columns: auto auto 1fr; align-items: baseline; gap: 8px; }
  .g-runway .osub { text-align: right; }
  .g-go .btn:not(.ghost) { flex: 1; }
  .exitbox { grid-template-columns: 1fr; }
  .exitbox .btn { justify-self: start; }
  .exitbox .why { text-align: left; }
  .g-val, .g-cash { font-size: 19px; }
}
.exitbox .why { max-width: none; }

/* ---------- Demo Day (dice) ---------- */
.dd-card {
  display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 10px; align-items: center;
  width: 100%; padding: 12px; border: 0; border-radius: 6px; cursor: pointer; text-align: left; color: var(--ink); font: inherit;
  background: linear-gradient(120deg, #2a1f3d, #1e2029 70%); box-shadow: inset 0 0 0 1px #4a3a6a;
}
.dd-card:hover { box-shadow: inset 0 0 0 1px #9b5de5; }
.dd-card:focus-visible { outline: 2px solid var(--amber); }
.dd-cardface { width: 48px; height: 48px; display: block; }
.dd-cardtext { display: grid; gap: 1px; min-width: 0; }
.dd-cardtext strong { font: 400 15px var(--display); }
.dd-cta { font: 400 13px var(--display); color: var(--night); background: #c9a7ff; border-radius: 4px; padding: 8px 12px; }

.dd-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.dd-host { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 10px; align-items: center; padding: 10px 12px; background: #1e2029; border-radius: 6px; box-shadow: inset 0 3px 0 #9b5de5; }
.dd-face { width: 52px; height: 52px; display: block; }
.dd-line { margin: 2px 0 0; font-size: 13.5px; line-height: 1.4; }

.dd-table {
  display: grid; gap: 10px; justify-items: center; padding: 16px 12px 14px; border-radius: 8px;
  background: radial-gradient(ellipse at 50% 30%, #1f5a3f, #123527 75%); box-shadow: inset 0 0 0 3px #3b2a1a, inset 0 0 30px rgba(0,0,0,0.5);
}
.dd-table.res-win, .dd-table.res-hype, .dd-table.res-unicorn { box-shadow: inset 0 0 0 3px var(--good), 0 0 30px rgba(123,211,137,0.25); }
.dd-table.res-lose, .dd-table.res-fyre { box-shadow: inset 0 0 0 3px var(--bad); }
.dd-dice { display: grid; grid-template-columns: repeat(3, auto); gap: 14px; }
.die-slot { display: grid; justify-items: center; gap: 4px; background: none; border: 0; padding: 0; color: var(--ink); font: inherit; cursor: default; }
.die-slot:not(:disabled) { cursor: pointer; }
.die-slot:focus-visible { outline: 2px solid var(--amber); outline-offset: 4px; border-radius: 10px; }
.die {
  width: 62px; height: 62px; box-sizing: border-box; padding: 9px;
  display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); place-items: center;
  background: #fbf8ee; border-radius: 12px; box-shadow: inset 0 -5px 0 #d8d0b8, 0 6px 14px rgba(0,0,0,0.45);
  transition: transform .15s;
}
.die i { width: 11px; height: 11px; border-radius: 50%; }
.die i.p { background: #16181f; }
.die.idle { opacity: 0.35; }
.die.rolling { animation: tumble .13s linear infinite; }
.die.reroll { box-shadow: inset 0 -5px 0 #d8d0b8, 0 0 0 3px var(--amber), 0 6px 14px rgba(0,0,0,0.45); transform: translateY(-4px) rotate(-4deg); }
@keyframes tumble { 0% { transform: rotate(0) translateY(0); } 50% { transform: rotate(12deg) translateY(-6px); } 100% { transform: rotate(-8deg) translateY(0); } }
.die-name { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #cfe8d9; }
.die-bonus { font-size: 12px; font-weight: 700; color: var(--cash); }
.dd-sum { display: flex; align-items: baseline; gap: 8px; color: #cfe8d9; font-size: 12.5px; font-weight: 600; }
.dd-sum strong { font: 400 28px var(--display); color: #fff; font-variant-numeric: tabular-nums; }

.dd-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.dd-result { display: grid; justify-items: center; gap: 2px; padding: 10px; border-radius: 6px; background: #1e2029; }
.dd-result strong { font: 400 26px var(--display); font-variant-numeric: tabular-nums; }
.dd-result span { font-size: 12px; color: var(--muted); }
.dd-result.good strong { color: var(--good); }
.dd-result.bad strong { color: var(--bad); }

.dd-tiers { display: grid; gap: 6px; }
.dd-tier { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto 46px; gap: 10px; align-items: center; padding: 9px 12px; border: 0; border-radius: 6px; background: #1e2029; color: var(--ink); font: inherit; text-align: left; cursor: pointer; box-shadow: inset 0 0 0 1px #2c303c; transition: transform .12s, box-shadow .12s; }
.dd-tier:hover { transform: translateY(-1px); }
.dd-tier[aria-pressed="true"] { box-shadow: inset 0 0 0 2px #c9a7ff; background: #241f33; transform: translateX(4px); }
.dd-tier:focus-visible { outline: 2px solid var(--amber); }
.dd-ticon { font-size: 26px; line-height: 1; text-align: center; }
.dd-tname { display: grid; gap: 1px; font-size: 13px; font-weight: 700; line-height: 1.25; }
.dd-tname small { font-size: 10.5px; font-weight: 600; color: var(--muted); letter-spacing: 0.04em; text-transform: uppercase; }
.dd-tmult { font: 400 20px var(--display); color: var(--cash); }
.dd-tmeta { font-size: 11px; color: var(--muted); text-align: right; }
.dd-tmeta b { color: var(--ink); font-size: 13px; }
.dd-howto b { color: #c9a7ff; }
.dd-howto.sub { margin-top: -6px; font-size: 12px; color: var(--muted); }
.dd-msg { display: grid; gap: 4px; padding: 12px 14px; border-radius: 6px; background: #1e2029; box-shadow: inset 4px 0 0 var(--bad); animation: ddmsg .35s ease-out; }
.dd-msg.good { box-shadow: inset 4px 0 0 var(--good); }
.dd-msg p { margin: 0; font-size: 15px; line-height: 1.4; font-weight: 600; }
.dd-mtag { font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
@keyframes ddmsg { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.dd-shuffle { margin-left: auto; font-size: 11.5px; padding: 4px 8px; }
.dd-bet { display: grid; gap: 8px; padding: 10px 12px; background: #1e2029; border-radius: 6px; }
.dd-bet input { width: 100%; accent-color: #c9a7ff; }
.dd-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.dd-betline { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; color: var(--muted); }
.dd-betline b { color: var(--ink); font-variant-numeric: tabular-nums; }
.dd-betline b.good { color: var(--good); }
.dd-bonus { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.dd-bonus li { display: grid; gap: 1px; padding: 8px 10px; background: #1e2029; border-radius: 4px; font-size: 11.5px; color: var(--muted); }
.dd-bonus b { font-size: 13px; color: var(--ink); }
.dd-warn { margin: 0; font-size: 12px; color: var(--bad); }
.dd > .btn { width: 100%; }
@media (max-width: 420px) {
  .die { width: 54px; height: 54px; padding: 8px; }
  .die i { width: 9px; height: 9px; }
  .dd-dice { gap: 10px; }
}
@media (prefers-reduced-motion: reduce) { .die.rolling { animation: none; } .die { transition: none; } }
.g-runway .osub { white-space: nowrap; }

/* ---------- news cut-scenes ---------- */
.dlg-scene { display: block; width: calc(100% + 28px); margin: -14px -14px 0; aspect-ratio: 480 / 210; border-radius: 6px 6px 0 0; background: #0e0f14; }
#dialog.has-scene { padding-top: 14px; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55); }
#dialog.has-scene .portrait { width: 40px; height: 40px; }
#dialog.has-scene { top: 8%; max-height: 78%; }

/* ---------- title screen ---------- */
.panel.title-panel {
  width: min(440px, calc(100% - 24px));
  padding: 0; gap: 0; overflow-x: hidden;
  background: var(--panel);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}
.hero { position: relative; }
.hero-canvas { display: block; width: 100%; aspect-ratio: 480 / 230; }
.hero::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 70px; background: linear-gradient(transparent, var(--panel)); pointer-events: none; }
.logo { position: absolute; left: 20px; bottom: -6px; z-index: 1; margin: 0; display: flex; align-items: flex-end; gap: 8px; flex-wrap: wrap; line-height: 1; }
.logo-top {
  font: 400 clamp(34px, 10vw, 46px)/0.95 var(--display); color: var(--amber);
  text-shadow: 3px 3px 0 #b5121b, 6px 6px 0 rgba(0, 0, 0, 0.45);
  letter-spacing: 0.01em;
}
.logo-badge {
  font: 400 clamp(15px, 4.5vw, 19px)/1 var(--display); color: var(--night);
  background: #fbf8ee; padding: 6px 10px 5px; border-radius: 4px; transform: rotate(-5deg) translateY(-6px);
  box-shadow: 3px 3px 0 #ff9f1c;
}
.title-body { display: grid; gap: 12px; padding: 22px 22px 18px; }
.title-body .lede { font-size: 14.5px; color: #d9d6cc; }
.btn-hero { font-size: 19px; padding: 15px 18px; box-shadow: 0 4px 0 #b5770f; }
.btn-hero:active { transform: translateY(2px); box-shadow: 0 2px 0 #b5770f; }
.howto { list-style: none; margin: 2px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; font-size: 12.5px; color: var(--muted); }
.howto li { display: flex; align-items: center; gap: 8px; min-width: 0; }
.howto i {
  flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 6px;
  font: 700 11px var(--body); font-style: normal; color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 40%, transparent);
}
.title-record { margin: 0; min-height: 1em; font-size: 12.5px; font-weight: 600; color: var(--cash); text-align: center; }
.title-record:empty { display: none; }
@media (max-width: 380px) { .howto { grid-template-columns: 1fr; } }

/* ---------- owners and negotiation (Selskap tab) ---------- */
.owners { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.orow { background: #1e2029; border-radius: 6px; overflow: hidden; }
.orow.open { box-shadow: inset 0 0 0 1px var(--amber); }
.ohead {
  width: 100%; box-sizing: border-box; display: grid; grid-template-columns: 12px minmax(0, 1fr) auto auto; gap: 8px; align-items: center;
  padding: 9px 10px; border: 0; background: none; color: inherit; font: inherit; font-size: 13.5px; text-align: left; cursor: pointer;
}
.ohead.static { grid-template-columns: 12px minmax(0, 1fr) auto; cursor: default; }
button.ohead:hover { background: #232633; }
.ohead:focus-visible { outline: 2px solid var(--amber); outline-offset: -2px; }
.ohead .sw { width: 12px; height: 12px; border-radius: 3px; }
.ohead .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ohead .pc { font-weight: 700; font-variant-numeric: tabular-nums; }
.otag { font-style: normal; font-size: 10.5px; font-weight: 600; margin-left: 6px; padding: 1px 6px; border-radius: 999px; background: #2a2d3a; color: #c9ccd6; }
.odetail { display: grid; gap: 8px; padding: 0 10px 10px; }
.oface-row { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 10px; align-items: center; }
.oface { width: 44px; height: 44px; display: block; }
.oreply { position: relative; margin: 0; padding: 8px 10px; border-radius: 8px; background: #fbf8ee; color: #16181f; font-size: 12.5px; line-height: 1.35; }
.oreply::before { content: ''; position: absolute; left: -6px; top: 50%; margin-top: -6px; border: 6px solid transparent; border-left: 0; border-right-color: #fbf8ee; }
.prefbox { display: grid; gap: 8px; padding: 12px; background: #1e2029; border-radius: 6px; box-shadow: inset 3px 0 0 var(--bad); }
.prefhead > div:first-child { display: grid; gap: 2px; }
.prefbox strong { font: 400 17px var(--display); }
.prefbox p { margin: 0; font-size: 12px; color: var(--muted); }
.mini.primary b { color: #7a4b00; }

/* ---------- negotiation ---------- */
.deal .dchips { display: flex; flex-wrap: wrap; gap: 5px; }
.patience { display: flex; justify-content: space-between; align-items: center; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.pdots { display: inline-flex; gap: 4px; }
.pdots i { width: 14px; height: 6px; border-radius: 3px; background: #2a2d3a; }
.pdots i.on { background: var(--amber); }
.bidslider { width: 100%; accent-color: var(--amber); }
.bidline { margin: 0; font-size: 12.5px; color: var(--muted); }
.bidline b { color: var(--ink); font-variant-numeric: tabular-nums; }
.oreply.thinking { color: #6b6f7c; font-style: italic; }
.oreply.ans-accept { box-shadow: inset 3px 0 0 var(--good); }
.oreply.ans-counter { box-shadow: inset 3px 0 0 var(--amber); }
.oreply.ans-reject, .oreply.ans-walk { box-shadow: inset 3px 0 0 var(--bad); }
.dots { display: inline-flex; gap: 3px; margin-left: 6px; vertical-align: middle; }
.dots i { width: 5px; height: 5px; border-radius: 50%; background: #6b6f7c; animation: blink 1s infinite; }
.dots i:nth-child(2) { animation-delay: 0.2s; }
.dots i:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink { 0%, 100% { opacity: 0.2; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .dots i { animation: none; opacity: 0.7; } }
.prefhead { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.prefhead > div { display: grid; gap: 2px; }
.prefbox .odetail { padding: 0; }
.prefhead { display: flex; } .prefhead .mini { flex: none; }

/* ---------- merch ---------- */
.seg { grid-template-columns: repeat(4, 1fr); }
.merch-hero { display: grid; gap: 10px; padding: 0 0 10px; background: #1e2029; border-radius: 8px; overflow: hidden; }
.merch-show { width: 100%; height: clamp(290px, 82vw, 380px); display: block; }
.merch-brand { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 0 12px; min-width: 0; }
.brand-dot { width: 26px; height: 26px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 2px #2c303c, 0 0 12px var(--c); }
.brand-text { display: grid; line-height: 1.25; min-width: 0; }
.brand-text b { font-size: 13.5px; }
.brand-swatches { padding: 2px 12px 0; }
.swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.swatchbtn { width: 24px; height: 24px; border-radius: 50%; border: 0; background: var(--c); cursor: pointer; box-shadow: inset 0 0 0 2px rgba(255,255,255,0.18); }
.swatchbtn[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--panel), 0 0 0 4px var(--amber); }
.swatchbtn:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.mfx { color: var(--good) !important; font-weight: 600; }

/* ---------- investor history in the cap table ---------- */
.ohead .pc { display: inline-flex; align-items: center; gap: 8px; }
.mult { font-style: normal; font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 999px; }
.mult.up { color: var(--good); background: rgba(123,211,137,0.12); }
.mult.down { color: var(--bad); background: rgba(255,90,78,0.12); }
.mult.free { color: #c9ccd6; background: #2a2d3a; }
.hist { display: grid; gap: 3px; padding: 9px 10px; background: #16181f; border-radius: 6px; }
.hist .olabel { margin-bottom: 2px; }
.hist-row { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; color: var(--muted); }
.hist-row b { color: var(--ink); font-variant-numeric: tabular-nums; }
.hist-row.big b { font-size: 13.5px; }
.hist-row.up b { color: var(--good); }
.hist-row.down b { color: var(--bad); }
.hist-hint { margin: 4px 0 0; font-size: 11.5px; color: var(--muted); font-style: italic; }

/* ---------- swag: the button in the garage ---------- */
.swag-btn {
  display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 10px; align-items: center;
  width: 100%; padding: 8px 12px; border: 0; border-radius: 8px; cursor: pointer; text-align: left; color: #16181f; font: inherit;
  background: linear-gradient(110deg, #f2c94c, #ffb627 45%, #e8b923); box-shadow: 0 3px 0 #a87b0f, inset 0 1px 0 rgba(255,255,255,0.5);
  position: relative; overflow: hidden;
}
.swag-btn::after { content: ''; position: absolute; top: 0; bottom: 0; width: 40px; left: -60px; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.55), transparent); transform: skewX(-20deg); animation: shine 3.6s ease-in-out infinite; }
@keyframes shine { 0%, 70% { left: -60px; } 100% { left: 110%; } }
.swag-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 #a87b0f; }
.swag-btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.swag-btn-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #16181f; color: #f2c94c; font-size: 18px; }
.swag-btn-text { display: grid; min-width: 0; }
.swag-btn-text strong { font: 400 14px var(--display); }
.swag-btn-text span { font-size: 11.5px; font-weight: 600; opacity: 0.8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.swag-btn-go { font: 400 18px var(--display); }
@media (prefers-reduced-motion: reduce) { .swag-btn::after { animation: none; display: none; } }

/* ---------- swag screen ---------- */
.panel.swag-panel {
  width: min(460px, calc(100% - 20px)); max-height: calc(100% - 20px);
  padding: 14px 16px 18px; gap: 10px; z-index: 4;
  background: linear-gradient(180deg, #1b1712, var(--panel) 40%);
  border-top-color: #f2c94c; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7);
}
.swag-top { display: flex; align-items: center; gap: 12px; }
.swag-title { font-size: 22px; color: #f2c94c; }
.swag-hero { position: relative; border-radius: 8px; overflow: hidden; box-shadow: 0 0 0 2px #3a2f1a, 0 10px 30px rgba(0,0,0,0.5); }
.swag-canvas { display: block; width: 100%; aspect-ratio: 480 / 300; }
.swag-place { position: absolute; left: 10px; bottom: 10px; padding: 4px 10px; border-radius: 999px; background: rgba(16,18,24,0.8); color: #f2c94c; font: 400 11px var(--display); }
.swag-wallets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.swag-wallets .g-val, .swag-wallets .g-cash { font-size: 16px; }
.swag-money { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.smove { display: grid; gap: 6px; padding: 10px; background: #1e2029; border-radius: 6px; align-content: start; }
.smove .mactions { flex-direction: column; align-items: stretch; }
.swag-perks { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.swag-perks li { display: grid; gap: 1px; padding: 7px 10px; border-radius: 6px; background: rgba(242,201,76,0.08); box-shadow: inset 3px 0 0 #f2c94c; font-size: 12px; color: var(--muted); }
.swag-perks li b { color: var(--ink); font-size: 12.5px; }
.swag-perks li.empty { box-shadow: none; background: #1e2029; }
#swag-tabs button b { display: inline-grid; place-items: center; min-width: 16px; height: 16px; margin-left: 3px; border-radius: 999px; background: #f2c94c; color: #16181f; font-size: 10px; }
.swag-item { grid-template-columns: 34px minmax(0, 1fr) auto; }
.sicon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; background: #2a2416; color: #f2c94c; font-size: 16px; }
.swag-item.is-mine { box-shadow: inset 0 0 0 1px #f2c94c; background: #221e16; }
.swag-item .buy .mini { white-space: nowrap; }
.swag-toast { position: sticky; bottom: 0; left: auto; right: auto; }
@media (max-width: 420px) { .swag-money { grid-template-columns: 1fr; } .swag-wallets .g-val, .swag-wallets .g-cash { font-size: 14px; } }
.panel.swag-panel > * { flex-shrink: 0; }
.item.up.swag-item { grid-template-columns: 34px minmax(0, 1fr) auto; }
.swag-perks { grid-template-columns: 1fr 1fr; }
.swag-perks li.empty { grid-column: 1 / -1; }
.swag-perks li { padding: 6px 8px; font-size: 11px; line-height: 1.3; }
.swag-perks li b { font-size: 12px; }
@media (max-width: 420px) { .swag-perks { grid-template-columns: 1fr; } }
@media (max-width: 420px) { .swag-wallets .g-val, .swag-wallets .g-cash { font-size: 12.5px; white-space: normal; } .swag-wallets .g-mbox { padding: 8px; } }

/* ---------- swag v2: one gold-on-dark look ---------- */
.panel.swag-panel { background: radial-gradient(120% 60% at 50% 0%, #2a2110 0%, #17140d 45%, #121317 100%); }
.swag-top { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.swag-titles { min-width: 0; }
.swag-title { font-size: 20px; line-height: 1.05; background: linear-gradient(90deg, #f7e08a, #e8b923 50%, #fff3c2); -webkit-background-clip: text; background-clip: text; color: transparent; }
.swag-net { display: grid; justify-items: end; }
.swag-net strong { font: 400 15px var(--display); color: #f7e08a; white-space: nowrap; }
.swag-hero { box-shadow: 0 0 0 1px #6b5420, 0 0 0 4px #1b160c, 0 0 0 5px #8a6d2a, 0 18px 40px rgba(0,0,0,0.6); }
.swag-canvas.pop { animation: pop 0.6s ease-out; }
@keyframes pop { 0% { filter: brightness(1.6) saturate(1.4); } 100% { filter: none; } }
.swag-place { font-size: 11px; box-shadow: inset 0 0 0 1px #8a6d2a; }
.swag-wallets .g-mbox { background: rgba(255,255,255,0.04); box-shadow: inset 0 0 0 1px rgba(242,201,76,0.18); }
.swag-wallets .g-mbox.cash { background: rgba(242,201,76,0.1); box-shadow: inset 0 0 0 1px rgba(242,201,76,0.55); }
.swag-goal { display: grid; gap: 5px; padding: 10px 12px; border-radius: 8px; background: rgba(255,255,255,0.04); }
.goal-row { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; color: var(--muted); }
.goal-row b { color: var(--ink); }
.goal-bar { height: 6px; border-radius: 3px; background: #2a2416; overflow: hidden; }
.goal-bar i { display: block; height: 100%; background: linear-gradient(90deg, #e8b923, #f7e08a); }
.smove { background: rgba(255,255,255,0.04); }
.swag-seg { background: rgba(0,0,0,0.35); }
.swag-seg button[aria-selected="true"] { background: #2a2416; box-shadow: inset 0 -2px 0 #f2c94c; }
.swag-shop { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.sitem { display: grid; grid-template-columns: 84px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px; border-radius: 10px; background: rgba(255,255,255,0.04); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06); }
.sthumb { width: 84px; height: 60px; display: block; border-radius: 6px; }
.sitem .item-text strong { font-size: 14px; }
.stier { justify-self: start; font-size: 9.5px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; padding: 2px 7px; border-radius: 999px; background: #2a2d3a; color: #c9ccd6; }
.tier-2 .stier { background: #1f3a2c; color: #7bd389; }
.tier-3 .stier { background: #3a2f12; color: #f2c94c; }
.tier-4 .stier { background: linear-gradient(90deg, #e8b923, #f7e08a); color: #16181f; }
.sitem.tier-4 { box-shadow: inset 0 0 0 1px rgba(242,201,76,0.45); background: linear-gradient(120deg, rgba(242,201,76,0.1), rgba(255,255,255,0.03)); }
.sitem.is-mine { box-shadow: inset 0 0 0 2px #f2c94c; background: rgba(242,201,76,0.08); }
.sitem.cant .item-text strong, .sitem.cant .price { opacity: 0.6; }
.sitem .buy .mini { white-space: nowrap; }
.swag-perks-box { padding: 10px 12px; border-radius: 8px; background: rgba(255,255,255,0.04); }
.swag-perks-box summary { display: flex; justify-content: space-between; cursor: pointer; font: 400 13px var(--display); list-style: none; color: #f7e08a; }
.swag-perks-box summary::-webkit-details-marker { display: none; }
.swag-perks-box summary span { font: 600 11.5px var(--body); color: var(--muted); }
.swag-perks-box .swag-perks { margin-top: 10px; }
@media (max-width: 420px) {
  .sitem { grid-template-columns: 64px minmax(0, 1fr); }
  .sthumb { width: 64px; height: 46px; }
  .sitem .buy { grid-column: 1 / -1; justify-items: start; grid-auto-flow: column; justify-content: start; align-items: center; text-align: left; }
  .swag-top { grid-template-columns: auto minmax(0, 1fr); }
  .swag-net { grid-column: 1 / -1; justify-items: start; }
}

/* ---------- product workshop ---------- */
.panel.product-panel { width: min(440px, calc(100% - 20px)); gap: 12px; padding: 18px 18px 18px; z-index: 4; }
.panel.product-panel > * { flex-shrink: 0; }
.product-talk { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 10px; align-items: center; }
.product-magnus { width: 52px; height: 52px; display: block; }
.product-bubble { position: relative; margin: 0; padding: 10px 12px; border-radius: 10px; background: #fbf8ee; color: #16181f; font-weight: 600; font-size: 14px; line-height: 1.35; }
.product-bubble::before { content: ''; position: absolute; left: -7px; top: 50%; margin-top: -7px; border: 7px solid transparent; border-left: 0; border-right-color: #fbf8ee; }
.product-stage { position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr) 40px; align-items: center; gap: 6px; }
.product-canvas { width: 100%; aspect-ratio: 4 / 3; display: block; border-radius: 12px; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08); }
.product-arrow { width: 40px; height: 40px; font-size: 22px; border-radius: 50%; }
.product-count { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); font-size: 11px; font-weight: 700; color: var(--muted); }
.product-info { display: grid; gap: 2px; text-align: center; }
.product-info strong { font: 400 18px var(--display); color: var(--amber); }
.product-info span { font-size: 13px; color: #d9d6cc; }
.product-opts { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 8px 10px; align-items: center; }
.product-opts .swatchbtn { width: 22px; height: 22px; }

/* two steps: pick a product, then pimp it */
#product-screen:not([data-step="pick"]) .only-pick, #product-screen:not([data-step="name"]) .only-name, #product-screen:not([data-step="pimp"]) .only-pimp { display: none !important; }
.product-steps { display: flex; gap: 6px; justify-content: center; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.product-steps .ps { padding: 4px 10px; border-radius: 99px; background: rgba(255,255,255,0.06); color: var(--muted); }
#product-screen[data-step="pick"] .ps1, #product-screen[data-step="name"] .ps2, #product-screen[data-step="pimp"] .ps3 { background: var(--amber); color: #16181f; }
#product-screen[data-step="name"] .ps1, #product-screen[data-step="pimp"] .ps1, #product-screen[data-step="pimp"] .ps2 { background: #2f6b3f; color: #fff; }
#product-screen:not([data-step="pick"]) .product-stage { grid-template-columns: minmax(0, 1fr); justify-items: center; }
#product-screen[data-step="pimp"] .product-canvas { width: 70%; }
#product-screen[data-step="name"] .product-canvas { width: 46%; }
#product-screen[data-step="name"] .product-tagline-wrap, #product-screen[data-step="name"] #product-tagline { display: none; }
#product-go:disabled { opacity: 0.55; cursor: not-allowed; filter: grayscale(0.4); }
.product-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.pthumb { position: relative; padding: 0; aspect-ratio: 1; border: 0; border-radius: 10px; background: rgba(255,255,255,0.05); cursor: pointer; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06); transition: transform 0.12s, background 0.12s; }
.pthumb:hover { background: rgba(255,255,255,0.1); transform: translateY(-1px); }
.pthumb[aria-selected="true"] { background: rgba(255,182,39,0.18); box-shadow: inset 0 0 0 2px var(--amber); }
.pthumb canvas { width: 100%; height: 100%; display: block; pointer-events: none; }
.product-panel .actions { display: grid; gap: 8px; }
.product-panel .actions-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.product-arrow { animation: nudge 2.4s ease-in-out infinite; }
#product-next { animation-delay: 0.2s; }
@keyframes nudge { 0%, 70%, 100% { transform: none; } 80% { transform: scale(1.15); box-shadow: 0 0 0 4px rgba(255,182,39,0.35); } }
@media (max-width: 420px) { .product-grid { gap: 4px; } }

/* the product card in the garage */
.prod-card { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 12px; align-items: center; padding: 10px; border-radius: 8px; background: linear-gradient(120deg, #2a2340, #1e2029 70%); box-shadow: inset 0 0 0 1px #3d3360; }
.prod-canvas { width: 140px; height: 124px; display: block; border-radius: 6px; }
.prod-canvas.pop { animation: pop 0.7s ease-out; }
.prod-text { display: grid; gap: 4px; min-width: 0; }
.prod-text strong { font: 400 15px var(--display); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prod-ver { font-weight: 700; color: var(--amber); font-variant-numeric: tabular-nums; }
.prod-steps { margin: 0; font-size: 11.5px; color: var(--muted); line-height: 1.4; }
.prod-steps b { color: var(--ink); }
.prod-text .mactions { margin-top: 2px; }
@keyframes pop { 0% { filter: brightness(1.8) saturate(1.5); transform: scale(1.06); } 100% { filter: none; transform: none; } }
@media (max-width: 420px) {
  .prod-card { grid-template-columns: 116px minmax(0, 1fr); gap: 10px; } .prod-canvas { width: 116px; height: 112px; }
  .prod-text strong { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .product-opts { grid-template-columns: 56px minmax(0, 1fr); gap: 8px; }
  .product-opts .swatches { gap: 4px; } .product-opts .swatchbtn { width: 20px; height: 20px; }
}

/* ---------- SNARTUP: the festival on Rådhusplassen. Black and white, blue and orange accents ---------- */
.panel.snartup-panel {
  width: min(560px, calc(100% - 12px)); height: calc(100% - 12px); max-height: calc(100% - 12px); overflow-y: auto; padding: 10px 10px 14px; gap: 10px; z-index: 5;
  border-top: 4px solid #ff7a1a;
  background: #0d0d0f;
  background-image: linear-gradient(90deg, rgba(45,108,223,0.08) 0 50%, rgba(255,122,26,0.08) 50% 100%);
  box-shadow: 0 0 0 100vmax rgba(5,6,10,0.82), 0 30px 80px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.12);
}
.panel.snartup-panel > * { flex-shrink: 0; }
.sn-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 2px 4px; }
.sn-logo { font: 400 22px var(--display); color: #f5f5f2; text-shadow: -2px 2px 0 #2d6cdf, 2px 2px 0 #ff7a1a; letter-spacing: 0.02em; }
.sn-step { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #f5f5f2; text-align: right; opacity: 0.8; }
.sn-canvas { width: 100%; aspect-ratio: 480 / 270; display: block; border-radius: 6px; box-shadow: 0 0 0 2px #f5f5f2, 0 10px 30px rgba(0, 0, 0, 0.6); background: #0d0d0f; }
.sn-card { display: flex; flex-direction: column; gap: 10px; padding: 12px 12px 10px; background: #ffffff; color: #0d0d0f; border-radius: 6px; box-shadow: inset 0 5px 0 0 #0d0d0f; position: relative; }
.sn-card::after { content: ''; position: absolute; left: 0; top: 0; height: 5px; width: 50%; background: #2d6cdf; border-radius: 6px 0 0 0; }
.sn-card::before { content: ''; position: absolute; right: 0; top: 0; height: 5px; width: 50%; background: #ff7a1a; border-radius: 0 6px 0 0; }
.sn-card .dlg-title { color: #6b6b72; }
.sn-text { margin: 0; font-size: 15px; line-height: 1.45; white-space: pre-line; }
.sn-text.in { animation: snIn 0.35s ease-out; }
.sn-card .choice { background: #f3f3f0; border: 1.5px solid #0d0d0f; color: #0d0d0f; }
.sn-card .choice:hover:not(:disabled) { background: #fff1e6; border-color: #ff7a1a; }
.sn-card .choice .num { background: #0d0d0f; color: #f5f5f2; }
.sn-card .choice:nth-child(even) .num { background: #2d6cdf; }
.sn-card .dlg-table .foot { background: rgba(45,108,223,0.12); }
@keyframes snIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (max-width: 420px) { .sn-logo { font-size: 18px; } .sn-text { font-size: 14px; } .panel.snartup-panel { padding: 8px 8px 12px; } }

/* ---------- onboarding, one step at a time ---------- */
.ob-steps { list-style: none; margin: 0 0 4px; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; counter-reset: none; }
.ob-steps li { display: grid; justify-items: center; gap: 3px; font-size: 10.5px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); position: relative; }
.ob-steps li::before { content: ''; position: absolute; top: 12px; left: -50%; width: 100%; height: 2px; background: #2c2f3a; z-index: 0; }
.ob-steps li:first-child::before { display: none; }
.ob-steps b { position: relative; z-index: 1; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: #23262f; color: var(--muted); font-size: 12px; box-shadow: inset 0 0 0 2px #3a3d48; }
.ob-steps li.done b { background: #2f6b3f; color: #fff; box-shadow: none; }
.ob-steps li.done::before, .ob-steps li.on::before { background: var(--amber); }
.ob-steps li.on { color: var(--ink); }
.ob-steps li.on b { background: var(--amber); color: #16181f; box-shadow: 0 0 0 4px rgba(255,182,39,0.25); }
.ob-panel { display: grid; gap: 14px; }
.ob-card { display: grid; gap: 8px; padding: 16px; border-radius: 14px; background: #1f2129; box-shadow: inset 0 0 0 2px var(--amber); }
.ob-kicker { margin: 0; font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--amber); }
.ob-q { font: 600 22px/1.2 'Rubik', system-ui, sans-serif; color: var(--ink); }
.ob-hint { margin: 0; font-size: 13.5px; line-height: 1.4; color: #c9cbd4; }
.ob-input { width: 100%; box-sizing: border-box; font: 700 20px 'Rubik', system-ui, sans-serif; padding: 14px 14px; border-radius: 10px; border: 2px solid #3a3d48; background: #0f1015; color: var(--ink); }
.ob-input:focus-visible { outline: none; border-color: var(--amber); box-shadow: 0 0 0 4px rgba(255,182,39,0.2); }
.ob-input::placeholder { color: #5f6372; font-weight: 500; }
.ob-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ob-chips-label { font-size: 12px; color: var(--muted); margin-right: 2px; }
.ob-chip { font: 600 12.5px 'Rubik', system-ui, sans-serif; padding: 6px 10px; border-radius: 99px; border: 0; background: #2a2d38; color: var(--ink); cursor: pointer; }
.ob-chip:hover { background: #363a47; }
.ob-more { background: transparent; box-shadow: inset 0 0 0 1px #3a3d48; color: var(--muted); }
.ob-preview { margin: 0; min-height: 1.3em; font-size: 13px; color: var(--muted); }
.ob-preview b { color: var(--ink); }
#ob-next:disabled { opacity: 0.55; cursor: not-allowed; filter: grayscale(0.4); }
.ob-panel.shake .ob-card { animation: ob-shake 0.35s; }
@keyframes ob-shake { 0%,100% { transform: none; } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
#creator-screen .ob-hint { margin: -4px 0 4px; }
#product-screen.after .ob-only { display: none; }
.howto-box { border-radius: 10px; background: rgba(255,255,255,0.04); padding: 0 12px; }
.howto-box summary { cursor: pointer; padding: 10px 0; font-size: 13px; font-weight: 700; color: var(--muted); list-style: none; }
.howto-box summary::-webkit-details-marker { display: none; }
.howto-box summary::before { content: '▸ '; color: var(--amber); }
.howto-box[open] summary::before { content: '▾ '; }
.howto-box .howto { padding-bottom: 12px; }

/* ---------- Magnus teaches the garage ---------- */
.lesson { display: grid; gap: 6px; padding: 11px 12px; border-radius: 6px; background: linear-gradient(135deg, #2b2440, #232634); box-shadow: inset 0 0 0 1px #4a3f6b; }
.lesson-tag { display: flex; justify-content: space-between; gap: 8px; font-size: 10.5px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: #c3a6ff; }
.lesson-tag em { font-style: normal; color: var(--muted); font-weight: 600; letter-spacing: 0.02em; text-transform: none; }
.lesson strong { font: 400 15px var(--display); color: var(--ink); }
.lesson p { margin: 0; font-size: 13px; line-height: 1.4; color: #d6d8e0; }
.lesson .lesson-path { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; }
.lesson-path span { padding: 3px 8px; border-radius: 99px; background: #15161c; color: var(--amber); box-shadow: inset 0 0 0 1px #3a3d48; }
.lesson-path i { font-style: normal; color: var(--muted); }
.lesson .mactions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.mini.ghost { background: transparent; box-shadow: inset 0 0 0 1px #3a3d48; color: var(--muted); }
.lesson-done { margin: 0; font-size: 12.5px; color: var(--muted); }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--amber); text-decoration: underline; cursor: pointer; }
.g-hint { margin: -2px 0 6px; font-size: 12px; color: var(--amber); }
.fold { border-radius: 4px; background: #1e2029; padding: 0 12px; margin-top: 10px; }
.fold summary { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 10px 0; cursor: pointer; list-style: none; }
.fold summary::-webkit-details-marker { display: none; }
.fold summary span { font: 400 14px var(--display); color: var(--ink); }
.fold summary em { font-style: normal; font-size: 12px; color: var(--muted); margin-left: auto; }
.fold summary::after { content: '▾'; color: var(--muted); }
.fold[open] summary::after { content: '▴'; }
.fold > .kpis { margin: 0 0 12px; }
.fold.how summary span { font: 600 12.5px var(--body); color: var(--muted); }
.fold.how summary span::before { content: '? '; display: inline-grid; place-items: center; width: 16px; height: 16px; margin-right: 6px; border-radius: 50%; background: #2a2d3a; color: var(--amber); font-size: 11px; font-weight: 800; }
.fold.how p { margin: 0 0 12px; font-size: 12.5px; line-height: 1.45; color: var(--muted); }
.spot { position: relative; z-index: 3; animation: spot 1s ease-in-out 4; outline: 3px solid var(--amber); outline-offset: 3px; border-radius: 6px; }
@keyframes spot { 0%, 100% { outline-color: var(--amber); box-shadow: 0 0 0 0 rgba(255,182,39,0.6); } 50% { outline-color: #fff; box-shadow: 0 0 0 10px rgba(255,182,39,0); } }

/* ---------- leaderboard ---------- */
.lbhero { display: grid; gap: 10px; padding: 14px; border-radius: 8px; background: linear-gradient(160deg, #262235 0%, #1b1d26 70%); box-shadow: inset 0 3px 0 var(--amber); }
.lbhero-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.lbhero-top > div:first-child { display: grid; gap: 2px; }
.rankbox.podium { background: linear-gradient(180deg, #3a2f12, #15161c); box-shadow: inset 0 0 0 2px var(--amber); }
.rankbox.p2 { box-shadow: inset 0 0 0 2px #cfd6e4; background: linear-gradient(180deg, #2b3038, #15161c); }
.rankbox.p3 { box-shadow: inset 0 0 0 2px #d08a4e; background: linear-gradient(180deg, #33241a, #15161c); }
.lbparts { display: flex; height: 8px; border-radius: 99px; overflow: hidden; background: #2a2d3a; gap: 2px; }
.lbparts.big { height: 12px; }
.pt-rounds { background: #4cc9f0; } .pt-owner { background: var(--amber); } .pt-wealth { background: #c3a6ff; } .pt-feats { background: var(--good); }
.lbpartlist { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 12px; font-size: 12px; color: var(--muted); }
.lbpartlist li { display: flex; align-items: center; gap: 6px; }
.lbpartlist b { margin-left: auto; color: var(--ink); font-variant-numeric: tabular-nums; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }
.lbmagnus { margin: 0; padding: 8px 10px; border-radius: 6px; background: #15161c; font-size: 12.5px; line-height: 1.4; color: #d6d8e0; }
.lbmagnus b { color: #ff9f1c; }
.lbviews { grid-template-columns: repeat(4, 1fr) !important; }
.lbfilters { display: flex; flex-wrap: wrap; gap: 5px; margin: 8px 0 4px; }
.chipbtn.small { font-size: 11px; padding: 4px 9px; }
.lbchips { margin: 6px 0 4px; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.lbchips .chipbtn { flex: none; }
.lb2 { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 5px; }
.lbrow { border-radius: 8px; background: #1e2029; overflow: hidden; }
.lbrow.me { box-shadow: inset 0 0 0 2px var(--amber); background: #2a2516; }
.lbrow.mine { box-shadow: inset 0 0 0 1px #6b5a2a; }
.lbhead { width: 100%; display: grid; grid-template-columns: 28px 32px minmax(0, 1fr) auto; gap: 9px; align-items: center; padding: 9px 10px; background: none; border: 0; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.lbhead.static { cursor: default; }
.lbrank { font: 400 15px var(--display); color: var(--muted); text-align: center; }
.top1 .lbrank, .top2 .lbrank, .top3 .lbrank { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; color: #16181f; font-size: 13px; }
.top1 .lbrank { background: linear-gradient(135deg, #ffe08a, #ffb627); box-shadow: 0 0 12px rgba(255,182,39,0.45); }
.top2 .lbrank { background: linear-gradient(135deg, #f1f4fa, #aab3c4); }
.top3 .lbrank { background: linear-gradient(135deg, #f0b07a, #b86b33); }
.lbav { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 14px; color: #fff; background: hsl(var(--h) 55% 42%); box-shadow: inset 0 -3px 0 hsl(var(--h) 55% 30%); flex: none; }
.lbname { display: grid; gap: 1px; min-width: 0; }
.lbname strong { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lbname > em { font-style: normal; font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.you { font-style: normal; font-size: 10px; font-weight: 800; padding: 1px 6px; border-radius: 99px; background: var(--amber); color: #16181f; vertical-align: 1px; }
.lbbadges { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 2px; }
.lbbadges:empty { display: none; }
.bdg { font-style: normal; font-size: 9.5px; font-weight: 800; letter-spacing: 0.04em; padding: 1px 5px; border-radius: 4px; background: #2a2d3a; color: var(--muted); }
.bdg.gold { background: #4a3a10; color: #ffd166; } .bdg.silver { background: #333a46; color: #dfe5ef; } .bdg.aud { background: #45203a; color: #ff8fc8; }
.bdg.exit { background: #173a2a; color: var(--good); } .bdg.dream { background: #2b2350; color: #c3a6ff; } .bdg.swag { background: #3d2a12; color: #ffb35c; }
.bdg.rip { background: #3a1a1a; color: #ff8a80; } .bdg.live { background: #12333d; color: #4cc9f0; animation: live 1.6s ease-in-out infinite; } .bdg.rnd { background: none; padding: 0; font-weight: 600; }
@keyframes live { 50% { opacity: 0.5; } }
.lbval { font: 400 14px var(--display); color: var(--ink); text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.top1 .lbval { color: var(--amber); }
.lbdetail { display: grid; gap: 8px; padding: 0 12px 12px 12px; border-top: 1px solid #2a2d3a; padding-top: 10px; }
.lbrounds { display: grid; gap: 4px; }
.spark { display: flex; align-items: flex-end; gap: 2px; height: 34px; }
.spark i { flex: 1; min-width: 3px; max-width: 18px; background: #4cc9f0; border-radius: 2px 2px 0 0; opacity: 0.85; }
.lbfacts { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 12px; font-size: 12px; }
.lbfacts div { display: flex; justify-content: space-between; gap: 8px; min-width: 0; }
.lbfacts dt { color: var(--muted); } .lbfacts dd { margin: 0; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lbswag { margin: 0; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; font-size: 11.5px; }
.lbswag .olabel { margin-right: 4px; }
.lbswag span:not(.olabel) { padding: 2px 8px; border-radius: 99px; background: #2b2640; color: #e2d6ff; }
.lbswag.none { color: var(--muted); }
.lbyou { margin: 6px 0 0; font-size: 12px; color: var(--amber); text-align: center; }
.lbrounds-pick { display: flex; gap: 5px; overflow-x: auto; padding: 4px 0 6px; scrollbar-width: thin; }
.rchip { flex: none; width: 36px; height: 36px; border-radius: 50%; border: 0; background: #23262f; color: var(--muted); font: 400 14px var(--display); cursor: pointer; box-shadow: inset 0 0 0 1px #3a3d48; }
.rchip[aria-pressed="true"] { background: var(--amber); color: #16181f; box-shadow: 0 0 0 3px rgba(255,182,39,0.25); }
.lbmetric { grid-template-columns: repeat(4, 1fr) !important; }
.lbmetric button { font-size: 12px; }
.lbchamp { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 10px; align-items: center; margin-top: 8px; padding: 10px 12px; border-radius: 8px; background: linear-gradient(120deg, #3a2f12, #1e2029 75%); box-shadow: inset 0 0 0 1px #6b5a2a; }
.lbchamp .lbav { width: 40px; height: 40px; font-size: 18px; }
.lbchamp > div { display: grid; gap: 1px; min-width: 0; }
.lbchamp strong { font: 400 17px var(--display); }
.crown { font-size: 26px; color: var(--amber); text-shadow: 0 0 12px rgba(255,182,39,0.5); }
.funnel { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 3px; font-size: 11.5px; }
.funnel li { display: grid; grid-template-columns: 28px minmax(0, 1fr) 28px; gap: 8px; align-items: center; color: var(--muted); }
.funnel .fbar { height: 8px; border-radius: 99px; background: #2a2d3a; overflow: hidden; }
.funnel .fbar i { display: block; height: 100%; background: #4cc9f0; border-radius: 99px; }
.funnel li.on { color: var(--ink); } .funnel li.on .fbar i { background: var(--amber); }
.funnel b { text-align: right; color: var(--ink); }
.records { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin-top: 8px; }
.rec { display: grid; gap: 4px; align-content: start; padding: 10px; border-radius: 8px; background: #1e2029; box-shadow: inset 0 2px 0 #3a3d48; min-width: 0; }
.rec.mine { box-shadow: inset 0 2px 0 var(--amber), inset 0 0 0 1px #6b5a2a; background: #2a2516; }
.rec strong { font: 400 15px/1.2 var(--display); color: var(--ink); overflow-wrap: anywhere; }
.rec-who { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 11.5px; }
.rec-who .lbav { width: 22px; height: 22px; font-size: 11px; }
.rec-who > span { display: grid; min-width: 0; }
.rec-who b, .rec-who em { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rec-who em { font-style: normal; color: var(--muted); }
@media (max-width: 360px) { .records { grid-template-columns: 1fr; } }
#over-list .lbbadges { margin-top: 2px; }

/* Short phones: give the conversation more room and pack the round table tighter */
@media (max-height: 760px) {
  #dialog { top: 9%; max-height: 80%; gap: 8px; }
  #dialog.has-scene { top: 6%; max-height: 86%; }
  .dlg-text { font-size: 14.5px; line-height: 1.4; }
  .dlg-table .tr { padding: 3px 9px; }
  .dlg-table { font-size: 12.5px; }
}
@media (max-width: 420px) and (max-height: 760px) {
  .dlg-table { grid-template-columns: 1fr 1fr; }
  .dlg-table .tr { flex-direction: column; justify-content: flex-start; gap: 0; padding: 4px 9px; }
  .dlg-table .tr b { text-align: left; }
  .dlg-table .tr:nth-child(odd) { background: none; }
  .dlg-table .tr:nth-child(4n+1), .dlg-table .tr:nth-child(4n+2) { background: rgba(0,0,0,0.045); }
  .dlg-table .tr span { font-size: 11px; }
  .dlg-table .foot { grid-column: 1 / -1; }
}

/* ---------- glossary ---------- */
.g-title-right { display: flex; align-items: center; gap: 8px; min-width: 0; }
.gloss-btn { flex: none; font: 600 11px var(--body); color: var(--muted); background: transparent; border: 1px solid #3a3d48; border-radius: 999px; padding: 3px 9px; cursor: pointer; }
.gloss-btn:hover { color: var(--ink); border-color: var(--amber); }
.panel.gloss-panel { width: min(460px, calc(100% - 20px)); height: calc(100% - 20px); max-height: calc(100% - 20px); padding: 14px 16px 18px; gap: 10px; z-index: 5; overflow-y: auto; background: var(--panel); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7); }
.panel.gloss-panel > * { flex-shrink: 0; }
.gloss-top { display: flex; align-items: center; gap: 12px; }
.gloss-top .h2 { font-size: 22px; }
.gloss-search { width: 100%; box-sizing: border-box; font: 500 15px var(--body); padding: 11px 12px; border-radius: 8px; border: 2px solid #3a3d48; background: #0f1015; color: var(--ink); }
.gloss-search:focus-visible { outline: none; border-color: var(--amber); }
.gloss-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.gl-letter { margin-top: 8px; font: 400 15px var(--display); color: var(--amber); }
.gl-term details { border-radius: 6px; background: #1e2029; }
.gl-term summary { display: flex; justify-content: space-between; align-items: center; padding: 9px 12px; cursor: pointer; font-weight: 700; font-size: 14px; list-style: none; }
.gl-term summary::-webkit-details-marker { display: none; }
.gl-term summary::after { content: '▾'; color: var(--muted); font-weight: 400; }
.gl-term details[open] summary::after { content: '▴'; }
.gl-term details[open] { box-shadow: inset 3px 0 0 var(--amber); }
.gl-term p { margin: 0; padding: 0 12px 10px; font-size: 13.5px; line-height: 1.45; color: #d6d8e0; }
.gl-term .gl-game { color: var(--muted); font-size: 12.5px; }
.gl-term .gl-game b { color: var(--amber); }
.gl-none { padding: 14px; color: var(--muted); font-size: 13px; text-align: center; }

/* ---------- tips and glossary side by side ---------- */
.helprow { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.helptile { display: flex; align-items: center; gap: 9px; padding: 9px 11px; border-radius: 8px; border: 0; background: #1e2029; color: var(--ink); font: inherit; text-align: left; cursor: pointer; box-shadow: inset 0 0 0 1px #2c303c; }
.helptile:hover { background: #252834; }
.helptile.on { box-shadow: inset 0 0 0 2px #8a74d6; background: #232034; }
.hicon { flex: none; width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; font-weight: 800; font-size: 14px; }
.hicon.tips { background: #2b2440; color: #c3a6ff; font-size: 16px; }
.hicon.gloss { background: #2a2416; color: var(--amber); font-family: var(--display); font-weight: 400; }
.htext { display: grid; min-width: 0; }
.htext strong { font-size: 13.5px; }
.htext em { font-style: normal; font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.helprow + .lesson, .helprow + .lesson-done { margin-top: -2px; }

/* ---------- section switcher (Kjøp, Gründerens eiendeler) ---------- */
.secnav { display: grid; gap: 6px; margin-bottom: 4px; }
.secnav-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.secnav-head span { font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--amber); }
.secnav-head em { font-style: normal; font-size: 11px; color: var(--muted); }
.secnav-tiles { display: grid; grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); gap: 6px; }
.sectile { position: relative; display: grid; justify-items: center; gap: 3px; padding: 10px 4px 9px; border-radius: 10px; border: 0; background: #1e2029; color: var(--muted); font: inherit; cursor: pointer; box-shadow: inset 0 0 0 1px #34384a; text-align: center; min-width: 0; transition: transform 0.12s, background 0.12s; }
.sectile:hover { background: #262a37; color: var(--ink); transform: translateY(-1px); }
.sectile strong { font-size: 13px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.sectile em { font-style: normal; font-size: 10.5px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.sicon2 { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: #2a2d3a; color: var(--ink); }
.sectile[aria-selected="true"] { background: var(--amber); color: #3a2a00; box-shadow: 0 4px 14px rgba(255,182,39,0.3); }
.sectile[aria-selected="true"] strong { color: #16181f; }
.sectile[aria-selected="true"] .sicon2 { background: #16181f; color: var(--amber); }
.sectile[aria-selected="true"]::after { content: ''; position: absolute; left: 50%; bottom: -7px; margin-left: -7px; border: 7px solid transparent; border-bottom: 0; border-top-color: var(--amber); }
.sectile:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.secnext { display: grid; grid-template-columns: auto 1fr; gap: 8px; margin-top: 12px; }
.secnext-go { justify-self: stretch; }
.swag-nav { margin-top: 4px; }
@media (max-width: 380px) { .sectile em { display: none; } .sectile { padding: 9px 2px 8px; } .sectile strong { font-size: 12px; } }

/* ---------- «Formuen din» and the glossary: bigger, with the garage dimmed behind ---------- */
.panel.swag-panel, .panel.gloss-panel {
  width: min(560px, calc(100% - 12px)); height: calc(100% - 12px); max-height: calc(100% - 12px);
  box-shadow: 0 0 0 100vmax rgba(5, 6, 10, 0.82), 0 30px 80px rgba(0, 0, 0, 0.7);
  padding-top: 0; z-index: 6;
}
.swag-top, .gloss-top { position: sticky; top: 0; z-index: 2; margin: 0 -16px; padding: 12px 16px 10px; background: inherit; background-color: #1b1712; border-bottom: 1px solid #3a2f1a; }
.gloss-top { background-color: var(--panel); border-bottom-color: #2c303c; }
.swag-top { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 12px; }
.gloss-top { gap: 12px; }
.swag-back { white-space: nowrap; }
.swag-titles .h2 { margin: 0; }
.swag-titles .eyebrow { margin: 2px 0 0; }
.swag-net { display: grid; justify-items: end; }
.swag-net strong { font: 400 16px var(--display); color: #f2c94c; }
.swag-panel .fold { background: #1e2029; }

/* ---------- «Forslag»: calm list instead of coloured boxes ---------- */
.suggest { display: grid; gap: 4px; padding: 12px 14px 6px; border-radius: 10px; background: #1b1d25; box-shadow: inset 0 0 0 1px #262935; }
.suggest-head { display: flex; align-items: center; gap: 8px; }
.suggest-face { width: 26px; height: 26px; border-radius: 50%; display: block; }
.suggest-head h3 { margin: 0; font: 400 15px var(--display); color: var(--ink); }
.suggest-head span { font-size: 11.5px; color: var(--muted); }
.suggest-list { list-style: none; margin: 0; padding: 0; }
.sg { display: grid; grid-template-columns: 10px minmax(0, 1fr); gap: 12px; padding: 14px 0; border-top: 1px solid #262935; }
.sg:first-child { border-top: 0; }
.sg-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 7px; background: var(--muted); }
.sg.bad .sg-dot { background: var(--bad); } .sg.warn .sg-dot { background: var(--amber); } .sg.good .sg-dot { background: var(--good); } .sg.info .sg-dot { background: #4cc9f0; }
.sg-body { display: grid; gap: 10px; justify-items: start; }
.sg-body p { margin: 0; font-size: 14px; line-height: 1.55; color: #d9dbe3; }
.sg-body .mini { padding: 7px 12px; font-size: 12px; border-radius: 6px; }
.helptile { justify-content: center; padding: 10px; }
.helptile .htext strong { font-size: 14px; }

/* v1.52: nothing in the garage may push the panel wider than a small phone */
.tab-body > *, .fold, .fold > * { min-width: 0; }
.fold .tablewrap { max-width: 100%; }
@media (max-width: 400px) {
  .g-top { padding: 12px 12px 0; gap: 8px; }
  .g-body { padding: 12px 12px 16px; }
  .g-foot { padding-right: 12px; }
  .g-mbox { padding: 8px 10px; }
  .g-mbox .olabel { letter-spacing: 0.04em; font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .g-val, .g-cash { font-size: 20px; }
  .tabs { margin: 0 -4px; }
  .tab { font-weight: 600; letter-spacing: 0; padding: 12px 0 11px; }
  .g-runway { grid-template-columns: auto 1fr; }
  .g-runway .olabel { white-space: nowrap; }
  .g-runway .osub { grid-column: 1 / -1; text-align: left; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi dt { letter-spacing: 0.03em; }
  .rounds { font-size: 11px; }
  .rounds th, .rounds td { padding: 4px 3px; }
  .lbhero { padding: 12px; }
}

/* v1.53: the product name asked in an overlay on top of the product picker */
.pname-overlay {
  position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 12px;
  background: rgba(5,6,10,0.78); backdrop-filter: blur(2px); animation: pname-fade 0.18s ease-out;
}
.pname-overlay[hidden] { display: none; }
.pname-sheet {
  width: min(420px, 100%); max-height: calc(100% - 8px); overflow-y: auto; overscroll-behavior: contain;
  display: grid; gap: 12px; padding: 16px; border-radius: 16px; background: var(--panel);
  box-shadow: 0 24px 70px rgba(0,0,0,0.7), inset 0 0 0 1px rgba(255,255,255,0.06);
  animation: pname-up 0.22s ease-out;
}
.pname-head { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; align-items: center; }
.pname-canvas { width: 96px; height: 86px; display: block; border-radius: 10px; }
.pname-line { margin: 0; font-size: 14px; line-height: 1.4; color: var(--ink); }
.pname-sheet .actions { display: grid; gap: 8px; }
.pname-note { margin: 0; font-size: 12px; color: var(--muted); text-align: center; }
@keyframes pname-fade { from { opacity: 0; } }
@keyframes pname-up { from { transform: translateY(16px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .pname-overlay, .pname-sheet { animation: none; } }
@media (max-width: 400px) { .pname-head { grid-template-columns: 76px minmax(0, 1fr); } .pname-canvas { width: 76px; height: 68px; } .pname-line { font-size: 13px; } }

/* v1.53: «Pimp produktet» in Kjøp › Invester */
.pimp-body { display: grid; gap: 6px; padding: 12px; border-radius: 10px; background: #1e2029; }
.pimp-body .olabel { margin-top: 4px; }
.pimp-row { display: flex; gap: 8px; margin-top: 6px; }
.pimp-btn { justify-self: start; margin-top: 4px; padding: 6px 12px; border: 0; border-radius: 99px; background: #8a74d6; color: #fff; font: 700 12.5px var(--body); cursor: pointer; }
.pimp-btn:hover { background: #9b87e6; }

/* v1.54: the office, with the button on the picture and only the rent underneath */
.office-pic { position: relative; }
.office-rent { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); display: grid; gap: 2px; justify-items: center; padding: 10px 18px; white-space: nowrap; box-shadow: 0 8px 24px rgba(0,0,0,0.55); }
.office-rent em, .office-door em { font-style: normal; font-size: 11px; font-weight: 600; opacity: 0.85; }
.office-door {
  position: absolute; right: 8px; top: 8px; display: flex; align-items: center; gap: 8px;
  padding: 7px 11px 7px 8px; border: 0; border-radius: 8px; cursor: pointer; text-align: left;
  font: inherit; color: #16181f; background: var(--amber); box-shadow: 0 6px 18px rgba(0,0,0,0.5), inset 0 -3px 0 rgba(0,0,0,0.18);
}
.office-door:hover:not(:disabled) { filter: brightness(1.08); }
.office-door:disabled, .office-rent:disabled { cursor: not-allowed; filter: grayscale(0.6) brightness(0.8); }
.office-door svg { width: 22px; height: 22px; flex: none; }
.office-door span { display: grid; line-height: 1.15; }
.office-door b { font-size: 12.5px; }
.office-rentline { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; padding: 8px 12px; background: #1e2029; border-radius: 6px; font-size: 12.5px; color: var(--muted); }
.office-rentline strong { color: var(--ink); font-size: 13.5px; }
.office-rentline b { color: var(--cash); }
@media (max-width: 400px) { .office-door { padding: 5px 8px 5px 6px; gap: 6px; } .office-door svg { width: 18px; height: 18px; } .office-door b { font-size: 11.5px; } .office-rent { padding: 8px 12px; font-size: 14px; } }

/* v1.55: the showroom platform in Kjøp › Biler */
.showroom { display: grid; border-radius: 8px; overflow: hidden; background: #13141b; box-shadow: inset 0 0 0 1px #2c303c; }
.showroom-canvas { width: 100%; height: clamp(220px, 60vw, 290px); display: block; }
.showroom-cap { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; background: #1a1c24; }
.showroom-cap > span:first-child { display: grid; line-height: 1.25; }
.showroom-cap strong { font: 400 16px var(--display); }
.showroom-cap em { font-style: normal; font-size: 12px; color: var(--muted); font-weight: 600; }
.car-look { position: relative; padding: 0; border: 0; background: transparent; cursor: pointer; border-radius: 6px; }
.car-look span { position: absolute; right: 2px; bottom: 2px; font: 700 10px var(--body); padding: 2px 6px; border-radius: 99px; background: rgba(14,15,20,0.8); color: var(--muted); }
.car-look.on span { background: var(--amber); color: #16181f; }
.car-look:hover span { color: var(--ink); }
/* the red tab badge sits in the tab's top-right corner instead of pushing into the next tab */
.tab .badge { top: 2px; right: 0; margin-left: 0; }
@media (max-width: 400px) { .tab .badge { min-width: 13px; height: 13px; font-size: 9px; line-height: 13px; padding: 0 3px; top: 1px; } }

/* v1.56: «Flytt penger» in Formuen din: two vaults, a pipe, a slider and flying coins */
.xfer { position: relative; display: grid; gap: 10px; padding: 14px; border-radius: 12px; overflow: hidden;
  background: radial-gradient(120% 90% at 50% 0%, rgba(242,201,76,0.14), rgba(255,255,255,0.02) 70%), #1a1b22;
  box-shadow: inset 0 0 0 1px rgba(242,201,76,0.35); }
.xfer-head { display: flex; align-items: baseline; gap: 8px; }
.xfer-head b { font: 400 16px var(--display); color: #f2c94c; }
.xfer-head span { font-size: 12px; color: var(--muted); }
.xfer-dir { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 3px; border-radius: 99px; background: #0f1015; }
.xfer-dir button { border: 0; border-radius: 99px; padding: 8px 6px; font: 700 12.5px var(--body); color: var(--muted); background: transparent; cursor: pointer; }
.xfer-dir button[aria-selected="true"] { background: #f2c94c; color: #16181f; box-shadow: 0 2px 10px rgba(242,201,76,0.35); }
.xfer-row { display: grid; grid-template-columns: minmax(0, 1fr) 54px minmax(0, 1fr); align-items: stretch; }
.vault { display: grid; justify-items: center; gap: 1px; padding: 10px 6px; border-radius: 10px; text-align: center; background: #22242d; box-shadow: inset 0 0 0 1px #30333f; min-width: 0; transition: box-shadow .2s, transform .2s; }
.vault svg { width: 26px; height: 26px; color: var(--muted); margin-bottom: 2px; }
.vault span { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.vault strong { font: 400 17px/1.2 var(--display); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.vault em { min-height: 15px; font-style: normal; font-size: 11.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.vault.from em { color: var(--bad); } .vault.to em { color: var(--good); }
.vault.to { box-shadow: inset 0 0 0 2px rgba(123,211,137,0.55); }
.vault.me svg { color: #f2c94c; } .vault.co svg { color: #9be7ff; }
.vault.hit { animation: vault-hit .5s ease-out; }
@keyframes vault-hit { 30% { transform: scale(1.06); box-shadow: inset 0 0 0 2px #f2c94c, 0 0 24px rgba(242,201,76,0.5); } }
.xfer-pipe { position: relative; display: grid; place-items: center; }
.xfer-pipe::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 6px; margin-top: -3px; border-radius: 3px; background: #0f1015; }
.xfer-pipe b { position: relative; z-index: 1; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #f2c94c; color: #16181f; font-size: 16px; box-shadow: 0 0 0 3px #1a1b22; }
.xfer-pipe i { position: absolute; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: #f2c94c; opacity: 0; animation: pipe-flow 1.4s linear infinite; }
.xfer-pipe i:nth-child(2) { animation-delay: .45s; } .xfer-pipe i:nth-child(3) { animation-delay: .9s; }
.to-co .xfer-pipe i { animation-name: pipe-flow-back; }
@keyframes pipe-flow { 0% { left: 0; opacity: 0; } 15%, 85% { opacity: 1; } 100% { left: calc(100% - 6px); opacity: 0; } }
@keyframes pipe-flow-back { 0% { left: calc(100% - 6px); opacity: 0; } 15%, 85% { opacity: 1; } 100% { left: 0; opacity: 0; } }
.xfer-slider { -webkit-appearance: none; appearance: none; width: 100%; height: 10px; border-radius: 99px; margin: 6px 0 2px;
  background: linear-gradient(90deg, #f2c94c var(--p, 0%), #0f1015 var(--p, 0%)); outline: none; cursor: pointer; }
.xfer-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff3b0, #e8b923 60%, #b8860b); box-shadow: 0 2px 8px rgba(0,0,0,0.6), inset 0 0 0 2px #fff6cc; }
.xfer-slider::-moz-range-thumb { width: 26px; height: 26px; border: 0; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff3b0, #e8b923 60%, #b8860b); box-shadow: 0 2px 8px rgba(0,0,0,0.6); }
.xfer-slider:disabled { opacity: 0.4; cursor: not-allowed; }
.xfer-chips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.xfer-chips .chipbtn { justify-content: center; text-align: center; }
.xfer-sum { display: grid; justify-items: center; gap: 2px; text-align: center; }
.xfer-sum strong { font: 400 24px/1.15 var(--display); color: var(--good); font-variant-numeric: tabular-nums; }
.xfer-sum span { font-size: 12px; color: var(--muted); }
.xfer-magnus { margin: 0; padding: 8px 10px; border-radius: 8px; background: rgba(255,255,255,0.04); font-size: 12.5px; line-height: 1.4; text-align: center; color: var(--ink); }
.xfer-go { width: 100%; }
.xcoin { position: absolute; left: 0; top: 0; width: 18px; height: 18px; border-radius: 50%; pointer-events: none; z-index: 3;
  background: radial-gradient(circle at 35% 35%, #fff3b0, #e8b923 60%, #a87b0f); box-shadow: 0 0 10px rgba(242,201,76,0.8), inset 0 0 0 2px #fff0a8; }
@media (max-width: 400px) { .xfer { padding: 12px 10px; } .xfer-row { grid-template-columns: minmax(0, 1fr) 40px minmax(0, 1fr); } .vault strong { font-size: 14.5px; } .xfer-pipe b { width: 24px; height: 24px; font-size: 14px; } .xfer-sum strong { font-size: 20px; } }
@media (prefers-reduced-motion: reduce) { .xfer-pipe i { animation: none; } }

/* v1.58: Snartup cut scenes: only the picture and the letterbox captions, the button comes at the end */
.snartup-panel.sn-cut .sn-card .dlg-head, .snartup-panel.sn-cut .sn-text, .snartup-panel.sn-cut #sn-table { display: none; }
.snartup-panel.sn-cut .sn-card { background: #0d0d0f; box-shadow: none; }
.snartup-panel.sn-cut .sn-card::before, .snartup-panel.sn-cut .sn-card::after { display: none; }
.snartup-panel.sn-cut .dlg-choices { opacity: 0; pointer-events: none; transition: opacity .5s; }
.snartup-panel.sn-cut.sn-cut-done .dlg-choices { opacity: 1; pointer-events: auto; }
.snartup-panel.sn-cut .sn-canvas { cursor: pointer; }
.sn-skip { display: none; }
.snartup-panel.sn-cut:not(.sn-cut-done) .sn-skip { display: block; justify-self: center; align-self: center; margin: 0 auto; font: 600 12px var(--body); color: #9aa0b0; background: none; border: 0; cursor: pointer; }

/* v1.58: dialog text as speech bubbles and fact cards (see src/richtext.js) */
.dlg-text, .sn-text { display: grid; gap: 7px; white-space: normal; min-height: 0; }
.rt-block { min-width: 0; }
.rt-block.rt-wait { display: none; }
.rt-bubble { position: relative; padding: 9px 12px; border-radius: 14px; background: #ffffff; box-shadow: 0 1px 0 rgba(0,0,0,0.06), inset 0 0 0 1px rgba(0,0,0,0.07); line-height: 1.45; }
.rt-bubble.first { border-top-left-radius: 4px; }
.rt-bubble.first::before { content: ''; position: absolute; left: 14px; top: -7px; border: 7px solid transparent; border-top: 0; border-bottom-color: #ffffff; filter: drop-shadow(0 -1px 0 rgba(0,0,0,0.07)); }
.rt-card { display: grid; gap: 0; padding: 8px 10px; border-radius: 10px; background: rgba(0,0,0,0.045); box-shadow: inset 3px 0 0 var(--dlg, var(--amber)); font-size: 0.93em; }
.rt-head { font-weight: 700; padding: 2px 0 4px; }
.rt-line { padding: 3px 0; color: #3a3d48; }
.rt-row { display: grid; grid-template-columns: minmax(0, auto) minmax(0, 1fr); gap: 2px 10px; align-items: center; padding: 4px 0; border-top: 1px solid rgba(0,0,0,0.06); }
.rt-head + .rt-row, .rt-row:first-child { border-top: 0; }
.rt-k { font-size: 0.86em; font-weight: 700; letter-spacing: 0.02em; color: #5b5f6b; }
.rt-v { min-width: 0; }
.rt-row .rt-meter + .rt-v, .rt-row .rt-dots + .rt-v { grid-column: 2; font-size: 0.86em; color: #5b5f6b; }
.rt-meter { display: block; height: 9px; border-radius: 5px; background: rgba(0,0,0,0.1); overflow: hidden; }
.rt-meter i { display: block; height: 100%; border-radius: 5px; background: linear-gradient(90deg, #e63946, #ffb627 55%, #2a9d8f); }
.rt-dots { display: flex; gap: 4px; }
.rt-dots i { width: 10px; height: 10px; border-radius: 50%; background: rgba(0,0,0,0.14); }
.rt-dots i.on { background: var(--dlg, #ff7a1a); box-shadow: inset 0 -2px 0 rgba(0,0,0,0.18); }
.rt-list { margin: 2px 0; padding-left: 18px; display: grid; gap: 3px; }
.rt-num { font-weight: 700; color: #16181f; background: rgba(255,182,39,0.28); padding: 0 3px; border-radius: 3px; white-space: nowrap; }
.rt-num.pos { color: #1f7a4d; background: rgba(42,157,143,0.16); }
.rt-num.neg { color: #b3261e; background: rgba(230,57,70,0.12); }
.rt-q { font-style: normal; font-weight: 600; color: #3a2a6b; }
.dlg-text.bad .rt-bubble { color: #b3261e; }
.sn-text .rt-bubble { background: #f3f3f0; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.08); }
.sn-text .rt-bubble.first::before { border-bottom-color: #f3f3f0; }

/* v1.59: Mujaffa in the garage */
.mj-card { display: grid; gap: 8px; padding: 12px; border-radius: 10px; background: linear-gradient(135deg, rgba(140,20,38,0.28), rgba(30,32,41,0.9) 60%); box-shadow: inset 0 0 0 1px rgba(255,120,150,0.25); }
.mj-card.sulk { filter: grayscale(0.5); opacity: 0.85; }
.mj-head { display: flex; align-items: center; gap: 10px; }
.mj-face { width: 46px; height: 46px; border-radius: 50%; flex: none; display: block; }
.mj-face.small { width: 36px; height: 36px; }
.mj-who { display: grid; line-height: 1.25; min-width: 0; }
.mj-who strong { font: 400 16px var(--display); color: #ffb3c4; }
.mj-who span { font-size: 12px; color: var(--muted); }
.mj-credit { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 3px 10px; align-items: center; font-size: 11.5px; }
.mj-credit span { font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); font-size: 10.5px; }
.mj-credit i { display: block; height: 8px; border-radius: 4px; background: rgba(255,255,255,0.1); overflow: hidden; }
.mj-credit b { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #8c1426, #ff7a9a 60%, #ffd166); }
.mj-credit em { grid-column: 1 / -1; font-style: normal; color: var(--ink); }
.mj-news { margin: 0; padding: 8px 10px; border-radius: 8px; background: rgba(255,255,255,0.05); font-size: 12.5px; line-height: 1.4; }
.mj-startup { display: grid; gap: 4px; padding: 10px; border-radius: 8px; background: rgba(0,0,0,0.22); box-shadow: inset 3px 0 0 #ff7a9a; }
.mj-startup strong { font: 400 15px var(--display); }
.mj-startup p { margin: 0; font-size: 12.5px; line-height: 1.4; }
.mj-startup .mj-magnus { color: var(--muted); }
.mj-startup .mj-in { color: var(--good); font-weight: 600; }
.mj-startup .mactions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.mj-deals { display: grid; gap: 6px; padding: 10px; border-radius: 8px; background: linear-gradient(135deg, rgba(140,20,38,0.25), #1e2029 65%); box-shadow: inset 0 0 0 1px rgba(255,120,150,0.22); }
.mj-deals.sulk { display: flex; gap: 10px; align-items: center; opacity: 0.8; }
.mj-deals.sulk p { margin: 0; font-size: 12.5px; color: var(--muted); }
.mj-deals-head { display: flex; gap: 10px; align-items: center; }
.mj-deals-head p { margin: 0; display: grid; line-height: 1.3; }
.mj-deals-head b { color: #ffb3c4; font-size: 13.5px; }
.mj-deals-head span { font-size: 12px; color: var(--muted); }
.mj-deal { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 6px; background: rgba(0,0,0,0.2); }
.mj-deal > div { display: grid; gap: 2px; min-width: 0; }
.mj-deal strong { font-size: 13.5px; }
@media (max-width: 400px) { .mj-deal { grid-template-columns: 1fr; } .mj-deal .btn { justify-self: start; } }
.mj-stage { width: 100%; aspect-ratio: 360 / 160; display: block; border-radius: 8px; cursor: pointer; touch-action: manipulation; box-shadow: inset 0 0 0 1px rgba(255,120,150,0.25); background: #1d1220; }
.mj-card > .mj-who { display: grid; line-height: 1.25; }
.mj-fx { display: block; font-size: 12px; font-weight: 600; line-height: 1.35; }
.mj-fx.good { color: var(--good); } .mj-fx.good::before { content: '+ '; }
.mj-fx.bad { color: #ff8a80; } .mj-fx.bad::before { content: '− '; }
.mj-owned { border-radius: 6px; background: rgba(0,0,0,0.2); padding: 0 10px; }
.mj-owned summary { cursor: pointer; padding: 8px 0; font-size: 13px; font-weight: 700; list-style: none; display: flex; justify-content: space-between; }
.mj-owned summary span { color: #ffb3c4; }
.mj-owned ul { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 6px; }
.mj-owned li { display: grid; gap: 1px; font-size: 12px; padding-top: 6px; border-top: 1px solid rgba(255,255,255,0.06); }
.mj-owned li strong { font-size: 12.5px; }
.mj-owned .good { color: var(--good); } .mj-owned .bad { color: #ff8a80; }
.mj-game { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; width: 100%; padding: 9px 10px; border: 0; border-radius: 8px; cursor: pointer; text-align: left; font: inherit; color: var(--ink); background: linear-gradient(90deg, rgba(214,40,40,0.35), rgba(30,32,41,0.8)); box-shadow: inset 0 0 0 1px rgba(255,120,150,0.35); }
.mj-game:hover { filter: brightness(1.1); }
.mj-game > span:nth-child(2) { display: grid; line-height: 1.3; }
.mj-game b { font-size: 13.5px; }
.mj-game em { font-style: normal; font-size: 11.5px; color: var(--muted); }
.mj-game-icon { width: 40px; height: 26px; display: grid; place-items: center; font-size: 20px; }
.mj-game-icon.shell { width: 40px; height: 22px; background: radial-gradient(circle at 20% 70%, #d62828 0 7px, transparent 8px), radial-gradient(circle at 50% 70%, #d62828 0 7px, transparent 8px), radial-gradient(circle at 80% 70%, #d62828 0 7px, transparent 8px); }
.mj-game-go { padding: 6px 12px; border-radius: 99px; background: #ffd166; color: #16181f; font-weight: 800; font-size: 12.5px; }
.mj-away { margin: 0; font-size: 12.5px; color: var(--muted); text-align: center; }
.mj-game-icon.catch { width: 14px; height: 24px; margin: 0 13px; clip-path: polygon(0 0, 100% 0, 65% 100%, 35% 100%); background: linear-gradient(#8c5a2b 0 28%, #e9c46a 28%); }
.mj-game-icon.spin { width: 26px; height: 26px; margin: 0 7px; border-radius: 50%; background: conic-gradient(#ffd166 0 45deg, #c9ccd4 45deg 90deg, #d62828 90deg 135deg, #9aa3b5 135deg 180deg, #3a3d48 180deg 225deg, #c9ccd4 225deg 270deg, #9aa3b5 270deg 315deg, #c9ccd4 315deg); box-shadow: 0 0 0 3px #16161a; }
.mj-game-icon.race { width: 14px; height: 30px; margin: 0 13px; border-radius: 4px; background: radial-gradient(circle at 50% 18%, #ff5a4e 0 4px, transparent 5px), radial-gradient(circle at 50% 50%, #ffb627 0 4px, transparent 5px), radial-gradient(circle at 50% 82%, #7bd389 0 4px, transparent 5px), #16161a; }
.mj-game-icon.slice { width: 30px; height: 20px; margin: 3px 5px; border-radius: 3px; background: linear-gradient(#c27a36 0 18%, #a8642a 18%); box-shadow: 6px -4px 0 -2px #d7dbe3; }
.mj-game-icon.polish { width: 26px; height: 26px; margin: 0 7px; border-radius: 50%; background: radial-gradient(circle, #d7dbe3 0 4px, #ffd166 5px 11px, #16161a 12px); box-shadow: 0 0 8px rgba(255,209,102,0.6); }
.mj-game-icon.park { width: 26px; height: 26px; margin: 0 7px; border-radius: 6px; background: #2a5bd7; color: #fff; font: 800 18px/26px Rubik, sans-serif; text-align: center; }
.mj-game-icon.park::after { content: "P"; }
.mj-game-icon.simon { width: 26px; height: 26px; margin: 0 7px; border-radius: 6px; background: conic-gradient(#ff5a4e 0 90deg, #ffd166 90deg 180deg, #4cc9f0 180deg 270deg, #7bd389 270deg); }

/* v1.63: Mujaffas startups in Formuen din */
.mjs { display: grid; gap: 10px; padding: 14px; border-radius: 12px; background: linear-gradient(135deg, rgba(214,40,40,0.22), #1a1b22 60%); box-shadow: inset 0 0 0 1px rgba(255,120,150,0.35); }
.mjs-head { display: flex; gap: 10px; align-items: center; }
.mjs-face { width: 42px; height: 42px; border-radius: 50%; flex: none; }
.mjs-head div { display: grid; line-height: 1.25; }
.mjs-head b { font: 400 15px var(--display); color: #ffb3c4; }
.mjs-head span { font-size: 12px; color: var(--muted); }
.mjs-pitch { display: grid; gap: 5px; padding: 10px 12px; border-radius: 8px; background: rgba(0,0,0,0.25); box-shadow: inset 3px 0 0 #ff7a9a; }
.mjs-pitch.good { box-shadow: inset 3px 0 0 var(--good); } .mjs-pitch.bad { box-shadow: inset 3px 0 0 #ff8a80; }
.mjs-pitch strong { font: 400 16px var(--display); }
.mjs-pitch p { margin: 0; font-size: 13px; line-height: 1.4; }
.mjs-news { font-weight: 600; }
.mjs-in { color: var(--good); font-weight: 600; }
.mjs-pitch.bad .mjs-in { color: #ff8a80; }
.mjs-buttons { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.mjs-how { font-size: 11px; color: var(--muted); }
.mjs-empty { margin: 0; font-size: 12.5px; color: var(--muted); }
.mjs-port { background: rgba(0,0,0,0.2); }
.mjs-port ul { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 6px; }
.mjs-port li { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; }
.mjs-port li span:first-child { display: grid; }
.mjs-port li em { font-style: normal; font-size: 11px; color: var(--muted); }
.mjs-port .up { color: var(--good); font-weight: 700; } .mjs-port .down { color: #ff8a80; font-weight: 700; }
.mj-startup-teaser { display: grid; gap: 2px; width: 100%; text-align: left; padding: 10px 12px; border: 0; border-radius: 8px; cursor: pointer; font: inherit; color: var(--ink); background: rgba(0,0,0,0.22); box-shadow: inset 3px 0 0 #ff7a9a; }
.mj-startup-teaser strong { font: 400 15px var(--display); }
.mj-startup-teaser:hover { background: rgba(0,0,0,0.32); }
/* the Snartup intro film sits in the middle of the tall panel */
.panel.snartup-panel.sn-cut { justify-content: center; }
.panel.snartup-panel.sn-cut .sn-card { background: transparent; }
.mj-owned li .mini { justify-self: start; margin-top: 4px; }

/* Mujaffa's family: a visit in the garage, and everyone you have met */
.mj-fam { display: grid; gap: 6px; padding: 10px; border-radius: 8px; background: rgba(0,0,0,0.22); box-shadow: inset 0 0 0 1px rgba(255,209,102,0.25); }
.mj-fam-film { width: 100%; aspect-ratio: 480 / 210; border-radius: 6px; display: block; }
.mj-fam .olabel { margin: 2px 0 0; color: #ffd166; }
.mj-fam-who { margin: 0; font-size: 12px; color: #d9d6cc; line-height: 1.35; }
.mj-fam-say { margin: 0; font-size: 13px; line-height: 1.4; }
.mj-fam-res { margin: 0; font-size: 13px; line-height: 1.45; padding: 8px 10px; border-radius: 6px; background: rgba(123,211,137,0.1); }
.mj-fam-choices { display: grid; gap: 6px; margin-top: 2px; }
.mj-fam-choices .btn { display: grid; gap: 1px; text-align: left; justify-items: start; padding: 8px 12px; height: auto; }
.mj-fam-choices .btn b { font-size: 13px; }
.mj-fam-choices .btn em { font-style: normal; font-size: 11px; opacity: 0.8; font-weight: 500; }
.mj-family { border-radius: 6px; background: rgba(0,0,0,0.2); padding: 0 10px; }
.mj-family summary { cursor: pointer; padding: 8px 0; font-size: 13px; font-weight: 700; list-style: none; display: flex; justify-content: space-between; }
.mj-family summary span { color: #ffb3c4; }
.mj-family ul { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 6px; }
.mj-family li { display: grid; grid-template-columns: 40px 1fr; gap: 8px; align-items: center; font-size: 12px; padding-top: 6px; border-top: 1px solid rgba(255,255,255,0.06); }
.mj-family li span { display: grid; gap: 1px; line-height: 1.3; }
.mj-family li em { font-style: normal; color: #ffd166; font-size: 11px; }
.mj-family li small { color: #bdb8ab; font-size: 11px; }
.mj-family li.locked { opacity: 0.5; }
.mj-fam-face { width: 40px; height: 40px; border-radius: 50%; }
.mj-fam-q { width: 40px; height: 40px; border-radius: 50%; display: grid !important; place-items: center; background: rgba(255,255,255,0.08); font-weight: 800; font-size: 16px; }

/* Demo Day in three steps */
.dd-plays { display: inline-flex; align-items: center; gap: 4px; }
.dd-plays i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,0.12); }
.dd-plays i.on { background: #c9a7ff; }
.dd-plays em { font-style: normal; font-size: 12px; color: var(--muted); margin-left: 4px; }
.dd-host { grid-template-columns: 44px minmax(0, 1fr); }
.dd-host .dd-face { width: 44px; height: 44px; }
.dd-step { display: grid; gap: 8px; }
.dd-sh { margin: 4px 0 0; display: flex; align-items: center; gap: 8px; font-size: 14px; }
.dd-sh i { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: #c9a7ff; color: var(--night); font: 400 12px var(--display); font-style: normal; }
.dd-sh span { margin-left: auto; font-size: 12px; font-weight: 500; color: var(--muted); }
.dd-tmeta b { color: var(--ink); }
.dd-roll { width: 100%; font-size: 16px; padding: 14px; }
.dd-howto { margin: 0; font-size: 13px; color: #ffd1dc; text-align: center; }
.dd-rules { border-radius: 6px; background: #1e2029; padding: 0 12px; }
.dd-rules summary { cursor: pointer; padding: 10px 0; font-size: 13px; font-weight: 700; list-style: none; display: flex; justify-content: space-between; }
.dd-rules summary span { color: var(--cash); }
.dd-rules .dd-bonus { margin-bottom: 8px; }
.dd-rules .dd-bonus li { background: rgba(255,255,255,0.04); }

/* Mujaffas startups: what you have in it, always visible */
.mjs-stake { display: grid; gap: 1px; padding: 10px 12px; border-radius: 8px; background: rgba(255,209,102,0.1); box-shadow: inset 0 0 0 1px rgba(255,209,102,0.35); }
.mjs-stake span { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: #ffd166; font-weight: 700; }
.mjs-stake strong { font: 400 24px var(--display); color: #fff; font-variant-numeric: tabular-nums; }
.mjs-stake em { font-style: normal; font-size: 12px; color: var(--muted); }
.mjs-stake.pop { animation: mjsPop 0.6s ease-out; }
@keyframes mjsPop { 0% { transform: scale(1); box-shadow: inset 0 0 0 1px rgba(255,209,102,0.35), 0 0 0 0 rgba(255,209,102,0.6); } 40% { transform: scale(1.04); box-shadow: inset 0 0 0 2px #ffd166, 0 0 0 10px rgba(255,209,102,0); } 100% { transform: scale(1); } }
.mjs-sell { justify-self: start; }

/* ---------- Mujaffa card, tidied (v1.68) ---------- */
.mj-card { gap: 10px; }
.mj-card > .mj-head { justify-content: space-between; }
.mj-card > .mj-head > strong { font: 400 17px var(--display); color: #ffb3c4; letter-spacing: 0.02em; }
.mj-card > .mj-head .mj-credit { display: flex; align-items: center; gap: 6px; width: 46%; }
.mj-card > .mj-head .mj-credit em { font-style: normal; font-size: 10.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.mj-card > .mj-head .mj-credit i { flex: 1; }
.mj-sulk { margin: 0; font-size: 12.5px; color: var(--muted); text-align: center; }
.mj-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
.mj-tile { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px; align-items: center; padding: 10px; border: 0; border-radius: 8px; cursor: pointer; text-align: left; font: inherit; color: var(--ink); background: rgba(0,0,0,0.25); box-shadow: inset 0 0 0 1px rgba(255,209,102,0.3); }
.mj-tile:hover { background: rgba(0,0,0,0.35); }
.mj-tile > span:last-child { display: grid; line-height: 1.25; min-width: 0; }
.mj-tile em { font-style: normal; font-size: 10.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #ffd166; }
.mj-tile b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mj-tile small { font-size: 11.5px; color: var(--good); font-weight: 700; }
.mj-tile.game { box-shadow: inset 0 0 0 1px rgba(255,209,102,0.55); background: linear-gradient(135deg, rgba(255,209,102,0.16), rgba(0,0,0,0.25)); }
.mj-tile-ic { font-size: 20px; width: 30px; text-align: center; }
.mj-hint { margin: -4px 0 0; font-size: 11.5px; color: var(--muted); line-height: 1.35; }
.mj-newslist { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.mj-newslist li { padding: 7px 10px; border-radius: 6px; background: rgba(255,255,255,0.05); font-size: 12.5px; line-height: 1.4; }

/* the visit: hello, the challenge, what came of it */
.fam-visit { display: grid; gap: 8px; padding: 10px; border-radius: 10px; background: rgba(0,0,0,0.28); box-shadow: inset 0 0 0 1px rgba(255,209,102,0.35); }
.fam-hello { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 10px; align-items: center; }
.fam-hello > div { display: grid; line-height: 1.3; min-width: 0; }
.fam-hello strong { font: 400 18px var(--display); color: #ffd166; }
.fam-hello span { font-size: 12px; color: var(--ink); }
.fam-hello em { font-style: normal; font-size: 11.5px; color: var(--muted); }
.fam-face { width: 52px; height: 52px; border-radius: 50%; display: block; }
.fam-face.sm { width: 38px; height: 38px; }
.fam-quote { margin: 0; padding: 8px 10px; border-radius: 8px; background: #fbf8ee; color: #1b1d26; font-size: 13px; line-height: 1.4; }
.fam-quote.muj { background: #ffe1e8; color: #3a1420; }
.fam-go { justify-self: stretch; }
.fam-title { font: 400 16px var(--display); }
.fam-text { margin: 0; font-size: 13px; line-height: 1.45; }
.fam-pill { justify-self: start; padding: 4px 10px; border-radius: 99px; font-size: 12px; font-weight: 700; background: rgba(255,255,255,0.1); }
.fam-pill.good { background: rgba(123,211,137,0.18); color: var(--good); }
.fam-note { margin: 0; font-size: 11.5px; color: var(--muted); }

/* the network row: everyone you have met */
.fam-net { display: grid; gap: 8px; padding: 10px; border-radius: 10px; background: rgba(0,0,0,0.2); }
.fam-net-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.fam-net-head strong { font-size: 13.5px; }
.fam-net-head span { font-size: 11.5px; color: var(--muted); }
.fam-row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.fam-chip { display: grid; justify-items: center; gap: 2px; padding: 6px 2px; border: 0; border-radius: 8px; background: transparent; color: var(--ink); font: inherit; cursor: pointer; }
.fam-chip b { font-size: 10.5px; font-weight: 700; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.fam-chip.on { background: rgba(255,209,102,0.15); box-shadow: inset 0 0 0 1px #ffd166; }
.fam-chip.locked { opacity: 0.35; cursor: default; }
.fam-q { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,0.08); font-weight: 800; }
.fam-bond { display: flex; gap: 2px; }
.fam-bond i { width: 5px; height: 5px; border-radius: 50%; background: rgba(255,255,255,0.15); }
.fam-bond i.on { background: #ff7a9a; }
.fam-detail { display: grid; gap: 8px; padding-top: 8px; border-top: 1px solid rgba(255,255,255,0.08); }

/* ---------- v1.69: calmer, readable Mujaffa panels ---------- */
.mj-card, .mj-deals, .mjs { background: #1c1e27; box-shadow: inset 0 3px 0 #ff7a9a, inset 0 0 0 1px rgba(255,255,255,0.07); color: #f1efe8; }
.mj-card > .mj-head > strong, .mjs-head b, .mj-deals-head b { color: #ff9fb5; }
.mj-card p, .mj-card li, .mj-deals p, .mjs p { color: #e9e6de; }
.mj-hint, .fam-note, .mjs-how, .mj-deals-head span, .mjs-head span { color: #b8b4aa !important; }
.mj-tile, .mj-newslist li, .mj-owned, .mj-deal, .mjs-pitch, .mjs-port { background: #262935; }
.mj-tile.game { background: #2c2b2a; }

/* the visit */
.fam-visit { background: #262935; box-shadow: inset 0 0 0 1px rgba(255,209,102,0.3); gap: 10px; padding: 12px; }
.fam-top { display: flex; justify-content: space-between; align-items: center; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #ffd166; }
.fam-steps { display: flex; gap: 4px; }
.fam-steps i { width: 18px; height: 4px; border-radius: 2px; background: rgba(255,255,255,0.15); }
.fam-steps i.done { background: rgba(255,209,102,0.5); }
.fam-steps i.on { background: #ffd166; }
.fam-hello strong { color: #ffd166; }
.fam-hello span { color: #ece9e1; }
.fam-hello em { color: #b8b4aa; }
.fam-chat { display: grid; gap: 8px; }
.fam-msg { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 8px; align-items: end; }
.fam-msg p { margin: 0; padding: 9px 12px; border-radius: 14px 14px 14px 4px; font-size: 14px; line-height: 1.45; background: #f4f1e6; color: #1b1d26; }
.fam-msg.muj p { background: #ffe1e8; color: #3a1420; }
.fam-msg.me { grid-template-columns: minmax(0, 1fr); justify-items: end; }
.fam-msg.me p { max-width: 85%; border-radius: 14px 14px 4px 14px; background: #4cc9f0; color: #0d1b2a; }
.fam-av { width: 30px; height: 30px; border-radius: 50%; display: block; }
.fam-case { display: grid; gap: 4px; padding: 10px 12px; border-radius: 8px; background: #1c1e27; }
.fam-kicker { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #ffd166; }
.fam-title { font: 400 17px var(--display); color: #fff; }
.fam-text { font-size: 14px; line-height: 1.5; color: #ece9e1; }
.fam-choice { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 10px; align-items: center; width: 100%; padding: 10px 12px; border: 0; border-radius: 8px; cursor: pointer; text-align: left; font: inherit; color: #f1efe8; background: #1c1e27; box-shadow: inset 0 0 0 1px rgba(255,209,102,0.35); }
.fam-choice:hover:not([disabled]) { background: #2f3240; }
.fam-choice[disabled] { opacity: 0.5; cursor: default; }
.fam-choice > span:last-child { display: grid; line-height: 1.3; }
.fam-choice b { font-size: 14px; }
.fam-choice em { font-style: normal; font-size: 12px; color: #b8b4aa; }
.fam-num { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: #ffd166; color: #16181f; font-weight: 800; font-size: 11px; letter-spacing: -0.02em; }
.fam-effect { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; background: rgba(255,255,255,0.06); }
.fam-effect span { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #b8b4aa; }
.fam-effect b { font-size: 15px; color: #fff; }
.fam-effect.good { background: rgba(123,211,137,0.14); box-shadow: inset 0 0 0 1px rgba(123,211,137,0.45); }
.fam-effect.good b { color: #9be7a8; }
.fam-pill { display: none; }

/* the network */
.fam-net { background: #262935; padding: 12px; }
.fam-net-head strong { font-size: 14px; color: #fff; }
.fam-net-head span { color: #b8b4aa; }
.fam-chip b { color: #ece9e1; font-size: 11px; }
.fam-detail { gap: 10px; }
.fam-ask-head { margin: 0; display: flex; justify-content: space-between; font-size: 13px; font-weight: 700; color: #fff; }
.fam-ask-head span { font-weight: 500; color: #b8b4aa; font-size: 12px; }

/* the billionaire tier: black and gold, with light running along the edge */
.tier-5 .stier { background: linear-gradient(90deg, #16181f, #3a2f12); color: #ffe08a; box-shadow: inset 0 0 0 1px #e8b923; }
.tier-5 .stier::before { content: '✦ '; }
.sitem.tier-5 { position: relative; overflow: hidden; background: linear-gradient(135deg, #1a1408, #0d0c0a 55%, #241b08); box-shadow: inset 0 0 0 1px rgba(232,185,35,0.7), 0 0 18px rgba(232,185,35,0.12); }
.sitem.tier-5::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(105deg, transparent 40%, rgba(255,240,190,0.16) 50%, transparent 60%); background-size: 250% 100%; animation: tier5shine 4.5s linear infinite; }
.sitem.tier-5 strong { color: #ffe08a; }
.sitem.tier-5 .price { color: #ffe08a; font-weight: 800; }
@keyframes tier5shine { from { background-position: 150% 0; } to { background-position: -100% 0; } }
@media (prefers-reduced-motion: reduce) { .sitem.tier-5::after { animation: none; } }

/* dream cars and billionaire merch in Kjøp */
.shop .item.dream { position: relative; overflow: hidden; background: linear-gradient(135deg, #1a1408, #0d0c0a 55%, #241b08); box-shadow: inset 0 0 0 1px rgba(232,185,35,0.7); }
.shop .item.dream::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(105deg, transparent 40%, rgba(255,240,190,0.14) 50%, transparent 60%); background-size: 250% 100%; animation: tier5shine 4.5s linear infinite; }
.shop .item.dream strong { color: #ffe08a; }
.dream-tag { display: inline-block; margin-bottom: 3px; background: linear-gradient(90deg, #16181f, #3a2f12); color: #ffe08a; box-shadow: inset 0 0 0 1px #e8b923; }
@media (prefers-reduced-motion: reduce) { .shop .item.dream::after { animation: none; } }

/* Kjøp: an icon on every gear and merch row */
.item.up.has-ic { grid-template-columns: 44px minmax(0, 1fr) auto; }
.shop-ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 22px; background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.12), rgba(255,255,255,0.03)); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08), inset 0 -3px 0 var(--c, transparent); }
.item.is-owned .shop-ic { box-shadow: inset 0 0 0 2px var(--good); }
.item.dream .shop-ic { background: radial-gradient(circle at 30% 30%, rgba(255,224,138,0.35), rgba(232,185,35,0.08)); box-shadow: inset 0 0 0 1px #e8b923; }

/* ---------- Mujaffa card: clear actions (minigame, invest in his startup) ---------- */
.mj-todo { font: 800 10.5px var(--body); letter-spacing: 0.05em; text-transform: uppercase; color: #16181f; background: #ffd166; border-radius: 99px; padding: 3px 9px; white-space: nowrap; }
.mj-acts { display: grid; gap: 8px; }
.mj-act { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 12px; border: 0; border-radius: 10px; text-align: left; font: inherit; color: var(--ink); background: #262935; box-shadow: inset 0 0 0 1px rgba(255,209,102,0.35); }
.mj-act.game { cursor: pointer; background: linear-gradient(135deg, rgba(255,209,102,0.2), #262935 70%); box-shadow: inset 0 0 0 2px rgba(255,209,102,0.7); }
.mj-act.game:hover { filter: brightness(1.12); }
.mj-act.game:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
.mj-act-body { display: grid; gap: 2px; min-width: 0; line-height: 1.3; }
.mj-act-body em { font-style: normal; font-size: 10.5px; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase; color: #ffd166; }
.mj-act-body b { font: 400 15px var(--display); }
.mj-act-body small { font-size: 12px; color: #b8b4aa; }
.mj-act-body .mj-in { color: var(--good); font-weight: 700; }
.mj-act-cta { font: 400 13px var(--display); color: #16181f; background: #ffd166; border-radius: 6px; padding: 9px 14px; white-space: nowrap; animation: mj-pulse 1.8s ease-in-out infinite; }
@keyframes mj-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(255,209,102,0.55); } 50% { box-shadow: 0 0 0 7px rgba(255,209,102,0); } }
@media (prefers-reduced-motion: reduce) { .mj-act-cta { animation: none; } }
.mj-act.startup { cursor: pointer; grid-template-columns: auto minmax(0, 1fr) auto; box-shadow: inset 0 0 0 1px rgba(255,122,154,0.45); background: linear-gradient(135deg, rgba(140,20,38,0.3), #262935 70%); }
.mj-act.startup.good { box-shadow: inset 0 0 0 1px rgba(123,211,137,0.6); }
.mj-act.startup.bad { box-shadow: inset 0 0 0 1px rgba(255,90,78,0.6); }
.mj-act.startup .mj-act-body em { color: #ff9db3; }
.mj-act-buy { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; }
.mj-act-note { grid-column: 1 / -1; font-size: 11.5px; color: #b8b4aa; line-height: 1.4; }
.mj-act.off { opacity: 0.7; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.12); grid-template-columns: auto minmax(0, 1fr); }
@media (max-width: 400px) { .mj-act.game { grid-template-columns: auto minmax(0, 1fr); } .mj-act.game .mj-act-cta { grid-column: 1 / -1; text-align: center; } }
.mj-act.startup:hover { filter: brightness(1.12); }
.mj-act.startup:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
.mj-act-cta.pink { background: #ff9db3; }
@media (max-width: 400px) { .mj-act.startup { grid-template-columns: auto minmax(0, 1fr); } .mj-act.startup .mj-act-cta { grid-column: 1 / -1; text-align: center; } }

/* ---------- «Venners venner»: the entry card in the garage and the view itself ---------- */
.fam-entry { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; width: 100%; padding: 12px; border: 0; border-radius: 10px; cursor: pointer; text-align: left; font: inherit; color: var(--ink); background: #262935; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.14); }
.fam-entry:hover { filter: brightness(1.12); }
.fam-entry:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
.fam-entry.alert { box-shadow: inset 0 0 0 2px #ff9db3; }
.fam-entry-faces { display: flex; }
.fam-entry-faces .fam-face.sm { margin-left: -10px; box-shadow: 0 0 0 2px #262935; }
.fam-entry-faces .fam-face.sm:first-child { margin-left: 0; }
.fam-entry-ic { font-size: 26px; width: 38px; text-align: center; }
.fam-entry-body { display: grid; gap: 2px; min-width: 0; line-height: 1.3; }
.fam-entry-body em { font-style: normal; font-size: 10.5px; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase; color: #ff9db3; }
.fam-entry-body b { font: 400 15px var(--display); }
.fam-entry-body small { font-size: 12px; color: #b8b4aa; }
.fam-entry.alert .fam-entry-body small { color: #ff9db3; font-weight: 700; }
.fam-entry-cta { font: 400 13px var(--display); color: #16181f; background: #ff9db3; border-radius: 6px; padding: 9px 12px; white-space: nowrap; }
@media (max-width: 400px) { .fam-entry { grid-template-columns: auto minmax(0, 1fr); } .fam-entry-cta { grid-column: 1 / -1; text-align: center; } }

.fv-top { display: flex; align-items: center; gap: 10px; }
.fv-back { flex: none; }
.fv-title { margin: 0; font: 400 20px var(--display); color: #ff9db3; }
.fv-sub { margin: 0; font-size: 12px; color: #b8b4aa; }
.fv-how { margin: 0; font-size: 12px; color: #b8b4aa; }
.fv-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.fv-row { border-radius: 10px; background: #262935; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.1); overflow: hidden; }
.fv-row.open { box-shadow: inset 0 0 0 1px #ff9db3; }
.fv-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; width: 100%; padding: 10px 12px; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.fv-head:focus-visible { outline: 2px solid var(--amber); outline-offset: -2px; }
.fv-who { display: grid; gap: 1px; min-width: 0; line-height: 1.3; }
.fv-who strong { font: 400 16px var(--display); }
.fv-who span { font-size: 12px; color: #ece9e1; }
.fv-who em { font-style: normal; font-size: 12px; color: #b8b4aa; }
.fv-state { display: grid; justify-items: end; }
.fv-lock { font-style: normal; font-size: 11px; font-weight: 700; color: #b8b4aa; background: rgba(255,255,255,0.08); border-radius: 99px; padding: 3px 9px; white-space: nowrap; }
.fv-row.locked .fam-face { filter: grayscale(1) brightness(0.6); }
.fv-row.locked .fv-who strong { color: #b8b4aa; }
.fv-detail { display: grid; gap: 10px; padding: 4px 12px 12px; }
.fv-facts { display: grid; gap: 6px; margin: 0; }
.fv-facts > div { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 8px; align-items: baseline; font-size: 13px; }
.fv-facts dt { font-size: 10.5px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: #ff9db3; }
.fv-facts dd { margin: 0; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.fam-bond i { width: 7px; height: 7px; }
