/* ═══════════════════════════════════════════════════════════════
   Kippi Kombo — spill-CSS
   Tokens (--bg, --primary, --text-1 …) fra /shared/kippi.css.
   ═══════════════════════════════════════════════════════════════ */

#app {
  max-width: 480px;
  margin: 0 auto;
  padding: 0 16px env(safe-area-inset-bottom);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* ── Header ───────────────────────────────────────────────────── */
.game-header { display: flex; align-items: center; gap: 10px; padding: 14px 2px; }
.game-header .logo { flex: 1; font-size: 1.15rem; margin: 0; }
.game-header .game-name { font-weight: 600; }
.icon-link {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 9px; color: var(--text-1);
  text-decoration: none; border: 1px solid var(--border-2); flex-shrink: 0;
}
.header-btns { display: flex; gap: 6px; }
.icon-btn {
  width: 36px; height: 36px; border-radius: 9px; border: 1px solid var(--border-2);
  background: var(--surface-1); color: var(--text-1); font-size: 1rem; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.icon-btn:hover { background: var(--surface-2); }

/* ── Generelt ─────────────────────────────────────────────────── */
.hidden { display: none !important; }
.muted  { color: var(--text-2); }
.screen { animation: fade .28s var(--ease); }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.section-title { font-family: var(--font-display); font-size: 1.35rem; margin: 8px 0 2px; text-align: center; }
.section-sub { text-align: center; margin: 0 0 18px; font-size: .9rem; }

/* ── Startskjerm ──────────────────────────────────────────────── */
.start-card {
  background: var(--surface-1); border: 1px solid var(--border-2);
  border-radius: var(--r-xl); padding: 30px 24px; text-align: center;
  max-width: 400px; margin: 24px auto 0; box-shadow: var(--shadow-lg);
}
.start-emblem { font-size: 3rem; line-height: 1; margin-bottom: 10px; }
.start-title { font-family: var(--font-display); font-size: 1.7rem; margin: 0 0 8px;
  background: var(--grad-brand, linear-gradient(135deg,#a78bfa,#f472b6));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.start-sub { color: var(--text-2); font-size: .95rem; line-height: 1.5; margin: 0 0 18px; }
.week-pill {
  display: inline-block; padding: 5px 14px; border-radius: var(--r-full);
  background: var(--primary-dim); color: var(--primary-light);
  font-weight: 600; font-size: .85rem; margin-bottom: 18px;
}
.start-best { margin: 14px 0 0; font-size: .85rem; }

/* ── Heltevalg ────────────────────────────────────────────────── */
.hero-list { display: flex; flex-direction: column; gap: 12px; max-width: 420px; margin: 0 auto; }
.hero-card {
  display: flex; align-items: center; gap: 14px; text-align: left; width: 100%;
  background: var(--surface-1); border: 1px solid var(--border-2);
  border-radius: var(--r-lg); padding: 16px; cursor: pointer; color: var(--text-1);
  transition: transform var(--t-fast) var(--ease), border-color var(--t-fast);
  -webkit-tap-highlight-color: transparent;
}
.hero-card:hover { transform: translateY(-2px); border-color: var(--primary); }
.hero-emoji { font-size: 2rem; flex-shrink: 0; width: 44px; text-align: center; }
.hero-ico { flex-shrink: 0; width: 44px; }
.hero-ico svg { width: 34px; height: 34px; }
.hero-name { font-weight: 700; font-size: 1.05rem; margin-bottom: 2px; }
.hero-desc { color: var(--text-2); font-size: .88rem; line-height: 1.4; }

/* ── Blind-topp ───────────────────────────────────────────────── */
.blind-bar {
  display: flex; align-items: center; gap: 14px;
  background: var(--surface-1); border: 1px solid var(--border-2);
  border-radius: var(--r-lg); padding: 12px 14px; margin-top: 4px;
}
.blind-info { display: flex; flex-direction: column; gap: 2px; flex-shrink: 0; }
.blind-name { font-weight: 700; font-size: .95rem; }
.blind-target { font-size: .78rem; color: var(--text-2); }
.blind-target b { color: var(--gold); }
.score-track { flex: 1; display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.score-now { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; line-height: 1; color: var(--text-1); }
.score-bar {
  width: 100%; height: 8px; border-radius: var(--r-full);
  background: var(--surface-3); overflow: hidden; position: relative;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.04);
}
.score-fill {
  height: 100%; width: 0; border-radius: inherit; position: relative;
  background: var(--grad-brand, linear-gradient(90deg,#a78bfa,#f472b6));
  transition: width var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease);
  box-shadow: 0 0 8px rgba(167,139,250,.65), 0 0 16px rgba(244,114,182,.35);
}
/* Levende «lys» som glir over den fylte delen */
.score-fill::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,.55) 50%, transparent 100%);
  transform: translateX(-120%);
  animation: barShimmer 2.4s ease-in-out infinite;
}
/* Nær målet → sterkere glød; i mål → puls */
.score-fill--near { box-shadow: 0 0 12px rgba(167,139,250,.9), 0 0 22px rgba(244,114,182,.55); }
.score-fill--full { animation: barFull 1s var(--ease) infinite; }
@keyframes barShimmer { 0% { transform: translateX(-120%); } 55%, 100% { transform: translateX(120%); } }
@keyframes barFull {
  0%, 100% { box-shadow: 0 0 12px rgba(251,191,36,.7), 0 0 22px rgba(52,211,153,.5); }
  50%      { box-shadow: 0 0 20px rgba(251,191,36,1), 0 0 34px rgba(52,211,153,.7); }
}

.boss-rule {
  margin: 8px 0 0; text-align: center; font-size: .85rem; font-weight: 600;
  color: var(--gold); background: var(--gold-dim); border-radius: var(--r-md); padding: 7px 10px;
}

/* ── Statuslinje ──────────────────────────────────────────────── */
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 10px; }
.stat {
  background: var(--surface-1); border: 1px solid var(--border-2); border-radius: var(--r-md);
  padding: 8px 4px; text-align: center;
}
.stat-lbl { display: block; font-size: .68rem; color: var(--text-2); text-transform: uppercase; letter-spacing: .04em; }
.stat-val { display: block; font-weight: 700; font-size: 1.05rem; margin-top: 2px; }
.stat--cash .stat-val { color: var(--gold); }

/* ── Joker-hylle ──────────────────────────────────────────────── */
.joker-shelf { display: flex; gap: 8px; margin-top: 12px; justify-content: center; flex-wrap: wrap; }
.joker {
  width: 52px; height: 66px; border-radius: var(--r-md); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, var(--surface-3), var(--surface-2));
  border: 1px solid var(--primary); box-shadow: 0 0 0 1px var(--primary-dim), var(--shadow-sm);
  -webkit-tap-highlight-color: transparent;
}
.joker-emoji { font-size: 1.7rem; }

