/* Custom System Fonts Declarations for Theme Engine Overrides */
@import url('https://googleapis.com');

/* Global Reset and Full Screen Boundary Constraints */
body, html, div, button, span, input, textarea, label, p, ul, li, h3, h4, h5 {
  box-sizing: border-box;
  user-select: none;
  -webkit-user-drag: none;
}

body, html {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  background-color: #000;
  font-family: "Tahoma", "Segoe UI", sans-serif;
}

/* System Typography Modifier Variations managed by Control Panel */
body.sys-font-classic, .desktop.sys-font-classic, .window.sys-font-classic, .taskbar.sys-font-classic, .start-menu.sys-font-classic { font-family: "Tahoma", "Segoe UI", sans-serif; }
body.sys-font-pixel, .desktop.sys-font-pixel, .window.sys-font-pixel, .taskbar.sys-font-pixel, .start-menu.sys-font-pixel { font-family: "VT323", monospace; font-size: 16px; }
body.sys-font-cute, .desktop.sys-font-cute, .window.sys-font-cute, .taskbar.sys-font-cute, .start-menu.sys-font-cute { font-family: "Cute Font", cursive; font-size: 19px; }



/* Main Desktop Screen Base Layer Canvas */
.desktop {
  width: 100%;
  height: calc(100% - 30px);
  background: url('https://i.pinimg.com/736x/12/b3/43/12b3435b73125f0ac12cbb0d2b1b0046.jpg') no-repeat center center;
  background-size: cover;
  padding: 15px;
  position: relative;
}

