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

:root {
  --bg: #0e0e0e;
  --bg2: #141414;
  --bg3: #1c1c1c;
  --border: rgba(255,255,255,0.08);
  --border-hover: rgba(255,255,255,0.16);
  --text: #e8e4dc;
  --muted: #7a7a72;
  --orange: #e85d04;
  --orange-dim: rgba(232,93,4,0.12);
  --orange-glow: rgba(232,93,4,0.06);
  --green: #22c55e;
  --font-display: 'Bebas Neue', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --font-mono: 'DM Mono', monospace;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-full: 999px;
  --grad-accent: linear-gradient(90deg, #F39524 0%, #EF6A28 50%, #E23B2E 100%);
  --grad-accent-halo: rgba(239, 106, 40, 0.18);
  --on-accent: #2a1206;
}

.is-gradient-text {
  background: var(--grad-accent);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.65;
  overflow-x: hidden;
}

/* ── NAV ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
  height: 60px;
  background: rgba(14,14,14,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 0.04em;
  color: var(--text);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  line-height: 1;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  justify-content: flex-end;
}
.nav-dot { color: var(--orange); }

.nav-logo-role {
  font-family: var(--font-body);
  font-size: 17px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--orange);
  margin-left: 14px;
  padding-left: 14px;
  border-left: 1px solid rgba(232,93,4,0.3);
  font-weight: 600;
  white-space: nowrap;
  line-height: 1;
  align-self: center;
}

.nav-contact {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  overflow: hidden;
  flex-shrink: 0;
  height: 34px;
  transition: border-color 0.2s;
}
.nav-contact:hover { border-color: var(--border-hover); }
.nav-contact-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 14px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s, background 0.2s;
}
.nav-contact-btn svg { width: 13px; height: 13px; flex-shrink: 0; }
.nav-contact-btn:hover { color: var(--text); background: rgba(255,255,255,0.05); }
.nav-contact-btn--linkedin:hover { color: #378fe9; background: rgba(10,102,194,0.08); }
.nav-contact-btn--mail:hover { color: var(--orange); background: transparent; }
.nav-contact-sep {
  width: 1px;
  background: var(--border);
  flex-shrink: 0;
  align-self: stretch;
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
  flex-shrink: 0;
}
.nav-links a {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--orange); }


@keyframes nav-ach-appear {
  0%   { opacity: 0;   filter: none; }
  22%  { opacity: 1;   filter: drop-shadow(0 0 8px rgba(91,156,246,0.95)) drop-shadow(0 0 18px rgba(91,156,246,0.45)); }
  60%  { opacity: 0.7; filter: drop-shadow(0 0 5px rgba(91,156,246,0.55)); }
  100% { opacity: 0.4; filter: none; }
}

.nav-ach-icon {
  opacity: 0.4;
  font-size: 22px;
  line-height: 1;
  transition: opacity 0.2s ease, filter 0.2s ease !important;
  user-select: none;
}
.nav-ach-icon.is-new {
  animation: nav-ach-appear 2.8s ease forwards;
}
.nav-links .nav-ach-icon:hover {
  opacity: 1;
  filter: drop-shadow(0 0 7px rgba(91, 156, 246, 0.8));
}

@media (max-width: 1150px) {
  .nav-logo-role { display: none; }
}

/* ── HERO ── */
.hero {
  padding: 132px 48px 16px;
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 56px;
  align-items: start;
}

.hero-content { min-width: 0; }

.hero-aside {
  min-width: 0;
}

.hero-photo-wrap {
  position: relative;
  width: 100%;
  padding-top: 15%;
  padding-bottom: 21%;
  line-height: 0;
}

.hero-photo {
  width: 100%;
  max-width: 100%;
  display: block;
  border-radius: var(--radius);
}

.photo-annotations {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.annot-text {
  font-family: 'Caveat', cursive;
  font-weight: 600;
  fill: #e8e4dc;
  stroke: #0e0e0e;
  stroke-width: 0.45;
  paint-order: stroke fill;
}

.annot-curve {
  fill: none;
  stroke: #e8e4dc;
  stroke-width: 0.45;
  opacity: 0.85;
}

.hero-name-row {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 18px;
}

.hero-avatar {
  height: clamp(48px, 6.8vw, 92px);
  width: clamp(48px, 6.8vw, 92px);
  border-radius: var(--radius);
  object-fit: cover;
  object-position: center 25%;
  display: block;
  flex-shrink: 0;
}

.hero-greeting {
  font-family: var(--font-body);
  font-size: 22px;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 24px;
  display: inline-flex;
  align-items: center;
  gap: 14px;
}
#hero-wave {
  cursor: pointer;
  display: inline-block;
}
#hero-wave.is-waving {
  animation: wave-hand 0.55s ease-in-out forwards;
}
@keyframes wave-hand {
  0%   { transform: rotate(0deg)   scale(1); }
  20%  { transform: rotate(22deg)  scale(1.25); }
  50%  { transform: rotate(-12deg) scale(1.15); }
  80%  { transform: rotate(10deg)  scale(1.1); }
  100% { transform: rotate(0deg)   scale(1); }
}

.hero-greeting::before {
  content: '';
  display: block;
  width: 32px;
  height: 2px;
  background: var(--orange);
  border-radius: var(--radius-full);
}

.hero-name {
  font-family: var(--font-display);
  font-size: clamp(48px, 6.8vw, 92px);
  line-height: 0.95;
  letter-spacing: 0.01em;
  color: var(--text);
  white-space: nowrap;
}

.hero-role {
  display: inline-flex;
  align-items: center;
  gap: 0;
  background: var(--grad-accent);
  color: #fff;
  font-family: var(--font-display);
  font-size: 26px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 9px 20px;
  border-radius: 8px;
  margin-bottom: 24px;
  text-shadow: 0 1px 2px rgba(80, 20, 0, 0.35);
  line-height: 1;
}

.hero-role-sep {
  font-size: 6px;
  line-height: 1;
  opacity: 0.9;
  margin: 0 12px;
  vertical-align: middle;
}

.hero-location {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 36px;
}

.hero-bio {
  max-width: 600px;
  margin-bottom: 18px;
}
.hero-bio p {
  color: var(--text);
  font-size: 16px;
  line-height: 1.75;
  margin-bottom: 18px;
}
.hero-bio p strong { color: var(--orange); font-weight: 500; }
.hero-bio .about-tags { margin-top: 28px; }

.hero-actions {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

.btn-primary {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--bg2);
  color: var(--text);
  border: 1px solid var(--border-hover);
  padding: 13px 26px;
  border-radius: var(--radius-full);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-primary:hover { border-color: var(--orange); background: var(--bg3); }

.btn-secondary {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: transparent;
  color: var(--text);
  padding: 13px 26px;
  border-radius: var(--radius-full);
  text-decoration: none;
  font-weight: 500;
  border: 1px solid var(--border-hover);
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-secondary:hover {
  border-color: var(--orange);
  color: var(--orange);
  transform: translateY(-1px);
}

/* Hero bottom row: info strip */
.hero-bottom-row {
  margin-top: 20px;
}

/* Hero horizontal info strip */
.hero-info-strip {
  display: inline-flex;
  align-items: stretch;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  max-width: 100%;
}

.hero-strip-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  flex-shrink: 0;
}

.hero-strip-sep {
  width: 1px;
  background: var(--border);
  flex-shrink: 0;
  align-self: stretch;
}

.hero-strip-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 16px;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
}
a.hero-strip-item:hover .hero-strip-value { color: var(--orange); }

.hero-strip-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero-strip-value {
  font-size: 13px;
  color: var(--text);
  font-weight: 500;
}

.hero-strip-mail {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  color: var(--muted);
  transition: color 0.2s, background 0.2s;
  text-decoration: none;
  flex-shrink: 0;
}
.hero-strip-mail:hover {
  background: var(--orange-dim);
  color: var(--orange);
}
.hero-strip-mail svg { width: 16px; height: 16px; }

/* CV download button */
.btn-cv {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--bg2);
  color: var(--text);
  padding: 14px 22px;
  border: 1px solid var(--border-hover);
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s;
}
.btn-cv:hover {
  border-color: var(--orange);
  background: var(--bg3);
}
.hero-bio-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-cv-icon {
  width: 22px;
  height: 22px;
  color: var(--orange);
  flex-shrink: 0;
}
.btn-cv-meta {
  color: var(--muted);
  margin-left: auto;
  padding-left: 14px;
  border-left: 1px solid var(--border);
  font-size: 10px;
  letter-spacing: 0.08em;
}

/* ── STATS BAR ── */
.stats-bar {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg2);
}
.stats-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 48px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.stat-item {
  padding: 14px 32px;
  border-right: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
}
.stat-item:first-child { padding-left: 0; }
.stat-item:last-child { border-right: none; }

.stat-value {
  font-family: var(--font-display);
  font-size: 34px;
  line-height: 1;
  letter-spacing: 0.01em;
  flex-shrink: 0;
  color: var(--orange);
}
.stat-value span { color: var(--orange); }

.stat-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ── SECTION ── */
.section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 96px 48px;
}

#projects {
  padding-top: 0;
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.section-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 8px;
}

.section-title {
  font-family: var(--font-display);
  font-size: 52px;
  line-height: 1;
  letter-spacing: 0.01em;
}

/* ── ABOUT ── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 40px;
  align-items: start;
}

.about-text p {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.8;
  margin-bottom: 20px;
}
.about-text p strong { color: var(--text); font-weight: 500; }

.about-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
}

.tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 14px;
  border: 1px solid var(--border-hover);
  color: var(--muted);
  border-radius: var(--radius-full);
  transition: color 0.2s, border-color 0.2s;
}
.tag:hover { color: var(--text); border-color: rgba(255,255,255,0.25); }

/* About info card */
.about-info-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  position: sticky;
  top: 76px;
}

.availability-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.availability-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18);
}

.availability-text {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
}

.info-rows { display: flex; flex-direction: column; gap: 0; }

.info-row {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.info-row:last-child { border-bottom: none; }

.info-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.info-value {
  font-size: 14px;
  color: var(--text);
  font-weight: 500;
}
a.info-value {
  text-decoration: none;
  transition: color 0.2s;
}
a.info-value:hover { color: var(--orange); }

.info-card-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 24px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--orange);
  color: #0e0e0e;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.2s;
}
.info-card-cta:hover { opacity: 0.88; }
.info-card-cta svg { width: 16px; height: 16px; }

/* ── EXPERIENCE ── */
.experience-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  margin-bottom: 12px;
  transition: border-color 0.2s ease, transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
  will-change: transform;
  cursor: default;
}
.experience-card:hover {
  border-color: var(--border-hover);
  transform: scale(1.04);
  z-index: 2;
}
.experience-card:hover .pli-tag {
  color: var(--orange);
  border-color: rgba(232,93,4,0.45);
}


.exp-header {
  display: flex;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.exp-header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.exp-header-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.exp-logo {
  width: 128px;
  height: 128px;
  object-fit: contain;
  border-radius: 16px;
  background: var(--bg3);
  padding: 4px;
  flex-shrink: 0;
}

.exp-company {
  font-family: var(--font-display);
  font-size: 52px;
  letter-spacing: 0.01em;
  line-height: 1;
}

.exp-period {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.1em;
}

/* Role progression timeline */
.exp-progression {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.exp-prog-role {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 4px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
}
.exp-prog-role.current {
  background: var(--grad-accent);
  border-color: transparent;
  color: #fff;
  text-shadow: 0 1px 2px rgba(80, 20, 0, 0.3);
}
.exp-prog-arrow {
  color: var(--border-hover);
  font-size: 11px;
  flex-shrink: 0;
}

.exp-body {
  color: var(--text);
  font-size: 15px;
  line-height: 1.75;
  margin-bottom: 28px;
}
.exp-body strong { color: var(--orange); font-weight: 500; }

.exp-divider {
  height: 1px;
  background: var(--border);
  margin: 28px 0;
}

/* Bullets section in main experience card */
.exp-bullets {
  display: flex;
  flex-direction: column;
  margin-bottom: 28px;
}
.exp-bullet-group {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 40px;
  padding: 22px 0;
  border-top: 1px solid var(--border);
}
.exp-bullet-group:last-child {
  border-bottom: 1px solid var(--border);
}
.exp-bullet-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--orange);
  padding-top: 4px;
  line-height: 1.5;
}
.exp-bullet-count {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-left: 6px;
}

.exp-bullet-sublabel {
  display: inline-block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.1em;
}
.exp-bullet-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.exp-bullet-list li {
  padding-left: 22px;
  position: relative;
  margin-bottom: 10px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.7;
}
.exp-bullet-list li:last-child { margin-bottom: 0; }
.exp-bullet-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 12px;
  width: 10px;
  height: 1px;
  background: var(--orange);
}
.exp-bullet-list li strong {
  color: var(--orange);
  font-weight: 500;
}

/* Project chips */
.exp-projects-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}
.exp-projects {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.exp-project-chip {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-decoration: none;
  padding: 6px 14px;
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-full);
  transition: color 0.2s, border-color 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
a.exp-project-chip:hover {
  color: var(--text);
  border-color: var(--orange);
}
a.exp-project-chip::after {
  content: '↗';
  color: var(--orange);
  font-size: 9px;
}

/* Secondary experience cards grid */
.exp-secondary-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 12px;
}

.experience-card-sm {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  position: relative;
  transition: border-color 0.2s ease, transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
  will-change: transform;
  cursor: default;
}
.experience-card-sm:hover {
  border-color: var(--border-hover);
  transform: scale(1.04);
  z-index: 2;
}
.experience-card-sm:hover .pli-tag {
  color: var(--orange);
  border-color: rgba(232,93,4,0.45);
}

.exp-sm-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 14px;
}

.exp-sm-logo {
  width: 112px;
  height: 112px;
  object-fit: contain;
  border-radius: 16px;
  background: var(--bg3);
  padding: 10px;
  flex-shrink: 0;
}

.exp-sm-company {
  font-family: var(--font-display);
  font-size: 32px;
  letter-spacing: 0.01em;
  line-height: 1;
  margin-bottom: 4px;
}
.exp-sm-period {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.1em;
}
.exp-sm-role {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 8px;
  margin-top: 2px;
}
.exp-sm-body {
  font-size: 13px;
  color: var(--text);
  line-height: 1.65;
}
.exp-sm-body strong { color: var(--orange); font-weight: 500; }

