/* ============================================================
   UNTIL IT BREAKS — components
   ============================================================ */

/* ================= Type helpers ================= */
.type-surge  { --tc: var(--surge);  --tg: var(--surge-glow); }
.type-luck   { --tc: var(--luck);   --tg: var(--luck-glow); }
.type-crypto { --tc: var(--crypto); --tg: var(--crypto-glow); }
.t-surge  { color: var(--surge); }
.t-luck   { color: var(--luck); }
.t-crypto { color: var(--crypto); }

.type-badge {
  display: inline-flex; align-items: center; gap: 3px;
  font-family: var(--mono); font-size: 9px; font-weight: 700; letter-spacing: 0.08em;
  border-radius: 8px; padding: 1px 6px;
  color: var(--tc); border: 1px solid var(--tc); background: color-mix(in srgb, var(--tc) 12%, transparent);
}

/* ================= Poker cards ================= */
.tcard {
  position: relative; width: 68px; height: 96px; margin: 0 -6px;
  background: linear-gradient(165deg, #131c2e, #0c1220);
  border: 1px solid var(--line-bright); border-radius: 8px;
  display: flex; flex-direction: column; padding: 6px 7px;
  user-select: none; cursor: pointer;
  transition: transform 0.16s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.2s, border-color 0.2s, filter 0.2s;
  flex-shrink: 0;
}
.tcard:hover { transform: translateY(-9px); z-index: 5; box-shadow: 0 10px 24px rgba(0,0,0,0.5); }
.tcard.selected { transform: translateY(-16px); border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), 0 0 18px rgba(255,215,94,0.35); z-index: 6; }
.tcard.selected:hover { transform: translateY(-20px); }

.tcard .tc-rank { font-family: var(--mono); font-size: 18px; font-weight: 700; line-height: 1; }
.tcard .tc-suit { font-size: 12px; line-height: 1.25; }
.tcard .tc-pts { margin-top: auto; font-family: var(--mono); font-size: 9px; color: var(--faint); text-align: right; }
.tcard .tc-pts b { color: var(--dim); font-size: 11px; }
.tcard .tc-big { position: absolute; right: 6px; top: 30px; font-size: 24px; opacity: 0.28; }
.tcard.hearts .tc-rank, .tcard.hearts .tc-suit, .tcard.hearts .tc-big { color: var(--hearts); }
.tcard.diamonds .tc-rank, .tcard.diamonds .tc-suit, .tcard.diamonds .tc-big { color: var(--diamonds); }
.tcard.clubs .tc-rank, .tcard.clubs .tc-suit, .tcard.clubs .tc-big { color: var(--clubs); }
.tcard.spades .tc-rank, .tcard.spades .tc-suit, .tcard.spades .tc-big { color: var(--spades); }

/* scoring / ignored marks */
.tcard.scoring::after { content: "●"; position: absolute; bottom: 3px; left: 6px; font-size: 8px; color: var(--gold); text-shadow: 0 0 6px var(--gold); }
.tcard.ignored { filter: saturate(0.16) brightness(0.6); }
.tcard.ignored::after { content: "IGNORED"; position: absolute; bottom: 5px; left: 50%; transform: translateX(-50%); font-family: var(--mono); font-size: 6.5px; letter-spacing: 0.06em; color: var(--dim); background: rgba(0,0,0,0.65); padding: 1px 4px; border-radius: 4px; }
.tcard.played-hold { z-index: 12; transform: translateY(-18px); box-shadow: 0 0 0 1px var(--gold), 0 0 22px rgba(255,215,94,0.34); }
.tcard.score-tick, .type-card.score-tick { animation: scoreTick 0.34s cubic-bezier(0.22,1,0.36,1); z-index: 18; }
.tcard.hand-bonus-tick { animation: scoreTick 0.34s cubic-bezier(0.22,1,0.36,1); }
.tcard.barrier-uploading {
  animation: barrierUploadCardFx 0.56s ease-out;
  border-color: var(--hearts);
  z-index: 18;
}

