@font-face {
  font-family: 'Unbounded';
  src: url('/webapp/fonts/Unbounded.ttf') format('truetype');
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Manrope';
  src: url('/webapp/fonts/Manrope.ttf') format('truetype');
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('/webapp/fonts/JetBrainsMono.ttf') format('truetype');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg-void: #0b0c11;
  --bg-studio: radial-gradient(ellipse at 16% 0%, #332a23 0, #19181c 32%, #0b0c11 74%);
  --surface-1: linear-gradient(150deg, #20212a, #171922 64%, #161820);
  --surface-2: linear-gradient(155deg, #2c2b33, #222531);
  --surface-solid: #171922;
  --inset: #10121a;
  --border-glass: #3b3d48;
  --border-strong: #52525c;
  --border-faint: #33343d;
  --specular: inset 0 1px 0 rgba(255,232,196,.18);
  --shadow-card: 0 2px 4px #0007, 0 8px 20px #0004;
  --text-primary: #f8f5ef;
  --text-secondary: #d8d2c9;
  --text-muted: #b5b1bd;
  --accent-ai: #c49aff;
  --accent-cloud: #80dfb3;
  --accent-fintech: #82c9ff;
  --accent-cyber: #ffaf7c;
  --accent-gold: #f8cb78;
  --accent-danger: #ff8b9a;
  --accent-red: #ef4444;

  --font-display: 'Unbounded', system-ui, sans-serif;
  --font-sans: 'Manrope', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  font: 15px/1.5 var(--font-sans);
  color: var(--text-primary);
  background: var(--bg-void);
  scrollbar-color: #334155 var(--bg-void);
  accent-color: var(--accent-fintech);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg-studio);
  background-size: 100% 100%, 100% 100%, 28px 28px, 100% 100%;
  background-attachment: fixed;
  color: var(--text-primary);
  overflow-wrap: anywhere;
}

[hidden] {
  display: none !important;
}

::selection {
  background: rgba(168, 85, 247, 0.45);
  color: #fff;
}

a,
button,
input,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

a {
  text-underline-offset: 3px;
}

:focus-visible {
  outline: 2px solid var(--accent-fintech);
  outline-offset: 2px;
}

main:focus:not(:focus-visible) {
  outline: 0;
}

.skip {
  position: fixed;
  left: 14px;
  top: -80px;
  z-index: 20;
  background: var(--accent-fintech);
  color: #06080f;
  padding: 10px 14px;
  border-radius: 8px;
  font-weight: 700;
}
.skip:focus {
  top: 12px;
}

h1,
h2,
h3,
p,
figure,
pre {
  margin: 0;
}

h1,
h2,
h3,
strong,
td,
small,
p,
code,
.tag {
  overflow-wrap: anywhere;
}

h1 {
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 40px);
  letter-spacing: -0.03em;
  line-height: 1.12;
  font-weight: 700;
}

h2 {
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 16px;
}
h2 .icon {
  color: var(--accent-fintech);
}

h3 {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.35;
  font-weight: 700;
}

small {
  display: block;
  font-size: 12px;
  line-height: 1.45;
}

.number,
.kpi strong,
.quote,
.combo,
.invite-code,
.tag,
.grade,
.code-snippet {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.muted,
.empty {
  color: var(--text-muted);
}

.secondary {
  color: var(--text-secondary);
}

.positive,
.cluster-cloud {
  color: #34d399;
}
.negative {
  color: var(--accent-danger);
}
.gold,
.warning {
  color: var(--accent-gold);
}
.cluster-ai,
.ema {
  color: #c084fc;
}
.cluster-fintech {
  color: var(--accent-fintech);
}
.cluster-cyber {
  color: var(--accent-cyber);
}

.symbols {
  display: none;
}

.icon {
  display: block;
  flex: none;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Header & Navigation */
.mast {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(8, 11, 20, 0.86);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-glass);
}

.mast-inner {
  max-width: 1440px;
  margin: auto;
  min-height: 68px;
  display: flex;
  align-items: center;
  gap: clamp(12px, 2.2vw, 32px);
  padding: 0 clamp(16px, 3vw, 48px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: -0.03em;
  font-weight: 800;
  line-height: 1;
  flex: none;
}
.brand-ver {
  font-style: normal;
  font-size: 11px;
  font-family: var(--font-mono);
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 5px;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.3), rgba(56, 189, 248, 0.25));
  border: 1px solid rgba(192, 132, 252, 0.45);
  color: #e9d5ff;
  vertical-align: middle;
}

.stack-logo {
  position: relative;
  width: 28px;
  height: 30px;
  display: inline-block;
  flex: none;
}
.stack-logo i {
  position: absolute;
  left: 3px;
  top: 13px;
  width: 19px;
  height: 13px;
  border-radius: 2px;
  transform: rotate(-27deg) skewX(34deg);
  background: #6d28d9;
  border: 1.2px solid #06080f;
}
.stack-logo i:nth-child(2) {
  top: 8px;
  background: #38bdf8;
}
.stack-logo i:last-child {
  top: 3px;
  background: #10b981;
}

#nav,
.identity,
.btn,
.grade,
.tag,
.flex,
.between,
.quote-head,
.amounts,
.legend,
.chart-key,
.combo,
.page-badges,
.field-head {
  display: flex;
  align-items: center;
}

#nav {
  gap: 4px;
  min-width: 0;
}

