/* ==========================================================================
   Vault-Tec Pip-OS v7.1.0 - Core Stylesheet
   Theme: Fallout 4 Green Phosphor CRT (#00FF66)
   Target: iPhone 7 / iOS Safari PWA / MCM Comic Con London
   ========================================================================== */

:root {
  /* Phosphor Color Palette */
  --pip-green: #00ff66;
  --pip-green-bright: #33ff88;
  --pip-green-dim: #00aa44;
  --pip-green-dark: #00441a;
  --pip-green-faint: rgba(0, 255, 102, 0.12);
  --pip-green-glow: rgba(0, 255, 102, 0.55);
  --pip-green-glow-intense: rgba(0, 255, 102, 0.85);
  --pip-bg: #071009;
  --pip-bg-deep: #030804;
  --pip-scanline-color: rgba(0, 0, 0, 0.38);

  /* Dynamic Screen Masking Variables (Default: Full Screen) */
  --viewport-width: 100%;
  --viewport-height: 100%;
  --viewport-offset-left: 0%;
  --viewport-offset-top: 0%;
  --viewport-scale: 1;
  --calib-h-ratio: 1;
  --cvh: 1vh;

  /* Typography */
  --font-pipboy: 'VT323', 'Share Tech Mono', 'Courier New', monospace;
}

/* Base Reset & Mobile Hardening */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

input, textarea, .character-name-input {
  -webkit-user-select: text !important;
  user-select: text !important;
  -webkit-touch-callout: default !important;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: #000000;
  color: var(--pip-green);
  font-family: var(--font-pipboy);
  font-size: 18px;
  line-height: 1.25;
  letter-spacing: 0.5px;
  text-shadow: 0 0 2px var(--pip-green-glow), 0 0 8px rgba(0, 255, 102, 0.3);
  touch-action: manipulation;
}

/* ==========================================================================
   Screen & CRT Layers
   ========================================================================== */

#screen-container {
  position: relative;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: radial-gradient(circle at center, #0a1f0f 0%, #030a04 75%, #000000 100%);
}

/* CRT Scanlines Layer */
.crt-scanlines {
  pointer-events: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 500;
  background: linear-gradient(
    rgba(18, 16, 16, 0) 50%, 
    var(--pip-scanline-color) 50%
  );
  background-size: 100% 4px;
  opacity: 0.75;
}

/* CRT Screen Vignette (Toned down at outer edges so HUD stays legible) */
.crt-vignette {
  pointer-events: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 501;
  background: radial-gradient(circle at center, transparent 75%, rgba(0, 0, 0, 0.35) 95%, rgba(0, 0, 0, 0.6) 100%);
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.6);
}

/* Subtle Phosphor Bloom Overlay */
.crt-glow-bloom {
  pointer-events: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 502;
  background: radial-gradient(circle at center, rgba(0, 255, 102, 0.02) 0%, transparent 80%);
}

/* Vertical Sync Glitch (Triggered via JS / Random or tap recovery) */
.vsync-glitch {
  animation: crtJitter 0.25s infinite alternate ease-in-out;
  filter: contrast(140%) brightness(120%) hue-rotate(5deg);
}

@keyframes crtJitter {
  0% { transform: translateY(0px) skewX(0deg); opacity: 0.95; }
  25% { transform: translateY(-4px) skewX(1deg); opacity: 0.8; }
  50% { transform: translateY(6px) skewX(-1.5deg); opacity: 0.9; }
  75% { transform: translateY(-8px) skewX(2deg); opacity: 0.7; }
  100% { transform: translateY(2px) skewX(-0.5deg); opacity: 0.85; }
}

/* ==========================================================================
   Calibrated Pip-Boy Viewport
   Driven by --viewport-width, --viewport-height, and offsets
   ========================================================================== */

.pipboy-viewport {
  position: absolute;
  left: var(--viewport-offset-left);
  top: var(--viewport-offset-top);
  width: var(--viewport-width);
  height: var(--viewport-height);
  transform: scale(var(--viewport-scale));
  transform-origin: top left;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  background-color: rgba(7, 16, 9, 0.65);
  box-shadow: 0 0 15px rgba(0, 255, 102, 0.15);
  transition: width 0.05s ease, height 0.05s ease, left 0.05s ease, top 0.05s ease;
  z-index: 100;
}

/* ==========================================================================
   Pip-Boy Header & Navigation Tabs
   ========================================================================== */

.pipboy-header {
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 2px solid var(--pip-green);
  padding: calc(var(--calib-vh) * 0.7) calc(var(--calib-vh) * 2);
  background: rgba(0, 30, 10, 0.45);
  flex-shrink: 0;
  width: 100%;
}

.nav-tabs {
  display: flex;
  flex: 1;
  justify-content: space-evenly;
  align-items: center;
  padding: 0 calc(var(--calib-vh) * 2);
  max-width: 100%;
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--pip-green-dim);
  font-family: var(--font-pipboy);
  font-size: calc(var(--calib-vh) * 5.2);
  font-weight: bold;
  letter-spacing: 1px;
  cursor: pointer;
  padding: 2px calc(var(--calib-vh) * 1.5);
  position: relative;
  transition: color 0.15s ease;
  text-align: center;
  white-space: nowrap;
}

.tab-btn.active {
  color: var(--pip-green-bright);
  text-shadow: 0 0 8px var(--pip-green-glow);
}