.tcard.barrier-hint { border-color: rgba(255,93,122,0.55); }
.tcard.barrier-dmg::before {
  content: "Barrier DMG!";
  position: absolute; left: 50%; top: -26px; transform: translateX(-50%);
  z-index: 24;
  font-family: var(--mono); font-size: 9px; font-weight: 950; letter-spacing: 0.04em;
  color: #fff; background: var(--red);
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 999px; padding: 4px 8px;
  box-shadow: 0 0 18px rgba(255,77,94,0.75), 0 3px 10px rgba(0,0,0,0.55);
  animation: typeFloatWiggle 0.85s ease-in-out infinite;
  pointer-events: none; white-space: nowrap;
}
.tcard.napkin { background: repeating-linear-gradient(135deg, #1c1a14, #1c1a14 6px, #171511 6px, #171511 12px); border-color: #4d4430; }
.tcard.napkin .tc-rank { font-size: 9px; color: var(--orange); }
.tcard.napkin .tc-suit { color: #7a6c48; font-size: 9px; }
.tcard.napkin .tc-big { color: var(--orange); opacity: 0.4; }
.tcard.watched { border-color: rgba(63,217,255,0.35); }

/* ================= Trojan Type Cards ================= */
.type-card {
  position: relative;
  width: 68px;
  height: 96px;
  margin: 0 -4px;
  border: 2px solid var(--tc);
  border-radius: 8px;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--tc) 22%, transparent), transparent 55%),
    rgba(7, 11, 18, 0.94);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tc) 30%, transparent), 0 0 16px color-mix(in srgb, var(--tc) 22%, transparent);
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 24px 1fr 18px 16px;
  gap: 2px;
  padding: 6px;
  cursor: pointer;
  user-select: none;
  flex-shrink: 0;
  transition: transform 0.16s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.2s, filter 0.2s;
}
.type-card:hover { transform: translateY(-9px); box-shadow: 0 10px 24px rgba(0,0,0,0.45), 0 0 18px var(--tg); z-index: 5; }
.type-card.selected { transform: translateY(-16px); border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), 0 0 22px rgba(255,215,94,0.35), 0 0 20px var(--tg); z-index: 8; }
.type-card.selected:hover { transform: translateY(-20px); }
.type-card.played-hold { transform: translateY(-18px); z-index: 14; }
.type-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  min-width: 0;
}
.type-card-size {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 25px; height: 22px;
  font-family: var(--mono); font-size: 17px; font-weight: 950;
  color: #071018;
  background: var(--tc);
  border-radius: 6px;
  text-shadow: none;
}
.type-card-name { font-family: var(--mono); font-size: 10px; font-weight: 950; color: var(--tc); letter-spacing: 0.04em; align-self: center; text-align: center; overflow: hidden; text-overflow: ellipsis; }
.type-card-points { font-family: var(--mono); font-size: 13px; font-weight: 950; color: #fff; text-shadow: 0 0 8px var(--tg); }
.type-card-direct {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 950;
  color: #fff;
  align-self: end;
  text-align: right;
  text-shadow: 0 0 8px var(--tg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.type-card-effect { font-size: 7px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; align-self: end; text-align: center; }
.type-card-float {
  position: absolute;
  left: 50%;
  top: -34px;
  transform: translateX(-50%);
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  pointer-events: none;
  animation: typeFloatWiggle 1.45s ease-in-out infinite;
}
#type-cards .type-card:nth-child(2n) .type-card-float { top: -46px; }
#type-cards .type-card:nth-child(3n) .type-card-float { top: -38px; }
.type-float-badge {
  white-space: nowrap;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.04em;
  padding: 4px 8px;
  border-radius: 999px;
  color: #071018;
  background: #fff;
  box-shadow: 0 0 10px rgba(255,255,255,0.34), 0 2px 8px rgba(0,0,0,0.55);
}
.type-float-badge.mult { color: #140b02; background: var(--gold); box-shadow: 0 0 14px rgba(255,215,94,0.55); }
.type-float-badge.effect { color: #031018; background: var(--tc); box-shadow: 0 0 12px var(--tg); }
.type-card-slot {
  width: 68px;
  height: 96px;
  margin: 0 -4px;
  border: 1px dashed rgba(255,255,255,0.14);
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 800;
  color: var(--faint);
  background: rgba(4, 7, 12, 0.45);
  flex-shrink: 0;
}

@media (max-height: 760px) {
  .tcard { width: 62px; height: 88px; margin: 0 -7px; padding: 5px 6px; }
  .tcard .tc-rank { font-size: 16px; }
  .tcard .tc-big { top: 28px; font-size: 21px; }
  .type-card, .type-card-slot { width: 62px; height: 88px; margin: 0 -5px; }
  .type-card {
    grid-template-columns: 1fr;
    grid-template-rows: 22px 1fr 15px 14px;
    padding: 5px;
  }
  .type-card-size { min-width: 23px; height: 20px; font-size: 15px; border-radius: 5px; }
  .type-card-name { font-size: 9px; }
  .type-card-points { font-size: 11px; }
  .type-card-direct { font-size: 9px; }
  .type-card-effect { font-size: 6.5px; }
  .type-card-float { top: -30px; gap: 2px; }
  #type-cards .type-card:nth-child(2n) .type-card-float { top: -40px; }
  #type-cards .type-card:nth-child(3n) .type-card-float { top: -35px; }
  .type-float-badge { font-size: 10px; padding: 3px 7px; }
  #center .crew-slot { height: 124px; }
  #center .slot-ready-label { font-size: 12px; }
  #center .slot-actions { gap: 4px; }
  #center .slot-btn { font-size: 8px; padding: 4px 5px; }
  #center .slot-crew .sc-avatar { width: 42px; height: 42px; font-size: 16px; border-radius: 11px; }
  #center .slot-crew .sc-name { font-size: 11px; }
  #center .slot-crew .sc-charge { font-size: 10px; }
}

/* ================= Crew Slots (top of center, 5 across) ================= */
#crew-slots { display: flex; gap: 8px; }
.crew-slot {
  flex: 1; min-width: 0; height: 150px;
  border: 1px dashed var(--line-bright); border-radius: 10px;
  position: relative; overflow: visible;
  background: #070b12;
  display: flex; flex-direction: column; justify-content: flex-end;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.crew-slot.has-charge { border-style: solid; border-color: var(--tc, var(--line-bright)); }
.crew-slot.has-crew { border-style: solid; border-color: var(--tc); box-shadow: inset 0 0 18px color-mix(in srgb, var(--tc) 14%, transparent); }
.crew-slot.drop-target { border-color: var(--gold); box-shadow: 0 0 14px rgba(255,215,94,0.3); }
.crew-slot.locked { opacity: 0.38; filter: saturate(0.45); border-style: dashed; }
.crew-slot.locked::after {
  content: "LOCKED";
  position: absolute; inset: 0; z-index: 4;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 13px; font-weight: 900; letter-spacing: 0.16em;
  color: var(--faint); background: rgba(5, 7, 11, 0.48);
  pointer-events: none;
}

.slot-fill {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: linear-gradient(180deg, color-mix(in srgb, var(--tc) 70%, transparent), color-mix(in srgb, var(--tc) 30%, transparent));
  transition: height 0.45s cubic-bezier(0.22,1,0.36,1), background 0.3s;
  z-index: 0;
}
.slot-empty-label {
  position: absolute; inset: 48px 6px 34px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-family: var(--mono); color: var(--faint); letter-spacing: 0.1em; text-align: center; padding: 4px;
  z-index: 2; pointer-events: none;
}
.slot-empty-label b {
  color: var(--tc);
  font-size: 13px;
  font-weight: 950;
  text-shadow: 0 0 12px var(--tg);
}
.slot-empty-label span {
  font-size: 9px;
  color: var(--dim);
}
.slot-num { position: absolute; top: 4px; left: 6px; font-family: var(--mono); font-size: 9px; color: var(--faint); z-index: 3; }
.slot-charge-text { position: absolute; top: 4px; right: 6px; font-family: var(--mono); font-size: 10px; font-weight: 700; color: var(--tc); z-index: 3; text-shadow: 0 1px 3px #000; }
.slot-type-btn {
  position: absolute; top: 22px; left: 6px; right: 6px; z-index: 5;
  min-height: 24px; border-radius: 7px;
  border: 1px solid var(--tc); background: rgba(7, 11, 18, 0.86);
  color: var(--tc); font-family: var(--mono); font-size: 8.5px; font-weight: 900; letter-spacing: 0.06em;
  box-shadow: 0 0 10px color-mix(in srgb, var(--tc) 22%, transparent);
}
.slot-type-btn:hover { box-shadow: 0 0 16px var(--tg); transform: translateY(-1px); }
.slot-type-btn:disabled { opacity: 0.65; cursor: not-allowed; border-color: var(--line-bright); color: var(--faint); box-shadow: none; }
.slot-pending-actions {
  position: absolute; left: 6px; right: 6px; bottom: 7px; z-index: 5;
  font-family: var(--mono); font-size: 8px; font-weight: 800; letter-spacing: 0.08em;
  color: var(--dim); text-align: center; padding: 5px 4px;
  border: 1px dashed var(--line-bright); border-radius: 7px; background: rgba(7,11,18,0.76);
}

/* installed crew: big, centered in the middle of the slot */
.slot-crew {
  position: absolute; inset: 0; z-index: 2;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; padding: 14px 5px 6px; text-align: center;
  cursor: grab;
}
.slot-crew:active { cursor: grabbing; }
.slot-crew .sc-avatar {
  width: 52px; height: 52px; border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 20px; font-weight: 900;
  background: var(--bg1); border: 2px solid var(--tc); color: var(--tc);
  box-shadow: 0 0 14px var(--tg), inset 0 0 10px color-mix(in srgb, var(--tc) 16%, transparent);
}
.slot-crew .sc-name { font-size: 12.5px; font-weight: 800; line-height: 1.12; text-shadow: 0 1px 4px rgba(0,0,0,0.8); }
.slot-crew .sc-charge { font-family: var(--mono); font-size: 11px; font-weight: 700; color: var(--tc); margin-top: 1px; text-shadow: 0 1px 3px rgba(0,0,0,0.8); }
.slot-crew .sc-charge.checked { color: var(--green); text-shadow: 0 0 10px rgba(65,245,143,0.62); }
.slot-crew .sc-req-pending {
  font-family: var(--mono); font-size: 9px; font-weight: 950;
  color: var(--red); letter-spacing: 0.08em;
  text-shadow: 0 0 10px rgba(255,77,94,0.55);
}
.slot-crew .sc-cd { font-family: var(--mono); font-size: 10px; font-weight: 700; color: var(--gold); }
.crew-slot.armed .slot-crew .sc-charge { color: var(--gold); text-shadow: 0 0 8px var(--gold); }
.crew-slot.req-pending .slot-crew .sc-charge.checked { color: var(--green); text-shadow: 0 0 10px rgba(65,245,143,0.62); }
.crew-slot.req-pending { border-color: var(--gold); box-shadow: inset 0 0 18px rgba(255,215,94,0.12), 0 0 16px rgba(255,215,94,0.22); }
.crew-slot.on-cooldown { opacity: 0.6; }

/* --- slot stars (banked fills; big crew need 2★/3★ slots) --- */
.slot-stars {
  position: absolute; top: 3px; left: 50%; transform: translateX(-50%);
  z-index: 4; display: flex; gap: 1px;
  font-size: 11px; color: var(--gold);
  text-shadow: 0 0 8px rgba(255, 215, 94, 0.8), 0 1px 2px #000;
  pointer-events: none;
}
.slot-stars .star-off { color: #2a3040; text-shadow: none; }

/* --- READY slot: CALL / PURGE / UPGRADE --- */
.crew-slot.ready { border-style: solid; border-color: var(--tc); }
.slot-actions {
  position: absolute; inset: auto 4px 4px 4px; z-index: 5;
  display: flex; flex-direction: column; gap: 3px;
}
.slot-btn {
  font-family: var(--mono); font-size: 9px; font-weight: 800; letter-spacing: 0.08em;
  border-radius: 6px; padding: 4px 2px; width: 100%;
  border: 1px solid var(--line-bright); background: rgba(7, 11, 18, 0.92); color: var(--dim);
  transition: transform 0.1s, box-shadow 0.15s, border-color 0.15s;
}
.slot-btn:hover:not(:disabled) { transform: translateY(-1px); }
.slot-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.slot-btn.sb-call { border-color: var(--gold-deep); color: var(--gold); background: linear-gradient(180deg, rgba(68,52,17,0.95), rgba(44,33,10,0.95)); }
.slot-btn.sb-call:hover:not(:disabled) { box-shadow: 0 0 12px rgba(255,215,94,0.35); border-color: var(--gold); }
.slot-btn.sb-purge { border-color: #6e2733; color: var(--red); }
.slot-btn.sb-upg { border-color: var(--tc); color: var(--tc); }
.slot-ready-label {
  position: absolute; top: 18px; left: 0; right: 0; z-index: 4;
  text-align: center; font-family: var(--mono); font-size: 9px; font-weight: 800;
  letter-spacing: 0.14em; color: var(--tc); text-shadow: 0 0 10px var(--tg);
  animation: heartPulse 1.1s ease infinite;
  pointer-events: none;
}

/* --- CALLING… overlay (quirky 0.5s pre-summon) --- */
.slot-calling-overlay {
  position: absolute; inset: 0; z-index: 6;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  background: rgba(5, 7, 11, 0.88);
  font-family: var(--mono);
}
.slot-calling-overlay .call-icon { font-size: 22px; animation: callWiggle 0.24s ease-in-out infinite; filter: drop-shadow(0 0 8px var(--tg)); }
.slot-calling-overlay .call-txt { font-size: 9px; font-weight: 800; letter-spacing: 0.16em; color: var(--tc); }
.slot-calling-overlay .call-txt::after { content: ""; animation: callDots 0.6s steps(4) infinite; }
.slot-calling-overlay::before {
  content: ""; position: absolute; left: 0; right: 0; height: 26px; top: -26px;
  background: linear-gradient(180deg, transparent, var(--tg), transparent);
  animation: callScan 0.5s linear infinite;
}

/* ================= Firewall + barrier + heat ================= */
.bar { position: relative; height: 24px; background: #070b12; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.bar-fill { position: absolute; inset: 0; transform-origin: left center; transition: transform 0.6s cubic-bezier(0.22,1,0.36,1), background 0.4s; }
.bar-text { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; text-shadow: 0 1px 3px rgba(0,0,0,0.9); z-index: 2; }
.fw-bar .bar-fill { background: linear-gradient(90deg, #b8860b, var(--gold)); box-shadow: 0 0 14px rgba(255,215,94,0.25); }
.fw-name { font-size: 12px; font-weight: 600; margin-bottom: 6px; }
.fw-type { font-size: 9px; color: var(--orange); border: 1px solid #6e3220; border-radius: 8px; padding: 0 6px; }
.barrier-inline {
  margin-top: 12px;
  padding: 11px 12px 12px;
  border: 1px solid rgba(255,93,122,0.46);
  border-left: 4px solid var(--hearts);
  border-radius: 10px;
  color: var(--hearts);
  background:
    radial-gradient(circle at 18% 0%, rgba(255,93,122,0.18), transparent 44%),
    rgba(7, 11, 18, 0.86);
  box-shadow: inset 0 0 24px rgba(255,93,122,0.07), 0 0 18px rgba(255,93,122,0.12);
}
.barrier-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
  margin-bottom: 8px;
}
.barrier-head b {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 950;
  letter-spacing: 0.04em;
  color: var(--text);
  text-align: right;
}
.barrier-label {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.16em;
  color: var(--hearts);
  text-shadow: 0 0 12px rgba(255,93,122,0.45);
}
.barrier-mid {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-bottom: 9px;
}
.barrier-suit {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 950;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.28);
  border-radius: 8px;
  padding: 4px 8px;
  background: rgba(255,93,122,0.16);
  box-shadow: 0 0 14px rgba(255,93,122,0.2);
}
.barrier-count {
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 950;
  color: var(--hearts);
  text-shadow: 0 0 14px rgba(255,93,122,0.56);
}
.barrier-inline .b-hearts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(19px, 1fr));
  gap: 5px;
  margin: 2px 0 10px;
}
.b-token {
  min-width: 19px;
  height: 21px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 18px;
  line-height: 1;
  color: #39202a;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 6px;
  background: rgba(0,0,0,0.28);
  transition: color 0.3s, text-shadow 0.3s, border-color 0.3s, background 0.3s;
}
.b-token.lit { color: var(--hearts); border-color: rgba(255,93,122,0.6); background: rgba(255,93,122,0.12); text-shadow: 0 0 12px rgba(255,93,122,0.9); }
.b-token.diamonds.lit { color: var(--diamonds); border-color: rgba(92,198,255,0.55); background: rgba(92,198,255,0.1); text-shadow: 0 0 12px rgba(92,198,255,0.9); }
.b-token.clubs.lit { color: var(--clubs); border-color: rgba(65,245,143,0.55); background: rgba(65,245,143,0.1); text-shadow: 0 0 12px rgba(65,245,143,0.88); }
.b-token.spades.lit { color: var(--spades); border-color: rgba(210,214,225,0.55); background: rgba(210,214,225,0.09); text-shadow: 0 0 12px rgba(210,214,225,0.78); }
.barrier-spoof {
  font-family: var(--mono);
  font-size: 10px;
  margin-bottom: 7px;
}
.barrier-inline .routing {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.08em;
  color: var(--orange);
}
.barrier-inline.broken {
  color: var(--green);
  border-color: rgba(65,245,143,0.48);
  border-left-color: var(--green);
  background:
    radial-gradient(circle at 18% 0%, rgba(65,245,143,0.16), transparent 44%),
    rgba(7, 11, 18, 0.86);
  box-shadow: inset 0 0 24px rgba(65,245,143,0.07), 0 0 18px rgba(65,245,143,0.12);
}
.barrier-inline.broken .barrier-label,
.barrier-inline.broken .barrier-count,
.barrier-inline.broken .routing { color: var(--green); }

.heat-bar { height: 20px; }
.heat-bar .bar-fill { background: linear-gradient(90deg, #2c72ff, var(--orange) 60%, var(--red)); }
.heat-marker { position: absolute; top: 0; bottom: 0; width: 1px; background: rgba(255,255,255,0.35); z-index: 3; }
.heat-preview { position: absolute; top: 0; bottom: 0; width: 0; background: repeating-linear-gradient(45deg, rgba(255,255,255,0.35) 0 4px, transparent 4px 8px); z-index: 2; opacity: 0.8; transition: left 0.3s, width 0.3s; }
.heat-preview.relief { background: repeating-linear-gradient(45deg, rgba(65,245,143,0.5) 0 4px, transparent 4px 8px); }
#heat-pct { font-size: 13px; }
.heat-note { font-family: var(--mono); font-size: 9.5px; margin-top: 6px; color: var(--dim); min-height: 13px; }
#heat-panel.warn .panel-title, #heat-panel.warn #heat-pct { color: var(--orange); }
#heat-panel.danger .panel-title, #heat-panel.danger #heat-pct { color: var(--red); }

/* ================= Type-point bars (this hand) ================= */
#tp-bars { display: flex; gap: 8px; }
.tp-bar { flex: 1; border: 1px solid var(--tc); border-radius: 8px; padding: 5px 8px; background: color-mix(in srgb, var(--tc) 8%, transparent); display: flex; align-items: center; justify-content: space-between; }
.tp-bar .tp-label { font-family: var(--mono); font-size: 9px; letter-spacing: 0.1em; color: var(--tc); }
.tp-bar .tp-val { font-family: var(--mono); font-size: 18px; font-weight: 800; color: var(--tc); text-shadow: 0 0 10px var(--tg); }
.tp-bar.zero { opacity: 0.35; border-color: var(--line); }
.tp-bar.zero .tp-label, .tp-bar.zero .tp-val { color: var(--faint); text-shadow: none; }
#tp-summary { font-family: var(--mono); color: var(--faint); font-size: 10px; letter-spacing: 0.04em; text-transform: none; }

#score-core {
  position: absolute; inset: 52px 14% 10px; z-index: 18;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  pointer-events: none; border: 1px solid var(--tc, var(--orange));
  border-radius: 12px;
  background: radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--tc, var(--orange)) 18%, transparent), rgba(6, 9, 15, 0.92) 62%);
  box-shadow: 0 0 28px color-mix(in srgb, var(--tc, var(--orange)) 38%, transparent), 0 18px 40px rgba(0,0,0,0.42);
  animation: corePop 0.25s cubic-bezier(0.22,1,0.36,1) both;
}
#score-core.core-surge { --tc: var(--surge); }
#score-core.core-luck { --tc: var(--luck); }
#score-core.core-crypto { --tc: var(--crypto); }
#score-core.core-damage { --tc: var(--orange); }
#score-core.barrier-reducing { --tc: var(--hearts); border-width: 2px; }
#score-core.leaving { animation: coreLeave 0.22s ease-in forwards; }
.score-core-label { font-family: var(--mono); font-size: 10px; font-weight: 900; color: var(--dim); letter-spacing: 0.18em; }
.score-core-value { font-family: var(--mono); font-size: 32px; font-weight: 950; color: var(--tc); text-shadow: 0 0 18px color-mix(in srgb, var(--tc) 65%, transparent); line-height: 1.05; }
.score-core-sub { font-family: var(--mono); font-size: 9px; color: var(--faint); letter-spacing: 0.1em; }

.barrier-crush-projectile {
  position: fixed;
  left: 0; top: 0;
  z-index: 91;
  width: 62px; height: 62px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 14px;
  border: 2px solid var(--hearts);
  background:
    radial-gradient(circle at 35% 30%, rgba(255,255,255,0.8), transparent 18%),
    linear-gradient(145deg, rgba(255,93,122,0.96), rgba(58,7,22,0.98));
  color: #fff;
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 950;
  box-shadow: 0 0 26px rgba(255,93,122,0.78), 0 14px 38px rgba(0,0,0,0.65);
  pointer-events: none;
  animation: barrierCrushProjectile 0.52s cubic-bezier(0.18, 0.9, 0.18, 1) forwards;
}

/* crew activation pop-up: fixed in the middle of the screen, ≥1s hold */
.crew-spotlight {
  position: fixed;
  left: 50%;
  top: 46vh;
  width: min(460px, 60vw);
  min-height: 128px;
  transform: translate(-50%, -50%);
  z-index: 89;
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 14px;
  align-items: center;
  padding: 16px 18px;
  border: 1px solid var(--tc);
  border-radius: 12px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--tc) 20%, transparent), transparent 58%),
    rgba(8, 11, 18, 0.96);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--tc) 32%, transparent), 0 20px 70px rgba(0,0,0,0.65), 0 0 38px var(--tg);
  pointer-events: none;
  animation: crewSpotlightIn 0.26s cubic-bezier(0.22,1,0.36,1) both, crewSpotlightBreathe 0.85s ease-in-out infinite;
}
.crew-spotlight.failed {
  --tc: var(--red);
  --tg: rgba(255,77,94,0.55);
}
.crew-spotlight.pending {
  --tc: var(--gold);
  --tg: rgba(255,215,94,0.55);
}
.crew-spotlight.synergy-spotlight {
  width: min(560px, 68vw);
  min-height: 140px;
  border-width: 2px;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--tc) 45%, transparent), 0 24px 80px rgba(0,0,0,0.72), 0 0 48px var(--tg);
}
.crew-spotlight.synergy-spotlight .cs-avatar {
  font-size: 34px;
  color: #fff;
  background: color-mix(in srgb, var(--tc) 30%, rgba(5,7,11,0.92));
}
.crew-spotlight.synergy-spotlight .cs-name { font-size: 22px; }
.crew-spotlight.leaving { animation: crewSpotlightOut 0.2s ease-in forwards; }
.crew-spotlight .cs-avatar {
  width: 68px; height: 68px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 24px; font-weight: 900;
  color: var(--tc); background: rgba(5,7,11,0.82);
  border: 1px solid var(--tc);
  box-shadow: inset 0 0 18px color-mix(in srgb, var(--tc) 18%, transparent);
}
.crew-spotlight .cs-name {
  font-family: var(--mono);
  font-size: 19px;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: var(--tc);
  text-transform: uppercase;
}
.crew-spotlight .cs-effect {
  margin-top: 8px;
  font-size: 21px;
  line-height: 1.16;
  font-weight: 850;
  color: var(--text);
  text-shadow: 0 0 18px color-mix(in srgb, var(--tc) 38%, transparent);
}

