/* ==========================================================================
   VIRTUAL OFFICE & NEW-WORK PORTFOLIO - STYLESHEET
   ========================================================================== */

:root {
  --font-main: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
  --font-mono: 'Fira Code', 'Consolas', monospace;
  
  --bg-dark: #0b0f19;
  --bg-card: rgba(18, 24, 38, 0.85);
  --bg-card-border: rgba(255, 255, 255, 0.12);
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --color-foyer: #f59e0b;
  --color-modern: #0ea5e9;
  --color-cyberpunk: #ec4899;
  --color-lounge: #10b981;
  --color-nerdlab: #8b5cf6;
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  
  --shadow-glow: 0 0 25px rgba(0, 0, 0, 0.5);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  user-select: none;
  -webkit-user-select: none;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  touch-action: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  overscroll-behavior: none;
  background-color: var(--bg-dark);
  font-family: var(--font-main);
  color: var(--text-primary);
}

/* App Container */
#app {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Canvas Container */
#canvas-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

#game-canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  outline: none;
  cursor: default;
}

/* Top Header Bar */
#top-bar {
  position: absolute;
  top: 16px;
  left: 16px;
  right: 16px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  pointer-events: none;
  z-index: 10;
  gap: 16px;
}

/* Profile Badge */
.profile-pill {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--bg-card-border);
  padding: 8px 16px;
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.avatar-badge {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.4);
}

.profile-meta h1 {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.2px;
  line-height: 1.2;
}

.profile-meta p {
  font-size: 12px;
  color: var(--text-secondary);
}

/* Room Indicator Banner */
#room-banner {
  pointer-events: auto;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--bg-card-border);
  padding: 8px 20px;
  border-radius: var(--radius-lg);
  text-align: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  min-width: 220px;
}

#current-room-name {
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

#current-room-desc {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* Fast Travel / Teleport Bar */
#nav-travel {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  justify-content: center;
}

.travel-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.travel-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.travel-btn.active {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
  font-weight: 600;
}

/* Header Action Controls (Sound, Help) */
.header-actions {
  pointer-events: auto;
  display: flex;
  gap: 8px;
  align-items: center;
}

/* In-Room Language Switcher (Top Right Bar) */
.room-lang-switcher {
  display: flex;
  gap: 2px;
  background: rgba(15, 23, 42, 0.75);
  padding: 3px 4px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
  pointer-events: auto;
}

.room-lang-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 4px 8px;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.room-lang-btn:hover {
  color: #ffffff;
}

.room-lang-btn.active {
  background: #f59e0b;
  color: #020617;
  font-weight: 800;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
}

.icon-btn {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--bg-card-border);
  color: var(--text-primary);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}

.icon-btn.playing {
  border-color: rgba(56, 189, 248, 0.6);
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.4);
  animation: pulse-music 2.4s ease-in-out infinite;
}

@keyframes pulse-music {
  0%, 100% {
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.3);
    border-color: rgba(56, 189, 248, 0.5);
  }
  50% {
    box-shadow: 0 0 22px rgba(56, 189, 248, 0.65);
    border-color: rgba(56, 189, 248, 0.9);
  }
}

/* Minimap Widget */
#minimap-card {
  position: absolute;
  top: 76px;
  right: 16px;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--bg-card-border);
  padding: 10px;
  border-radius: var(--radius-md);
  z-index: 10;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  pointer-events: auto;
}

#minimap-canvas {
  width: 120px;
  height: 120px;
  display: block;
  border-radius: 6px;
  background: #060911;
}

.minimap-title {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 6px;
  font-weight: 600;
}

/* Controls Hint (Bottom Left) */
#controls-hint {
  position: absolute;
  bottom: 20px;
  left: 20px;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--bg-card-border);
  padding: 10px 16px;
  border-radius: var(--radius-md);
  z-index: 10;
  font-size: 12px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 16px;
  pointer-events: auto;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.key-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 2px 7px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: #fff;
  font-weight: 600;
  margin: 0 3px;
}

/* Interactive Dialogue Modal */
#dialog-modal {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(4, 7, 13, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  padding: 20px;
}