/* Stepped Bracket Active Tab Header */
.tab-btn {
  background: transparent;
  border: none;
  color: var(--pip-green-dim);
  font-family: var(--font-pipboy);
  font-size: calc(var(--calib-vh) * 5.2);
  font-weight: bold;
  letter-spacing: 1px;
  cursor: pointer;
  padding: 2px calc(var(--calib-vh) * 1.5);
  position: relative;
  transition: color 0.15s ease;
  text-align: center;
  white-space: nowrap;
}

.tab-btn.active {
  color: var(--pip-green-bright);
  text-shadow: 0 0 8px var(--pip-green-glow);
}

/* Stepped top and side bracket lines */
.tab-btn.active::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  border-top: 2px solid var(--pip-green-bright);
  border-left: 2px solid var(--pip-green-bright);
  border-right: 2px solid var(--pip-green-bright);
  box-shadow: 0 0 6px var(--pip-green-glow);
  pointer-events: none;
}

/* Sub-Header Track Base Styling */
.sub-header {
  display: flex;
  gap: calc(var(--calib-vh) * 3);
  border-bottom: 1px dashed var(--pip-green-dim);
  padding-bottom: calc(var(--calib-vh) * 0.4);
  margin-bottom: calc(var(--calib-vh) * 0.8);
  font-size: calc(var(--calib-vh) * 3.8);
  flex-shrink: 0;
  position: relative;
  transition: transform 0.22s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: transform;
  white-space: nowrap;
  width: max-content; /* Prevents text wrap or layout collapsing during shift */
}

.sub-item {
  color: var(--pip-green-dim);
  cursor: pointer;
  transition: color 0.15s ease, text-shadow 0.15s ease;
}

.sub-item.active {
  color: var(--pip-green-bright);
  font-weight: bold;
  text-shadow: 0 0 6px var(--pip-green-glow-intense);
}
/* Locked to physical screen top-right (covered when inside physical Pip-Boy shell) */
.calib-toggle-btn {
  position: absolute;
  top: 8px;
  right: 10px;
  z-index: 510;
  background: rgba(0, 35, 12, 0.85);
  border: 1px solid var(--pip-green-dim);
  color: var(--pip-green);
  font-family: var(--font-pipboy);
  font-size: 14px;
  padding: 4px 10px;
  cursor: pointer;
  border-radius: 2px;
  display: flex;
  align-items: center;
  gap: 5px;
  text-shadow: 0 0 3px var(--pip-green-glow);
  box-shadow: 0 0 8px rgba(0, 255, 102, 0.25);
  transition: all 0.15s ease;
}

.calib-toggle-btn:hover,
.calib-toggle-btn:active {
  background: var(--pip-green);
  color: var(--pip-bg-deep);
  border-color: var(--pip-green);
  box-shadow: 0 0 12px var(--pip-green-glow);
}

/* ==========================================================================
   Main Content Area & Tab Screens
   ========================================================================== */

.pipboy-main {
  flex: 1 1 auto;
  min-height: 0; /* Critical flex property to allow scrolling without pushing footer[cite: 17] */
  overflow-y: auto;
  overflow-x: hidden;
  padding: clamp(3px, 1vh, 8px) clamp(6px, 2vw, 12px);
  position: relative;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
}

.tab-content {
  display: none;
  animation: phosphorFade 0.2s ease-out;
}

.tab-content.active {
  display: flex;
  flex-direction: column;
  flex: 1;
  height: 100%;
  min-height: 0;
}

@keyframes phosphorFade {
  0% { opacity: 0.3; filter: brightness(180%); }
  100% { opacity: 1; filter: brightness(100%); }
}

/* Sub-Header Track Styling */
.sub-header {
  display: flex;
  gap: calc(var(--calib-vh) * 3);
  border-bottom: 1px dashed var(--pip-green-dim);
  padding-bottom: calc(var(--calib-vh) * 0.4);
  margin-bottom: calc(var(--calib-vh) * 0.8);
  font-size: calc(var(--calib-vh) * 3.8);
  flex-shrink: 0;
  position: relative;
  transition: transform 0.22s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: transform;
  white-space: nowrap;
  width: max-content;
}

.sub-item {
  color: var(--pip-green-dim);
  cursor: pointer;
}

.sub-item.active {
  color: var(--pip-green);
  font-weight: bold;
  border-bottom: 1px solid var(--pip-green);
  text-shadow: 0 0 4px var(--pip-green-glow);
}

/* Tab: STAT Screen Layout (Scales proportionally to calibrated viewport height) */
.stat-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-evenly;
  width: 100%;
  min-height: 0;
  padding: 0;
  gap: calc(var(--calib-vh) * 0.6);
  overflow: hidden;
}

/* Vault Boy Walking Stage */
.vault-boy-stage {
  position: relative;
  width: calc(var(--calib-vh) * 44);
  height: calc(var(--calib-vh) * 32);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  flex-shrink: 1;
}