/* ── Joker-ikoner (egne SVG-glyfer, fargekodet etter effekt) ──── */
.j-ico { display: inline-flex; align-items: center; justify-content: center; }
.j-ico svg { width: 30px; height: 30px; display: block; }
.j-ico--mult  { color: var(--red); }
.j-ico--chips { color: var(--cyan); }
.j-ico--econ  { color: var(--gold); }
.j-ico--hero  { color: var(--primary-light); }
.joker .j-ico svg { width: 32px; height: 32px; }
.shop-ico { flex-shrink: 0; width: 44px; }
.shop-ico svg { width: 36px; height: 36px; }
.owned-ico { flex-shrink: 0; }
.owned-ico svg { width: 24px; height: 24px; }
.jp-ico { flex-shrink: 0; }
.jp-ico svg { width: 28px; height: 28px; }
.joker {
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast), border-color var(--t-fast);
}
.joker--empty {
  background: transparent; border: 1px dashed var(--border-2); box-shadow: none;
  color: var(--text-3); font-size: 1.3rem; cursor: default;
}
/* Lyser gult når kortvalget ditt matcher jokeren */
.joker--active {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px var(--gold-dim), 0 0 16px rgba(251,191,36,.4);
  transform: translateY(-3px);
}
/* Kraftig puls når jokeren «fyrer» idet du spiller hånden */
.joker--fire { animation: jokerFire .55s var(--ease); }
@keyframes jokerFire {
  0%, 100% { transform: translateY(0) scale(1); }
  35%      { transform: translateY(-8px) scale(1.16); box-shadow: 0 0 22px var(--gold), 0 0 0 3px var(--gold); }
}