#dialog-modal.visible {
  opacity: 1;
  pointer-events: auto;
}

.dialog-box {
  background: #111827;
  border: 1px solid rgba(255, 255, 255, 0.15);
  width: 100%;
  max-width: 680px;
  max-height: 85vh;
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(20px) scale(0.97);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

#dialog-modal.visible .dialog-box {
  transform: translateY(0) scale(1);
}

/* Dialogue Header */
.dialog-header {
  padding: 18px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.02);
}

.npc-identity {
  display: flex;
  align-items: center;
  gap: 14px;
}

.npc-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  border: 2px solid transparent;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
}

.npc-info h2 {
  font-size: 18px;
  font-weight: 700;
}

.npc-info p {
  font-size: 13px;
  color: var(--text-secondary);
}

.close-btn {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: var(--text-secondary);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

/* Dialogue Body */
.dialog-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.speech-bubble {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 16px 20px;
  border-radius: var(--radius-md);
  line-height: 1.6;
  font-size: 15px;
  color: #e2e8f0;
}

.speech-bubble strong {
  color: #fff;
}

.speech-bubble code {
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 13px;
}

.speech-bubble a {
  color: #38bdf8;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Topics Selection Tabs */
.topic-options-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
}

.topic-options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}

.topic-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 10px;
}

.topic-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.topic-btn.active {
  background: rgba(59, 130, 246, 0.25);
  border-color: #3b82f6;
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.3);
}

/* Mobile Virtual Controls & Floating Touch Area */
#mobile-controls {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 40;
  display: none;
  touch-action: none;
}

#joystick-touch-zone {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 55vw;
  height: 65vh;
  pointer-events: auto;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}

.joystick-base {
  position: fixed;
  bottom: 90px;
  left: 90px;
  width: 128px;
  height: 128px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0.05) 60%, rgba(59, 130, 246, 0.25) 100%);
  border: 2.5px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  pointer-events: none;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5), inset 0 0 16px rgba(255, 255, 255, 0.15);
  transform: translate(-50%, -50%);
  opacity: 0.65;
  transition: opacity 0.2s ease, border-color 0.2s ease, transform 0.15s ease-out;
}

.joystick-base.active {
  opacity: 1;
  border-color: rgba(96, 165, 250, 0.95);
  box-shadow: 0 0 25px rgba(37, 99, 235, 0.5), inset 0 0 20px rgba(96, 165, 250, 0.35);
  transition: none; /* instant follow when active */
}

.joystick-stick {
  width: 54px;
  height: 54px;
  background: radial-gradient(circle at 35% 35%, #93c5fd 0%, #3b82f6 50%, #1d4ed8 100%);
  border: 2.5px solid #ffffff;
  border-radius: 50%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.7), inset 0 2px 4px rgba(255, 255, 255, 0.8);
  transition: transform 0.04s linear;
}

.mobile-action-btn {
  position: fixed;
  bottom: 45px;
  right: 30px;
  pointer-events: auto;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  border: 2.5px solid rgba(255, 255, 255, 0.6);
  color: #fff;
  font-size: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.5);
  cursor: pointer;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
  transition: transform 0.12s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.mobile-action-btn:active {
  transform: scale(0.92);
}

.mobile-action-btn.can-interact {
  background: linear-gradient(135deg, #10b981, #059669);
  border-color: #ffffff;
  box-shadow: 0 0 25px rgba(16, 185, 129, 0.8), 0 8px 25px rgba(0, 0, 0, 0.4);
  animation: pulseAction 1.2s infinite ease-in-out;
}

@keyframes pulseAction {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

/* Touch device adjustments */
@media (max-width: 1024px), (pointer: coarse) {
  #mobile-controls {
    display: block;
  }
  #controls-hint {
    display: none;
  }
  #minimap-card {
    display: none;
  }
  #top-bar {
    top: 8px;
    left: 8px;
    right: 8px;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
  }
  .profile-pill {
    padding: 4px 8px;
    gap: 6px;
  }
  .profile-meta h1 {
    font-size: 12px;
  }
  .profile-meta p {
    display: none;
  }
  .header-actions {
    gap: 5px;
    margin-left: auto;
  }
  .room-lang-switcher {
    padding: 2px 3px;
    gap: 2px;
  }
  .room-lang-btn {
    padding: 3px 6px;
    font-size: 9.5px;
  }
  #room-banner {
    order: 3;
    width: 100%;
    margin-top: 4px;
    padding: 4px 8px;
  }
  #room-banner #current-room-desc {
    display: none;
  }
  #room-banner #current-room-name {
    font-size: 11px;
    margin-bottom: 2px;
  }
  .travel-btn {
    padding: 3px 6px;
    font-size: 10px;
  }
}