.vault-boy-anim-box {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.vault-boy-anim-box {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: transparent; /* Remove solid background to prevent composite edge boxes */
}

.vault-boy-anim-img {
  height: 100%;
  max-height: calc(var(--calib-vh) * 28);
  max-width: calc(var(--calib-vh) * 23);
  object-fit: contain;
  mix-blend-mode: screen;
  filter: url('#pip-threshold-key') brightness(180%) contrast(150%);
  -webkit-filter: url('#pip-threshold-key') brightness(180%) contrast(150%);
  pointer-events: none;
}

/* Limb Condition Bars */
.limb-bar {
  position: absolute;
  width: calc(var(--calib-vh) * 7.5);
  height: calc(var(--calib-vh) * 1.4);
  background: rgba(0, 35, 12, 0.85);
  border: 1px solid var(--pip-green);
  box-shadow: 0 0 5px rgba(0, 255, 102, 0.4);
  overflow: hidden;
}

.limb-fill {
  height: 100%;
  background: var(--pip-green-bright);
  box-shadow: 0 0 5px var(--pip-green-bright), 0 0 8px var(--pip-green-glow);
  transition: width 0.3s ease;
}

.limb-head {
  top: 0;
  left: 50%;
  transform: translateX(-50%);
}

.limb-right-arm {
  top: 26%;
  left: 0;
}

.limb-left-arm {
  top: 26%;
  right: 0;
}

.limb-right-leg {
  top: 66%;
  left: 0;
}

.limb-left-leg {
  top: 66%;
  right: 0;
}

.limb-torso {
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
}

/* Equipment HUD */
.equipment-hud {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: calc(var(--calib-vh) * 1.2);
  margin: 0 auto;
  flex-shrink: 0;
  max-width: 100%;
  flex-wrap: wrap;
}

.hud-sub-label {
  font-family: var(--font-pipboy);
  font-size: calc(var(--calib-vh) * 2.6);
  font-weight: bold;
  color: var(--pip-green-dim);
  line-height: 1;
}

.equip-group {
  display: flex;
  border: 1px solid var(--pip-green-dim);
  background: rgba(0, 25, 10, 0.55);
  box-shadow: inset 0 0 6px rgba(0, 255, 102, 0.15), 0 0 4px rgba(0, 255, 102, 0.1);
}

.equip-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: calc(var(--calib-vh) * 0.35) calc(var(--calib-vh) * 0.9);
  border-right: 1px solid rgba(0, 255, 102, 0.3);
  min-width: calc(var(--calib-vh) * 6.5);
  min-height: calc(var(--calib-vh) * 8);
}

.equip-cell:last-child {
  border-right: none;
}

.equip-icon-cell {
  justify-content: center;
  padding: calc(var(--calib-vh) * 0.35) calc(var(--calib-vh) * 1.2);
  min-width: calc(var(--calib-vh) * 8.5);
}

.equip-stat-cell {
  gap: calc(var(--calib-vh) * 0.3);
}

.hud-icon {
  width: calc(var(--calib-vh) * 3.5);
  height: calc(var(--calib-vh) * 3.5);
  color: var(--pip-green);
  filter: drop-shadow(0 0 3px var(--pip-green-glow));
}

.weapon-gun-icon {
  width: calc(var(--calib-vh) * 6.6);
  height: calc(var(--calib-vh) * 3.5);
}

.helmet-icon {
  width: calc(var(--calib-vh) * 6.2);
  height: calc(var(--calib-vh) * 3.5);
}

.equip-value {
  font-family: var(--font-pipboy);
  font-size: calc(var(--calib-vh) * 4.2);
  font-weight: bold;
  color: var(--pip-green-bright);
  text-shadow: 0 0 5px var(--pip-green-glow);
  line-height: 1;
}

/* Character Name Display */
.character-name-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  flex-shrink: 0;
}

.character-name-display {
  font-family: var(--font-pipboy);
  font-size: calc(var(--calib-vh) * 4.8);
  font-weight: bold;
  color: var(--pip-green-bright);
  text-shadow: 0 0 8px var(--pip-green-glow), 0 0 16px rgba(0, 255, 102, 0.4);
  letter-spacing: 1px;
  text-align: center;
  padding: calc(var(--calib-vh) * 0.2) calc(var(--calib-vh) * 1.2);
  height: calc(var(--calib-vh) * 6);
  line-height: calc(var(--calib-vh) * 5.6);
}

.character-name-input:focus {
  border-bottom: 1px dashed var(--pip-green-bright);
  background: rgba(0, 40, 15, 0.55);
  box-shadow: 0 0 10px rgba(0, 255, 102, 0.35);
}

/* Split Layout for INV Screen */
.inv-view-split {
  display: flex;
  flex-direction: row;
  gap: calc(var(--calib-vh) * 2);
  flex: 1;
  min-height: 0;
  width: 100%;
}

.inv-list {
  flex: 2; /* Occupies ~65% width */
  display: flex;
  flex-direction: column;
  gap: calc(var(--calib-vh) * 0.4);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.quest-log, .radio-stations {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Right Detail Stat Card (~35% width) */
.inv-detail-card {
  flex: 1; /* Occupies ~35% width */
  display: flex;
  flex-direction: column;
  justify-content: flex-end; /* Aligns stat card to bottom-right */
  padding-bottom: calc(var(--calib-vh) * 1);
}

.stat-card-inner {
  display: flex;
  flex-direction: column;
  gap: calc(var(--calib-vh) * 0.4);
  border-top: 1px dashed var(--pip-green-dim);
  padding-top: calc(var(--calib-vh) * 0.8);
}

.stat-card-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: calc(var(--calib-vh) * 3.4);
  border-bottom: 1px solid rgba(0, 255, 102, 0.15);
  padding-bottom: calc(var(--calib-vh) * 0.2);
}

.stat-card-row.sub-stat {
  padding-left: calc(var(--calib-vh) * 1.5);
  font-size: calc(var(--calib-vh) * 3.0);
  color: var(--pip-green-bright);
}

.stat-card-label {
  color: var(--pip-green);
}

.stat-card-value {
  font-weight: bold;
  color: var(--pip-green-bright);
  text-shadow: 0 0 4px var(--pip-green-glow);
}

.no-item-selected {
  font-size: calc(var(--calib-vh) * 3.2);
  color: var(--pip-green-dim);
  text-align: center;
  margin-top: auto;
}

.inv-item, .quest-item, .station-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 8px;
  border: 1px solid transparent;
  cursor: pointer;
  background: transparent;
  color: var(--pip-green);
  transition: background 0.1s ease, color 0.1s ease;
}

