/* ══════════════════════════════════════════════════════════════════
   CorpLingo™ — Windows XP Luna Theme
   ══════════════════════════════════════════════════════════════════ */

:root {
  /* XP Luna blue titlebar */
  --xp-title-start: #0A246A;
  --xp-title-mid:   #3A6EA5;
  --xp-title-end:   #0A246A;
  /* XP button/dialog surface */
  --xp-btn-face:    #ECE9D8;
  --xp-btn-hi:      #FFFFFF;
  --xp-btn-shadow:  #ACA899;
  --xp-btn-dark:    #716F64;
  --xp-dialog-bg:   #D4D0C8;
  /* XP taskbar */
  --xp-taskbar-blue: #1f5e9e;
  --xp-taskbar-grad: linear-gradient(to bottom, #3168C7 0%, #1F5FAD 4%, #1D63BF 6%, #1F74D0 8%, #2080D8 10%, #1F74D0 14%, #1B6AC5 16%, #1966C0 18%, #1963BB 20%, #1762B9 22%, #195FB8 65%, #1960BB 67%, #1963BF 70%, #1B67C4 71%, #1D6CC8 73%, #2275D0 75%, #2277D3 77%, #2379D4 80%, #2277D2 82%, #2073CE 84%, #1E6FCA 86%, #1C6CC7 88%, #1B6CC7 90%, #1B6CC7 100%);
  /* XP start button green */
  --xp-start-green: #3A6E01;
  --xp-start-green-hi: #5BAA0D;
  /* XP window border set */
  --xp-border-out:  #0054E3;
  --xp-border-mid:  #FFFFFF;
  --xp-border-in:   #848284;
  /* XP colours */
  --xp-blue:        #0148A4;
  --xp-blue-hi:     #1660D8;
  --xp-hyperlink:   #0000FF;
  --xp-selection:   #3169C6;
  --xp-selection-bg:#316AC5;
  /* Text */
  --text-title:     #FFFFFF;
  --text-body:      #000000;
  --text-muted:     #5F5F5F;
  --text-disabled:  #ACA899;
  /* Game colours */
  --xp-green:       #3A8C2F;
  --xp-green-dark:  #1F6016;
  --xp-red:         #C0392B;
  --xp-orange:      #CC5500;
  --xp-gold:        #DAA520;
  /* Sizing */
  --radius-xp:      3px;
  --radius-btn:     3px;
  --title-h:        26px;
  --font-xp:        'Tahoma', 'Trebuchet MS', 'Arial', sans-serif;
  /* Layout */
  --content-max:    880px;
  --page-pad:       20px;
}

/* ─── Reset ─── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; }

body {
  font-family: var(--font-xp);
  font-size: 13px;
  background: url('bliss.webp') center center / cover no-repeat fixed;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--text-body);
  -webkit-font-smoothing: antialiased;
  image-rendering: auto;
}

/* ─── Desktop layer ─── */
#desktop {
  min-height: calc(100vh - 30px);
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

#app {
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: var(--content-max);
  padding: 0 var(--page-pad);
}

/* Landing and auth pages need full-width — break out of the 880px constraint */
#app.landing-shell,
#app.auth-shell,
#app.desktop-icon-layer {
  max-width: none !important;
  padding: 0 !important;
  width: 100% !important;
}

/* ══════════════════════════════════════════════════════════════════
   XP WINDOW CHROME
   ══════════════════════════════════════════════════════════════════ */