/* ── EXPERIENCE BULLETS ── */
.exp-bullets {
  margin: 0;
}
.exp-bullet-group {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 40px;
  padding: 20px 0;
  border-top: 1px solid var(--border);
}
.exp-bullet-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--orange);
  line-height: 1.5;
  padding-top: 4px;
}
.exp-bullet-sublabel {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: none;
}
.exp-bullet-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.exp-bullet-list li {
  padding-left: 20px;
  position: relative;
  margin-bottom: 10px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.65;
}
.exp-bullet-list li:last-child { margin-bottom: 0; }
.exp-bullet-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 11px;
  width: 10px;
  height: 1px;
  background: var(--orange);
}
.exp-bullet-list li strong { color: var(--orange); font-weight: 500; }

/* Education block */
.edu-block {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  transition: border-color 0.2s;
}
.edu-block:hover { border-color: var(--border-hover); }
.edu-left {
  display: flex;
  align-items: center;
  gap: 20px;
}
.edu-logo {
  width: 72px;
  height: 72px;
  object-fit: contain;
  border-radius: 12px;
  background: var(--bg3);
  padding: 8px;
  flex-shrink: 0;
}
.edu-school {
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: 0.01em;
  line-height: 1;
  margin-bottom: 6px;
}
.edu-degrees {
  font-size: 14px;
  color: var(--text);
  margin-top: 4px;
}
.edu-period {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.1em;
  flex-shrink: 0;
}

/* BAR CHART */
.bar-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}
.bar-label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
  width: 150px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 0;
}
.bar-track {
  flex: 1;
  height: 3px;
  background: var(--border-hover);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  background: var(--orange);
  border-radius: var(--radius-full);
}
.bar-val {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
  width: 54px;
  text-align: right;
  flex-shrink: 0;
}

/* ── PROJECTS GRID ── */

/* Fix: reduce section bottom padding so no ghost gap before Experience */
#projects { padding-bottom: 64px; }

/* details wrapper: no border — only the summary gets the card frame */
.projects-accordion.pp-section {
  border: none;
  border-radius: 0;
  background: transparent;
  margin-bottom: 0;
}
.projects-accordion.pp-section:last-of-type {
  border: none;
  margin-bottom: 0;
}
.projects-accordion.pp-section .pp-section-title {
  font-size: 36px;
}

.side-projects-section {
  margin-top: 10px;
}

/* ── ACCORDION HEADER (summary = seul élément encadré) ── */
.projects-accordion summary {
  padding: 18px 20px;
  align-items: center;
  border: 0.5px solid rgba(255,255,255,0.08);
  border-radius: 11px;
  background: transparent;
  transition: background 0.2s, border-color 0.2s;
}

/* Hover on closed: light fill + stronger border */
.projects-accordion:not([open]) summary:hover {
  background: rgba(255,255,255,0.025);
  border-color: rgba(255,255,255,0.16);
}

/* Open state: summary stays framed, slight separator below */
.projects-accordion[open] summary {
  border-radius: 11px 11px 8px 8px;
  border-bottom-color: rgba(255,255,255,0.05);
}

/* Body: restore original padding, no border */
.projects-accordion[open] .pp-section-body {
  padding-left: 0;
  padding-right: 0;
}

.acc-left {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.acc-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Title must not stretch — badge stays immediately after the text */
.acc-title-row .pp-section-title {
  flex: none;
}

/* Badge: outline style, orange border + text, accolé au titre */
.acc-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--orange);
  color: var(--orange);
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1;
  padding: 4px 11px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

.acc-tags {
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-transform: uppercase;
  line-height: 1.3;
}

.acc-thumbs {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.acc-thumb {
  width: 58px;
  height: 58px;
  border-radius: 10px;
  background-color: var(--bg3);
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
  transition: transform 0.2s;
}

.projects-accordion:not([open]):hover .acc-thumb {
  transform: scale(1.06);
}

.acc-thumb-more {
  background-color: var(--bg3);
  background-image: none !important;
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.02em;
}

.acc-thumb-dungeon {
  background-color: #0e0e0e;
  background-image: none !important;
  border: 1px solid rgba(255,255,255,0.06);
  font-family: var(--font-mono);
  font-size: 16px;
  color: var(--orange);
  display: flex;
  align-items: center;
  justify-content: center;
}
.acc-thumb-dungeon::after { content: '#'; }

/* Thumbs hidden when open — visible in expanded list */
.projects-accordion[open] .acc-thumbs { display: none; }

/* Title stays text color on hover (card hover already signals interactivity) */
.projects-accordion:not([open]) summary:hover .pp-section-title {
  color: var(--orange);
}

.project-list.side {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.project-list.side .project-list-item {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  border: 1px solid var(--border);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg2);
  overflow: hidden;
  padding: 0;
  gap: 0;
  transition: border-color 0.2s;
}
.project-list.side .project-list-item:first-child {
  border-top: 1px solid var(--border);
}
.project-list.side .project-list-item:hover {
  border-color: var(--border-hover);
  transform: scale(1.04);
}
.project-list.side .pli-visual {
  width: 100%;
  aspect-ratio: 16 / 6;
  border-radius: 0;
  flex-shrink: 0;
}
.project-list.side .pli-content {
  padding: 10px 12px;
  gap: 3px;
  flex: 1;
}
.project-list.side .pli-number { display: none; }
.project-list.side .pli-name {
  font-size: clamp(15px, 1.4vw, 18px);
  white-space: normal;
}
.project-list.side .pli-role {
  font-size: 11px;
}
.project-list.side .pli-studio {
  font-size: 10px;
}
.project-list.side .pli-desc {
  font-size: 11px;
  max-width: 100%;
}
.project-list.side .pli-tags { margin-top: 3px; }
.project-list.side .pli-tag { font-size: 10px; padding: 2px 8px; }

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.project-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  position: relative;
  overflow: hidden;
  min-height: 240px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  text-decoration: none;
  color: inherit;
}
.project-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

.project-card.featured {
  grid-column: span 2;
  min-height: 320px;
}

.project-thumb {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 68%;
  background: var(--bg3);
  overflow: hidden;
}

.project-thumb-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 50%, var(--bg2) 100%);
  z-index: 1;
}

.project-thumb-label {
  position: absolute;
  top: 24px;
  left: 16px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--orange);
  background: var(--orange-dim);
  border: 1px solid rgba(232,93,4,0.25);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  z-index: 2;
}

.project-thumb-visual {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-thumb-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.project-thumb-gif {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0.001;
  transition: opacity 0.15s ease;
  will-change: opacity;
}
.project-card:hover .project-thumb-gif {
  opacity: 1;
}

.project-meta-row {
  position: relative;
  z-index: 2;
  margin-top: auto;
}

.project-name {
  font-family: var(--font-display);
  font-size: 26px;
  line-height: 1;
  letter-spacing: 0.01em;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: -0.1px -0.1px 0 var(--bg), 0.1px -0.1px 0 var(--bg), -0.1px 0.1px 0 var(--bg), 0.1px 0.1px 0 var(--bg);
}
.project-card.featured .project-name { font-size: 36px; }

.project-role {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  color: var(--orange);
  margin-bottom: 10px;
  letter-spacing: 0;
  text-transform: uppercase;
}

.project-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.55;
  margin-bottom: 16px;
  max-width: 380px;
}

.project-stats {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.project-stat {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--muted);
  background: var(--bg3);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.project-arrow {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 32px;
  height: 32px;
  border: 1px solid var(--border-hover);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 14px;
  transition: all 0.2s;
  z-index: 2;
}
.project-card:hover .project-arrow {
  border-color: var(--orange);
  color: var(--orange);
  transform: translate(2px,-2px);
}

.project-card.no-page { cursor: default; }
.project-card.no-page .project-arrow { display: none; }
.project-card.no-page:hover { transform: none; box-shadow: none; }

.thumb-svg { width: 100%; height: 100%; }

/* ── PROJECT LIST (studio) ── */
.project-list {
  display: flex;
  flex-direction: column;
}

.project-list-item {
  display: grid;
  grid-template-columns: 1fr 480px;
  gap: 48px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  align-items: center;
  transition: border-color 0.2s ease, transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
  will-change: transform;
}
.project-list > .project-list-item:first-child { padding-top: 8px; }
.project-list > .project-list-item:last-child { border-bottom: none; }
.project-list .project-list-item:hover {
  border-color: var(--border-hover);
  transform: scale(1.04);
}

.pli-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.pli-number {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.pli-name-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
}
.pli-name-row .pli-name {
  flex: 1;
  min-width: 0;
}
.pli-year {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--muted);
  flex-shrink: 0;
  transition: color 0.2s;
}
.project-list-item:hover .pli-year { color: var(--text); }

.pli-name {
  font-family: var(--font-display);
  font-size: clamp(22px, 2vw, 32px);
  line-height: 1;
  letter-spacing: 0.01em;
  color: var(--text);
  transition: color 0.2s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.project-list-item:hover .pli-name { color: var(--text); }
.pli-name.long { font-size: clamp(18px, 1.7vw, 28px); }
.project-list-item:hover .pli-desc { color: var(--text); }
.project-list-item:hover .pli-tag {
  color: var(--orange);
  border-color: rgba(232,93,4,0.45);
}

.pli-role {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 800;
  color: var(--orange);
  text-transform: uppercase;
  letter-spacing: 0;
  margin-top: -4px;
}

.pli-studio {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text);
  margin-top: -4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.pli-desc {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  max-width: 520px;
  margin-top: 2px;
  transition: color 0.2s;
}

.pli-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.pli-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-full);
  padding: 4px 12px;
  transition: color 0.2s, border-color 0.2s;
}

.pli-visual-wrap {
  position: relative;
  flex-shrink: 0;
}
.pli-visual-wrap .pli-label {
  position: absolute;
  top: -14px;
  left: -22px;
  z-index: 10;
  margin-bottom: 0;
  align-self: unset;
}

.pli-visual {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16 / 7;
  background: var(--bg3);
  width: 100%;
}

.pli-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pli-gif {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0.001;
  transition: opacity 0.15s ease;
  will-change: opacity;
}
.project-list-item:hover .pli-gif { opacity: 1; }

.pli-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0.001;
  transition: opacity 0.3s ease;
  will-change: opacity;
}
.project-list-item:hover .pli-video { opacity: 1; }

.pli-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 0.08em;
  background: var(--orange);
  color: #0e0e0e;
  padding: 8px 18px 5px;
  border-radius: var(--radius-full);
  transform: rotate(-42deg);
  transform-origin: center;
  box-shadow: none;
  margin-bottom: 4px;
  width: fit-content;
  animation: none;
}
.project-list-item:hover .pli-label {
  animation: pli-wiggle 1.6s linear infinite;
}

/* ── Dungeon side project card ── */
.pli-visual--dungeon {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0a0a0a;
  overflow: hidden;
}
.pli-dungeon-art {
  font-family: var(--font-mono);
  font-size: clamp(4px, 0.85vw, 9px);
  line-height: 1.15;
  color: var(--orange);
  white-space: pre;
  text-align: left;
  margin: 0;
  padding: 8px;
  opacity: 0.85;
  transition: opacity 0.3s ease, color 0.3s ease;
}
.project-list-item:hover .pli-dungeon-art {
  opacity: 1;
  color: #5cc8ff;
}

/* pli-wip — curseur chantier, à retirer par carte quand la page est prête */

@keyframes pli-wiggle {
  0%   { transform: rotate(-42deg) scale(1);    box-shadow: 0 0 16px 4px rgba(232,93,4,0.35), inset 0 0 0 2px rgba(14,14,14,0.15); }
  25%  { transform: rotate(-52deg) scale(1.13); box-shadow: 0 0 34px 12px rgba(232,93,4,0.75), inset 0 0 0 2px rgba(14,14,14,0.15); }
  50%  { transform: rotate(-42deg) scale(1);    box-shadow: 0 0 16px 4px rgba(232,93,4,0.35), inset 0 0 0 2px rgba(14,14,14,0.15); }
  75%  { transform: rotate(-32deg) scale(1.13); box-shadow: 0 0 34px 12px rgba(232,93,4,0.75), inset 0 0 0 2px rgba(14,14,14,0.15); }
  100% { transform: rotate(-42deg) scale(1);    box-shadow: 0 0 16px 4px rgba(232,93,4,0.35), inset 0 0 0 2px rgba(14,14,14,0.15); }
}

.pli-arrow {
  position: absolute;
  bottom: 14px;
  right: 14px;
  z-index: 2;
  font-size: 18px;
  color: rgba(232,228,220,0.5);
  transition: color 0.2s, transform 0.2s;
}
.project-list-item:hover .pli-arrow {
  color: var(--text);
  transform: translate(2px, -2px);
}