/* Selected Item: Solid Green Phosphor Block with Dark Inverted Text */
.inv-item.selected {
  background: var(--pip-green-bright) !important;
  color: #030a04 !important;
  font-weight: bold;
  text-shadow: none !important;
  box-shadow: 0 0 10px var(--pip-green-glow);
}

.inv-item.selected .item-name,
.inv-item.selected .item-stat,
.inv-item.selected .equip-sq {
  color: #030a04 !important;
  text-shadow: none !important;
}

/* Equipped Square Symbol */
.equip-sq {
  display: inline-block;
  font-size: 0.9em;
  margin-right: 4px;
}

.equip-sq-placeholder {
  display: inline-block;
  width: 14px;
}

.quest-item {
  flex-direction: column;
  gap: 3px;
}

.quest-desc {
  font-size: 14px;
  color: var(--pip-green-dim);
}

/* Tab: MAP Layout */
.map-view {
  position: relative;
  width: 100%;
  height: 100%;
  border: 1px solid var(--pip-green-dim);
  background: rgba(0, 10, 2, 0.95);
  overflow: hidden;
  /* Disable all native iOS gesture interference */
  touch-action: none !important;
  -webkit-user-select: none;
  user-select: none;
}

.map-grid {
  height: 140px;
  border: 1px solid var(--pip-green-dim);
  background: repeating-linear-gradient(0deg, rgba(0,255,102,0.06), rgba(0,255,102,0.06) 1px, transparent 1px, transparent 20px),
              repeating-linear-gradient(90deg, rgba(0,255,102,0.06), rgba(0,255,102,0.06) 1px, transparent 1px, transparent 20px);
  position: relative;
  padding: 10px;
}

.map-marker {
  position: absolute;
  font-size: 14px;
}

.player-marker {
  top: 45%;
  left: 45%;
  color: var(--pip-green-bright);
  font-weight: bold;
  animation: markerBlink 1s infinite alternate;
}

@keyframes markerBlink {
  from { opacity: 0.5; }
  to { opacity: 1; }
}

.excel-marker { top: 20%; left: 70%; color: var(--pip-green-dim); }
.booth-marker { top: 75%; left: 25%; color: var(--pip-green-dim); }

.map-status, .radio-notice {
  font-size: 14px;
  color: var(--pip-green-dim);
  text-align: center;
  margin-top: 4px;
}

/* ==========================================================================
   Pip-Boy Footer HUD (Game Accurate Layout)
   ========================================================================== */

.pipboy-footer {
  flex-shrink: 0; /* Prevents footer from collapsing or getting squished off-screen[cite: 17] */
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 2px solid var(--pip-green);
  padding: calc(var(--calib-vh) * 1.5) calc(var(--calib-vh) * 3);
  background: rgba(0, 30, 10, 0.5);
  gap: calc(var(--calib-vh) * 2);
  height: calc(var(--calib-vh) * 12); /* Explicit bounded height[cite: 17] */
  box-sizing: border-box;
}

.hud-section {
  display: flex;
  align-items: center;
}

.hud-hp {
  justify-content: flex-start;
  min-width: calc(var(--calib-vh) * 18);
}

.hud-ap {
  justify-content: flex-end;
  min-width: calc(var(--calib-vh) * 18);
}

.hud-label {
  font-family: var(--font-pipboy);
  font-size: calc(var(--calib-vh) * 3.8);
  font-weight: bold;
  color: #66ffa3;
  text-shadow: 0 0 8px var(--pip-green-bright), 0 0 14px var(--pip-green-glow-intense);
  white-space: nowrap;
}

/* Level & XP Bar Container */
.hud-xp-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: calc(var(--calib-vh) * 1.5);
}

.xp-bar {
  flex: 1;
  height: calc(var(--calib-vh) * 1.8);
  background: rgba(0, 30, 10, 0.6);
  border: 1px solid var(--pip-green);
  position: relative;
  box-shadow: inset 0 0 4px rgba(0, 255, 102, 0.2);
}

.xp-fill {
  height: 100%;
  background: var(--pip-green-bright);
  box-shadow: 0 0 8px var(--pip-green-glow);
  transition: width 0.3s ease;
}

/* ==========================================================================
   Calibration Alignment Grid Overlay
   ========================================================================== */

.calibration-grid {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 400;
  border: 2px dashed rgba(0, 255, 102, 0.85);
  box-shadow: inset 0 0 10px rgba(0, 255, 102, 0.4);
}

.calibration-grid.hidden {
  display: none;
}

.grid-crosshair {
  position: absolute;
  width: 24px;
  height: 24px;
}

.crosshair-tl {
  top: 4px;
  left: 4px;
  border-top: 3px solid var(--pip-green-bright);
  border-left: 3px solid var(--pip-green-bright);
}

.crosshair-tr {
  top: 4px;
  right: 4px;
  border-top: 3px solid var(--pip-green-bright);
  border-right: 3px solid var(--pip-green-bright);
}

.crosshair-bl {
  bottom: 4px;
  left: 4px;
  border-bottom: 3px solid var(--pip-green-bright);
  border-left: 3px solid var(--pip-green-bright);
}

.crosshair-br {
  bottom: 4px;
  right: 4px;
  border-bottom: 3px solid var(--pip-green-bright);
  border-right: 3px solid var(--pip-green-bright);
}

.grid-center-cross {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 30px;
  height: 30px;
  transform: translate(-50%, -50%);
}

.grid-center-cross::before {
  content: '';
  position: absolute;
  top: 14px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--pip-green);
}

