/* ==========================================================================
   Retro Visual Effects — Windows 95 Themed + Arcade Accents
   Loaded after win95.css
   ========================================================================== */

/* Google Font for retro terminal text */
@import url("https://fonts.googleapis.com/css2?family=Press+Start+2P&family=VT323&display=swap");

/* --------------------------------------------------------------------------
   1. CRT Scanlines Overlay (Enhanced with phosphor effect)
   -------------------------------------------------------------------------- */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  background:
    linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%),
    linear-gradient(
      90deg,
      rgba(255, 0, 0, 0.06),
      rgba(0, 255, 0, 0.02),
      rgba(0, 0, 255, 0.06)
    );
  background-size:
    100% 2px,
    3px 100%;
  opacity: 0.3;
  pointer-events: none;
  z-index: 99990;
  animation: scanline-shift 8s linear infinite;
}

@keyframes scanline-shift {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(2px);
  }
}

/* --------------------------------------------------------------------------
   2. Screen Vignette (with CRT tube depth)
   -------------------------------------------------------------------------- */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: none;
  pointer-events: none;
  z-index: 99989;
}

/* --------------------------------------------------------------------------
   3. Subtle Screen Flicker
   -------------------------------------------------------------------------- */
@keyframes crt-flicker {
  0%,
  97%,
  100% {
    opacity: 1;
  }
  97.5% {
    opacity: 0.97;
  }
  98% {
    opacity: 1;
  }
  98.5% {
    opacity: 0.98;
  }
}

body {
  animation: crt-flicker 8s infinite;
}

/* --------------------------------------------------------------------------
   4. Blinking "NEW!" Badge
   -------------------------------------------------------------------------- */
.retro-new {
  color: #ff2a6d;
  font-size: 9px;
  font-weight: bold;
  animation: blink-new-neon 1.2s ease-in-out infinite;
  text-shadow:
    0 0 4px rgba(255, 42, 109, 0.8),
    0 0 2px rgba(255, 42, 109, 1);
}

@keyframes blink-new-neon {
  0%,
  49%,
  100% {
    opacity: 1;
    text-shadow:
      0 0 4px rgba(255, 42, 109, 0.8),
      0 0 2px rgba(255, 42, 109, 1);
  }
  50%,
  99% {
    opacity: 0.3;
    text-shadow: 0 0 2px rgba(255, 42, 109, 0.4);
  }
}

/* --------------------------------------------------------------------------
   5. Hit Counter
   -------------------------------------------------------------------------- */
.hit-counter {
  position: fixed;
  bottom: calc(var(--taskbar-height) + 16px);
  left: 50%;
  transform: translateX(-50%);
  background: #c0c0c0;
  border: 2px solid;
  border-color: #808080 #ffffff #ffffff #808080;
  padding: 4px 12px;
  font-family: "Courier New", monospace;
  font-size: 11px;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 6px;
}

.hit-counter__digits {
  background: #000000;
  color: #33ff33;
  padding: 2px 6px;
  font-family: "VT323", "Courier New", monospace;
  font-size: 14px;
  letter-spacing: 2px;
  border: 1px solid;
  border-color: #808080 #ffffff #ffffff #808080;
  text-shadow:
    0 0 8px rgba(51, 255, 51, 0.8),
    0 0 16px rgba(51, 255, 51, 0.4);
}

/* --------------------------------------------------------------------------
   6. Marquee Scrolling Text
   -------------------------------------------------------------------------- */
.retro-marquee {
  overflow: hidden;
  white-space: nowrap;
  max-width: 200px;
}

.retro-marquee span {
  display: inline-block;
  animation: marquee-scroll 20s linear infinite;
  color: var(--neon-yellow, #f9c80e);
  text-shadow: 0 0 6px rgba(249, 200, 14, 0.6);
  font-family: "Press Start 2P", "VT323", monospace;
  font-size: 9px;
}

@keyframes marquee-scroll {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(-100%);
  }
}

/* --------------------------------------------------------------------------
   7. Pixel-Art Progress Bars
   -------------------------------------------------------------------------- */