/* ── FOOTER ── */
footer {
  border-top: 1px solid var(--border);
  padding: 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-name {
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: 0.02em;
}
.footer-name span {
  display: inline-block;
  transform-origin: 50% 70%;
  transition: filter 0.3s ease, transform 0.3s ease;
}
.footer-key-icon {
  height: 0.65em;
  width: auto;
  vertical-align: middle;
  margin-left: 4px;
  display: none;
}
.footer-name span.is-hidden-key .footer-key-icon,
.footer-name span.is-found .footer-key-icon { display: inline-block; }

/* default state: orange dot */
.footer-name span:not(.is-hidden-key):not(.is-found)::after {
  content: '.';
  color: var(--orange);
}

/* Hidden key state — pulses BIG and BLUE when all 8 relics collected */
.footer-name span.is-hidden-key {
  cursor: pointer;
  padding-left: 8px;
  padding-right: 8px;
  animation: footer-key-pulse 1.4s ease-in-out infinite;
}
.footer-name span.is-hidden-key:hover {
  animation-play-state: paused;
  transform: scale(3.2) rotate(-10deg);
  filter:
    drop-shadow(0 0 6px #a5e6ff)
    drop-shadow(0 0 14px #5cc8ff)
    drop-shadow(0 0 24px rgba(92, 200, 255, 0.9));
}
@keyframes footer-key-pulse {
  0%, 100% {
    filter:
      drop-shadow(0 0 4px #5cc8ff)
      drop-shadow(0 0 9px rgba(92, 200, 255, 0.7));
    transform: scale(1.6);
  }
  50% {
    filter:
      drop-shadow(0 0 8px #a5e6ff)
      drop-shadow(0 0 16px #5cc8ff)
      drop-shadow(0 0 30px rgba(92, 200, 255, 1));
    transform: scale(2.6);
  }
}

/* Found state — platinum tint */
.footer-name span.is-found .footer-key-icon {
  filter: drop-shadow(0 0 6px rgba(176, 176, 216, 0.6)) opacity(0.7);
}

.footer-links { display: flex; gap: 24px; }
.footer-links a {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--text); }

.footer-copy {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
}

/* ── PROJECT PAGES (static) ── */
.project-page-wrapper { padding-top: 60px; }

.page-back {
  display: inline-block;
  margin: 24px 48px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--border-hover);
  padding: 8px 18px;
  text-decoration: none;
  border-radius: var(--radius-full);
  transition: all 0.2s;
}
.page-back:hover { color: var(--text); border-color: var(--text); }

.project-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 32px 48px 80px;
}

.pp-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 16px;
}

.pp-title {
  font-family: var(--font-display);
  font-size: 80px;
  line-height: 0.9;
  margin-bottom: 32px;
}

.pp-meta {
  display: flex;
  gap: 32px;
  padding: 24px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 48px;
  flex-wrap: wrap;
}

.pp-meta-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}
.pp-meta-value {
  font-size: 14px;
  color: var(--text);
  font-weight: 500;
}

.pp-body {
  font-size: 16px;
  color: var(--muted);
  line-height: 1.8;
}
.pp-body p { margin-bottom: 20px; }
.pp-body strong { color: var(--text); font-weight: 500; }
.pp-body h3 {
  font-family: var(--font-display);
  font-size: 28px;
  color: var(--text);
  margin: 40px 0 16px;
  letter-spacing: 0.01em;
}

.pp-highlight {
  border-left: 2px solid var(--orange);
  padding: 16px 24px;
  margin: 32px 0;
  background: var(--orange-dim);
  font-size: 14px;
  color: var(--text);
  line-height: 1.65;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.pp-external-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  padding: 12px 20px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--text);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: all 0.2s ease;
}
.pp-external-link:hover {
  border-color: var(--orange);
  color: var(--orange);
  background: var(--orange-glow);
}
.pp-external-arrow {
  font-size: 14px;
  transition: transform 0.2s ease;
}
.pp-external-link:hover .pp-external-arrow {
  transform: translate(2px, -2px);
}

.pp-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 40px 0;
}
.pp-stat {
  background: var(--bg2);
  border: 1px solid var(--border);
  padding: 14px 20px;
  border-radius: var(--radius);
}
.pp-stat-val {
  font-family: var(--font-display);
  font-size: 32px;
  line-height: 1;
  margin-bottom: 2px;
  color: var(--orange);
}
.pp-stat-val span { color: var(--orange); }
.pp-stat-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Cover image on project pages */
.pp-cover-img {
  width: 100%;
  height: 340px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 40px;
  display: block;
}

/* Embedded trailer (YouTube iframe) */
.pp-trailer {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 40px;
  background: var(--bg2);
  border: 1px solid var(--border);
}
.pp-trailer iframe,
.pp-trailer video {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  object-fit: cover;
  background: #000;
}

/* ── PROJECT PAGE EXTRAS ── */

.pp-stats-4 { grid-template-columns: repeat(4, 1fr); }
.pp-stats-6 { grid-template-columns: repeat(6, 1fr); }

.pp-links-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
}
.pp-links-row .pp-external-link { margin-top: 0; }

.pp-placeholder {
  width: 100%;
  height: 260px;
  background: var(--bg2);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 36px 0;
}

/* ── Project page gallery ── */
.pp-gallery {
  display: grid;
  gap: 8px;
  margin: 36px 0;
  grid-template-columns: 1fr;
}
.pp-gallery--2col { grid-template-columns: 1fr 1fr; }
.pp-gallery--3col { grid-template-columns: repeat(3, 1fr); }
.pp-gallery--portrait .pp-figure img { aspect-ratio: 3 / 4; }
.pp-figure {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--bg2);
  margin: 36px 0;
  cursor: zoom-in;
}
.pp-gallery .pp-figure { margin: 0; }
.pp-figure img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}
.pp-figure-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 36px 0;
}
.pp-figure-row .pp-figure { margin: 0; }
.pp-figure--contain img {
  object-fit: contain;
  aspect-ratio: auto;
  background: var(--bg2);
}
.pp-figure-caption {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.1em;
  padding: 6px 0 0;
  opacity: 0.7;
}
/* ── PARCOURS ── */
.parcours-section {
  padding-top: 40px;
  padding-bottom: 20px;
}

.parcours-timeline-header {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}

.parcours-btn-exp {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text);
  background: none;
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-full);
  padding: 7px 14px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}
.parcours-btn-exp svg {
  width: 13px; height: 13px; flex-shrink: 0;
}
.parcours-btn-exp:hover {
  color: var(--orange);
  border-color: var(--orange);
}
.parcours-btn-exp:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
}

.parcours-timeline {
  display: flex;
  align-items: flex-start;
  position: relative;
  padding-bottom: 32px;
}

.parcours-timeline::before {
  content: '';
  position: absolute;
  top: 9px;
  left: 0; right: 0;
  height: 1px;
  background: var(--border);
}

/* Segment parcouru : overlay gradient par-dessus la ligne de fond.
   Couvre 100% par défaut car Game Director (actif) est le dernier arrêt. */
.parcours-timeline::after {
  content: '';
  position: absolute;
  top: 9px;
  left: 0; right: 0;
  height: 1px;
  background: var(--grad-accent);
  z-index: 0;
}

.parcours-stop {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  position: relative;
  cursor: pointer;
}

.parcours-dot {
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 2px solid #4a4a48;
  background: #3a3a38;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}

/* Point actif : orange plat + halo (dégradé illisible à 18px) */
.parcours-stop.is-active .parcours-dot {
  background: var(--orange);
  border-color: var(--orange);
  box-shadow: 0 0 0 4px var(--grad-accent-halo);
}

.parcours-stop:focus-visible {
  outline: none;
}
.parcours-stop:focus-visible .parcours-dot {
  box-shadow: 0 0 0 3px var(--orange);
}

.parcours-stop-label {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.parcours-stop-role {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.2;
}
.parcours-stop-studio {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.parcours-stop.is-active .parcours-stop-role { color: var(--orange); }

.parcours-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg2);
  padding: 20px 24px;
  min-height: 88px;
}
.parcours-card-inner {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.parcours-card-role {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 0.02em;
  color: var(--text);
  line-height: 1.1;
}
.parcours-card-meta {
  display: flex;
  gap: 16px;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
}
.parcours-card-studio { color: var(--text); text-transform: uppercase; }
.parcours-card-period { color: var(--orange); }
.parcours-card-highlight {
  margin-top: 6px;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.55;
}

@keyframes exp-highlight {
  0%   { border-color: var(--orange); }
  100% { border-color: var(--border); }
}
.experience-highlight {
  animation: exp-highlight 0.9s ease forwards;
}

@media (max-width: 720px) {
  .pp-gallery--2col,
  .pp-gallery--3col { grid-template-columns: 1fr; }
}

/* ── Lightbox ── */
#site-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  z-index: 9000;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}
#site-lightbox.is-open { display: flex; }
.lbx-wrap {
  position: relative;
  cursor: default;
  max-width: 92vw;
  max-height: 92vh;
}
.lbx-img {
  display: block;
  max-width: 92vw;
  max-height: 88vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius);
  user-select: none;
  -webkit-user-drag: none;
}
.lbx-close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--orange);
  border: none;
  color: #fff;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  z-index: 1;
}
.lbx-close:hover { background: #c44d00; }

/* ── PDF embed ── */
.pp-pdf-preview {
  width: 100%;
  aspect-ratio: 4 / 3;
  min-height: 400px;
  max-height: 600px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 20px 0 32px;
}
.pp-pdf-preview iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.pp-bullet-list {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
}
.pp-bullet-list li {
  padding-left: 20px;
  position: relative;
  margin-bottom: 10px;
  font-size: 15px;
  color: var(--muted);
  line-height: 1.65;
}
.pp-bullet-list li:last-child { margin-bottom: 0; }
.pp-bullet-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 11px;
  width: 10px;
  height: 1px;
  background: var(--orange);
}
.pp-bullet-list li strong { color: var(--text); font-weight: 500; }

.pp-challenges {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 20px 0 36px;
}
.pp-challenge {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
}
.pp-challenge-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 10px;
}
.pp-challenge p { font-size: 14px; margin-bottom: 0 !important; }

.pp-decision {
  display: flex;
  gap: 32px;
  padding: 32px 0;
  border-top: 1px solid var(--border);
}
.pp-decision:last-of-type {
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}
.pp-decision-num {
  font-family: var(--font-display);
  font-size: 52px;
  line-height: 1;
  color: var(--orange);
  opacity: 0.22;
  flex-shrink: 0;
  width: 52px;
  text-align: right;
  padding-top: 2px;
}
.pp-decision-content { flex: 1; }
.pp-decision-title {
  font-weight: 500;
  color: var(--text);
  font-size: 16px;
  margin-bottom: 14px;
  line-height: 1.3;
}
.pp-decision-content p { margin-bottom: 12px !important; }

.pp-quote {
  font-family: var(--font-mono);
  font-size: 15px;
  letter-spacing: 0.03em;
  color: var(--text);
  padding: 8px 0;
  margin: 24px 0;
  line-height: 1.7;
}

.pp-presence-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}
.pp-presence-item {
  background: var(--bg3);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.55;
}
.pp-presence-item strong { color: var(--text); font-weight: 500; }

.pp-cast-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin: 16px 0;
}
.pp-cast-lang {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 12px;
}
.pp-cast-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 16px;
  background: #000;
  border: 1px solid var(--border);
}
.pp-cast-video video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pp-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin: 20px 0 28px;
}
.pp-col-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}
.pp-doc-label {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 10px;
}

/* Level showcase block (inside Level design section) */
.pp-level {
  margin: 24px 0 28px;
  padding-left: 18px;
  border-left: 2px solid rgba(232, 93, 4, 0.4);
}
.pp-level-name {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 10px;
}
.pp-level p { margin-bottom: 12px !important; }
.pp-level p:last-child { margin-bottom: 0 !important; }
.pp-level ul.pp-bullet-list { margin-top: 10px; margin-bottom: 0; }

/* COLLAPSIBLE SECTIONS · details/summary */
.pp-section {
  border-top: 1px solid var(--border);
}
.pp-section:last-of-type {
  border-bottom: 1px solid var(--border);
  margin-bottom: 40px;
}
.pp-section summary {
  list-style: none;
  cursor: pointer;
  padding: 28px 0;
  display: flex;
  align-items: center;
  gap: 18px;
  user-select: none;
}
.pp-section summary::-webkit-details-marker,
.pp-section summary::marker {
  display: none;
}
.pp-section summary::before {
  content: '▸';
  font-size: 14px;
  color: var(--orange);
  line-height: 1;
  flex-shrink: 0;
  transition: transform 0.25s cubic-bezier(0.2, 0.7, 0.2, 1);
  display: inline-block;
  transform-origin: center;
}
.pp-section[open] summary::before {
  transform: rotate(90deg);
}

/* ── Projects accordion chevron overrides (must come after base rule) ── */
.projects-accordion.pp-section summary::before {
  font-size: 22px;
  color: #a8a8a0;
  display: flex;
  align-items: center;
  align-self: center;
  transition: transform 0.25s cubic-bezier(0.2, 0.7, 0.2, 1), color 0.2s;
}
.projects-accordion.pp-section:not([open]):hover summary::before {
  color: var(--orange);
  transform: translateX(4px);
}
.projects-accordion.pp-section[open] summary::before {
  color: var(--orange);
  transform: rotate(90deg);
}

.pp-section-title {
  font-family: var(--font-display);
  font-size: 28px;
  color: var(--text);
  letter-spacing: 0.01em;
  line-height: 1;
  flex: 1;
  transition: color 0.2s;
}
.pp-section summary:hover .pp-section-title {
  color: var(--orange);
}
.pp-section-body {
  padding: 0 0 36px 32px;
}
.pp-section-body > *:first-child {
  margin-top: 0;
}
.pp-section-body h3:first-child {
  margin-top: 0;
}

/* ── NOISE ── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.018;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px;
}

/* ── REVEAL ── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal.visible { opacity: 1; transform: none; }

/* ── ACHIEVEMENTS PAGE (ARG) ── */

/* Scanlines */
/* Full-screen app layout — dungeon page never scrolls on desktop */
.ach-body {
  position: relative;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
/* Footer is below the fold in app-mode; hidden by overflow */
body.ach-body footer { display: none; }
.ach-scanlines {
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 3px,
    rgba(0,0,0,0.04) 3px,
    rgba(0,0,0,0.04) 4px
  );
  pointer-events: none;
  z-index: 9990;
}

.ach-page {
  max-width: 1440px;
  width: 100%;
  box-sizing: border-box;
  margin: 0 auto;
  padding: 76px 24px 0 24px;
  position: relative;
  flex: 1;                /* fills body height */
  min-height: 0;
  overflow: hidden;
  /* Grid: narrow sidebar | dungeon (sidebar spans dungeon + footer rows) */
  display: grid;
  grid-template-columns: 40px 1fr;
  grid-template-rows: 1fr auto;
  grid-template-areas:
    "side main"
    "side foot";
  column-gap: 20px;
}