.grid-center-cross::after {
  content: '';
  position: absolute;
  left: 14px;
  top: 0;
  height: 100%;
  width: 2px;
  background-color: var(--pip-green);
}

.grid-label {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--pip-bg-deep);
  border: 1px solid var(--pip-green);
  padding: 2px 8px;
  font-size: 14px;
  font-weight: bold;
}

.grid-bezel-guide {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--pip-bg-deep);
  border: 1px solid var(--pip-green);
  padding: 2px 8px;
  font-size: 13px;
  color: var(--pip-green-bright);
}

/* ==========================================================================
   Calibration Drawer / Modal Overlay
   ========================================================================== */

.calib-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(3, 10, 4, 0.94);
  z-index: 600;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 8px;
}

.calib-modal.hidden {
  display: none !important;
}

.calib-container {
  width: 96%;
  max-width: 640px;
  max-height: 92vh;
  max-height: 92dvh;
  overflow-y: auto;
  border: 2px solid var(--pip-green);
  background: #061408;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 0 25px rgba(0, 255, 102, 0.35);
  -webkit-overflow-scrolling: touch;
}

/* Hardened input widths within settings drawer */
.calib-container input,
.calib-container select,
.calib-container textarea {
  max-width: 100%;
  box-sizing: border-box;
}

.calib-actions {
  position: sticky;
  bottom: 0;
  background: #061408;
  padding-top: 6px;
  padding-bottom: 2px;
  z-index: 10;
}

.calib-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid var(--pip-green);
  padding-bottom: 6px;
}

.calib-title {
  font-size: 18px;
  font-weight: bold;
  letter-spacing: 1px;
}

.calib-close-btn {
  background: rgba(50, 0, 0, 0.4);
  border: 1px solid var(--pip-green);
  color: var(--pip-green);
  font-family: var(--font-pipboy);
  font-size: 16px;
  padding: 3px 8px;
  cursor: pointer;
}

.calib-close-btn:active {
  background: var(--pip-green);
  color: #000;
}

.calib-help {
  font-size: 14px;
  color: var(--pip-green-dim);
}

.section-title {
  font-size: 14px;
  font-weight: bold;
  color: var(--pip-green-dim);
  display: block;
  margin-bottom: 4px;
}

.preset-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.preset-btn {
  background: rgba(0, 35, 15, 0.7);
  border: 1px solid var(--pip-green-dim);
  color: var(--pip-green);
  font-family: var(--font-pipboy);
  font-size: 13px;
  padding: 4px 8px;
  cursor: pointer;
  border-radius: 2px;
  transition: all 0.1s ease;
}

.preset-btn:hover, .preset-btn:active {
  background: var(--pip-green);
  color: #000;
}

.profile-text-input {
  width: 100%;
  background: rgba(0, 20, 5, 0.8);
  border: 1px solid var(--pip-green-dim);
  color: var(--pip-green-bright);
  font-family: var(--font-pipboy);
  font-size: 15px;
  padding: 8px;
  resize: vertical;
  outline: none;
  border-radius: 2px;
}

.profile-text-input:focus {
  border-color: var(--pip-green);
  box-shadow: 0 0 8px rgba(0, 255, 102, 0.3);
}

.calib-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.control-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.control-header {
  display: flex;
  justify-content: space-between;
  font-size: 15px;
}

.control-label {
  color: var(--pip-green-dim);
}

.control-val {
  font-weight: bold;
  color: var(--pip-green-bright);
}

/* Custom Pip-Boy Sliders */
input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 10px;
  background: #030a04;
  border: 1px solid var(--pip-green-dim);
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 20px;
  background: var(--pip-green);
  cursor: pointer;
  border: 1px solid #000;
  box-shadow: 0 0 5px var(--pip-green-glow);
}

input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 20px;
  background: var(--pip-green);
  cursor: pointer;
  border: 1px solid #000;
  box-shadow: 0 0 5px var(--pip-green-glow);
}

/* Toggle Checkbox */
.calib-toggle-row {
  margin: 4px 0;
}

.toggle-container {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 15px;
}

.toggle-container input {
  display: none;
}

.toggle-custom {
  width: 18px;
  height: 18px;
  border: 1px solid var(--pip-green);
  background: rgba(0, 30, 10, 0.5);
  display: inline-block;
  position: relative;
}

.toggle-container input:checked + .toggle-custom::after {
  content: '✓';
  position: absolute;
  top: -2px;
  left: 2px;
  font-size: 15px;
  font-weight: bold;
  color: var(--pip-green-bright);
}

/* Action Buttons */
.calib-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.action-btn {
  flex: 1;
  background: rgba(0, 30, 10, 0.7);
  border: 1px solid var(--pip-green);
  color: var(--pip-green);
  font-family: var(--font-pipboy);
  font-size: 16px;
  padding: 8px 12px;
  cursor: pointer;
  letter-spacing: 0.5px;
  transition: all 0.1s ease;
}

.primary-action {
  background: rgba(0, 70, 25, 0.8);
  font-weight: bold;
  box-shadow: 0 0 8px rgba(0, 255, 102, 0.3);
}

.action-btn:active {
  background: var(--pip-green);
  color: #000;
}

.calib-footer-note {
  font-size: 12px;
  color: var(--pip-green-dim);
  text-align: center;
}

/* Responsive adjustments for landscape or compact displays */
@media (max-height: 480px) {
  html, body {
    font-size: 14px;
  }
}

/* ==========================================================================
   SPECIAL Sub-Tab Layout
   ========================================================================== */

.sub-tab-panel {
  display: flex;
  flex-direction: column;
  flex: 1;
  width: 100%;
  min-height: 0;
}