/* ── Hånd-preview ─────────────────────────────────────────────── */
.hand-preview {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-top: 14px; padding: 10px 16px; border-radius: var(--r-lg);
  background: var(--surface-2); border: 1px solid var(--border-2);
}
.hp-name { font-weight: 700; font-size: .95rem; color: var(--primary-light); }
.hp-name.hp-flash { color: var(--gold); }
.hp-math { display: flex; align-items: center; gap: 8px; font-family: var(--font-display); }
.hp-stat { display: flex; flex-direction: column; align-items: center; line-height: 1; }
.hp-stat b { font-size: 1.25rem; }
.hp-stat small { font-size: .55rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--text-2); margin-top: 2px; }
.hp-stat #hp-chips { color: var(--cyan); }
.hp-stat #hp-mult  { color: var(--red); }
.hp-x { color: var(--text-2); font-size: 1.1rem; }

/* ── Kort på hånd (enkeltrads vifte — bryter aldri til to rader) ─ */
.hand {
  display: flex; flex-wrap: nowrap; justify-content: center;
  margin-top: 14px; min-height: 98px; padding-top: 14px;
}
.card {
  position: relative; width: 54px; height: 78px; border-radius: 9px; flex-shrink: 0;
  background: #f7f9fc; color: #10233d; border: none; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  box-shadow: var(--shadow-sm); transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast), margin var(--t-base) var(--ease);
  -webkit-tap-highlight-color: transparent; padding: 0;
  margin-left: 6px;
}
.card:first-child { margin-left: 0; }
/* Full hånd (8–9 kort): la kortene overlappe som en vifte */
.hand--dense .card { margin-left: -12px; }
.hand--dense .card:first-child { margin-left: 0; }

/* Hjørne-indeks — alltid synlig, også når kortet er delvis dekket */
.card-corner {
  position: absolute; top: 4px; left: 5px; line-height: 1;
  display: flex; flex-direction: column; align-items: center;
  font-family: var(--font-display); font-size: .62rem; font-weight: 800;
}
.card-corner i { font-style: normal; font-size: .56rem; margin-top: 1px; }

