:root {
  --bg-top: #0b4359;
  --bg-bottom: #021c2d;
  --panel-bg: rgba(239, 244, 246, 0.9);
  --panel-border: rgba(7, 35, 49, 0.48);
  --accent: #f05454;
  --accent-strong: #c83838;
  --success: #2f8f63;
  --text-main: #122432;
  --text-soft: #426172;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  --desktop-width: min(1320px, 96vw);
  --desktop-height: min(820px, calc(100vh - 48px));
  --task-font: "Trebuchet MS", "Segoe UI", sans-serif;
  --title-font: "Georgia", "Times New Roman", serif;
  --win-font: "Segoe UI", "Segoe UI Variable", system-ui, -apple-system, sans-serif;
  --win-bg: #f3f3f3;
  --win-bg-solid: #ffffff;
  --win-border: #e5e5e5;
  --win-border-strong: #d1d1d1;
  --win-text: #1c1c1c;
  --win-text-muted: #5d5d5d;
  --win-accent: #0067c0;
  --win-caption-hover: #e5e5e5;
  --win-close-hover: #e81123;
  --win-desktop-shine: rgba(120, 190, 255, 0.35);
  --win-radius: 8px;
  --win-radius-sm: 4px;
  --cursor-aim: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='5.5' stroke='%230a0a0a' stroke-width='2.6'/%3E%3Ccircle cx='12' cy='12' r='5' stroke='white' stroke-width='1.4'/%3E%3Cpath d='M12 1.8v5.2M12 17v5.2M1.8 12H7M17 12h5.2' stroke='%230a0a0a' stroke-width='2.8'/%3E%3Cpath d='M12 2.4v4.6M12 17v4.6M2.4 12H7M17 12h4.6' stroke='white' stroke-width='1.4'/%3E%3C/g%3E%3C/svg%3E") 12 12, crosshair;
  --cursor-default: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M3 2L3 20L8 15L11.2 22L14 20.8L10.7 13.9H18L3 2Z' fill='%230a0a0a' stroke='white' stroke-width='1.2' stroke-linejoin='round'/%3E%3C/svg%3E") 2 2, default;
  --cursor-pointer: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M6.9 21c-2.3-2.1-3.2-4.2-3.2-6 0-1.1.7-1.9 1.8-1.9.9 0 1.6.5 2.2 1.1V7.5c0-.9.7-1.7 1.7-1.7.9 0 1.7.8 1.7 1.7v3.6h.6V6.7c0-.9.7-1.7 1.7-1.7s1.7.8 1.7 1.7v4.4h.6V8c0-.9.7-1.7 1.7-1.7s1.7.8 1.7 1.7v6.5c0 3.9-2.3 6.5-6.1 6.5H12c-1.8 0-3.4.2-5.1 0Z' fill='%230a0a0a' stroke='white' stroke-width='1.1' stroke-linejoin='round'/%3E%3C/svg%3E") 9 3, pointer;
  --cursor-grab: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M6.2 20.5c-2-1.7-2.8-3.5-2.8-5.3 0-1 .7-1.9 1.8-1.9.8 0 1.4.4 2 .9V9.1c0-.9.7-1.6 1.5-1.6.9 0 1.6.7 1.6 1.6v2.4h.6V7.3c0-.9.7-1.6 1.6-1.6s1.6.7 1.6 1.6v4.2h.6V8c0-.9.7-1.6 1.6-1.6s1.6.7 1.6 1.6v3.5h.6V9.2c0-.9.7-1.6 1.6-1.6s1.6.7 1.6 1.6V15c0 3.5-2.1 5.7-5.5 5.7h-4.4c-1.8 0-3.3.2-4.8-.2Z' fill='%230a0a0a' stroke='white' stroke-width='1.1' stroke-linejoin='round'/%3E%3C/svg%3E") 10 5, grab;
  --cursor-grabbing: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Crect x='4.2' y='9.4' width='15.6' height='10.4' rx='3.1' fill='%230a0a0a' stroke='white' stroke-width='1.2'/%3E%3Crect x='5' y='5.1' width='2.8' height='5' rx='1.1' fill='%230a0a0a' stroke='white' stroke-width='1'/%3E%3Crect x='8.6' y='4.3' width='2.8' height='5.7' rx='1.1' fill='%230a0a0a' stroke='white' stroke-width='1'/%3E%3Crect x='12.2' y='4.8' width='2.8' height='5.2' rx='1.1' fill='%230a0a0a' stroke='white' stroke-width='1'/%3E%3Crect x='15.8' y='5.5' width='2.8' height='4.5' rx='1.1' fill='%230a0a0a' stroke='white' stroke-width='1'/%3E%3C/svg%3E") 10 5, grabbing;
  --cursor-text: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3.5v17' stroke='%230a0a0a' stroke-width='2.8'/%3E%3Cpath d='M8 4.2h8M8 19.8h8' stroke='%230a0a0a' stroke-width='2.8'/%3E%3Cpath d='M12 4v16' stroke='white' stroke-width='1.2'/%3E%3Cpath d='M8.8 4.5h6.4M8.8 19.5h6.4' stroke='white' stroke-width='1.2'/%3E%3C/g%3E%3C/svg%3E") 12 12, text;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: var(--task-font);
  color: var(--text-main);
  cursor: var(--cursor-aim);
}

body {
  min-height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.12), transparent 30%),
    linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
}

button,
input,
textarea,
select {
  font: inherit;
}

.hidden {
  display: none !important;
}

.app-shell {
  position: relative;
  min-height: 100vh;
}

.desktop-background,
.screen-root,
.modal-root,
.toast-root,
.unsupported-overlay {
  position: absolute;
  inset: 0;
}

.desktop-background {
  overflow: hidden;
}

.desktop-pattern {
  position: absolute;
  inset: -10%;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 32px 32px;
  transform: rotate(-3deg) scale(1.08);
}

.screen-root {
  display: grid;
  place-items: center;
  padding: 24px;
}

.modal-root,
.toast-root {
  pointer-events: none;
}

.panel-window {
  width: min(720px, 94vw);
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  overflow: hidden;
  animation: rise-in 240ms ease;
}

.panel-body {
  padding: 28px;
}

.hero-title {
  margin: 0 0 8px;
  font-family: var(--title-font);
  font-size: clamp(2.2rem, 4vw, 4rem);
  letter-spacing: 0.03em;
}

.hero-subtitle {
  margin: 0 0 28px;
  color: var(--text-soft);
  font-size: 1.05rem;
}

.menu-actions,
.status-row,
.level-grid,
.level-topbar,
.task-toolbar,
.desktop-icons,
.action-row {
  display: flex;
  gap: 16px;
}

.menu-actions {
  flex-direction: column;
}

.menu-button {
  width: 100%;
  min-height: 64px;
  justify-content: space-between;
  padding: 0 20px;
  font-size: 1.12rem;
}

.menu-button small {
  color: var(--text-soft);
}

.level-screen,
.game-screen {
  width: var(--desktop-width);
  height: var(--desktop-height);
  min-height: 0;
  font-family: var(--win-font);
  color: var(--win-text);
  background: var(--win-bg-solid);
  border: 1px solid var(--win-border-strong);
  border-radius: var(--win-radius);
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.06),
    0 16px 48px rgba(0, 0, 0, 0.18);
  display: flex;
  flex-direction: column;
  animation: rise-in 240ms ease;
}

.level-screen.win-shell,
.game-screen.win-shell {
  border-radius: var(--win-radius);
}

.level-topbar,
.game-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 52px;
  padding: 0 12px 0 16px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--win-border);
  background: var(--win-bg);
  user-select: none;
}

