/* ============================================================
   MARCHEL SCHEDULE — Main Stylesheet
   Theme: Windows XP × Fisherman VTuber × Hand-drawn cozy
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Kalam:wght@300;400;700&family=VT323&family=Nunito:wght@400;600;700;800&display=swap');

/* ─────────────────────────────────────────────────────────────
   1. CSS VARIABLES (all colors and design tokens)
   ───────────────────────────────────────────────────────────── */
:root {
  /* XP core colors */
  --xp-blue:        #245EDC;
  --xp-blue-light:  #6EA1F1;
  --xp-blue-dark:   #0A246A;
  --xp-titlebar-start: #4A90D9;
  --xp-titlebar-mid:   #245EDC;
  --xp-titlebar-end:   #1A4BAA;
  --xp-titlebar:    linear-gradient(180deg, var(--xp-titlebar-start) 0%, var(--xp-titlebar-mid) 40%, var(--xp-titlebar-end) 100%);
  --xp-btn-face-start: #ECE9D8;
  --xp-btn-face-end:   #D4D0C8;
  --xp-btn-face:    linear-gradient(180deg, var(--xp-btn-face-start) 0%, var(--xp-btn-face-end) 100%);
  --xp-btn-border:  #ACA899;
  --xp-win-bg:      #ECE9D8;
  --xp-win-border:  #0A246A;

  /* Nature / soft palette */
  --green-soft:     #7BBF6A;
  --green-light:    #D6EEC9;
  --green-dark:     #3E7D3A;
  --beige:          #F5F0E8;
  --beige-dark:     #E8E0CC;
  --cream:          #FDFAF3;
  --brown-soft:     #A08060;
  --water-blue:     #B8D9F0;
  --water-dark:     #5B9DC8;

  /* Tag colors */
  --tag-streamlongo:     #4A90D9;
  --tag-streamshorti:    #5bad8f;
  --tag-colab:           #9B6DD6;
  --tag-video:           #E06020;
  --tag-off:             #999;

  /* Highlights */
  --day-highlight:  #204de0;
  --bio-text:       #2c2c2c;

  /* Desktop background */
  --bg1:            #CA995C;
  --bg2:            #BF4A3F;

  /* UI fonts */
  --font-ui:       'Tahoma', sans-serif;

  /* Shadows */
  --shadow-win:     4px 4px 0 #00000044, 8px 8px 0 #00000022;
  --shadow-btn:     inset 1px 1px 0 #fff8, inset -1px -1px 0 #0004;
  --radius-win:     8px;

  /* Additional colors (extracted from rest of CSS) */
  --white-soft:     #ffffff18;
  --white-soft-high: #ffffff22;
  --white-shadow:   #ffffffaa;
  --black-soft:     #00000044;
  --black-light:    #00000022;
  --black-strong:   #0006;
  --black-shadow:   #0005;
  --black-inset:    #0002;
  --grey-titlebar:  #848fa8;
  --grey-titlebar-mid: #6a7588;
  --grey-titlebar-end: #5a6578;
  --btn-min-start:  #F0F0D8;
  --btn-min-end:    #D8D0A0;
  --btn-close-start:#F06060;
  --btn-close-end:  #C02020;
  --btn-close-hover-start: #FF8080;
  --btn-close-hover-end:   #E03030;
  --menu-hover-bg:  var(--xp-blue);
  --menu-hover-text: #fff;
  --status-border:  var(--xp-btn-border);
  --hero-overlay:   #5B9DC8;
  --hero-shadow:    #0004;
  --hero-text-shadow: #fff8;
  --hero-text-shadow2: #00000022;
  --doodle-shadow:  none;
  --social-bg:      #fff8;
  --social-shadow:  #0003;
  --twitch-color:   #6441A5;
  --yt-color:       #C00;
  --twitter-color:  #00acee;
  --bsky-color:     #1185fe;
  --msn-border-light: #ffffff88;
  --msn-border:     var(--xp-blue);
  --msn-shadow:     #0005;
  --msn-status-bg:  #22CC44;
  --msn-status-shadow: #22CC44AA;
  --msn-name-bg:    #ffffff99;
  --msn-name-border: #ccc;
  --schedule-row-hover: var(--green-light);
  --tag-bg-streamlongo:  #4A90D914;
  --tag-bg-streamshorti: #4A90D914;
  --tag-bg-colab:   #9B6DD614;
  --tag-bg-video:   #E0602014;
  --tag-bg-off:     #99999914;
  --today-bg-start: #FFF9E0;
  --today-border:   var(--day-highlight);
  --game-card-shadow: var(--brown-soft);
  --game-card-border-hover: var(--green-soft);
  --taskbar-start:  #2A6AD4;
  --taskbar-end:    #1A4BAA;
  --taskbar-top-border: #5599DD;
  --taskbar-shadow: #0006;
  --start-btn-start: #5BA83A;
  --start-btn-end:   #3D7A28;
  --start-btn-border: #2A5518;
  --start-btn-shadow: #ffffff44;
  --start-btn-text-shadow: #0006;
  --win-task-btn-start: #4a80d0;
  --win-task-btn-end:   #2a5ab0;
  --win-task-btn-border: #1a3a80;
  --win-task-btn-shadow: #ffffff22;
  --win-task-btn-hover-start: #5a90e0;
  --win-task-btn-hover-end:   #3a6ac0;
  --win-task-focused-start: #182848;
  --win-task-focused-end:   #0a1830;
  --win-task-focused-border: #000820;
  --win-task-focused-shadow: #00000066;
  --taskbar-clock-bg: #1A3A8888;
  --taskbar-clock-border: #2A5AB0;
  --taskbar-clock-hover-start: #5A90E0;
  --taskbar-clock-hover-end:   #3A6AC0;
  --timezone-label-start: #4A80D0;
  --timezone-label-end:   #2A5AB0;
  --timezone-label-border: #1A3A80;
  --timezone-label-shadow: #ffffff22;
  --timezone-label-text-shadow: #0005;
  --aboutme-bg-card: rgba(255, 250, 240, 0.7);
  --aboutme-border-left: var(--green-soft);
  --aboutme-shadow: #0001;
  --platforms-bg: #fef9e8;
  --platforms-border: #e2dac0;
  --platforms-shadow: #fff8;
  --platform-badge-bg: white;
  --platform-badge-shadow: #0001;
  --platform-badge-border: #ddd0b0;
  --twitch-left-border: #9146FF;
  --youtube-left-border: #FF0000;
  --twitter-left-border: #1DA1F2;
  --bsky-left-border: #1185FE;
  --section-title-color: var(--green-dark);
  --section-title-border: #c0d6b3;
  --game-item-bg: white;
  --game-item-color: #2a4b2a;
  --game-item-border: #d4e0c4;
  --game-item-hover-bg: #e9f3e0;
  --game-item-hover-border: var(--green-soft);
  --aboutme-highlight-bg: linear-gradient(120deg, #fff1cc, #fffae6);
  --aboutme-highlight-border: #f3e5b0;
  --aboutme-highlight-color: #4a5b2e;
  --login-overlay-start: #1A7ABF;
  --login-overlay-mid:   #0D5A99;
  --login-overlay-end:   #1A7ABF;
  --login-bg: var(--xp-win-bg);
  --login-body-bg: var(--cream);
  --login-field-border: var(--xp-btn-border);
  --login-field-shadow: #0002;
  --login-field-focus: #4A90D944;
  --login-error-border: #C02020;
  --login-error-bg: #FFF0F0;
  --login-error-color: #C02020;
  --login-hint-bg: #EAF4FF;
  --login-hint-border: var(--xp-blue-light);
  --login-hint-color: #1A4BAA;
  --session-banner-bg: linear-gradient(90deg, var(--green-dark), #2A7A2A);
  --session-banner-text: #fff;
  --session-banner-btn-bg: #ffffff22;
  --session-banner-btn-border: #ffffff44;
  --admin-toolbar-bg: var(--xp-win-bg);
  --admin-toolbar-border: var(--xp-btn-border);
  --xp-button-primary-start: #4A90D9;
  --xp-button-primary-end:   #2060B0;
  --xp-button-primary-border: #1040A0;
  --xp-button-danger-start: #F07070;
  --xp-button-danger-end:   #C02020;
  --xp-button-danger-border: #A01010;
  --xp-button-success-start: #70C070;
  --xp-button-success-end:   #3A8A3A;
  --xp-button-success-border: #2A6A2A;
  --admin-table-th-bg: var(--xp-blue);
  --admin-table-th-text: #fff;
  --admin-table-row-even: var(--beige);
  --admin-table-row-hover: var(--green-light);
  --admin-table-input-border: #AAA;
  --admin-table-input-focus: var(--xp-blue);
  --rotation-admin-card-bg: var(--beige);
  --rotation-admin-card-border: var(--xp-btn-border);
  --json-preview-bg: #1a1a2e;
  --json-preview-text: #7EC8E3;
  --toast-bg: var(--green-dark);
  --toast-text: #fff;
  --toast-shadow: #0005;
  --admin-notice-bg: #FFF8D0;
  --admin-notice-border: #D4A017;
  --admin-notice-color: #7A5A00;
  --tab-active-bg: var(--cream);
  --tab-active-border: var(--xp-btn-border);
  --tab-active-color: var(--xp-blue-dark);
  --tab-inactive-bg: var(--beige-dark);
  --profile-preview-border: var(--xp-blue);
  --profile-preview-bg: var(--beige-dark);
  --output-bg: var(--cream);
  --output-border: var(--xp-btn-border);
  --output-shadow: #0002;
  --output-li-bg: var(--beige);
  --output-li-border: #ccc;
  --output-li-hover-bg: var(--beige-dark);
  --output-li-marker: var(--xp-blue);
  --chaos-item-border: #c44;
  --chaos-item-bg: #ffe5e5;
  --chaos-item-color: #a00000;
  --status-dot-bg: var(--green-soft);
  --update-badge-color: #888;
  --xp-inset-border-light: #888;
  --xp-inset-border-dark: #fff;
}

/* ─────────────────────────────────────────────────────────────
   2. RESET & BASE STYLES
   ───────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-ui);
  background-image:
          url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80'%3E%3Cpath d='M0 40 Q20 20 40 40 Q60 60 80 40' fill='none' stroke='%23ffffff18' stroke-width='3'/%3E%3C/svg%3E"),
          linear-gradient(180deg, var(--bg1) 0%, var(--bg1) 45%, var(--bg2) 85%, var(--bg2) 100%);
  min-height: 100vh;
  overflow: hidden; /* desktop canvas — windows float freely */
  background-attachment: fixed;
}

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--xp-win-bg); }
::-webkit-scrollbar-thumb { background: var(--xp-blue); border-radius: 4px; border: 2px solid var(--xp-win-bg); }