.card-rank { font-family: var(--font-display); font-size: 1.35rem; font-weight: 700; line-height: 1; }
.card-suit { font-size: 1.15rem; line-height: 1; margin-top: 1px; }
.card--red { color: #d1345b; }
.card--sel {
  transform: translateY(-14px);
  box-shadow: 0 0 0 3px var(--primary), 0 10px 22px rgba(108,95,255,.4);
  z-index: 4;
}
.card:hover { transform: translateY(-6px); z-index: 5; }
.card--sel:hover { transform: translateY(-16px); }

/* Nye kort: sklir inn ovenfra med et gyllent blink → lett å se hva som er nytt */
.card--new { animation: cardIn .34s var(--ease) both, cardNewGlow 1.15s ease .1s 1; }
@keyframes cardIn {
  0%   { opacity: 0; transform: translateY(-26px) scale(.82) rotate(-4deg); }
  60%  { opacity: 1; }
  100% { opacity: 1; transform: none; }
}
@keyframes cardNewGlow {
  0%, 100% { box-shadow: var(--shadow-sm); }
  35%      { box-shadow: 0 0 0 3px var(--gold), 0 8px 20px rgba(251,191,36,.5); }
}
/* Kort som forkastes/spilles: faller ut */
.card--out { animation: cardOut .24s ease forwards; pointer-events: none; }
@keyframes cardOut {
  to { opacity: 0; transform: translateY(28px) scale(.65) rotate(6deg); }
}

/* ── Handlinger ───────────────────────────────────────────────── */
.play-actions { display: flex; gap: 10px; margin-top: 18px; margin-bottom: 20px; }
.play-actions .btn--ghost { flex: 0 0 40%; }
.play-actions .btn--primary { flex: 1; }

/* ── Butikk ───────────────────────────────────────────────────── */
.shop-hint {
  display: flex; align-items: flex-start; gap: 10px; max-width: 420px; margin: 0 auto 16px;
  padding: 11px 12px; border-radius: var(--r-md);
  background: var(--primary-dim); border: 1px solid var(--primary);
  font-size: .82rem; line-height: 1.4; color: var(--text-1);
}
.shop-hint b { color: var(--primary-light); }
.shop-hint__x {
  flex-shrink: 0; width: 22px; height: 22px; border-radius: 6px;
  background: transparent; color: var(--text-2); font-size: 1.1rem; line-height: 1; cursor: pointer;
}
.shop-hint__x:hover { color: var(--text-1); background: rgba(255,255,255,.06); }

.shop-cash { text-align: center; font-size: 1rem; margin-bottom: 16px; }
.shop-cash b { color: var(--gold); font-family: var(--font-display); }
.shop-list { display: flex; flex-direction: column; gap: 12px; max-width: 420px; margin: 0 auto 18px; }
.shop-item {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface-1); border: 1px solid var(--border-2);
  border-radius: var(--r-lg); padding: 14px;
}
.shop-emoji { font-size: 1.9rem; flex-shrink: 0; width: 40px; text-align: center; }
.shop-body { flex: 1; }
.shop-name { font-weight: 700; margin-bottom: 2px; }
.shop-desc { color: var(--text-2); font-size: .84rem; line-height: 1.35; }
.shop-buy { flex-shrink: 0; }
.shop-actions { display: flex; gap: 10px; max-width: 420px; margin: 0 auto; }
.shop-actions .btn--ghost { flex: 0 0 42%; }
.shop-actions .btn--primary { flex: 1; }

/* ── Fløytende poeng ──────────────────────────────────────────── */
#float-layer { position: fixed; inset: 0; pointer-events: none; z-index: 400; }
.float-score {
  position: absolute; left: 50%; top: 44%; transform: translateX(-50%);
  font-family: var(--font-display); font-size: 2.2rem; font-weight: 800;
  color: var(--gold); text-shadow: 0 2px 10px rgba(0,0,0,.6);
  animation: floatUp .9s var(--ease) forwards;
}
@keyframes floatUp {
  0%   { opacity: 0; transform: translate(-50%, 10px) scale(.8); }
  25%  { opacity: 1; transform: translate(-50%, -10px) scale(1.1); }
  100% { opacity: 0; transform: translate(-50%, -80px) scale(1); }
}

/* ── Modal ────────────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 500; background: rgba(3, 8, 16, 0.74);
  backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal-card {
  background: var(--surface-1); border: 1px solid var(--border-2); border-radius: 16px;
  padding: 24px 22px; max-width: 380px; width: 100%; box-shadow: 0 20px 60px rgba(0,0,0,.55);
}
.modal-card h2 { margin: 0 0 16px; font-size: 1.25rem; text-align: center; }
.rules-list { display: flex; flex-direction: column; gap: 13px; margin-bottom: 18px; }
.rules-item { display: flex; gap: 12px; align-items: flex-start; font-size: .9rem; line-height: 1.4; color: var(--text-1); }
.rules-icon { font-size: 1.2rem; flex-shrink: 0; width: 24px; text-align: center; }

/* Ordforklaring i regel-modalen */
.rules-gloss {
  border-top: 1px solid var(--border-2); padding-top: 14px; margin-bottom: 20px;
  display: flex; flex-direction: column; gap: 8px;
}
.gloss-title {
  font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--text-2); margin-bottom: 2px;
}
.gloss-item { font-size: .82rem; line-height: 1.4; color: var(--text-2); }
.gloss-item b { color: var(--text-1); }