.pixel-progress {
  height: 12px;
  background: #c0c0c0;
  border: 2px solid;
  border-color: #808080 #ffffff #ffffff #808080;
  box-shadow: inset 1px 1px 0 #000000;
}

.pixel-progress__fill {
  height: 100%;
  background: #000080;
  image-rendering: pixelated;
}

/* --------------------------------------------------------------------------
   8. Under Construction Banner
   -------------------------------------------------------------------------- */
.under-construction {
  background: repeating-linear-gradient(
    45deg,
    #ffd700,
    #ffd700 10px,
    #000 10px,
    #000 20px
  );
  color: #fff;
  font-weight: bold;
  text-align: center;
  padding: 4px 8px;
  font-size: 10px;
  text-shadow: 1px 1px 0 #000;
  margin: 8px 0;
}

/* --------------------------------------------------------------------------
   9. Boot Screen
   -------------------------------------------------------------------------- */
.boot-screen {
  position: fixed;
  inset: 0;
  background: #000;
  color: #33ff33;
  font-family: "Press Start 2P", "VT323", "Courier New", monospace;
  z-index: 999999;
  padding: 40px;
  overflow: hidden;
  font-size: 14px;
  line-height: 2;
  text-shadow:
    0 0 10px rgba(51, 255, 51, 0.8),
    0 0 20px rgba(51, 255, 51, 0.4),
    0 0 40px rgba(51, 255, 51, 0.2);
}

.boot-screen.hidden {
  display: none;
}

.boot-screen__cursor {
  display: inline-block;
  width: 8px;
  height: 14px;
  background: #33ff33;
  animation: blink-cursor 1s step-end infinite;
}

@keyframes blink-cursor {
  50% {
    opacity: 0;
  }
}

.boot-screen__progress {
  margin-top: 20px;
  width: 300px;
  height: 16px;
  border: 1px solid #33ff33;
  box-shadow: 0 0 6px rgba(51, 255, 51, 0.3);
}

.boot-screen__progress-fill {
  height: 100%;
  background: #33ff33;
  width: 0%;
  transition: width 0.3s linear;
}

/* --------------------------------------------------------------------------
   10. BSOD Screen
   -------------------------------------------------------------------------- */
.bsod-screen {
  position: fixed;
  inset: 0;
  background: #0000aa;
  color: #ffffff;
  font-family: "VT323", "Courier New", monospace;
  z-index: 999999;
  display: none;
  padding: 10% 15%;
  text-align: center;
  font-size: 16px;
  line-height: 1.8;
  text-shadow:
    0 0 8px rgba(255, 255, 255, 0.5),
    0 0 16px rgba(255, 255, 255, 0.2);
}