/* ─────────────────────────────────────────────────────────────
   3. DESKTOP LAYOUT & ICONS
   ───────────────────────────────────────────────────────────── */
.desktop {
  position: fixed;
  top: 0; left: 0; right: 0;
  bottom: 36px; /* room for taskbar */
  overflow: hidden;
}

.desktop-icons {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 4px;
  z-index: 5;
}
.desktop-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  color: #fff;
  text-shadow: 1px 1px 3px #0008;
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  width: 64px;
  transition: filter 0.15s;
  text-decoration: none;
  background: none;
  border: none;
  padding: 4px 2px;
  border-radius: 4px;
  user-select: none;
  -webkit-user-select: none;
}
.desktop-icon:hover { filter: brightness(1.3); }
.desktop-icon:focus-visible {
  outline: 1px dotted #ffffffaa;
  outline-offset: 2px;
}
.desktop-icon.icon-active .icon-img {
  background: #3a66cc66;
  border-color: #aabbff88;
}
.desktop-icon .icon-img {
  font-size: 28px;
  background: var(--white-soft-high);
  border: 1px solid #ffffff44;
  border-radius: 6px;
  width: 40px; height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  transition: background 0.15s, border-color 0.15s;
}

/* ── taskbar-icon-btn — icon buttons that live IN the taskbar.
   Match win-task-btn visually so the taskbar looks consistent. ── */
.taskbar-icon-btn {
  background: linear-gradient(180deg, var(--win-task-btn-start) 0%, var(--win-task-btn-end) 100%);
  border: 1px solid var(--win-task-btn-border);
  border-radius: 3px;
  padding: 0 10px;
  height: 26px;
  min-width: 32px;
  font-size: 16px;
  color: #fff;
  cursor: pointer;
  font-family: var(--font-ui);
  text-shadow: 1px 1px 1px #0005;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 1px 1px 0 var(--win-task-btn-shadow);
  white-space: nowrap;
  transition: background 0.1s;
  flex-shrink: 0;
  text-decoration: none;
  /* Override any desktop-icon bleed */
  width: auto;
  flex-direction: row;
  gap: 0;
  text-shadow: none;
}
.taskbar-icon-btn:hover {
  background: linear-gradient(180deg, var(--win-task-btn-hover-start) 0%, var(--win-task-btn-hover-end) 100%);
  filter: none;
}
.taskbar-icon-btn.wm-focused {
  background: linear-gradient(180deg, var(--win-task-focused-start) 0%, var(--win-task-focused-end) 100%);
  border-color: var(--win-task-focused-border);
  box-shadow: inset 2px 2px 3px var(--win-task-focused-shadow);
}