@media (max-width: 540px) {
  .menu-action-btn span,
  .tree-action-btn span {
    display: none;
  }
  .menu-action-btn,
  .tree-action-btn {
    padding: 6px 8px;
    font-size: 13px;
  }
}

/* Toast Notifications */
#toast-container {
  position: absolute;
  top: 90px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
  z-index: 1000;
}

.toast {
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #fff;
  padding: 10px 20px;
  border-radius: var(--radius-lg);
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  animation: toastIn 0.3s cubic-bezier(0.16, 1, 0.3, 1), toastOut 0.4s ease 2.6s forwards;
  display: flex;
  align-items: center;
  gap: 10px;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(-15px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toastOut {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-10px); }
}

/* Interactive Modals (Whiteboard & Arcade) */
.custom-modal {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(4, 7, 13, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 150;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  padding: 20px;
}

.custom-modal.visible {
  opacity: 1;
  pointer-events: auto;
}

.custom-modal-box {
  background: #111827;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 680px;
  max-height: 85vh;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(20px) scale(0.97);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.custom-modal.visible .custom-modal-box {
  transform: translateY(0) scale(1);
}

/* Kanban Board Layout */
.kanban-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  padding: 20px;
  overflow-y: auto;
}

.kanban-col {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.kanban-col-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 6px;
}

.sticky-note {
  padding: 10px 12px;
  border-radius: 6px;
  color: #1e293b;
  font-size: 13px;
  line-height: 1.4;
  font-weight: 500;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  transform: rotate(-1deg);
  transition: transform 0.2s ease;
}

.sticky-note:nth-child(even) {
  transform: rotate(1.5deg);
}

.sticky-note:hover {
  transform: scale(1.04) rotate(0deg);
}

.sticky-yellow { background: #fef08a; }
.sticky-blue { background: #bae6fd; }
.sticky-pink { background: #fbcfe8; }
.sticky-green { background: #bbf7d0; }

/* Arcade Mini-Game Canvas */
.arcade-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  gap: 14px;
}

#arcade-canvas {
  background: #050811;
  border: 3px solid #8b5cf6;
  border-radius: 8px;
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.4);
  width: 320px;
  height: 240px;
}

.arcade-hud {
  display: flex;
  justify-content: space-between;
  width: 320px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: #38bdf8;
}

/* ==========================================================================
   ENTWICKLUNGSBAUM & STERNENKARTE (Christopher Bornstedt)
   ========================================================================== */

/* Top Bar Button */
.tree-action-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.3), rgba(168, 85, 247, 0.35));
  border: 1px solid rgba(192, 132, 252, 0.55);
  color: #f8fafc;
  padding: 8px 15px;
  border-radius: var(--radius-lg);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  pointer-events: auto;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 16px rgba(147, 51, 234, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.tree-action-btn:hover {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.5), rgba(168, 85, 247, 0.55));
  border-color: #c084fc;
  box-shadow: 0 0 20px rgba(192, 132, 252, 0.6), 0 4px 20px rgba(0, 0, 0, 0.4);
  transform: translateY(-1.5px);
}

.tree-action-btn:active {
  transform: translateY(0) scale(0.97);
}

/* Fullscreen Tree Modal */
.tree-modal-fullscreen {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  padding: 16px;
  background: rgba(3, 7, 18, 0.98) !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 200000 !important;
  transition: opacity 0.25s ease !important;
}