.bsod-screen.active {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.bsod-screen__title {
  background: #aaaaaa;
  color: #0000aa;
  padding: 2px 8px;
  font-weight: bold;
  margin-bottom: 16px;
}

/* --------------------------------------------------------------------------
   11. Clippy Helper
   -------------------------------------------------------------------------- */
.clippy {
  position: fixed;
  bottom: 50px;
  right: 20px;
  background: #ffffcc;
  border: 2px solid #000;
  padding: 12px;
  box-shadow: 2px 2px 0 #000;
  font-size: 11px;
  font-family: "MS Sans Serif", Tahoma, Arial, sans-serif;
  z-index: 9990;
  display: none;
  max-width: 220px;
}

.clippy.active {
  display: block;
}

.clippy__character {
  font-size: 28px;
  margin-bottom: 4px;
}

.clippy__text {
  margin-bottom: 8px;
  line-height: 1.4;
}

.clippy__dismiss {
  background: #c0c0c0;
  border: 2px solid;
  border-color: #ffffff #000000 #000000 #ffffff;
  padding: 2px 12px;
  font-size: 10px;
  cursor: pointer;
  font-family: inherit;
}

/* --------------------------------------------------------------------------
   12. Desktop Context Menu (Right-Click)
   -------------------------------------------------------------------------- */
.desktop-context-menu {
  position: fixed;
  background: #c0c0c0;
  border: 2px solid;
  border-color: #ffffff #000000 #000000 #ffffff;
  box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  z-index: 9997;
  min-width: 160px;
  padding: 2px;
  display: none;
}

.desktop-context-menu.active {
  display: block;
}

.desktop-context-menu__item {
  display: block;
  width: 100%;
  padding: 4px 24px 4px 8px;
  font-size: 11px;
  font-family: "MS Sans Serif", Tahoma, Arial, sans-serif;
  cursor: pointer;
  background: transparent;
  border: none;
  text-align: left;
}

.desktop-context-menu__item:hover {
  background: #000080;
  color: #ffffff;
}

.desktop-context-menu__divider {
  height: 1px;
  margin: 2px 4px;
  background: #808080;
  border-bottom: 1px solid #ffffff;
}

/* --------------------------------------------------------------------------
   13. Guestbook (Win95 Styled Form)
   -------------------------------------------------------------------------- */
.guestbook {
  margin-top: 16px;
  padding: 12px;
  border: 2px solid;
  border-color: #808080 #ffffff #ffffff #808080;
  background: #ffffff;
}

.guestbook__title {
  font-weight: bold;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.guestbook__field {
  margin-bottom: 8px;
}

.guestbook__field label {
  display: block;
  font-size: 11px;
  margin-bottom: 2px;
}

.guestbook__field input,
.guestbook__field textarea {
  width: 100%;
  background: #ffffff;
  border: 2px solid;
  border-color: #808080 #ffffff #ffffff #808080;
  box-shadow: inset 1px 1px 0 #000;
  padding: 4px 6px;
  font-size: 11px;
  font-family: "MS Sans Serif", Tahoma, Arial, sans-serif;
}

.guestbook__field textarea {
  height: 60px;
  resize: vertical;
}

/* --------------------------------------------------------------------------
   14. Accessibility — Reduced Motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  body::after,
  body::before {
    display: none;
  }

  body {
    animation: none;
  }

  .retro-new,
  .retro-marquee span,
  .boot-screen__cursor {
    animation: none;
  }

  .window {
    animation: none;
  }

  .desktop-icon {
    transition: none;
  }

  #desktop-3d,
  #desktop-3d-interact {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   16. High Contrast Overrides
   -------------------------------------------------------------------------- */
@media (forced-colors: active) {
  .boot-screen,
  .bsod-screen,
  .hit-counter__digits {
    text-shadow: none;
  }

  .window.active .window__titlebar,
  .taskbar__window-btn.active,
  .win95-btn:hover,
  .window__btn:hover {
    box-shadow: none;
  }
}

/* --------------------------------------------------------------------------
   14b. Hero Name Overlay
   -------------------------------------------------------------------------- */
.hero-name {
  position: fixed;
  top: 24px;
  right: 28px;
  z-index: 4;
  text-align: right;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-12px);
  transition:
    opacity 1.2s ease-out,
    transform 1.2s ease-out;
  background: rgba(255, 255, 255, 0.88);
  border: 2px solid #222;
  padding: 6px 13px;
  box-shadow: 2px 2px 0 #000;
}

.hero-name.visible {
  opacity: 1;
  transform: translateY(0);
}

.hero-name__primary {
  display: block;
  font-family: "MS Sans Serif", "Segoe UI", Tahoma, sans-serif;
  font-size: 19px;
  font-weight: bold;
  color: #000;
  letter-spacing: 0.5px;
}

.hero-name__korean {
  font-weight: normal;
  font-size: 13px;
  color: #444;
}

.hero-name__datetime {
  display: block;
  font-family: "MS Sans Serif", "Segoe UI", Tahoma, sans-serif;
  font-size: 11px;
  color: #555;
  margin-top: 2px;
}

@media (max-width: 768px) {
  .hero-name {
    top: 12px;
    right: 14px;
    padding: 5px 10px;
    opacity: 1;
    transform: translateY(0);
  }
  .hero-name__primary {
    font-size: 15px;
  }
  .hero-name__korean {
    font-size: 10px;
  }
  .hero-name__datetime {
    font-size: 9px;
  }
}

/* --------------------------------------------------------------------------
   14c. Hero Chat Widget (inline under name)
   -------------------------------------------------------------------------- */
.hero-chat {
  pointer-events: auto;
}

.hero-chat__sep {
  height: 1px;
  background: #999;
  margin: 6px 0;
}

.hero-chat__label {
  font-family: var(--font-system, "MS Sans Serif", sans-serif);
  font-size: 11px;
  color: #333;
  margin-bottom: 4px;
  text-align: right;
}

.hero-chat__row {
  display: flex;
  gap: 3px;
}

.hero-chat__input {
  flex: 1;
  font-family: var(--font-system, "MS Sans Serif", sans-serif);
  font-size: 11px;
  padding: 2px 4px;
  border: 2px inset #bbb;
  background: #fff;
  min-width: 0;
  outline: none;
}

.hero-chat__btn {
  font-family: var(--font-system, "MS Sans Serif", sans-serif);
  font-size: 11px;
  padding: 2px 10px;
  background: #c0c0c0;
  border: 2px outset #ddd;
  cursor: pointer;
}

.hero-chat__btn:active {
  border-style: inset;
}

.hero-chat__btn:disabled {
  color: #888;
  cursor: default;
}

.hero-chat__msgs {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.hero-chat__msgs--open {
  max-height: 120px;
  overflow-y: auto;
  border: 1px inset #bbb;
  background: #fff;
  padding: 3px;
  margin-bottom: 4px;
}

.hero-chat__msg {
  font-family: var(--font-system, "MS Sans Serif", sans-serif);
  font-size: 11px;
  padding: 1px 0;
  word-wrap: break-word;
}

.hero-chat__msg--visitor {
  text-align: right;
  color: #000080;
}

.hero-chat__msg--owner {
  text-align: left;
  color: #880000;
}

.hero-chat__foot-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 3px;
}

.hero-chat__footer {
  font-family: var(--font-system, "MS Sans Serif", sans-serif);
  font-size: 9px;
  color: #666;
}

.hero-chat__new {
  font-family: var(--font-system, "MS Sans Serif", sans-serif);
  font-size: 8px;
  color: #999;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0 2px;
  text-decoration: underline;
}

.hero-chat__new:hover {
  color: #333;
}

@media (max-width: 768px) {
  .hero-chat__input {
    font-size: 10px;
  }
  .hero-chat__btn {
    font-size: 10px;
    padding: 2px 6px;
  }
  .hero-chat__msgs--open {
    max-height: 80px;
  }
}

/* --------------------------------------------------------------------------
   14d. Hero Wallet Widget (inline under chat)
   -------------------------------------------------------------------------- */
.hero-wallet {
  pointer-events: auto;
}

.hero-wallet__sep {
  height: 1px;
  background: #999;
  margin: 6px 0;
}

.hero-wallet__header {
  display: flex;
  align-items: center;
  gap: 4px;
  justify-content: flex-end;
  margin-bottom: 4px;
}

.hero-wallet__icon {
  font-size: 16px;
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: inline-block;
}

.hero-wallet__title {
  font-family: var(--font-system, "MS Sans Serif", sans-serif);
  font-size: 10px;
  font-weight: bold;
  color: #222;
}

.hero-wallet__mood {
  font-family: var(--font-system, "MS Sans Serif", sans-serif);
  font-size: 9px;
  color: #666;
  font-style: italic;
}

/* Toggle tabs */
.hero-wallet__toggle {
  display: flex;
  justify-content: flex-end;
  gap: 2px;
  margin-bottom: 4px;
}

.hero-wallet__tab {
  font-family: var(--font-system, "MS Sans Serif", sans-serif);
  font-size: 10px;
  padding: 1px 8px;
  background: #d4d0c8;
  border: 1px solid #808080;
  border-bottom: none;
  cursor: pointer;
  color: #444;
}

.hero-wallet__tab--active {
  background: #fff;
  color: #000;
  font-weight: bold;
  border-bottom: 1px solid #fff;
  margin-bottom: -1px;
  position: relative;
  z-index: 1;
}

.hero-wallet__tab:hover:not(.hero-wallet__tab--active) {
  background: #e8e4dc;
}

/* Stock list */
.hero-wallet__list {
  border: 1px inset #bbb;
  background: #fff;
  padding: 2px 3px;
  max-height: 300px;
  overflow-y: auto;
}

.hero-wallet__stock {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 1px 0;
  font-family: var(--font-system, "MS Sans Serif", sans-serif);
  font-size: 10px;
  border-bottom: 1px dotted #ddd;
}

.hero-wallet__stock:last-child {
  border-bottom: none;
}

.hero-wallet__name {
  flex: 1;
  color: #222;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.hero-wallet__price {
  color: #555;
  font-size: 9px;
  white-space: nowrap;
}

.hero-wallet__change {
  font-weight: bold;
  font-size: 10px;
  white-space: nowrap;
  min-width: 48px;
  text-align: right;
}

.hero-wallet__change--up {
  color: #008000;
}

.hero-wallet__change--down {
  color: #cc0000;
}

.hero-wallet__more {
  font-family: var(--font-system, "MS Sans Serif", sans-serif);
  font-size: 9px;
  color: #0000cc;
  text-align: center;
  padding: 2px 0;
  cursor: pointer;
  text-decoration: underline;
}

.hero-wallet__more:hover {
  color: #cc0000;
}

.hero-wallet__loading {
  font-family: var(--font-system, "MS Sans Serif", sans-serif);
  font-size: 10px;
  color: #888;
  text-align: center;
  padding: 4px 0;
}

/* Footer */
.hero-wallet__footer {
  font-family: var(--font-system, "MS Sans Serif", sans-serif);
  font-size: 8px;
  color: #888;
  text-align: right;
  margin-top: 2px;
}

/* ── Mood animations ── */

/* Euphoric: bouncing */
.hero-wallet--euphoric .hero-wallet__icon {
  animation: wallet-bounce 0.6s ease infinite;
}

.hero-wallet--euphoric .hero-wallet__mood {
  color: #008000;
  font-weight: bold;
}

.hero-wallet--euphoric .hero-wallet__list {
  border-color: #008000;
  box-shadow: 0 0 4px rgba(0, 128, 0, 0.3);
}

/* Good: gentle pulse */
.hero-wallet--good .hero-wallet__icon {
  animation: wallet-pulse 2s ease infinite;
}

.hero-wallet--good .hero-wallet__mood {
  color: #006600;
}

/* Okay: no special animation */

/* Worried: slight tremble */
.hero-wallet--worried .hero-wallet__icon {
  animation: wallet-tremble 0.3s ease infinite;
}

.hero-wallet--worried .hero-wallet__mood {
  color: #996600;
}

/* Bad: shaking */
.hero-wallet--bad .hero-wallet__icon {
  animation: wallet-shake 0.15s ease infinite;
}

.hero-wallet--bad .hero-wallet__mood {
  color: #cc0000;
  font-weight: bold;
}

.hero-wallet--bad .hero-wallet__list {
  border-color: #cc0000;
}

/* Cooked: flipped, shrunk, crying */
.hero-wallet--cooked .hero-wallet__icon {
  animation: wallet-cooked 1s ease infinite;
}

.hero-wallet--cooked .hero-wallet__mood {
  color: #cc0000;
  font-weight: bold;
  text-transform: uppercase;
}

.hero-wallet--cooked .hero-wallet__list {
  border-color: #cc0000;
  background: #fff5f5;
}

/* Moths for cooked state */
.hero-wallet__moths {
  position: relative;
  height: 14px;
  overflow: visible;
  text-align: right;
}

.hero-wallet__moth {
  font-size: 10px;
  display: inline-block;
  animation: moth-fly 2s ease-in-out infinite;
}

@keyframes wallet-bounce {
  0%,
  100% {
    transform: scale(1.5) translateY(0);
  }
  50% {
    transform: scale(1.5) translateY(-4px);
  }
}

@keyframes wallet-pulse {
  0%,
  100% {
    transform: scale(1.25);
  }
  50% {
    transform: scale(1.35);
  }
}

@keyframes wallet-tremble {
  0%,
  100% {
    transform: scale(0.85) translateX(0);
  }
  25% {
    transform: scale(0.85) translateX(-1px);
  }
  75% {
    transform: scale(0.85) translateX(1px);
  }
}

@keyframes wallet-shake {
  0%,
  100% {
    transform: scale(0.65) translateX(0);
  }
  25% {
    transform: scale(0.65) translateX(-2px) rotate(-3deg);
  }
  75% {
    transform: scale(0.65) translateX(2px) rotate(3deg);
  }
}

@keyframes wallet-cooked {
  0%,
  100% {
    transform: scale(0.4) rotate(180deg);
  }
  50% {
    transform: scale(0.35) rotate(185deg);
  }
}

@keyframes moth-fly {
  0% {
    transform: translate(0, 0) scaleX(1);
    opacity: 0.7;
  }
  25% {
    transform: translate(-8px, -6px) scaleX(-1);
    opacity: 1;
  }
  50% {
    transform: translate(-2px, -12px) scaleX(1);
    opacity: 0.8;
  }
  75% {
    transform: translate(6px, -4px) scaleX(-1);
    opacity: 1;
  }
  100% {
    transform: translate(0, 0) scaleX(1);
    opacity: 0.7;
  }
}

@media (max-width: 768px) {
  .hero-wallet__stock {
    font-size: 9px;
  }
  .hero-wallet__tab {
    font-size: 9px;
    padding: 1px 6px;
  }
  .hero-wallet__list {
    max-height: 80px;
  }
}

/* --------------------------------------------------------------------------
   15. Desktop 3D PC Model
   -------------------------------------------------------------------------- */
#desktop-3d {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
}