/* ─────────────────────────────────────────────────────────────
   4. WINDOWS (XP style, Window Manager)
   ───────────────────────────────────────────────────────────── */
.xp-window {
  background: var(--xp-win-bg);
  border: 2px solid var(--xp-win-border);
  border-radius: var(--radius-win);
  box-shadow: var(--shadow-win);
  overflow: hidden;
  outline: 1px solid #ffffff44;
  outline-offset: -3px;
  position: fixed;
  display: none;
  flex-direction: column;
  min-width: 300px;
  min-height: 140px;
}

.xp-window.wm-open {
  display: flex;
  animation: wm-open 0.12s ease-out both;
}
.xp-window.wm-maximized {
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: calc(100vh - 36px) !important;
  border-radius: 0;
  box-shadow: none;
}
.xp-window:not(.wm-focused) .xp-titlebar {
  background: linear-gradient(180deg, var(--grey-titlebar) 0%, var(--grey-titlebar-mid) 40%, var(--grey-titlebar-end) 100%);
}
@keyframes wm-open {
  from { opacity: 0; transform: scale(0.94); }
  to   { opacity: 1; transform: scale(1); }
}

/* Wave decoration pinned to the VISUAL bottom of the hero window.
   Lives on the window element (position:fixed), not the scrollable
   content, so it never moves when the user scrolls. */
.hero-window::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 40px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 40'%3E%3Cpath d='M0 20 Q50 0 100 20 Q150 40 200 20 Q250 0 300 20 Q350 40 400 20 L400 40 L0 40Z' fill='%235B9DC8' opacity='0.3'/%3E%3C/svg%3E") repeat-x bottom / 400px;
  pointer-events: none;
  z-index: 2;  /* above xp-content but below any z-indexed children */
}
.xp-window::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

.xp-titlebar {
  background: var(--xp-titlebar);
  padding: 5px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  position: relative;
  z-index: 1;
  user-select: none;
  flex-shrink: 0;
  cursor: grab;
}
.xp-titlebar:active { cursor: grabbing; }
.xp-titlebar .title-left {
  display: flex;
  align-items: center;
  gap: 6px;
}
.xp-titlebar .title-icon { font-size: 14px; }
.xp-titlebar .title-text {
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  text-shadow: 1px 1px 2px var(--black-strong);
  letter-spacing: 0.3px;
}

.xp-window-btns {
  display: flex;
  gap: 3px;
}
.xp-btn-win {
  width: 21px; height: 19px;
  border-radius: 3px;
  border: 1px solid #0004;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-btn);
  color: #1a1a1a;
  transition: filter 0.1s;
}
.xp-btn-win:hover { filter: brightness(1.15); }
.xp-btn-win:active { box-shadow: inset 1px 1px 2px #0005; }
.xp-btn-min { background: linear-gradient(180deg, var(--btn-min-start) 0%, var(--btn-min-end) 100%); }
.xp-btn-max { background: linear-gradient(180deg, var(--btn-min-start) 0%, var(--btn-min-end) 100%); }
.xp-btn-close { background: linear-gradient(180deg, var(--btn-close-start) 0%, var(--btn-close-end) 100%); color: #fff; font-size: 11px; }
.xp-btn-close:hover { background: linear-gradient(180deg, var(--btn-close-hover-start) 0%, var(--btn-close-hover-end) 100%); }

.xp-content {
  padding: 16px;
  position: relative;
  z-index: 1;
  flex: 1;
  overflow: auto;
  min-height: 0;
}
.xp-content.stream,
.xp-content.yt-video {
  padding: 0;
  display: flex;
  flex-direction: column;
}
.xp-content.stream iframe,
.xp-content.yt-video iframe {
  width: 100%;
  flex: 1;
  min-height: 300px;
  display: block;
  border: none;
}

#admin-window .xp-content {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

.xp-menubar {
  flex-shrink: 0;
  background: var(--xp-win-bg);
  border-bottom: 1px solid var(--xp-btn-border);
  padding: 2px 8px;
  display: flex;
  gap: 0;
  position: relative;
  z-index: 1;
}
.xp-menubar span {
  font-size: 12px;
  padding: 2px 8px;
  cursor: default;
  color: #111;
  border-radius: 2px;
}
.xp-menubar span:hover { background: var(--menu-hover-bg); color: var(--menu-hover-text); }

.xp-statusbar {
  background: var(--xp-win-bg);
  border-top: 2px solid var(--status-border);
  padding: 3px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: #555;
  font-family: var(--font-ui);
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  height: auto;
  min-height: 0;
  line-height: normal;
  margin-top: 0;
}
.xp-statusbar .status-item {
  display: flex;
  align-items: center;
  gap: 4px;
  padding-right: 8px;
  border-right: 1px solid var(--status-border);
}
.xp-statusbar .status-item:last-child { border-right: none; }

/* ─────────────────────────────────────────────────────────────
   5. HERO WINDOW (index)
   ───────────────────────────────────────────────────────────── */
.hero-window .xp-content {
  background: linear-gradient(135deg, var(--green-light) 0%, var(--beige) 60%, var(--water-blue) 100%);
  padding: 24px 20px;
  text-align: center;
  position: relative;
  overflow-x: hidden;
  overflow-y: auto;  /* scroll when content taller than window */
}
/* Wave is now on the window element itself (::after) so it always
   sits at the VISUAL bottom regardless of scroll position */

.hero-avatar {
  font-size: 64px;
  line-height: 1;
  margin-bottom: 8px;
  display: block;
  filter: drop-shadow(2px 3px 4px var(--hero-shadow));
  animation: float 3s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.hero-name {
  font-family: var(--font-ui);
  font-size: 42px;
  font-weight: 700;
  text-align: center;
  color: var(--xp-blue-dark);
  text-shadow: 2px 2px 0 var(--hero-text-shadow), 3px 3px 0 var(--hero-text-shadow2);
  letter-spacing: 1px;
}
.hero-tagline {
  font-family: var(--font-ui);
  font-size: 16px;
  text-align: center;
  color: var(--green-dark);
  margin-top: 4px;
}

.doodle {
  position: absolute;
  pointer-events: none;
  opacity: 0.6;
  font-size: 24px;
}
.doodle-1 { top: 10px; left: 12px; font-size: 20px; animation: wobble 4s ease-in-out infinite; }
.doodle-2 { top: 14px; right: 16px; font-size: 18px; animation: wobble 3.5s ease-in-out infinite reverse; }
.doodle-3 { bottom: 20px; left: 24px; font-size: 16px; animation: wobble 5s ease-in-out infinite; }
.doodle-4 { bottom: 18px; right: 20px; font-size: 22px; animation: wobble 4.5s ease-in-out infinite reverse; }
@keyframes wobble {
  0%, 100% { transform: rotate(-5deg) scale(1); }
  50% { transform: rotate(5deg) scale(1.1); }
}

.social-row {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 14px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.social-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  border: 2px solid currentColor;
  transition: transform 0.15s, box-shadow 0.15s;
  background: var(--social-bg);
  z-index: 2;
}
.social-badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px var(--social-shadow);
}
.badge-twitch { color: var(--twitch-color); }
.badge-yt { color: var(--yt-color); }
.badge-twitter { color: var(--twitter-color); }
.badge-bsky { color: var(--bsky-color); }

.msn-profile-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  margin-bottom: 10px;
}
.msn-frame {
  position: relative;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  box-shadow:
          0 0 0 3px #fff,
          0 0 0 5px var(--msn-border),
          0 0 0 8px var(--msn-border-light),
          0 0 0 10px var(--xp-blue-light),
          3px 5px 12px var(--msn-shadow);
  overflow: hidden;
  background: var(--beige-dark);
  flex-shrink: 0;
  animation: float 3s ease-in-out infinite;
}
.msn-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 50%;
}
.msn-frame .msn-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  background: linear-gradient(135deg, var(--green-light), var(--water-blue));
}
.msn-status {
  position: absolute;
  bottom: 4px;
  right: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--msn-status-bg);
  border: 2px solid #fff;
  box-shadow: 0 0 6px var(--msn-status-shadow);
  animation: pulse-dot 2s ease-in-out infinite;
}
.msn-display-name {
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--xp-blue-dark);
  background: var(--msn-name-bg);
  border: 1px solid var(--msn-name-border);
  border-radius: 10px;
  padding: 2px 12px;
  margin-top: 8px;
  backdrop-filter: blur(4px);
  box-shadow: 0 1px 4px var(--black-inset);
}