/* ── Sidebar header ── */
.ach-page-header {
  grid-area: side;
  margin-bottom: 0;
  border-right: 1px solid var(--border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding-top: 10px;
  padding-right: 6px;
}

/* Terminal lines */
.ach-sys-lines {
  display: flex;
  flex-direction: row;   /* sidebar: 3 columns side-by-side */
  gap: 3px;
  margin-bottom: 0;
  overflow: hidden;
}

.ach-sys-line {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.06em;
  color: var(--muted);
  writing-mode: vertical-rl;
  transform: rotate(180deg);   /* read bottom-to-top */
  white-space: nowrap;
  line-height: 1.1;
  overflow: hidden;
}

.ach-prompt {
  color: var(--orange);
  margin-right: 8px;
  user-select: none;
}

.ach-sys-ok    { color: var(--green); }
.ach-sys-locked { color: #e05050; }
.ach-sys-muted  { color: var(--muted); }
.ach-sys-plat   { color: var(--plat-text) !important; }

/* Blinking cursor */
.ach-cursor {
  display: inline-block;
  color: var(--green);
  margin-left: 4px;
  animation: ach-blink 1.1s step-end infinite;
  line-height: 1;
}
@keyframes ach-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* Figlet / ASCII title — hidden in sidebar layout, too wide for a 40px column */
.ach-page-title-art {
  display: none;
  font-family: var(--font-mono);
  font-size: clamp(4px, 0.6vw, 8px);
  line-height: 1;
  letter-spacing: 0;
  color: var(--text);
  display: block;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto 4px;
  padding: 0;
  white-space: pre;
  overflow: hidden;
  animation: ach-glitch 7s infinite;
  text-shadow: 0 0 8px rgba(232, 228, 220, 0.08);
}
@keyframes ach-glitch {
  0%, 85%, 100% { transform: none; text-shadow: 0 0 8px rgba(232, 228, 220, 0.08); }
  87%  { transform: skewX(-4deg) translateX(3px);  text-shadow: -3px 0 var(--orange); }
  89%  { transform: skewX(3deg)  translateX(-2px); text-shadow: 3px 0 var(--green); }
  91%  { transform: none; text-shadow: 0 0 8px rgba(232, 228, 220, 0.08); }
  93%  { transform: translateX(2px); text-shadow: -2px 0 var(--orange); }
  95%  { transform: none; text-shadow: 0 0 8px rgba(232, 228, 220, 0.08); }
}

.ach-sys-divider {
  display: none; /* sidebar layout uses border-right on header instead */
}

/* Micro-footer — sits in the foot grid area (below dungeon, right of sidebar) */
.ach-mini-footer {
  grid-area: foot;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 0 7px;
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  color: var(--muted);
  opacity: 0.38;
  margin-top: 4px;
}

/* ── TROPHY SHELF ── */
:root {
  --plat-text: #b0b0d8;
}

.troph-shelf {
  margin-bottom: 48px;
}

.troph-row {
  display: flex;
  justify-content: space-around;
  align-items: flex-end;
  padding: 8px 0 4px;
  gap: 8px;
  flex-wrap: wrap;
}

/* ASCII plank */
.troph-plank {
  font-family: var(--font-mono);
  font-size: 13px;
  color: rgba(232, 93, 4, 0.3);
  letter-spacing: -0.06em;
  overflow: hidden;
  white-space: nowrap;
  line-height: 1.2;
  user-select: none;
  margin: 0;
  padding: 0;
  text-align: center;
}

/* Individual trophy */
.troph-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: default;
}

/* ASCII trophy: a single <pre> block + absolutely-positioned emoji.
   Critical: line-height: 1 so the box-drawing characters connect across rows. */
.ta-box {
  position: relative;
  display: inline-block;
}
.ta-art {
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1;
  margin: 0;
  padding: 0;
  white-space: pre;
}
.ta-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 18px;
  line-height: 1;
  pointer-events: none;
}

/* Stem & base (also pre blocks, centred under the box) */
.ta-stem, .ta-base {
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1;
  margin: 0;
  padding: 0;
  white-space: pre;
  text-align: center;
}

/* Platinum wider variants */
.ta-plat-icon { font-size: 26px; }

/* Trophy label */
.troph-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  line-height: 1.4;
  white-space: nowrap;
  margin-top: 8px;
}