#desktop-3d canvas {
  display: block;
}

/* Full-viewport drag/zoom surface — the DOM icons it once left room for are
   hidden ≥768px (the CRT is the shell), so nothing else needs these clicks.
   Interactive DOM (windows, welcome overlay, widgets) all stack above z 3. */
#desktop-3d-interact {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: auto;
  cursor: grab;
  touch-action: none;
}

#desktop-3d-interact.grabbing {
  cursor: grabbing;
}

/* --------------------------------------------------------------------------
   16. Mobile Adjustments
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  #desktop-3d,
  #desktop-3d-interact {
    display: none;
  }
  .hit-counter {
    bottom: calc(40px + 80px + 8px);
    font-size: 10px;
  }

  .retro-marquee {
    max-width: 100px;
  }

  .clippy {
    bottom: 130px;
    right: 10px;
    max-width: 180px;
  }
}

/* ═══════════════════════════════════════════════════════════
   WELCOME WINDOW — flat Win95 intro dialog (all viewports)
   Wired by src/retro/welcome.js (.visible / .leaving).
   ═══════════════════════════════════════════════════════════ */
.welcome-overlay {
  position: fixed;
  inset: 0;
  z-index: 9500; /* under the boot screen (999999), over the scene */
  display: none;
  align-items: center;
  justify-content: center;
  /* Mid scrim — the 3D desk and monitor stay visible but recede behind */
  background: rgba(10, 10, 14, 0.4);
  opacity: 0;
  transition: opacity 0.6s ease;
}