/* App Shortcuts Vertical Alignment Columns Grid Layout */
.shortcuts-grid {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 15px;
  height: 100%;
  width: max-content;
}
.app-icon {
  width: 85px;
  height: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: 4px;
  text-align: center;
}
.app-icon:hover {
  background: rgba(255, 255, 255, 0.2);
  outline: 1px dotted rgba(255, 255, 255, 0.6);
}
.app-icon .icon-pic {
  font-size: 32px;
  margin-bottom: 2px;
  filter: drop-shadow(1px 2px 2px rgba(0,0,0,0.4));
}
.app-icon span {
  color: white;
  font-size: 11px;
  text-shadow: 1px 1px 2px #000;
  max-width: 80px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Floating Window Outlines Styled with Custom Light Pastel Pink (#FFD4E9) Borders */
.window {
  position: absolute;
  background: #ece9d8;
  border: 3px solid #ffd4e9;
  border-top-left-radius: 7px;
  border-top-right-radius: 7px;
  box-shadow: 3px 5px 15px rgba(0,0,0,0.3);
  display: none;
  flex-direction: column;
  /* Adaptive content size constraints */
  width: max-content;
  height: max-content;
  min-width: 320px;
  min-height: 200px;
  /* Strictly limits growth to 80% of the browser screen size */
  max-width: 80vw;
  max-height: 80vh;
  overflow: hidden;
  left: 100px;
  top: 50px;
}

.window-header {
  background: linear-gradient(to bottom, #fce0ed 0%, #f7beda 25%, #efa4ca 60%, #df8bb3 100%);
  padding: 5px 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: white;
  font-weight: bold;
  font-size: 12px;
  letter-spacing: 0.3px;
  text-shadow: 1px 1px 1px rgba(0,0,0,0.2);
  cursor: move;
}
.header-buttons { display: flex; gap: 4px; }
.win-btn {
  width: 21px;
  height: 21px;
  border-radius: 3px;
  color: white;
  font-weight: bold;
  font-size: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 1px 1px 1px rgba(255,255,255,0.4);
}
.min-btn {
  background: linear-gradient(to bottom, #7ca6f5 0%, #3d7ae3 20%, #154cb8 60%, #002aa3 100%);
  border: 1px solid #002280;
}
.close-btn {
  background: linear-gradient(to bottom, #e76641 0%, #e84c22 20%, #cc2b02 60%, #941a01 100%);
  border: 1px solid #7a1500;
}
.win-btn:hover { filter: brightness(1.15); }
.window-content {
  margin: 3px;
  background: white;
  border: 1px solid #ffd4e9;
  flex-grow: 1;
  overflow-y: auto;
  color: #000;
}

.explorer-grid { padding: 15px; display: flex; gap: 20px; }
.explorer-folder-node {
  width: 70px;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  text-align: center;
}
.folder-emoji { font-size: 32px; filter: drop-shadow(1px 1px 1px rgba(0,0,0,0.15)); }
.folder-label { font-size: 11px; margin-top: 4px; color: #000; }
.folder-breadcrumb-bar {
  background: #f1eee0;
  padding: 4px 8px;
  border-bottom: 1px solid #ffd4e9;
  display: flex;
  align-items: center;
  gap: 10px;
}
.folder-nav-btn { padding: 1px 6px; font-size: 11px; cursor: pointer; }
.path-text { font-size: 11px; color: #555; font-weight: bold; }
.sub-view-pane { padding: 15px; font-size: 12px; }
.media-placeholder-frame {
  width: 100%; height: 120px; background: #fafafa;
  border: 2px dashed #efa4ca; display: flex; align-items: center;
  justify-content: center; color: #a4507b;
}
/* Split Pane Layout Panels (Diary & Email Sidebars) */
.split-pane-layout {
  display: flex;
  flex-grow: 1;
  height: calc(100% - 25px);
}
.split-sidebar-list {
  width: 130px;
  background: #fdf2f7;
  border-right: 1px solid #ffd4e9;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  overflow-y: auto;
}
.sidebar-list-row {
  padding: 5px;
  font-size: 11px;
  background: white;
  border: 1px solid #df8bb3;
  border-radius: 3px;
  cursor: pointer;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}
/* Split Pane Layout Panels (Diary & Email Sidebars) */
.split-sidebar-list .sidebar-list-row:hover, 
.split-sidebar-list .row-selected {
  background: #ffd4e9;
  font-weight: bold;
}

/* MS Paint Canvas UI Blocks */
.paint-options-bar {
  background: #f1eee0;
  padding: 5px;
  border-bottom: 1px solid #ffd4e9;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
}
.paint-options-bar input[type="range"] {
  width: 70px;
  cursor: pointer;
  background: #df8bb3;
}
.paint-clear-btn {
  padding: 2px 8px;
  cursor: pointer;
}
.paint-viewport-box {
  background: #808080;
  padding: 5px;
  display: flex;
  justify-content: center;
  align-items: center;
}
.paint-viewport-box canvas {
  background: white;
  box-shadow: 1px 1px 4px rgba(0,0,0,0.4);
  cursor: crosshair;
}

/* Media Player Component Containers */
.current-player-card {
  padding: 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}
.music-disc-graphic {
  font-size: 48px;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.disc-rotate {
  animation: rotateDisc 2.5s linear infinite;
}
.track-details-block {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.track-meta-title {
  font-size: 12px;
  font-weight: bold;
}
.track-meta-status {
  font-size: 10px;
  color: #666;
}
.player-widget-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
}
.media-toggle-trigger {
  padding: 4px 12px;
  font-size: 11px;
  font-weight: bold;
  background: #ffd4e9;
  border: 1px solid #df8bb3;
  cursor: pointer;
  border-radius: 3px;
}
.volume-slider-box {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
}
.volume-slider-box input {
  width: 90px;
  cursor: pointer;
  background: #df8bb3;
}

/* Visual Novel Sandbox UI Layer */
.vn-viewport-wrapper {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #000;
  position: relative;
}
.vn-stage-render-box {
  flex-grow: 1;
  background: #444;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  overflow: hidden;
  height: 150px;
}
.vn-character-mesh {
  font-size: 80px;
  transform: translateY(15px);
  animation: floatChar 3s ease-in-out infinite;
}
.vn-dialogue-console {
  height: 80px;
  background: rgba(247, 190, 218, 0.95);
  border-top: 2px solid #df8bb3;
  padding: 8px 12px;
  position: relative;
}
.vn-speaker-tag {
  position: absolute;
  top: -16px;
  left: 12px;
  background: #df8bb3;
  color: white;
  font-weight: bold;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
}
.vn-text-stream {
  font-size: 12px;
  color: #000;
  line-height: 1.4;
  margin-top: 4px;
}
.vn-choices-tray-panel {
  position: absolute;
  bottom: 90px;
  left: 5%;
  width: 90%;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.vn-branch-row {
  background: white;
  border: 1px solid #df8bb3;
  padding: 6px;
  border-radius: 4px;
  font-size: 11px;
  text-align: center;
  cursor: pointer;
  font-weight: bold;
  box-shadow: 1px 2px 4px rgba(0,0,0,0.2);
}
.vn-branch-row:hover {
  background: #ffd4e9;
  color: #b30052;
}

/* Control Panel & Secure Gateways */
.lock-shield-form {
  padding: 25px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}
.lock-icon-graphic {
  font-size: 42px;
}
.lock-shield-form input {
  padding: 4px 8px;
  border: 1px solid #df8bb3;
  border-radius: 3px;
  outline: none;
  font-size: 12px;
  text-align: center;
}
.cp-auth-btn {
  padding: 4px 14px;
  background: #df8bb3;
  border: 1px solid #b30052;
  color: white;
  border-radius: 3px;
  cursor: pointer;
  font-weight: bold;
}
.cp-alert-fail {
  color: red;
  font-size: 11px;
  font-weight: bold;
}
.dashboard-scroller-track {
  padding: 12px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.dashboard-breakline {
  width: 100%;
  border: 0;
  border-top: 1px dashed #efa4ca;
  margin: 2px 0;
}
.dashboard-panel-card {
  background: #fdf2f7;
  border: 1px dashed #df8bb3;
  border-radius: 5px;
  padding: 12px;
  font-size: 12px;
}
.dashboard-panel-card h5 {
  margin: 0 0 6px 0;
  color: #b30052;
  font-size: 12px;
}
.dashboard-panel-card input[type="text"], .cfg-textarea-node {
  width: 100%;
  padding: 4px 6px;
  border: 1px solid #efa4ca;
  border-radius: 3px;
  font-size: 11px;
  outline: none;
}
.cfg-textarea-node {
  height: 45px;
  resize: none;
}
.cfg-dropdown-node {
  padding: 3px;
  font-size: 11px;
  border: 1px solid #efa4ca;
  outline: none;
  width: 100%;
  cursor: pointer;
}
.cfg-action-btn {
  margin-top: 8px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: bold;
  background: #f7beda;
  border: 1px solid #b30052;
  border-radius: 3px;
  cursor: pointer;
}

/* Fixed Bottom Taskbar Matrix */
.taskbar {
  width: 100%;
  height: 30px;
  background: linear-gradient(to bottom, #fce0ed 0%, #f7beda 25%, #efa4ca 60%, #df8bb3 100%);
  position: absolute;
  bottom: 0;
  left: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #ffdeed;
  box-shadow: inset 0 1px 2px rgba(255,255,255,0.6);
  z-index: 10000;
}
.taskbar-left-group {
  display: flex;
  height: 100%;
  align-items: center;
  flex-grow: 1;
}
.start-btn {
  height: 100%;
  padding: 0 16px;
  background: linear-gradient(to bottom, #f9cbdf 0%, #f5abcf 15%, #ed86ba 50%, #c4578e 100%);
  color: white;
  font-style: italic;
  font-weight: bold;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-top-right-radius: 8px;
  border-bottom-right-radius: 8px;
  box-shadow: 2px 0 4px rgba(0,0,0,0.15), inset 1px 1px 1px rgba(255,255,255,0.5);
  cursor: pointer;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.4);
  margin-right: 10px;
}
.start-btn:hover {
  filter: brightness(1.05);
}
.running-programs-dock-shelf {
  display: flex;
  gap: 4px;
  height: 24px;
  align-items: center;
}
.program-tab {
  width: 105px;
  height: 100%;
  background: linear-gradient(to bottom, #fce0ed 0%, #f7beda 40%, #efa4ca 100%);
  border: 1px solid #df8bb3;
  border-radius: 3px;
  color: #444;
  font-size: 11px;
  display: none;
  align-items: center;
  padding: 0 6px;
  cursor: pointer;
  font-weight: bold;
  box-shadow: inset 0 1px 1px white;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.program-tab.tab-focused {
  background: linear-gradient(to bottom, #df8bb3 0%, #efa4ca 60%, #f7beda 100%);
  color: #000;
  border-color: #b30052;
}
.taskbar-clock {
  height: 100%;
  background: linear-gradient(to bottom, #f8cde2 0%, #ee9cc4 100%);
  border-left: 1px solid #d07ba4;
  box-shadow: inset 1px 0 1px #ffe8f4;
  color: #333;
  font-size: 11px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  font-weight: bold;
}

/* System Start Menu Dropdown */
.start-menu {
  position: absolute;
  bottom: 30px;
  left: 0;
  width: 350px;
  height: 360px;
  background: #fff;
  border: 2px solid #ed86ba;
  border-top-left-radius: 6px;
  border-top-right-radius: 6px;
  box-shadow: 2px -2px 10px rgba(0,0,0,0.25);
  display: none;
  flex-direction: column;
  z-index: 9999;
  overflow: hidden;
}
.start-header {
  background: linear-gradient(to bottom, #f7beda 0%, #ed86ba 100%);
  padding: 8px 12px;
  display: flex;
  align-items: center;
  color: white;
  font-weight: bold;
  font-size: 13px;
  text-shadow: 1px 1px 1px rgba(0,0,0,0.2);
  border-bottom: 1px solid #d07ba4;
}
.start-avatar {
  width: 32px;
  height: 32px;
  background: white;
  border: 1px solid #fff;
  border-radius: 3px;
  margin-right: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}
.start-body {
  display: flex;
  flex-grow: 1;
  height: calc(100% - 76px);
}
.start-left-column-programs {
  width: 50%;
  background: white;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.start-right-column-folders {
  width: 50%;
  background: #fdf2f7;
  border-left: 1px solid #f9daeb;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.menu-item-row {
  display: flex;
  align-items: center;
  padding: 4px;
  cursor: pointer;
  font-size: 11px;
  color: #333;
  border-radius: 3px;
}
.menu-item-row:hover {
  background: #df8bb3;
  color: white;
}
.menu-item-row:hover .menu-label-sub {
  color: #fdf2f7;
}
.menu-icon-symbol {
  font-size: 16px;
  margin-right: 6px;
  width: 18px;
  text-align: center;
}
.menu-text-layout-block {
  display: flex;
  flex-direction: column;
}
.menu-label-main {
  font-weight: bold;
}
.menu-label-sub {
  font-size: 9px;
  color: #777;
}
.folder-bold-text {
  font-weight: bold;
}
.start-footer-bar {
  height: 36px;
  background: linear-gradient(to bottom, #f7beda 0%, #df8bb3 100%);
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 0 10px;
  border-top: 1px solid #efa4ca;
}
.system-shutdown-trigger-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  color: white;
  font-size: 11px;
  font-weight: bold;
  cursor: pointer;
  padding: 3px 6px;
  text-shadow: 1px 1px 1px rgba(0,0,0,0.2);
}
.system-shutdown-trigger-btn:hover {
  background: rgba(255,255,255,0.2);
  border-radius: 3px;
}

/* Animations Layout Maps */
@keyframes floatChar {
  0%, 100% { transform: translateY(15px); }
  50% { transform: translateY(4px); }
}
@keyframes rotateDisc {
  100% { transform: rotate(360deg); }
}

/* Lock Visual Novel Window Dimensions exactly to 876x688 */
#vn-win {
  width: 876px !important;
  height: 688px !important;
  max-width: 876px !important;
  max-height: 688px !important;
}

/* Let the inner stage render fluidly across the new fixed size space */
#vn-win .vn-viewport-wrapper {
  height: 100%;
}
#vn-win .vn-stage-render-box {
  flex-grow: 1;
  height: auto; /* Overrides the old 150px layout crush constraint */
  background-size: cover;
  background-position: center;
}

/* Re-align Visual Novel Dialogue and Choice Components to the 876x688 Canvas */
#vn-win .vn-dialogue-console {
  height: 120px; /* Expands the padding layout frame for easier text scannability */
  padding: 12px 20px;
}

#vn-win .vn-text-stream {
  font-size: 14px; /* Increases sizing variables so text reads clearly on a large screen */
  line-height: 1.6;
  margin-top: 8px;
}

#vn-win .vn-speaker-tag {
  top: -18px;
  left: 20px;
  font-size: 12px;
  padding: 3px 12px;
}

#vn-win .vn-choices-tray-panel {
  bottom: 140px; /* Positions choices float comfortably above the dialogue panel */
  left: 10%;
  width: 90%;
  gap: 10px; /* Spacers separate decision lines */
}

#vn-win .vn-branch-row {
  font-size: 13px;
  padding: 10px 15px; /* Creates larger, clickable retro button panels */
}