.sub-tab-panel.hidden {
  display: none !important;
}

.special-screen {
  display: flex;
  flex-direction: row;
  gap: calc(var(--calib-vh) * 1.5);
  flex: 1;
  min-height: 0;
  width: 100%;
}

.special-list {
  display: flex;
  flex-direction: column;
  gap: calc(var(--calib-vh) * 0.4);
  width: 42%;
  overflow-y: auto;
}

.special-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: calc(var(--calib-vh) * 0.6) calc(var(--calib-vh) * 1);
  background: rgba(0, 20, 5, 0.4);
  border: 1px solid rgba(0, 255, 102, 0.2);
  cursor: pointer;
  font-size: calc(var(--calib-vh) * 3.4);
}

.special-item.active {
  background: rgba(0, 255, 102, 0.2);
  border: 1px solid var(--pip-green);
  font-weight: bold;
  text-shadow: 0 0 6px var(--pip-green-glow);
}

.special-detail-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--pip-green-dim);
  background: rgba(0, 30, 10, 0.35);
  padding: calc(var(--calib-vh) * 0.8);
  gap: calc(var(--calib-vh) * 0.6);
}

.special-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--pip-green-dim);
  padding-bottom: calc(var(--calib-vh) * 0.3);
  font-size: calc(var(--calib-vh) * 3.8);
  font-weight: bold;
}

.special-val-badge {
  color: var(--pip-green-bright);
  font-size: calc(var(--calib-vh) * 4.2);
}

.special-card-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(var(--calib-vh) * 0.6);
  flex: 1;
  overflow-y: auto;
}

.special-anim-box {
  height: calc(var(--calib-vh) * 32); /* Bumped from 18 to fill card space */
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.special-anim-img {
  height: 100%;
  max-height: calc(var(--calib-vh) * 30);
  max-width: 90%;
  object-fit: contain;
  mix-blend-mode: screen;
  filter: url('#pip-threshold-key') brightness(100%) contrast(100%);
  -webkit-filter: url('#pip-threshold-key') brightness(100%) contrast(100%);
}

.special-desc-text {
  font-size: calc(var(--calib-vh) * 2.8);
  color: var(--pip-green);
  line-height: 1.2;
}

/* Fix layout containment for SPECIAL sub-tab */
#sub-special {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  width: 100%;
}

#sub-special.hidden {
  display: none !important;
}

.special-screen {
  flex: 1;
  display: flex;
  flex-direction: row;
  gap: calc(var(--calib-vh) * 1.5);
  min-height: 0;
  width: 100%;
  padding-top: calc(var(--calib-vh) * 0.5);
}

.special-list {
  display: flex;
  flex-direction: column;
  gap: calc(var(--calib-vh) * 0.4);
  width: 42%;
  max-height: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.special-detail-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--pip-green-dim);
  background: rgba(0, 30, 10, 0.35);
  padding: calc(var(--calib-vh) * 0.8);
  gap: calc(var(--calib-vh) * 0.6);
  max-height: 100%;
  overflow: hidden;
}

/* ==========================================================================
   Dynamic Context-Sensitive Footer Variants
   ========================================================================== */

.footer-variant {
  display: none;
  width: 100%;
  align-items: center;
  justify-content: space-between;
}

.footer-variant.active {
  display: flex !important;
}

.footer-variant.hidden {
  display: none;
}

/* INV Footer Layout */
.footer-inv-left, .footer-inv-right {
  display: flex;
  align-items: center;
  gap: calc(var(--calib-vh) * 2.5);
}

.inv-hud-stat {
  display: flex;
  align-items: center;
  gap: calc(var(--calib-vh) * 0.8);
  font-size: calc(var(--calib-vh) * 3.8);
  font-weight: bold;
  color: var(--pip-green-bright);
}

.inv-hud-icon {
  width: calc(var(--calib-vh) * 3.5);
  height: calc(var(--calib-vh) * 3.5);
  color: var(--pip-green);
}

.footer-clickable {
  cursor: pointer;
  border-bottom: 1px dotted var(--pip-green-dim);
}

.footer-clickable:active {
  color: #fff;
  background: var(--pip-green-dim);
}

/* Inventory List Equip Indicators */
.inv-item-symbol {
  display: inline-block;
  width: calc(var(--calib-vh) * 2);
  margin-right: calc(var(--calib-vh) * 1);
  font-weight: bold;
  color: var(--pip-green-bright);
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 4px;
}

.form-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
  margin-top: 4px;
}

.item-form-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Dynamic Category Forms */
.dynamic-category-form.hidden {
  display: none !important;
}

#wpn-ranged-fields.hidden,
#wpn-melee-fields.hidden {
  display: none !important;
}

.hud-timer-icon {
  width: calc(var(--calib-vh) * 2.8);
  height: calc(var(--calib-vh) * 2.8);
  display: inline-block;
  vertical-align: middle;
  margin-right: calc(var(--calib-vh) * 0.6);
  color: var(--pip-green-bright);
  filter: drop-shadow(0 0 3px var(--pip-green-glow));
}

/* ==========================================================================
   Quick Caps Adjustment Modal (Calibrated & In-Viewport Sizing)
   ========================================================================== */

/* Absolute overlay pinned inside the calibrated viewport */
.caps-overlay-backdrop {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  background: rgba(2, 8, 3, 0.95) !important;
  z-index: 550 !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  padding: calc(var(--calib-vh) * 2) calc(var(--calib-vh) * 4) !important; /* Screen edge safety padding */
  box-sizing: border-box !important;
}

.caps-overlay-backdrop.hidden {
  display: none !important;
}