.xp-window {
  background: var(--xp-dialog-bg);
  border: 2px solid;
  border-color: #FFFFFF #848284 #848284 #FFFFFF;
  outline: 1px solid #0054E3;
  box-shadow: 1px 1px 0 #0A246A, inset 1px 1px 0 #FFFFFF;
  border-radius: 6px 6px 0 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.xp-titlebar {
  height: var(--title-h);
  background: linear-gradient(to bottom,
    #0A246A 0%, #3A6EA5 4%, #2E7EC0 6%, #1F74D0 10%,
    #2F8FD5 30%, #2F8FD5 50%, #2781C4 55%,
    #2275BA 60%, #215BAB 70%, #1B52A5 90%
  );
  display: flex;
  align-items: center;
  padding: 0 4px;
  gap: 4px;
  flex-shrink: 0;
  position: relative;
  user-select: none;
}

.xp-titlebar-icon {
  width: 16px; height: 16px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  line-height: 1;
}

.xp-titlebar-text {
  flex: 1;
  font-family: var(--font-xp);
  font-size: 12px;
  font-weight: bold;
  color: white;
  text-shadow: 1px 1px 2px rgba(0,0,80,0.6);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.1px;
}

.xp-titlebar-buttons {
  display: flex;
  gap: 2px;
  flex-shrink: 0;
}

.xp-caption-btn {
  width: 21px; height: 21px;
  border-radius: 2px;
  border: 1px solid rgba(255,255,255,0.5);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 10px;
  font-weight: bold;
  color: white;
  background: linear-gradient(to bottom, #5C9DD5 0%, #4489C8 50%, #3A7DBF 51%, #2D6FB6 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.4), inset 0 -1px 0 rgba(0,0,0,0.2);
  transition: filter 0.1s;
  text-shadow: 1px 1px 1px rgba(0,0,60,0.5);
}
.xp-caption-btn:hover { filter: brightness(1.15); }
.xp-caption-btn:active { filter: brightness(0.9); }
.xp-caption-btn.close {
  background: linear-gradient(to bottom, #D86060 0%, #C44444 50%, #B83838 51%, #A02C2C 100%);
}
.xp-caption-btn.close:hover { filter: brightness(1.2); }

/* XP window client area */
.xp-client {
  padding: 8px;
  flex: 1;
  background: var(--xp-dialog-bg);
}

/* Inner raised/sunken panels */
.xp-sunken {
  border: 2px solid;
  border-color: #848284 #FFFFFF #FFFFFF #848284;
  background: white;
  padding: 4px;
}

.xp-raised {
  border: 2px solid;
  border-color: #FFFFFF #848284 #848284 #FFFFFF;
  background: var(--xp-dialog-bg);
  padding: 4px;
}

.xp-groupbox {
  border: 1px solid #848284;
  border-radius: 2px;
  padding: 12px 10px 10px;
  margin-bottom: 10px;
  position: relative;
}
.xp-groupbox-label {
  position: absolute;
  top: -8px; left: 8px;
  background: var(--xp-dialog-bg);
  padding: 0 4px;
  font-size: 11px;
  font-weight: bold;
  color: var(--text-body);
}

/* ══════════════════════════════════════════════════════════════════
   BUTTONS
   ══════════════════════════════════════════════════════════════════ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 5px 18px;
  min-width: 80px;
  min-height: 26px;
  border: 2px solid;
  border-color: var(--xp-btn-hi) var(--xp-btn-dark) var(--xp-btn-dark) var(--xp-btn-hi);
  outline: 1px solid var(--xp-btn-shadow);
  background: var(--xp-btn-face);
  font-family: var(--font-xp);
  font-size: 11px;
  font-weight: normal;
  color: var(--text-body);
  cursor: pointer;
  border-radius: var(--radius-btn);
  transition: filter 0.07s;
  white-space: nowrap;
  user-select: none;
  -webkit-user-select: none;
}

.btn:hover {
  filter: brightness(1.05);
  border-color: var(--xp-selection);
  outline-color: var(--xp-selection);
}
.btn:active {
  border-color: var(--xp-btn-dark) var(--xp-btn-hi) var(--xp-btn-hi) var(--xp-btn-dark);
  filter: brightness(0.97);
}
.btn:focus {
  outline: 1px dotted #000000;
  outline-offset: -4px;
}
.btn:disabled {
  color: var(--text-disabled);
  filter: grayscale(0.5);
  cursor: default;
}

/* Default / OK button (has extra border) */
.btn-primary, .btn-ok {
  border-color: var(--xp-btn-hi) var(--xp-btn-dark) var(--xp-btn-dark) var(--xp-btn-hi);
  outline: 2px solid #000;
  outline-offset: -3px;
  font-weight: bold;
}

.btn-green {
  background: linear-gradient(to bottom, #6DBE3B 0%, #52A825 50%, #3D8A14 51%, #2E7010 100%);
  color: white;
  border-color: #88D850 #1F5800 #1F5800 #88D850;
  outline: 1px solid #1F5800;
  text-shadow: 0 1px 1px rgba(0,0,0,0.4);
}
.btn-green:hover { filter: brightness(1.1); }
.btn-green:active { filter: brightness(0.9); }

.btn-orange {
  background: linear-gradient(to bottom, #F07830 0%, #E06010 50%, #CC4800 51%, #AA3600 100%);
  color: white;
  border-color: #FFA060 #661A00 #661A00 #FFA060;
  outline: 1px solid #661A00;
  text-shadow: 0 1px 1px rgba(0,0,0,0.4);
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
  outline: none;
  color: var(--text-muted);
}
.btn-ghost:hover { background: rgba(0,0,0,0.05); border-color: var(--xp-btn-shadow); outline-color: var(--xp-btn-shadow); }

.btn-full { width: 100%; }
.btn-lg { padding: 7px 28px; min-height: 30px; font-size: 13px; }
.btn-sm { padding: 3px 10px; min-height: 22px; font-size: 11px; }

/* ══════════════════════════════════════════════════════════════════
   FORM INPUTS
   ══════════════════════════════════════════════════════════════════ */

.form-input, .form-select {
  width: 100%;
  padding: 3px 4px;
  border: 2px solid;
  border-color: #848284 #FFFFFF #FFFFFF #848284;
  outline: 1px solid #000;
  background: white;
  font-family: var(--font-xp);
  font-size: 11px;
  color: var(--text-body);
  border-radius: 0;
  appearance: none;
  -webkit-appearance: none;
}
.form-input:focus, .form-select:focus {
  outline: 2px solid var(--xp-selection);
  outline-offset: 0;
}
.form-input::placeholder { color: var(--text-muted); }

.form-label {
  display: block;
  font-size: 11px;
  font-weight: bold;
  color: var(--text-body);
  margin-bottom: 3px;
}

.form-group { margin-bottom: 12px; }

.select-wrapper { position: relative; }
.select-wrapper::after {
  content: '▼';
  position: absolute;
  right: 4px; top: 50%;
  transform: translateY(-50%);
  font-size: 7px;
  color: var(--text-body);
  pointer-events: none;
}

.auth-error {
  background: #FFF0F0;
  border: 1px solid var(--xp-red);
  color: var(--xp-red);
  padding: 4px 8px;
  font-size: 11px;
  margin-bottom: 8px;
  border-radius: 2px;
}

/* ══════════════════════════════════════════════════════════════════
   XP PROGRESS BAR
   ══════════════════════════════════════════════════════════════════ */

.xp-progress-track {
  background: white;
  border: 2px solid;
  border-color: #848284 #FFFFFF #FFFFFF #848284;
  height: 18px;
  padding: 2px;
  position: relative;
  overflow: hidden;
}

.xp-progress-fill {
  height: 100%;
  background: repeating-linear-gradient(
    90deg,
    #2B5FBF 0px, #3B7FDF 6px,
    #2B5FBF 6px, #2B5FBF 8px
  );
  transition: width 0.5s ease;
  position: relative;
}

.xp-progress-fill::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 50%;
  background: rgba(255,255,255,0.2);
}

/* lesson progress (thinner) */
.lesson-progress-bar {
  margin: 8px 0 4px;
}
.lesson-progress-bar .xp-progress-track {
  height: 16px;
}

/* ══════════════════════════════════════════════════════════════════
   XP TASKBAR
   ══════════════════════════════════════════════════════════════════ */

#xp-taskbar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 40px;
  background: var(--xp-taskbar-grad);
  border-top: 1px solid #3168C7;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 2px 4px;
  z-index: 9999;
  user-select: none;
}

#xp-start-btn {
  height: 32px;
  padding: 0 16px 0 10px;
  background: linear-gradient(to bottom, #5BBF12 0%, #3D9A0A 30%, #3B9808 50%, #257606 51%, #1A6302 80%, #0E5100 100%);
  border: 1px solid #1A5200;
  border-radius: 0 16px 16px 0;
  display: flex; align-items: center; gap: 6px;
  cursor: pointer;
  color: white;
  font-family: var(--font-xp);
  font-size: 15px;
  font-weight: bold;
  font-style: italic;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.6);
  letter-spacing: 0.5px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.3), inset 0 -1px 0 rgba(0,0,0,0.3), 2px 0 4px rgba(0,0,0,0.3);
  transition: filter 0.1s;
  flex-shrink: 0;
}
#xp-start-btn:hover { filter: brightness(1.1); }
#xp-start-btn:active { filter: brightness(0.9); }

.start-windows-logo {
  width: 22px; height: 22px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5px;
  flex-shrink: 0;
}
.start-windows-logo .wp { border-radius: 1px; }
.start-windows-logo .wp:nth-child(1) { background: #FF0000; }
.start-windows-logo .wp:nth-child(2) { background: #00B000; }
.start-windows-logo .wp:nth-child(3) { background: #0000FF; }
.start-windows-logo .wp:nth-child(4) { background: #FFB000; }

.taskbar-divider {
  width: 2px; height: 20px;
  border-left: 1px solid rgba(0,0,0,0.3);
  border-right: 1px solid rgba(255,255,255,0.15);
  margin: 0 2px;
  flex-shrink: 0;
}

.taskbar-windows {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 2px;
  overflow: hidden;
}

.taskbar-window-btn {
  height: 30px;
  padding: 0 10px;
  max-width: 200px;
  min-width: 120px;
  background: linear-gradient(to bottom, #2A63C0 0%, #1F52A8 50%, #1C4D9D 51%, #1A4A98 100%);
  border: 1px solid #1A3866;
  border-radius: 3px;
  color: white;
  font-family: var(--font-xp);
  font-size: 13px;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  display: flex; align-items: center; gap: 6px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.15);
  text-shadow: 1px 1px 1px rgba(0,0,0,0.5);
}
.taskbar-window-btn.active {
  background: linear-gradient(to bottom, #1A4090 0%, #1F52A8 100%);
  border-color: #0A2860;
  box-shadow: inset 1px 1px 2px rgba(0,0,0,0.3);
}

.taskbar-tray {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px 0 6px;
  height: 30px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 3px;
  background: rgba(0,0,0,0.15);
  flex-shrink: 0;
  font-size: 13px;
}

.tray-icon {
  font-size: 14px;
  cursor: default;
}

#taskbar-clock {
  font-family: var(--font-xp);
  font-size: 11px;
  color: white;
  text-shadow: 1px 1px 1px rgba(0,0,0,0.5);
  white-space: nowrap;
}

/* ══════════════════════════════════════════════════════════════════
   UTILITY
   ══════════════════════════════════════════════════════════════════ */

.hidden { display: none !important; }
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.gap-8 { gap: 8px; }
.text-center { text-align: center; }
.w-full { width: 100%; }

/* ══════════════════════════════════════════════════════════════════
   BOOT SCREEN
   ══════════════════════════════════════════════════════════════════ */

#boot-screen {
  position: fixed;
  inset: 0;
  background: #000000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  transition: opacity 1.2s ease;
}
#boot-screen.fade-out { opacity: 0; pointer-events: none; }

.boot-logo {
  text-align: center;
  margin-bottom: 48px;
}

.boot-logo-windows {
  display: flex;
  gap: 3px;
  margin: 0 auto 12px;
  width: fit-content;
}
.boot-logo-pane {
  width: 26px; height: 26px;
  border-radius: 2px;
  animation: boot-pane-glow 3s ease-in-out infinite;
}
.boot-logo-pane:nth-child(1) { background: #FF0000; animation-delay: 0s; }
.boot-logo-pane:nth-child(2) { background: #00A000; animation-delay: 0.3s; }
.boot-logo-pane:nth-child(3) { background: #0000FF; animation-delay: 0.6s; }
.boot-logo-pane:nth-child(4) { background: #FFA500; animation-delay: 0.9s; }

@keyframes boot-pane-glow {
  0%, 100% { filter: brightness(0.7); }
  50% { filter: brightness(1.3); }
}

.boot-logo-title {
  font-family: 'Trebuchet MS', var(--font-xp);
  font-size: 36px;
  font-style: italic;
  font-weight: normal;
  color: #FFFFFF;
  letter-spacing: 1px;
}
.boot-logo-edition {
  font-family: var(--font-xp);
  font-size: 11px;
  color: #AAAAAA;
  text-align: right;
  letter-spacing: 2px;
  text-transform: none;
}

.boot-progress-track {
  width: 200px;
  height: 8px;
  border: 1px solid #444;
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 16px;
}
.boot-progress-bar {
  height: 100%;
  background: linear-gradient(to right, #1040A0, #3080E0, #1040A0);
  border-radius: 20px;
  width: 0%;
  animation: boot-fill 2.5s ease-out forwards;
  background-size: 200% 100%;
  animation: boot-progress 2.5s ease-out forwards;
}

@keyframes boot-progress {
  0%   { width: 0%; }
  30%  { width: 60%; }
  70%  { width: 75%; }
  100% { width: 100%; }
}

.boot-status {
  font-family: var(--font-xp);
  font-size: 11px;
  color: #888;
}

/* ══════════════════════════════════════════════════════════════════
   AUTH SCREEN — XP WELCOME / LOGON
   ══════════════════════════════════════════════════════════════════ */

.auth-screen {
  min-height: calc(100vh - 30px);
  background: linear-gradient(to bottom, #1B3F7C 0%, #143268 50%, #0D2454 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
  overflow: hidden;
}

/* Top blue stripe */
.auth-screen::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 60px;
  background: linear-gradient(to bottom, #2A5AAE 0%, transparent 100%);
}

/* Bottom stripe */
.auth-screen::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 60px;
  background: linear-gradient(to top, #0A1F50 0%, transparent 100%);
}

.auth-logon-panel {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 6px;
  padding: 32px 28px;
  width: 100%;
  max-width: 420px;
  backdrop-filter: blur(4px);
  position: relative;
  z-index: 1;
}

.auth-logo-area {
  text-align: center;
  margin-bottom: 24px;
}
.auth-windows-logo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  width: 40px; height: 40px;
  margin: 0 auto 10px;
}
.auth-windows-logo .wp {
  border-radius: 1px;
}
.auth-windows-logo .wp:nth-child(1) { background: #FF4444; }
.auth-windows-logo .wp:nth-child(2) { background: #44AA44; }
.auth-windows-logo .wp:nth-child(3) { background: #4444FF; }
.auth-windows-logo .wp:nth-child(4) { background: #FFAA00; }

.auth-title {
  font-family: 'Trebuchet MS', var(--font-xp);
  font-size: 22px;
  font-style: italic;
  color: white;
  font-weight: normal;
  letter-spacing: 0.5px;
}
.auth-subtitle {
  font-size: 12px;
  color: rgba(255,255,255,0.7);
  margin-top: 2px;
  margin-bottom: 20px;
}
.auth-divider {
  height: 1px;
  background: rgba(255,255,255,0.2);
  margin: 16px 0;
}

.auth-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 16px;
  background: rgba(0,0,0,0.2);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 3px;
  overflow: hidden;
}
.auth-tab {
  flex: 1;
  padding: 7px 12px;
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.7);
  font-family: var(--font-xp);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
  border-right: 1px solid rgba(255,255,255,0.1);
}
.auth-tab:last-child { border-right: none; }
.auth-tab.active {
  background: rgba(255,255,255,0.15);
  color: white;
  font-weight: bold;
}
.auth-tab:hover:not(.active) { background: rgba(255,255,255,0.08); color: white; }

.auth-form .form-label { color: rgba(255,255,255,0.85); }
.auth-form .form-input {
  background: rgba(255,255,255,0.9);
  border-color: rgba(0,0,0,0.4) rgba(255,255,255,0.6) rgba(255,255,255,0.6) rgba(0,0,0,0.4);
  font-size: 12px;
  height: 26px;
}
.auth-form .form-select {
  background: rgba(255,255,255,0.9);
  border-color: rgba(0,0,0,0.4) rgba(255,255,255,0.6) rgba(255,255,255,0.6) rgba(0,0,0,0.4);
  font-size: 12px;
  height: 26px;
}
.auth-form .btn {
  width: 100%;
  margin-top: 4px;
}

.auth-footer-text {
  font-size: 10px;
  color: rgba(255,255,255,0.5);
  text-align: center;
  margin-top: 16px;
}
.auth-footer-text em { color: rgba(255,255,255,0.7); font-style: normal; }

/* ══════════════════════════════════════════════════════════════════
   DESKTOP / DASHBOARD
   ══════════════════════════════════════════════════════════════════ */

.desktop-screen {
  min-height: calc(100vh - 30px);
  display: flex;
  flex-direction: column;
  padding: 16px 0 20px;
  gap: 10px;
  position: relative;
}

/* XP Explorer-style window for each unit */
.unit-window {
  background: var(--xp-dialog-bg);
  border: 2px solid;
  border-color: #FFFFFF #848284 #848284 #FFFFFF;
  outline: 1px solid #0054E3;
  border-radius: 6px 6px 0 0;
  overflow: hidden;
  margin-bottom: 8px;
  box-shadow: 2px 2px 4px rgba(0,0,0,0.3);
  animation: xp-window-open 0.15s ease-out;
}

@keyframes xp-window-open {
  from { opacity: 0; transform: scale(0.97); }
  to   { opacity: 1; transform: scale(1); }
}

.unit-window-body {
  padding: 8px 10px;
  background: white;
  border-top: 2px solid;
  border-color: #848284 white white #848284;
}

/* Address / Explorer bar */
.unit-addressbar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 6px;
  background: var(--xp-dialog-bg);
  border-bottom: 1px solid #848284;
  font-size: 11px;
}
.unit-addressbar-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: bold;
  flex-shrink: 0;
}
.unit-addressbar-path {
  flex: 1;
  background: white;
  border: 2px solid;
  border-color: #848284 white white #848284;
  padding: 1px 4px;
  font-size: 11px;
  color: var(--text-body);
  font-family: var(--font-xp);
}
.unit-progress-pill {
  font-size: 10px;
  font-weight: bold;
  color: var(--xp-blue);
  flex-shrink: 0;
}

/* Desktop icon grid for lesson nodes */
.lesson-icon-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 4px;
}

.lesson-icon {
  width: 70px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid transparent;
  border-radius: 3px;
  cursor: pointer;
  position: relative;
  transition: background 0.1s;
}
.lesson-icon:hover {
  background: rgba(49, 106, 197, 0.15);
  border-color: rgba(49, 106, 197, 0.4);
}
.lesson-icon.selected, .lesson-icon:active {
  background: rgba(49, 106, 197, 0.3);
  border-color: var(--xp-selection);
}

.lesson-icon-img {
  width: 40px; height: 40px;
  border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  position: relative;
  filter: drop-shadow(1px 2px 2px rgba(0,0,0,0.25));
  transition: filter 0.15s;
}
.lesson-icon:hover .lesson-icon-img { filter: drop-shadow(1px 2px 4px rgba(0,0,80,0.3)) brightness(1.05); }

/* State-specific icon styles */
.lesson-icon.completed .lesson-icon-img {
  background: linear-gradient(135deg, #5CDB5C 0%, #2A9A2A 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.4), 0 -1px 0 rgba(0,80,0,0.3);
}
.lesson-icon.active .lesson-icon-img {
  background: linear-gradient(135deg, #5098E0 0%, #1868C0 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.4), 0 0 0 2px rgba(49,106,197,0.5);
  animation: icon-pulse 2s ease-in-out infinite;
}
.lesson-icon.locked .lesson-icon-img {
  background: linear-gradient(135deg, #C8C4BC 0%, #A8A49C 100%);
  filter: grayscale(0.4) brightness(0.8);
  cursor: not-allowed;
}

@keyframes icon-pulse {
  0%, 100% { box-shadow: inset 0 1px 0 rgba(255,255,255,0.4), 0 0 0 2px rgba(49,106,197,0.5); }
  50% { box-shadow: inset 0 1px 0 rgba(255,255,255,0.4), 0 0 0 5px rgba(49,106,197,0.3); }
}

.lesson-icon-check {
  position: absolute;
  bottom: -3px; right: -3px;
  width: 16px; height: 16px;
  background: #3A8C2F;
  border: 1px solid white;
  border-radius: 50%;
  color: white;
  font-size: 9px;
  display: flex; align-items: center; justify-content: center;
  font-weight: bold;
}
.lesson-icon-star {
  position: absolute;
  top: -4px; right: -4px;
  font-size: 12px;
}

.lesson-icon-label {
  font-size: 11px;
  color: white;
  text-align: center;
  line-height: 1.2;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.9), -1px -1px 2px rgba(0,0,0,0.9);
  max-width: 62px;
  word-break: break-word;
}
/* When inside white window body, labels are dark */
.unit-window-body .lesson-icon-label {
  color: var(--text-body);
  text-shadow: none;
}
.unit-window-body .lesson-icon.completed .lesson-icon-label { color: var(--xp-green-dark); }
.unit-window-body .lesson-icon.locked .lesson-icon-label { color: var(--text-muted); }

/* XP Explorer toolbar buttons */
.explorer-toolbar {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 2px 4px;
  background: var(--xp-dialog-bg);
  border-bottom: 1px solid #848284;
}
.explorer-toolbar-btn {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 3px 8px;
  border: 1px solid transparent;
  background: transparent;
  font-family: var(--font-xp);
  font-size: 11px;
  font-weight: bold;
  cursor: pointer;
  border-radius: 2px;
  color: var(--text-body);
}
.explorer-toolbar-btn:hover {
  background: var(--xp-btn-face);
  border-color: #ACA899 #FFFFFF #FFFFFF #ACA899;
}

/* Stats bar (like status bar at bottom of Explorer) */
.desktop-statusbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 3px 12px;
  background: var(--xp-dialog-bg);
  border: 2px solid;
  border-color: #848284 #FFFFFF #FFFFFF #848284;
  font-size: 11px;
  margin-bottom: 4px;
  border-radius: 3px;
  box-shadow: 2px 2px 4px rgba(0,0,0,0.15);
}
.status-item {
  display: flex;
  align-items: center;
  gap: 5px;
  padding-right: 12px;
  border-right: 1px solid #ACA899;
}
.status-item:last-child { border-right: none; }
.status-label { font-size: 11px; color: var(--text-muted); }
.status-value { font-size: 11px; font-weight: bold; color: var(--text-body); }

/* Desktop infinite-practice shortcut */
.desktop-shortcut {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 4px;
  width: 80px;
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: 3px;
  margin: 4px 0;
}
.desktop-shortcut:hover {
  background: rgba(49,106,197,0.2);
  border-color: rgba(49,106,197,0.5);
}
.desktop-shortcut-icon { font-size: 36px; }
.desktop-shortcut-label {
  font-size: 11px;
  color: white;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.9), -1px -1px 2px rgba(0,0,0,0.9);
  text-align: center;
  line-height: 1.2;
}

/* Unit section AI badge */
.ai-badge-inline {
  background: linear-gradient(135deg, #1060A0 0%, #0040A0 100%);
  color: white;
  font-size: 9px;
  font-weight: bold;
  padding: 1px 4px;
  border-radius: 2px;
  letter-spacing: 0.5px;
  border: 1px solid #004090;
}
.ai-badge-node {
  position: absolute;
  bottom: -2px; right: -2px;
  background: #0040A0;
  color: white;
  font-size: 7px;
  padding: 1px 3px;
  font-weight: bold;
  border-radius: 2px;
  border: 1px solid white;
}

/* ══════════════════════════════════════════════════════════════════
   TOP STATS BAR — Modern XP Properties Panel
   Replaces the old titlebar-style top nav. Looks like XP System
   Properties panel (sunken border, white bg) not a window titlebar.
   ══════════════════════════════════════════════════════════════════ */

.top-stats-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: rgba(255,255,255,0.94);
  border: 2px solid;
  border-color: #848284 #FFFFFF #FFFFFF #848284;
  border-radius: 6px;
  margin-bottom: 16px;
  box-shadow: 2px 2px 8px rgba(0,0,60,0.18);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  flex-shrink: 0;
}

.stats-bar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.stats-bar-avatar {
  width: 36px;
  height: 36px;
  border-radius: 4px;
  background: linear-gradient(135deg, #5098E0 0%, #1868C0 100%);
  border: 2px solid;
  border-color: #FFFFFF #848284 #848284 #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: bold;
  color: white;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
  flex-shrink: 0;
}

.stats-bar-name {
  font-size: 13px;
  font-weight: bold;
  color: var(--text-body);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stats-bar-dept {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
}

.stats-bar-divider {
  width: 1px;
  height: 30px;
  background: #ACA899;
  flex-shrink: 0;
}

.stats-bar-chips {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.stat-chip {
  display: flex;
  align-items: center;
  gap: 5px;
  background: #EEF4FF;
  border: 1px solid #C4D4F0;
  border-radius: 12px;
  padding: 4px 10px 4px 8px;
  font-size: 11px;
  font-family: var(--font-xp);
  white-space: nowrap;
  transition: background 0.1s;
}

.stat-chip:hover {
  background: #DDE8FF;
  border-color: #316AC5;
}

.stat-chip .chip-icon {
  font-size: 13px;
  line-height: 1;
}

.stat-chip .chip-val {
  font-weight: bold;
  color: #0A246A;
  font-size: 12px;
}

.stat-chip .chip-label {
  color: var(--text-muted);
  font-size: 10px;
}

.stat-chip.hearts-chip .chip-val { color: #CC0000; }
.stat-chip.hearts-chip.hearts-depleted {
  background: linear-gradient(135deg, #FFF8E0 0%, #FFE8B0 100%);
  border-color: #DAA520;
}
.stat-chip.hearts-chip.hearts-depleted .chip-val { color: #CC4400; }
.stat-chip.hearts-chip.hearts-depleted .chip-icon { filter: none; }

.stat-chip.streak-chip .chip-val { color: #CC4400; }
.stat-chip.xp-chip .chip-val     { color: #0A5E1A; }
.stat-chip.tier-chip {
  background: linear-gradient(135deg, #FFF8E0 0%, #FFF0C0 100%);
  border-color: #DAA520;
}
.stat-chip.tier-chip .chip-val { color: #7A5200; }

/* ══════════════════════════════════════════════════════════════════
   UNIT WINDOWS — More breathing room
   ══════════════════════════════════════════════════════════════════ */

.unit-window {
  margin-bottom: 12px;
}

.unit-window-body {
  padding: 12px 14px;
}

.lesson-icon {
  width: 78px;
}

.lesson-icon-img {
  width: 46px;
  height: 46px;
  font-size: 26px;
}

.lesson-icon-grid {
  gap: 8px;
  padding: 10px 6px;
}

/* Unit progress bar — shown below address bar */
.unit-progress-strip {
  height: 3px;
  background: #E0E0DC;
  position: relative;
  overflow: hidden;
}

.unit-progress-strip-fill {
  height: 100%;
  background: linear-gradient(to right, #2B5FBF, #4A8ADF);
  transition: width 0.6s ease;
}

/* Section headers on dashboard */
.dashboard-section-header {
  font-size: 11px;
  font-weight: bold;
  color: rgba(255,255,255,0.95);
  text-shadow: 1px 1px 3px rgba(0,0,0,0.9);
  margin: 10px 0 6px;
  padding: 0 2px;
  display: flex;
  align-items: center;
  gap: 6px;
  letter-spacing: 0.3px;
}

/* ══════════════════════════════════════════════════════════════════
   LESSON SCREEN — Centered, modern, readable
   ══════════════════════════════════════════════════════════════════ */

.lesson-screen {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 30px);
}

.lesson-content-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  max-width: 660px;
  width: 100%;
  margin: 0 auto;
  padding: 0 0 12px;
}

/* Progress + hearts bar */
.lesson-status-bar {
  background: rgba(255,255,255,0.92);
  border: 2px solid;
  border-color: #848284 #FFFFFF #FFFFFF #848284;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  backdrop-filter: blur(8px);
}

.lesson-progress-wrap {
  flex: 1;
}

.lesson-progress-label {
  font-size: 10px;
  font-weight: bold;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.lesson-hearts-row {
  display: flex;
  align-items: center;
  gap: 3px;
}

.heart {
  font-size: 18px;
  line-height: 1;
  transition: opacity 0.2s, filter 0.2s;
}

.heart.lost {
  opacity: 0.25;
  filter: grayscale(1);
}

/* Question card */
.question-card {
  background: var(--xp-dialog-bg);
  border: 2px solid;
  border-color: #FFFFFF #848284 #848284 #FFFFFF;
  outline: 1px solid #0054E3;
  border-radius: 0 0 6px 6px;
  overflow: hidden;
  flex-shrink: 0;
}

.q-titlebar {
  height: 20px;
  background: linear-gradient(to bottom, #404040 0%, #606060 50%, #404040 100%);
  display: flex;
  align-items: center;
  padding: 0 6px;
  gap: 4px;
}

.q-titlebar-icon { font-size: 11px; }

.q-titlebar-text {
  font-size: 10px;
  font-weight: bold;
  color: rgba(255,255,255,0.85);
  font-family: var(--font-xp);
  text-shadow: 1px 1px 1px rgba(0,0,0,0.6);
}

.q-body {
  padding: 20px 22px;
  background: white;
  border-top: 2px solid;
  border-color: #848284 white white #848284;
}

.question-type-label {
  font-size: 10px;
  font-weight: bold;
  color: var(--xp-blue);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 10px;
  padding: 2px 8px;
  background: #EEF4FF;
  border: 1px solid #C4D4F0;
  border-radius: 3px;
  display: inline-block;
}

.question-text {
  font-size: 15px;
  font-weight: bold;
  color: var(--text-body);
  margin-bottom: 16px;
  line-height: 1.4;
}

.question-context {
  background: #F0F4FF;
  border: 1px solid #C4D0E8;
  border-left: 3px solid #316AC5;
  padding: 8px 12px;
  font-size: 12px;
  margin-bottom: 14px;
  border-radius: 0 3px 3px 0;
}

.options-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.option-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  background: white;
  border: 2px solid;
  border-color: #FFFFFF #848284 #848284 #FFFFFF;
  outline: 1px solid #ACA899;
  border-radius: 3px;
  font-family: var(--font-xp);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  transition: all 0.1s;
  border-left: 4px solid transparent;
  outline: 1px solid #ACA899;
}

.option-btn:hover:not(:disabled) {
  background: #F0F4FF;
  border-color: var(--xp-selection);
  border-left-color: var(--xp-selection-bg);
  outline-color: var(--xp-selection);
}

.option-btn.selected {
  background: #EEF4FF;
  border-color: var(--xp-selection);
  border-left-color: var(--xp-selection-bg);
  outline-color: var(--xp-selection);
  font-weight: bold;
}

.option-btn.correct {
  background: #E8F8E8;
  border-color: #3A8C2F;
  border-left-color: #3A8C2F;
  outline-color: #3A8C2F;
  color: #1F6016;
  font-weight: bold;
}

.option-btn.incorrect {
  background: #FFF0F0;
  border-color: var(--xp-red);
  border-left-color: var(--xp-red);
  outline-color: var(--xp-red);
  color: var(--xp-red);
  text-decoration: line-through;
}

.option-key {
  width: 22px;
  height: 22px;
  border-radius: 3px;
  background: var(--xp-dialog-bg);
  border: 1px solid #ACA899;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: bold;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* Feedback strip */
.lesson-footer {
  flex-shrink: 0;
  background: rgba(255,255,255,0.92);
  border: 2px solid;
  border-color: #848284 #FFFFFF #FFFFFF #848284;
  border-top: none;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  backdrop-filter: blur(8px);
}

.feedback-inline {
  border: 2px solid;
  padding: 10px 12px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border-radius: 3px;
  animation: feedbackSlideUp 0.18s ease-out;
}

@keyframes feedbackSlideUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.feedback-correct {
  background: #E8F8E8;
  border-color: #FFFFFF #3A8C2F #3A8C2F #FFFFFF;
  outline: 1px solid #3A8C2F;
}

.feedback-wrong {
  background: #FFF0F0;
  border-color: #FFFFFF var(--xp-red) var(--xp-red) #FFFFFF;
  outline: 1px solid var(--xp-red);
}

.fb-icon  { font-size: 20px; flex-shrink: 0; }

.fb-title {
  font-size: 13px;
  font-weight: bold;
  color: var(--text-body);
}

.fb-explain {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 3px;
}

/* ── Question type pills (replace old type label) ── */
.question-type-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  padding: 3px 10px 3px 8px;
  border-radius: 12px;
  border: 1px solid transparent;
  margin-bottom: 12px;
}
.pill-mc        { background: #EEF4FF; color: #0A4ACC; border-color: #C4D4F0; }
.pill-fill      { background: #FFF8E8; color: #7A4800; border-color: #E8C87A; }
.pill-translate { background: #F0ECF8; color: #5A2880; border-color: #C8A8E8; }
.pill-match     { background: #E8F8EC; color: #1A6A2A; border-color: #90D0A0; }
.pill-wordbank  { background: #E8F4FF; color: #005090; border-color: #90C8F0; }
.pill-reorder   { background: #FFF0E8; color: #8A3800; border-color: #F0A870; }
.pill-type      { background: #ECF8EC; color: #1A6E1A; border-color: #8ACA8A; }
.pill-tf        { background: #F8ECF8; color: #6A1A6A; border-color: #C890C8; }

/* ── Coloured question card titlebar per type ── */
.q-titlebar { height: 22px; display: flex; align-items: center; padding: 0 8px; gap: 5px; }
.q-titlebar-multiple_choice { background: linear-gradient(to bottom, #2850A0 0%, #1A3890 100%); }
.q-titlebar-fill_blank      { background: linear-gradient(to bottom, #9A7010 0%, #7A5200 100%); }
.q-titlebar-translate       { background: linear-gradient(to bottom, #6030A0 0%, #4A1A80 100%); }
.q-titlebar-match_pairs     { background: linear-gradient(to bottom, #208040 0%, #106030 100%); }
.q-titlebar-word_bank       { background: linear-gradient(to bottom, #0070C0 0%, #0050A0 100%); }
.q-titlebar-reorder         { background: linear-gradient(to bottom, #C05010 0%, #903800 100%); }
.q-titlebar-type_answer     { background: linear-gradient(to bottom, #208020 0%, #106010 100%); }
.q-titlebar-true_false      { background: linear-gradient(to bottom, #8020A0 0%, #601080 100%); }

/* ── Fill in the blank highlight ── */
.fill-blank-slot {
  display: inline-block;
  background: #FFF3C0;
  border-bottom: 2.5px solid #C09000;
  color: #7A5800;
  font-weight: bold;
  padding: 0 6px;
  border-radius: 2px;
  letter-spacing: 2px;
}
.fill-opt { border-left: 4px solid #C09000; }
.fill-opt.selected { border-left-color: var(--xp-selection-bg); }
.fill-opt.correct  { border-left-color: #3A8C2F !important; }
.fill-opt.incorrect { border-left-color: var(--xp-red) !important; }
.fill-key {
  width: 22px; height: 22px; border-radius: 3px;
  background: #FFF8E0; border: 1px solid #C09000;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: bold; color: #7A5800; flex-shrink: 0;
}

/* ── Translate speech bubbles ── */
.translate-bubble {
  border-radius: 6px;
  padding: 14px 16px;
  margin-bottom: 12px;
  position: relative;
  border: 1px solid transparent;
}
.translate-bubble-plain {
  background: linear-gradient(135deg, #F8F8F0 0%, #EFF0E8 100%);
  border-color: #C8C8B0;
}
.translate-bubble-corp {
  background: linear-gradient(135deg, #EEF2F8 0%, #E0E8F4 100%);
  border-color: #90A8C8;
}
.translate-bubble-label {
  font-size: 9px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.translate-bubble-text {
  font-size: 14px;
  font-style: italic;
  color: var(--text-body);
  line-height: 1.5;
}
.translate-arrow {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 10px;
  text-align: center;
  letter-spacing: 0.3px;
}

/* ── Match pairs ── */
.match-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 4px;
}
.match-col { display: flex; flex-direction: column; gap: 6px; }
.match-col-header {
  font-size: 9px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--text-muted);
  padding: 4px 6px;
  background: var(--xp-dialog-bg);
  border-bottom: 1px solid #D0CEC8;
  margin-bottom: 4px;
}
.match-item {
  padding: 9px 12px;
  background: white;
  border: 2px solid;
  border-color: #FFFFFF #848284 #848284 #FFFFFF;
  outline: 1px solid #ACA899;
  border-radius: 3px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.1s;
  text-align: center;
}
.match-item.term        { border-left: 3px solid #206090; }
.match-item.definition  { border-left: 3px solid #208040; }
.match-item:hover       { background: #F0F4FF; border-color: var(--xp-selection); outline-color: var(--xp-selection); }
.match-item.selected    { background: #EEF4FF; border-color: var(--xp-selection); outline-color: var(--xp-selection); font-weight: bold; }
.match-item.matched     { background: #E8F8E8; border-color: #3A8C2F; outline-color: #3A8C2F; color: #1F6016; cursor: default; }
.match-item.mismatched  { background: #FFF0F0; border-color: var(--xp-red); outline-color: var(--xp-red); }

/* ── Word Bank & Reorder ── */
.word-bank-answer-row {
  min-height: 52px;
  background: #FAFAF8;
  border: 2px dashed #B8B0A0;
  border-radius: 4px;
  padding: 8px 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-bottom: 0;
  transition: border-color 0.15s;
}
.word-bank-answer-row:has(.word-bubble.placed) {
  border-style: solid;
  border-color: #316AC5;
  background: #F4F8FF;
}
.word-bank-placeholder {
  font-size: 12px;
  color: #ACA899;
  font-style: italic;
  pointer-events: none;
}
.word-bank-divider {
  height: 1px;
  background: #D0CEC8;
  margin: 12px 0;
  position: relative;
}
.word-bank-divider::after {
  content: 'Word Bank';
  position: absolute;
  top: -9px;
  left: 50%;
  transform: translateX(-50%);
  background: white;
  padding: 0 8px;
  font-size: 9px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--text-muted);
}
.word-bank-pool {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  min-height: 40px;
}
.word-bubble {
  display: inline-flex;
  align-items: center;
  padding: 6px 13px;
  background: white;
  border: 2px solid;
  border-color: #FFFFFF #848284 #848284 #FFFFFF;
  outline: 1px solid #ACA899;
  border-radius: 16px;
  font-family: var(--font-xp);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.12s;
  font-weight: 600;
}
.word-bubble:hover:not(:disabled):not(.used) {
  background: #EEF4FF;
  border-color: var(--xp-selection);
  outline-color: var(--xp-selection);
  transform: translateY(-1px);
}
.word-bubble.used {
  opacity: 0.28;
  cursor: default;
  pointer-events: none;
}
.word-bubble.placed {
  background: #EEF4FF;
  border-color: var(--xp-selection);
  outline-color: var(--xp-selection);
  color: #0A246A;
}
.word-bubble.placed:hover {
  background: #FFE8E8;
  border-color: var(--xp-red);
  outline-color: var(--xp-red);
  color: var(--xp-red);
  transform: translateY(-1px);
}
.word-bubble.placed-correct {
  background: #E8F8E8 !important;
  border-color: #3A8C2F !important;
  outline-color: #3A8C2F !important;
  color: #1F6016 !important;
}
.word-bubble.placed-wrong {
  background: #FFF0F0 !important;
  border-color: var(--xp-red) !important;
  outline-color: var(--xp-red) !important;
  color: var(--xp-red) !important;
}

/* ── Type the Answer ── */
.type-answer-wrap { display: flex; flex-direction: column; gap: 6px; }
.type-answer-input {
  width: 100%;
  padding: 12px 14px;
  font-size: 15px;
  font-family: var(--font-xp);
  font-weight: bold;
  border: 2px solid;
  border-color: #848284 #FFFFFF #FFFFFF #848284;
  outline: 2px solid #ACA899;
  border-radius: 3px;
  background: white;
  color: var(--text-body);
  box-sizing: border-box;
  transition: outline-color 0.12s, border-color 0.12s;
}
.type-answer-input:focus {
  outline-color: var(--xp-selection-bg);
  border-color: var(--xp-selection);
}
.type-answer-input:disabled {
  background: #F0F0EC;
  color: var(--text-muted);
}
.type-answer-hint {
  font-size: 10px;
  color: var(--text-muted);
  text-align: right;
  font-style: italic;
}

/* ── True or False ── */
.tf-statement-box {
  background: linear-gradient(135deg, #F8F4FF 0%, #F0EAFF 100%);
  border: 1px solid #C0A0E0;
  border-radius: 6px;
  padding: 16px 20px 16px 14px;
  margin-bottom: 20px;
  position: relative;
}
.tf-quote-mark {
  font-size: 48px;
  line-height: 0.8;
  color: #C0A0E0;
  font-family: Georgia, serif;
  position: absolute;
  top: 8px;
  left: 10px;
  user-select: none;
}
.tf-statement-text {
  font-size: 14px;
  font-weight: bold;
  color: var(--text-body);
  line-height: 1.5;
  padding-left: 26px;
  margin: 0;
}
.tf-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.tf-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 20px 12px;
  border: 2px solid;
  border-radius: 6px;
  cursor: pointer;
  font-family: var(--font-xp);
  transition: all 0.12s;
  border-color: #FFFFFF #848284 #848284 #FFFFFF;
  outline: 1px solid #ACA899;
}
.tf-true  { background: #F0FFF0; }
.tf-false { background: #FFF4F4; }
.tf-btn:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 3px 8px rgba(0,0,0,0.12); }
.tf-btn.selected.tf-true  { background: #D0F8D0; border-color: #3A8C2F; outline-color: #3A8C2F; }
.tf-btn.selected.tf-false { background: #FFD8D8; border-color: var(--xp-red); outline-color: var(--xp-red); }
.tf-btn.tf-correct { background: #E8F8E8 !important; border-color: #3A8C2F !important; outline-color: #3A8C2F !important; }
.tf-btn.tf-wrong   { background: #FFF0F0 !important; border-color: var(--xp-red) !important; outline-color: var(--xp-red) !important; }
.tf-btn:disabled { cursor: default; transform: none; }
.tf-btn-icon { font-size: 28px; }
.tf-btn-label { font-size: 14px; font-weight: bold; color: var(--text-body); }

/* ══════════════════════════════════════════════════════════════════
   LEADERBOARD — Modern cards with XP Explorer chrome
   ══════════════════════════════════════════════════════════════════ */

.leaderboard-screen {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 16px;
}

.lb-my-rank-banner {
  background: linear-gradient(to right, #EEF4FF, #E0ECFF);
  border: 2px solid;
  border-color: #FFFFFF #316AC5 #316AC5 #FFFFFF;
  outline: 1px solid #316AC5;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 4px;
  font-family: var(--font-xp);
}

.lb-my-rank-number {
  font-size: 28px;
  font-weight: bold;
  color: #0A246A;
  line-height: 1;
  min-width: 40px;
}

.lb-my-rank-label {
  font-size: 11px;
  color: var(--text-muted);
}

.lb-my-rank-name {
  font-size: 13px;
  font-weight: bold;
  color: var(--text-body);
}

/* Leaderboard rows as cards */
.lb-row {
  display: grid;
  grid-template-columns: 42px 1fr auto auto;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: white;
  border: 1px solid #E0DED8;
  border-left: 4px solid transparent;
  border-radius: 3px;
  margin-bottom: 4px;
  transition: all 0.12s;
  animation: lbRowIn 0.2s ease-out both;
}

@keyframes lbRowIn {
  from { opacity: 0; transform: translateX(-6px); }
  to   { opacity: 1; transform: translateX(0); }
}

.lb-row:hover { background: #FAFAFE; border-left-color: var(--xp-selection-bg); }

.lb-row.is-user {
  background: #EEF4FF;
  border-color: #C4D4F0;
  border-left-color: #316AC5;
}

.lb-row.rank-gold   { border-left-color: #DAA520; }
.lb-row.rank-silver { border-left-color: #A0A0A0; }
.lb-row.rank-bronze { border-left-color: #CD7F32; }

.lb-rank {
  font-size: 18px;
  font-weight: bold;
  color: var(--text-muted);
  text-align: center;
  min-width: 28px;
}

.lb-rank.gold   { color: #DAA520; font-size: 22px; }
.lb-rank.silver { color: #909090; font-size: 20px; }
.lb-rank.bronze { color: #CD7F32; font-size: 18px; }

.lb-avatar-name {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.lb-avatar {
  width: 32px;
  height: 32px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: bold;
  border: 1px solid rgba(0,0,0,0.1);
  flex-shrink: 0;
}

.lb-name {
  font-size: 13px;
  font-weight: bold;
  color: var(--text-body);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lb-dept-tier {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
}

.lb-xp-col {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  min-width: 90px;
}

.lb-xp-value {
  font-size: 13px;
  font-weight: bold;
  color: #0A246A;
}

.lb-xp-bar {
  width: 80px;
  height: 6px;
  background: #E0E0DC;
  border-radius: 3px;
  overflow: hidden;
}

.lb-xp-fill {
  height: 100%;
  background: linear-gradient(to right, #2B5FBF, #5090E0);
  border-radius: 3px;
  transition: width 0.6s ease;
}

.lb-tier-badge {
  font-size: 18px;
  text-align: center;
}

/* Explorer column headers */
.explorer-col-headers {
  display: grid;
  grid-template-columns: 42px 1fr auto auto;
  gap: 10px;
  padding: 4px 14px 4px;
  border-bottom: 1px solid #ACA899;
  background: var(--xp-dialog-bg);
}

.explorer-col-hdr {
  font-size: 11px;
  font-weight: bold;
  color: var(--text-muted);
  padding: 3px 0;
  cursor: default;
  user-select: none;
  border-right: 1px solid #C8C4BC;
  padding-right: 6px;
}

.explorer-col-hdr:last-child { border-right: none; }

.leaderboard-explorer {
  padding: 8px 8px 4px;
  background: white;
  min-height: 200px;
}

/* Leaderboard live badge */
.live-badge {
  font-size: 9px;
  font-weight: bold;
  background: #D0F0D0;
  color: #1A6E1A;
  padding: 1px 4px;
  border-radius: 2px;
  border: 1px solid #1A6E1A;
  margin-left: 4px;
  vertical-align: middle;
}

/* ══════════════════════════════════════════════════════════════════
   RESULT SCREEN TWEAKS
   ══════════════════════════════════════════════════════════════════ */

.result-screen {
  max-width: 600px;
  width: 100%;
  margin: 16px auto 0;
  padding: 0 0 16px;
}

/* ══════════════════════════════════════════════════════════════════
   PROFILE SCREEN TWEAKS
   ══════════════════════════════════════════════════════════════════ */

.profile-screen {
  max-width: 600px;
  width: 100%;
  margin: 16px auto 0;
  padding: 0 0 16px;
}

/* ══════════════════════════════════════════════════════════════════
   MODAL OVERLAY — Fixed viewport centering
   ══════════════════════════════════════════════════════════════════ */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: modalFadeIn 0.12s ease-out;
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.modal-card {
  width: 100%;
  max-width: 400px;
  animation: xp-dialog-appear 0.15s ease-out;
}

.modal-titlebar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 4px 0 6px;
  height: 28px;
  flex-shrink: 0;
}

.modal-titlebar-icon { font-size: 14px; flex-shrink: 0; }

.modal-titlebar-text {
  flex: 1;
  font-size: 12px;
  font-weight: bold;
  color: white;
  font-family: var(--font-xp);
  text-shadow: 1px 1px 1px rgba(0,0,0,0.4);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.modal-body-area {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 20px 14px;
}

.modal-text-area { flex: 1; }

.modal-body {
  font-size: 12px;
  line-height: 1.55;
  color: var(--text-body);
  font-family: var(--font-xp);
}

.modal-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 8px 16px 14px;
  border-top: 1px solid #ACA899;
}

/* Heart cooldown timer display */
.heart-timer {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 8px 12px;
  background: #FFF8E8;
  border: 1px solid #DAA520;
  border-radius: 3px;
  font-size: 12px;
  color: #7A5200;
  font-family: var(--font-xp);
}

.heart-timer-countdown {
  font-size: 15px;
  font-weight: bold;
  color: #CC4400;
  font-variant-numeric: tabular-nums;
  min-width: 44px;
  text-align: center;
}

/* ══════════════════════════════════════════════════════════════════
   DESKTOP ICON LAYER & ICONS
   ══════════════════════════════════════════════════════════════════ */

#app {
  position: relative;
}

.desktop-icon-layer {
  max-width: none !important;
  padding: 0 !important;
  width: 100vw !important;
  height: calc(100vh - 30px);
  position: relative;
  overflow: hidden;
}

.desktop-icons-col {
  position: absolute;
  top: 16px;
  left: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.desktop-icon {
  width: 72px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px 4px;
  cursor: pointer;
  border-radius: 2px;
  user-select: none;
  -webkit-user-select: none;
  transition: background 0.1s;
}

.desktop-icon:hover .desktop-icon-img {
  filter: brightness(1.1) drop-shadow(0 0 6px rgba(80,160,255,0.6));
}

.desktop-icon.selected {
  background: rgba(49,106,197,0.5);
  outline: 1px dotted rgba(255,255,255,0.7);
}

.desktop-icon-img {
  font-size: 56px;
  line-height: 1;
  filter: drop-shadow(1px 2px 3px rgba(0,0,0,0.5));
  transition: filter 0.15s;
}

.desktop-icon-label {
  font-family: var(--font-xp);
  font-size: 11px;
  color: white;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.9), -1px -1px 2px rgba(0,0,0,0.9),
               1px -1px 2px rgba(0,0,0,0.9), -1px 1px 2px rgba(0,0,0,0.9);
  text-align: center;
  line-height: 1.3;
  word-break: break-word;
  max-width: 70px;
}

/* Coming-soon icon — used for gated apps (e.g. CorpLingo for non-admins) */
#dicon-corplingo-soon .desktop-icon-img {
  filter: grayscale(1) opacity(0.6) drop-shadow(1px 2px 3px rgba(0,0,0,0.5));
}
#dicon-corplingo-soon .desktop-icon-label {
  opacity: 0.8;
}
#dicon-corplingo-soon:hover .desktop-icon-img {
  filter: grayscale(0.7) opacity(0.75) drop-shadow(0 0 6px rgba(80,160,255,0.4));
}



/* ══════════════════════════════════════════════════════════════════
   DRAGGABLE APP WINDOWS
   ══════════════════════════════════════════════════════════════════ */

.app-window {
  position: absolute;
  min-width: 300px;
  min-height: 200px;
  background: var(--xp-dialog-bg);
  border: 2px solid;
  border-color: #FFFFFF #848284 #848284 #FFFFFF;
  outline: 1px solid #0054E3;
  box-shadow: 2px 2px 8px rgba(0,0,0,0.4), inset 0 0 0 1px rgba(255,255,255,0.5);
  border-radius: 6px 6px 0 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: xp-window-open 0.18s ease-out;
}

.app-window-titlebar {
  height: 28px;
  background: linear-gradient(to bottom,
    #0A246A 0%, #3A6EA5 4%, #2E7EC0 6%, #1F74D0 10%,
    #2F8FD5 30%, #2F8FD5 50%, #2781C4 55%,
    #2275BA 60%, #215BAB 70%, #1B52A5 90%
  );
  display: flex;
  align-items: center;
  padding: 0 4px;
  gap: 5px;
  cursor: move;
  user-select: none;
  flex-shrink: 0;
}

.app-window-tb-icon { font-size: 15px; flex-shrink: 0; }

.app-window-tb-title {
  flex: 1;
  font-family: var(--font-xp);
  font-size: 12px;
  font-weight: bold;
  color: white;
  text-shadow: 1px 1px 2px rgba(0,0,80,0.6);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-window-tb-btns {
  display: flex;
  gap: 2px;
  flex-shrink: 0;
}

.app-window-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  background: var(--xp-dialog-bg);
}

.app-window-loading {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px;
  gap: 12px;
}

/* ══════════════════════════════════════════════════════════════════
   CORPLINGO APP SHELL (inside window)
   ══════════════════════════════════════════════════════════════════ */

.cl-app-shell {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

.cl-toolbar {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 4px 8px;
  background: var(--xp-dialog-bg);
  border-bottom: 2px solid;
  border-color: #848284 white white #848284;
  flex-shrink: 0;
}

.cl-toolbar-brand {
  display: flex;
  align-items: center;
  gap: 5px;
  padding-right: 10px;
}
.cl-brand-icon { font-size: 18px; }
.cl-brand-name {
  font-size: 13px;
  font-weight: bold;
  color: var(--xp-blue);
  font-style: italic;
  letter-spacing: -0.3px;
}

.cl-toolbar-sep {
  width: 2px;
  height: 22px;
  background: linear-gradient(to bottom, #848284, white);
  margin: 0 8px;
  flex-shrink: 0;
}

.cl-nav-buttons {
  display: flex;
  gap: 2px;
}

.cl-nav-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  background: var(--xp-btn-face);
  border: 1px solid transparent;
  border-radius: 2px;
  font-family: var(--font-xp);
  font-size: 11px;
  cursor: pointer;
  transition: all 0.1s;
  color: var(--text-body);
}
.cl-nav-btn:hover {
  background: #E8F0FF;
  border-color: var(--xp-selection);
}
.cl-nav-btn.active {
  background: white;
  border-color: #848284;
  box-shadow: inset 1px 1px 2px rgba(0,0,0,0.15);
  font-weight: bold;
}
.cl-nav-icon { font-size: 13px; }

.cl-toolbar-xp-chip {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  background: linear-gradient(to bottom, #FFF0C0, #F0D060);
  border: 1px solid #C08000;
  border-radius: 2px;
  font-size: 11px;
  font-weight: bold;
  color: #7A5A00;
  white-space: nowrap;
}

.cl-app-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0;
  min-height: 0;
  background: var(--xp-dialog-bg);
}

/* Ensure CorpLingo screens fill the CL content area properly */
.cl-app-content .desktop-screen,
.cl-app-content .profile-screen,
.cl-app-content .leaderboard-screen,
.cl-app-content .result-screen,
.cl-app-content .lesson-screen {
  min-height: 0;
  height: auto;
}

/* ══════════════════════════════════════════════════════════════════
   LANDING PAGE — PUBLIC (IE6 CHROME + PAGE CONTENT)
   ══════════════════════════════════════════════════════════════════ */

.landing-public {
  width: 100vw;
  min-height: calc(100vh - 30px);
  max-width: none !important;
  padding: 0 !important;
  display: flex;
  flex-direction: column;
}

/* ── IE6 Chrome ── */
.ie-chrome {
  background: #ECE9D8;
  border-bottom: 2px solid #848284;
  flex-shrink: 0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.ie-menubar {
  display: flex;
  gap: 0;
  padding: 2px 4px;
  background: var(--xp-dialog-bg);
  border-bottom: 1px solid #ACA899;
}
.ie-menubar span {
  padding: 2px 10px;
  font-size: 11px;
  font-family: var(--font-xp);
  color: var(--text-body);
  cursor: pointer;
}
.ie-menubar span:hover { background: var(--xp-selection-bg); color: white; }

.ie-toolbar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 4px;
  background: var(--xp-dialog-bg);
}

.ie-btn {
  padding: 2px 8px;
  background: var(--xp-btn-face);
  border: 1px solid transparent;
  border-radius: 2px;
  font-size: 11px;
  font-family: var(--font-xp);
  cursor: pointer;
  color: var(--text-body);
  transition: all 0.1s;
  white-space: nowrap;
}
.ie-btn:hover {
  border-color: var(--xp-selection);
  background: #EEF4FF;
}

.ie-sep {
  width: 2px; height: 22px;
  background: linear-gradient(to bottom, #848284, white);
  margin: 0 2px;
  flex-shrink: 0;
}

.ie-address-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  background: white;
  border: 2px solid;
  border-color: #848284 #FFFFFF #FFFFFF #848284;
  padding: 1px 4px;
  font-size: 11px;
  font-family: var(--font-xp);
}
.ie-address-label {
  color: var(--text-muted);
  font-weight: bold;
  padding-right: 4px;
  border-right: 1px solid #ACA899;
  margin-right: 2px;
  white-space: nowrap;
}
.ie-address-input { flex: 1; color: var(--text-body); }

.ie-go-btn {
  padding: 1px 8px;
  background: var(--xp-btn-face);
  border: 1px solid #848284;
  font-size: 11px;
  cursor: pointer;
  font-family: var(--font-xp);
}
.ie-go-btn:hover { background: #E8F0FF; }

/* ── Landing page body ── */
.landing-page-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 20px 40px;
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
}

/* Section headers (Explorer style) */
.section-header-xp {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
  margin: 20px 0 10px;
  font-size: 12px;
  font-family: var(--font-xp);
  font-weight: bold;
  color: var(--text-muted);
  border-bottom: 1px solid #ACA899;
}
.folder-icon { font-size: 14px; }

/* ── Hero Section ── */
.landing-hero-section {
  background: rgba(255,255,255,0.12);
  border: 2px solid;
  border-color: rgba(255,255,255,0.6) rgba(0,0,0,0.2) rgba(0,0,0,0.2) rgba(255,255,255,0.6);
  border-radius: 4px;
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
  backdrop-filter: blur(8px);
  margin-bottom: 8px;
}

.hero-windows-logo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  width: 52px; height: 52px;
}
.hero-pane {
  border-radius: 2px;
  animation: boot-pane-glow 3s ease-in-out infinite;
}
.hero-pane:nth-child(1) { background: #FF4444; animation-delay: 0s; }
.hero-pane:nth-child(2) { background: #44CC44; animation-delay: 0.3s; }
.hero-pane:nth-child(3) { background: #4444FF; animation-delay: 0.6s; }
.hero-pane:nth-child(4) { background: #FFAA00; animation-delay: 0.9s; }

.hero-wordmark {
  line-height: 1;
}
.hero-title {
  font-family: 'Trebuchet MS', var(--font-xp);
  font-size: 42px;
  font-style: italic;
  color: white;
  text-shadow: 2px 2px 8px rgba(0,0,0,0.7), 0 0 30px rgba(80,160,255,0.4);
  letter-spacing: 1px;
}
.hero-xp {
  font-weight: bold;
  color: #7AE0FF;
}
.hero-edition {
  font-size: 11px;
  color: rgba(255,255,255,0.6);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-top: 3px;
}
.hero-tagline {
  font-size: 13px;
  color: rgba(255,255,255,0.85);
  line-height: 1.5;
  max-width: 500px;
}

/* Social buttons */
.hero-social-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.social-btn-xp {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px;
  text-decoration: none;
  border-radius: 3px;
  font-family: var(--font-xp);
  font-size: 12px;
  border: 2px solid;
  transition: filter 0.1s, transform 0.1s;
  cursor: pointer;
}
.social-btn-xp:hover { filter: brightness(1.1); transform: translateY(-1px); }
.social-btn-xp:active { filter: brightness(0.9); transform: translateY(0); }

.social-btn-xp.yt {
  background: linear-gradient(to bottom, #EE3333, #CC0000);
  border-color: #FF8080 #880000 #880000 #FF8080;
  color: white;
  text-shadow: 0 1px 1px rgba(0,0,0,0.5);
}
.social-btn-xp.ig {
  background: linear-gradient(to bottom, #9B59B6, #7D3C8A);
  border-color: #C89EE0 #4A1060 #4A1060 #C89EE0;
  color: white;
  text-shadow: 0 1px 1px rgba(0,0,0,0.5);
  opacity: 0.75;
}
.social-icon { font-size: 18px; }
.social-label { font-weight: bold; }
.social-sub { font-size: 10px; opacity: 0.8; }

/* Sign-in balloon */
.signin-balloon {
  background: #FFFFD0;
  border: 2px solid;
  border-color: white #ACA899 #ACA899 white;
  outline: 1px solid #848284;
  border-radius: 4px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  max-width: 480px;
  width: 100%;
  transition: filter 0.1s;
  box-shadow: 2px 2px 6px rgba(0,0,0,0.2);
}
.signin-balloon:hover { filter: brightness(0.97); }

.balloon-icon { font-size: 24px; flex-shrink: 0; }
.balloon-text { font-size: 11px; font-family: var(--font-xp); color: var(--text-body); line-height: 1.4; flex: 1; }
.signin-balloon-btn { flex-shrink: 0; }

/* ── Windows Media Player ── */
.wmp-container {
  background: #1A1A1A;
  border: 2px solid;
  border-color: #444 #111 #111 #444;
  border-radius: 4px 4px 0 0;
  overflow: hidden;
  box-shadow: 2px 2px 8px rgba(0,0,0,0.5);
  margin-bottom: 4px;
}

.wmp-titlebar {
  height: 22px;
  background: linear-gradient(to bottom, #3A3A3A, #1A1A1A);
  display: flex;
  align-items: center;
  padding: 0 6px;
  border-bottom: 1px solid #444;
}
.wmp-logo { flex: 1; font-size: 11px; font-family: var(--font-xp); color: #CCC; }
.wmp-window-btns { display: flex; gap: 2px; }
.wmp-caption-btn {
  width: 14px; height: 14px;
  background: #555;
  border: 1px solid #333;
  font-size: 8px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: #CCC;
  border-radius: 1px;
}
.wmp-caption-btn.close { background: #883333; }

.wmp-body { display: flex; flex-direction: column; }

.wmp-video-area {
  background: #000;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.wmp-static-lines {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(255,255,255,0.02) 2px,
    rgba(255,255,255,0.02) 4px
  );
  pointer-events: none;
}

.wmp-play-overlay {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  z-index: 1;
  padding: 20px;
  text-align: center;
}
.wmp-play-btn {
  width: 56px; height: 56px;
  background: rgba(255,255,255,0.15);
  border: 2px solid rgba(255,255,255,0.4);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  color: white;
  transition: background 0.15s;
}
.wmp-play-overlay:hover .wmp-play-btn { background: rgba(255,255,255,0.25); }
.wmp-file-label { font-size: 12px; color: #CFCFCF; font-family: var(--font-xp); }
.wmp-sub-label { font-size: 10px; color: #888; font-family: var(--font-xp); }

.wmp-controls {
  background: #222;
  padding: 6px 8px;
  border-top: 1px solid #444;
}
.wmp-progress-track {
  height: 6px;
  background: #444;
  border-radius: 3px;
  margin-bottom: 6px;
  overflow: hidden;
}
.wmp-progress-fill {
  height: 100%;
  background: linear-gradient(to right, #2080D8, #40A0F0);
  transition: width 1s linear;
}
.wmp-ctrl-row {
  display: flex;
  align-items: center;
  gap: 4px;
}
.wmp-ctrl-btn {
  width: 24px; height: 22px;
  background: #333;
  border: 1px solid #555;
  border-radius: 2px;
  color: #DDD;
  cursor: pointer;
  font-size: 11px;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.1s;
}
.wmp-ctrl-btn:hover { background: #444; }
.wmp-time { font-size: 10px; color: #AAA; font-family: var(--font-xp); margin-left: 4px; }

/* ── Project Cards ── */
.projects-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.project-card {
  background: var(--xp-dialog-bg);
  transition: box-shadow 0.2s;
}
.project-card:hover {
  box-shadow: 3px 3px 10px rgba(0,0,0,0.4);
}

.project-card-body {
  padding: 16px;
  background: white;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.project-icon { font-size: 36px; }
.project-name { font-size: 15px; font-weight: bold; color: var(--text-body); }
.project-desc { font-size: 11px; color: var(--text-muted); line-height: 1.5; }
.project-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.project-tag {
  background: #E8F0FF;
  border: 1px solid #B0C8F0;
  padding: 2px 8px;
  font-size: 10px;
  border-radius: 2px;
  color: var(--xp-blue);
}
.project-launch-btn { margin-top: 4px; }

.coming-soon { opacity: 0.8; }
.coming-soon-badge {
  display: inline-block;
  background: #F0E8C0;
  border: 1px solid #C0A000;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: bold;
  color: #805000;
  border-radius: 2px;
  text-align: center;
  width: 100%;
}

/* ── About / Footer bar ── */
.landing-about-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 4px;
  margin-top: 16px;
}
.about-windows-flag {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  width: 28px; height: 28px;
  flex-shrink: 0;
}
.about-windows-flag .wp { border-radius: 1px; }
.about-windows-flag .wp:nth-child(1) { background: #FF4444; }
.about-windows-flag .wp:nth-child(2) { background: #44CC44; }
.about-windows-flag .wp:nth-child(3) { background: #4444FF; }
.about-windows-flag .wp:nth-child(4) { background: #FFAA00; }

.about-text {
  flex: 1;
  font-size: 11px;
  color: rgba(255,255,255,0.8);
  line-height: 1.4;
}
.about-links {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
}
.about-links a { color: #90C8FF; text-decoration: underline; cursor: pointer; }
.about-links a:hover { color: white; }
.about-links span { color: rgba(255,255,255,0.4); }

/* ══════════════════════════════════════════════════════════════════
   CORPORATE BINGO
   ══════════════════════════════════════════════════════════════════ */

.bingo-app {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--xp-dialog-bg);
}

.bingo-header { text-align: center; }
.bingo-title-letters {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-bottom: 4px;
}
.bl {
  width: 28px; height: 28px;
  background: linear-gradient(to bottom, #1A60C0, #0A40A0);
  border: 2px solid;
  border-color: #5090E0 #082070 #082070 #5090E0;
  border-radius: 3px;
  display: flex; align-items: center; justify-content: center;
  color: white;
  font-size: 16px;
  font-weight: bold;
  font-family: 'Trebuchet MS', var(--font-xp);
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.bingo-subtitle { font-size: 11px; color: var(--text-muted); }

.bingo-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 3px;
  background: #848284;
  border: 2px solid #848284;
}

.bingo-cell {
  background: white;
  padding: 6px 4px;
  text-align: center;
  font-size: 10px;
  font-family: var(--font-xp);
  cursor: pointer;
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.1s;
  user-select: none;
  line-height: 1.2;
}
.bingo-cell:hover { background: #E8F0FF; }
.bingo-cell.marked {
  background: linear-gradient(135deg, #316AC5, #1A4A90);
  color: white;
  font-weight: bold;
}
.bingo-cell.free-space {
  background: linear-gradient(135deg, #3A8C2F, #236016);
  color: white;
  font-weight: bold;
  font-size: 9px;
}

.bingo-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.bingo-footer .btn { margin: 0 4px; }

/* ══════════════════════════════════════════════════════════════════
   SUGGESTION BOX
   ══════════════════════════════════════════════════════════════════ */

.suggestion-app {
  padding: 16px;
  background: var(--xp-dialog-bg);
}

.suggestion-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
  padding: 10px;
  background: white;
  border: 2px solid;
  border-color: #848284 white white #848284;
}
.suggestion-icon-big { font-size: 32px; flex-shrink: 0; }

.suggestion-app textarea.form-input {
  height: 80px;
  resize: vertical;
  font-size: 11px;
}

/* ══════════════════════════════════════════════════════════════════
   MY DOCUMENTS EXPLORER
   ══════════════════════════════════════════════════════════════════ */

.explorer-app {
  background: white;
  display: flex;
  flex-direction: column;
  min-height: 200px;
}

.explorer-addressbar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 6px;
  background: var(--xp-dialog-bg);
  border-bottom: 1px solid #848284;
  font-size: 11px;
  font-family: var(--font-xp);
}

.explorer-header-row,
.explorer-row {
  display: grid;
  grid-template-columns: 26px 1fr 80px 100px;
  gap: 4px;
  align-items: center;
  padding: 3px 6px;
  font-size: 11px;
  font-family: var(--font-xp);
}
.explorer-header-row {
  background: var(--xp-dialog-bg);
  border-bottom: 1px solid #ACA899;
  font-size: 11px;
}
.explorer-row { cursor: pointer; }
.explorer-row:hover { background: #D5E5FF; }
.explorer-row:nth-child(even) { background: #F8F8F8; }
.explorer-row:nth-child(even):hover { background: #D5E5FF; }

.explorer-icon { font-size: 14px; text-align: center; }
.explorer-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.explorer-size { text-align: right; color: var(--text-muted); }
.explorer-date { color: var(--text-muted); }

.explorer-file-list { flex: 1; overflow-y: auto; }

.explorer-statusbar {
  padding: 3px 8px;
  background: var(--xp-dialog-bg);
  border-top: 2px solid;
  border-color: #848284 white white #848284;
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-xp);
}

/* Dashboard section header */
.dashboard-section-header {
  font-size: 12px;
  font-weight: bold;
  color: var(--text-muted);
  padding: 6px 0 2px;
  border-bottom: 1px solid #ACA899;
  font-family: var(--font-xp);
}

/* ══════════════════════════════════════════════════════════════════
   ANIMATION ADDITIONS
   ══════════════════════════════════════════════════════════════════ */

@keyframes xp-dialog-appear {
  from { opacity: 0; transform: translateY(4px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ══════════════════════════════════════════════════════════════════
   LINKEDLOVE™ — Outlook Express Shell
   ══════════════════════════════════════════════════════════════════ */

.ll-shell {
  display: flex;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  background: var(--xp-dialog-bg);
  font-family: var(--font-xp);
}

/* ── Sidebar ── */
.ll-sidebar {
  width: 210px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: linear-gradient(to bottom, #EBE8E0 0%, #DDD8CC 100%);
  border-right: 2px solid;
  border-color: #FFFFFF #848284 #848284 #FFFFFF;
  overflow: hidden;
}

.ll-brand-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: linear-gradient(to bottom, #0A246A 0%, #1F74D0 60%, #0A246A 100%);
  flex-shrink: 0;
}
.ll-brand-heart { font-size: 24px; filter: drop-shadow(0 1px 2px rgba(0,0,0,0.5)); }
.ll-brand-name { font-size: 13px; font-weight: bold; color: white; text-shadow: 1px 1px 2px rgba(0,0,0,0.5); }
.ll-brand-tagline { font-size: 9px; color: rgba(255,255,255,0.7); font-style: italic; }

.ll-sidebar-folders {
  flex: 1;
  overflow-y: auto;
  padding: 6px 0;
}
.ll-folder-group-label {
  font-size: 10px;
  font-weight: bold;
  color: var(--text-muted);
  padding: 4px 14px 2px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.ll-nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  font-size: 12px;
  cursor: pointer;
  color: var(--text-body);
  border: 1px solid transparent;
  margin: 1px 4px;
  border-radius: 2px;
  transition: background 0.1s;
  user-select: none;
  position: relative;
}
.ll-nav-item:hover { background: rgba(49,106,197,0.12); border-color: rgba(49,106,197,0.3); }
.ll-nav-item.active {
  background: #316AC5;
  color: white;
  border-color: #1A4090;
  font-weight: bold;
}
.ll-nav-icon { font-size: 14px; flex-shrink: 0; }
.ll-nav-label { flex: 1; }

.ll-unread-badge {
  background: var(--xp-red);
  color: white;
  font-size: 9px;
  font-weight: bold;
  padding: 1px 5px;
  border-radius: 10px;
  flex-shrink: 0;
}

/* Likes panel */
.ll-likes-panel {
  margin: 8px;
  padding: 10px;
  background: white;
  border: 2px solid;
  border-color: #848284 white white #848284;
  border-radius: 3px;
  font-family: var(--font-xp);
  transition: background 0.3s, border-color 0.3s;
}
.ll-likes-panel.ll-has-likes {
  background: linear-gradient(135deg, #FFF0F4 0%, #FFE0E8 100%);
  border-color: #E08090 white white #E08090;
}
.ll-likes-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.ll-likes-icon { font-size: 20px; }
.ll-likes-count {
  font-size: 22px;
  font-weight: bold;
  color: #C0002A;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
@keyframes ll-pulse {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.35); color: #FF0044; }
  100% { transform: scale(1); }
}
.ll-likes-pulse { animation: ll-pulse 0.4s ease-out; }
.ll-likes-label { font-size: 10px; color: var(--text-muted); }
.ll-likes-hint { font-size: 10px; color: var(--text-muted); font-style: italic; }

/* Sidebar footer */
.ll-sidebar-footer {
  border-top: 1px solid #ACA899;
  padding: 8px 10px;
  flex-shrink: 0;
}
.ll-sidebar-user { display: flex; align-items: center; gap: 8px; }
.ll-sidebar-avatar {
  width: 32px; height: 32px; flex-shrink: 0;
  background: linear-gradient(135deg, #5098E0, #1868C0);
  border: 1px solid #848284;
  border-radius: 3px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: bold; color: white;
  overflow: hidden;
}
.ll-sidebar-user-name { font-size: 11px; font-weight: bold; color: var(--text-body); }
.ll-sidebar-user-headline { font-size: 10px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 130px; }

.ll-resize-handle { width: 4px; background: #ACA899; cursor: col-resize; flex-shrink: 0; }

/* ── Main panel ── */
.ll-main {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: white;
}

/* ══════════════════════════════════════════════════════════════════
   LINKEDLOVE™ — Setup Wizard (XP Setup Wizard style)
   ══════════════════════════════════════════════════════════════════ */

.ll-wizard {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--xp-dialog-bg);
}

.ll-wizard-header {
  background: white;
  border-bottom: 2px solid;
  border-color: #848284 white white #848284;
  padding: 14px 20px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.ll-wizard-brand { display: flex; align-items: center; gap: 14px; }
.ll-wizard-title { font-size: 15px; font-weight: bold; color: var(--xp-blue); }
.ll-wizard-subtitle { font-size: 11px; color: var(--text-muted); }

.ll-wizard-dots {
  display: flex;
  align-items: center;
  gap: 0;
}
.ll-wizard-dot {
  width: 24px; height: 24px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: bold;
  background: #D4D0C8;
  color: var(--text-muted);
  border: 1px solid #ACA899;
  flex-shrink: 0;
  transition: all 0.2s;
}
.ll-wizard-dot.active {
  background: linear-gradient(135deg, #5098E0, #1868C0);
  color: white;
  border-color: #1050A0;
  box-shadow: 0 0 0 3px rgba(49,106,197,0.2);
}
.ll-wizard-dot.done {
  background: linear-gradient(135deg, #5CDB5C, #2A9A2A);
  color: white;
  border-color: #1A7A1A;
}
.ll-wizard-dot-line { width: 20px; height: 2px; background: #C0BCBA; flex-shrink: 0; }

.ll-wizard-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}
.ll-wizard-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  border-top: 2px solid;
  border-color: #848284 white white #848284;
  background: var(--xp-dialog-bg);
  flex-shrink: 0;
  gap: 8px;
}

/* Wizard welcome step */
.ll-wizard-welcome { text-align: center; padding: 12px 0; }
.ll-wizard-welcome-icon { font-size: 52px; margin-bottom: 12px; }
.ll-wizard-welcome-title { font-size: 18px; font-weight: bold; color: var(--xp-blue); margin-bottom: 8px; }
.ll-wizard-welcome-desc { font-size: 13px; color: var(--text-muted); margin-bottom: 20px; }
.ll-wizard-feature-list { text-align: left; max-width: 380px; margin: 0 auto 16px; display: flex; flex-direction: column; gap: 8px; }
.ll-wizard-feature {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 12px; color: var(--text-body);
  padding: 8px 12px;
  background: white;
  border: 1px solid #E0DED8;
  border-radius: 3px;
}
.ll-wizard-feature span { font-size: 16px; flex-shrink: 0; }
.ll-wizard-welcome-fine { font-size: 10px; color: var(--text-muted); margin-top: 12px; }

.ll-wizard-section-title { font-size: 14px; font-weight: bold; color: var(--xp-blue); margin-bottom: 14px; }

/* Radio & checkbox groups */
.ll-radio-group, .ll-checkbox-group {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.ll-radio-label, .ll-checkbox-label {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; cursor: pointer;
  padding: 6px 12px;
  background: white;
  border: 1px solid #C8C4BC;
  border-radius: 3px;
  transition: all 0.1s;
  user-select: none;
}
.ll-radio-label:hover, .ll-checkbox-label:hover { border-color: var(--xp-selection); background: #F0F4FF; }
.ll-radio-label input, .ll-checkbox-label input { accent-color: var(--xp-blue); }

/* PDF drop zone */
.ll-pdf-drop-zone {
  border: 2px dashed #ACA899;
  border-radius: 4px;
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s;
  background: white;
  font-size: 12px;
  color: var(--text-muted);
}
.ll-pdf-drop-zone:hover { border-color: var(--xp-selection); background: #F0F4FF; }
.ll-pdf-drop-icon { font-size: 36px; margin-bottom: 8px; }

/* Photo upload */
.ll-photo-upload-area { display: flex; gap: 20px; align-items: flex-start; padding: 8px 0; }
.ll-photo-preview {
  width: 120px; height: 120px; flex-shrink: 0;
  border: 2px solid; border-color: #848284 white white #848284;
  background: #F4F4F0;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  border-radius: 3px;
}
.ll-photo-placeholder { text-align: center; }
.ll-photo-controls { flex: 1; }

/* GroupBox */
.ll-groupbox {
  border: 1px solid #848284;
  border-radius: 2px;
  padding: 14px 12px 10px;
  position: relative;
  background: var(--xp-dialog-bg);
}
.ll-groupbox-label {
  position: absolute;
  top: -8px; left: 8px;
  background: var(--xp-dialog-bg);
  padding: 0 4px;
  font-size: 10px; font-weight: bold; color: var(--text-muted);
}

/* ══════════════════════════════════════════════════════════════════
   LINKEDLOVE™ — Swipe View
   ══════════════════════════════════════════════════════════════════ */

.ll-swipe-view {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: white;
}

.ll-swipe-area {
  flex: 1;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  min-height: 0;
}

/* Card stack */
.ll-card-peek {
  position: absolute;
  top: 18px; bottom: 60px; left: 0; right: 0;
  margin: 0 auto;
  max-width: 800px;
  width: calc(100% - 40px);
  transform: scale(0.95) translateY(10px);
  z-index: 1;
  opacity: 0.6;
  pointer-events: none;
  border-radius: 6px;
  overflow: hidden;
}
.ll-card-top {
  position: absolute;
  top: 8px; bottom: 55px; left: 0; right: 0;
  margin: 0 auto;
  max-width: 800px;
  width: calc(100% - 24px);
  z-index: 2;
  overflow-y: auto;
  border-radius: 6px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.35s ease;
}
.ll-card-swipe-right {
  transform: translateX(120%) rotate(15deg) !important;
  opacity: 0 !important;
}
.ll-card-swipe-left {
  transform: translateX(-120%) rotate(-15deg) !important;
  opacity: 0 !important;
}

/* Action bar */
.ll-swipe-action-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  padding: 10px 20px 14px;
  background: var(--xp-dialog-bg);
  border-top: 2px solid;
  border-color: #848284 white white #848284;
  flex-shrink: 0;
}

.ll-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  width: 72px;
  height: 60px;
  border: 2px solid;
  border-radius: 4px;
  cursor: pointer;
  font-family: var(--font-xp);
  transition: all 0.12s;
  justify-content: center;
}
.ll-action-btn:disabled { opacity: 0.4; cursor: default; filter: grayscale(0.5); }
.ll-action-icon { font-size: 22px; line-height: 1; }
.ll-action-label { font-size: 10px; font-weight: bold; }

.ll-pass-btn {
  background: linear-gradient(to bottom, #F07070 0%, #C44444 50%, #A02C2C 100%);
  color: white;
  border-color: #FF9090 #601A1A #601A1A #FF9090;
  text-shadow: 0 1px 1px rgba(0,0,0,0.4);
}
.ll-pass-btn:hover:not(:disabled) { filter: brightness(1.1); }
.ll-pass-btn:active:not(:disabled) { filter: brightness(0.9); }

.ll-like-btn {
  background: linear-gradient(to bottom, #6DBE3B 0%, #52A825 50%, #3D8A14 51%, #2E7010 100%);
  color: white;
  border-color: #88D850 #1F5800 #1F5800 #88D850;
  text-shadow: 0 1px 1px rgba(0,0,0,0.4);
}
.ll-like-btn:hover:not(:disabled) { filter: brightness(1.1); }
.ll-like-btn:active:not(:disabled) { filter: brightness(0.9); }

.ll-undo-btn {
  background: linear-gradient(to bottom, #F0C040 0%, #D0A020 50%, #B08010 51%, #906000 100%);
  color: white;
  border-color: #FFE060 #604000 #604000 #FFE060;
  text-shadow: 0 1px 1px rgba(0,0,0,0.4);
}
.ll-undo-btn:hover:not(:disabled) { filter: brightness(1.1); }

/* Liked-you hint on card */
.ll-liked-you-hint {
  position: absolute;
  top: 12px; right: 12px;
  background: rgba(200, 0, 40, 0.9);
  color: white;
  font-size: 11px;
  font-weight: bold;
  padding: 4px 10px;
  border-radius: 12px;
  z-index: 10;
  animation: ll-hint-bounce 0.5s ease-out;
  backdrop-filter: blur(4px);
}
@keyframes ll-hint-bounce {
  0%   { transform: scale(0); opacity: 0; }
  60%  { transform: scale(1.1); opacity: 1; }
  100% { transform: scale(1); }
}

/* Empty state */
.ll-empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}
.ll-empty-icon { font-size: 48px; margin-bottom: 12px; }
.ll-empty-title { font-size: 15px; font-weight: bold; color: var(--text-body); margin-bottom: 6px; }
.ll-empty-sub { font-size: 12px; }

.ll-swipe-loading {
  text-align: center;
  padding: 40px;
}

/* ══════════════════════════════════════════════════════════════════
   LINKEDLOVE™ — Profile Card (LinkedIn style)
   ══════════════════════════════════════════════════════════════════ */

.ll-profile-card {
  background: #f3f2ef;
  border-radius: 8px;
  overflow-x: hidden;
  overflow-y: auto;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  height: 100%;
  display: block; /* Removed flex */
  position: relative;
}

/* Base Card (White Blocks) */
.ll-profile-section-card {
  background: white;
  margin-bottom: 8px;
  border-radius: 8px;
  border: 1px solid #e0dfdc;
  overflow: hidden;
  flex-shrink: 0; /* Prevents squashing in any residual flex contexts */
}

/* Intro Card */
.ll-profile-intro-card {
  position: relative;
}

.ll-profile-photo-banner {
  height: 140px;
  background-color: #a0b4b7;
  background-size: cover;
  background-position: center;
}

.ll-profile-photo-wrap {
  position: absolute;
  top: 70px;
  left: 24px;
  width: 152px;
  height: 152px;
  border-radius: 50%;
  border: 4px solid white;
  background-color: #3b5998;
  background-size: cover;
  background-position: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ll-profile-photo-initial {
  font-size: 56px;
  color: white;
  font-weight: 600;
}

.ll-profile-intro-details {
  padding: 88px 24px 24px;
}

.ll-profile-name {
  font-size: 24px;
  font-weight: 600;
  color: rgba(0,0,0,0.9);
  line-height: 1.25;
}

.ll-profile-headline {
  font-size: 16px;
  color: rgba(0,0,0,0.9);
  margin-top: 4px;
  line-height: 1.4;
}

.ll-profile-location {
  font-size: 14px;
  color: rgba(0,0,0,0.6);
  margin-top: 8px;
}

/* Actions in Intro */
.ll-profile-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.ll-btn-primary {
  background: #0a66c2;
  color: white;
  border: none;
  border-radius: 16px;
  padding: 6px 16px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}
.ll-btn-secondary {
  background: white;
  color: #0a66c2;
  border: 1px solid #0a66c2;
  border-radius: 16px;
  padding: 6px 16px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

/* Content Sections */
.ll-profile-section {
  padding: 24px;
}

.ll-profile-section-title {
  font-size: 20px;
  font-weight: 600;
  color: rgba(0,0,0,0.9);
  margin-bottom: 16px;
}

.ll-profile-about {
  font-size: 14px;
  color: rgba(0,0,0,0.9);
  line-height: 1.5;
  white-space: pre-wrap;
}

/* Items lists */
.ll-exp-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ll-exp-item, .ll-edu-item {
  display: flex;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e0dfdc;
}
.ll-exp-item:last-child, .ll-edu-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.ll-item-logo {
  width: 48px;
  height: 48px;
  background: #f3f2ef;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
  border-radius: 2px;
}

.ll-item-content {
  flex: 1;
}

.ll-exp-title, .ll-edu-school {
  font-size: 16px;
  font-weight: 600;
  color: rgba(0,0,0,0.9);
  line-height: 1.3;
}

.ll-exp-company, .ll-edu-degree {
  font-size: 14px;
  color: rgba(0,0,0,0.9);
  margin-top: 2px;
}

.ll-exp-duration {
  font-size: 14px;
  color: rgba(0,0,0,0.6);
  margin-top: 2px;
}

.ll-exp-desc {
  font-size: 14px;
  color: rgba(0,0,0,0.9);
  line-height: 1.5;
  margin-top: 8px;
  white-space: pre-wrap;
}

.ll-skills-wrap { display: flex; flex-direction: column; gap: 8px; }
.ll-skill-tag {
  font-size: 15px;
  font-weight: 600;
  color: rgba(0,0,0,0.9);
  padding: 4px 0;
  border-bottom: 1px solid #e0dfdc;
  width: 100%;
}
.ll-skill-tag:last-child {
  border-bottom: none;
}

/* ══════════════════════════════════════════════════════════════════
   LINKEDLOVE™ — Match Popup (creative animated popup)
   ══════════════════════════════════════════════════════════════════ */

#ll-match-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: rgba(0, 0, 40, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(6px);
}
#ll-match-overlay.ll-match-overlay-visible { opacity: 1; }

.ll-match-popup {
  position: relative;
  background: white;
  border: 3px solid;
  border-color: #FFFFFF #848284 #848284 #FFFFFF;
  outline: 2px solid #C00040;
  border-radius: 6px 6px 0 0;
  padding: 28px 32px 24px;
  width: min(420px, 92vw);
  text-align: center;
  transform: translateY(20px) scale(0.95);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
  animation: ll-popup-enter 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
@keyframes ll-popup-enter {
  from { transform: translateY(40px) scale(0.8); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}

/* Flying hearts */
.ll-match-hearts-burst {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  border-radius: 6px 6px 0 0;
}
.ll-heart-particle {
  position: absolute;
  font-size: 20px;
  top: 50%; left: 50%;
  animation: ll-heart-fly 1.5s ease-out both;
  animation-delay: calc(var(--i) * 0.08s);
  opacity: 0;
}
@keyframes ll-heart-fly {
  0%   { transform: translate(-50%,-50%) scale(0); opacity: 1; }
  80%  { opacity: 0.8; }
  100% {
    transform: translate(
      calc(-50% + (var(--i) - 6) * 35px),
      calc(-50% + (max(var(--i), 3) - var(--i) * 3) * -18px - 80px)
    ) scale(1.5);
    opacity: 0;
  }
}

.ll-match-disk-icon {
  font-size: 36px;
  margin-bottom: 8px;
  animation: ll-disk-spin 0.8s ease-out;
}
@keyframes ll-disk-spin {
  from { transform: rotateY(0deg) scale(0); }
  to   { transform: rotateY(360deg) scale(1); }
}

/* XP-style titlebar at top of popup */
.ll-match-popup::before {
  content: '💘  LinkedLove™ — It\'s a Match!';
  position: absolute;
  top: 0; left: 0; right: 0;
  background: linear-gradient(to bottom, #C00040 0%, #A00030 50%, #800020 100%);
  color: white;
  font-size: 12px;
  font-weight: bold;
  padding: 4px 10px;
  border-radius: 3px 3px 0 0;
  font-family: var(--font-xp);
  text-shadow: 1px 1px 2px rgba(0,0,0,0.4);
}

.ll-match-title {
  font-size: 26px;
  font-weight: bold;
  color: #C00040;
  margin: 28px 0 4px;
  text-shadow: 0 1px 0 rgba(0,0,0,0.08);
}
.ll-match-subtitle { font-size: 12px; color: var(--text-muted); margin-bottom: 20px; }

.ll-match-profiles {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 10px;
}
.ll-match-profile-bubble {
  width: 72px; height: 72px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid;
  border-color: #FFFFFF #C0004090 #C0004090 #FFFFFF;
  outline: 2px solid #C00040;
  background: linear-gradient(135deg, #5098E0, #1868C0);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; font-weight: bold; color: white;
}
.ll-match-profile-bubble img { width: 100%; height: 100%; object-fit: cover; }
.ll-match-profile-initial { font-size: 28px; font-weight: bold; color: white; }

.ll-match-connector {
  display: flex;
  align-items: center;
  gap: 0;
}
.ll-match-connector-line { width: 24px; height: 2px; background: #C00040; }
.ll-match-connector-heart {
  font-size: 22px;
  animation: ll-heart-beat 0.8s ease-in-out infinite;
}
@keyframes ll-heart-beat {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.2); }
}

.ll-match-names { font-size: 13px; font-weight: bold; color: var(--text-body); margin-bottom: 14px; }

.ll-match-xp-detail {
  background: #FFF4F6;
  border: 1px solid #F0C0C8;
  border-radius: 3px;
  padding: 8px 12px;
  margin-bottom: 16px;
  text-align: left;
}
.ll-match-detail-row {
  display: flex; align-items: center; gap: 6px;
  font-size: 11px; color: var(--text-muted); margin-bottom: 3px;
}
.ll-match-detail-row:last-child { margin-bottom: 0; }
.ll-match-actions { display: flex; gap: 8px; justify-content: center; margin-bottom: 10px; }
.ll-match-xp-note { font-size: 10px; color: var(--text-muted); }

/* ══════════════════════════════════════════════════════════════════
   LINKEDLOVE™ — Matches / Messaging (Outlook Express)
   ══════════════════════════════════════════════════════════════════ */

.ll-matches-shell {
  display: flex;
  height: 100%;
  overflow: hidden;
}
.ll-inbox {
  width: 240px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  border-right: 2px solid;
  border-color: #848284 white white #848284;
  background: white;
}
.ll-inbox-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  background: var(--xp-dialog-bg);
  border-bottom: 1px solid #ACA899;
  flex-shrink: 0;
}
.ll-inbox-title { font-size: 12px; font-weight: bold; color: var(--text-body); }
.ll-inbox-list { flex: 1; overflow-y: auto; }
.ll-inbox-resize { width: 4px; background: #C8C4BC; cursor: col-resize; flex-shrink: 0; }

.ll-inbox-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid #F0EEE8;
  cursor: pointer;
  transition: background 0.1s;
  user-select: none;
}
.ll-inbox-item:hover { background: #EEF4FF; }
.ll-inbox-item.active { background: #316AC5; }
.ll-inbox-item.active .ll-inbox-name,
.ll-inbox-item.active .ll-inbox-preview,
.ll-inbox-item.active .ll-inbox-time { color: white !important; }
.ll-inbox-item.ll-deleted-profile { opacity: 0.65; }

.ll-inbox-avatar {
  width: 36px; height: 36px; flex-shrink: 0;
  background: linear-gradient(135deg, #5098E0, #1868C0);
  border: 1px solid #ACA899;
  display: flex; align-items: center; justify-content: center;
  border-radius: 3px; overflow: hidden;
}
.ll-inbox-initial { font-size: 14px; font-weight: bold; color: white; }
.ll-inbox-info { flex: 1; min-width: 0; }
.ll-inbox-name { font-size: 12px; font-weight: bold; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text-body); }
.ll-inbox-preview { font-size: 10px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.ll-inbox-meta { flex-shrink: 0; text-align: right; }
.ll-inbox-time { font-size: 10px; color: var(--text-muted); }

.ll-inbox-empty {
  padding: 32px 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
}

/* Chat panel */
.ll-chat-panel { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.ll-chat-empty {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: var(--text-muted); font-size: 12px; text-align: center;
}
.ll-chat-container { display: flex; flex-direction: column; height: 100%; }
.ll-chat-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  background: var(--xp-dialog-bg);
  border-bottom: 2px solid;
  border-color: #848284 white white #848284;
  flex-shrink: 0;
}
.ll-chat-header-avatar {
  width: 38px; height: 38px; flex-shrink: 0;
  border: 1px solid #ACA899;
  border-radius: 3px; overflow: hidden;
  background: linear-gradient(135deg, #5098E0, #1868C0);
  display: flex; align-items: center; justify-content: center; color: white; font-weight: bold;
}
.ll-chat-header-info { flex: 1; min-width: 0; }
.ll-chat-header-name { font-size: 13px; font-weight: bold; color: var(--text-body); }
.ll-chat-header-headline { font-size: 11px; color: var(--text-muted); }
.ll-chat-header-actions { flex-shrink: 0; }

.ll-messages-area {
  flex: 1; overflow-y: auto; padding: 12px 14px;
  background: white;
  display: flex; flex-direction: column; gap: 8px;
}

.ll-msg-row { display: flex; align-items: flex-end; gap: 6px; }
.ll-msg-mine { flex-direction: row-reverse; }
.ll-msg-theirs { flex-direction: row; }
.ll-msg-avatar-small {
  width: 26px; height: 26px; flex-shrink: 0;
  border-radius: 50%; border: 1px solid #ACA899;
  overflow: hidden; background: linear-gradient(135deg, #5098E0, #1868C0);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: bold; color: white;
}

.ll-chat-bubble {
  max-width: 65%;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 12px;
  line-height: 1.5;
  border: 2px solid;
}
.ll-bubble-mine {
  background: linear-gradient(135deg, #316AC5 0%, #1A4D9E 100%);
  color: white;
  border-color: #5080D0 #0A2860 #0A2860 #5080D0;
  border-radius: 12px 12px 2px 12px;
}
.ll-bubble-theirs {
  background: white;
  color: var(--text-body);
  border-color: white #ACA899 #ACA899 white;
  border-radius: 12px 12px 12px 2px;
}
.ll-bubble-text { word-break: break-word; }
.ll-bubble-time { font-size: 9px; opacity: 0.65; margin-top: 3px; text-align: right; }

.ll-chat-input-area {
  display: flex;
  gap: 8px;
  padding: 8px 12px;
  background: var(--xp-dialog-bg);
  border-top: 2px solid;
  border-color: #848284 white white #848284;
  flex-shrink: 0;
  align-items: flex-end;
}
.ll-chat-input {
  flex: 1;
  border: 2px solid;
  border-color: #848284 white white #848284;
  outline: 1px solid #ACA899;
  font-family: var(--font-xp);
  font-size: 12px;
  padding: 6px 8px;
  resize: none;
  background: white;
  border-radius: 2px;
}
.ll-chat-input:focus { outline-color: var(--xp-selection); }
.ll-chat-input-disabled {
  padding: 10px 14px;
  background: #F4F4F0;
  border-top: 1px solid #ACA899;
  font-size: 11px;
  color: var(--text-muted);
  font-style: italic;
  text-align: center;
  flex-shrink: 0;
}

/* ══════════════════════════════════════════════════════════════════
   LINKEDLOVE™ — My Profile View
   ══════════════════════════════════════════════════════════════════ */

.ll-my-profile-view {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}
.ll-profile-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px;
  background: var(--xp-dialog-bg);
  border-bottom: 2px solid;
  border-color: #848284 white white #848284;
  flex-shrink: 0;
}
.ll-profile-toolbar-title { font-size: 12px; font-weight: bold; color: var(--text-body); }
.ll-profile-toolbar-btns { display: flex; gap: 6px; }
.ll-profile-view-body { flex: 1; overflow-y: auto; }

.ll-edit-photo-preview {
  width: 80px; height: 80px;
  border: 2px solid; border-color: #848284 white white #848284;
  border-radius: 3px; overflow: hidden;
  background: #EEF0EC;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