/* ── Pokerhender-referanse ────────────────────────────────────── */
.modal-card--wide { max-width: 440px; }
.hands-intro { font-size: .8rem; text-align: center; margin: -8px 0 14px; }
.hands-list {
  display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px;
  max-height: 58vh; overflow-y: auto;
}
.hand-ref {
  display: flex; flex-direction: column; gap: 8px;
  padding: 10px 12px; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: var(--r-md);
}
.hr-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.hr-name { font-weight: 700; font-size: .9rem; }
.hr-note { font-size: .72rem; color: var(--text-2); margin-top: 1px; }
.hr-score { display: flex; align-items: center; gap: 5px; font-family: var(--font-display); font-weight: 700; flex-shrink: 0; }
.hr-chips { background: var(--cyan-dim); color: var(--cyan); padding: 3px 9px; border-radius: var(--r-sm); min-width: 34px; text-align: center; }
.hr-mult  { background: var(--red-dim);  color: var(--red);  padding: 3px 9px; border-radius: var(--r-sm); min-width: 24px; text-align: center; }
.hr-x { color: var(--text-2); }

/* Eksempelkort */
.hr-cards { display: flex; gap: 4px; flex-wrap: wrap; }
.mini-card {
  width: 23px; height: 31px; border-radius: 4px; background: #f7f9fc; color: #10233d;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  line-height: 1; box-shadow: var(--shadow-sm); flex-shrink: 0;
}
.mini-card--red { color: #d1345b; }
.mc-rank { font-family: var(--font-display); font-size: .64rem; font-weight: 700; }
.mc-suit { font-size: .6rem; margin-top: 1px; }

/* ── Ukens ledertavle ─────────────────────────────────────────── */
.board-week { text-align: center; font-size: .82rem; margin: -8px 0 8px; }
.board-summary {
  text-align: center; font-size: .82rem; color: var(--text-2);
  margin: 0 0 14px; padding: 7px 10px; border-radius: var(--r-md);
  background: var(--surface-2); border: 1px solid var(--border);
}
.board-summary b { color: var(--primary-light); }
.br-you {
  font-size: .62rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  color: var(--primary-light); background: var(--primary-dim);
  padding: 1px 6px; border-radius: var(--r-full); margin-left: 6px; vertical-align: middle;
}
.board-body { min-height: 80px; margin-bottom: 4px; }
.board-msg { text-align: center; padding: 24px 8px; font-size: .9rem; }
.board-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; max-height: 52vh; overflow-y: auto; }
.board-row {
  display: grid; grid-template-columns: 34px 1fr auto auto; align-items: center; gap: 8px;
  padding: 8px 10px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-md);
}
.br-rank { font-weight: 700; font-size: .85rem; text-align: center; }
.br-name { font-weight: 600; font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.br-niva { font-size: .72rem; color: var(--text-2); }
.br-score { font-family: var(--font-display); font-weight: 700; font-size: .95rem; color: var(--gold); }
.board-row--1 { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold-dim); }
.board-row--2 { border-color: var(--ink-300, #7b8cae); }
.board-row--3 { border-color: var(--warning-500, #f59e0b); }
.board-row--me { background: var(--primary-dim); border-color: var(--primary); }
.board-you { margin-top: 10px; }
.board-you__label { font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text-2); text-align: center; margin: 0 0 6px; }
.board-login {
  display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center;
  margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border-2);
  font-size: .82rem; color: var(--text-2);
}

/* Resultatskjerm: ledertavle-status */
.result-board { margin: 12px 0 2px; display: flex; flex-direction: column; align-items: center; gap: 8px; min-height: 20px; }
.rb-note { font-size: .84rem; color: var(--text-2); }
.rb-ok { color: var(--gold); font-weight: 700; }
.rb-warn { color: var(--warning-400, #fbbf24); }

/* ── Verktøyrad (hender-referanse + sortering) ────────────────── */
.hand-tools { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; }
.sort-btn {
  padding: 6px 13px; border-radius: var(--r-full);
  background: var(--surface-2); border: 1px solid var(--border-2);
  color: var(--text-2); font-size: .78rem; font-weight: 600; cursor: pointer;
  transition: all var(--t-fast) var(--ease); -webkit-tap-highlight-color: transparent;
}
.sort-btn:hover { color: var(--text-1); border-color: var(--primary); background: var(--primary-dim); }
.sort-btn:active { transform: scale(.96); }
.deck-count { font-size: .72rem; font-weight: 600; color: var(--text-2); white-space: nowrap; }

/* ── Joker-popover (trykk-for-detalj) ─────────────────────────── */
.joker-pop {
  position: fixed; z-index: 530; box-sizing: border-box;
  background: var(--surface-1); border: 1px solid var(--primary);
  border-radius: var(--r-md); padding: 10px 12px;
  box-shadow: var(--shadow-lg), 0 0 0 1px var(--primary-dim);
  display: flex; flex-direction: column; gap: 9px;
  animation: jpIn .15s var(--ease);
}
@keyframes jpIn { 0% { opacity: 0; transform: translateY(4px) scale(.96); } 100% { opacity: 1; transform: none; } }
.jp-top { display: flex; gap: 10px; align-items: flex-start; }
.jp-emoji { font-size: 1.5rem; flex-shrink: 0; line-height: 1; }
.jp-name { font-weight: 700; font-size: .86rem; margin-bottom: 2px; }
.jp-desc { font-size: .8rem; color: var(--text-2); line-height: 1.35; }
/* Omorganisering av jokere */
.jp-move {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  border-top: 1px solid var(--border-2); padding-top: 8px;
}
.jp-btn {
  width: 40px; height: 30px; border-radius: 8px; flex-shrink: 0;
  background: var(--surface-2); border: 1px solid var(--border-2);
  color: var(--text-1); font-size: .9rem; cursor: pointer;
  transition: all var(--t-fast) var(--ease);
}
.jp-btn:not(:disabled):hover { border-color: var(--primary); background: var(--primary-dim); }
.jp-btn:not(:disabled):active { transform: scale(.94); }
.jp-btn:disabled { opacity: .3; cursor: default; }
.jp-pos { font-size: .72rem; color: var(--text-2); white-space: nowrap; }

/* ── Blind-framdrift (pips) ───────────────────────────────────── */
.blind-steps { display: inline-flex; gap: 5px; align-items: center; margin: 3px 0; }
.pip {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--surface-3); border: 1px solid var(--border-2);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 7px; line-height: 1; color: transparent;
}
.pip--boss { border-radius: 3px; }
.pip--done { background: var(--primary); border-color: var(--primary); }
.pip--now  { background: var(--gold); border-color: var(--gold); box-shadow: 0 0 8px var(--gold-dim); color: #3a2c05; }

/* ── Stor poeng-boble ─────────────────────────────────────────── */
.score-pop {
  position: absolute; left: 50%; top: 40%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-family: var(--font-display); text-align: center;
  animation: floatUp 1.1s var(--ease) forwards;
}
.score-pop__math { font-size: 1.05rem; font-weight: 700; color: var(--text-1); text-shadow: 0 2px 8px rgba(0,0,0,.6); }
.score-pop__math i { color: var(--text-2); font-style: normal; margin: 0 2px; }
.score-pop__total { font-size: 2.4rem; font-weight: 800; color: var(--gold); text-shadow: 0 3px 12px rgba(0,0,0,.65); }

/* ── Animert poengopptelling ──────────────────────────────────── */
/* Preview-linja «heves» mens hånden telles opp */
.hand-preview--scoring {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold-dim), 0 0 22px rgba(251,191,36,.28);
  transform: scale(1.03);
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast);
}
.hand-preview--scoring .hp-name { color: var(--gold); }
/* Kort som scorer akkurat nå */
.card--scoring {
  transform: translateY(-16px) scale(1.06) !important;
  box-shadow: 0 0 0 3px var(--gold), 0 12px 26px rgba(251,191,36,.5) !important;
  z-index: 6;
}
/* Tall som «bumper» når de øker */
.bump { animation: numBump .26s var(--ease); }
@keyframes numBump {
  0% { transform: scale(1); } 40% { transform: scale(1.35); } 100% { transform: scale(1); }
}
.hp-stat b { display: inline-block; }   /* så scale ikke påvirker layout */

/* Fløytende chip/faktor-tall fra kort og jokere */
.chip-fly {
  position: fixed; transform: translate(-50%, 0); pointer-events: none; z-index: 410;
  font-family: var(--font-display); font-weight: 800; font-size: 1.15rem;
  text-shadow: 0 2px 8px rgba(0,0,0,.6);
  animation: chipFly .72s var(--ease) forwards;
}
.chip-fly--chips { color: var(--cyan); }
.chip-fly--mult  { color: var(--red); }
@keyframes chipFly {
  0%   { opacity: 0; transform: translate(-50%, 4px) scale(.7); }
  25%  { opacity: 1; transform: translate(-50%, -14px) scale(1.1); }
  100% { opacity: 0; transform: translate(-50%, -46px) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .card--new, .card--out, .chip-fly, .bump, .score-pop, .float-score,
  .clear-card, .clear-emoji, .joker-pop,
  .score-fill::after, .score-fill--full { animation: none !important; }
  .hand-preview--scoring { transform: none; }
}

/* ── Feiring (blind slått / nivå klart) ───────────────────────── */
.clear-overlay {
  position: fixed; inset: 0; z-index: 520; background: rgba(3, 8, 16, 0.82);
  backdrop-filter: blur(6px); display: flex; align-items: center; justify-content: center;
  padding: 20px; animation: fade .3s var(--ease);
}
.clear-card {
  background: var(--surface-1); border: 1px solid var(--border-2); border-radius: var(--r-xl);
  padding: 32px 26px; text-align: center; max-width: 360px; width: 100%;
  box-shadow: var(--shadow-lg); animation: clearPop .42s var(--ease);
}
@keyframes clearPop { 0% { transform: scale(.82); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
.clear-emoji { font-size: 3.4rem; line-height: 1; animation: clearBounce .7s var(--ease); }
@keyframes clearBounce {
  0% { transform: scale(0) rotate(-20deg); } 55% { transform: scale(1.25) rotate(8deg); } 100% { transform: scale(1) rotate(0); }
}
.clear-title {
  font-family: var(--font-display); font-size: 1.55rem; margin: 8px 0 4px;
  background: var(--grad-brand, linear-gradient(135deg,#a78bfa,#f472b6));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.clear-score { font-family: var(--font-display); font-size: 2.1rem; font-weight: 800; color: var(--gold); margin: 6px 0; }
.clear-score .cs-of { font-size: .95rem; color: var(--text-2); font-weight: 600; }
.clear-reward { font-size: .82rem; color: var(--text-2); line-height: 1.5; margin: 8px 0 20px; }
.clear-reward b { color: var(--text-1); }
.clear-reward .cs-tot { color: var(--gold); }

/* ── Butikk: dine jokere + selg ───────────────────────────────── */
.shop-owned { max-width: 420px; margin: 20px auto 0; }
.owned-title {
  font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  color: var(--text-2); text-align: center; margin-bottom: 10px;
}
.owned-list { display: flex; flex-direction: column; gap: 8px; }
.owned-chip {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-md);
  padding: 7px 10px;
}
.owned-emoji { font-size: 1.3rem; flex-shrink: 0; }
.owned-name { flex: 1; font-size: .85rem; font-weight: 600; }
.owned-sell { flex-shrink: 0; }

/* ── Små skjermer ─────────────────────────────────────────────── */
@media (max-width: 360px) {
  .card { width: 46px; height: 68px; }
  .card-rank { font-size: 1.15rem; }
  .joker { width: 46px; height: 60px; }
}