/* Modal Card */
.caps-overlay-card {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: calc(var(--calib-vh) * 4) !important;
  padding: calc(var(--calib-vh) * 4) calc(var(--calib-vh) * 4) !important;
  background: #030a04 !important;
  border: 2px solid var(--pip-green) !important;
  box-shadow: 0 0 25px rgba(0, 255, 102, 0.35) !important;
  max-width: 96% !important;
  box-sizing: border-box !important;
}

.caps-overlay-controls {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: calc(var(--calib-vh) * 1.2) !important; /* Tightened gap so all 5 boxes stay within mask */
  width: 100% !important;
}

/* Step Buttons: Generous internal padding around text without overflowing screen width */
.caps-overlay-btn {
  background: rgba(0, 25, 8, 0.85) !important;
  border: 2px solid var(--pip-green) !important;
  color: var(--pip-green-bright) !important;
  font-family: var(--font-pipboy) !important;
  font-size: calc(var(--calib-vh) * 4.2) !important;
  font-weight: bold !important;
  padding: calc(var(--calib-vh) * 1.8) calc(var(--calib-vh) * 2.2) !important; /* Spacious cushion */
  min-width: calc(var(--calib-vh) * 11) !important;
  height: calc(var(--calib-vh) * 11) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  box-shadow: 0 0 8px var(--pip-green-faint) !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  box-sizing: border-box !important;
}

.caps-overlay-btn:active {
  background: var(--pip-green-bright) !important;
  color: #030a04 !important;
  box-shadow: 0 0 16px var(--pip-green-glow) !important;
}

/* Central Display Box */
.caps-overlay-display {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: calc(var(--calib-vh) * 1.2) !important;
  border: 2px solid var(--pip-green) !important;
  background: rgba(0, 35, 12, 0.9) !important;
  min-width: calc(var(--calib-vh) * 28) !important;
  height: calc(var(--calib-vh) * 11) !important;
  padding: calc(var(--calib-vh) * 1.8) calc(var(--calib-vh) * 3) !important;
  box-shadow: inset 0 0 14px rgba(0, 255, 102, 0.25) !important;
  box-sizing: border-box !important;
}

#caps-adjust-val {
  font-family: var(--font-pipboy) !important;
  font-size: calc(var(--calib-vh) * 6.5) !important;
  font-weight: bold !important;
  color: var(--pip-green-bright) !important;
  text-shadow: 0 0 10px var(--pip-green-glow) !important;
  line-height: 1 !important;
  margin: 0 !important;
}

.caps-overlay-unit {
  font-family: var(--font-pipboy) !important;
  font-size: calc(var(--calib-vh) * 4.5) !important;
  color: var(--pip-green) !important;
  line-height: 1 !important;
  margin: 0 !important;
}

/* Done Button */
.caps-overlay-done {
  min-width: calc(var(--calib-vh) * 22) !important;
  height: calc(var(--calib-vh) * 9) !important;
  font-size: calc(var(--calib-vh) * 4) !important;
  padding: calc(var(--calib-vh) * 1.2) calc(var(--calib-vh) * 4) !important;
  border: 2px solid var(--pip-green) !important;
  background: rgba(0, 40, 15, 0.85) !important;
  color: var(--pip-green-bright) !important;
  font-family: var(--font-pipboy) !important;
  cursor: pointer !important;
  letter-spacing: 1px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 0 10px rgba(0, 255, 102, 0.2) !important;
}

.caps-overlay-done:active {
  background: var(--pip-green-bright) !important;
  color: #030a04 !important;
}

/* ==========================================================================
   DATA Tab & Quest Engine
   ========================================================================== */

.data-view-split {
  display: flex;
  flex-direction: row;
  gap: calc(var(--calib-vh) * 2);
  flex: 1;
  min-height: 0;
  width: 100%;
}

.quest-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: calc(var(--calib-vh) * 0.4);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Quest Detail Card Split Container */
.quest-detail-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between; /* Pushes bottom action button to card edge */
  border-left: 1px dashed var(--pip-green-dim);
  padding-left: calc(var(--calib-vh) * 1.5);
  height: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Objectives Container Fill */
#quest-objectives-list {
  flex: 1; /* Absorbs vertical space so delete button stays pinned at bottom */
}

.quest-header-title {
  font-size: calc(var(--calib-vh) * 3.8);
  font-weight: bold;
  color: var(--pip-green-bright);
  text-shadow: 0 0 6px var(--pip-green-glow);
  margin-bottom: calc(var(--calib-vh) * 0.4);
}

.quest-header-location {
  font-size: calc(var(--calib-vh) * 2.8);
  color: var(--pip-green-dim);
  margin-bottom: calc(var(--calib-vh) * 1);
  letter-spacing: 1px;
}

.quest-desc-box {
  font-size: calc(var(--calib-vh) * 2.8);
  color: var(--pip-green);
  line-height: 1.2;
  margin-bottom: calc(var(--calib-vh) * 1.5);
}

.quest-objectives-title {
  font-size: calc(var(--calib-vh) * 3);
  font-weight: bold;
  color: var(--pip-green-dim);
  border-bottom: 1px solid rgba(0, 255, 102, 0.2);
  padding-bottom: calc(var(--calib-vh) * 0.3);
  margin-bottom: calc(var(--calib-vh) * 0.8);
}

/* ==========================================================================
   Quest Engine: Items, Active Squares & Completion Styling
   ========================================================================== */

/* Active/Inactive Quest Symbol Placeholder (Matches Inventory .equip-sq) */
.quest-sq-placeholder {
  display: inline-block;
  width: calc(var(--calib-vh) * 2); /* Reserve width so title aligns with active quests */
}