.tree-modal-fullscreen.visible {
  opacity: 1 !important;
  pointer-events: auto !important;
}

.tree-modal-fullscreen .tree-modal-box {
  position: relative;
  width: 96vw;
  max-width: 1280px;
  height: 92vh;
  max-height: 860px;
  background: #030712 !important;
  border: 1.5px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-lg);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.95), 0 0 60px rgba(96, 165, 250, 0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.96);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.custom-modal.visible .tree-modal-box {
  transform: scale(1);
}

/* Tree Modal Header */
.tree-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px;
  background: rgba(15, 23, 42, 0.9);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 10;
  gap: 16px;
}

.tree-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.tree-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #f8fafc;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(8px);
}

.tree-back-btn:hover {
  background: #3b82f6;
  border-color: #60a5fa;
  transform: translateX(-2px);
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.45);
}

.tree-back-icon {
  font-size: 11px;
}

.tree-identity {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tree-avatar {
  font-size: 26px;
  filter: drop-shadow(0 0 10px rgba(147, 51, 234, 0.7));
}

.tree-info h2 {
  font-size: 17px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.2px;
}

.tree-info p {
  font-size: 12px;
  color: #94a3b8;
}

.tree-legend {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.legend-pill {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #f1f5f9;
}

/* Star Map Canvas Area */
.tree-canvas-wrapper {
  position: relative;
  flex: 1;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: #030712;
}

.tree-stars-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #030712;
  background-image: 
    radial-gradient(1px 1px at 20px 30px, #ffffff, rgba(0,0,0,0)),
    radial-gradient(1px 1px at 40px 70px, #ffffff, rgba(0,0,0,0)),
    radial-gradient(1.5px 1.5px at 50px 160px, #ffffff, rgba(0,0,0,0)),
    radial-gradient(1.5px 1.5px at 90px 40px, #60a5fa, rgba(0,0,0,0)),
    radial-gradient(2px 2px at 130px 80px, #c084fc, rgba(0,0,0,0)),
    radial-gradient(1.5px 1.5px at 170px 130px, #ffffff, rgba(0,0,0,0)),
    radial-gradient(2px 2px at 210px 50px, #4ade80, rgba(0,0,0,0)),
    radial-gradient(1.5px 1.5px at 250px 180px, #fbbf24, rgba(0,0,0,0)),
    radial-gradient(circle at 50% 50%, rgba(30, 58, 138, 0.25) 0%, rgba(3, 7, 18, 1) 80%);
  background-repeat: repeat;
  background-size: 260px 260px;
  opacity: 1;
  z-index: 1;
}

.tree-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

.tree-svg line {
  stroke: rgba(255, 255, 255, 0.22);
  stroke-width: 2;
  transition: stroke 0.3s ease, stroke-width 0.3s ease, filter 0.3s ease;
}

.tree-svg line.active-line {
  stroke: rgba(255, 255, 255, 0.95);
  stroke-width: 3.5px;
  filter: drop-shadow(0 0 8px #ffffff);
}

.tree-nodes-container {
  position: relative;
  width: 100%;
  height: 100%;
  z-index: 3;
}

/* Individual Star Nodes */
.tree-node {
  position: absolute;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  cursor: pointer;
  z-index: 4;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.tree-node:hover,
.tree-node.active-node {
  transform: translate(-50%, -50%) scale(1.65);
  z-index: 10;
}

.tree-node-center {
  width: 26px;
  height: 26px;
  background-color: #ffffff;
  box-shadow: 0 0 16px #ffffff, 0 0 35px #60a5fa;
}

.tree-node-standard {
  width: 17px;
  height: 17px;
}

.tree-node.branch-berufsweg {
  background-color: #60a5fa;
  box-shadow: 0 0 10px #60a5fa, 0 0 22px rgba(96, 165, 250, 0.7);
}

.tree-node.branch-automatisierung {
  background-color: #c084fc;
  box-shadow: 0 0 10px #c084fc, 0 0 22px rgba(192, 132, 252, 0.7);
}

.tree-node.branch-entwicklung {
  background-color: #4ade80;
  box-shadow: 0 0 10px #4ade80, 0 0 22px rgba(74, 222, 128, 0.7);
}

.tree-node.branch-vision {
  background-color: #fbbf24;
  box-shadow: 0 0 10px #fbbf24, 0 0 22px rgba(251, 191, 36, 0.7);
}

.tree-node-label {
  position: absolute;
  top: 22px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
  color: #f1f5f9;
  pointer-events: none;
  opacity: 0.88;
  text-shadow: 0 0 4px #000, 0 0 8px #000;
  transition: opacity 0.2s ease, font-weight 0.2s ease, transform 0.2s ease;
}

.tree-node-center .tree-node-label {
  top: 28px;
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 0 0 10px rgba(96, 165, 250, 0.9), 0 0 4px #000;
}

.tree-node:hover .tree-node-label,
.tree-node.active-node .tree-node-label {
  opacity: 1;
  font-weight: 700;
  color: #ffffff;
  transform: translateX(-50%) scale(1.08);
}

/* Detail Card / Tooltip */
.tree-tooltip {
  position: absolute;
  width: 330px;
  background: rgba(15, 23, 42, 0.95);
  border: 1.5px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  pointer-events: none;
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 50;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.75), 0 0 25px rgba(96, 165, 250, 0.25);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.tree-tooltip.visible {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.tt-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.tt-badge {
  font-size: 11px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.12);
  color: #f8fafc;
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 0.3px;
}

.tt-branch {
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
}

.tt-title {
  font-size: 17px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 2px;
}

.tt-subtitle {
  font-size: 12px;
  font-weight: 600;
  color: #38bdf8;
  margin-bottom: 8px;
}

.tt-desc {
  font-size: 13px;
  color: #cbd5e1;
  line-height: 1.5;
  margin-bottom: 10px;
}

.tt-hint {
  font-size: 10px;
  color: #64748b;
  text-align: right;
  font-style: italic;
}

/* Mobile & Touch Adjustments */
@media (max-width: 820px) {
  .menu-action-btn span,
  .tree-action-btn span {
    display: none;
  }
  .menu-action-btn,
  .tree-action-btn {
    padding: 6px 10px;
    font-size: 14px;
  }
  .tree-back-btn span#tree-back-label {
    display: inline;
    font-size: 11.5px;
  }
  .tree-back-btn {
    padding: 5px 10px;
  }
  .tree-legend {
    display: none;
  }
  .tree-modal-box {
    width: 98vw;
    height: 95vh;
  }
  .tree-node-label {
    font-size: 9.5px;
    top: 18px;
  }
  .tree-tooltip {
    position: absolute !important;
    left: 12px !important;
    right: 12px !important;
    bottom: 12px !important;
    top: auto !important;
    width: auto !important;
    max-height: 40vh;
    overflow-y: auto;
    transform: none !important;
  }
}

/* ==========================================================================
   ÜBERGEORDNETE STARTSEITE / TITELMENÜ (The Last of Us / Witcher 3 / Uncharted)
   ========================================================================== */

/* Top Bar Menu Action Button */
.menu-action-btn {
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #f8fafc;
  padding: 6px 14px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 12.5px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  gap: 6px;
  backdrop-filter: blur(8px);
}
.menu-action-btn:hover {
  background: #f59e0b;
  color: #020617;
  border-color: #f59e0b;
  transform: translateY(-1px);
  box-shadow: 0 4px 18px rgba(245, 158, 11, 0.4);
}

/* Title Screen Fullscreen Container */
.title-screen {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 100000;
  background-color: #05070d;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: scale(1.0);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.6s;
}

.title-screen.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none !important;
  transform: scale(1.03);
}

.title-screen.hidden * {
  pointer-events: none !important;
}

/* Atmospheric Background Container */
.title-bg-container {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.title-portrait-wrap {
  position: absolute;
  right: -3%;
  top: 0;
  width: 65vw;
  height: 100vh;
  max-width: 1000px;
  display: flex;
  align-items: center;
  justify-content: center;
  transform-style: preserve-3d;
  will-change: transform;
  transition: transform 0.12s ease-out;
}

.title-portrait-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 28%;
  filter: contrast(1.14) brightness(0.95) grayscale(100%);
  mask-image: radial-gradient(ellipse 68% 68% at 52% 42%, rgba(0,0,0,1) 32%, rgba(0,0,0,0) 76%);
  -webkit-mask-image: radial-gradient(ellipse 68% 68% at 52% 42%, rgba(0,0,0,1) 32%, rgba(0,0,0,0) 76%);
  animation: cinematicBreath 26s ease-in-out infinite alternate;
}

@keyframes cinematicBreath {
  0% {
    transform: scale(1.0) translate(0%, 0%);
  }
  50% {
    transform: scale(1.055) translate(-1.2%, -0.8%);
  }
  100% {
    transform: scale(1.02) translate(0.8%, 0.4%);
  }
}

.title-portrait-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 55% 45%, transparent 35%, rgba(5, 7, 13, 0.88) 80%);
  pointer-events: none;
}

.title-particles-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}

.title-cinematic-overlay {
  position: absolute;
  inset: 0;
  background: 
    linear-gradient(90deg, #05070d 0%, #05070d 36%, rgba(5, 7, 13, 0.82) 54%, rgba(5, 7, 13, 0.3) 100%),
    linear-gradient(0deg, #05070d 0%, transparent 18%, transparent 82%, rgba(5, 7, 13, 0.85) 100%);
  z-index: 3;
  pointer-events: none;
}

/* Title Foreground Content Layout */
.title-content-wrapper {
  position: relative;
  z-index: 10;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 42px 64px;
  max-width: 1650px;
  margin: 0 auto;
  color: #f8fafc;
  pointer-events: auto;
}

/* Top Bar: Franchise Subtitle & Language Toggle */
.title-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  animation: titleFadeIn 1s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.title-studio-brand {
  font-family: 'Cinzel', serif;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 3.5px;
  color: #94a3b8;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand-glyph {
  color: #f59e0b;
  font-size: 14px;
  text-shadow: 0 0 10px rgba(245, 158, 11, 0.6);
}

.title-lang-group {
  display: flex;
  gap: 6px;
  background: rgba(15, 23, 42, 0.7);
  padding: 5px;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.title-lang-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.22s ease;
}
.title-lang-btn:hover {
  color: #ffffff;
}
.title-lang-btn.active {
  background: #f59e0b;
  color: #020617;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.5);
}

/* Hero Section: Role, Big Game Name & Requested Quote */
.title-hero-section {
  max-width: 680px;
  margin-top: 10px;
  animation: titleFadeIn 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}

.title-role-tag {
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3px;
  color: #38bdf8;
  text-transform: uppercase;
  margin-bottom: 12px;
  display: inline-block;
  border-left: 2px solid #38bdf8;
  padding-left: 10px;
  text-shadow: 0 0 12px rgba(56, 189, 248, 0.4);
}

.title-main-name {
  font-family: 'Cinzel', serif;
  font-size: clamp(32px, 4.4vw, 58px);
  font-weight: 900;
  letter-spacing: 3px;
  color: #ffffff;
  text-transform: uppercase;
  line-height: 1.08;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.9), 0 0 40px rgba(245, 158, 11, 0.2);
  margin-bottom: 22px;
}

/* The requested quote in cinematic Witcher/Last of Us styling */
.title-quote-card {
  position: relative;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-left: 3px solid #f59e0b;
  padding: 16px 22px;
  border-radius: 0 10px 10px 0;
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.5);
  margin-bottom: 28px;
  max-width: 580px;
}

.quote-body {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(14px, 1.15vw, 16.5px);
  font-weight: 400;
  color: #e2e8f0;
  line-height: 1.6;
  font-style: italic;
  letter-spacing: 0.2px;
}

/* AAA Title Navigation Menu */
.title-nav-menu {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 500px;
  margin-bottom: 20px;
  animation: titleFadeIn 1.4s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

.title-menu-item {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 14px 20px;
  border-radius: 6px;
  color: #f8fafc;
  text-align: left;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  font-family: 'Montserrat', sans-serif;
}

.title-menu-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: #f59e0b;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  transform: scaleY(0.4);
}

.title-menu-item:hover {
  background: rgba(30, 41, 59, 0.75);
  border-color: rgba(245, 158, 11, 0.45);
  transform: translateX(8px);
  box-shadow: 0 4px 24px rgba(245, 158, 11, 0.15);
}

.title-menu-item:hover::before {
  opacity: 1;
  transform: scaleY(1);
}

.title-menu-item.primary-action {
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.25) 0%, rgba(15, 23, 42, 0.6) 100%);
  border-color: rgba(245, 158, 11, 0.4);
}

.title-menu-item.primary-action:hover {
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.42) 0%, rgba(30, 41, 59, 0.85) 100%);
  border-color: #f59e0b;
  box-shadow: 0 6px 30px rgba(245, 158, 11, 0.3);
}

.item-cursor {
  font-size: 13px;
  color: #f59e0b;
  opacity: 0.35;
  transition: all 0.2s ease;
  transform: scale(0.8);
}
.title-menu-item:hover .item-cursor {
  opacity: 1;
  transform: scale(1.25);
  text-shadow: 0 0 10px #f59e0b;
}

.item-text-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.item-label {
  font-family: 'Cinzel', serif;
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #ffffff;
  text-transform: uppercase;
}

.item-desc {
  font-size: 12px;
  color: #94a3b8;
  font-weight: 400;
}

/* Footer Info & Legend */
.title-footer-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 18px;
  font-size: 12px;
  color: #64748b;
  font-family: 'Montserrat', sans-serif;
  animation: titleFadeIn 1.5s cubic-bezier(0.16, 1, 0.3, 1) 0.3s both;
}

.title-legend {
  display: flex;
  gap: 20px;
  align-items: center;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.key-pill {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 2px 7px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: #cbd5e1;
}

.title-footer-credits {
  font-size: 11.5px;
  color: #64748b;
  letter-spacing: 0.5px;
}

/* Title Screen Submodals (Room Selector & Contact) */
.title-submodal {
  position: fixed;
  inset: 0;
  z-index: 100010;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.title-submodal.visible {
  opacity: 1;
  pointer-events: auto;
}

.submodal-dialog {
  background: #0b0f19;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  padding: 28px;
  width: 100%;
  max-width: 640px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 40px rgba(245, 158, 11, 0.1);
  transform: translateY(16px) scale(0.97);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.title-submodal.visible .submodal-dialog {
  transform: translateY(0) scale(1.0);
}

.submodal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.submodal-head h3 {
  font-family: 'Cinzel', serif;
  font-size: 18px;
  color: #ffffff;
  letter-spacing: 1px;
}

.submodal-close-btn {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 14px;
}
.submodal-close-btn:hover {
  background: #ef4444;
  color: #ffffff;
  border-color: #ef4444;
}

.submodal-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.room-pick-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 12px 18px;
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.room-pick-card:hover {
  background: rgba(30, 41, 59, 0.85);
  border-color: #f59e0b;
  transform: translateX(6px);
}

.pick-icon {
  font-size: 24px;
}
.pick-info {
  flex: 1;
}
.pick-info h4 {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 2px;
}
.pick-info p {
  font-size: 12px;
  color: #94a3b8;
}
.pick-arrow {
  color: #f59e0b;
  font-size: 16px;
  opacity: 0.5;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.room-pick-card:hover .pick-arrow {
  opacity: 1;
  transform: translateX(4px);
}

/* Contact Links Grid */
.contact-links-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contact-card-link {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 14px 20px;
  border-radius: 10px;
  color: #ffffff;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.contact-card-link:hover {
  background: rgba(30, 41, 59, 0.85);
  border-color: #38bdf8;
  transform: translateX(6px);
}
.cc-icon {
  font-size: 26px;
}
.cc-details {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.cc-details strong {
  font-size: 15px;
  color: #ffffff;
}
.cc-details span {
  font-size: 12px;
  color: #94a3b8;
}
.cc-ext {
  color: #38bdf8;
  font-size: 16px;
  opacity: 0.6;
}
.contact-card-link:hover .cc-ext {
  opacity: 1;
}

@keyframes titleFadeIn {
  0% {
    opacity: 0;
    transform: translateY(12px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.lang-short {
  display: none;
}

/* Responsive Layout for Tablets and Smartphones */
@media (max-width: 900px) {
  .lang-full {
    display: none;
  }
  .lang-short {
    display: inline;
  }
  .title-lang-btn {
    padding: 5px 10px;
    font-size: 11px;
    letter-spacing: 0.5px;
  }
  .title-content-wrapper {
    padding: 16px 16px 24px 16px;
    justify-content: flex-start;
    gap: 12px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .title-top-bar {
    margin-bottom: 4px;
    gap: 8px;
  }
  .title-studio-brand {
    font-size: 8px;
    letter-spacing: 1px;
    max-width: 44%;
    flex-shrink: 1;
    line-height: 1.25;
  }
  .title-lang-group {
    flex-shrink: 0;
    padding: 3px;
    gap: 3px;
  }
  .title-lang-btn {
    padding: 4px 8px;
    font-size: 10px;
    letter-spacing: 0.5px;
    min-width: 28px;
    text-align: center;
  }
  .title-portrait-wrap {
    width: 100vw;
    height: 100vh;
    right: 0;
    opacity: 0.32;
  }
  .title-cinematic-overlay {
    background: linear-gradient(180deg, rgba(5, 7, 13, 0.45) 0%, rgba(5, 7, 13, 0.9) 65%, #05070d 100%);
  }
  .title-hero-section {
    margin-top: 0;
    margin-bottom: 2px;
  }
  .title-role-tag {
    font-size: 9.5px;
    letter-spacing: 1.5px;
    margin-bottom: 6px;
  }
  .title-main-name {
    font-size: clamp(19px, 5.8vw, 24px);
    letter-spacing: 1.2px;
    margin-bottom: 12px;
    line-height: 1.15;
    word-break: break-word;
  }
  .title-quote-card {
    padding: 10px 14px;
    margin-bottom: 14px;
    border-left-width: 2.5px;
  }
  .quote-body {
    font-size: 12.5px;
    line-height: 1.45;
  }
  .title-nav-menu {
    gap: 8px;
    margin-bottom: 12px;
  }
  .title-menu-item {
    padding: 10px 14px;
    gap: 12px;
  }
  .item-label {
    font-size: 13.5px;
  }
  .item-desc {
    font-size: 11px;
  }
  .title-footer-bar {
    padding-top: 10px;
    margin-top: auto;
    flex-direction: column;
    gap: 6px;
    align-items: flex-start;
  }
  .title-legend {
    display: none;
  }
  .title-footer-credits {
    font-size: 10.5px;
  }
}

/* Mobile Small Screen Header Layout (Row 1 fit for 320px - 440px smartphones) */
@media (max-width: 600px) {
  #top-bar {
    top: 6px;
    left: 6px;
    right: 6px;
    gap: 4px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
  }
  .profile-pill {
    padding: 3px 6px;
    gap: 4px;
    flex-shrink: 1;
    min-width: 0;
  }
  .avatar-badge {
    width: 26px;
    height: 26px;
    font-size: 13px;
    flex-shrink: 0;
  }
  .profile-meta {
    min-width: 0;
  }
  .profile-meta h1 {
    font-size: 11px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 75px;
  }
  .header-actions {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 3px;
    flex-shrink: 0;
    margin-left: auto;
  }
  .room-lang-switcher {
    padding: 1px 2px;
    gap: 1px;
    flex-shrink: 0;
  }
  .room-lang-btn {
    padding: 2px 4px;
    font-size: 9px;
  }
  .menu-action-btn,
  .tree-action-btn {
    padding: 3px 6px !important;
    font-size: 12px !important;
    border-radius: 14px !important;
    min-width: 28px !important;
    height: 28px !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
  }
  .menu-action-btn span,
  .tree-action-btn span {
    display: none !important;
  }
  .icon-btn {
    width: 28px !important;
    height: 28px !important;
    font-size: 13px !important;
    flex-shrink: 0 !important;
  }
}