/* ─────────────────────────────────────────────────────────────
   6. SCHEDULE TABLE WINDOW (index)
   ───────────────────────────────────────────────────────────── */
.schedule-window .xp-content {
  padding: 12px;
  background: var(--cream);
}
.schedule-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-ui);
}
.schedule-table thead tr {
  background: var(--xp-blue);
  color: #fff;
}
.schedule-table th {
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  text-align: left;
}
.schedule-table th:first-child { border-radius: 4px 0 0 4px; }
.schedule-table th:last-child  { border-radius: 0 4px 4px 0; }
.schedule-table tbody tr {
  border-bottom: 1px dashed var(--beige-dark);
  transition: background 0.15s;
}
.schedule-table tbody tr:hover { background: var(--schedule-row-hover); }
.schedule-table tbody tr.inactive { opacity: 0.45; }
.schedule-table td {
  padding: 10px 12px;
  font-size: 14px;
  vertical-align: middle;
}
.td-day {
  font-family: var(--font-ui);
  font-size: 16px;
  font-weight: 700;
  color: var(--xp-blue-dark);
  white-space: nowrap;
}
.td-time {
  font-family: var(--font-ui);
  font-size: 20px;
  color: var(--green-dark);
  white-space: nowrap;
}
.td-game {
  font-weight: 600;
  color: #2a2a2a;
}
.td-tag { text-align: right; }

.tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  border: 1.5px solid currentColor;
  letter-spacing: 0.3px;
}
.tag-stream-longo   { color: var(--tag-streamlongo);  background: var(--tag-bg-streamlongo); }
.tag-stream-shorti  { color: var(--tag-streamshorti);  background: var(--tag-bg-streamshorti); }
.tag-colab          { color: var(--tag-colab);   background: var(--tag-bg-colab); }
.tag-video          { color: var(--tag-video);   background: var(--tag-bg-video); }
.tag-off            { color: var(--tag-off);     background: var(--tag-bg-off); }

.schedule-table tbody tr.today {
  background: linear-gradient(90deg, var(--today-bg-start), var(--cream));
  border-left: 4px solid var(--today-border);
}
.schedule-table tbody tr.today .td-day::after {
  content: ' ←hoy';
  font-size: 11px;
  color: var(--today-border);
  font-family: var(--font-ui);
}

/* ── Multi-slot days: extra slots share the day cell via rowspan ── */
/* The second+ slot row has no top border — visually joined to the first */
.schedule-table tbody tr.slot-extra {
  border-top: none;
  border-bottom: 1px dashed var(--beige-dark);
}
/* A fine divider above the extra time/game/tag cells to separate slots */
.schedule-table tbody tr.slot-extra td {
  border-top: 1px dotted var(--xp-btn-border);
  padding-top: 8px;
}
/* The day cell rowspan spans the full group — give it a left accent */
.schedule-table tbody tr.today .td-day[rowspan] {
  border-left: none; /* border-left is on the tr, not the td */
}

/* ─────────────────────────────────────────────────────────────
   7. ROTATION GAMES WINDOW (index)
   ───────────────────────────────────────────────────────────── */