.identity {
  margin-left: auto;
  gap: 8px;
  min-width: 0;
}

#player-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 18ch;
}

#mode {
  flex: none;
  white-space: nowrap;
  border-color: rgba(56, 189, 248, 0.35);
  color: #bae6fd;
  background: rgba(56, 189, 248, 0.12);
}

/* Tactile Buttons */
.btn {
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: linear-gradient(180deg, #30313b, #24252e);
  box-shadow: var(--specular), 0 4px 12px rgba(0, 0, 0, 0.28);
  padding: 9px 14px;
  min-height: 40px;
  justify-content: center;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.25;
  gap: 7px;
  color: var(--text-primary);
  transition:
    background 0.16s ease,
    border-color 0.16s ease,
    transform 0.14s ease,
    box-shadow 0.16s ease;
}

.btn:active:not(:disabled) {
  transform: translateY(1px) scale(0.99);
}

@media (hover: hover) {
  .btn:hover:not(:disabled) {
    border-color: rgba(148, 163, 184, 0.55);
    background: linear-gradient(180deg, rgba(53, 64, 102, 0.96), rgba(31, 39, 64, 0.98));
    box-shadow: var(--specular), 0 6px 18px rgba(0, 0, 0, 0.38);
  }
  .btn.primary:hover:not(:disabled) {
    filter: brightness(1.08);
    box-shadow: 0 0 22px rgba(56, 189, 248, 0.35);
  }
  .btn.danger:hover:not(:disabled) {
    filter: brightness(1.08);
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.35);
  }
  .btn.gold-btn:hover:not(:disabled) {
    filter: brightness(1.08);
    box-shadow: 0 0 22px rgba(251, 191, 36, 0.35);
  }
  .btn.epic-btn:hover:not(:disabled) {
    filter: brightness(1.08);
    box-shadow: 0 0 24px rgba(168, 85, 247, 0.4);
  }
}

.btn:disabled {
  opacity: 0.42;
  cursor: default;
  box-shadow: none;
}