/* Description — revealed on hover */
.troph-desc {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-align: center;
  max-width: 130px;
  line-height: 1.5;
  margin-top: 5px;
  opacity: 0;
  transform: translateY(-3px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}
.troph-item:hover .troph-desc { opacity: 1; transform: translateY(0); }
.troph-item--on  .troph-desc  { color: var(--muted); }
.troph-item--off .troph-desc  { color: #e05050; font-style: italic; }

/* ── Unlocked ── */
.troph-item--on .ta-art  { color: var(--orange); }
.troph-item--on .ta-stem { color: var(--orange); }
.troph-item--on .ta-base { color: var(--orange); }
.troph-item--on .troph-label { color: var(--text); }

/* ── Locked ── */
.troph-item--off .ta-art  { color: #383838; }
.troph-item--off .ta-stem { color: #383838; }
.troph-item--off .ta-base { color: #383838; }
.troph-item--off .ta-icon { color: #555; opacity: 0.55; }

/* Redact locked label like a classified document */
.troph-item--off .troph-label {
  background: rgba(255, 255, 255, 0.07);
  color: transparent !important;
  border-radius: 2px;
  padding: 1px 3px;
  user-select: none;
}

/* ── Platinum section ── */
.troph-platinum {
  margin-top: 8px;
  padding: 20px 24px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  text-align: center;
  background: var(--bg2);
}

.troph-plat-border {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1;
  margin: 0;
  padding: 0;
  white-space: pre;
  overflow: hidden;
  width: 100%;
  color: #2a2a2a;
}
.troph-platinum--on .troph-plat-border  { color: rgba(176, 176, 216, 0.35); }
.troph-platinum--off .troph-plat-border { color: #252525; }

/* Platinum terminal header */
.troph-plat-header {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-top: 20px;
  margin-bottom: 28px;
  align-self: flex-start;
  width: 100%;
}

/* Platinum name */
.troph-plat-name {
  font-family: var(--font-display);
  font-size: 32px;
  letter-spacing: 0.06em;
  margin-top: 10px;
}

/* Platinum desc */
.troph-plat-desc {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  margin-top: 6px;
  margin-bottom: 20px;
}

/* Platinum unlocked */
.troph-platinum--on {
  background: linear-gradient(160deg, var(--bg2), rgba(100, 100, 160, 0.06));
}
.troph-platinum--on .ta-art  { color: var(--plat-text); }
.troph-platinum--on .ta-stem { color: var(--plat-text); }
.troph-platinum--on .ta-base { color: var(--plat-text); }
.troph-platinum--on .troph-plat-name { color: var(--plat-text); }
.troph-platinum--on .troph-plat-desc { color: var(--muted); }

/* Platinum locked */
.troph-platinum--off .ta-art  { color: #2a2a2a; }
.troph-platinum--off .ta-stem { color: #2a2a2a; }
.troph-platinum--off .ta-base { color: #2a2a2a; }
.troph-platinum--off .ta-icon { color: #444; opacity: 0.5; }
.troph-platinum--off .troph-plat-name { color: var(--muted); opacity: 0.4; }
.troph-platinum--off .troph-plat-desc { color: var(--muted); opacity: 0.5; font-style: italic; }

/* ── TROPHY LOOT (per-trophy equipment drop) ── */
.troph-loot {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding-top: 8px;
  border-top: 1px dashed #2a2a2a;
  width: 100%;
  max-width: 140px;
}

.troph-loot-label {
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.22em;
  color: var(--muted);
  opacity: 0.55;
}

.troph-loot-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.troph-loot-icon { font-size: 13px; line-height: 1; }

.troph-loot--on .troph-loot-name { color: var(--text); }
.troph-loot--off .troph-loot-icon { color: #3a3a3a; opacity: 0.5; }
.troph-loot--off .troph-loot-name { color: #3a3a3a; letter-spacing: 0.16em; }

/* ── PLATINUM KEY REWARD ── */
.troph-plat-reward {
  margin-top: 22px;
  padding-top: 14px;
  border-top: 1px dashed #2a2a2a;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 100%;
  max-width: 360px;
}

.troph-plat-reward-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.24em;
  color: var(--muted);
  opacity: 0.6;
}

.troph-plat-reward-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.14em;
}

.troph-plat-reward-icon { font-size: 18px; line-height: 1; }

.troph-plat-reward-hint {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--muted);
  opacity: 0.65;
  font-style: italic;
  margin-top: 2px;
}

.troph-plat-reward--on .troph-plat-reward-name {
  color: var(--plat-text);
  text-shadow: 0 0 8px rgba(176, 176, 216, 0.3);
}
.troph-plat-reward--off .troph-plat-reward-icon { color: #3a3a3a; }
.troph-plat-reward--off .troph-plat-reward-name { color: #3a3a3a; letter-spacing: 0.22em; }

/* ── DUNGEON ANTECHAMBER ── */
/* #dungeon fills the main grid area — no flex: 1 needed, grid track handles sizing */
#dungeon {
  grid-area: main;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.dungeon {
  margin-top: 0;
  padding: 14px 20px 14px;
  background: var(--bg2);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  flex: 1;             /* fills #dungeon — no fixed height needed */
  min-height: 0;
}

.dgn-header {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin-top: 0;
  margin-bottom: 10px;
  width: 100%;
}

.dgn-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;    /* equipment (right) slightly wider for hints */
  gap: 32px;
  width: 100%;
  align-items: start;
  padding-bottom: 0;
}

.dgn-equip {
  display: flex;
  flex-direction: column;
}

.dgn-equip-title {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.16em;
  color: var(--muted);
  margin-bottom: 10px;
  text-transform: uppercase;
}

/* ── Equipment slot (2 lines: gear + achievement source) ── */
.dgn-slot {
  display: flex;
  flex-direction: column;
  padding: 7px 0;
  border-bottom: 1px dashed rgba(255,255,255,0.04);
}
.dgn-slot:last-child { border-bottom: none; }

.dgn-slot-head {
  font-family: var(--font-mono);
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 16px;
  white-space: pre;
  letter-spacing: 0.05em;
  line-height: 1.6;
}
.dgn-slot-type {
  color: var(--muted);
  letter-spacing: 0.14em;
  min-width: 76px;
  font-size: 12px;
}
.dgn-slot-icon {
  min-width: 42px;
  text-align: center;
  font-size: 15px;
}
.dgn-slot-name { letter-spacing: 0.1em; }

.dgn-slot-sub {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--muted);
  opacity: 0.85;
  margin-top: 3px;
  margin-left: 76px;
  line-height: 1.4;
}
.dgn-slot-from    { opacity: 0.55; }
.dgn-slot-ach     { color: var(--text); opacity: 0.85; }
.dgn-slot-achdesc { font-style: italic; }

/* Hint shown for locked slots — orange amber, terminal prompt feel */
.dgn-slot-hint-label {
  color: var(--orange);
  letter-spacing: 0.14em;
  text-transform: lowercase;
  font-size: 13px;
}
.dgn-slot-hint {
  color: var(--text);
  font-style: italic;
  letter-spacing: 0.04em;
  font-size: 13px;
}
.dgn-slot--key.dgn-slot--locked .dgn-slot-hint-label {
  color: #5cc8ff;
  text-shadow: 0 0 6px rgba(92, 200, 255, 0.4);
  font-size: 13px;
}
.dgn-slot--key.dgn-slot--locked .dgn-slot-hint {
  color: #aac;
  font-size: 13px;
}

/* Locked state */
.dgn-slot--locked .dgn-slot-icon    { color: #3a3a3a; }
.dgn-slot--locked .dgn-slot-name    { color: #3a3a3a; letter-spacing: 0.2em; }
.dgn-slot--locked .dgn-slot-sub     { opacity: 0.35; }
.dgn-slot--locked .dgn-slot-ach     { color: var(--muted); }

/* Owned state */
.dgn-slot--owned .dgn-slot-name { color: var(--text); }

.dgn-equip-divider {
  font-family: var(--font-mono);
  font-size: 11px;
  color: #2a2a2a;
  margin: 6px 0 2px;
  padding: 0;
  line-height: 1;
  white-space: pre;
  overflow: hidden;
}

/* Key slot — special platinum tint when owned */
.dgn-slot--key {
  background: rgba(176, 176, 216, 0.025);
  padding-left: 8px;
  padding-right: 8px;
  border-left: 2px solid rgba(176, 176, 216, 0.15);
  margin-left: -8px;
}
.dgn-slot--key.dgn-slot--owned {
  background: rgba(176, 176, 216, 0.07);
  border-left-color: var(--plat-text);
}
.dgn-slot--key.dgn-slot--owned .dgn-slot-icon { color: var(--plat-text); }
.dgn-slot--key.dgn-slot--owned .dgn-slot-name {
  color: var(--plat-text);
  text-shadow: 0 0 6px rgba(176, 176, 216, 0.3);
}
.dgn-slot--key.dgn-slot--owned .dgn-slot-ach {
  color: var(--plat-text);
  opacity: 0.9;
}

/* ── Door panel ── */
.dgn-door {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

.dgn-door .dgn-equip-title {
  align-self: flex-start;
}

.dgn-dungeon-title {
  font-family: var(--font-mono);
  font-size: clamp(3.5px, 0.45vw, 6px);
  line-height: 1.15;
  color: #5cc8ff;
  text-shadow: 0 0 6px rgba(92, 200, 255, 0.5);
  white-space: pre;
  margin: 0 0 6px 0;
  padding: 0;
  letter-spacing: 0;
  display: block;
}

.dgn-door-art {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1;
  color: #5cc8ff;
  text-shadow: 0 0 8px rgba(92, 200, 255, 0.3);
  margin: 0;
  padding: 0;
  white-space: pre;
  letter-spacing: 0;
  animation: door-idle 4s ease-in-out infinite;
}

/* Locked state — gentle blue pulse, magical-but-dormant */
@keyframes door-idle {
  0%, 100% { text-shadow: 0 0 8px rgba(92, 200, 255, 0.25); }
  50%      { text-shadow: 0 0 16px rgba(92, 200, 255, 0.55); }
}

/* Open state — orange resting glow (no entry animation by default) */
.dungeon--open .dgn-door-art {
  color: var(--orange);
  text-shadow: 0 0 16px rgba(232, 93, 4, 0.4);
  animation: dgn-glow 2.6s ease-in-out infinite;
}

/* One-shot unlock animation, triggered ONLY when USE KEY is clicked.
   Higher specificity so it overrides .dungeon--open's resting animation.
   will-change promotes the element to its own GPU layer before the animation
   starts — keeps the rest of the page from repainting every frame. */
.dungeon--open .dgn-door-art.is-unlocking {
  will-change: transform, filter, color;
  animation:
    door-unlock 5s cubic-bezier(0.5, 0.05, 0.4, 0.95) backwards,
    dgn-glow 2.6s ease-in-out 5s infinite;
}

/* All blur radii capped at 20 px (down from 170 px) — each pixel of blur
   costs O(r²) in paint area; 20 px vs 170 px is ~70× cheaper per shadow.
   One layer per frame (two at peak) instead of three.
   filter: brightness() handles the flash: it's GPU-composited and free. */
@keyframes door-unlock {
  0% {
    color: #5cc8ff;
    text-shadow: 0 0 6px rgba(92, 200, 255, 0.4);
    filter: brightness(1);
    transform: scale(1);
  }
  15% {
    color: #5cc8ff;
    text-shadow: 0 0 12px rgba(92, 200, 255, 0.85);
    filter: brightness(1.05);
    transform: scale(1.01);
  }
  35% {
    color: #a5e6ff;
    text-shadow: 0 0 16px rgba(165, 230, 255, 0.9);
    filter: brightness(1.2);
    transform: scale(1.02);
  }
  50% {
    /* Peak: brightness does the heavy lifting, shadow stays small */
    color: #ffffff;
    text-shadow: 0 0 18px rgba(255, 255, 255, 0.95);
    filter: brightness(1.7);
    transform: scale(1.04);
  }
  62% {
    color: #ffe0bf;
    text-shadow: 0 0 16px rgba(255, 190, 110, 0.9);
    filter: brightness(1.4);
    transform: scale(1.03);
  }
  78% {
    color: var(--orange);
    text-shadow: 0 0 14px rgba(232, 93, 4, 0.75);
    filter: brightness(1.1);
    transform: scale(1.01);
  }
  100% {
    color: var(--orange);
    text-shadow: 0 0 16px rgba(232, 93, 4, 0.4);
    filter: brightness(1);
    transform: scale(1);
  }
}

@keyframes dgn-glow {
  0%, 100% { text-shadow: 0 0 12px rgba(232, 93, 4, 0.3); }
  50%      { text-shadow: 0 0 26px rgba(232, 93, 4, 0.75); }
}

.dgn-door-status {
  margin-top: 10px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dgn-door-line {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.14em;
  color: #e05050;
  line-height: 1.6;
}
.dgn-door-line--muted { color: var(--muted); opacity: 0.7; letter-spacing: 0.1em; }
.dgn-door-line--ok    { color: var(--green); }
.dgn-door-line--hint  {
  color: var(--plat-text);
  text-shadow: 0 0 8px rgba(176, 176, 216, 0.4);
  letter-spacing: 0.18em;
  animation: dgn-hint-pulse 2s ease-in-out infinite;
}

@keyframes dgn-hint-pulse {
  0%, 100% { opacity: 0.85; }
  50%      { opacity: 1; }
}

.dgn-enter-btn {
  background: transparent;
  border: 1px solid var(--orange);
  color: var(--orange);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.18em;
  padding: 12px 22px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  margin-top: 8px;
}
.dgn-enter-btn:hover {
  background: var(--orange);
  color: #0e0e0e;
  box-shadow: 0 0 18px rgba(232, 93, 4, 0.5);
}

/* USE KEY variant — blue, pulsing to match the magical door state */
.dgn-use-btn {
  border-color: #5cc8ff;
  color: #5cc8ff;
  text-shadow: 0 0 8px rgba(92, 200, 255, 0.4);
  box-shadow: 0 0 14px rgba(92, 200, 255, 0.2);
  animation: dgn-use-pulse 1.8s ease-in-out infinite;
}
.dgn-use-btn:hover {
  background: rgba(92, 200, 255, 0.12);
  border-color: #a5e6ff;
  color: #a5e6ff;
  box-shadow: 0 0 26px rgba(92, 200, 255, 0.55);
  text-shadow: 0 0 12px #a5e6ff;
}
@keyframes dgn-use-pulse {
  0%, 100% { box-shadow: 0 0 14px rgba(92, 200, 255, 0.2); }
  50%      { box-shadow: 0 0 26px rgba(92, 200, 255, 0.5); }
}
.dgn-use-btn--inserting {
  animation: none;
  border-color: #a5e6ff;
  color: #ffffff;
  background: rgba(92, 200, 255, 0.15);
  box-shadow: 0 0 30px rgba(165, 230, 255, 0.7);
  cursor: default;
  pointer-events: none;
}

/* "KEY READY" header label — sits between locked and ok */
.dgn-status-ready {
  color: #5cc8ff;
  text-shadow: 0 0 6px rgba(92, 200, 255, 0.4);
  letter-spacing: 0.16em;
}

/* Door descent transition · ENTER DUNGEON click */
.dgn-door-art.is-descending {
  animation: door-descend 700ms ease-in forwards;
}
@keyframes door-descend {
  0%   { transform: scale(1);    opacity: 1; filter: brightness(1); }
  40%  { transform: scale(1.02); opacity: 1; filter: brightness(1.4); }
  100% { transform: scale(0.85); opacity: 0; filter: brightness(0.4); }
}

/* ─────────────────────────────────────────────────────────────────
   COMBAT UI · turn-based ASCII dungeon crawler (MVP)
   ───────────────────────────────────────────────────────────────── */
.dgn-combat {
  font-family: var(--font-mono);
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 24px;
  position: relative;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(20,20,20,0.4) 0%, rgba(14,14,14,0.6) 100%);
  border-radius: var(--radius-sm);
  margin: 0;
  flex: 1;                    /* fills .dungeon — viewport-height driven, never fixed px */
  min-height: 0;
  opacity: 1;
  transition: opacity 350ms ease;
}
.dgn-combat.is-entering { opacity: 0; }

/* ── Combat header ── */
.dgn-combat-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  letter-spacing: 0.05em;
}
.dgn-combat-room { flex: 1; color: var(--text); }
.dgn-combat-room .ach-prompt { color: var(--orange); margin-right: 8px; }
.dgn-combat-turn {
  color: var(--muted);
  letter-spacing: 0.18em;
  font-size: 12px;
}
.dgn-retreat-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  padding: 6px 14px;
  cursor: pointer;
  border-radius: 4px;
  transition: all 180ms ease;
}
.dgn-retreat-btn:hover {
  color: var(--orange);
  border-color: var(--orange);
}

/* ── Stage : enemy art + info ── */
/* ── Enemy stage : full-width frame ── */
.dgn-combat-stage {
  display: flex;
  flex-direction: column;
  flex: 1;                    /* absorbs all vertical space left after header/dialog/actions */
  min-height: 0;              /* critical: lets flex item shrink below natural content size */
  border: 1px dashed rgba(232, 93, 4, 0.3);
  border-radius: 8px;
  background: rgba(232, 93, 4, 0.04);
  overflow: hidden;
  position: relative;
}

/* ── Hit animations on enemy art ── */
@keyframes dgn-hit {
  0%   { transform: translateY(0);      filter: brightness(1) sepia(0); }
  22%  { transform: translateY(-11px);  filter: brightness(1.7) sepia(1) hue-rotate(295deg) saturate(4); }
  65%  { transform: translateY(-5px);   filter: brightness(1.2) sepia(0.3) hue-rotate(295deg); }
  100% { transform: translateY(0);      filter: brightness(1) sepia(0); }
}
@keyframes dgn-spell-hit {
  0%   { transform: translateY(0);      filter: brightness(1) sepia(0); }
  22%  { transform: translateY(-11px);  filter: brightness(1.8) sepia(1) hue-rotate(220deg) saturate(5); }
  65%  { transform: translateY(-4px);   filter: brightness(1.3) sepia(0.4) hue-rotate(220deg); }
  100% { transform: translateY(0);      filter: brightness(1) sepia(0); }
}
.dgn-enemy-art.is-hit       { animation: dgn-hit       0.46s ease-out; }
.dgn-enemy-art.is-spell-hit { animation: dgn-spell-hit 0.52s ease-out; }

/* ── Floating damage / heal numbers ── */
@keyframes dgn-float-up {
  0%   { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-50px); }
}
.dgn-float-num {
  position: absolute;
  top: 30%;
  right: 22px;
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: bold;
  pointer-events: none;
  animation: dgn-float-up 0.85s ease-out forwards;
  z-index: 20;
  letter-spacing: 0.04em;
}
.dgn-float-num--dmg   { color: #ff4a4a; text-shadow: 0 0 10px rgba(255,74,74,0.55); }
.dgn-float-num--spell { color: #cc66ff; text-shadow: 0 0 10px rgba(204,102,255,0.55); }

/* ── Player stat bar flash ── */
@keyframes dgn-bar-dmg {
  0%, 100% { background: transparent; }
  28%       { background: rgba(255, 60, 60, 0.20); }
}
@keyframes dgn-bar-heal {
  0%, 100% { background: transparent; }
  28%       { background: rgba(60, 220, 120, 0.20); }
}
.dgn-player-bar.is-damaged { animation: dgn-bar-dmg  0.55s ease-out; border-radius: 4px; }
.dgn-player-bar.is-healed  { animation: dgn-bar-heal 0.55s ease-out; border-radius: 4px; }

/* ── HEADSET confirmed-intent tag ── */
.dgn-intent-confirmed {
  color: var(--orange);
  font-weight: bold;
  margin-right: 4px;
}
.dgn-enemy-art {
  font-family: var(--font-mono);
  font-size: 14px;            /* fallback — enemies override with inline fontSize (9–13px) */
  line-height: 1.1;
  color: var(--text);
  white-space: pre;
  margin: 0;
  text-align: center;
  padding: 12px 24px 8px;    /* reduced: was 48px top / 20px bottom */
  text-shadow: 0 0 10px rgba(232, 228, 220, 0.08);
  flex: 1;
  min-height: 0;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}
/* flavor + intent row, between art and HP bar */
.dgn-stage-sub {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 3px 16px 5px;
  font-family: var(--font-mono);
  font-size: 12px;
  flex-wrap: wrap;
}
.dgn-enemy-flavor {
  color: var(--muted);
  font-style: italic;
}
.dgn-enemy-intent {
  color: var(--text);
  opacity: 0.8;
}
.dgn-enemy-intent .ach-prompt { color: var(--orange); margin-right: 5px; }
/* HP bar pinned at the bottom of the stage frame */
.dgn-stage-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 16px;
  border-top: 1px solid rgba(232, 93, 4, 0.22);
  background: rgba(232, 93, 4, 0.07);
}
.dgn-enemy-name {
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: 0.08em;
  color: var(--orange);
  text-shadow: 0 0 10px rgba(232, 93, 4, 0.2);
  flex: none;
}
/* Flavor quote inline in bottom bar, between name and HP */
.dgn-enemy-flavor-inline {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  font-style: italic;
  flex: 1;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0 12px;
}
.dgn-enemy-hp {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text);
  letter-spacing: 0.04em;
}
.dgn-enemy-hp .dgn-stat-num {
  color: var(--muted);
  margin-left: 4px;
  font-size: 11px;
}

/* ── Bottom row : player stats + actions side by side ── */
.dgn-combat-bottom {
  display: grid;
  grid-template-columns: minmax(160px, 26%) 1fr;
  gap: 10px;
  align-items: stretch;
}

/* ── Player stats (left column) — GEAR button pinned at bottom ── */
.dgn-combat-player {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.02);
  font-size: 13px;
  box-sizing: border-box;
}
/* GEAR stays close to stats, no floating to bottom */
.dgn-gear-btn {
  margin-top: 6px;
  width: 100%;
  text-align: center;
}

/* ── Right column : retreat on top, actions below ── */
.dgn-actions-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
/* RETREAT spans the full width of the right column */
.dgn-retreat-full {
  width: 100%;
  text-align: center;
}
.dgn-player-name {
  color: var(--text);
  font-size: 13px;
  letter-spacing: 0.06em;
}
.dgn-player-name .ach-prompt { color: var(--orange); margin-right: 6px; }
.dgn-player-bars {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text);
}
.dgn-player-bar { letter-spacing: 0.04em; }
.dgn-player-bar .dgn-stat-num {
  color: var(--muted);
  margin-left: 4px;
  font-size: 11px;
}
.dgn-player-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.06em;
}

/* ── Dialog log ── */
.dgn-combat-dialog {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.3);
  height: 160px;        /* ~7 log lines visible */
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 12px;
}
.dgn-dialog-title {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.2em;
  margin-bottom: 4px;
}
.dgn-dialog-title .ach-prompt { color: var(--orange); margin-right: 6px; }
.dgn-dialog-line {
  line-height: 1.5;
  animation: dgn-dialog-in 280ms ease;
}
.dgn-dialog-line--sys    { color: var(--text); }
.dgn-dialog-line--flavor { color: var(--muted); font-style: italic; }
.dgn-dialog-line--player { color: var(--orange); }
.dgn-dialog-line--enemy  { color: #d9534f; }
@keyframes dgn-dialog-in {
  0%   { opacity: 0; transform: translateX(-4px); }
  100% { opacity: 1; transform: translateX(0); }
}

/* ── Action menu : 4-col top row (ATTACK SPELL DEFEND INSPECT) + full-width bottom (USE ITEM, COMPLIMENT) ── */
.dgn-combat-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  min-width: 0;
}
/* 5th child onward (USE ITEM, optional COMPLIMENT) span the full row */
.dgn-combat-actions > :nth-child(n+5) { grid-column: 1 / -1; }

/* USE ITEM compact: horizontal layout, sub/fn text pushed to the right */
.dgn-combat-actions > :nth-child(5) {
  flex-direction: row;
  align-items: center;
  padding: 4px 12px;
  gap: 12px;
}
.dgn-combat-actions > :nth-child(5) .dgn-action-top { flex: none; }
.dgn-combat-actions > :nth-child(5) .dgn-action-sub {
  margin-left: auto;
  font-size: 11px;
  color: var(--muted);
}
.dgn-combat-actions > :nth-child(5) .dgn-action-fn {
  font-size: 11px;
  color: var(--muted);
  flex: none;
}
.dgn-action-btn {
  background: transparent;
  border: 1px solid var(--border);
  border-left: 3px solid var(--orange);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.05em;
  padding: 6px 12px;          /* compact — frees vertical space for the enemy stage */
  text-align: left;
  cursor: pointer;
  border-radius: 4px;
  transition: all 180ms ease;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.dgn-action-btn:hover:not(.is-disabled) {
  background: rgba(232, 93, 4, 0.08);
  border-color: var(--orange);
  transform: translateX(2px);
}
.dgn-action-btn.is-disabled {
  border-left-color: var(--border);
  color: var(--muted);
  cursor: not-allowed;
  opacity: 0.55;
}
/* top row: key + main label + optional suffix */
.dgn-action-top {
  display: flex;
  align-items: center;
  gap: 0;
}
.dgn-action-key {
  color: var(--orange);
  margin-right: 8px;
  font-weight: 500;
}
.dgn-action-btn.is-disabled .dgn-action-key { color: var(--muted); }
.dgn-action-suffix {
  color: var(--muted);
  font-size: 11px;
  margin-left: 6px;
  font-style: italic;
}
/* subtext: design-vocabulary label */
.dgn-action-sub {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.12em;
  font-style: italic;
  padding-left: 26px;   /* indent to align under main label */
}
.dgn-action-btn.is-disabled .dgn-action-sub { opacity: 0.6; }
/* third info line on action buttons */
.dgn-action-fn {
  font-size: 0.82em;
  opacity: 0.55;
  letter-spacing: 0.04em;
  padding-left: 26px;
  margin-top: 1px;
}
.dgn-action-fn.is-warn { color: #d9534f; opacity: 0.8; }

/* combat log enriched feedback */
.dgn-dialog-line--dodge    { color: #5fd7af; font-weight: bold; }
.dgn-dialog-line--armor    { opacity: 0.55; font-size: 0.9em; padding-left: 12px; }
.dgn-dialog-line--buff     { color: var(--orange); font-size: 0.9em; padding-left: 12px; }
/* Chantier 5 log kinds */
.dgn-dialog-line--defend   { color: #5b9cf6; font-size: 0.9em; padding-left: 12px; }
.dgn-dialog-line--mechanic { color: var(--muted); font-style: italic; opacity: 0.85; }
.dgn-dialog-line--mechanic.success { color: #5fd7af; opacity: 1; }
.dgn-dialog-line--mechanic.fail    { color: #d9534f; opacity: 0.85; }
.dgn-dialog-line--fear     { color: #b76fc1; font-style: italic; opacity: 0.9; }
.dgn-dialog-line--special  { color: #e8b84b; font-weight: bold; }

/* ── Enemy mechanic tag (extra line below intent in stage-sub) ── */
.dgn-enemy-mechanic-tag {
  font-family: var(--font-mono);
  font-size: 0.82em;
  opacity: 0.75;
  margin-top: 3px;
  display: block;
}
.dgn-enemy-mechanic-tag.executing {
  color: #e8b84b;
  font-weight: bold;
  opacity: 1;
}
.dgn-enemy-mechanic-tag.warning {
  color: #d9534f;
  font-weight: bold;
  opacity: 1;
}

/* ── TV Head — inspect stack colours ── */
.dgn-enemy-mechanic-tag.stack-low  { opacity: 0.5; color: var(--muted); }
.dgn-enemy-mechanic-tag.stack-med  { color: #e8b84b; opacity: 0.9; }
.dgn-enemy-mechanic-tag.stack-high { color: #d9534f; font-weight: bold; opacity: 1; }

/* ── Abyssa — rage level colours ── */
.dgn-enemy-mechanic-tag.rage-low  { opacity: 0.5; color: var(--muted); }
.dgn-enemy-mechanic-tag.rage-med  { color: #e8b84b; opacity: 0.9; }
.dgn-enemy-mechanic-tag.rage-high { color: #d9534f; font-weight: bold; opacity: 1; }
.dgn-enemy-mechanic-tag.rage-crit {
  color: #d9534f; font-weight: bold; opacity: 1;
  animation: dgn-rage-pulse 0.9s ease-in-out infinite;
}
@keyframes dgn-rage-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.45; }
}

/* player buff summary line */
.dgn-player-buffs {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text);
  letter-spacing: 0.06em;
  line-height: 1.6;
}

/* ── Chantier 7 : backpack menu ── */
.backpack-menu {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--bg2);
  border: 1px solid var(--orange);
  border-left: 3px solid var(--orange);
  padding: 16px;
  min-width: 290px;
  max-width: 360px;
  width: 90%;
  z-index: 20;
  border-radius: 6px;
  box-shadow: 0 0 24px rgba(232,93,4,0.12);
}
.backpack-header {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: bold;
  letter-spacing: 0.1em;
  color: var(--orange);
  margin-bottom: 12px;
  opacity: 0.95;
}
.backpack-item {
  padding: 8px 10px;
  cursor: pointer;
  border-left: 2px solid transparent;
  border-radius: 3px;
  transition: border-color 0.1s, background 0.1s;
  margin-bottom: 4px;
  font-family: var(--font-mono);
}
.backpack-item:hover {
  border-left-color: var(--orange);
  background: rgba(232,93,4,0.05);
}
.backpack-item-name {
  font-size: 12px;
  font-weight: bold;
  letter-spacing: 0.06em;
  color: var(--text);
}
.backpack-item-flavor {
  font-size: 10px;
  opacity: 0.55;
  font-style: italic;
  margin-top: 2px;
  color: var(--text);
  letter-spacing: 0.04em;
}
.backpack-close {
  margin-top: 12px;
  text-align: right;
}
.backpack-close button {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 4px 10px;
  cursor: pointer;
  border-radius: 3px;
  transition: border-color 0.1s, color 0.1s;
}
.backpack-close button:hover {
  border-color: var(--muted);
  color: var(--text);
}
/* log line for item use */
.dgn-dialog-line--item { color: #5fd7af; font-size: 0.9em; padding-left: 12px; }
.dgn-dialog-line--stun { color: #e8b84b; font-style: italic; opacity: 0.9; }
/* random events */
.dgn-event-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 0;
}
.dgn-event-title {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--orange);
  font-weight: bold;
  margin-bottom: 4px;
}
.dgn-event-desc {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text);
  opacity: 0.8;
  font-style: italic;
  margin-bottom: 8px;
}
.dgn-event-btn {
  background: transparent;
  border: 1px solid var(--border);
  border-left: 3px solid var(--border);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 8px 14px;
  text-align: left;
  cursor: pointer;
  border-radius: 4px;
  transition: all 150ms ease;
  width: 100%;
}
.dgn-event-btn:hover:not(:disabled) {
  border-left-color: var(--orange);
  background: rgba(232,93,4,0.05);
}
.dgn-event-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.dgn-event-btn-sub {
  font-size: 10px;
  color: var(--muted);
  display: block;
  margin-top: 3px;
  font-style: italic;
}
.dgn-event-result {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #5fd7af;
  padding: 8px 0;
  border-top: 1px solid var(--border);
  margin-top: 4px;
}

@media (max-width: 640px) {
  .backpack-menu { min-width: 240px; }
}

/* ── Run summary special lines ── */
.summary-firstclear { color: var(--orange); font-weight: bold; }
.summary-title      { color: var(--orange); font-weight: bold; }
.player-title       { font-size: 0.9em; opacity: 0.8; }
.lobby-veteran      { font-style: italic; opacity: 0.6; margin-top: 8px; display: block; }

/* ── Chantier 8 : persistent profile ── */
.lobby-persistence-status {
  font-family: var(--font-mono);
  font-size: 11px;
  opacity: 0.5;
  font-style: italic;
  margin-top: 6px;
  display: block;
  letter-spacing: 0.04em;
}
.profile-load-screen {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.profile-summary {
  border: 1px solid rgba(255,255,255,0.1);
  border-left: 3px solid var(--orange);
  padding: 12px 14px;
  margin: 8px 0;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.8;
  background: rgba(232,93,4,0.03);
  border-radius: 4px;
}
.profile-summary-line {
  color: var(--text);
  opacity: 0.85;
}
.profile-summary-line.highlight {
  color: var(--orange);
  opacity: 1;
  font-weight: bold;
}
.profile-load-btns {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}
.btn-danger {
  border-color: #d9534f !important;
  color: #d9534f !important;
}
.btn-danger:hover:not(:disabled) {
  background: rgba(217,83,79,0.08) !important;
}
.profile-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--bg2);
  border: 1px solid var(--orange);
  border-left: 3px solid var(--orange);
  padding: 12px 18px;
  z-index: 9999;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text);
  border-radius: 4px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
  max-width: 320px;
  cursor: pointer;
  animation: toast-fade-in 0.2s ease-out;
}
.profile-toast.is-error {
  border-color: #d9534f;
  border-left-color: #d9534f;
}
@keyframes toast-fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.profile-toast-title {
  color: var(--orange);
  font-weight: bold;
  margin-bottom: 4px;
  letter-spacing: 0.08em;
}
.profile-toast.is-error .profile-toast-title { color: #d9534f; }
.profile-toast-body {
  opacity: 0.75;
  font-size: 11px;
  line-height: 1.6;
}
.milestone-save-prompt {
  border: 1px solid rgba(232,93,4,0.45);
  border-left: 3px solid var(--orange);
  padding: 12px 14px;
  margin: 10px 0;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 12px;
  background: rgba(232,93,4,0.04);
  border-radius: 4px;
}
.milestone-save-label {
  flex: 1;
  color: var(--text);
  opacity: 0.85;
  letter-spacing: 0.04em;
}
.milestone-save-btns {
  display: flex;
  gap: 8px;
}
.reset-zone {
  border-top: 1px solid var(--border);
  margin-top: 8px;
  padding-top: 8px;
}
@media (max-width: 640px) {
  .profile-toast { right: 12px; bottom: 12px; max-width: calc(100vw - 24px); }
  .milestone-save-prompt { flex-direction: column; align-items: flex-start; }
}

/* ── Result screens (win / lose) ── */
.dgn-combat-result {
  text-align: center;
  padding: 56px 32px;
  gap: 18px;
}
.dgn-result-title {
  font-family: var(--font-display);
  font-size: 42px;
  letter-spacing: 0.1em;
}
.dgn-combat-result--win  .dgn-result-title { color: var(--orange); text-shadow: 0 0 18px rgba(232,93,4,0.35); }
.dgn-combat-result--lose .dgn-result-title { color: var(--muted); }
.dgn-result-flavor {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text);
  font-style: italic;
  opacity: 0.85;
}
.dgn-result-rewards {
  display: flex;
  justify-content: center;
  gap: 36px;
  margin-top: 8px;
}
.dgn-result-row {
  font-family: var(--font-mono);
  font-size: 16px;
  color: var(--text);
  letter-spacing: 0.06em;
}
.dgn-combat-result--win .dgn-result-row { color: var(--green); }
.dgn-result-row--bad { color: var(--muted) !important; }
.dgn-result-note {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.1em;
  margin-top: 14px;
}
.dgn-combat-result .dgn-enter-btn { margin-top: 18px; }

/* ── Inventory overlay ── */
.dgn-inventory { gap: 20px; }

.dgn-inv-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 13px;
}
.dgn-inv-row {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 4px;
  transition: border-color 150ms ease;
}
.dgn-inv-row:hover { border-color: var(--border-hover); }
.dgn-inv-row--locked { opacity: 0.42; }
.dgn-inv-row--key {
  border-color: rgba(92, 200, 255, 0.3);
  background: rgba(92, 200, 255, 0.03);
}
.dgn-inv-main {
  display: flex;
  align-items: center;
  gap: 10px;
}
.dgn-inv-slot {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.08em;
  min-width: 7ch;
}
.dgn-inv-icon { font-size: 15px; }
.dgn-inv-name {
  color: var(--text);
  letter-spacing: 0.04em;
  flex: 1;
}
.dgn-inv-status {
  font-size: 10px;
  letter-spacing: 0.14em;
  padding: 2px 8px;
  border-radius: 2px;
  white-space: nowrap;
}
.dgn-inv-status--active  { color: var(--green); border: 1px solid var(--green); }
.dgn-inv-status--locked  { color: var(--muted); border: 1px solid var(--border); }
.dgn-inv-status--missing { color: #d9534f; border: 1px solid rgba(217,83,79,0.4); }
.dgn-inv-status--used    { color: #5cc8ff; border: 1px solid rgba(92,200,255,0.4); }
.dgn-inv-effect {
  font-size: 11px;
  color: var(--muted);
  font-style: italic;
  padding-left: calc(15px + 10px + 7ch);   /* icon + gap + slot width */
}
.dgn-inv-note {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.08em;
  border-top: 1px solid var(--border);
  padding-top: 14px;
}
.dgn-inv-btn {
  font-size: 11px;
  letter-spacing: 0.1em;
  padding: 6px 12px;
}

/* ── Name selection intro screen ── */
.dgn-name-select { gap: 38px; }

.dgn-name-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.dgn-name-label {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text);
  letter-spacing: 0.06em;
}
.dgn-name-label .ach-prompt { color: var(--orange); margin-right: 8px; }

.dgn-name-input {
  background: transparent;
  border: none;
  border-bottom: 2px solid var(--orange);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 28px;
  letter-spacing: 0.22em;
  padding: 8px 4px;
  outline: none;
  width: 100%;
  max-width: 520px;
  caret-color: var(--orange);
  text-transform: uppercase;
  transition: box-shadow 200ms ease;
}
.dgn-name-input:focus {
  box-shadow: 0 4px 0 -2px rgba(232, 93, 4, 0.35);
}
.dgn-name-input::placeholder {
  color: var(--muted);
  opacity: 0.35;
}

.dgn-name-door-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.dgn-name-door-label {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  font-style: italic;
  align-self: flex-start;
}
.dgn-name-door {
  font-family: var(--font-mono);
  font-size: 28px;
  line-height: 1.2;
  color: #5cc8ff;
  text-shadow: 0 0 8px rgba(92, 200, 255, 0.3);
  cursor: pointer;
  margin: 0;
  animation: door-idle 4s ease-in-out infinite;
  transition: transform 250ms ease, color 200ms ease, text-shadow 200ms ease;
  outline: none;
  border-radius: 4px;
}
.dgn-name-door:hover,
.dgn-name-door:focus {
  color: #a5e6ff;
  text-shadow: 0 0 24px rgba(92, 200, 255, 0.65), 0 0 50px rgba(92, 200, 255, 0.2);
  transform: scale(1.04);
  animation-play-state: paused;
}
.dgn-name-door.is-door-opening {
  animation: door-descend 700ms ease-in forwards;
}
.dgn-name-door-prompt {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.16em;
  cursor: pointer;
}

/* ── Between-rooms screen ─────────────────────────────────────────── */
.dgn-between-summary {
  padding: 14px 20px;
  border-bottom: 1px solid rgba(232,93,4,0.18);
}
.dgn-between-title {
  font-family: var(--font-mono);
  color: var(--orange);
  font-size: 13px;
  letter-spacing: .1em;
  margin-bottom: 6px;
}
.dgn-between-row {
  font-family: var(--font-mono);
  color: var(--text);
  font-size: 12px;
}
.dgn-between-levelup {
  font-family: var(--font-mono);
  color: #5cc8ff;
  font-size: 12px;
  margin-top: 6px;
  letter-spacing: .06em;
}
.dgn-between-stats {
  padding: 10px 20px;
  border-bottom: 1px solid rgba(232,93,4,0.10);
}
.dgn-between-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid rgba(232,93,4,0.10);
}
.dgn-between-col {
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.dgn-between-col + .dgn-between-col {
  border-left: 1px solid rgba(232,93,4,0.10);
}
.dgn-between-col-title {
  font-family: var(--font-mono);
  color: var(--orange);
  font-size: 12px;
  letter-spacing: .14em;
}
.dgn-cube-btn { width: 100%; }
.dgn-cube-result {
  font-family: var(--font-mono);
  color: #5cc8ff;
  font-size: 12px;
  min-height: 18px;
  opacity: 0;
  transition: opacity .35s;
}
.dgn-cube-result.is-visible { opacity: 1; }

/* Workshop rows */
.dgn-workshop-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(232,93,4,0.07);
  align-items: start;
}
.dgn-workshop-row--missing { opacity: .35; }
.dgn-workshop-name {
  font-family: var(--font-mono);
  color: var(--text);
  font-size: 12px;
  grid-column: 1;
}
.dgn-workshop-effect {
  font-family: var(--font-mono);
  color: var(--muted);
  font-size: 11px;
  grid-column: 1;
}
.dgn-workshop-btn {
  font-family: var(--font-mono);
  background: none;
  border: 1px solid rgba(232,93,4,0.45);
  color: var(--orange);
  font-size: 11px;
  padding: 4px 10px;
  cursor: pointer;
  transition: background .15s, color .15s;
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
}
.dgn-workshop-btn:hover:not(:disabled) { background: rgba(232,93,4,0.12); }
.dgn-workshop-btn:disabled { opacity: .35; cursor: default; }
.dgn-workshop-active, .dgn-workshop-missing {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .1em;
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
}
.dgn-workshop-active  { color: var(--orange); }
.dgn-workshop-missing { color: var(--muted); }

.dgn-between-nav {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ── Dungeon entrance (defeat / retreat / complete) ───────────────── */
.dgn-entrance-msg {
  padding: 20px 20px 12px;
}
.dgn-entrance-stats {
  padding: 12px 20px;
  border-top: 1px solid rgba(232,93,4,0.12);
  border-bottom: 1px solid rgba(232,93,4,0.12);
}
.dgn-entrance-note {
  font-family: var(--font-mono);
  color: var(--muted);
  font-size: 11px;
  margin-top: 6px;
}
.dgn-entrance-buttons {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* pre-run lobby: art | workshop side by side */
.dgn-prerun-body {
  display: flex;
  flex-direction: row;
  flex: 1;
  min-height: 0;
  gap: 24px;
  align-items: stretch;
}
.dgn-prerun-art {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-width: 0;
  padding-right: 24px;
  border-right: 1px solid var(--border);
  justify-content: center;
}
.dgn-prerun-panel {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-top: 4px;
}
.dgn-prerun-panel .dgn-enter-btn { margin-top: auto; }

/* ── Between-rooms REST layout ── */
/* Side-by-side: left = campfire+log+stats, right = workshop+nav */
.dgn-between-body {
  display: flex;
  flex-direction: row;
  flex: 1;
  min-height: 0;
  gap: 24px;
}
.dgn-between-left {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  border-right: 1px solid var(--border);
  padding-right: 24px;
}
/* campfire stage grows to fill available height */
.dgn-between-rooms .dgn-combat-stage { flex: 1; min-height: 0; }
/* log is auto-height (only 1-2 lines of content) */
.dgn-between-rooms .dgn-combat-dialog { height: auto; min-height: 52px; flex: none; }
/* player stats block stays compact */
.dgn-between-rooms .dgn-combat-player { flex: none; }
/* right column is its own flex column */
.dgn-between-rooms .dgn-actions-col {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
/* workshop list scrolls internally */
.dgn-workshop-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}
/* descend/abandon buttons pinned at the bottom of right col */
.dgn-between-rooms .dgn-enter-btn { flex: none; margin-top: 10px; }
.dgn-between-rooms .dgn-retreat-btn { flex: none; margin-top: 6px; width: 100%; text-align: center; }

/* infinite mode button — purple so it reads differently from the orange */
@keyframes dgn-inf-pulse {
  0%, 100% { box-shadow: 0 0 0px rgba(180, 100, 255, 0); }
  50%       { box-shadow: 0 0 18px rgba(180, 100, 255, 0.45); }
}
.dgn-enter-btn.dgn-inf-btn {
  border-color: #b464ff;
  color: #b464ff;
  animation: dgn-inf-pulse 2.2s ease-in-out infinite;
}
.dgn-enter-btn.dgn-inf-btn:hover {
  background: rgba(180, 100, 255, 0.10);
  border-color: #d09aff;
  color: #d09aff;
}

/* ── Run summary ── */
.dgn-summary-bonus {
  color: #5cc8ff;
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 8px 20px;
  border-top: 1px solid rgba(92,200,255,0.15);
}

/* ── Non-main-combat screens : stage keeps natural height, no flex-grow ──
   (run summary, lobby, inventory have more children than header+stage+dialog+bottom,
   so the stage must not absorb leftover space; these screens scroll internally.) */
.dgn-run-summary   .dgn-combat-stage,
.dgn-inventory     .dgn-combat-stage { flex: none; }

/* ── Run summary : dialogs grow to natural height, no 138px combat cap ── */
.dgn-run-summary .dgn-combat-dialog  { height: auto; overflow: visible; flex: none; }

/* ── Mirror Room ── */
.mirror-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.form-card {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 12px;
  transition: border-color 0.15s, background 0.15s;
  box-sizing: border-box;
}
.form-card:hover { border-color: var(--orange); }
.form-card.is-suggested {
  border: 2px solid var(--orange);
  background: rgba(232, 93, 4, 0.05);
}
.form-card.is-selected {
  border: 2px solid var(--orange);
  background: rgba(232, 93, 4, 0.09);
}
.form-card-label {
  font-size: 10px;
  color: var(--orange);
  letter-spacing: 0.15em;
  margin-bottom: 6px;
  min-height: 15px;
}
.form-card-name    { font-size: 13px; font-weight: bold; color: var(--text); letter-spacing: 0.08em; margin-bottom: 4px; }
.form-card-flavor  { font-size: 11px; color: var(--muted); font-style: italic; margin-bottom: 8px; }
.form-card-stats   { font-size: 11px; color: var(--text); }
.form-card-trigger { font-size: 10px; color: var(--muted); opacity: 0.6; margin-top: 6px; }
.mirror-btn-row    { display: flex; gap: 10px; flex-wrap: wrap; }
.mirror-btn-row > button { margin-top: 0; }
@media (max-width: 720px) { .mirror-grid { grid-template-columns: 1fr; } }

/* Non-combat screens fill the dungeon and scroll internally */
.dgn-run-summary,
.dgn-inventory,
.dgn-name-select   { overflow-y: auto; flex: 1; min-height: 0; }
/* Pre-run lobby: 2-col layout — no outer scroll, panel scrolls internally */
.dgn-prerun-lobby  { overflow: hidden; flex: 1; min-height: 0; }

/* min-width:0 on the whole chain — prevents content reflow from shifting frame width */
#dungeon               { min-width: 0; }
.dungeon               { min-width: 0; width: 100%; box-sizing: border-box; }
.dgn-combat            { min-width: 0; width: 100%; box-sizing: border-box; }
.dgn-combat-header,
.dgn-combat-stage,
.dgn-combat-dialog,
.dgn-combat-bottom     { min-width: 0; }
.dgn-combat-header     { overflow: hidden; }
.dgn-combat-bottom > *,
.dgn-combat-player,
.dgn-actions-col       { min-width: 0; overflow: hidden; }
.dgn-combat-actions,
.dgn-combat-actions > * { min-width: 0; }
.dgn-stage-bottom,
.dgn-stage-sub,
.dgn-enemy-name,
.dgn-enemy-hp,
.dgn-player-name,
.dgn-player-bars,
.dgn-player-meta       { min-width: 0; overflow: hidden; }
.dgn-prerun-panel,
.dgn-between-cols,
.dgn-run-summary       { min-width: 0; }
.dgn-between-col       { min-width: 0; overflow: hidden; }

/* Mobile : full-screen mode OFF — page scrolls naturally on small screens */
@media (max-width: 720px) {
  body.ach-body         { height: auto; overflow: auto; }
  body.ach-body footer  { display: flex; }
  .ach-page  {
    display: flex; flex-direction: column;
    flex: none; min-height: auto; overflow: visible; padding: 80px 16px 60px;
  }
  .ach-page-header {
    border-right: none; border-bottom: 1px solid var(--border);
    padding-right: 0; padding-bottom: 8px; margin-bottom: 12px;
  }
  .ach-sys-lines { flex-direction: column; gap: 4px; }
  .ach-sys-line  { writing-mode: horizontal-tb; transform: none; font-size: 9px; white-space: normal; }
  #dungeon   { grid-area: unset; flex: none; overflow: visible; }
  .dungeon   { flex: none; min-height: unset; margin-top: 12px; padding: 16px; }
  .ach-mini-footer { display: none; }
  .dgn-combat { flex: none; height: auto; padding: 18px 16px; gap: 16px; }
  .dgn-combat-stage { flex: none; }
  .dgn-run-summary,
  .dgn-prerun-lobby,
  .dgn-inventory,
  .dgn-name-select { flex: none; min-height: unset; }
  .dgn-prerun-body { flex-direction: column; gap: 16px; }
  .dgn-prerun-art  { border-right: none; border-bottom: 1px solid var(--border); padding-right: 0; padding-bottom: 12px; justify-content: flex-start; }
  .dgn-prerun-panel { overflow-y: visible; min-height: unset; }
  .dgn-prerun-panel .dgn-enter-btn { margin-top: 8px; }
  .dgn-enemy-art { flex: none; overflow: visible; font-size: 14px; padding: 18px 12px 8px; }
  .dgn-enemy-name { font-size: 18px; }
  .dgn-combat-bottom { grid-template-columns: 1fr; }
  .dgn-combat-actions { grid-template-columns: repeat(2, 1fr); }
  .dgn-combat-actions > :nth-child(n+5) { grid-column: 1 / -1; }
  .dgn-result-title { font-size: 28px; }
  .dgn-name-door { font-size: 18px; }
  .dgn-name-input { font-size: 20px; }
  .dgn-between-cols { grid-template-columns: 1fr; }
  .dgn-between-col + .dgn-between-col { border-left: none; border-top: 1px solid rgba(232,93,4,0.10); }
  /* between-rooms REST screen: stack vertically on mobile */
  .dgn-between-body { flex-direction: column; gap: 16px; }
  .dgn-between-left { border-right: none; border-bottom: 1px solid var(--border); padding-right: 0; padding-bottom: 12px; }
  .dgn-between-rooms .dgn-combat-stage { flex: none; }
  .dgn-between-rooms .dgn-combat-dialog { min-height: unset; }
  .dgn-workshop-scroll { overflow-y: visible; flex: none; }
  .dgn-between-rooms .dgn-actions-col { flex: none; min-height: unset; }
}

/* ── ACHIEVEMENTS TOAST + SWORD ── */
.sword-cursor * { cursor: inherit !important; }

/* ── Blue key SVG icon ── */
.key-svg-icon {
  height: 1em;
  width: auto;
  vertical-align: middle;
  display: inline-block;
}
.ach-toast-icon .key-svg-icon { height: 28px; }

.ach-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  width: 320px;
  background: var(--bg3);
  border-left: 3px solid var(--orange);
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 32px rgba(0,0,0,0.6);
  overflow: hidden;
  transform: translateX(calc(100% + 32px));
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.22,1,0.36,1), opacity 0.4s ease;
  pointer-events: none;
}

.ach-toast--in {
  transform: translateX(0);
  opacity: 1;
}

.ach-toast--out {
  transform: translateX(calc(100% + 32px));
  opacity: 0;
}

.ach-toast-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px 12px;
}

.ach-toast-icon {
  font-size: 28px;
  line-height: 1;
  flex-shrink: 0;
}

.ach-toast-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.ach-toast-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  color: var(--orange);
  text-transform: uppercase;
}

.ach-toast-name {
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 0.04em;
  color: var(--text);
  line-height: 1.1;
}

.ach-toast-desc {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Loot drop line inside toast */
.ach-toast-loot {
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px dashed rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--text);
}
.ach-toast-loot-label {
  color: var(--orange);
  letter-spacing: 0.16em;
}
.ach-toast-loot-icon { font-size: 13px; line-height: 1; }
.ach-toast-loot-name { color: var(--text); }

.ach-toast-loot--key .ach-toast-loot-label {
  color: var(--plat-text);
}
.ach-toast-loot--key .ach-toast-loot-name {
  color: var(--plat-text);
  text-shadow: 0 0 6px rgba(176, 176, 216, 0.3);
}

/* Key toast — different border color */
.ach-toast--key {
  border-left-color: var(--plat-text);
}

/* Hint toast — ARG-style transmission for the hidden key reveal */
.ach-toast--hint {
  border-left-color: var(--green);
  background: linear-gradient(135deg, var(--bg3), rgba(34, 197, 94, 0.06));
}
.ach-toast--hint .ach-toast-label {
  color: var(--green);
  letter-spacing: 0.18em;
}
.ach-toast--hint .ach-toast-name {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.1em;
}
.ach-toast--hint .ach-toast-desc {
  font-family: var(--font-mono);
  font-size: 11px;
  white-space: normal;
}
.ach-toast--hint .ach-toast-icon {
  animation: footer-key-pulse 1.6s ease-in-out infinite;
}

.ach-toast-bar {
  height: 3px;
  width: 100%;
  background: var(--orange);
  transition: width linear;
  transform-origin: left;
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  /* Nav */
  nav { padding: 0 24px; }
  .nav-links { display: none; }
  .nav-logo-role { display: none; }

  /* Hero */
  .hero { padding: 120px 24px 64px; grid-template-columns: 1fr; gap: 40px; }
  .hero-aside { position: static; }
  .hero-name { font-size: clamp(42px, 11vw, 64px); white-space: normal; }
  .hero-info-strip {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    overflow: hidden;
  }
  .hero-strip-sep { display: none; }
  .hero-strip-badge {
    padding: 7px 14px;
    border-bottom: 1px solid var(--border);
    border-right: 1px solid var(--border);
  }
  .hero-strip-item {
    padding: 7px 14px;
    border-bottom: 1px solid var(--border);
    border-right: 1px solid var(--border);
  }
  .hero-strip-item:nth-of-type(2) { border-right: none; }
  .hero-strip-item:nth-of-type(2),
  .hero-strip-mail {
    border-bottom: none;
  }
  .hero-strip-mail {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 7px;
    border-right: none;
    border-bottom: none;
  }

  /* Section */
  .section { padding: 64px 24px; }
  .section-title { font-size: 44px; }

  /* Project list — stack vertically */
  .project-list-item {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 20px 0;
  }
  .pli-visual { order: -1; aspect-ratio: 16 / 7; }
  .pli-visual-wrap { order: -1; }
  .pli-name { white-space: normal; }
  .pli-name.long { font-size: clamp(22px, 5.5vw, 38px); }

  /* Side projects — 1 column */
  .project-list.side { grid-template-columns: 1fr; }
  .project-list.side .pli-visual { aspect-ratio: 16 / 6; }

  /* Stats */
  .stats-inner { grid-template-columns: repeat(2,1fr); padding: 0 24px; }
  .stat-item:nth-child(2) { border-right: none; }
  .stat-item:nth-child(4) { border-right: none; }
  .stat-item { padding: 14px 16px; }
  .stat-item:first-child { padding-left: 16px; }

  /* Experience */
  .experience-card { padding: 24px; }
  .exp-logo { width: 88px; height: 88px; padding: 6px; border-radius: 12px; }
  .exp-company { font-size: 38px; }
  .exp-sm-logo { width: 80px; height: 80px; padding: 8px; border-radius: 12px; }
  .exp-sm-company { font-size: 26px; }
  .exp-secondary-grid { grid-template-columns: 1fr; }
  .edu-block { flex-direction: column; align-items: flex-start; padding: 24px; }
  .edu-logo { width: 56px; height: 56px; }
  .edu-school { font-size: 24px; }

  /* Project pages */
  .pp-cover-img { height: 200px; }
  .pp-title { font-size: 52px; }
  .pp-stats-row,
  .pp-stats-4,
  .pp-stats-6 { grid-template-columns: repeat(2, 1fr); }
  .pp-cast-cols { grid-template-columns: 1fr; }
  .pp-section-body { padding-left: 24px; }
  .project-page { padding: 24px 24px 60px; }
  .page-back { margin: 16px 24px; }

  /* Misc */
  .about-grid { grid-template-columns: 1fr; }
  .about-info-card { position: static; }
  .projects-grid { grid-template-columns: 1fr; }
  .project-card.featured { grid-column: span 1; }
  footer { flex-direction: column; gap: 24px; text-align: center; padding: 40px 24px; }
}

@media (max-width: 640px) {
  /* Nav */
  nav { padding: 0 20px; height: 54px; }

  /* Hero */
  .hero { padding: 96px 20px 48px; }
  .hero-greeting { font-size: 18px; }
  .hero-name { font-size: clamp(36px, 10vw, 52px); }
  .hero-role { font-size: 16px; }
  .hero-bio p { font-size: 15px; }
  .hero-bio-actions { flex-direction: column; }
  .btn-cv { justify-content: center; }

  /* Section */
  .section { padding: 48px 20px; }
  .section-title { font-size: 36px; }

  /* Project list */
  .pli-name { font-size: clamp(24px, 7vw, 38px); }
  .pli-role { font-size: 14px; }
  .pli-desc { font-size: 14px; }
  .pli-visual { aspect-ratio: 16 / 6; }

  /* Stats */
  .stats-inner { grid-template-columns: repeat(2,1fr); padding: 0 20px; }
  .stat-value { font-size: 24px; }

  /* Experience */
  .experience-card { padding: 20px; }
  .exp-logo { width: 68px; height: 68px; padding: 5px; border-radius: 10px; }
  .exp-company { font-size: 30px; }
  .exp-sm-logo { width: 60px; height: 60px; padding: 6px; border-radius: 10px; }
  .exp-sm-company { font-size: 22px; }
  .exp-sm-role { font-size: 13px; }
  .exp-prog-role { font-size: 9px; padding: 3px 9px; }
  .exp-sm-header { gap: 14px; }
  .experience-card-sm { padding: 20px; }

  /* Project pages */
  .pp-title { font-size: 36px; }
  .pp-stats-row,
  .pp-stats-4,
  .pp-stats-6 { grid-template-columns: repeat(2, 1fr); }
  .pp-meta { gap: 20px; }
  .pp-challenges { grid-template-columns: 1fr; }
  .pp-presence-grid { grid-template-columns: 1fr; }
  .pp-cast-cols { grid-template-columns: 1fr; }
  .pp-two-col { grid-template-columns: 1fr; }
  .pp-decision { flex-direction: column; gap: 8px; }
  .pp-decision-num { font-size: 36px; width: auto; text-align: left; }
  .pp-placeholder { height: 180px; }
  .pp-section summary { padding: 22px 0; gap: 14px; }
  .pp-section-title { font-size: 22px; }
  .pp-section-body { padding-left: 0; padding-bottom: 28px; }

  /* Accordion closed state — mobile */
  .projects-accordion summary { padding: 14px 16px; }
  .projects-accordion[open] summary { padding: 14px 16px; }
  .projects-accordion[open] .pp-section-body { padding-left: 16px; padding-right: 16px; }
  .acc-thumb { width: 44px; height: 44px; border-radius: 8px; }
  .acc-thumbs .acc-thumb:nth-child(n+4) { display: none; }
  .acc-thumbs .acc-thumb-more { display: flex !important; }
  .acc-badge { font-size: 12px; padding: 2px 7px; }

  /* Footer */
  footer { padding: 32px 20px; }

  /* Hide photo aside on phones — too small to read annotations */
  .hero-aside { display: none; }

  /* Nav contact */
  .nav-contact-btn span { display: none; }
  .nav-contact-btn { padding: 0 12px; }

  /* Experience bullets: stack label above list */
  .exp-bullet-group { grid-template-columns: 1fr; gap: 10px; padding: 16px 0; }

  /* Disable scale hover (irrelevant on touch) */
  .project-list .project-list-item:hover,
  .project-list.side .project-list-item:hover,
  .experience-card:hover,
  .experience-card-sm:hover { transform: none; }

  /* Achievements page */
  .ach-page { padding: 100px 20px 60px; }
  .ach-sys-line { font-size: 9px; }
  .ta-art, .ta-stem, .ta-base { font-size: 10px; }
  .ta-icon { font-size: 14px; }
  .ta-plat-icon { font-size: 20px; }
  .troph-row { gap: 2px; }
  .troph-label { font-size: 8px; }
  .troph-desc  { font-size: 8px; max-width: 90px; }
  .troph-plat-name { font-size: 24px; }
  .ach-page-title-art { font-size: clamp(5px, 2.4vw, 10px); line-height: 1.05; }

  /* Trophy loot — compact on mobile */
  .troph-loot { max-width: 100px; padding-top: 5px; margin-top: 8px; gap: 2px; }
  .troph-loot-label { font-size: 7px; letter-spacing: 0.18em; }
  .troph-loot-row { font-size: 8px; gap: 4px; }
  .troph-loot-icon { font-size: 11px; }

  /* Platinum reward */
  .troph-plat-reward { margin-top: 16px; padding-top: 10px; }
  .troph-plat-reward-label { font-size: 9px; }
  .troph-plat-reward-row { font-size: 12px; }
  .troph-plat-reward-icon { font-size: 15px; }
  .troph-plat-reward-hint { font-size: 8px; text-align: center; }

  /* Dungeon — release full-screen mode, revert sidebar to stacked column on tablet */
  body.ach-body        { height: auto; overflow: auto; }
  body.ach-body footer { display: flex; }
  .ach-page  {
    display: flex; flex-direction: column;
    flex: none; min-height: auto; overflow: visible;
    padding: 100px 20px 60px;
  }
  .ach-page-header {
    border-right: none; border-bottom: 1px solid var(--border);
    padding-right: 0; padding-bottom: 8px; margin-bottom: 12px;
  }
  .ach-sys-lines { flex-direction: column; gap: 4px; }
  .ach-sys-line  { writing-mode: horizontal-tb; transform: none; font-size: 9px; white-space: normal; }
  .ach-page-title-art { display: none; }
  #dungeon   { grid-area: unset; flex: none; overflow: visible; }
  .dungeon   { flex: none; min-height: unset; padding: 18px 16px; margin-top: 12px; }
  .ach-mini-footer { display: none; }
  .dgn-combat { flex: none; height: auto; }
  .dgn-combat-stage { flex: none; }
  .dgn-run-summary,
  .dgn-prerun-lobby,
  .dgn-inventory,
  .dgn-name-select { flex: none; min-height: unset; }
  .dgn-prerun-body { flex-direction: column; gap: 16px; }
  .dgn-prerun-art  { border-right: none; border-bottom: 1px solid var(--border); padding-right: 0; padding-bottom: 12px; justify-content: flex-start; }
  .dgn-prerun-panel { overflow-y: visible; min-height: unset; }
  .dgn-prerun-panel .dgn-enter-btn { margin-top: 8px; }
  .dgn-enemy-art { flex: none; overflow: visible; }
  .dgn-grid { grid-template-columns: 1fr; gap: 32px; }
  .dgn-slot-head { font-size: 11px; gap: 8px; }
  .dgn-slot-type { min-width: 58px; letter-spacing: 0.1em; }
  .dgn-slot-icon { min-width: 32px; font-size: 12px; }
  .dgn-slot-sub  { font-size: 8px; margin-left: 0; }
  .dgn-door-art  { font-size: 11px; }
  .dgn-door      { align-self: center; }
  /* between-rooms REST screen: stack on tablet */
  .dgn-between-body { flex-direction: column; gap: 16px; }
  .dgn-between-left { border-right: none; border-bottom: 1px solid var(--border); padding-right: 0; padding-bottom: 12px; }
  .dgn-between-rooms .dgn-combat-stage { flex: none; }
  .dgn-between-rooms .dgn-combat-dialog { min-height: unset; }
  .dgn-workshop-scroll { overflow-y: visible; flex: none; }
  .dgn-between-rooms .dgn-actions-col { flex: none; min-height: unset; }

  /* Achievements toast */
  .ach-toast { width: calc(100vw - 32px); right: 16px; }
}

/* Large screens (>1080px) — scale up the achievement page for readability */
@media (min-width: 1081px) {

  /* More breathing room in the page container */
  .ach-page {
    padding-left: 56px;
    padding-right: 56px;
    column-gap: 28px;
  }

  /* Sidebar text ticker */
  .ach-sys-line { font-size: 10px; }

  /* Mini-footer */
  .ach-mini-footer { font-size: 11px; }

  /* ── Antechamber / dungeon lobby ── */
  .dungeon { padding: 18px 28px 18px; }

  .dgn-header { font-size: 15px; }
  .dgn-equip-title { font-size: 15px; margin-bottom: 14px; }

  /* Equipment slots (antechamber gear list) */
  .dgn-slot { padding: 9px 0; }
  .dgn-slot-head { font-size: 16px; gap: 20px; }
  .dgn-slot-type { font-size: 14px; min-width: 92px; }
  .dgn-slot-icon { font-size: 17px; min-width: 52px; }
  .dgn-slot-sub  { font-size: 13px; margin-left: 92px; margin-top: 4px; }
  .dgn-slot-hint-label { font-size: 14px; }
  .dgn-slot-hint       { font-size: 14px; }
  .dgn-slot--key.dgn-slot--locked .dgn-slot-hint-label { font-size: 14px; }
  .dgn-slot--key.dgn-slot--locked .dgn-slot-hint       { font-size: 14px; }

  /* Door panel */
  .dgn-door-art { font-size: 15px; }
  .dgn-enter-btn { font-size: 15px; padding: 14px 28px; }

  /* ── Pre-run lobby (DUNGEON ENTRANCE · GEAR UP) ── */
  .dgn-player-buffs        { font-size: 13px; }
  .dgn-between-col-title   { font-size: 13px; }
  .dgn-workshop-row        { padding: 9px 0; }
  .dgn-workshop-name       { font-size: 14px; }
  .dgn-workshop-effect     { font-size: 13px; }
  .dgn-workshop-btn        { font-size: 13px; padding: 5px 12px; }
  .dgn-workshop-active,
  .dgn-workshop-missing    { font-size: 12px; }

  /* ── Trophy shelf ── */
  .ta-art, .ta-stem, .ta-base { font-size: 17px; }
  .ta-icon    { font-size: 22px; }
  .ta-plat-icon { font-size: 32px; }
  .troph-label  { font-size: 13px; }
  .troph-desc   { font-size: 11px; }

  /* ── Combat UI ── */
  .dgn-combat { padding: 22px 32px; gap: 14px; }

  .dgn-combat-header { font-size: 15px; gap: 20px; padding-bottom: 10px; }
  .dgn-combat-turn   { font-size: 14px; }
  .dgn-retreat-btn   { font-size: 13px; padding: 8px 18px; }

  /* Stage */
  .dgn-stage-sub  { font-size: 14px; padding: 4px 20px 6px; }
  .dgn-stage-bottom { padding: 6px 20px; }
  .dgn-enemy-name { font-size: 22px; }
  .dgn-enemy-hp   { font-size: 15px; }
  .dgn-enemy-hp .dgn-stat-num { font-size: 13px; }
  .dgn-enemy-art  { font-size: 16px; padding: 20px 32px 12px; }

  /* Player block */
  .dgn-combat-player { font-size: 15px; padding: 14px 18px; gap: 8px; }
  .dgn-player-name   { font-size: 15px; }
  .dgn-player-bars   { font-size: 14px; gap: 22px; }
  .dgn-player-bar .dgn-stat-num { font-size: 12px; }
  .dgn-player-meta   { font-size: 13px; }

  /* Dialog log */
  .dgn-combat-dialog { font-size: 14px; height: 138px; padding: 8px 18px; }
  .dgn-dialog-title  { font-size: 12px; }

  /* Action buttons */
  .dgn-combat-bottom { gap: 14px; }
  .dgn-actions-col   { gap: 10px; }
  .dgn-combat-actions { gap: 12px; }
  .dgn-action-btn     { font-size: 15px; padding: 10px 18px; }
  .dgn-action-suffix  { font-size: 12px; }

  /* Parcours */
  .parcours-btn-exp span { display: none; }
  .parcours-stop-role  { font-size: 11px; }
  .parcours-stop-studio { display: none; }
  .parcours-card { padding: 16px 18px; }
  .parcours-card-role { font-size: 18px; }
}