.rotation-window .xp-content {
  background: var(--cream);
  padding: 16px;
}
.rotation-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.game-card {
  height: 200px;
  width: 100%;
  background: var(--beige);
  border: 2px solid var(--xp-btn-border);
  border-radius: 8px;
  padding: 14px 12px;
  text-align: center;
  cursor: default;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  position: relative;
  overflow: hidden;
  box-shadow: 2px 2px 0 var(--game-card-shadow);
}
.game-card::before {
  content: '';
  position: absolute;
  inset: 3px;
  border: 1px dashed var(--xp-btn-border);
  border-radius: 5px;
  pointer-events: none;
  opacity: 0.4;
}
.game-card:hover {
  transform: translateY(-4px) rotate(-1deg);
  box-shadow: 4px 6px 0 var(--game-card-shadow);
  border-color: var(--game-card-border-hover);
}
.game-card .game-emoji {
  font-size: 32px;
  display: block;
  margin-bottom: 6px;
  filter: drop-shadow(1px 2px 2px #0003);
}
.game-card .game-name {
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 700;
  color: var(--xp-blue-dark);
  margin-bottom: 4px;
}
.game-card .game-note {
  font-size: 11px;
  color: var(--brown-soft);
  font-style: italic;
}

.game-logo-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.game-logo {
  width: 50px;
  height: 50px;
  padding: 5px;
  object-fit: contain;
  border-radius: 6px;
  border: 1.5px solid var(--xp-btn-border);
  background: var(--beige-dark);
  flex-shrink: 0;
  box-shadow: 1px 1px 0 var(--brown-soft);
}
.game-card-logo {
  width: 100%;
  height: 100px;
  object-fit: contain;
  border-radius: 8px;
  border: 2px solid var(--xp-btn-border);
  background: var(--beige-dark);
  margin: 0 auto 6px;
  display: block;
  box-shadow: 2px 2px 0 var(--brown-soft);
}
.game-card-emoji-fallback {
  font-size: 40px;
  display: block;
  margin-bottom: 6px;
  filter: drop-shadow(1px 2px 2px #0003);
}

/* ─────────────────────────────────────────────────────────────
   8. STREAM & YOUTUBE EMBEDS
   ───────────────────────────────────────────────────────────── */
.stream-window iframe {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
}

/* ─────────────────────────────────────────────────────────────
   9. TASKBAR (global)
   ───────────────────────────────────────────────────────────── */
.taskbar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(180deg, var(--taskbar-start) 0%, var(--taskbar-end) 100%);
  border-top: 2px solid var(--taskbar-top-border);
  height: 36px;
  display: flex;
  align-items: center;
  padding: 0 8px;
  gap: 8px;
  z-index: 100000;
  box-shadow: 0 -2px 8px var(--taskbar-shadow);
}
.taskbar-start {
  background: linear-gradient(180deg, var(--start-btn-start) 0%, var(--start-btn-end) 100%);
  border: 1px solid var(--start-btn-border);
  border-radius: 14px;
  padding: 3px 12px 3px 8px;
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  box-shadow: inset 1px 1px 0 var(--start-btn-shadow), 0 1px 3px #0005;
  text-shadow: 1px 1px 2px var(--start-btn-text-shadow);
  transition: filter 0.1s;
  font-family: var(--font-ui);
  text-decoration: none;
}
.taskbar-start:hover { filter: brightness(1.1); }
.taskbar-items {
  display: flex;
  gap: 6px;
  align-items: center;
}
.taskbar-windows {
  display: flex;
  gap: 3px;
  flex: 1;
  overflow: hidden;
  align-items: center;
}
.win-task-btn {
  background: linear-gradient(180deg, var(--win-task-btn-start) 0%, var(--win-task-btn-end) 100%);
  border: 1px solid var(--win-task-btn-border);
  border-radius: 3px;
  padding: 0 8px;
  height: 26px;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  font-family: var(--font-ui);
  text-shadow: 1px 1px 1px #0005;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  box-shadow: inset 1px 1px 0 var(--win-task-btn-shadow);
  white-space: nowrap;
  max-width: 160px;
  overflow: hidden;
  transition: background 0.1s;
  flex-shrink: 0;
}
.win-task-btn .btn-label {
  overflow: hidden;
  text-overflow: ellipsis;
}
.win-task-btn:hover {
  background: linear-gradient(180deg, var(--win-task-btn-hover-start) 0%, var(--win-task-btn-hover-end) 100%);
}
.win-task-btn.wm-focused {
  background: linear-gradient(180deg, var(--win-task-focused-start) 0%, var(--win-task-focused-end) 100%);
  border-color: var(--win-task-focused-border);
  box-shadow: inset 2px 2px 3px var(--win-task-focused-shadow);
}
.win-task-btn.wm-minimized {
  opacity: 0.6;
  font-style: italic;
}
.taskbar-item {
  font-size: 15px;
  color: #fff;
  cursor: pointer;
  font-family: var(--font-ui);
  font-weight: 600;
  text-shadow: 1px 1px 1px #0005;
  align-items: center;
  gap: 2px;
  text-decoration: none;
}
.taskbar-item:hover { filter: brightness(1.1); }
.taskbar-item.active { filter: brightness(-1.1); }
.taskbar-clock {
  background: var(--taskbar-clock-bg);
  border: 1px solid var(--taskbar-clock-border);
  border-radius: 3px;
  padding: 2px 5px ;
  font-size: 16px;
  font-weight: 400;
  color: #fff;
  text-shadow: 0 0 8px #8af4;
  white-space: nowrap;
  align-content: center;
  align-items: center;
}
.taskbar-clock:hover { background: linear-gradient(180deg, var(--taskbar-clock-hover-start) 0%, var(--taskbar-clock-hover-end) 100%); }
.taskbar-clock-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-right: 10px;
}
#timezone-label {
  background: linear-gradient(180deg, var(--timezone-label-start) 0%, var(--timezone-label-end) 100%);
  border: 1px solid var(--timezone-label-border);
  border-radius: 3px;
  padding: 2px 5px;
  font-size: 11px;
  color: #fff;
  cursor: pointer;
  font-family: var(--font-ui);
  font-weight: 600;
  box-shadow: inset 1px 1px 0 var(--timezone-label-shadow);
  text-shadow: 1px 1px 1px var(--timezone-label-text-shadow);
  display: flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
}

/* ─────────────────────────────────────────────────────────────
   10. ABOUT ME PAGE STYLES
   ───────────────────────────────────────────────────────────── */
