/* IRINA OS / Summer interface
   Visual-only layer. No boot, audio, window, or game behavior is changed.
   Desktop sizing, window geometry and existing responsive breakpoints are inherited. */
:root {
  --irina-ink: #24436a;
  --irina-blue: #527fba;
  --irina-line: rgba(74, 119, 177, .18);
  --irina-surface: #f9fcff;
  --irina-focus: #265bad;
  --window-border: #b9d8ed;
  --window-title: #fbfdff;
  --window-title-2: #edf6ff;
  --shadow: 0 18px 52px rgba(53, 88, 149, .19), 0 3px 12px rgba(53, 88, 149, .09);
}
body { color: var(--irina-ink); background: #eaf4ff; }
.desktop[data-wallpaper-mode="image"]::before { opacity: 0; }

/* Desktop shortcuts. The illustration itself remains untouched. */
.desktop-icons { top: 26px; left: 26px; width: 112px; gap: 9px; }
.desktop-icon {
  width: 108px;
  min-height: 104px;
  padding: 10px 6px 8px;
  border-radius: 16px;
  color: #193b68;
  cursor: pointer;
  transition: background-color 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}
.desktop-icon:hover,
.desktop-icon.selected {
  border-color: rgba(255, 255, 255, .88);
  background: rgba(255, 255, 255, .68);
  box-shadow: 0 6px 18px rgba(61, 114, 167, .13);
}
.desktop-icon-art { margin-bottom: 5px; filter: drop-shadow(0 5px 7px rgba(43, 87, 143, .15)); }
.desktop-icon-label {
  max-width: 100px;
  font-size: 12px;
  font-weight: 700;
  text-shadow: 0 1px 5px #fff, 0 0 9px rgba(255, 255, 255, .94);
}
.folder-tab { background: #f0c98d; }
.folder-body {
  border-color: rgba(168, 115, 51, .24);
  background: linear-gradient(160deg, #ffe9bd, #f2c37e);
}
.arcade-desktop-icon {
  border-color: rgba(128, 148, 214, .45);
  border-radius: 13px;
  background: linear-gradient(145deg, #738bd1, #4c62a5);
  box-shadow: inset 0 1px rgba(255, 255, 255, .35), 0 6px 15px rgba(57, 92, 151, .20);
}
/* The desktop already communicates the anniversary visually. */
.desktop-watermark { display: none; }

/* Taskbar: retain main's exact height and position for window geometry. */
.taskbar {
  border-top: 1px solid rgba(255, 255, 255, .85);
  background: rgba(247, 252, 255, .91);
  color: #2d4d73;
  box-shadow: 0 -7px 28px rgba(73, 112, 160, .09);
  backdrop-filter: blur(18px) saturate(145%);
  -webkit-backdrop-filter: blur(18px) saturate(145%);
}
.start-button {
  min-width: 112px;
  margin: 4px 0 4px 5px;
  padding: 0 15px;
  border: 0;
  border-radius: 10px;
  background: #476fa8;
  color: #fff;
  font-size: 12px;
  letter-spacing: .015em;
}
.start-button:hover,
.taskbar .start-button.start-open { background: #365f98; }
.taskbar-apps { padding-left: 8px; gap: 5px; }
.taskbar-app-button {
  margin: 4px 0;
  height: calc(100% - 8px);
  border: 1px solid transparent;
  border-radius: 9px;
  background: rgba(104, 155, 210, .11);
  color: #294d77;
}
.taskbar-app-button:hover { background: rgba(104, 155, 210, .2); }
.taskbar-app-button.active {
  border-color: rgba(93, 146, 202, .28);
  border-bottom-color: #517fb9;
  background: #e0f1ff;
}
.tray { gap: 9px; font-variant-numeric: tabular-nums; }
.tray-status { color: #4f9ea1; }
.clock { color: #355678; font-weight: 600; }
.taskbar .sound-tray-button { border-radius: 9px; }
.taskbar .sound-tray-button:hover,
.taskbar .sound-tray-button[aria-expanded="true"] { background: rgba(78, 135, 193, .15); }

/* Window surfaces: game content and controls keep their current dimensions. */
.os-window {
  border: 1px solid var(--window-border);
  border-radius: 11px;
  box-shadow: var(--shadow);
}
.os-window.active { box-shadow: 0 24px 66px rgba(46, 83, 145, .24), 0 5px 14px rgba(46, 83, 145, .11); }
.window-titlebar:not(.dark) {
  border-bottom-color: #dceafa;
  background: linear-gradient(180deg, #fafdff, #eff7ff);
}
.window-titlebar:not(.dark) .window-title { color: #2e557f; }
.window-control:not(.dark-control) {
  border-left-color: rgba(82, 124, 179, .13);
  color: #3b628e;
}
.window-control:not(.dark-control):hover { background: rgba(98, 152, 210, .13); }
.window-control.close:hover { background: #de6784; color: #fff; }

/* Archive: the title bar shows location; decorative address row is redundant.
   The disabled arrows cannot navigate, so removing them is purely presentational. */
.explorer-toolbar { display: none; }
.explorer-meta {
  min-height: 36px;
  padding: 0 20px;
  justify-content: flex-end;
  border-bottom-color: #e8f0f8;
  color: #6480a0;
}
.explorer-meta > span:first-child:not(#clipCount) { display: none; }
.archive-grid { gap: 12px; padding: 16px; background: #fff; }
.clip-file { padding: 7px; border-radius: 10px; cursor: pointer; }
.clip-file:hover,
.clip-file.selected { border-color: #c7dff3; background: #edf7ff; }
.clip-thumbnail {
  border-color: #dce9f6;
  border-radius: 7px;
  background: #eef6fd;
}
.clip-filename { margin-top: 8px; color: #2e4c6d; font-size: 12px; line-height: 1.45; }
.clip-origin-badge { border-radius: 4px; }

/* Start menu styles use a more specific selector than runtime-injected rules.
   Keep all original buttons, links and event handlers. */
.irina-start-menu.irina-start-menu {
  left: 8px;
  bottom: 55px;
  width: min(356px, calc(100vw - 16px));
  padding: 15px;
  border: 1px solid rgba(255, 255, 255, .85);
  border-radius: 14px;
  background: rgba(250, 253, 255, .97);
  color: #23486f;
  box-shadow: 0 18px 48px rgba(38, 73, 126, .23);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}
.irina-start-head.irina-start-head {
  gap: 10px;
  padding: 4px 4px 14px;
  border-bottom-color: #e1edf9;
}
.irina-start-logo.irina-start-logo {
  background: #e7f2fd;
  border-radius: 11px;
}
.irina-start-head.irina-start-head strong { font-size: 15px; letter-spacing: .015em; }
.irina-start-head small,
.irina-start-title { display: none !important; }
.irina-start-grid.irina-start-grid { margin-top: 13px; gap: 8px; }
.irina-start-app.irina-start-app {
  min-height: 72px;
  border: 1px solid #e0edf9;
  border-radius: 10px;
  background: #f0f7ff;
  color: #2a5079;
}
.irina-start-app:hover.irina-start-app { background: #e3f1fe; }
.irina-start-app .app-icon { background: #fff; border-radius: 8px; }
.irina-start-app small { display: none; }
.irina-start-links.irina-start-links {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid #e1edf9;
  gap: 3px;
}
.irina-start-link.irina-start-link {
  min-height: 40px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #31597f;
  font-size: 12px;
}
.irina-start-link:hover.irina-start-link { background: #eaf4ff; }
.irina-start-link span:last-child { color: #5e88b5; }

/* Match the sound flyout to the system shell without changing volume behavior. */
.sound-panel.sound-panel {
  border-color: rgba(255, 255, 255, .82);
  border-radius: 13px;
  background: rgba(250, 253, 255, .98);
  color: #294d73;
  box-shadow: 0 15px 42px rgba(47, 83, 144, .19);
}
.sound-panel .sound-panel-head span { color: #4c7197; }
.sound-mute-button.sound-mute-button { background: #eaf3fc; color: #274c74; }
.sound-mute-button:hover.sound-mute-button { background: #dcecfb; }
.sound-panel .sound-panel-note { color: #6d829a; }
.sound-slider { accent-color: #527eb6; }

/* Selection and keyboard navigation. */
.desktop-icon:focus-visible,
.start-button:focus-visible,
.taskbar-app-button:focus-visible,
.window-control:focus-visible,
.clip-file:focus-visible,
.irina-start-app:focus-visible,
.irina-start-link:focus-visible,
.sound-tray-button:focus-visible {
  outline: 2px solid var(--irina-focus);
  outline-offset: 2px;
}
@media (max-width: 760px) {
  .desktop-icons { top: 15px; left: 12px; width: 94px; gap: 6px; }
  .desktop-icon { width: 92px; min-height: 98px; padding: 8px 4px; border-radius: 12px; }
  .desktop-icon-label { font-size: 12px; }
  .start-button { min-width: 44px; margin-left: 2px; padding: 0 9px; }
  .taskbar-apps { padding-left: 4px; }
  .taskbar-app-button { width: 44px; padding: 0; justify-content: center; }
  .tray { gap: 5px; padding: 0 8px; }
  .irina-start-menu.irina-start-menu {
    left: 6px;
    right: 6px;
    bottom: 54px;
    width: auto;
    max-height: calc(100vh - 66px);
  }
  .archive-grid { gap: 10px; padding: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .desktop-icon { transition: none; }
}


/* Larger initial desktop windows; compact viewports retain the existing full-screen layout. */
@media (min-width:761px) {
  .explorer-window {
    top:clamp(16px,3vh,40px);left:max(16px,calc(50vw - 630px));
    width:min(1260px,calc(100vw - 32px));height:min(900px,calc(100vh - 76px));
  }
  .arcade-launcher-window {
    top:clamp(16px,3vh,40px);left:max(16px,calc(50vw - 585px));
    width:min(1170px,calc(100vw - 32px));height:min(900px,calc(100vh - 76px));
  }
}
@media (min-width:901px) {
  .arcade-window,.chess-window {
    top:clamp(16px,3vh,40px);left:max(16px,calc(50vw - 750px));
    width:min(1500px,calc(100vw - 32px));height:min(1140px,calc(100vh - 76px));
  }
  .online-apple-window {
    top:clamp(16px,3vh,40px);left:max(16px,calc(50vw - 787px));
    width:min(1575px,calc(100vw - 32px));height:min(1043px,calc(100vh - 76px));
  }
}
@media (min-width:761px) {
  .battery-game-window.battery-game-window {
    top:clamp(16px,3vh,40px);left:max(16px,calc(50vw - 585px));
    width:min(1170px,calc(100vw - 32px));height:min(930px,calc(100vh - 76px));
  }
}

/* The play areas keep their distinctive boards while the window chrome matches IRINA OS. */
.arcade-window,.chess-window,.online-apple-window,
.battery-game-window.battery-game-window {background:#f7fbff;color:#294b70}
.arcade-shell,.chess-shell,.online-apple-shell,
.battery-game-window .battery-game-shell {background:#f7fbff}
.arcade-window .window-titlebar.dark,.chess-window .window-titlebar.dark,
.online-apple-window .window-titlebar.dark,.battery-game-window .window-titlebar.dark {
  border-bottom-color:#dceafa;background:linear-gradient(180deg,#fafdff,#eff7ff);color:#2e557f
}
.arcade-window .window-control.dark-control,.chess-window .window-control.dark-control,
.online-apple-window .window-control.dark-control,.battery-game-window .window-control.dark-control {
  border-left-color:#dceafa;color:#3b628e
}
.arcade-window .window-control.dark-control:hover,.chess-window .window-control.dark-control:hover,
.online-apple-window .window-control.dark-control:hover,.battery-game-window .window-control.dark-control:hover {
  background:#e1f0fe
}

/* Gomoku / Chess: lighter panels without altering either game board. */
.arcade-sidebar {border-right-color:#deebf8;background:#edf6ff}
.arcade-brand {border-bottom-color:#d4e5f6;color:#2d547d}
.arcade-brand small,.arcade-game-item small {display:none}
.arcade-game-item,.arcade-game-item.active {border-color:#d6e7f6;background:#fff;color:#294b70}
.arcade-game-icon {background:#edf6ff}
.gomoku-card,.chess-card {border-color:#dceafa;background:#fff}
.gomoku-status,.chess-status,.gomoku-comment {color:#294b70}
.gomoku-comment {border-left-color:#8cb6e2;background:#f1f8ff}
.gomoku-keyboard-help,.gomoku-rules,.chess-rules,.chess-card-title {color:#6480a0}
.gomoku-keyboard-position {color:#476fa8}
.gomoku-player,.chess-player {background:#f1f7ff}
.gomoku-difficulty,.chess-difficulty,.gomoku-opponent,
.gomoku-button,.chess-button {
  border-color:#d6e7f6;background:#f7fbff;color:#355c83
}
.gomoku-difficulty:hover:not(:disabled),.chess-difficulty:hover:not(:disabled),
.gomoku-opponent:hover,.gomoku-button:hover,.chess-button:hover {background:#e8f3ff}
.gomoku-difficulty.active,.chess-difficulty.active,.gomoku-opponent.active {
  border-color:#8bb7e5;background:#e5f2ff;color:#244a71
}
.gomoku-difficulty small,.chess-difficulty small,.gomoku-opponent small {color:#6984a0}
.gomoku-button.primary,.chess-button.primary {background:#476fa8;color:#fff}
.gomoku-button.primary:hover,.chess-button.primary:hover {background:#365f98}
.gomoku-ai-badge,.chess-ai-badge {border-color:#d6e7f6;background:#edf6ff;color:#4d7195}
.chess-history-row {border-bottom-color:#ebf1f9}
.chess-history-row span,.chess-history-empty {color:#7790a8}
.chess-history-row strong {color:#355c83}
.chess-promotion-card {border-color:#dceafa;background:#fff;color:#294b70}
.chess-promotion-options button {border-color:#d6e7f6;background:#f5faff;color:#294b70}
.chess-promotion-options button:hover {background:#e5f2ff}

/* Apple: one light scoreboard and a central, readable result dialog. */
.online-apple-shell {background:#f7fbff}
.online-apple-head {align-items:center;color:#294b70}
#appleRemaining,#soloAppleRemaining {color:#476fa8}
.online-apple-board {border-color:#c5dbed;background:#eaf2fb;border-radius:8px;overflow:hidden}
.online-apple-cell {border-color:#e7d6d1;background:#fffaf6;color:#423d43}
.online-apple-cell.empty {background:#edf4fa}
.online-apple-cell.selected {background:#fff0ae;outline-color:#d09f4c}
.online-apple-cell:focus-visible {outline-color:#3c72bb}
.online-apple-message {color:#6480a0}
.online-apple-shell aside {padding:8px 2px;color:#294b70}
.online-apple-shell aside h3,.online-apple-shell aside > p {display:none}
.online-apple-scores {margin:0 0 15px}
.online-apple-scores > div {background:#fff;border:1px solid #e0edf9;border-radius:9px}
.online-apple-scores > div.me {outline:1px solid #83b0de}
.online-apple-shell aside button {border:1px solid #cfe1f3;border-radius:8px;background:#fff;color:#31597f}
.online-apple-shell aside button:hover {background:#eaf4ff}
.apple-results {background:rgba(47,83,124,.23)}
.apple-results-card {
  border:1px solid #d7e7f6;background:#fff;color:#294b70;
  box-shadow:0 24px 66px rgba(39,70,115,.24)
}
.apple-results-card h2 {color:#294b70}
.apple-results-summary {color:#315f91;font-size:21px;font-weight:800;line-height:1.4}
.apple-results-score {display:flex;align-items:baseline;justify-content:center;gap:8px;margin:12px 0 22px;color:#476fa8}
.apple-results-score strong {font:800 clamp(48px,7vw,76px)/1 ui-monospace,monospace}
.apple-results-score span {font-size:20px;font-weight:700}
.apple-results-list li {background:#f1f7ff;color:#294b70}
.apple-results-list li.me {background:#e4f1ff;outline-color:#99c4ec}
.apple-results-list li:first-child .apple-results-rank {background:#476fa8;color:#fff}
.apple-results-rank {background:#dfeaf6;color:#41658c}
.apple-results-name small {background:#dcebf9;color:#54769a}
.apple-results-list strong {color:#315f91}
.apple-results-primary {background:#476fa8;color:#fff}
.apple-results-secondary {border-color:#cfe1f3;color:#31597f}

/* Battery: brighter frame and play field, with visible white collectibles. */
.battery-game-window .battery-game-hud,
.battery-game-window .battery-game-controls {border-color:#dceafa;background:#f1f8ff;color:#294b70}
.battery-game-window .battery-stat small,.battery-game-window .battery-control-hint {color:#6480a0}
.battery-game-window .battery-meter {border-color:#a5c6e6;background:#dbeefa}
.battery-game-window .battery-meter::after {background:#a5c6e6}
.battery-game-window .battery-fill {background:linear-gradient(90deg,#a9d2ff,#66b4d3,#79d7c1)}
.battery-game-window .battery-game-field {
  background:linear-gradient(rgba(255,255,255,.17) 1px,transparent 1px),
    linear-gradient(90deg,rgba(255,255,255,.17) 1px,transparent 1px),
    linear-gradient(180deg,#b6d7f2,#83b0da);
  background-size:32px 32px,32px 32px,auto
}
.battery-game-window .battery-heart {filter:drop-shadow(0 2px 2px rgba(28,68,111,.7))}
.battery-game-window .battery-player-label {color:#294b70}
.battery-game-window .battery-move-button {border-color:#bed6ed;background:#fff;color:#31597f}
.battery-game-window .battery-move-button.pressed {background:#dcecff}
.battery-game-window .battery-game-overlay {background:rgba(47,83,124,.23)}
.battery-game-window .battery-game-card {border-color:#d7e7f6;background:#fff;color:#294b70}
.battery-game-window .battery-game-card h2 {color:#294b70}
.battery-game-window .battery-game-card p {color:#6480a0}
.battery-game-window .battery-game-primary {border:0;background:#476fa8;color:#fff}

/* Starting a round uses the same light surface as the launcher. */
.game-start-overlay {background:rgba(239,247,255,.93);color:#294b70}
.game-start-eyebrow {color:#668bb4}
.game-start-description {color:#6480a0}
.game-start-number {color:#476fa8;text-shadow:none}
.game-start-button {background:#476fa8;color:#fff}
.game-start-button:hover {background:#365f98}
.arcade-queue [draggable="true"] {cursor:grab}
.arcade-queue [draggable="true"]:active {cursor:grabbing}
.arcade-queue .drag-over {border-color:#5e95d4;background:#e2f0ff;box-shadow:inset 0 0 0 1px #5e95d4}