.win-titlebar-leading {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.win-titlebar-titles {
  min-width: 0;
}

.win-titlebar-main {
  font-size: 13px;
  font-weight: 600;
  color: var(--win-text);
  line-height: 1.25;
}

.win-titlebar-hint {
  font-size: 12px;
  color: var(--win-text-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: min(520px, 42vw);
}

.win-titlebar-actions {
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.win-shell-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  border-radius: 2px;
  background: linear-gradient(145deg, #0078d4 0%, #005a9e 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.win-shell-icon--levels {
  background: linear-gradient(145deg, #0078d4 0%, #004e8c 100%);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='white' d='M2 3a1 1 0 011-1h4l1 1h6a1 1 0 011 1v9a1 1 0 01-1 1H3a1 1 0 01-1-1V3z'/%3E%3C/svg%3E") center / 14px 14px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='white' d='M2 3a1 1 0 011-1h4l1 1h6a1 1 0 011 1v9a1 1 0 01-1 1H3a1 1 0 01-1-1V3z'/%3E%3C/svg%3E") center / 14px 14px no-repeat;
}

.win-shell-icon--app {
  background: linear-gradient(145deg, #e74856 0%, #c42b1c 100%);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='6' fill='none' stroke='white' stroke-width='1.5'/%3E%3Cpath stroke='white' stroke-width='1.5' d='M8 4v4l2.5 1.5'/%3E%3C/svg%3E") center / 14px 14px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='6' fill='none' stroke='white' stroke-width='1.5'/%3E%3Cpath stroke='white' stroke-width='1.5' d='M8 4v4l2.5 1.5'/%3E%3C/svg%3E") center / 14px 14px no-repeat;
}

.win-tag {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 360px;
  padding: 5px 10px;
  font-size: 12px;
  line-height: 1.35;
  color: var(--win-text);
  background: var(--win-bg-solid);
  border: 1px solid var(--win-border);
  border-radius: 999px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
}

.win-tag-label {
  font-weight: 600;
  color: var(--win-text-muted);
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.04em;
}

.win-tag--goal {
  max-width: min(420px, 46vw);
  border-color: rgba(0, 103, 192, 0.45);
  background: linear-gradient(180deg, #f0f7ff 0%, #e5f1fb 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 0 0 1px rgba(0, 103, 192, 0.12);
}

.win-tag--goal .win-tag-label {
  color: #0067c0;
}

.win-caption-close-btn {
  min-height: 32px;
  padding: 4px 16px;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--win-radius-sm);
  border: 1px solid var(--win-border-strong);
  background: var(--win-bg-solid);
  color: var(--win-text);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.win-caption-close-btn:hover {
  background: #f0f0f0;
  border-color: #c1c1c1;
}

.win-toolbar-btn {
  font-size: 12px;
  min-height: 32px;
}

.level-grid {
  flex: 1;
  flex-wrap: wrap;
  align-content: flex-start;
  padding: 16px 20px 20px;
  overflow: auto;
  background: var(--win-bg);
  gap: 12px;
}

.level-card {
  position: relative;
  width: calc(25% - 12px);
  min-width: 200px;
  min-height: 142px;
  border-radius: var(--win-radius);
  border: 1px solid var(--win-border);
  background: var(--win-bg-solid);
  padding: 16px 16px 14px;
  text-align: left;
  font-family: var(--win-font);
  color: var(--win-text);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
  transition: transform 120ms ease, box-shadow 120ms ease, opacity 140ms ease, border-color 120ms ease;
}

.level-card:hover:enabled {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-color: #c7c7c7;
}

.level-card.locked {
  opacity: 0.48;
}

.level-card .meta {
  color: var(--win-text-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}

.level-card h3 {
  margin: 6px 0 8px;
  font-size: 15px;
  font-weight: 600;
}

.level-card p {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--win-text-muted);
}

.check-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--success);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
}

.desktop-frame {
  position: relative;
  z-index: 0;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  font-family: var(--win-font);
}

.win-desktop {
  background:
    radial-gradient(ellipse 100% 80% at 50% 115%, rgba(0, 80, 160, 0.45) 0%, transparent 55%),
    radial-gradient(ellipse 70% 50% at 85% 15%, var(--win-desktop-shine), transparent 45%),
    radial-gradient(ellipse 50% 40% at 12% 25%, rgba(255, 255, 255, 0.12), transparent 50%),
    linear-gradient(165deg, #3d8fd4 0%, #1f6cbd 38%, #0f4c8a 72%, #0a3766 100%);
}

.desktop-icons {
  position: absolute;
  top: 20px;
  left: 16px;
  flex-direction: column;
  align-items: center;
  width: 104px;
  gap: 4px;
}

.desktop-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding: 8px 6px 6px;
  border-radius: var(--win-radius-sm);
  text-align: center;
  color: #fff;
  font-size: 11px;
  line-height: 1.25;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.65);
  transition: background 120ms ease;
}

.desktop-icon:hover {
  background: rgba(255, 255, 255, 0.12);
  outline: 1px solid rgba(255, 255, 255, 0.2);
}

.desktop-icon--printer-doc {
  background: transparent;
  border: 0;
  cursor: var(--cursor-default);
}

.desktop-icon-label {
  display: block;
  max-width: 92px;
}

.desktop-icon-glyph {
  display: block;
  width: 44px;
  height: 44px;
  margin-bottom: 6px;
  border-radius: var(--win-radius-sm);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(0, 0, 0, 0.08));
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.desktop-icon-glyph--folder {
  background:
    linear-gradient(180deg, #7cbbf7 0%, #4a9fe8 45%, #2d7dd2 100%);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cpath fill='white' d='M8 14h12l2.5-3H38a4 4 0 014 4v22a4 4 0 01-4 4H10a4 4 0 01-4-4V18a4 4 0 014-4z'/%3E%3C/svg%3E") center / 36px 36px no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cpath fill='white' d='M8 14h12l2.5-3H38a4 4 0 014 4v22a4 4 0 01-4 4H10a4 4 0 01-4-4V18a4 4 0 014-4z'/%3E%3C/svg%3E") center / 36px 36px no-repeat;
}

.desktop-icon-glyph--bin {
  background: linear-gradient(180deg, #9ecfff 0%, #5aa9f0 50%, #3b8fd9 100%);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cpath fill='white' d='M18 8h12l2 4h8v4H8V12h8l2-4zm-6 12h32l-2 24H14l-2-24zm10 4v14h4V24h-4z'/%3E%3C/svg%3E") center / 32px 32px no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cpath fill='white' d='M18 8h12l2 4h8v4H8V12h8l2-4zm-6 12h32l-2 24H14l-2-24zm10 4v14h4V24h-4z'/%3E%3C/svg%3E") center / 32px 32px no-repeat;
}

.desktop-icon-glyph--mail {
  background: linear-gradient(180deg, #b8d9ff 0%, #6eb3f2 55%, #4a93e8 100%);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cpath fill='white' d='M8 14h32a2 2 0 012 2v20a2 2 0 01-2 2H8a2 2 0 01-2-2V16a2 2 0 012-2zm0 4l16 10 16-10'/%3E%3C/svg%3E") center / 34px 34px no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cpath fill='white' d='M8 14h32a2 2 0 012 2v20a2 2 0 01-2 2H8a2 2 0 01-2-2V16a2 2 0 012-2zm0 4l16 10 16-10'/%3E%3C/svg%3E") center / 34px 34px no-repeat;
}

.task-window {
  position: absolute;
  top: 12px;
  left: 128px;
  right: 16px;
  bottom: 12px;
  width: auto;
  min-height: 0;
  max-height: none;
  display: flex;
  flex-direction: column;
  border-radius: var(--win-radius);
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.22),
    0 0 0 1px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  border: 1px solid var(--win-border-strong);
  background: var(--win-bg-solid);
}

.window-header,
.task-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.window-header {
  padding: 0 0 0 12px;
  min-height: 40px;
  flex-shrink: 0;
  color: var(--win-text);
  background: var(--win-bg-solid);
  border-bottom: 1px solid var(--win-border);
}

.win-caption {
  gap: 0;
}

.win-caption-leading {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
  padding: 8px 8px 8px 4px;
}

.win-file-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  background: #0078d4;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='white' d='M3 2h5l1 1h4a1 1 0 011 1v9a1 1 0 01-1 1H3a1 1 0 01-1-1V3a1 1 0 011-1z'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='white' d='M3 2h5l1 1h4a1 1 0 011 1v9a1 1 0 01-1 1H3a1 1 0 01-1-1V3a1 1 0 011-1z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.win-caption-titles {
  min-width: 0;
}

.win-caption-title {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--win-text);
}

.win-caption-subtitle {
  font-size: 11px;
  color: var(--win-text-muted);
  margin-top: 2px;
}

.win-caption-controls {
  display: flex;
  align-self: stretch;
  flex-shrink: 0;
}

.win-ctl {
  display: grid;
  place-items: center;
  width: 46px;
  cursor: var(--cursor-default);
  color: var(--win-text);
  transition: background 80ms ease;
}

.win-ctl:hover {
  background: var(--win-caption-hover);
}

.win-ctl--close:hover {
  background: var(--win-close-hover);
  color: #fff;
}

.win-ctl-glyph {
  display: block;
  position: relative;
  width: 10px;
  height: 10px;
}

.win-ctl-glyph--min {
  border-bottom: 1px solid currentColor;
  height: 4px;
  width: 10px;
  box-sizing: border-box;
}

.win-ctl-glyph--max {
  width: 10px;
  height: 10px;
  border: 1px solid currentColor;
  box-sizing: border-box;
}

.win-ctl-glyph--close {
  width: 10px;
  height: 10px;
}

.win-ctl-glyph--close::before,
.win-ctl-glyph--close::after {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 100%;
  height: 1px;
  background: currentColor;
}

.win-ctl-glyph--close::before {
  transform: rotate(45deg);
}

.win-ctl-glyph--close::after {
  transform: rotate(-45deg);
}

.task-toolbar {
  padding: 8px 14px;
  border-bottom: 1px solid var(--win-border);
  background: var(--win-bg);
  gap: 12px;
  flex-shrink: 0;
}

.win-commandbar {
  align-items: flex-start;
}

.win-commandbar-hint {
  font-size: 12px;
  color: var(--win-text-muted);
  line-height: 1.4;
  flex: 1;
}

.win-commandbar-msg {
  font-size: 12px;
  max-width: 280px;
  text-align: right;
}

.task-content {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  padding: 12px 14px 16px;
  overflow-x: hidden;
  overflow-y: auto;
  background: var(--win-bg-solid);
  -webkit-overflow-scrolling: touch;
}

.win-client {
  color: var(--win-text);
}

.win-task-lead {
  margin: 0 0 12px;
  padding: 8px 10px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--win-text-muted);
  background: var(--win-bg);
  border: 1px solid var(--win-border);
  border-radius: var(--win-radius-sm);
}

.win-task-lead strong {
  color: var(--win-text);
  font-weight: 600;
}

.win-task-lead--goal {
  border-color: rgba(0, 103, 192, 0.35);
  background: linear-gradient(180deg, #f5f9fd 0%, #eef4fa 100%);
}

.win-task-goal-name {
  color: #0a5fad;
  font-weight: 700;
}

/* Fits the faux desktop + window inside the padded screen-root (24px × 2) */
.game-screen--level-1 {
  height: min(820px, calc(100vh - 52px));
  max-height: calc(100vh - 52px);
}

.game-screen--level-1 .task-window {
  top: 14px;
  left: 118px;
  right: 14px;
  bottom: 14px;
}

.win-explorer-root--folder-create {
  flex: 1 1 auto;
  min-height: 0;
}

.win-explorer-chrome--folder-create {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

.win-explorer-list--folder-create {
  flex: 1 1 auto;
  min-height: 140px;
  max-height: none;
}

.win-explorer-inline-name {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.win-explorer-name-text {
  min-width: 0;
  word-break: break-word;
}

.win-explorer-row--folder {
  cursor: var(--cursor-default);
}

.win-explorer-root {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1 1 auto;
  gap: 0;
}

.win-explorer-chrome {
  border: 1px solid var(--win-border-strong);
  border-radius: var(--win-radius-sm);
  background: var(--win-bg-solid);
  overflow: hidden;
}

.win-explorer-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  background: linear-gradient(180deg, #fafafa 0%, #f0f0f0 100%);
  border-bottom: 1px solid var(--win-border);
}

.win-explorer-tb-btn {
  padding: 4px 12px;
  font-size: 12px;
  border-radius: var(--win-radius-sm);
  border: 1px solid transparent;
  background: transparent;
  color: var(--win-text);
  cursor: var(--cursor-default);
}

.win-explorer-tb-btn:hover {
  background: rgba(0, 0, 0, 0.04);
  border-color: #d1d1d1;
}

.win-explorer-tb-sep {
  width: 1px;
  height: 18px;
  background: var(--win-border);
  margin: 0 4px;
}

.win-explorer-address {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  font-size: 12px;
  color: var(--win-text-muted);
  border-bottom: 1px solid var(--win-border);
  background: var(--win-bg-solid);
}

.win-explorer-address-sep {
  opacity: 0.6;
}

.win-explorer-address-icon {
  width: 14px;
  height: 14px;
  background: #0078d4;
  border-radius: 2px;
  flex-shrink: 0;
}

.win-explorer-newrow {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--win-border);
  background: var(--win-bg);
}

.win-explorer-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 180px;
  font-size: 11px;
  color: var(--win-text-muted);
}

.win-explorer-input {
  min-height: 28px;
  padding: 4px 8px;
  font-size: 13px;
  border-radius: var(--win-radius-sm);
  border: 1px solid #8a8886;
  background: var(--win-bg-solid);
  color: var(--win-text);
  cursor: var(--cursor-text);
}

.win-explorer-input:focus {
  outline: none;
  border-color: var(--win-accent);
  box-shadow: 0 0 0 1px var(--win-accent);
}

.win-explorer-create-btn {
  flex-shrink: 0;
}

.win-explorer-listhead {
  display: grid;
  grid-template-columns: 1fr 100px 120px;
  gap: 8px;
  padding: 4px 12px;
  font-size: 11px;
  font-weight: 600;
  color: var(--win-text-muted);
  border-bottom: 1px solid var(--win-border);
  background: #fafafa;
}

.win-explorer-listhead--simple {
  grid-template-columns: 1fr;
}

.win-explorer-list {
  max-height: min(36vh, 280px);
  overflow-y: auto;
  padding: 4px 0;
}

.win-explorer-row {
  display: grid;
  grid-template-columns: 1fr 100px 120px;
  gap: 8px;
  align-items: center;
  padding: 6px 12px;
  font-size: 12px;
  border-bottom: 1px solid #f0f0f0;
}

.win-explorer-row:hover {
  background: #f5f9fc;
}

.win-explorer-row--highlight {
  background: #e5f3ff;
}

.win-explorer-row--file {
  cursor: var(--cursor-grab);
}

.win-explorer-root--single-dir {
  flex: 1 1 auto;
  min-height: 0;
}

.win-explorer-chrome--single-dir {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

.win-explorer-list--single-dir {
  flex: 1 1 auto;
  min-height: 160px;
  max-height: min(44vh, 380px);
  overflow-y: auto;
  padding: 4px 0;
}

.win-explorer-folder-group {
  border-bottom: 1px solid #ebebeb;
}

.win-explorer-row--folder-label {
  cursor: var(--cursor-default);
  user-select: none;
}

.win-explorer-row--folder-label .win-explorer-name {
  font-weight: 600;
}

.win-explorer-folder-inset {
  padding-left: 8px;
  margin-left: 10px;
  border-left: 2px solid #e3e3e3;
}

.win-explorer-row--in-folder {
  margin-left: 4px;
}

.file-item--draggable:active {
  cursor: var(--cursor-grabbing);
}

.file-item--dragging {
  opacity: 0.38;
  transition: opacity 0.12s ease;
}

.folder-item--drag-over {
  background: linear-gradient(180deg, #e8f4fc 0%, #dff0fa 100%) !important;
  box-shadow: inset 0 0 0 2px rgba(0, 103, 192, 0.45);
  transition:
    background 0.15s ease,
    box-shadow 0.15s ease;
}

.win-explorer-drop-active {
  background: linear-gradient(180deg, #e8f4fc 0%, #dff0fa 100%) !important;
  box-shadow: inset 0 0 0 2px rgba(0, 103, 192, 0.45);
  transition:
    background 0.12s ease,
    box-shadow 0.12s ease;
}

.win-explorer-row--dir-item {
  min-height: 0;
}

.win-explorer-row--folder-tile {
  cursor: var(--cursor-default);
}

.win-explorer-row--parent {
  cursor: var(--cursor-pointer);
}

.win-explorer-row--parent .win-explorer-name {
  font-weight: 600;
  color: var(--win-accent);
}

.file-item--cut {
  opacity: 0.52;
  box-shadow: inset 0 0 0 1px dashed rgba(0, 103, 192, 0.45);
}

.win-explorer-empty-hint {
  padding: 14px 12px;
  font-size: 12px;
  color: var(--win-text-muted);
  font-style: italic;
  border-top: 1px solid #f0f0f0;
}

.win-context-item--disabled {
  opacity: 0.42;
  cursor: var(--cursor-default);
}

.win-drag-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 280px;
  padding: 6px 12px 6px 8px;
  font-size: 12px;
  line-height: 1.2;
  color: var(--win-text);
  background: linear-gradient(180deg, #ffffff 0%, #f5f5f5 100%);
  border: 1px solid #b8b8b8;
  border-radius: var(--win-radius-sm);
  box-shadow:
    0 4px 14px rgba(0, 0, 0, 0.18),
    0 1px 0 rgba(255, 255, 255, 0.9) inset;
}

.win-drag-ghost-ico {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  border-radius: 2px;
  background: linear-gradient(180deg, #9ec5eb 0%, #6b9bd1 100%);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}

.win-drag-ghost-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.win-explorer-name {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  word-break: break-word;
}

.win-explorer-meta {
  font-size: 11px;
  color: var(--win-text-muted);
}

.win-ico-folder,
.win-ico-file {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  background: #ffb84d;
  border-radius: 2px;
}

.win-ico-file {
  background: #6b9bd1;
}

.win-explorer-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--win-border);
  min-height: 200px;
  max-height: min(42vh, 360px);
}

.win-explorer-pane {
  background: var(--win-bg-solid);
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.win-explorer-pane-title {
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 600;
  background: #f0f0f0;
  border-bottom: 1px solid var(--win-border);
}

.win-explorer-pane .win-explorer-list {
  flex: 1;
  max-height: none;
}

.win-explorer-foldercell {
  padding: 8px 10px;
  min-height: 80px;
}

.win-explorer-folderhead {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  font-size: 13px;
}

.win-explorer-nested {
  padding: 4px 0 4px 22px;
  font-size: 12px;
  color: var(--win-text-muted);
}

.win-explorer-drop-hint {
  font-size: 12px;
  color: var(--win-text-muted);
  font-style: italic;
  padding: 8px 0;
}

.win-recycle-panel {
  max-width: 480px;
}

.win-recycle-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.win-recycle-ico {
  width: 40px;
  height: 40px;
  background: linear-gradient(180deg, #b8d9ff, #4a93e8);
  border-radius: var(--win-radius-sm);
}

.win-recycle-title {
  font-size: 15px;
  font-weight: 600;
}

.win-recycle-sub {
  font-size: 12px;
  color: var(--win-text-muted);
}

.win-recycle-body {
  margin: 0 0 14px;
  font-size: 13px;
}

.game-screen--recycle-level {
  height: min(820px, calc(100vh - 52px));
  max-height: calc(100vh - 52px);
}

.desktop-frame--recycle-level {
  display: flex;
  flex-direction: column;
  /* Richer “wallpaper” than the default shell — light bloom + depth (shows behind icons). */
  background:
    radial-gradient(ellipse 95% 70% at 18% 12%, rgba(255, 255, 255, 0.22), transparent 52%),
    radial-gradient(ellipse 70% 55% at 88% 8%, rgba(160, 215, 255, 0.45), transparent 48%),
    radial-gradient(ellipse 100% 85% at 50% 100%, rgba(0, 60, 120, 0.55), transparent 58%),
    radial-gradient(ellipse 100% 80% at 50% 115%, rgba(0, 80, 160, 0.5) 0%, transparent 55%),
    radial-gradient(ellipse 70% 50% at 85% 15%, var(--win-desktop-shine), transparent 45%),
    radial-gradient(ellipse 50% 40% at 12% 25%, rgba(255, 255, 255, 0.12), transparent 50%),
    linear-gradient(168deg, #5cb0e8 0%, #2d82c9 18%, #1e6cb5 42%, #125a9e 68%, #0a4682 88%, #062d56 100%);
  background-color: #063054;
}

.desktop-recycle-taskwrap {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 0 !important;
  overflow: hidden;
  background: transparent !important;
}

.desktop-recycle-inner {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  position: relative;
}

.win-task-lead--desktop-recycle {
  flex-shrink: 0;
  margin: 12px 14px 8px;
}

.desktop-recycle-stage {
  flex: 1 1 auto;
  position: relative;
  min-height: 200px;
}

.desktop-icons--recycle-playfield {
  position: absolute;
  top: 4px;
  left: 8px;
  z-index: 2;
}

.desktop-icon--recycle-active {
  cursor: var(--cursor-default);
}

.desktop-icon--recycle-active:hover {
  background: rgba(255, 255, 255, 0.14);
}

.desktop-icon--empty-bin .desktop-icon-glyph--bin {
  opacity: 0.62;
}

.win-recycle-explorer {
  position: absolute;
  left: 128px;
  top: 4px;
  right: 10px;
  bottom: 4px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  z-index: 3;
  border-radius: var(--win-radius);
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.22),
    0 0 0 1px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  border: 1px solid var(--win-border-strong);
  background: var(--win-bg-solid);
}

.win-recycle-explorer .win-caption-controls {
  display: flex;
  align-self: stretch;
}

.win-ctl--close-recycle {
  border: none;
  background: transparent;
  cursor: var(--cursor-pointer);
  padding: 0;
  color: var(--win-text);
}

.win-ctl--close-recycle:hover {
  background: var(--win-close-hover);
  color: #fff;
}

.win-recycle-win-ico {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  border-radius: 2px;
  background: linear-gradient(180deg, #9ecfff 0%, #5aa9f0 50%, #3b8fd9 100%);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cpath fill='white' d='M18 8h12l2 4h8v4H8V12h8l2-4zm-6 12h32l-2 24H14l-2-24zm10 4v14h4V24h-4z'/%3E%3C/svg%3E") center / 14px 14px no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cpath fill='white' d='M18 8h12l2 4h8v4H8V12h8l2-4zm-6 12h32l-2 24H14l-2-24zm10 4v14h4V24h-4z'/%3E%3C/svg%3E") center / 14px 14px no-repeat;
}

.win-recycle-cmd {
  padding: 8px 12px;
  border-bottom: 1px solid var(--win-border);
  background: linear-gradient(180deg, #fafafa 0%, #f0f0f0 100%);
  gap: 12px;
  align-items: center;
}

.win-recycle-empty-toolbar {
  font-weight: 600;
}

.win-recycle-cmd-hint {
  flex: 1;
  text-align: right;
  font-size: 11px;
}

.win-recycle-client {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  background: var(--win-bg-solid);
}

.win-recycle-listhead {
  display: grid;
  grid-template-columns: 1fr 120px 100px;
  gap: 8px;
  padding: 4px 12px;
  font-size: 11px;
  font-weight: 600;
  color: var(--win-text-muted);
  border-bottom: 1px solid var(--win-border);
  background: #fafafa;
}

.win-recycle-listbody {
  flex: 1;
  overflow-y: auto;
}

.win-recycle-row {
  display: grid;
  grid-template-columns: 1fr 120px 100px;
  gap: 8px;
  align-items: center;
  padding: 6px 12px;
  font-size: 12px;
  border-bottom: 1px solid #f0f0f0;
}

.win-recycle-name {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.win-recycle-meta {
  font-size: 11px;
  color: var(--win-text-muted);
}

.win-recycle-empty-msg {
  padding: 28px 16px;
  font-size: 13px;
  color: var(--win-text-muted);
  text-align: center;
}

.desktop-recycle-statusbar {
  flex-shrink: 0;
  padding: 8px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.14);
  gap: 12px;
}

.desktop-recycle-statusbar .win-commandbar-hint {
  color: rgba(255, 255, 255, 0.9);
}

.desktop-recycle-statusbar .win-commandbar-msg {
  color: #ffc9c9;
}

@media (max-width: 900px) {
  .win-recycle-explorer {
    left: 12px;
    right: 12px;
  }
}

.win-compose-root {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  gap: 10px;
}

.win-compose-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
  max-height: min(42vh, 340px);
}

.win-mail-fields {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.win-mail-field {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  margin: 0;
}

.win-mail-field .win-explorer-input {
  flex: 1;
  min-width: 0;
}

.win-mail-field-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--win-text-muted);
  width: 72px;
  flex-shrink: 0;
}

.win-mail-field--body {
  flex-direction: column;
  align-items: stretch;
  flex: 1;
  min-height: 0;
}

.win-mail-field--body .win-mail-field-label {
  width: auto;
}

.win-mail-textarea {
  width: 100%;
  min-height: 120px;
  max-height: min(28vh, 220px);
  padding: 8px 10px;
  font-size: 13px;
  line-height: 1.4;
  font-family: var(--win-font);
  border-radius: var(--win-radius-sm);
  border: 1px solid #8a8886;
  resize: vertical;
  box-sizing: border-box;
  cursor: var(--cursor-text);
}

.win-mail-textarea:focus {
  outline: none;
  border-color: var(--win-accent);
  box-shadow: 0 0 0 1px var(--win-accent);
}

.win-compose-actions {
  flex-shrink: 0;
  display: flex;
  justify-content: flex-end;
  padding-top: 8px;
  margin-top: auto;
  border-top: 1px solid var(--win-border);
  background: linear-gradient(180deg, transparent 0%, var(--win-bg-solid) 30%);
  position: sticky;
  bottom: 0;
  z-index: 3;
}

.win-btn-send {
  background: linear-gradient(180deg, #0078d4 0%, #0063b1 100%) !important;
  border-color: #005a9e !important;
  color: #fff !important;
  min-width: 100px;
  font-weight: 600;
}

.win-btn-send:hover {
  filter: brightness(1.06);
}

.win-rename-table {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.win-rename-thead {
  display: grid;
  grid-template-columns: 28px 1fr 1fr;
  gap: 8px;
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 600;
  color: var(--win-text-muted);
  background: #fafafa;
  border-bottom: 1px solid var(--win-border);
}

.win-rename-row {
  display: grid;
  grid-template-columns: 28px 1fr 1fr;
  gap: 8px;
  align-items: center;
  padding: 8px 12px;
  font-size: 12px;
  border-bottom: 1px solid #eee;
}

.win-rename-row:hover {
  background: #f8fbfd;
}

.win-rename-ico {
  width: 16px;
  height: 20px;
  background: #6b9bd1;
  border-radius: 2px;
}

.win-rename-original {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.win-rename-target {
  color: var(--win-text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.win-rename-target--done {
  color: var(--success);
  font-weight: 600;
}

.win-rename-input {
  width: 100%;
  box-sizing: border-box;
}

.win-outlook-root {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
}

.win-outlook-shell {
  border: 1px solid var(--win-border-strong);
  border-radius: var(--win-radius-sm);
  overflow: hidden;
  background: var(--win-bg-solid);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.7) inset,
    0 8px 22px rgba(0, 0, 0, 0.08);
}

.win-outlook-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  min-height: 200px;
  max-height: min(48vh, 400px);
  padding: 10px;
  background: #f5f6f8;
}

.win-outlook-col {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border: 1px solid var(--win-border);
  border-radius: var(--win-radius-sm);
  background: var(--win-bg-solid);
  overflow: hidden;
}

.win-outlook-colhead {
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 600;
  background: #f0f0f0;
  border-bottom: 1px solid var(--win-border);
}

.win-outlook-list {
  flex: 1;
  overflow-y: auto;
  padding: 6px;
}

.win-outlook-msg {
  padding: 8px 10px;
  margin-bottom: 6px;
  cursor: var(--cursor-grab);
}

.win-outlook-msg-title {
  font-weight: 600;
  font-size: 12px;
  margin-bottom: 4px;
}

.win-outlook-msg-body {
  font-size: 11px;
  color: var(--win-text-muted);
  line-height: 1.35;
}

.win-outlook-folder {
  padding: 8px;
  min-height: 120px;
}

.win-outlook-folder-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px;
  overflow-y: auto;
}

.win-outlook-folder-row {
  border: 1px solid var(--win-border);
  border-radius: var(--win-radius-sm);
  background: linear-gradient(180deg, #ffffff 0%, #f9f9f9 100%);
  padding: 8px;
  min-height: 84px;
}

.win-outlook-folder-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.win-outlook-folder-title {
  font-size: 12px;
  font-weight: 600;
}

.win-outlook-folder-count {
  margin-left: auto;
  min-width: 18px;
  text-align: center;
  font-size: 11px;
  color: var(--win-text-muted);
  background: #eef2f8;
  border: 1px solid #d8dee8;
  border-radius: 999px;
  padding: 1px 6px;
}

.win-outlook-folder-body {
  padding-left: 24px;
}

.win-outlook-placed {
  font-size: 11px;
  padding: 4px 0;
  color: var(--win-text-muted);
}

.win-outlook-drop-hint {
  font-size: 12px;
  color: var(--win-text-muted);
  font-style: italic;
}

.win-sheet-wrap {
  overflow: auto;
  max-height: min(50vh, 420px);
}

.win-sheet-head,
.win-sheet-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 1px;
}

.win-sheet-head {
  position: sticky;
  top: 0;
  z-index: 1;
  font-size: 11px;
  font-weight: 600;
  background: #f0f0f0;
  border-bottom: 1px solid var(--win-border);
}

.win-sheet-body {
  display: flex;
  flex-direction: column;
}

.win-sheet-cell {
  padding: 8px 10px;
  border-bottom: 1px solid #eee;
  font-size: 12px;
}

.win-sheet-cell-input .win-explorer-input {
  width: 100%;
  box-sizing: border-box;
}

.win-excel-root {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.win-excel-shell {
  padding: 0;
  overflow: hidden;
  border: 1px solid #c8d2df;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.85) inset,
    0 10px 22px rgba(0, 0, 0, 0.08);
}

.win-excel-ribbon {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: linear-gradient(180deg, #f4f7fb 0%, #eaf0f8 100%);
  border-bottom: 1px solid #cdd8e6;
}

.win-excel-tab {
  font-size: 11px;
  color: #51657d;
  padding: 2px 8px;
  border-radius: 4px;
}

.win-excel-tab--active {
  background: #fff;
  border: 1px solid #cad6e5;
  color: #2d4663;
  font-weight: 600;
}

.win-excel-formula {
  display: grid;
  grid-template-columns: 54px 34px 1fr;
  gap: 8px;
  align-items: center;
  padding: 7px 10px;
  background: #f8fbff;
  border-bottom: 1px solid #d9e3ef;
}

.win-excel-namebox,
.win-excel-fx,
.win-excel-formula-input {
  border: 1px solid #c9d5e3;
  border-radius: 3px;
  background: #fff;
  min-height: 26px;
  display: flex;
  align-items: center;
  padding: 0 8px;
  font-size: 12px;
}

.win-excel-namebox {
  justify-content: center;
  font-weight: 600;
  color: #395274;
}

.win-excel-fx {
  justify-content: center;
  font-style: italic;
  color: #5d7088;
}

.win-excel-formula-input {
  color: #5b6b7e;
}

.win-excel-grid {
  background: #fff;
}

.win-excel-grid-head,
.win-excel-row {
  display: grid;
  grid-template-columns: 42px 1.3fr 1fr 0.9fr;
}

.win-excel-corner,
.win-excel-colhead,
.win-excel-rownum {
  background: #eef3fa;
  border-right: 1px solid #d4deea;
  border-bottom: 1px solid #d4deea;
  font-size: 11px;
  font-weight: 600;
  color: #4e647f;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
}

.win-excel-cell {
  min-height: 30px;
  border-right: 1px solid #e3e9f2;
  border-bottom: 1px solid #e3e9f2;
  display: flex;
  align-items: center;
  padding: 4px 8px;
  font-size: 12px;
}

.win-excel-cell--header {
  background: #f6f9fd;
  font-weight: 600;
  color: #3f5a79;
}

.win-excel-cell--label {
  color: #25384d;
}

.win-excel-cell--value {
  padding: 2px 6px;
}

.win-excel-cell--required {
  justify-content: center;
  background: #fffaf0;
}

.win-excel-required-pill {
  min-width: 34px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid #f1cb80;
  background: #ffe4a8;
  color: #6f4500;
  font-weight: 700;
  font-size: 12px;
  text-align: center;
}

.win-excel-input {
  width: 100%;
  min-height: 24px;
  padding: 3px 6px;
  border-color: transparent;
  box-shadow: none;
}

.win-excel-input:focus {
  border-color: #3f84e4;
  box-shadow: 0 0 0 1px #3f84e4 inset;
}

.win-stepper-summary {
  margin: 0 0 12px;
  padding: 8px 12px;
  font-size: 12px;
  color: var(--win-text-muted);
  background: var(--win-bg);
  border: 1px solid var(--win-border);
  border-radius: var(--win-radius-sm);
  list-style: none;
}

.win-stepper-summary li.done {
  color: var(--success);
  font-weight: 600;
}

.win-step-block {
  margin-bottom: 10px;
}

.win-step-summary {
  font-size: 13px;
  font-weight: 600;
  cursor: var(--cursor-pointer);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
}

.win-step-summary::-webkit-details-marker {
  display: none;
}

.win-step-summary::after {
  content: "▼";
  font-size: 10px;
  opacity: 0.5;
}

details.win-step-block[open] > .win-step-summary::after {
  content: "▲";
}

.win-step-badge {
  font-size: 11px;
  font-weight: 600;
  color: var(--win-text-muted);
}

.win-step-body {
  padding: 0 12px 12px;
  border-top: 1px solid var(--win-border);
}

.win-step-mail-actions {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
}

.win-multi-folder-list {
  border: 1px solid var(--win-border);
  border-radius: var(--win-radius-sm);
  max-height: min(24vh, 200px);
  overflow-y: auto;
  background: var(--win-bg-solid);
}

.win-multi-folder-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  font-size: 12px;
  border-bottom: 1px solid #f0f0f0;
}

@media (max-width: 1080px) {
  .win-explorer-split {
    grid-template-columns: 1fr;
    max-height: none;
  }

  .win-outlook-columns {
    grid-template-columns: 1fr;
    max-height: none;
  }
}

.win-folder-workspace {
  position: relative;
}

.win-folder-workspace[data-desktop-context] {
  cursor: var(--cursor-default);
}

.win-multi-desktop-icons {
  margin-top: 8px;
}

.win-multi-recycle-surface {
  justify-content: flex-start;
  padding: 8px 0 2px;
}

.win-multi-desktop-zone {
  position: relative;
  margin-top: 10px;
  min-height: 210px;
}

.win-multi-taskbar {
  margin-top: 0;
  padding: 8px;
  border: 1px solid var(--win-border);
  border-radius: var(--win-radius-sm);
  background: linear-gradient(180deg, #f8fbff 0%, #edf3fb 100%);
}

.win-multi-mail-window {
  border: 1px solid #c8d2df;
}

.win-multi-mail-window--floating {
  position: absolute;
  left: 10px;
  right: 10px;
  top: 52px;
}

.win-multi-mail-window .win-client {
  padding: 12px;
}

.printer-settings-layer {
  position: absolute;
  inset: 0;
  z-index: 7;
}

.printer-desktop-hitbox {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.printer-settings-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 18, 33, 0.34);
  backdrop-filter: blur(1px);
}

.printer-settings-window {
  z-index: 8;
}

.printer-settings-window .win-client {
  background: #f5f7fb;
  color: #1f2937;
}

.printer-app-window {
  position: absolute;
  left: 120px;
  right: 90px;
  top: 96px;
  z-index: 5;
  border: 1px solid var(--win-border-strong);
  background: var(--win-bg-solid);
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.22),
    0 0 0 1px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.printer-app-window .win-client {
  background: #f5f7fb;
  color: #1f2937;
  padding: 12px;
}

.device-format-stage {
  padding-bottom: 60px;
}

.device-format-taskbar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(8, 20, 36, 0.82);
  backdrop-filter: blur(2px);
}

.device-format-taskbar-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
}

.device-format-start-btn {
  min-width: 38px;
  width: 38px;
  height: 34px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}

.device-format-taskbar .win-commandbar-hint {
  margin-left: 4px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 11px;
}

.device-format-start-menu {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 60px;
  width: 392px;
  z-index: 8;
  border: 1px solid #d7e2f1;
  border-radius: 14px;
  background: linear-gradient(180deg, #f8fbff 0%, #eff4fb 100%);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.3);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.device-format-start-search {
  min-height: 34px;
  border-radius: 9px;
  border: 1px solid #d4dfef;
  background: #fff;
  color: #60738c;
  padding: 8px 10px;
  font-size: 12px;
}

.device-format-start-header {
  font-size: 12px;
  font-weight: 700;
  color: #2b425e;
  padding: 2px 4px;
}

.device-format-start-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.device-format-pin {
  min-height: 64px;
  width: 100%;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  font-size: 11px;
  border-radius: 10px;
  border-color: #d8e2f2;
  background: #ffffff;
  white-space: normal;
  overflow: hidden;
  text-align: center;
  line-height: 1.2;
}

.device-format-pin span:last-child {
  display: block;
  max-width: 100%;
  word-break: normal;
  overflow-wrap: normal;
  font-size: 11px;
}

.device-format-caret {
  opacity: 0.72;
}

.device-format-power-menu {
  margin-top: 2px;
  padding: 8px;
  border: 1px solid #d8e2f2;
  border-radius: 10px;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.device-format-start-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
}

.device-format-pin-ico {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  background: #7ea2ce;
  position: relative;
}

.device-format-pin-ico--chat {
  background: linear-gradient(180deg, #6db3ff 0%, #3b83de 100%);
}

.device-format-pin-ico--folder {
  background: linear-gradient(180deg, #ffd168 0%, #e2a93b 100%);
}

.device-format-pin-ico--gear {
  background: linear-gradient(180deg, #c4cfde 0%, #8d9cb2 100%);
}

.device-format-pin-ico--power {
  background: linear-gradient(180deg, #b8c7dd 0%, #8fa6c5 100%);
}

.device-format-menu-ico {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid #60758f;
  box-sizing: border-box;
  position: relative;
}

.device-format-menu-ico::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -3px;
  transform: translateX(-50%);
  width: 2px;
  height: 6px;
  background: #60758f;
  border-radius: 2px;
}

.device-format-menu-ico--restart {
  border-color: #4f6581;
}

.device-format-menu-ico--restart::before {
  display: none;
}

.device-format-menu-ico--restart::after {
  content: "";
  position: absolute;
  right: -3px;
  top: 3px;
  width: 0;
  height: 0;
  border-top: 3px solid transparent;
  border-bottom: 3px solid transparent;
  border-left: 4px solid #4f6581;
}

.device-format-windows-logo {
  width: 16px;
  height: 16px;
  position: relative;
  filter: drop-shadow(0 0.5px 0 rgba(0, 0, 0, 0.22));
  transform: perspective(18px) rotateY(-8deg);
}

.device-format-windows-logo::before,
.device-format-windows-logo::after {
  content: "";
  position: absolute;
  top: 0;
  width: 7px;
  height: 7px;
  border-radius: 1px;
  background: linear-gradient(180deg, #7cc6ff 0%, #3f8ee8 100%);
  box-shadow: 0 9px 0 rgba(58, 132, 224, 0.98);
}

.device-format-windows-logo::before {
  left: 0;
}

.device-format-windows-logo::after {
  right: 0;
}

.device-format-chat-window {
  position: absolute;
  left: 120px;
  right: 80px;
  top: 24px;
  bottom: 72px;
  z-index: 7;
  border: 1px solid var(--win-border-strong);
  background: var(--win-bg-solid);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.device-format-chat-client {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: #f3f7fc;
  color: #1f2937;
}

.device-format-chat-log {
  flex: 1 1 auto;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
}

.device-format-chat-msg {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px;
  border-radius: 10px;
  max-width: min(88%, 500px);
  font-size: 12px;
}

.device-format-chat-msg--contact {
  align-self: flex-start;
  background: #ffffff;
  border: 1px solid #d7e2f2;
}

.device-format-chat-msg--user {
  align-self: flex-end;
  background: #d7ebff;
  border: 1px solid #b8d9fb;
}

.device-format-chat-author {
  font-size: 11px;
  font-weight: 700;
  color: #476587;
}

.device-format-chat-compose {
  display: flex;
  gap: 8px;
  padding: 10px 12px 12px;
  border-top: 1px solid #d5dfec;
  background: #edf3fb;
}

.device-format-chat-compose .win-explorer-input {
  flex: 1;
}

.device-format-recovery-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.disk-cleanup-computer-window,
.disk-cleanup-explorer-window {
  position: absolute;
  left: 120px;
  right: 80px;
  top: 28px;
  bottom: 72px;
  z-index: 7;
  border: 1px solid var(--win-border-strong);
  background: var(--win-bg-solid);
  overflow: hidden;
}

.disk-cleanup-computer-window {
  right: 180px;
  bottom: 160px;
}

.disk-cleanup-window-client {
  display: flex;
  flex-direction: column;
  min-height: 0;
  gap: 10px;
  background: #f5f8fc;
}

.disk-cleanup-storage-card {
  border: 1px solid #d8e2ef;
  border-radius: 10px;
  padding: 12px;
  background: #fff;
  cursor: var(--cursor-pointer);
}

.disk-cleanup-storage-card:hover {
  background: #f9fcff;
}

.disk-cleanup-storage-top,
.disk-cleanup-storage-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.disk-cleanup-drive-label {
  font-weight: 700;
}

.disk-cleanup-drive-meta {
  color: #4d647f;
  font-size: 12px;
}

.disk-cleanup-bar {
  margin: 9px 0;
  height: 12px;
  border-radius: 999px;
  background: #e8eef7;
  overflow: hidden;
  border: 1px solid #d4dfef;
}

.disk-cleanup-bar > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #5ea9ff 0%, #287bd8 100%);
}

.disk-cleanup-file-row {
  cursor: var(--cursor-default);
}

.disk-cleanup-file-row .win-explorer-meta .btn {
  margin-left: 8px;
  padding: 2px 8px;
  min-height: 22px;
}

.finalboss-window {
  position: absolute;
  border: 1px solid var(--win-border-strong);
  background: var(--win-bg-solid);
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.22),
    0 0 0 1px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  z-index: 7;
  display: flex;
  flex-direction: column;
}

.finalboss-window--taskmgr {
  left: 120px;
  top: 26px;
  width: 520px;
  height: 300px;
}

.finalboss-window--event {
  right: 80px;
  top: 40px;
  width: 500px;
  height: 280px;
}

.finalboss-window--security {
  left: 140px;
  bottom: 92px;
  width: 500px;
  height: 320px;
}

.finalboss-window--security .finalboss-client {
  overflow-y: auto;
}

.finalboss-window--terminal {
  right: 120px;
  bottom: 124px;
  width: 520px;
  height: 230px;
}

.finalboss-client {
  min-height: 0;
  flex: 1 1 auto;
  background: #f5f8fc;
}

.finalboss-terminal-client {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1 1 auto;
  min-height: 0;
  background: #0b0f12;
  color: #cde3f0;
}

.finalboss-window .win-client {
  min-height: 0;
}

.finalboss-window--terminal .win-client {
  padding: 0;
}

.finalboss-terminal-log {
  flex: 1;
  overflow-y: auto;
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
  line-height: 1.35;
  padding: 10px 12px;
}

.finalboss-terminal-input-row {
  display: flex;
  gap: 8px;
  padding: 10px 12px 12px;
  border-top: 1px solid #2e3a44;
}

.finalboss-terminal-input-row .win-explorer-input {
  flex: 1;
}

.win-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(1px);
}

.win-modal-dialog {
  width: min(400px, 92vw);
  padding: 20px 22px 18px;
  background: var(--win-bg-solid);
  border: 1px solid var(--win-border-strong);
  border-radius: var(--win-radius);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
}

.win-modal-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--win-text);
  margin-bottom: 10px;
}

.win-modal-body {
  margin: 0 0 18px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--win-text-muted);
}

.win-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.win-modal-actions .btn {
  min-width: 88px;
}

.win-modal-actions .win-modal-btn-primary {
  background: linear-gradient(180deg, #0078d4 0%, #0063b1 100%);
  border-color: #005a9e;
  color: #fff;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.25) inset;
}

.win-modal-actions .win-modal-btn-primary:hover {
  filter: brightness(1.06);
}

.win-context-menu {
  position: fixed;
  z-index: 200;
  min-width: 200px;
  max-width: 280px;
  padding: 4px 0;
  font-size: 13px;
  color: var(--win-text);
  background: #f3f3f3;
  border: 1px solid #d1d1d1;
  border-radius: var(--win-radius-sm);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
  user-select: none;
}

.win-context-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 12px;
  cursor: var(--cursor-default);
}

.win-context-row:hover,
.win-context-row:focus-within {
  background: #e5f3ff;
}

.win-context-row--submenu:hover .win-context-submenu,
.win-context-row--submenu:focus-within .win-context-submenu {
  display: block;
}

.win-context-chevron {
  color: var(--win-text-muted);
  font-size: 14px;
  line-height: 1;
}

.win-context-submenu {
  display: none;
  position: absolute;
  left: calc(100% - 2px);
  top: -4px;
  min-width: 160px;
  padding: 4px 0;
  background: #f3f3f3;
  border: 1px solid #d1d1d1;
  border-radius: var(--win-radius-sm);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
}

.win-context-item {
  display: block;
  width: 100%;
  padding: 6px 12px 6px 28px;
  border: none;
  background: transparent;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: var(--cursor-default);
}

.win-context-item:hover,
.win-context-item:focus {
  background: #e5f3ff;
  outline: none;
}

.win-context-sep {
  height: 1px;
  margin: 4px 0;
  background: #e0e0e0;
}

.status-row {
  align-items: center;
  flex-wrap: wrap;
}

.status-pill {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(12, 34, 44, 0.18);
  font-size: 0.95rem;
}

.strike-dot {
  display: inline-grid;
  place-items: center;
  width: 14px;
  height: 14px;
  margin-left: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  border: 1px solid rgba(12, 34, 44, 0.25);
}

.strike-dot.active {
  background: var(--accent);
}

.goal-card,
.task-card,
.folder-grid,
.email-layout,
.spreadsheet-grid,
.multi-step-list {
  display: grid;
  gap: 16px;
}

.goal-card {
  grid-template-columns: 1.2fr 2fr;
  margin-bottom: 18px;
}

.task-card {
  padding: 14px 16px;
  border-radius: var(--win-radius-sm);
  border: 1px solid var(--win-border);
  background: var(--win-bg-solid);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.win-client .task-card strong {
  font-size: 13px;
  font-weight: 600;
  color: var(--win-text);
}

.win-client .task-card p,
.win-client .hint {
  font-size: 13px;
  line-height: 1.45;
}

.folder-grid {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.folder-item,
.file-item,
.mail-card,
.sheet-cell {
  border: 1px solid var(--win-border);
  border-radius: var(--win-radius-sm);
  background: var(--win-bg-solid);
}

.folder-item {
  min-height: 120px;
  padding: 12px;
}

.folder-item h4,
.mail-card h4 {
  margin: 0 0 8px;
}

.file-item {
  padding: 12px 14px;
  cursor: var(--cursor-grab);
}

.inline-form,
.email-layout,
.sheet-row {
  display: grid;
  gap: 12px;
}

.inline-form {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.inline-form label,
.email-layout label,
.rename-list label {
  display: grid;
  gap: 6px;
  font-size: 0.95rem;
  color: var(--text-soft);
}

.win-client .inline-form label,
.win-client .email-layout label,
.win-client .rename-list label {
  font-size: 12px;
  color: var(--win-text-muted);
}

.win-client .btn {
  font-family: var(--win-font);
  font-size: 13px;
  min-height: 32px;
  padding: 6px 20px;
  border-radius: var(--win-radius-sm);
  border: 1px solid #8a8886;
  background: linear-gradient(180deg, #ffffff 0%, #f3f3f3 100%);
  color: var(--win-text);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset;
}

.win-client .btn:hover {
  background: linear-gradient(180deg, #f9f9f9 0%, #ececec 100%);
  border-color: #323130;
}

.win-client .btn:active {
  background: #e5e5e5;
}

.win-client .btn-danger {
  background: linear-gradient(180deg, #e74856 0%, #c42b1c 100%);
  border-color: #a4262c;
  color: #fff;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2) inset;
}

.win-client .btn-danger:hover {
  filter: brightness(1.06);
  border-color: #8f2026;
}

.inline-form input,
.email-layout input,
.email-layout textarea,
.rename-list input,
.sheet-cell input {
  width: 100%;
  min-height: 32px;
  border-radius: var(--win-radius-sm);
  border: 1px solid #8a8886;
  background: var(--win-bg-solid);
  padding: 6px 10px;
  font-size: 13px;
  color: var(--win-text);
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

.inline-form input:hover,
.email-layout input:hover,
.email-layout textarea:hover,
.rename-list input:hover,
.sheet-cell input:hover {
  border-color: #323130;
}

.inline-form input:focus,
.email-layout input:focus,
.email-layout textarea:focus,
.rename-list input:focus,
.sheet-cell input:focus {
  outline: none;
  border-color: var(--win-accent);
  box-shadow: 0 0 0 1px var(--win-accent);
}

.email-layout textarea {
  min-height: 140px;
  resize: vertical;
}

.email-columns {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 16px;
}

.mail-column {
  display: grid;
  gap: 12px;
  align-content: start;
}

.mail-drop {
  min-height: 112px;
  padding: 12px;
  border-radius: var(--win-radius-sm);
  border: 1px dashed #a19f9d;
  background: var(--win-bg);
}

.sheet-head,
.sheet-row {
  grid-template-columns: 1.2fr 1fr;
}

.sheet-head {
  display: grid;
  gap: 12px;
  font-weight: 700;
}

.sheet-cell {
  padding: 10px 12px;
}

.multi-step-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.multi-step-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 12px;
  border-radius: var(--win-radius-sm);
  background: var(--win-bg-solid);
  border: 1px solid var(--win-border);
}

.multi-step-item.done {
  border-color: rgba(47, 143, 99, 0.45);
  background: #f1faf4;
}

.action-row {
  flex-wrap: wrap;
  align-items: center;
  margin-top: 18px;
}

.hint {
  color: var(--text-soft);
  font-size: 0.95rem;
}

.danger {
  color: var(--accent-strong);
}

.modal-root > .dialog-shell {
  pointer-events: auto;
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(2, 18, 29, 0.46);
}

.dialog-card {
  width: min(540px, 92vw);
  max-height: min(86vh, 760px);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: rgba(246, 249, 251, 0.98);
  border: 1px solid rgba(9, 29, 39, 0.24);
  display: flex;
  flex-direction: column;
}

.dialog-card .body {
  padding: 22px;
  overflow-y: auto;
  min-height: 0;
}

.toast {
  position: absolute;
  right: 22px;
  bottom: 22px;
  min-width: 260px;
  max-width: 360px;
  padding: 14px 16px;
  border-radius: 14px;
  color: #fff;
  background: rgba(8, 30, 42, 0.88);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
  animation: fade-up 220ms ease;
}

.win-tag-timer {
  border-color: rgba(0, 103, 192, 0.4);
  background: linear-gradient(180deg, #f6fbff 0%, #e8f4fc 100%);
}

.win-tag-timer--critical {
  border-color: rgba(196, 43, 28, 0.55);
  background: linear-gradient(180deg, #fff5f4 0%, #ffe8e6 100%);
  animation: timer-pulse 0.55s ease-in-out infinite alternate;
}

.win-tag-timer--critical .goal-timer-value {
  color: #c42b1c;
}

@keyframes timer-pulse {
  from {
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.85) inset;
  }
  to {
    box-shadow:
      0 1px 0 rgba(255, 255, 255, 0.85) inset,
      0 0 0 2px rgba(196, 43, 28, 0.22);
  }
}

.security-notify-stack {
  position: absolute;
  right: 16px;
  bottom: 20px;
  z-index: 6;
  display: flex;
  flex-direction: column-reverse;
  align-items: flex-end;
  gap: 10px;
  max-width: min(380px, 92vw);
  pointer-events: none;
}

.security-notify {
  display: flex;
  gap: 12px;
  padding: 12px 14px 12px 12px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.08),
    0 12px 28px rgba(0, 0, 0, 0.12);
  animation: security-notify-in 0.34s cubic-bezier(0.2, 0.85, 0.35, 1);
}

.security-notify--out {
  opacity: 0;
  transform: translateX(12px);
  transition:
    opacity 0.28s ease,
    transform 0.28s ease;
}

@keyframes security-notify-in {
  from {
    opacity: 0;
    transform: translateX(18px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.security-notify-leading {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
}

.security-notify-shield {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: linear-gradient(160deg, #1a6cad 0%, #0f4f82 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M12 2 4 5v6c0 5 3.5 9.5 8 11 4.5-1.5 8-6 8-11V5l-8-3Z'/%3E%3C/svg%3E") center / 20px 20px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M12 2 4 5v6c0 5 3.5 9.5 8 11 4.5-1.5 8-6 8-11V5l-8-3Z'/%3E%3C/svg%3E") center / 20px 20px no-repeat;
}

.security-notify-body {
  min-width: 0;
  flex: 1;
}

.security-notify-app {
  font-size: 11px;
  font-weight: 600;
  color: #5f6368;
  letter-spacing: 0.02em;
  margin-bottom: 2px;
}

.security-notify-title {
  font-size: 14px;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1.25;
  margin-bottom: 4px;
}

.security-notify-msg {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: #3c4043;
}

.hunter-overlay {
  position: absolute;
  inset: 0;
  z-index: 300;
  pointer-events: none;
  background: transparent;
}

.gunshot-flash {
  position: absolute;
  inset: 0;
  z-index: 320;
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(
      circle 120px at var(--shot-x, 50%) var(--shot-y, 50%),
      rgba(255, 255, 245, 0.95) 0%,
      rgba(255, 210, 120, 0.55) 28%,
      rgba(180, 90, 40, 0.2) 52%,
      transparent 72%
    ),
    radial-gradient(
      circle at var(--shot-x, 50%) var(--shot-y, 50%),
      transparent 35%,
      rgba(20, 12, 8, 0.28) 100%
    );
  animation: gunshot-muzzle 380ms ease-out;
}

.desktop-frame.gunshot-shake {
  animation: gunshot-kick 280ms ease-out;
}

.slider-block {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(12, 34, 44, 0.14);
}

.slider-block input[type="range"] {
  width: 100%;
}

.settings-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.settings-tab {
  min-width: 96px;
}

.settings-tab--active {
  border-color: #0063b1;
  color: #fff;
  background: linear-gradient(180deg, #0078d4 0%, #0063b1 100%);
}

.settings-skin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.settings-skin-card {
  text-align: left;
  display: grid;
  gap: 6px;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid #d2dbe8;
  background: #fff;
}

.settings-skin-card--selected {
  border-color: #3f84e4;
  box-shadow: 0 0 0 1px #3f84e4 inset;
}

.settings-skin-card:disabled {
  opacity: 0.55;
}

.settings-skin-preview {
  width: 100%;
  height: 34px;
  border-radius: 8px;
  border: 1px solid #cdd8e7;
  background:
    linear-gradient(90deg, var(--skin-base, #0a0a0a) 0 49%, transparent 49% 51%, var(--skin-accent, #ffffff) 51% 100%),
    linear-gradient(180deg, var(--skin-base, #0a0a0a) 0 49%, transparent 49% 51%, var(--skin-accent, #ffffff) 51% 100%),
    #eef3fa;
}

.settings-skin-title {
  font-weight: 700;
  color: #203045;
}

.settings-skin-meta {
  font-size: 12px;
  color: #556b86;
}

.unsupported-overlay {
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 20px;
  background: linear-gradient(180deg, rgba(5, 27, 39, 0.92), rgba(3, 18, 27, 0.96));
}

.unsupported-card {
  width: min(480px, 92vw);
  border-radius: 18px;
  padding: 28px;
  background: rgba(241, 247, 248, 0.96);
  text-align: center;
  box-shadow: var(--shadow);
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes gunshot-muzzle {
  0% {
    opacity: 0;
    filter: brightness(1);
  }
  6% {
    opacity: 1;
    filter: brightness(1.35);
  }
  22% {
    opacity: 0.65;
  }
  100% {
    opacity: 0;
    filter: brightness(1);
  }
}

@keyframes gunshot-kick {
  0% {
    transform: translate(0, 0);
  }
  8% {
    transform: translate(-4px, 3px);
  }
  18% {
    transform: translate(3px, -2px);
  }
  35% {
    transform: translate(-2px, 1px);
  }
  100% {
    transform: translate(0, 0);
  }
}

@media (max-width: 1080px) {
  .task-window {
    top: 10px;
    left: 108px;
    right: 10px;
    bottom: 10px;
    width: auto;
  }

  .win-titlebar-hint {
    max-width: min(280px, 55vw);
  }

  .email-columns {
    grid-template-columns: 1fr;
  }
}