.aboutme-content {
  font-size: 14px;
  font-family: var(--font-ui);
  font-weight: 400;
}
.aboutme-enhanced {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}
.bio-card {
  background: var(--aboutme-bg-card);
  border-radius: 16px;
  padding: 1rem 1.2rem;
  border-left: 6px solid var(--aboutme-border-left);
  box-shadow: 2px 2px 6px var(--aboutme-shadow);
}
.bio-text {
  font-family: var(--font-ui);
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--bio-text);
  margin: 0;
  text-align: justify;
  hyphens: auto;
  lang: es;
}
.bio-text strong {
  color: var(--xp-blue-dark);
  font-weight: 700;
}
.platforms-row {
  background: var(--platforms-bg);
  border-radius: 20px;
  padding: 0.9rem 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border: 1px solid var(--platforms-border);
  box-shadow: inset 0 1px 0 var(--platforms-shadow), 1px 1px 4px #0001;
}
.platform-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--platform-badge-bg);
  padding: 5px 14px;
  border-radius: 40px;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--font-ui);
  box-shadow: 0 1px 3px var(--platform-badge-shadow);
  transition: transform 0.1s ease, box-shadow 0.1s;
  text-decoration: none;
  color: #1e1e1e;
  border: 1px solid var(--platform-badge-border);
}
.platform-badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.12);
}
.platform-badge img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}
.platform-badge.twitch-badge { border-left: 3px solid var(--twitch-left-border); }
.platform-badge.youtube-badge { border-left: 3px solid var(--youtube-left-border); }
.platform-badge.twitter-badge { border-left: 3px solid var(--twitter-left-border); }
.platform-badge.bsky-badge { border-left: 3px solid var(--bsky-left-border); }
.games-showcase {
  margin-top: 0.2rem;
}
.section-title {
  font-family: var(--font-ui, 'Kalam', cursive);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--section-title-color);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
  border-bottom: 2px dashed var(--section-title-border);
  padding-bottom: 4px;
}
.games-flex {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 6px;
}
.game-item {
  background: var(--game-item-bg);
  border-radius: 40px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px 6px 12px;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--font-ui);
  color: var(--game-item-color);
  border: 1px solid var(--game-item-border);
  box-shadow: 0 1px 2px #0001;
  transition: all 0.15s;
}
.game-item:hover {
  background: var(--game-item-hover-bg);
  transform: scale(1.02);
  border-color: var(--game-item-hover-border);
}
.game-item img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}
.game-emoji-fallback {
  font-size: 18px;
}
.aboutme-highlight {
  background: var(--aboutme-highlight-bg);
  border-radius: 14px;
  padding: 0.7rem 1rem;
  font-size: 0.85rem;
  border: 1px solid var(--aboutme-highlight-border);
  font-style: italic;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--aboutme-highlight-color);
}
.aboutme-highlight span:first-child {
  font-size: 1.6rem;
  text-align: left;
}

/* ─────────────────────────────────────────────────────────────
   11. ADMIN PAGE STYLES (login, toolbar, tables, etc.)
   ───────────────────────────────────────────────────────────── */
.login-overlay {
  position: fixed;
  inset: 0;
  background: var(--login-overlay-start);
  background-image:
          url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80'%3E%3Cpath d='M0 40 Q20 20 40 40 Q60 60 80 40' fill='none' stroke='%23ffffff18' stroke-width='2'/%3E%3C/svg%3E"),
          linear-gradient(160deg, var(--login-overlay-start) 0%, var(--login-overlay-mid) 40%, var(--login-overlay-end) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
}
.login-window {
  background: var(--login-bg);
  border: 2px solid var(--xp-win-border);
  border-radius: var(--radius-win);
  box-shadow: var(--shadow-win);
  width: 100%;
  max-width: 420px;
  overflow: hidden;
}
.login-body {
  padding: 24px 24px 20px;
  background: var(--login-body-bg);
}
.login-icon-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}
.login-avatar { font-size: 48px; line-height: 1; filter: drop-shadow(2px 3px 4px var(--hero-shadow)); }
.login-title {
  font-family: var(--font-ui);
  font-size: 22px;
  font-weight: 700;
  color: var(--xp-blue-dark);
  line-height: 1.2;
}
.login-subtitle { font-size: 12px; color: #888; margin-top: 2px; font-style: italic; }
.login-field { margin-bottom: 14px; }
.login-field label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #444;
  margin-bottom: 5px;
  font-family: var(--font-ui);
}
.login-field input {
  width: 100%;
  border: 2px solid var(--login-field-border);
  padding: 8px 10px;
  font-size: 13px;
  font-family: var(--font-ui);
  background: #fff;
  border-radius: 3px;
  box-shadow: inset 1px 1px 3px var(--login-field-shadow);
  transition: border-color 0.15s;
}
.login-field input:focus {
  outline: none;
  border-color: var(--xp-blue);
  box-shadow: inset 1px 1px 3px var(--login-field-shadow), 0 0 0 2px var(--login-field-focus);
}
.login-field input.error { border-color: var(--login-error-border); animation: shake 0.3s ease; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}
.login-hint {
  background: var(--login-hint-bg);
  border: 1px solid var(--login-hint-border);
  border-radius: 4px;
  padding: 8px 10px;
  font-size: 11px;
  color: var(--login-hint-color);
  margin-bottom: 16px;
  line-height: 1.5;
}
.login-error {
  background: var(--login-error-bg);
  border: 1px solid var(--login-error-border);
  border-radius: 4px;
  padding: 8px 10px;
  font-size: 12px;
  color: var(--login-error-color);
  font-weight: 600;
  margin-bottom: 12px;
  display: none;
}
.login-error.show { display: block; }
.login-btn-row { display: flex; gap: 8px; justify-content: flex-end; }
.login-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid #ffffff66;
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  vertical-align: middle;
  margin-right: 5px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.session-banner {
  background: var(--session-banner-bg);
  color: var(--session-banner-text);
  padding: 6px 12px;
  font-size: 12px;
  font-family: var(--font-ui);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  position: relative;
  z-index: 1;
}
.session-banner .logout-btn {
  background: var(--session-banner-btn-bg);
  border: 1px solid var(--session-banner-btn-border);
  color: #fff;
  border-radius: 3px;
  padding: 2px 8px;
  font-size: 11px;
  cursor: pointer;
  font-family: var(--font-ui);
}
.session-banner .logout-btn:hover { background: #ffffff33; }

.admin-toolbar {
  background: var(--admin-toolbar-bg);
  border-bottom: 2px solid var(--admin-toolbar-border);
  padding: 6px 12px;
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}
.xp-button {
  background: var(--xp-btn-face);
  border: 1px solid var(--xp-btn-border);
  border-radius: 3px;
  padding: 4px 14px;
  font-size: 12px;
  font-family: var(--font-ui);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  box-shadow: var(--shadow-btn);
  color: #111;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: filter 0.1s;
}
.xp-button:hover { filter: brightness(1.05); }
.xp-button:active { box-shadow: inset 1px 1px 2px #0003; }
.xp-button.primary {
  background: linear-gradient(180deg, var(--xp-button-primary-start) 0%, var(--xp-button-primary-end) 100%);
  border-color: var(--xp-button-primary-border);
  color: #fff;
  text-shadow: 1px 1px 1px #0005;
}
.xp-button.danger {
  background: linear-gradient(180deg, var(--xp-button-danger-start) 0%, var(--xp-button-danger-end) 100%);
  border-color: var(--xp-button-danger-border);
  color: #fff;
  text-shadow: 1px 1px 1px #0005;
}
.xp-button.success {
  background: linear-gradient(180deg, var(--xp-button-success-start) 0%, var(--xp-button-success-end) 100%);
  border-color: var(--xp-button-success-border);
  color: #fff;
  text-shadow: 1px 1px 1px #0005;
}
.xp-separator {
  width: 1px;
  height: 20px;
  background: var(--xp-btn-border);
  margin: 0 2px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-ui);
  font-size: 13px;
}
.admin-table th {
  background: var(--admin-table-th-bg);
  color: var(--admin-table-th-text);
  padding: 7px 10px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
.admin-table td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--beige-dark);
  vertical-align: middle;
}
.admin-table tbody tr:nth-child(even) { background: var(--admin-table-row-even); }
.admin-table tbody tr:hover { background: var(--admin-table-row-hover); }
.admin-table input, .admin-table select {
  width: 100%;
  border: 1px solid var(--admin-table-input-border);
  padding: 3px 6px;
  font-size: 12px;
  font-family: var(--font-ui);
  background: #fff;
  border-radius: 2px;
  box-shadow: inset 1px 1px 2px #0002;
}
.admin-table input:focus, .admin-table select:focus {
  outline: 2px solid var(--admin-table-input-focus);
  outline-offset: -1px;
}