.welcome-overlay.visible {
  display: flex;
  opacity: 1;
}

.welcome-overlay.leaving {
  opacity: 0;
  pointer-events: none;
}

/* Window frame — classic raised Win95 chrome */
.welcome-window {
  display: flex;
  flex-direction: column;
  width: min(420px, calc(100vw - 32px));
  max-height: 86vh;
  padding: 3px;
  font-family: var(--font-system);
  color: var(--win95-black);
  background: var(--win95-gray);
  border: 2px solid;
  border-color: var(--win95-white) var(--win95-black) var(--win95-black)
    var(--win95-white);
  box-shadow:
    inset 1px 1px 0 var(--win95-silver),
    inset -1px -1px 0 var(--win95-dark-gray),
    6px 6px 0 rgba(0, 0, 0, 0.35);
}

/* ── Titlebar ── */
.welcome-window__titlebar {
  display: flex;
  align-items: center;
  gap: 6px;
  height: var(--titlebar-height);
  padding: 0 4px;
  background: linear-gradient(
    90deg,
    var(--color-titlebar-active),
    var(--win95-blue)
  );
}

.welcome-window__title {
  flex: 1;
  font-size: 12px;
  font-weight: 700;
  color: var(--color-titlebar-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
}

.welcome-window__controls {
  display: flex;
  gap: 2px;
}

.welcome-window__ctrl {
  width: 18px;
  height: 16px;
  padding: 0;
  font-size: 10px;
  line-height: 1;
  font-weight: 700;
  font-family: var(--font-system);
  color: var(--win95-black);
  cursor: pointer;
  background: var(--win95-gray);
  border: 1px solid;
  border-color: var(--win95-white) var(--win95-black) var(--win95-black)
    var(--win95-white);
  box-shadow:
    inset 1px 1px 0 var(--win95-silver),
    inset -1px -1px 0 var(--win95-dark-gray);
}

.welcome-window__ctrl[aria-hidden="true"] {
  cursor: default;
  color: var(--win95-dark-gray);
}

.welcome-window__ctrl--close:active {
  border-color: var(--win95-black) var(--win95-white) var(--win95-white)
    var(--win95-black);
  box-shadow: none;
}

/* ── Content — one flat pane ── */
.welcome-window__content {
  overflow-y: auto;
  padding: 14px 16px 12px;
  text-align: left;
  font-size: 11px;
}

.welcome-id {
  display: flex;
  align-items: center;
  gap: 12px;
}

.welcome-id__avatar {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--win95-white);
  border: 2px solid;
  border-color: var(--win95-dark-gray) var(--win95-white) var(--win95-white)
    var(--win95-dark-gray);
}