/* ================= Preview ================= */
.pv-empty { color: var(--faint); font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; padding: 12px 0; text-align: center; }
.pv-row { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.pv-hand { font-family: var(--mono); font-size: 24px; font-weight: 800; letter-spacing: 0.08em; color: var(--gold); text-shadow: 0 0 16px rgba(255,215,94,0.35); }
.pv-formula { font-family: var(--mono); font-size: 12px; color: var(--dim); }
.pv-formula b { color: var(--text); }
.pv-final { font-family: var(--mono); font-size: 26px; font-weight: 800; color: var(--text); }
.pv-dmg { margin-left: auto; font-family: var(--mono); font-size: 20px; font-weight: 800; color: var(--orange); text-shadow: 0 0 14px rgba(255,159,67,0.4); }
.pv-scorenote { font-size: 10px; color: var(--orange); margin-top: 4px; }
.pv-scorenote.ok { color: var(--green); opacity: 0.85; }
.pv-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 7px; }
.pv-badge { font-family: var(--mono); font-size: 9px; letter-spacing: 0.05em; border-radius: 10px; padding: 2px 8px; border: 1px solid var(--line-bright); color: var(--dim); }
.pv-badge.dmg { border-color: #6e3220; color: var(--orange); }
.pv-badge.red { border-color: #6e2733; color: var(--red); }
.pv-badge.grn { border-color: #1d5c3c; color: var(--green); }
.pv-badge.gld { border-color: #5c521d; color: var(--gold); }
.pv-badge.hrt { border-color: #5c2733; color: var(--hearts); }
.pv-badge.surge { border-color: var(--surge); color: var(--surge); }
.pv-badge.luck { border-color: var(--luck); color: var(--luck); }
.pv-badge.crypto { border-color: var(--crypto); color: var(--crypto); }
#preview-warnings { margin-top: 6px; display: flex; flex-direction: column; gap: 3px; }
.pv-warn { font-size: 10px; color: var(--orange); padding-left: 16px; position: relative; line-height: 1.35; }
.pv-warn::before { content: "⚠"; position: absolute; left: 2px; }
.pv-warn.critical { color: var(--red); font-weight: 600; }

/* ================= Roster / crew cards ================= */
.roster-crew, .crew-tile {
  border: 1px solid var(--line); border-radius: 8px; background: var(--bg2);
  padding: 8px 9px; position: relative;
  border-left: 3px solid var(--tc, var(--line-bright));
}
.roster-crew { margin-bottom: 6px; cursor: help; transition: border-color 0.2s, opacity 0.3s; }
.roster-crew.used::after { content: "USED"; position: absolute; top: 7px; right: 8px; font-family: var(--mono); font-size: 8px; color: var(--red); }
.rc-head { display: flex; align-items: center; gap: 7px; }
.rc-avatar { width: 26px; height: 26px; border-radius: 7px; display: flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 11px; font-weight: 800; background: var(--bg1); border: 1px solid var(--tc); color: var(--tc); flex-shrink: 0; }
.rc-name { font-size: 12px; font-weight: 700; }
.rc-meta { font-family: var(--mono); font-size: 9px; color: var(--faint); margin-top: 4px; display: flex; gap: 8px; flex-wrap: wrap; }
.star-req {
  display: inline-flex; align-items: center; gap: 1px;
  font-family: var(--mono); font-size: 9px; font-weight: 900;
  color: var(--gold);
  text-shadow: 0 0 8px rgba(255,215,94,0.55);
  letter-spacing: 0.02em;
}
.rc-ability { font-size: 10px; color: var(--dim); line-height: 1.35; margin-top: 4px; }

/* prep crew tiles (clickable) */
.crew-tile { cursor: pointer; transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s, opacity 0.2s; }
.crew-tile:hover { transform: translateY(-2px); }
.crew-tile.selected { box-shadow: 0 0 0 1px var(--tc), 0 0 16px var(--tg); }
.crew-tile.selected::before { content: "✓"; position: absolute; top: 6px; right: 8px; color: var(--tc); font-size: 13px; font-weight: 700; }
.crew-tile.locked:not(.selected) { opacity: 0.4; cursor: not-allowed; }
.crew-tile.selected { cursor: pointer; }
.crew-tile .rc-name { font-size: 13px; padding-right: 16px; }
.crew-tile .rc-req { font-size: 10px; color: var(--dim); line-height: 1.35; margin-top: 4px; }

/* ================= Spikes ================= */
.spike-chip { display: flex; flex-direction: column; gap: 4px; border: 1px solid var(--line-bright); border-left: 5px solid var(--gold-deep); border-radius: 8px; background: linear-gradient(145deg, rgba(255,215,94,0.08), var(--bg2)); padding: 10px 11px; margin-bottom: 8px; cursor: help; box-shadow: inset 0 0 18px rgba(255,215,94,0.05); }
.spike-chip .sp-name { font-family: var(--mono); font-size: 12px; font-weight: 900; letter-spacing: 0.05em; color: var(--gold); }
.spike-chip .sp-effect { font-size: 10.5px; color: var(--dim); line-height: 1.35; }
#spikes-list .pv-empty { padding: 8px 0; }

/* ================= e-Chips panel ================= */
#echips-panel {
  border-color: rgba(255,77,94,0.46);
  box-shadow: inset 0 0 24px rgba(255,77,94,0.07);
}
#echips-panel .panel-title { color: var(--red); text-shadow: 0 0 12px rgba(255,77,94,0.32); }
.echips-counter {
  font-family: var(--mono);
  font-size: 34px;
  font-weight: 950;
  line-height: 1;
  color: var(--red);
  text-shadow: 0 0 18px rgba(255,77,94,0.55);
  letter-spacing: 0.03em;
}

/* ================= RPS legend ================= */
#rps-legend { display: flex; flex-direction: column; gap: 5px; }
.rps-row { display: flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 10px; }
.rps-row .beats-arrow { color: var(--faint); }

/* ================= AI rule chips ================= */
.rule-chip { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.05em; border-radius: 14px; padding: 3px 10px; border: 1px solid var(--line-bright); color: var(--dim); background: var(--bg2); cursor: help; }
.rule-chip.quirk { border-color: #4a2d5c; color: #b06bff; }
.rule-chip.quirk.fired { border-color: #b06bff; box-shadow: 0 0 12px rgba(176,107,255,0.35); }
.rule-chip.muted { opacity: 0.4; text-decoration: line-through; }

/* ================= AI eye ================= */
.ai-eye { width: 44px; height: 44px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #241b38, #0d0a16 70%); border: 2px solid #3c2d5c; display: flex; align-items: center; justify-content: center; position: relative; box-shadow: 0 0 18px rgba(176,107,255,0.25), inset 0 0 12px rgba(0,0,0,0.7); }
.ai-pupil { width: 14px; height: 14px; border-radius: 50%; background: radial-gradient(circle at 40% 40%, #b06bff, #4a1d7a); box-shadow: 0 0 12px #b06bff; transition: transform 0.4s cubic-bezier(0.34,1.56,0.64,1), background 0.3s; }
.ai-eye.hit .ai-pupil { background: radial-gradient(circle at 40% 40%, var(--red), #7a1d2c); box-shadow: 0 0 14px var(--red); }
.ai-eye.shut { border-color: #6e2733; }
.ai-eye.shut .ai-pupil { transform: scaleY(0.08); }

/* ================= Event log ================= */
.log-entry { padding: 1px 0; border-left: 2px solid transparent; padding-left: 7px; margin-bottom: 1px; }
.log-entry .log-t { color: var(--faint); margin-right: 5px; }
.log-dmg { border-left-color: var(--orange); color: #ffc9a0; }
.log-heat { border-left-color: var(--red); color: #ff9aa5; }
.log-cool { border-left-color: #58b6ff; color: #9fd4ff; }
.log-eco { border-left-color: var(--gold); color: #ffe9a8; }
.log-surge { border-left-color: var(--surge); color: #ffc4a0; }
.log-luck { border-left-color: var(--luck); color: #cfb0ff; }
.log-crypto { border-left-color: var(--crypto); color: #a8e9ff; }
.log-ai { border-left-color: #b06bff; color: #d4b3ff; }
.log-sys { color: var(--dim); }
.log-win { border-left-color: var(--gold); color: var(--gold); font-weight: 700; }
.log-lose { border-left-color: var(--red); color: var(--red); font-weight: 700; }

/* ================= Prep briefing / rules ================= */
.brief-item { margin-bottom: 10px; }
.brief-label { font-family: var(--mono); font-size: 9px; letter-spacing: 0.14em; color: var(--faint); }
.brief-value { font-size: 12.5px; margin-top: 1px; line-height: 1.4; }
.brief-value.gold { color: var(--gold); font-family: var(--mono); font-size: 15px; }
.brief-value.red { color: var(--red); }
.brief-value.green { color: var(--green); }
.rule-panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); padding: 10px 12px; }
.rule-panel h3 { font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; margin-bottom: 6px; }
.rule-panel ul { list-style: none; }
.rule-panel li { font-size: 11px; color: var(--dim); line-height: 1.5; padding-left: 12px; position: relative; }
.rule-panel li::before { content: "›"; position: absolute; left: 0; color: var(--faint); }
.rule-panel li b { color: var(--text); }
.rp-types h3 { color: var(--crypto); }
.rp-slots h3 { color: var(--surge); }
.rp-barrier h3 { color: var(--hearts); }
.rp-heat h3 { color: var(--orange); }
.rp-echips h3 { color: var(--gold); }

/* ================= Loadout footer ================= */
.loadout-slots { display: flex; gap: 6px; flex-wrap: wrap; }
.loadout-slot { width: 118px; height: 42px; border: 1px dashed var(--line); border-radius: 8px; display: flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 9px; color: var(--faint); text-align: center; padding: 3px 6px; line-height: 1.3; border-left: 3px solid var(--tc, var(--line)); }
.loadout-slot.filled { border-style: solid; color: var(--text); font-family: var(--sans); font-size: 10.5px; font-weight: 600; background: var(--bg2); cursor: pointer; }
.loadout-slot.filled:hover { border-color: var(--red); color: var(--red); }
.loadout-warnings { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.loadout-ok { color: var(--green); font-size: 11px; font-family: var(--mono); letter-spacing: 0.05em; }

/* ================= Shop (The Van) ================= */
#shop { width: 720px; max-width: 94vw; background: var(--panel-solid); border: 1px solid var(--line-bright); border-radius: 16px; padding: 24px; box-shadow: 0 30px 80px rgba(0,0,0,0.6); }
.shop-header { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.shop-logo { font-family: var(--mono); font-size: 22px; font-weight: 800; letter-spacing: 0.08em; color: var(--gold); text-shadow: 0 0 20px rgba(255,215,94,0.4); }
.shop-sub { flex: 1; font-size: 12px; color: var(--dim); }
.shop-chips { font-family: var(--mono); font-size: 14px; color: var(--gold); }
.shop-chips b { font-size: 18px; }
#shop-offers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 20px; }
.shop-offer { border: 1px solid var(--line-bright); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 8px; background: var(--bg2); }
.shop-offer .so-name { font-family: var(--mono); font-size: 13px; font-weight: 700; color: var(--gold); }
.shop-offer .so-effect { font-size: 11px; color: var(--dim); line-height: 1.4; flex: 1; }
.shop-offer .so-price { font-family: var(--mono); font-size: 13px; color: var(--gold); }
.shop-offer .btn { width: 100%; }
.shop-offer.bought { opacity: 0.55; }
.shop-offer.bought .btn { border-color: var(--green); color: var(--green); }
.shop-actions { text-align: center; }

/* ================= Modal ================= */
.modal-title { font-family: var(--mono); font-size: 30px; font-weight: 800; letter-spacing: 0.14em; margin-bottom: 4px; }
.modal-title.win { color: var(--gold); text-shadow: 0 0 30px rgba(255,215,94,0.6); }
.modal-title.lose { color: var(--red); text-shadow: 0 0 30px rgba(255,77,94,0.6); }
.modal-sub { font-family: var(--mono); font-size: 11px; color: var(--dim); letter-spacing: 0.1em; margin-bottom: 18px; }
.modal-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 20px; text-align: left; margin-bottom: 22px; }
.modal-stat { display: flex; justify-content: space-between; font-size: 12px; color: var(--dim); border-bottom: 1px dotted var(--line); padding-bottom: 4px; }
.modal-stat b { font-family: var(--mono); color: var(--text); }
.modal-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ================= Crew inspect / dismiss dialog ================= */
#crew-dialog-wrap {
  position: fixed; inset: 0; z-index: 82;
  display: flex; align-items: center; justify-content: center;
  background: rgba(4, 6, 10, 0.6); backdrop-filter: blur(2px);
}
#crew-dialog {
  width: 360px; max-width: 92vw;
  background: var(--panel-solid);
  border: 1px solid var(--tc, var(--line-bright));
  border-radius: 14px; padding: 20px;
  box-shadow: 0 24px 70px rgba(0,0,0,0.65), 0 0 30px var(--tg, transparent);
  animation: modalIn 0.25s cubic-bezier(0.22,1,0.36,1);
}
#crew-dialog .cd-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
#crew-dialog .cd-avatar {
  width: 46px; height: 46px; border-radius: 12px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 17px; font-weight: 900;
  color: var(--tc); background: var(--bg1); border: 1px solid var(--tc);
}
#crew-dialog .cd-name { font-family: var(--mono); font-size: 16px; font-weight: 800; letter-spacing: 0.05em; color: var(--tc); }
#crew-dialog .cd-body { font-size: 12px; color: var(--dim); line-height: 1.55; margin-bottom: 14px; }
#crew-dialog .cd-body b { color: var(--text); }
#crew-dialog .cd-cost {
  font-family: var(--mono); font-size: 11px; color: var(--orange);
  border: 1px dashed #6e3220; border-radius: 8px; padding: 6px 9px; margin-bottom: 12px;
}
#crew-dialog .cd-actions { display: flex; gap: 8px; }
#crew-dialog .cd-actions .btn { flex: 1; }
.call-options { display: grid; gap: 8px; margin-top: 12px; }
.call-option {
  display: flex; flex-direction: column; gap: 5px; text-align: left;
  border: 1px solid var(--tc); border-radius: 8px; padding: 9px 10px;
  background: rgba(8, 12, 20, 0.92); color: var(--text);
}
.call-option:not(:disabled):hover { box-shadow: 0 0 18px var(--tg); transform: translateY(-1px); }
.call-option:disabled { opacity: 0.42; cursor: not-allowed; }
.call-option.free { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tc) 26%, transparent); }
.call-option.paid { border-style: dashed; }
.co-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-family: var(--mono); font-size: 12px; }
.co-tags { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; }
.co-ability { font-size: 11px; line-height: 1.3; color: var(--dim); }
.co-warning {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 900;
  color: var(--red);
  letter-spacing: 0.06em;
}
.co-cost { font-family: var(--mono); font-size: 10px; font-weight: 900; color: var(--gold); letter-spacing: 0.06em; }

/* ================= Tutorial / Help dialog ================= */
#tutorial-wrap {
  z-index: 86;
  background:
    radial-gradient(circle at 50% 20%, rgba(176,107,255,0.16), transparent 46%),
    rgba(4, 6, 10, 0.78);
}
#tutorial-card {
  width: min(720px, 92vw);
  max-height: 86vh;
  overflow-y: auto;
  background:
    linear-gradient(135deg, rgba(255,215,94,0.08), transparent 34%),
    linear-gradient(180deg, rgba(14,19,31,0.98), rgba(8,11,18,0.98));
  border: 1px solid var(--line-bright);
  border-radius: 16px;
  padding: 26px 28px;
  box-shadow: 0 30px 90px rgba(0,0,0,0.72), 0 0 44px rgba(176,107,255,0.18);
  animation: modalIn 0.28s cubic-bezier(0.22,1,0.36,1);
}
.tutorial-kicker {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 900;
  color: var(--crypto);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
#tutorial-title {
  font-family: var(--mono);
  font-size: 30px;
  line-height: 1.05;
  letter-spacing: 0.08em;
  color: var(--gold);
  text-shadow: 0 0 24px rgba(255,215,94,0.36);
  margin-bottom: 12px;
}
.tutorial-intro {
  font-size: 14px;
  line-height: 1.55;
  color: var(--dim);
  margin-bottom: 16px;
}
.tutorial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}
.tutorial-block {
  min-height: 132px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--tc, var(--gold));
  border-radius: 10px;
  background: rgba(7, 11, 18, 0.82);
  padding: 12px 12px 13px;
}
.tutorial-block h3 {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: var(--tc, var(--gold));
  margin-bottom: 7px;
}
.tutorial-block p {
  font-size: 12px;
  line-height: 1.45;
  color: var(--dim);
}
.tutorial-block b { color: var(--text); }
.tutorial-tip {
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.45;
  color: var(--green);
  border: 1px dashed rgba(65,245,143,0.38);
  border-radius: 10px;
  padding: 9px 11px;
  margin-bottom: 18px;
  background: rgba(65,245,143,0.06);
}
#tutorial-dismiss { min-width: 180px; }
@media (max-width: 760px) {
  #tutorial-card { padding: 22px 18px; }
  #tutorial-title { font-size: 24px; }
  .tutorial-grid { grid-template-columns: 1fr; }
  .tutorial-block { min-height: 0; }
}

/* ================= Tooltip ================= */
#tooltip { position: fixed; z-index: 99; max-width: 300px; background: var(--panel-solid); border: 1px solid var(--line-bright); border-radius: 10px; padding: 10px 12px; pointer-events: none; opacity: 0; transition: opacity 0.12s; box-shadow: 0 14px 40px rgba(0,0,0,0.6); }
#tooltip.visible { opacity: 1; }
.tip-title { font-size: 13px; font-weight: 700; margin-bottom: 3px; }
.tip-meta { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.05em; color: var(--faint); margin-bottom: 7px; }
.tip-body { font-size: 11.5px; color: var(--dim); line-height: 1.5; }
.tip-body b { color: var(--text); }
.tip-check { color: var(--green); font-weight: 800; }
.tip-pending { color: var(--red); font-weight: 800; }
.tip-status { margin-top: 7px; border-top: 1px solid var(--line); padding-top: 7px; }
.tip-warn { color: var(--orange); display: inline-block; margin-top: 4px; }