/* Inactive / Default Quest Objectives */
.quest-objective-row {
  display: flex;
  align-items: center;
  gap: calc(var(--calib-vh) * 1);
  font-size: calc(var(--calib-vh) * 2.8);
  margin-bottom: calc(var(--calib-vh) * 0.8);
  cursor: pointer;
  color: var(--pip-green);
  transition: color 0.1s ease;
}

/* Objective Check Indicator Area */
.obj-indicator {
  display: inline-block;
  width: calc(var(--calib-vh) * 2.2);
  font-size: calc(var(--calib-vh) * 2.4);
  font-weight: bold;
  text-align: center;
  flex-shrink: 0;
  color: var(--pip-green-dim);
}

/* Completed Objectives: Dim green text and tick mark (readable contrast) */
.quest-objective-row.completed {
  color: var(--pip-green-dim) !important;
  text-decoration: none !important;
  opacity: 0.75;
}

.quest-objective-row.completed .obj-indicator {
  color: var(--pip-green-dim) !important;
}

/* Alignment Spacer for Inactive Quests in Quest List */
.quest-sq-placeholder {
  display: inline-block;
  width: 14px; /* Matches .equip-sq-placeholder */
  margin-right: 4px;
}

/* ==========================================================================
   Data Tab: Stats Engine Styling
   ========================================================================== */

#stats-category-list .inv-item {
  padding-left: calc(var(--calib-vh) * 1.5);
}

#stats-detail-card .stat-card-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px dashed rgba(0, 255, 102, 0.2);
  padding: calc(var(--calib-vh) * 0.6) 0;
  font-size: calc(var(--calib-vh) * 2.5);
}

#stats-detail-card .stat-card-label {
  color: var(--pip-green);
}

#stats-detail-card .stat-card-value {
  color: var(--pip-green);
  font-weight: bold;
}

/* ==========================================================================
   Fixed Physical Orientation Base Layout
   ========================================================================== */

html, body {
  position: fixed !important;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  background-color: #000000 !important;
}

#screen-container {
  position: absolute;
  overflow: hidden;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  transition: transform 0.2s ease-in-out;
}

/* ==========================================================================
   Game-Accurate Fallout 4 Radio Layout
   ========================================================================== */

.radio-game-layout {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: flex-start;
  flex: 1;
  width: 100%;
  padding-top: calc(var(--calib-vh) * 3);
}

.radio-station-list {
  display: flex;
  flex-direction: column;
  gap: calc(var(--calib-vh) * 0.8);
  width: 55%;
}

.radio-station-item {
  display: flex;
  align-items: center;
  font-size: calc(var(--calib-vh) * 4.2);
  color: var(--pip-green);
  cursor: pointer;
  padding: calc(var(--calib-vh) * 0.4) calc(var(--calib-vh) * 1);
  transition: all 0.1s ease;
}

.radio-station-item .station-sq {
  display: inline-block;
  width: calc(var(--calib-vh) * 2.5);
  font-size: calc(var(--calib-vh) * 3.5);
  margin-right: calc(var(--calib-vh) * 1);
}

/* Selected Active Station Inverted Block */
.radio-station-item.active {
  background: var(--pip-green-bright) !important;
  color: #030a04 !important;
  font-weight: bold;
  text-shadow: none !important;
  box-shadow: 0 0 10px var(--pip-green-glow);
}

.radio-station-item.active .station-sq {
  color: #030a04 !important;
}

/* Oscilloscope CRT Container */
.radio-visualizer-container {
  width: 40%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding-right: calc(var(--calib-vh) * 2);
}

#radio-canvas {
  width: 100%;
  max-width: 240px;
  height: auto;
  aspect-ratio: 4 / 3;
}

/* Ensure the inner screen frame takes up the full viewport height */
.pipboy-screen-frame {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden; /* Prevents child overflow from masking the footer[cite: 17] */
}

/* ==========================================================================
   Pip-OS CRT Unified Vertical Hold Loop
   ========================================================================== */

/* Outer Viewport Container: Clips the rolling frame and applies horizontal jitter */
.crt-vhold-glitch {
  animation: crtTearJitter 0.08s infinite ease-in-out !important;
  filter: contrast(170%) brightness(130%) hue-rotate(-12deg) !important;
  overflow: hidden !important;
}

/* Continuously rolls the entire display frame (Header + Body + Footer) as one unit */
.crt-vhold-glitch .pipboy-screen-frame {
  animation: crtUnifiedRoll 0.9s linear infinite !important;
  will-change: transform;
}

/* Endless top-to-bottom frame sweep */
@keyframes crtUnifiedRoll {
  0% {
    transform: translateY(-100%);
  }
  100% {
    transform: translateY(100%);
  }
}

/* Rapid horizontal scanline tearing */
@keyframes crtTearJitter {
  0% {
    transform: scale(var(--viewport-scale)) translateX(0px);
    clip-path: inset(0 0 0 0);
  }
  25% {
    transform: scale(var(--viewport-scale)) translateX(3px) skewX(1deg);
    clip-path: inset(12% 0 58% 0);
  }
  50% {
    transform: scale(var(--viewport-scale)) translateX(-4px) skewX(-1.5deg);
    clip-path: inset(42% 0 12% 0);
  }
  75% {
    transform: scale(var(--viewport-scale)) translateX(2px) skewX(0.8deg);
    clip-path: inset(68% 0 8% 0);
  }
  100% {
    transform: scale(var(--viewport-scale)) translateX(0px);
    clip-path: inset(0 0 0 0);
  }
}