/* ── Admin table column helpers (replaces inline styles on td) ── */
.admin-col-active {
  text-align: center;
  width: 36px;
}
.admin-col-actions {
  white-space: nowrap;
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 4px 6px;
}
/* Small action buttons inside the schedule table */
.admin-slot-btn {
  padding: 3px 7px;
  font-size: 11px;
  line-height: 1.3;
}

/* Hint text used in rotation and JSON tabs */
.admin-hint-text {
  font-size: 12px;
  color: #888;
  margin-bottom: 12px;
  font-style: italic;
}

/* Profile pic preview text inside meta tab */
.profile-pic-preview-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--xp-blue-dark);
  margin-bottom: 4px;
}
.profile-pic-preview-hint {
  font-size: 11px;
  color: #888;
  font-style: italic;
}

.rotation-admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
  padding: 12px;
}
.rotation-admin-card {
  background: var(--rotation-admin-card-bg);
  border: 1px solid var(--rotation-admin-card-border);
  border-radius: 6px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.rotation-admin-card label {
  font-size: 11px;
  font-weight: 700;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.rotation-admin-card input {
  border: 1px solid #AAA;
  padding: 4px 6px;
  font-size: 13px;
  font-family: var(--font-ui);
  background: #fff;
  border-radius: 2px;
  width: 100%;
}
.rotation-admin-card .card-preview {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  background: var(--cream);
  border: 1px dashed #ccc;
  border-radius: 4px;
}
.card-preview img {
  width: 32px; height: 32px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid #ccc;
}

.json-preview {
  background: var(--json-preview-bg);
  color: var(--json-preview-text);
  font-family: 'Courier New', monospace;
  font-size: 12px;
  padding: 14px;
  border-radius: 4px;
  overflow: auto;
  max-height: 300px;
  line-height: 1.5;
  white-space: pre;
}

.toast {
  position: fixed;
  bottom: 50px;
  right: 20px;
  background: var(--toast-bg);
  color: var(--toast-text);
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  font-family: var(--font-ui);
  box-shadow: 3px 3px 10px var(--toast-shadow);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
  z-index: 200;
}
.toast.show { opacity: 1; transform: translateY(0); }

.admin-section-title {
  font-family: var(--font-ui);
  font-size: 18px;
  color: var(--xp-blue-dark);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.admin-notice {
  background: var(--admin-notice-bg);
  border: 2px solid var(--admin-notice-border);
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 12px;
  color: var(--admin-notice-color);
  margin: 12px 0;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.admin-notice strong { color: #5A3A00; }
.tab-bar {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--xp-btn-border);
  background: var(--xp-win-bg);
  padding: 0 8px;
  position: relative;
  z-index: 1;
}
.tab {
  padding: 6px 18px;
  font-size: 12px;
  font-weight: 700;
  font-family: var(--font-ui);
  cursor: pointer;
  border: 1px solid transparent;
  border-bottom: none;
  border-radius: 4px 4px 0 0;
  color: #444;
  margin-bottom: -2px;
  background: var(--tab-inactive-bg);
  margin-right: 4px;
  transition: background 0.1s;
}
.tab:hover { background: var(--beige); }
.tab.active { background: var(--tab-active-bg); border-color: var(--tab-active-border); color: var(--tab-active-color); }
.tab-panel { display: none; }
.tab-panel.active { display: block; overflow-y: auto;}

.meta-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 12px;
}
.meta-form-grid label {
  font-size: 11px;
  font-weight: 700;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: block;
  margin-bottom: 3px;
  margin-top: 15px;
}
.meta-form-grid input {
  width: 100%;
  border: 1px solid #AAA;
  padding: 5px 8px;
  font-size: 13px;
  font-family: var(--font-ui);
  background: #fff;
  border-radius: 3px;
  box-shadow: inset 1px 1px 2px #0002;
}
.meta-form-grid input:focus {
  outline: 2px solid var(--xp-blue);
  outline-offset: -1px;
}
.meta-form-grid .full-span { grid-column: 1 / -1; }

.profile-pic-preview-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  background: var(--beige);
  border: 1px solid #ccc;
  border-radius: 8px;
  margin-bottom: 10px;
}
.profile-pic-preview-wrap .mini-frame {
  width: 56px; height: 56px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--profile-preview-border);
  background: var(--profile-preview-bg);
  flex-shrink: 0;
}
.profile-pic-preview-wrap .mini-frame img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.profile-pic-preview-wrap .mini-frame .mini-fallback {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
}

.logo-preview-cell {
  display: flex;
  align-items: center;
  gap: 6px;
}
.logo-preview-cell img {
  width: 26px; height: 26px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid #ccc;
  flex-shrink: 0;
}
.logo-preview-cell input { flex: 1; }

.active-toggle {
  width: 16px; height: 16px;
  cursor: pointer;
  accent-color: var(--xp-blue);
}

/* ─────────────────────────────────────────────────────────────
   12. QUESTIONS PAGE STYLES
   ───────────────────────────────────────────────────────────── */
#output {
  margin-top: 8px;
  padding: 10px 14px;
  list-style: none;
  background: var(--output-bg);
  border: 2px solid var(--output-border);
  border-radius: 6px;
  box-shadow: inset 1px 1px 2px var(--output-shadow);
}
#output li {
  padding: 6px 8px;
  margin-bottom: 6px;
  background: var(--output-li-bg);
  border: 1px solid var(--output-li-border);
  border-radius: 4px;
  font-size: 13px;
  font-family: var(--font-ui);
  transition: background 0.1s;
}
#output li::before {
  content: "➤";
  margin-right: 6px;
  color: var(--output-li-marker);
  font-weight: bold;
}
#output li:last-child { margin-bottom: 0; }
#output li:hover { background: var(--output-li-hover-bg); }