.btn.primary {
  background: linear-gradient(165deg, #ffe3aa, #e2b36b);
  border-color: #f8cb78;
  color: #06080f;
  font-weight: 700;
}

.btn.emerald {
  background: linear-gradient(135deg, #10b981, #34d399);
  border-color: rgba(167, 243, 208, 0.6);
  color: #04150e;
  font-weight: 700;
}

.btn.danger {
  background: linear-gradient(135deg, #ef4444, #f43f5e);
  border-color: rgba(254, 202, 202, 0.5);
  color: #fff;
  font-weight: 700;
}

.btn.gold-btn {
  background: linear-gradient(135deg, #fde047, #f59e0b);
  border-color: rgba(254, 243, 199, 0.65);
  color: #1c1304;
  font-weight: 700;
}

.btn.epic-btn {
  background: linear-gradient(135deg, #a855f7, #ec4899);
  border-color: rgba(240, 171, 252, 0.6);
  color: #fff;
  font-weight: 700;
}

.btn.small {
  min-height: 34px;
  padding: 5px 11px;
  font-size: 12.5px;
  border-radius: 8px;
}

.btn.wide {
  width: 100%;
}

.btn.nav-item {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  color: var(--text-muted);
  font-weight: 600;
  padding: 8px 12px;
  min-height: 38px;
}
.btn.nav-item:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  box-shadow: none;
}
.btn.nav-item[aria-current] {
  color: #f8fafc;
  background: #36302b;
  border-color: #76634d;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
}
.nav-item .icon {
  width: 16px;
  height: 16px;
}

/* Main container */
main {
  max-width: 1420px;
  margin: 0 auto;
  padding: clamp(20px, 2.6vw, 38px) clamp(14px, 3vw, 48px) 64px;
}

.page-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.page-title p {
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 14px;
}
.page-badges {
  gap: 8px;
  flex-wrap: wrap;
}

.grade,
.tag,
.combo {
  display: inline-flex;
  gap: 6px;
  width: fit-content;
  max-width: 100%;
  line-height: 1.3;
  white-space: nowrap;
}

.grade {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.18), rgba(56, 189, 248, 0.14));
  color: #a7f3d0;
  border: 1px solid rgba(52, 211, 153, 0.38);
  border-radius: 8px;
  padding: 6px 11px;
  font-size: 12.5px;
  font-weight: 600;
}

.tag,
.combo {
  border: 1px solid var(--border-glass);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  background: rgba(15, 23, 42, 0.78);
  color: var(--text-secondary);
}
.tag.wrap {
  white-space: normal;
}
.tag.positive {
  border-color: rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.14);
  color: #6ee7b7;
}
.tag.negative {
  border-color: rgba(251, 113, 133, 0.45);
  background: rgba(251, 113, 133, 0.14);
  color: #fda4af;
}
.tag.gold {
  border-color: rgba(251, 191, 36, 0.5);
  background: rgba(251, 191, 36, 0.16);
  color: #fde68a;
}
.tag.cyan {
  border-color: rgba(56, 189, 248, 0.45);
  background: rgba(56, 189, 248, 0.14);
  color: #7dd3fc;
}
.tag.purple {
  border-color: rgba(192, 132, 252, 0.5);
  background: rgba(168, 85, 247, 0.16);
  color: #e9d5ff;
}
.tag .icon {
  width: 13px;
  height: 13px;
}

.combo {
  color: #e9d5ff;
  border-color: rgba(168, 85, 247, 0.45);
  background: rgba(168, 85, 247, 0.18);
  font-size: 12px;
}

/* Grids & Glass Panels */
.screen,
.vertical {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.screen.entering {
  animation: arrive 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes arrive {
  from {
    opacity: 0.3;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.station-grid,
.lower-grid,
.board-grid,
.market-grid {
  display: grid;
  gap: 16px;
  align-items: start;
}
.station-grid {
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  align-items: stretch;
}
.lower-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.board-grid,
.market-grid {
  grid-template-columns: minmax(0, 1.65fr) minmax(300px, 1fr);
}

.panel,
.kpis {
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  background: var(--surface-1);
  box-shadow: var(--specular), var(--shadow-card);
  min-width: 0;
}
.panel {
  padding: clamp(16px, 1.7vw, 24px);
}
.panel-accent-purple {
  border-color: rgba(168, 85, 247, 0.32);
}
.panel-accent-cyan {
  border-color: rgba(56, 189, 248, 0.3);
}
.panel-accent-gold {
  border-color: rgba(251, 191, 36, 0.34);
}

/* KPI Strip */
.kpis {
  display: grid;
  grid-template-columns: 1.35fr repeat(4, minmax(0, 1fr));
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(168, 85, 247, 0.12), transparent 35%),
    var(--surface-1);
}
.kpi {
  min-width: 0;
  margin: 16px 0;
  padding: 0 clamp(14px, 1.7vw, 24px);
  border-left: 1px solid var(--border-faint);
}
.kpi:first-child {
  border: 0;
}
.kpi span {
  font-size: 12px;
  font-weight: 600;
  display: block;
  margin-bottom: 4px;
}
.kpi strong {
  font-family: var(--font-display);
  font-size: clamp(17px, 1.7vw, 24px);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.025em;
}
.kpi.capital strong {
  background: linear-gradient(135deg, #f8fafc, #38bdf8, #c084fc);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.prompt {
  color: var(--accent-cloud);
}

/* Terminal / Work Panel */
.work {
  padding: 0;
  overflow: hidden;
}
.work-cover {
  position: relative;
  min-height: 164px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background:
    radial-gradient(ellipse 65% 80% at 85% 30%, rgba(168, 85, 247, 0.2), transparent 65%),
    linear-gradient(135deg, rgba(22, 27, 48, 0.96), rgba(11, 15, 28, 0.98));
  border-bottom: 1px solid var(--border-glass);
}
.work-intro {
  padding: 20px 0 20px clamp(16px, 1.7vw, 24px);
  flex: 1;
  min-width: 0;
}
.work-cover h2 {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.work-cover h2 .icon {
  color: var(--accent-cloud);
}
.hardware {
  font-family: var(--font-display);
  font-size: clamp(19px, 1.9vw, 26px);
  letter-spacing: -0.03em;
  line-height: 1.18;
}
.laptop {
  width: 42%;
  max-height: 170px;
  flex: none;
  display: block;
}
.experience {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
  font-size: 12px;
}
.life-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.work-body {
  padding: 16px clamp(16px, 1.7vw, 24px) 18px;
}
.between {
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.between h2 {
  margin: 0;
}
.work-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0;
}
.work-actions .btn {
  justify-content: start;
}
.work-log {
  display: flex;
  gap: 9px;
  font: 12px/1.55 var(--font-mono);
  color: var(--text-secondary);
  padding: 11px 13px;
  background: var(--inset);
  border: 1px solid var(--border-faint);
  border-radius: 10px;
  white-space: pre-wrap;
}

/* Vitals */
.vital {
  margin: 16px 0;
}
.vital .detail {
  border: 0;
  padding: 0 0 7px;
  margin: 0;
}
.detail {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--border-faint);
  padding: 9px 0;
  font-size: 13.5px;
}
.detail strong {
  text-align: right;
  font-weight: 600;
}

.meter {
  appearance: none;
  width: 100%;
  height: 8px;
  display: block;
  border: none;
  border-radius: 99px;
  overflow: hidden;
  background: rgba(148, 163, 184, 0.16);
  color: var(--meter, var(--accent-cloud));
}
.meter::-webkit-progress-bar {
  background: rgba(148, 163, 184, 0.16);
  border-radius: 99px;
}
.meter::-webkit-progress-value {
  background: var(--meter, var(--accent-cloud));
  border-radius: 99px;
  transition: width 0.26s ease-out;
}
.meter::-moz-progress-bar {
  background: var(--meter, var(--accent-cloud));
  border-radius: 99px;
}
.meter.energy {
  --meter: linear-gradient(90deg, #10b981, #38bdf8);
}
.meter.burnout {
  --meter: linear-gradient(90deg, #fb923c, #ef4444);
}
.meter.debt {
  --meter: linear-gradient(90deg, #a855f7, #f43f5e);
}
.meter.quest {
  --meter: linear-gradient(90deg, #38bdf8, #a855f7);
}
.vital .warning {
  margin-top: 5px;
}

.daily-row,
.list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--border-faint);
  padding: 12px 0;
}
.list-row > div,
.daily-row > div,
.between > * {
  min-width: 0;
}
.daily-row {
  margin-top: 18px;
  padding-bottom: 0;
}
.list-row:last-child {
  padding-bottom: 0;
}
.list-row small,
.daily-row small {
  margin-top: 3px;
}

/* Segmented Controls */
.segmented {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 3px;
  padding: 3px;
  background: var(--inset);
  border: 1px solid var(--border-glass);
  border-radius: 10px;
  max-width: 100%;
  margin-bottom: 14px;
}
.segmented .btn {
  min-height: 32px;
  border: 0;
  background: transparent;
  box-shadow: none;
  font-size: 12.5px;
  color: var(--text-muted);
  padding: 6px 11px;
  border-radius: 7px;
}
.segmented .btn[aria-pressed='true'],
.progression-editions .btn[aria-pressed='true'] {
  background: #373641;
  color: var(--text-primary);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.flex,
.amounts,
.legend,
.quote-head,
.chart-key {
  gap: 8px;
  flex-wrap: wrap;
}

.empty,
.notice {
  padding: 10px 0;
  font-size: 13.5px;
}

.recovery {
  max-width: 540px;
}
.recovery .btn,
.roll-log,
.panel > .wide,
.panel > .primary,
.panel > .btn {
  margin-top: 14px;
}

/* Bug-Hunt & Narrative Dilemma Cards */
.code-snippet {
  margin: 12px 0;
  padding: 13px 14px;
  background: #070b15;
  border: 1px solid rgba(56, 189, 248, 0.26);
  border-radius: 10px;
  font-size: 12.5px;
  line-height: 1.55;
  color: #e2e8f0;
  overflow-x: auto;
  white-space: pre;
}

.choice-list {
  display: grid;
  gap: 9px;
  margin-top: 12px;
}
.choice-btn {
  text-align: left;
  justify-content: flex-start;
  flex-direction: column;
  align-items: flex-start;
  padding: 11px 13px;
  min-height: 48px;
  gap: 4px;
}
.choice-btn .choice-title {
  font-weight: 600;
  font-size: 13.5px;
  color: var(--text-primary);
}
.choice-btn .choice-hint {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.result-box {
  margin-top: 12px;
  padding: 13px 14px;
  border-radius: 12px;
  border: 1px solid rgba(56, 189, 248, 0.35);
  background: rgba(15, 23, 42, 0.85);
  display: grid;
  gap: 8px;
}
.result-box.win {
  border-color: rgba(16, 185, 129, 0.45);
  background: linear-gradient(155deg, rgba(16, 185, 129, 0.14), rgba(12, 16, 29, 0.94));
}
.result-box.lose {
  border-color: rgba(251, 113, 133, 0.45);
  background: linear-gradient(155deg, rgba(251, 113, 133, 0.14), rgba(12, 16, 29, 0.94));
}

.progression-panel {
  border-top-color: var(--accent-gold);
}
.progression-body {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  align-items: start;
  gap: 16px;
  margin-top: 14px;
}
.progression-stage,
.progression-aside {
  padding: 14px;
  border: 1px solid var(--border-glass);
  border-radius: 10px;
  background: var(--inset);
}
.progression-stage .story-text,
.progression-stage h4,
.progression-stage .choice-list {
  margin: 0;
}
.progression-editions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.progression-score {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
}
.progression-score > div {
  flex: 1 1 0;
  padding: 8px;
  border: 1px solid var(--border-faint);
  border-radius: 6px;
}
.progression-score dt {
  font-size: 12px;
  white-space: nowrap;
}
.progression-score dd {
  margin: 2px 0 0;
  font-weight: 650;
}
.progression-practicum {
  justify-items: start;
  padding-top: 14px;
  border-top: 1px solid var(--border-faint);
}
.progression-aside,
.progression-aside .vertical {
  gap: 9px;
}
@media (max-width: 760px) {
  .progression-body {
    grid-template-columns: minmax(0, 1fr);
  }
}

.story-text {
  margin-top: 8px;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.55;
}

/* Quests */
.quest-item {
  border-top: 1px solid var(--border-faint);
  padding: 12px 0;
  display: grid;
  gap: 8px;
}
.quest-item:first-of-type {
  border-top: 0;
  padding-top: 4px;
}

/* Roguelike Tech Stack & Holographic Foil Cards */
.slot-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.inventory-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.tech-card {
  position: relative;
  border-radius: 14px;
  padding: 14px;
  display: grid;
  gap: 8px;
  align-content: start;
  border: 1.5px solid #475569;
  background: linear-gradient(155deg, rgba(28, 35, 58, 0.92), rgba(14, 18, 32, 0.96));
  box-shadow: var(--specular), 0 10px 24px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  min-width: 0;
}
.tech-card::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
}

.tech-card.empty-slot {
  border-style: dashed;
  border-color: rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.48);
  box-shadow: none;
}

.rarity-common { --foil: linear-gradient(125deg,#333b49,#adb6c6,#465061); --metal: #adb6c6; }
.rarity-rare { --foil: linear-gradient(125deg,#314262,#82c9ff 49%,#304f70 70%); --metal: #82c9ff; }
.rarity-epic { --foil: linear-gradient(125deg,#45335a,#d3aeff 35%,#765492 43%,#d3aeff 56%,#362946); --metal: #c49aff; }
.rarity-legendary { --foil: linear-gradient(125deg,#70512c,#f8cb78 32%,#e9a9d7 50%,#8ed7f4 66%,#77582c); --metal: #f8cb78; }
.tech-card:not(.empty-slot) {
  border: 2px solid transparent;
  background: linear-gradient(145deg,#282832,#181922 70%) padding-box, var(--foil) border-box;
}
.card-emblem {
  display: grid; place-items: center; width: 100%; height: 82px;
  color: var(--metal,#858594);
  background: radial-gradient(ellipse at 45% 85%, #ffffff14, transparent 68%);
}
.card-emblem .icon {
  width: 48px; height: 48px; stroke-width: 1.4;
  filter: drop-shadow(0 3px 0 #090a10) drop-shadow(1px 5px 4px #0008);
}
.rarity-pill { justify-self: start; }

.tech-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.tech-slot-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}
.tech-slot-label .icon {
  width: 14px;
  height: 14px;
}
.tech-card-name {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.28;
}
.tech-card-effect {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #a7f3d0;
  font-weight: 600;
}
.tech-card-flavor {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}
.tech-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 4px;
}

.rarity-pill {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 5px;
  letter-spacing: 0.04em;
}
.rarity-pill.common {
  background: rgba(100, 116, 139, 0.25);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.35);
}
.rarity-pill.rare {
  background: rgba(56, 189, 248, 0.2);
  color: #7dd3fc;
  border: 1px solid rgba(56, 189, 248, 0.45);
}
.rarity-pill.epic {
  background: rgba(168, 85, 247, 0.22);
  color: #e9d5ff;
  border: 1px solid rgba(192, 132, 252, 0.5);
}
.rarity-pill.legendary {
  background: linear-gradient(135deg, rgba(253, 224, 71, 0.28), rgba(244, 114, 182, 0.25));
  color: #fef08a;
  border: 1px solid rgba(253, 224, 71, 0.6);
}

/* Active Synergies */
.synergy-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.synergy-card {
  padding: 13px 15px;
  border-radius: 12px;
  border: 1px solid rgba(192, 132, 252, 0.45);
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.18), rgba(251, 191, 36, 0.1), rgba(12, 16, 29, 0.94));
  box-shadow: 0 0 22px rgba(168, 85, 247, 0.14);
  display: grid;
  gap: 5px;
}
.synergy-card strong {
  font-family: var(--font-display);
  font-size: 14px;
  color: #fde68a;
}

.pack-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

/* Board */
.board-panel {
  padding: clamp(12px, 1.5vw, 20px);
}
.board-panel .between {
  margin-bottom: 12px;
}
.board-canvas {
  display: block;
  width: min(100%, 660px);
  aspect-ratio: 1;
  margin: auto;
  cursor: pointer;
  border-radius: 12px;
}
.legend {
  margin-top: 12px;
  justify-content: center;
  color: var(--text-muted);
  font-size: 11.5px;
  gap: 14px;
}
.legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.swatch {
  width: 9px;
  height: 9px;
  border-radius: 3px;
  background: currentColor;
}

select,
input {
  border: 1px solid var(--border-strong);
  background: #0a0f1d;
  border-radius: 9px;
  padding: 10px 12px;
  max-width: 100%;
  min-width: 0;
  caret-color: var(--accent-fintech);
  color: var(--text-primary);
}
input::placeholder {
  color: var(--text-muted);
}
.panel > select {
  width: 100%;
  margin-bottom: 14px;
}

.big-name {
  font-family: var(--font-display);
  font-size: 21px;
  margin: 12px 0 8px;
}

.sector-actions,
.form,
.role {
  display: grid;
  gap: 10px;
}
.sector-actions {
  margin: 14px 0;
}

/* Market & Futures */
.quote-head {
  margin: 16px 0 10px;
}
.quote {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(24px, 2.7vw, 38px);
  letter-spacing: -0.03em;
}
.chart-panel .segmented {
  margin: 0;
}
.market-canvas {
  width: 100%;
  height: clamp(240px, 26vw, 360px);
  display: block;
  cursor: crosshair;
  touch-action: pan-y;
  border-radius: 10px;
}
.chart-key,
.quote-readout,
.connection {
  font: 12px/1.6 var(--font-mono);
  color: var(--text-muted);
}
.chart-key {
  margin: 10px 0;
}
.ema::before,
.entry-key::before,
.liq-key::before {
  content: '';
  display: inline-block;
  width: 15px;
  height: 2px;
  background: currentColor;
  vertical-align: middle;
  margin-right: 5px;
}
.entry-key {
  color: var(--accent-fintech);
}
.liq-key {
  color: var(--accent-danger);
}
.entry-key::before,
.liq-key::before {
  background: repeating-linear-gradient(90deg, currentColor 0 5px, transparent 5px 8px);
}
.quote-readout {
  border-top: 1px solid var(--border-faint);
  padding-top: 10px;
}
.amounts {
  margin-top: 10px;
}
.amounts .btn {
  flex: 1;
}
.panel > .muted,
.connection {
  margin-top: 10px;
}
.connection {
  display: block;
}

.futures-controls {
  display: grid;
  gap: 12px;
}
.futures-pos-card {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border-glass);
  background: var(--inset);
  display: grid;
  gap: 8px;
}
.futures-pos-card.long {
  border-left: 3px solid var(--accent-cloud);
}
.futures-pos-card.short {
  border-left: 3px solid var(--accent-danger);
}
.insight-card {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(168, 85, 247, 0.45);
  background: linear-gradient(155deg, rgba(168, 85, 247, 0.16), rgba(12, 16, 29, 0.95));
  display: grid;
  gap: 6px;
}

/* Company, Roles, Boss Raid, Auctions */
.field {
  display: grid;
  gap: 5px;
  font-size: 13px;
}
.field-head {
  justify-content: space-between;
  gap: 8px;
}
.form {
  margin-top: 14px;
}
.invite-code {
  user-select: all;
  color: var(--accent-fintech);
  font-size: 17px;
  font-weight: 700;
}

.roles,
.gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.role {
  padding: 14px;
  background: var(--inset);
  border: 1px solid var(--border-faint);
  border-radius: 12px;
  align-content: start;
}
.role.vacant {
  border-style: dashed;
  border-color: rgba(148, 163, 184, 0.3);
}
.role-head {
  display: flex;
  align-items: center;
  gap: 8px;
}
.role-head .icon {
  color: var(--accent-gold);
}
.role p {
  font-size: 12.5px;
  line-height: 1.45;
}

.buff-list {
  display: grid;
  gap: 7px;
  margin-top: 10px;
}
.buff-row {
  padding: 8px 11px;
  border-radius: 8px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.28);
  font-size: 13px;
  color: #d1fae5;
}

/* Prod Boss Arena */
.boss-panel {
  position: relative;
  overflow: hidden;
  border-color: rgba(239, 68, 68, 0.45);
  background:
    radial-gradient(ellipse 75% 50% at 50% 0%, rgba(239, 68, 68, 0.2), transparent 65%),
    var(--surface-1);
}
.boss-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: repeating-linear-gradient(
    -45deg,
    #ef4444 0 12px,
    #1c1118 12px 24px
  );
}
.boss-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 12px 0;
}
.boss-emblem {
  width: 58px;
  height: 58px;
  border-radius: 14px;
  flex: none;
  display: grid;
  place-items: center;
  background: radial-gradient(circle, rgba(239, 68, 68, 0.3), rgba(15, 10, 20, 0.92));
  border: 1.5px solid rgba(251, 113, 133, 0.6);
  color: #fda4af;
  box-shadow: 0 0 24px rgba(239, 68, 68, 0.28);
}
.boss-emblem .icon {
  width: 30px;
  height: 30px;
}
.boss-title {
  font-family: var(--font-display);
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.2;
}
.hp-segments {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 3px;
  margin: 10px 0 12px;
}
.hp-seg {
  height: 12px;
  border-radius: 3px;
  background: rgba(148, 163, 184, 0.16);
}
.hp-seg.on {
  background: linear-gradient(180deg, #fb7185, #dc2626);
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.45);
}
.boss-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
}
.dmg-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}
.dmg-row {
  display: grid;
  gap: 4px;
  padding: 8px 10px;
  border-radius: 9px;
  background: var(--inset);
  border: 1px solid var(--border-faint);
}

/* Auctions */
.auction-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.auction-card {
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(251, 191, 36, 0.34);
  background:
    radial-gradient(ellipse 70% 50% at 100% 0%, rgba(251, 191, 36, 0.12), transparent 60%),
    var(--surface-2);
  display: grid;
  gap: 9px;
}
.auction-price {
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--accent-gold);
}
.auction-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Leaderboard & 7-Canvas Gallery */
.panel > .meter {
  margin: 10px 0;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  table-layout: fixed;
}
th,
td {
  text-align: left;
  border-bottom: 1px solid var(--border-faint);
  padding: 10px 4px;
}
th {
  color: var(--text-muted);
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
th:first-child,
td:first-child {
  width: 34px;
}
th:last-child,
td:last-child {
  width: 38%;
  text-align: right;
}
.rank {
  color: var(--accent-gold);
  font-weight: 700;
}
.align-right {
  text-align: right;
}

.gallery {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.gallery figure {
  min-width: 0;
  background: var(--inset);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  overflow: hidden;
  display: grid;
}
.image-btn,
.image-error {
  display: grid;
  place-items: center;
  background: #080c17;
  border: 0;
  padding: 0;
  width: 100%;
  aspect-ratio: 1.65;
  overflow: hidden;
}
.image-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.image-error {
  align-content: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 12.5px;
  padding: 12px;
}
figcaption {
  padding: 9px 11px;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-top: 1px solid var(--border-faint);
}

/* Lightbox Dialog */
.lightbox {
  padding: 0;
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  background: #0a0f1e;
  color: var(--text-primary);
  max-width: min(94vw, 1120px);
  max-height: 92vh;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.78);
}
.lightbox::backdrop {
  background: rgba(3, 5, 11, 0.8);
  backdrop-filter: blur(6px);
}
.lightbox-frame {
  display: grid;
  max-height: 92vh;
}
.lightbox-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-glass);
}
.lightbox-body {
  padding: 12px;
  overflow: auto;
  display: grid;
  place-items: center;
}
.lightbox-body img {
  max-width: 100%;
  max-height: 78vh;
  border-radius: 10px;
  display: block;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  z-index: 30;
  transform: translate(-50%, 10px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.18s, opacity 0.18s;
  width: max-content;
  max-width: min(92vw, 600px);
  max-height: 30vh;
  overflow: auto;
  overflow-wrap: anywhere;
  background: linear-gradient(135deg, #10b981, #38bdf8);
  color: #04121b;
  font-weight: 700;
  border-radius: 12px;
  padding: 11px 18px;
  font-size: 13.5px;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.55);
}
.toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
.toast.error {
  background: linear-gradient(135deg, #fb7185, #ef4444);
  color: #fff;
}

/* Studio surfaces and engraved dashboard numbers. */
.mast { background: #111218f5; }
.stack-logo i { background: #765332; }
.stack-logo i:nth-child(2) { background: #bf915c; }
.stack-logo i:last-child { background: #f8d8a0; }
.brand-ver { color: #f8cb78; background: #302a21; border-color: #68553c; }
.kpis { background: linear-gradient(115deg,#37302a,#22232b 36%,#171922); }
.kpi strong { font-family: var(--font-mono); }
.kpi.capital strong { background: none; color: var(--accent-gold); }
.work-cover {
  background: radial-gradient(ellipse at 80% 80%,#55514a 0,transparent 49%),
    repeating-linear-gradient(128deg,#ffffff03 0 1px,transparent 1px 11px),linear-gradient(110deg,#27262c,#1b1c25);
}
.laptop { filter: drop-shadow(6px 8px 6px #101016); }
.loadout { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; margin:8px 0 14px; }
.loadout-slot { display:grid; align-content:start; gap:6px; min-width:0; padding:12px 8px; background:var(--inset); border:1px solid var(--border-faint); border-radius:6px; }
.loadout-slot .icon { color:var(--accent-gold); }
.loadout-slot small { font:11px/1.4 var(--font-mono); }
.sale-form { margin-top:16px; }
.sale-form summary { cursor:pointer; padding-block:12px; }
.screen > .segmented { justify-self:start; }
.board-canvas { background: radial-gradient(ellipse at 32% 17%,#32313a,#181922 65%); box-shadow:inset 0 2px 3px #ffffff30, inset 0 -3px 6px #0009; }
.tag { white-space:normal; }
input, select { min-width:0; max-width:100%; }
.form, .form > label { min-width:0; }
.screen, .vertical { align-content:start; }
@media (max-width:860px) {
  .mast { backdrop-filter:none; }
  .mast-inner { justify-content:space-between; }
}
@media (max-width:600px) {
  .loadout { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .card-emblem { height:56px; }
}
/* Responsive Breakpoints */
@media (max-width: 1120px) {
  .slot-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .inventory-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .mast-inner {
    gap: 10px;
    padding-inline: 18px;
  }
  .nav-item.btn {
    padding-inline: 9px;
    font-size: 13px;
  }
  #player-name {
    max-width: 10ch;
  }
}

@media (max-width: 860px) {
  .mast-inner {
    min-height: 56px;
  }
  .brand {
    font-size: 16px;
  }
  #nav {
    position: fixed;
    bottom: 0;
    inset-inline: 0;
    z-index: 15;
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 2px;
    background: rgba(8, 11, 20, 0.96);
    backdrop-filter: blur(18px);
    border-top: 1px solid var(--border-strong);
    padding: 5px 4px max(5px, env(safe-area-inset-bottom));
  }
  .btn.nav-item {
    flex-direction: column;
    gap: 3px;
    padding: 5px 1px;
    font-size: 10.5px;
    min-height: 48px;
    border-radius: 8px;
  }
  .nav-item .icon {
    width: 17px;
    height: 17px;
  }
  #player-name {
    max-width: 16ch;
  }
  main {
    padding-bottom: calc(84px + env(safe-area-inset-bottom));
  }
  .toast {
    bottom: calc(70px + env(safe-area-inset-bottom));
  }
  .station-grid,
  .board-grid,
  .market-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .roles,
  .auction-grid,
  .synergy-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  main {
    padding-inline: 12px;
    padding-top: 18px;
  }
  .mast-inner {
    padding-inline: 12px;
  }
  .page-title {
    align-items: start;
    gap: 8px;
    margin-bottom: 14px;
  }
  .page-title p {
    font-size: 12.5px;
  }
  h1 {
    font-size: 24px;
  }
  h2 {
    font-size: 15px;
    margin-bottom: 12px;
  }
  .screen,
  .station-grid,
  .lower-grid,
  .board-grid,
  .market-grid,
  .vertical {
    gap: 12px;
  }
  .kpis {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
  .kpi {
    grid-column: span 2;
    margin: 0;
    border-left: 0;
    padding: 10px 10px;
  }
  .kpi:nth-child(-n + 2) {
    grid-column: span 3;
    border-bottom: 1px solid var(--border-faint);
  }
  .kpi:nth-child(2),
  .kpi:nth-child(n + 4) {
    border-left: 1px solid var(--border-faint);
  }
  .kpi span {
    font-size: 11px;
  }
  .kpi strong {
    font-size: clamp(12.5px, 3.5vw, 15.5px);
  }
  .kpi:nth-child(-n + 2) strong {
    font-size: 18px;
  }
  .work-cover {
    min-height: 132px;
  }
  .work-intro {
    padding-block: 14px;
  }
  .hardware {
    font-size: 18px;
  }
  .laptop {
    width: 38%;
  }
  .work-actions .btn,
  .boss-actions .btn {
    font-size: 12.5px;
    padding: 8px 9px;
    min-height: 40px;
  }
  .lower-grid,
  .roles,
  .inventory-grid,
  .synergy-list,
  .pack-row,
  .auction-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .slot-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }
  .gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }
  .btn.small {
    min-height: 44px;
  }
  .segmented .btn, .work-actions .btn, .boss-actions .btn, .btn, input, select { min-height:44px; }
  #player-name {
    max-width: 11ch;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

.card-emblem {
  position: relative;
  isolation: isolate;
  background: radial-gradient(ellipse at 50% 70%, #ffffff10, transparent 65%);
}
.card-emblem::before {
  content: '';
  position: absolute;
  z-index: -1;
  width: 75px;
  height: 65px;
  clip-path: polygon(50% 0, 97% 24%, 97% 76%, 50% 100%, 3% 76%, 3% 24%);
  background:
    linear-gradient(151deg, transparent 30%, #ffffff24 31%, transparent 32% 67%, #05060c80 68%),
    linear-gradient(28deg, #22232c 25%, transparent 26% 72%, #ffffff35 73%),
    linear-gradient(145deg, var(--metal, #777680), #282833 46%, #16161d);
}
.card-emblem .icon { width: 36px; height: 36px; }
.synergy-card + .synergy-card { margin-top: 8px; }
.pack-row .btn {
  min-height: 104px;
  flex-direction: column;
  border-color: #917857;
  color: #fae5b9;
  background:
    repeating-linear-gradient(90deg, #0006 0 2px, transparent 2px 5px) top / 100% 6px no-repeat,
    repeating-linear-gradient(90deg, #0006 0 2px, transparent 2px 5px) bottom / 100% 6px no-repeat,
    linear-gradient(115deg, #483a2b 8%, #6a553a 20%, #393129 23%, #28262a 64%, #514438);
}
.pack-row .epic-btn {
  border-color: #b999cc;
  color: #f1ddff;
  background-color: #40314d;
  background-blend-mode: soft-light, soft-light, luminosity;
}
.pack-row .icon { width: 28px; height: 28px; }
.boss-hero {
  padding: clamp(14px, 3vw, 32px);
  border-block: 1px solid #63474b;
  background:
    repeating-radial-gradient(circle at 42px 50%, transparent 0 24px, #ff919411 25px 26px),
    linear-gradient(100deg, #40292e, #1b1b23 78%);
}
.boss-emblem { width: 64px; height: 64px; border-radius: 50%; }
.boss-emblem .icon { width: 40px; height: 40px; }
@media (max-width: 860px) {
  #nav { grid-template-columns: 1fr .87fr .9fr 1fr 1fr 1.21fr .82fr; }
  .btn.nav-item { white-space: nowrap; }
}
@media (max-width: 600px) {
  .card-emblem::before { width: 58px; height: 53px; }
  .card-emblem .icon { width: 29px; height: 29px; }
  .pack-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Reveal focused controls between the sticky header and the mobile tab bar. */
html { scroll-padding-block-start: 76px; }
@media (max-width: 860px) {
  html { scroll-padding-block: 64px calc(72px + env(safe-area-inset-bottom)); }
}

.career-panel {
  display: grid;
  gap: 14px;
}
.career-panel > h2 {
  margin-bottom: 0;
}
.career-card {
  display: grid;
  min-width: 0;
  align-content: start;
  gap: 10px;
  padding: clamp(12px, 2vw, 18px);
  border: 1px solid var(--border-faint);
  border-radius: 12px;
  background: linear-gradient(145deg, #ffffff08, #00000020);
}
.career-card h3,
.career-card h4,
.career-card p,
.career-offer-terms {
  margin: 0;
}
.career-grid,
.career-facts {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 245px), 1fr));
}
.career-facts {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 128px), 1fr));
}
.career-facts .detail {
  align-items: start;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.career-offer-terms dt {
  color: var(--text-muted);
  font-size: .85rem;
}
.career-offer-terms dd {
  margin: 0 0 8px;
}
.career-choice {
  min-height: 44px;
  justify-content: flex-start;
  text-align: start;
}