.welcome-id__avatar img {
  image-rendering: pixelated;
}

.welcome-id__name {
  font-size: 16px;
  font-weight: 700;
}

.welcome-id__sub {
  font-size: 11px;
  color: var(--win95-dark-gray);
}

.welcome-bio {
  margin: 12px 0 0;
  font-size: 11px;
  line-height: 1.6;
}

.welcome-specs {
  margin-top: 10px;
  padding: 8px 10px;
  font-size: 11px;
  line-height: 1.7;
  background: var(--win95-white);
  border: 2px solid;
  border-color: var(--win95-dark-gray) var(--win95-white) var(--win95-white)
    var(--win95-dark-gray);
}

.welcome-specs em {
  font-style: normal;
  font-weight: 700;
}

/* Contact icon row */
.welcome-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 10px;
}

.welcome-links a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  font-size: 11px;
  text-decoration: none;
  color: inherit;
  border: 1px solid transparent;
}

.welcome-links a:hover {
  background: var(--win95-navy);
  color: var(--win95-white);
}

/* ── Buttons ── */
.welcome-window__actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid var(--win95-dark-gray);
}

.welcome-btn {
  padding: 7px 16px;
  font-size: 12px;
  font-family: var(--font-system);
  color: var(--win95-black);
  cursor: pointer;
  background: var(--win95-gray);
  border: 2px solid;
  border-color: var(--win95-white) var(--win95-black) var(--win95-black)
    var(--win95-white);
  box-shadow:
    inset 1px 1px 0 var(--win95-silver),
    inset -1px -1px 0 var(--win95-dark-gray);
}

.welcome-btn:active {
  border-color: var(--win95-black) var(--win95-white) var(--win95-white)
    var(--win95-black);
  box-shadow: inset 1px 1px 0 var(--win95-dark-gray);
}

/* Default button — the Win95 "press Enter" affordance */
.welcome-btn--default {
  font-weight: 700;
  outline: 1px solid var(--win95-black);
}

@media (max-width: 480px) {
  .welcome-window__actions {
    flex-direction: column;
  }
}

/* Wide screens: park the dialog left-of-center so the parked camera's 3D desk
   and monitor stay visible beside it (desktop-3d.js introFrom framing). */
@media (min-width: 1100px) {
  .welcome-overlay {
    justify-content: flex-start;
    padding-left: clamp(48px, 7vw, 140px);
  }
}