.chaos-item {
  border: 1px solid var(--chaos-item-border);
  background: var(--chaos-item-bg);
  color: var(--chaos-item-color);
  font-weight: bold;
}

/* ─────────────────────────────────────────────────────────────
   13. UTILITIES / EXTRAS
   ───────────────────────────────────────────────────────────── */
.status-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--status-dot-bg);
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.update-badge {
  font-size: 11px;
  color: var(--update-badge-color);
  font-style: italic;
  text-align: right;
  padding: 4px 10px;
  font-family: var(--font-ui);
}
.xp-inset {
  border: 2px solid;
  border-color: var(--xp-inset-border-light) #fff #fff var(--xp-inset-border-light);
  padding: 4px 8px;
  background: #fff;
  font-size: 12px;
}

/* ─────────────────────────────────────────────────────────────
   14. DRAG COVER & WINDOW MANAGER EXTRAS
   ───────────────────────────────────────────────────────────── */
#wm-drag-cover {
  position: fixed;
  inset: 0;
  z-index: 9998;
  display: none;
  cursor: grabbing;
  background: transparent;
}

/* ─────────────────────────────────────────────────────────────
   15. DISCORD STYLES
   ───────────────────────────────────────────────────────────── */
.discord-window .xp-content.discord-iframe-wrapper {
  padding: 0;
  display: flex;
  flex-direction: column;
}
.discord-window iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* ─────────────────────────────────────────────────────────────
   17. GITHUB REPOS WINDOW
   ───────────────────────────────────────────────────────────── */
.repos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
  padding: 4px 2px;
}

.repo-card {
  background: var(--cream);
  border: 2px solid var(--xp-btn-border);
  border-radius: 6px;
  padding: 14px 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
  box-shadow: 2px 2px 0 var(--brown-soft);
  position: relative;
}
.repo-card:hover {
  transform: translateY(-3px);
  box-shadow: 3px 5px 0 var(--brown-soft);
  border-color: var(--xp-blue-light);
}

.repo-card-name {
  font-weight: 700;
  font-size: 13px;
  color: var(--xp-blue);
  display: flex;
  align-items: center;
  gap: 6px;
  word-break: break-word;
}
.repo-card-name .repo-icon { font-size: 15px; flex-shrink: 0; }

.repo-card-desc {
  font-size: 12px;
  color: #555;
  line-height: 1.4;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow-y: auto;
}
.repo-card-desc.empty { color: #aaa; font-style: italic; }

.repo-card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.repo-lang {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: #444;
}
.repo-lang-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 1px solid #0002;
}

.repo-stat {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  color: #666;
}

.repo-topic {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 600;
  background: var(--cream);
  color: var(--xp-blue-dark);
  border: 2px solid var(--xp-blue-dark);
}

.repos-loading, .repos-error {
  text-align: center;
  padding: 40px 20px;
  color: #888;
  font-style: italic;
  font-size: 13px;
}
.repos-error { color: #c00; }

/* Language colour map — set via inline style on the dot */

/* ─────────────────────────────────────────────────────────────
   16. RESPONSIVE MEDIA QUERIES
   ───────────────────────────────────────────────────────────── */
@media (min-width: 768px) {
  .rotation-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 768px) {
  body {
    overflow-y: auto;
    overflow-x: hidden;
    padding: 8px 8px 52px;
  }
  .desktop {
    position: static;
    display: flex;
    flex-direction: column;
    gap: 14px;
    overflow: visible;
    bottom: auto;
  }
  .desktop-icons {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 12px;
  }
  .xp-window,
  .xp-window.wm-open {
    position: static !important;
    display: flex !important;
    flex-direction: column;
    width: auto !important;
    height: auto !important;
    min-height: unset;
    box-shadow: var(--shadow-win);
    border-radius: var(--radius-win);
    animation: none !important;
    will-change: auto;
  }
  .xp-window.wm-maximized {
    border-radius: var(--radius-win);
  }
  .xp-window:not(.wm-focused) .xp-titlebar {
    background: var(--xp-titlebar);
  }
  .xp-titlebar { cursor: default; }
  #wm-drag-cover { display: none !important; }
  .taskbar-windows { display: none; }
  .taskbar-icon-btn { display: none; }
  .taskbar-item[data-open="questions"],
  .desktop-icon[data-open="questions"] {
    display: none;
  }
  .xp-window[data-wid="questions"] {
    display: none !important;
  }
  .xp-content.stream iframe,
  .xp-content.yt-video iframe {
    min-height: 220px;
    height: 55vw;
  }
  .hero-name { font-size: 30px; }
  .schedule-table th, .schedule-table td { padding: 8px; }
  .schedule-table th:nth-child(4), .schedule-table td:nth-child(4) { display: none; }
  .rotation-grid { grid-template-columns: 1fr 1fr; }
  .xp-titlebar .title-text { font-size: 11px; }
  .admin-table th:last-child, .admin-table td:last-child { display: none; }
  .admin-table th:nth-child(5), .admin-table td:nth-child(5) { display: none; }
  .taskbar { flex-wrap: wrap; justify-content: flex-start; padding: 0 4px; gap: 4px; }
  .taskbar-start { padding: 3px 8px; font-size: 12px; }
  .taskbar-clock-wrap { order: unset; margin-left: auto; gap: 4px; }
  .taskbar-clock { font-size: 14px; padding: 2px 6px; }
  .repos-grid { grid-template-columns: 1fr; }
  .meta-form-grid { grid-template-columns: 1fr; }
  .discord-window .xp-content.discord-iframe-wrapper {
    min-height: 420px;
  }
  .discord-window iframe {
    height: 100%;
    min-height: 380px;
  }
}

@media (max-width: 540px) {
  .platforms-row { flex-direction: column; align-items: stretch; }
  .platform-badge { justify-content: center; }
  .games-flex { justify-content: center; }
}

@media (max-width: 400px) {
  .hero-avatar { font-size: 48px; }
  .hero-name { font-size: 24px; }
  .schedule-table { font-size: 12px; }
  .td-time { font-size: 16px; }
}