/* ==========================================================
   Windows XP (Luna) — стили оболочки и программ
   ========================================================== */

:root {
  --xp-font: Tahoma, 'Segoe UI', Verdana, Geneva, sans-serif;
  --xp-title-font: 'Trebuchet MS', 'Segoe UI', Tahoma, sans-serif;
  --xp-face: #ece9d8;
  --xp-blue: #0054e3;
  --xp-taskbar-h: 34px;
  --xp-select: #316ac5;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #000;
  font-family: var(--xp-font);
  font-size: 12px;
  color: #000;
  -webkit-text-size-adjust: 100%;
  overscroll-behavior: none;
}

button { font-family: inherit; font-size: inherit; color: inherit; }

#xp-root {
  position: fixed;
  inset: 0;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: filter 1.2s;
}
#xp-root.is-greyed #xp-shell { filter: grayscale(1) brightness(.85); transition: filter 1.5s; }

svg { display: block; width: 100%; height: 100%; }

.xp-screen { position: absolute; inset: 0; display: none; z-index: 50; }
.xp-screen.is-on { display: flex; }

/* ---------- Загрузка ---------- */

#xp-boot {
  background: #000;
  color: #fff;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.boot-center { display: flex; flex-direction: column; align-items: center; gap: 56px; margin-top: -40px; }
.boot-logo { display: flex; align-items: center; gap: 10px; }
.boot-flag { width: 90px; height: 80px; }
.boot-words { display: flex; flex-direction: column; font-family: Arial, sans-serif; }
.boot-ms { font-size: 18px; font-weight: bold; margin-bottom: -6px; }
.boot-ms sup { font-size: 9px; }
.boot-win { font-size: 52px; font-weight: bold; letter-spacing: -1px; }
.boot-win sup { color: #ff7a1a; font-size: 26px; font-style: italic; margin-left: 2px; }
.boot-bar {
  width: 156px; height: 20px;
  border: 2px solid #b2b2b2;
  border-radius: 5px;
  padding: 2px;
  overflow: hidden;
  position: relative;
}
.boot-bar-run { position: absolute; top: 2px; left: -40px; display: flex; gap: 2px; animation: bootrun 2s linear infinite; }
.boot-bar-run i {
  width: 9px; height: 12px;
  border-radius: 1px;
  background: linear-gradient(#2838c7, #8197ff 50%, #2838c7);
}
@keyframes bootrun { from { left: -40px; } to { left: 160px; } }
.boot-copy { position: absolute; left: 16px; bottom: 18px; font-size: 12px; color: #ccc; max-width: 60%; }
.boot-brand { position: absolute; right: 22px; bottom: 14px; font: italic bold 22px Arial, sans-serif; }

/* ---------- Экран входа ---------- */

#xp-login {
  flex-direction: column;
  background: #5a7edc;
  color: #fff;
}
.lg-top, .lg-bottom { background: #00309c; flex: 0 0 auto; }
.lg-top { height: 10vh; min-height: 50px; border-bottom: 2px solid #f8a33a; border-image: linear-gradient(90deg, #5a7edc, #fff 50%, #5a7edc) 1; }
.lg-mid {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: radial-gradient(circle at 18% 18%, #9cb8f5 0, #7a96df 18%, #5a7edc 45%);
}
.lg-left { flex: 1; display: flex; flex-direction: column; align-items: flex-end; padding-right: 30px; text-align: right; }
.lg-flag { width: 90px; height: 80px; }
.lg-title { font: bold 44px Arial, sans-serif; margin-top: -4px; text-shadow: 0 1px 2px rgba(0,0,0,.2); }
.lg-title sup { color: #ff7a1a; font-size: 22px; font-style: italic; }
.lg-hint { font-size: 16px; margin-top: 18px; }
.lg-sep { width: 1px; align-self: stretch; margin: 6vh 0; background: linear-gradient(transparent, #fff 30%, #fff 70%, transparent); opacity: .7; }
.lg-right { flex: 1; padding-left: 30px; }
.lg-user {
  display: flex; align-items: center; gap: 14px;
  border: 0; background: transparent; color: #fff;
  padding: 10px 40px 10px 10px;
  border-radius: 10px 0 0 10px;
  cursor: pointer;
  text-align: left;
  transition: background .2s;
}
.lg-user:hover, .lg-user:focus-visible { background: linear-gradient(90deg, #00309c, transparent); outline: 0; }
.lg-avatar {
  width: 64px; height: 64px;
  border: 3px solid #fff; border-radius: 6px;
  overflow: hidden; flex: 0 0 auto;
  box-shadow: 0 0 0 1px #4060c0;
  transition: border-color .2s;
}
.lg-user:hover .lg-avatar { border-color: #f8c33a; }
.lg-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lg-user-text { display: flex; flex-direction: column; }
.lg-name { font-size: 22px; }
.lg-sub { font-size: 11px; opacity: .8; margin-top: 2px; }
.lg-account { display: inline-flex; flex-direction: column; border-radius: 10px 0 0 10px; }
#xp-login.is-asking .lg-account { background: linear-gradient(90deg, #00309c, rgba(0,48,156,0)); }
#xp-login.is-asking .lg-user { background: none; cursor: default; }
#xp-login.is-asking .lg-avatar { border-color: #f8c33a; }
.lg-form { display: flex; flex-direction: column; gap: 4px; padding: 0 40px 12px 88px; }
.lg-form[hidden] { display: none; }
.lg-label { font-size: 12px; }
.lg-field { display: flex; align-items: center; gap: 6px; }
.lg-input {
  width: 190px; height: 26px; padding: 2px 6px;
  border: 1px solid #1a3c8c; border-radius: 3px;
  font: 14px Tahoma, Verdana, sans-serif; color: #000; background: #fff;
}
.lg-input:focus { outline: 0; box-shadow: 0 0 0 2px #f8c33a; }
.lg-go {
  width: 26px; height: 26px; flex: 0 0 auto;
  border: 1px solid #fff; border-radius: 4px;
  background: linear-gradient(#5fd35f, #2a9a2a); cursor: pointer; position: relative;
}
.lg-go::after { content: ''; position: absolute; left: 8px; top: 6px; border: 6px solid transparent; border-left: 9px solid #fff; border-right: 0; }
.lg-go:hover { filter: brightness(1.1); }
.lg-err {
  max-width: 230px; font-size: 11px; color: #000; background: #ffffe1;
  border: 1px solid #000; border-radius: 6px; padding: 4px 8px; margin-top: 4px;
}
.lg-err[hidden] { display: none; }
.lg-field.is-shake { animation: lg-shake .35s; }
@keyframes lg-shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.lg-welcome {
  position: absolute; inset: 0;
  display: none; align-items: center; justify-content: center;
  font: italic bold 56px 'Franklin Gothic Medium', Arial, sans-serif;
  text-shadow: 2px 3px 4px rgba(0,0,0,.35);
}
#xp-login.is-welcome .lg-welcome { display: flex; }
#xp-login.is-welcome .lg-left, #xp-login.is-welcome .lg-right, #xp-login.is-welcome .lg-sep { visibility: hidden; }
.lg-bottom {
  height: 12vh; min-height: 60px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px;
  border-top: 2px solid #f8a33a;
  border-image: linear-gradient(90deg, #00309c, #f8a33a 50%, #00309c) 1;
}
.lg-off { display: flex; align-items: center; gap: 8px; background: none; border: 0; color: #fff; font-size: 14px; cursor: pointer; }
.lg-off span { width: 26px; height: 26px; }
.lg-off:hover { text-decoration: underline; }
.lg-note { font-size: 11px; text-align: right; opacity: .85; max-width: 330px; }

/* ---------- Оболочка ---------- */

#xp-shell { position: absolute; inset: 0; display: none; }
#xp-shell.is-on { display: block; animation: fadein .5s; }
@keyframes fadein { from { opacity: 0; } }

#xp-desktop {
  position: absolute;
  left: 0; right: 0; top: 0;
  bottom: var(--xp-taskbar-h);
  background: #3a6ea5 var(--xp-wallpaper, none) center / cover no-repeat;
  overflow: hidden;
}

/* Значки на рабочем столе */
#xp-icons {
  position: absolute; inset: 0;
  padding: 10px 6px;
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 6px 4px;
}
.xp-icon {
  width: 80px;
  display: flex; flex-direction: column; align-items: center;
  gap: 4px;
  padding: 4px 2px;
  border: 1px dotted transparent;
  background: none;
  cursor: default;
  outline: 0;
}
.xp-icon-img { width: 40px; height: 40px; filter: drop-shadow(1px 2px 1px rgba(0,0,0,.35)); }
.xp-icon-label {
  color: #fff;
  font-size: 11px;
  line-height: 1.25;
  text-align: center;
  text-shadow: 1px 1px 1px #000, 0 0 2px #000;
  padding: 0 2px;
  word-break: break-word;
}
.xp-icon.is-selected .xp-icon-img { filter: drop-shadow(1px 2px 1px rgba(0,0,0,.35)) sepia(1) hue-rotate(180deg) saturate(3) brightness(.75); }
.xp-icon.is-selected .xp-icon-label { background: var(--xp-select); text-shadow: none; }
.xp-icon:focus-visible { border-color: #fff; }

/* ---------- Окна (всё на весь экран) ---------- */

#xp-windows { position: absolute; inset: 0; pointer-events: none; }
.xp-window {
  position: absolute; inset: 0;
  display: none;
  flex-direction: column;
  background: var(--xp-face);
  border: 3px solid #0831d9;
  border-top: 0;
  border-radius: 8px 8px 0 0;
  overflow: hidden;
  pointer-events: auto;
  box-shadow: 0 0 0 1px #001ea0 inset;
}
.xp-window.is-active { display: flex; animation: winopen .18s ease-out; }
@keyframes winopen { from { transform: scale(.97); opacity: .4; } }
.xp-window--frameless { border: 0; border-radius: 0; background: #1c1c28; }

.xp-titlebar {
  flex: 0 0 auto;
  height: 30px;
  display: flex; align-items: center; gap: 6px;
  padding: 0 4px 0 6px;
  color: #fff;
  border-radius: 7px 7px 0 0;
  background: linear-gradient(180deg, #0997ff 0%, #0053ee 8%, #0050ee 40%, #06f 88%, #06f 93%, #005bff 95%, #003dd7 96%, #003dd7 100%);
  font: bold 13px var(--xp-title-font);
  text-shadow: 1px 1px #0f1089;
  margin: 0 -3px;
}
.xp-titlebar-icon { width: 16px; height: 16px; flex: 0 0 auto; }
.xp-title { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: .2px; }
.xp-tbtns { display: flex; gap: 2px; }
.xp-tbtn {
  width: 22px; height: 22px;
  border: 1px solid #fff;
  border-radius: 3px;
  background: radial-gradient(circle at 90% 90%, #0054e9 0%, #2263d5 55%, #4479e4 70%, #a3bbec 90%, #fff 100%);
  position: relative;
  cursor: pointer;
  padding: 0;
}
.xp-tbtn:hover { filter: brightness(1.15); }
.xp-tbtn:active { filter: brightness(.85); }
.xp-tbtn--min::before { content: ''; position: absolute; left: 5px; bottom: 5px; width: 7px; height: 3px; background: #fff; }
.xp-tbtn--max::before { content: ''; position: absolute; left: 4px; top: 4px; width: 9px; height: 9px; border: 1px solid #fff; border-top-width: 3px; }
.xp-tbtn--close { background: radial-gradient(circle at 90% 90%, #cc4600 0%, #dc6527 55%, #cd7546 70%, #ffccb2 90%, #fff 100%); }
.xp-tbtn--close::before, .xp-tbtn--close::after {
  content: ''; position: absolute; left: 9px; top: 3px; width: 2px; height: 14px; background: #fff; transform: rotate(45deg);
}
.xp-tbtn--close::after { transform: rotate(-45deg); }

.xp-window-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* Строка меню приложения */
.xp-menubar {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  background: var(--xp-face);
  border-bottom: 1px solid #c5c2b2;
  padding: 1px 2px;
}
.xp-menubar::-webkit-scrollbar { display: none; }
.xp-menubar-item { padding: 3px 7px; cursor: default; white-space: nowrap; }
.xp-menubar-item:hover, .xp-menubar-item.is-open { background: var(--xp-select); color: #fff; }

/* Выпадающие меню */
.xp-menu {
  position: fixed;
  z-index: 9000;
  min-width: 160px;
  max-width: calc(100vw - 8px);
  max-height: calc(100dvh - 8px);
  overflow-y: auto;
  background: #fff;
  border: 1px solid #aca899;
  box-shadow: 3px 3px 4px rgba(0,0,0,.3);
  padding: 2px;
  font-size: 12px;
  animation: menuin .12s ease-out;
}
@keyframes menuin { from { opacity: 0; transform: translateY(-3px); } }
.xp-menu-item {
  display: flex; align-items: center; gap: 6px;
  padding: 4px 10px 4px 2px;
  min-height: 22px;
  white-space: nowrap;
  cursor: default;
}
.xp-menu-item:hover, .xp-menu-item.is-open { background: var(--xp-select); color: #fff; }
.xp-menu-item.is-disabled { color: #aca899; }
.xp-menu-item.is-disabled:hover { background: transparent; color: #aca899; }
.xp-menu-item.is-bold { font-weight: bold; }
.xp-menu-check { width: 14px; text-align: center; flex: 0 0 auto; }
.xp-menu-icon { width: 18px; height: 18px; flex: 0 0 auto; }
.xp-menu-label { flex: 1; }
.xp-menu-hint { color: inherit; opacity: .7; margin-left: 20px; }
.xp-menu-arrow { font-size: 8px; margin-left: 12px; }
.xp-menu-sep { height: 1px; background: #aca899; margin: 3px 2px; }
.xp-menu-back { font-weight: bold; }
.xp-menu--start { background: #fff; border-color: #4f78c8; box-shadow: 2px 2px 5px rgba(0,0,0,.4); }
.xp-menu--start .xp-menu-item { padding: 5px 14px 5px 4px; }
.xp-menu--start .xp-menu-icon { width: 24px; height: 24px; }
.xp-menu--start .xp-menu-check { display: none; }
.xp-menu--wide { width: calc(100vw - 16px); }

/* ---------- Панель задач ---------- */

#xp-taskbar {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: var(--xp-taskbar-h);
  display: flex;
  align-items: stretch;
  z-index: 800;
  background: linear-gradient(180deg, #1f2f86 0, #3165c4 3%, #3682e5 6%, #4490e6 10%, #3883e5 12%, #2b71e0 15%, #2663da 18%, #235bd6 20%, #2258d5 23%, #2157d6 38%, #245ddb 54%, #2562df 86%, #245fdc 89%, #2158d4 92%, #1d4ec0 95%, #1941a5 98%);
  padding-bottom: env(safe-area-inset-bottom);
}
#xp-start {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 4px;
  padding: 0 18px 0 8px;
  margin-right: 10px;
  border: 0;
  border-radius: 0 12px 12px 0;
  background: linear-gradient(180deg, #388e38 0%, #48aa48 8%, #3c9c3c 20%, #2e8a2e 55%, #308f30 80%, #3a9f3a 90%, #1f6b1f 100%);
  box-shadow: inset -2px -2px 4px rgba(0,0,0,.25), inset 2px 2px 3px rgba(255,255,255,.35), 2px 0 3px rgba(0,0,0,.4);
  color: #fff;
  font: italic bold 19px var(--xp-title-font);
  text-shadow: 1px 1px 2px #1a3a1a;
  cursor: pointer;
}
#xp-start:hover { filter: brightness(1.1); }
#xp-start.is-open { filter: brightness(.85); box-shadow: inset 2px 2px 5px rgba(0,0,0,.45); }
.xp-start-flag { width: 22px; height: 20px; filter: drop-shadow(1px 1px 1px rgba(0,0,0,.4)); }
.xp-start-text { margin-top: -2px; letter-spacing: .5px; }

#xp-tasks {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 3px;
  overflow: hidden;
}
.xp-task {
  flex: 0 1 170px;
  min-width: 36px;
  height: 26px;
  display: flex; align-items: center; gap: 5px;
  padding: 0 8px;
  border: 0;
  border-radius: 3px;
  background: #3c81f3;
  box-shadow: inset -1px -1px 0 rgba(0,0,0,.3), inset 1px 1px 1px rgba(255,255,255,.5);
  color: #fff;
  font-size: 11px;
  text-align: left;
  cursor: pointer;
}
.xp-task:hover { background: #53a3ff; }
.xp-task.is-active { background: #1e52b7; box-shadow: inset 1px 1px 2px rgba(0,0,0,.5); }
.xp-task-icon { width: 16px; height: 16px; flex: 0 0 auto; }
.xp-task-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

#xp-tray {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 4px;
  padding: 0 10px 0 8px;
  margin-left: 6px;
  border-left: 1px solid #1042af;
  background: linear-gradient(180deg, #0c59b9 1%, #139ee9 6%, #18b5f2 10%, #139beb 14%, #1290e8 19%, #0d8dea 63%, #0d9ff1 81%, #0f9eed 88%, #119be9 91%, #1392e2 94%, #137ed7 97%, #095bc9 100%);
  box-shadow: inset 1px 0 1px #18bbff;
  color: #fff;
}
.xp-tray-btn { width: 18px; height: 18px; padding: 0; border: 0; background: none; cursor: pointer; }
#xp-clock { padding-left: 4px; font-size: 11px; cursor: default; white-space: nowrap; }

/* ---------- Меню «Пуск» ---------- */

#xp-startmenu {
  position: absolute;
  left: 0;
  bottom: var(--xp-taskbar-h);
  z-index: 900;
  width: 390px;
  max-width: 100vw;
  max-height: calc(100% - var(--xp-taskbar-h));
  display: flex;
  flex-direction: column;
  border-radius: 7px 7px 0 0;
  overflow: hidden;
  background: #4282d6;
  box-shadow: 2px -1px 8px rgba(0,0,0,.5);
  border: 1px solid #0b3fb5;
  animation: smin .15s ease-out;
}
#xp-startmenu[hidden] { display: none; }
@keyframes smin { from { transform: translateY(12px); opacity: 0; } }
.sm-head {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 8px;
  background: linear-gradient(180deg, #1868ce 0%, #0e60cb 12%, #0e60cb 20%, #1164cf 32%, #1667cf 33%, #1b6cd3 47%, #1e70d9 54%, #2476dc 60%, #297ae0 65%, #3482e3 77%, #3786e5 79%, #428ee9 90%, #4791eb 100%);
  border-bottom: 2px solid #e88a0c;
  border-image: linear-gradient(90deg, transparent, #f8a33a 30%, #f8a33a 70%, transparent) 1;
}
.sm-avatar { width: 46px; height: 46px; border: 2px solid #fff; border-radius: 4px; overflow: hidden; background: #fff; box-shadow: 1px 1px 2px rgba(0,0,0,.4); flex: 0 0 auto; }
.sm-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sm-user { color: #fff; font: bold 15px var(--xp-title-font); text-shadow: 1px 1px 1px #0f1089; }
.sm-cols { display: flex; min-height: 0; flex: 1; }
.sm-left { flex: 1; background: #fff; padding: 6px 2px 4px; display: flex; flex-direction: column; overflow-y: auto; }
.sm-right { flex: 1; background: #d3e5fa; border-left: 1px solid #95bdee; padding: 6px 2px; overflow-y: auto; }
.sm-item, .sm-ritem, .sm-all {
  display: flex; align-items: center; gap: 6px;
  width: 100%;
  border: 0; background: none;
  padding: 4px 6px;
  text-align: left;
  cursor: pointer;
}
.sm-item:hover, .sm-ritem:hover, .sm-all:hover, .sm-all.is-open { background: var(--xp-select); color: #fff; }
.sm-item:hover small { color: #fff; }
.sm-icon { width: 32px; height: 32px; flex: 0 0 auto; }
.sm-text { display: flex; flex-direction: column; min-width: 0; }
.sm-text b { font-weight: bold; }
.sm-text small { color: #808080; font-size: 11px; }
.sm-item:not(:nth-child(-n+2)) .sm-text b { font-weight: normal; }
.sm-sep { height: 1px; margin: 4px 8px; background: linear-gradient(90deg, transparent, #c2c2c2 20%, #c2c2c2 80%, transparent); }
.sm-sep--all { margin-top: auto; }
.sm-all { justify-content: center; gap: 10px; padding: 6px; }
.sm-all-arrow { width: 18px; height: 18px; border-radius: 3px; background: #2e8a2e; color: #fff; font-size: 9px; display: grid; place-items: center; }
.sm-ritem { color: #0a246a; }
.sm-ritem.is-bold { font-weight: bold; }
.sm-ricon { width: 24px; height: 24px; flex: 0 0 auto; }
.sm-rsep { height: 1px; margin: 4px 8px; background: linear-gradient(90deg, transparent, #9cbbe8 20%, #9cbbe8 80%, transparent); }
.sm-foot {
  display: flex; justify-content: flex-end; gap: 6px;
  padding: 6px 8px;
  background: linear-gradient(180deg, #4282d6 0%, #3b85e0 3%, #418ae3 5%, #418ae3 17%, #3c87e2 21%, #3786e4 26%, #3482e3 29%, #2e7ee1 39%, #2374df 49%, #2072db 57%, #196edb 62%, #176bd8 72%, #1468d5 75%, #1165d2 83%, #0f61cb 88%);
}
.sm-foot-btn { display: flex; align-items: center; gap: 5px; border: 0; background: none; color: #fff; padding: 4px 6px; border-radius: 3px; cursor: pointer; }
.sm-foot-btn span { width: 24px; height: 24px; }
.sm-foot-btn:hover { background: rgba(255,255,255,.15); }

/* ---------- Диалоги ---------- */

#xp-modal {
  position: absolute; inset: 0;
  z-index: 3000;
  display: none;
  align-items: center; justify-content: center;
  background: rgba(0,0,0,.05);
  padding: 16px;
}
#xp-modal.is-open { display: flex; }
#xp-modal.is-off { background: transparent; }
.xp-dialog {
  position: absolute;
  min-width: 280px;
  max-width: min(440px, calc(100vw - 32px));
  background: var(--xp-face);
  border: 3px solid #0831d9;
  border-top: 0;
  border-radius: 8px 8px 0 0;
  box-shadow: 4px 4px 12px rgba(0,0,0,.45);
  animation: dlgin .15s ease-out;
}
@keyframes dlgin { from { transform: scale(.92); opacity: 0; } }
.xp-dialog-body { display: flex; gap: 14px; padding: 18px 18px 10px; align-items: flex-start; }
.xp-dialog-icon { width: 34px; height: 34px; flex: 0 0 auto; }
.xp-dialog-text { line-height: 1.45; padding-top: 6px; user-select: text; }
.xp-dialog-buttons { display: flex; justify-content: center; gap: 8px; padding: 6px 12px 14px; }
.xp-btn {
  min-width: 76px;
  padding: 4px 12px;
  border: 1px solid #003c74;
  border-radius: 3px;
  background: linear-gradient(180deg, #fff, #ecebe6 86%, #d6d0c5);
  cursor: pointer;
}
.xp-btn:hover { box-shadow: inset -1px 1px #fff0cf, inset 1px 2px #fdd889, inset -2px 2px #fbc761, inset 2px -2px #e5a01a; }
.xp-btn:focus-visible { outline: 1px dotted #000; outline-offset: -4px; box-shadow: inset -1px 1px #cee7ff, inset 1px 2px #98b8ea, inset -2px 2px #bcd4f6, inset 1px -1px #89ade4, inset 2px -2px #89ade4; }
.xp-btn:active { background: linear-gradient(180deg, #cdcac3, #e3e3db 8%, #e5e5de 94%, #f2f2f1); }

/* Диалог выключения */
.xp-offdlg {
  width: 320px; max-width: calc(100vw - 32px);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0,0,0,.6);
  animation: dlgin .2s ease-out;
}
.xp-offdlg-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px;
  background: #00309c;
  color: #fff;
  font: 17px var(--xp-title-font);
}
.xp-offdlg-flag { width: 30px; height: 26px; }
.xp-offdlg-body {
  display: flex; justify-content: space-around;
  padding: 26px 10px;
  background: linear-gradient(180deg, #7c99e3, #5a7edc 30%, #4a6fd4);
  border-top: 2px solid #8ca8f0;
}
.xp-offdlg-body button {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  width: 92px;
  border: 0; background: none; color: #fff;
  font-size: 11px;
  cursor: pointer;
}
.xp-offdlg-body button span { width: 36px; height: 36px; transition: filter .15s; }
.xp-offdlg-body button:hover span { filter: brightness(1.25) drop-shadow(0 0 4px #fff); }
.xp-offdlg-foot { display: flex; justify-content: flex-end; padding: 10px 14px; background: #00309c; }

/* Экраны выключения */
#xp-off { z-index: 4000; align-items: center; justify-content: center; }
#xp-off.is-standby { background: #000; cursor: pointer; }
#xp-off.is-black { background: #000; cursor: pointer; }
#xp-off.is-saving { background: #5a7edc; color: #fff; }
.off-saving { display: flex; align-items: center; gap: 20px; font-size: 18px; }
.off-saving small { font-size: 12px; opacity: .8; }
.off-flag { width: 70px; height: 62px; }
.off-msg { color: #f8a33a; font: bold 22px Arial, sans-serif; text-align: center; padding: 20px; line-height: 1.5; }
.off-msg small { color: #888; font-size: 13px; font-weight: normal; }

/* ==========================================================
   Скрепка
   ========================================================== */

#clippy {
  position: absolute;
  right: 12px;
  bottom: calc(var(--xp-taskbar-h) + 6px);
  z-index: 2500;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  pointer-events: none;
}
.clippy-char {
  width: 104px; height: 130px;
  padding: 0; border: 0; background: none;
  cursor: pointer;
  pointer-events: auto;
  filter: drop-shadow(2px 4px 4px rgba(0,0,0,.4));
  transform-origin: 50% 100%;
}
#clippy.is-talking .clippy-body { animation: clippytalk .5s ease-in-out 3; transform-origin: 54px 110px; }
#clippy.is-pop .clippy-char { animation: clippypop .35s ease-out; }
#clippy.is-wiggle .clippy-body { animation: clippywiggle .6s ease-in-out; transform-origin: 54px 110px; }
@keyframes clippytalk { 0%, 100% { transform: rotate(0); } 30% { transform: rotate(-4deg) translateY(-2px); } 70% { transform: rotate(3deg); } }
@keyframes clippypop { 0% { transform: scale(1); } 40% { transform: scale(1.08, .94); } 100% { transform: scale(1); } }
@keyframes clippywiggle { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-8deg); } 75% { transform: rotate(8deg); } }
.clippy-lids { transform: scaleY(0); transform-origin: 54px 32px; transition: transform .08s; }
#clippy.is-blink .clippy-lids { transform: scaleY(1); }
.clippy-brow { transition: transform .2s; }
#clippy.is-brow .clippy-brow, #clippy.is-talking .clippy-brow { transform: translateY(-4px); }
.clippy-pupils { transition: transform .12s ease-out; }

.clippy-bubble {
  position: relative;
  pointer-events: auto;
  width: 260px;
  max-width: calc(100vw - 40px);
  margin: 0 30px 8px 0;
  padding: 10px 12px;
  background: #ffffe1;
  border: 1px solid #000;
  border-radius: 10px;
  box-shadow: 2px 3px 6px rgba(0,0,0,.35);
  font-size: 12px;
  line-height: 1.45;
  user-select: text;
  animation: bubblein .2s ease-out;
}
.clippy-bubble[hidden] { display: none; }
@keyframes bubblein { from { opacity: 0; transform: translateY(8px) scale(.95); } }
.clippy-bubble::after, .clippy-bubble::before {
  content: ''; position: absolute; right: 26px; bottom: -14px;
  border: 7px solid transparent; border-top: 8px solid #000;
}
.clippy-bubble::after { bottom: -12px; border-top-color: #ffffe1; }
.clippy-text { padding-right: 10px; }
.clippy-x { position: absolute; top: 2px; right: 4px; border: 0; background: none; font-size: 15px; line-height: 1; cursor: pointer; color: #555; padding: 2px; }
.clippy-btns { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; }
.clippy-btns:empty { display: none; }
.clippy-btn { display: flex; align-items: center; gap: 6px; border: 0; background: none; text-align: left; padding: 3px 4px; cursor: pointer; color: #000; }
.clippy-btn:hover { background: #ffe9a8; }
.clippy-dot { width: 9px; height: 9px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #9cf, #1662d6); flex: 0 0 auto; }

/* ==========================================================
   Word
   ========================================================== */

.wd { background: var(--xp-face); }
.wd-toolbars { flex: 0 0 auto; border-bottom: 1px solid #c5c2b2; }
.wd-toolbar {
  display: flex; align-items: center; gap: 1px;
  padding: 2px 4px;
  overflow-x: auto;
  scrollbar-width: none;
  background: linear-gradient(180deg, #fbfaf6, #ece9d8);
  border-top: 1px solid #fff;
}
.wd-toolbar::-webkit-scrollbar { display: none; }
.wd-tb {
  flex: 0 0 auto;
  min-width: 24px; height: 24px;
  display: grid; place-items: center;
  padding: 3px;
  border: 1px solid transparent;
  border-radius: 2px;
  background: none;
  cursor: pointer;
}
.wd-tb svg { width: 16px; height: 16px; }
.wd-tb:not(.is-disabled):hover { border-color: #316ac5; background: #c1d2ee; }
.wd-tb.is-disabled { filter: grayscale(1); opacity: .38; cursor: default; }
.wd-save { position: relative; }
.wd-sep { flex: 0 0 auto; width: 1px; height: 18px; margin: 0 3px; background: #c5c2b2; box-shadow: 1px 0 #fff; }
.wd-select { flex: 0 0 auto; height: 20px; font: 11px var(--xp-font); border: 1px solid #7f9db9; background: #fff; margin: 0 2px; }
.wd-select.is-disabled { color: #aca899; background: #f4f3ee; border-color: #c9c7ba; }
.wd-size { width: 48px; }
.wd-color-wrap { display: flex; }
.wd-color { flex-direction: column; gap: 0; padding: 1px 3px; }
.wd-color-a { font: bold 13px 'Times New Roman', serif; line-height: 14px; }
.wd-color-bar { display: block; width: 16px; height: 4px; }
.wd-color-drop { min-width: 12px; padding: 0; font-size: 10px; }
.wd-palette { display: grid; grid-template-columns: repeat(8, 18px); gap: 3px; padding: 6px; min-width: 0; }
.wd-swatch { width: 18px; height: 18px; border: 1px solid #888; padding: 0; cursor: pointer; }
.wd-swatch:hover { outline: 2px solid #316ac5; }
.wd-ruler { flex: 0 0 auto; height: 20px; background: #ece9d8; border-bottom: 1px solid #c5c2b2; display: flex; justify-content: center; padding: 3px 0; }
.wd-ruler-in {
  width: min(680px, calc(100% - 20px)); height: 14px;
  background: #fff repeating-linear-gradient(90deg, transparent 0 17px, #888 17px 18px) 0 9px / 100% 5px no-repeat;
  border: 1px solid #aaa;
}
.wd-main { flex: 1; min-height: 0; display: flex; }
.wd-work { flex: 1; overflow: auto; background: #8c8c8c; padding: 20px 10px 40px; -webkit-overflow-scrolling: touch; }
.wd-page {
  max-width: 680px;
  min-height: 880px;
  margin: 0 auto;
  padding: 60px 64px;
  background: #fff;
  box-shadow: 2px 2px 6px rgba(0,0,0,.5);
  font: 12pt/1.5 'Times New Roman', Times, serif;
  color: #000;
  outline: 0;
  user-select: text;
  -webkit-user-select: text;
  cursor: text;
  word-wrap: break-word;
}
.wd-page img { max-width: 100%; height: auto; }
.wd-page h1, .wd-page h2, .wd-page h3 { font-family: Arial, sans-serif; }
.wd-page figure { margin: 1em 0; }
.wd-pane { width: 210px; flex: 0 0 auto; background: #fff; border-left: 1px solid #a0a0a0; overflow: auto; font-size: 11px; }
.wd-pane-head { display: flex; justify-content: space-between; padding: 5px 8px; background: linear-gradient(180deg, #e3eefd, #c3d8f7); font-weight: bold; color: #0a246a; }
.wd-pane-logo { margin: 8px; padding: 10px; background: linear-gradient(180deg, #4d82d8, #2a5cb8); color: #fff; font-size: 14px; border-radius: 3px; }
.wd-pane-links { margin: 4px 8px 10px; padding-left: 16px; color: #0645ad; line-height: 1.8; }
.wd-pane-links li { cursor: pointer; }
.wd-pane-links li:hover { text-decoration: underline; }
.wd-pane-links .is-dim { color: #aaa; cursor: default; }
.wd-pane-sec { margin: 0 8px; padding: 3px 4px; background: #e3eefd; color: #0a246a; font-weight: bold; }
.wd-status {
  flex: 0 0 auto;
  display: flex; gap: 0;
  height: 22px;
  border-top: 1px solid #fff;
  background: var(--xp-face);
  font-size: 11px;
  overflow: hidden;
}
.wd-status span { padding: 3px 10px; border-right: 1px solid #c5c2b2; white-space: nowrap; }
.wd-st-dim { color: #aca899; }

/* ==========================================================
   Сапёр
   ========================================================== */

.ms-app { background: #008080 var(--xp-wallpaper, none) center / cover; }
.ms-app .xp-menubar { background: var(--xp-face); }
.ms-stage { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 12px; min-height: 0; overflow: auto; }
.ms-frame {
  --ms-cell: 24px;
  background: #c0c0c0;
  padding: 6px;
  border: 3px solid;
  border-color: #fff #808080 #808080 #fff;
  box-shadow: 4px 4px 14px rgba(0,0,0,.45);
}
.ms-top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 4px 6px;
  margin-bottom: 6px;
  border: 2px solid;
  border-color: #808080 #fff #fff #808080;
}
.ms-led {
  min-width: 52px;
  padding: 0 3px;
  background: #000;
  color: #ff0000;
  font: bold 26px/30px 'Courier New', monospace;
  letter-spacing: 1px;
  text-shadow: 0 0 6px rgba(255,0,0,.6);
  border: 1px solid;
  border-color: #808080 #fff #fff #808080;
  text-align: center;
}
.ms-face {
  width: 36px; height: 36px;
  font-size: 22px; line-height: 1;
  padding: 0;
  background: #c0c0c0;
  border: 3px solid;
  border-color: #fff #808080 #808080 #fff;
  cursor: pointer;
}
.ms-face:active { border-color: #808080 #fff #fff #808080; }
.ms-board {
  display: grid;
  border: 3px solid;
  border-color: #808080 #fff #fff #808080;
  touch-action: none;
}
.ms-board.is-shake { animation: shake .4s; }
@keyframes shake { 20% { transform: translate(-4px, 2px); } 40% { transform: translate(4px, -2px); } 60% { transform: translate(-3px, 1px); } 80% { transform: translate(2px, -1px); } }
.ms-cell {
  width: var(--ms-cell); height: var(--ms-cell);
  background: #c0c0c0;
  border: calc(var(--ms-cell) * .12) solid;
  border-color: #fff #808080 #808080 #fff;
  display: grid; place-items: center;
  font: bold calc(var(--ms-cell) * .62) / 1 Tahoma, Verdana, sans-serif;
  cursor: default;
}
.ms-cell.is-press { border: 1px solid #808080; border-width: 1px 0 0 1px; }
.ms-cell.is-open { border: 0; border-left: 1px solid #808080; border-top: 1px solid #808080; }
.ms-cell.is-flag::before {
  content: '';
  width: 70%; height: 70%;
  background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 2v9' stroke='%23000' stroke-width='1.6'/%3E%3Cpath d='M8.6 2L3 4.6 8.6 7.2z' fill='%23f00'/%3E%3Cpath d='M5 11.5h6v1.5H4v-.5zM3.5 13h9v1.5h-9z'/%3E%3C/svg%3E");
}
.ms-cell.is-mine::before {
  content: '';
  width: 72%; height: 72%;
  background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cg stroke='%23000' stroke-width='1.3'%3E%3Cpath d='M8 1v14M1 8h14M3 3l10 10M13 3L3 13'/%3E%3C/g%3E%3Ccircle cx='8' cy='8' r='4.6'/%3E%3Crect x='5.6' y='5.6' width='2' height='2' fill='%23fff'/%3E%3C/svg%3E");
}
.ms-cell.is-boom { background: #ff0000; }
.ms-cell.is-wrong { position: relative; }
.ms-cell.is-wrong::after { content: '✕'; position: absolute; color: #d00; font-size: calc(var(--ms-cell) * .8); }
.ms-flagmode {
  display: none;
  padding: 8px 14px;
  border: 2px solid;
  border-color: #fff #808080 #808080 #fff;
  background: #c0c0c0;
  font-size: 14px;
  cursor: pointer;
}
.ms-flagmode.is-on { border-color: #808080 #fff #fff #808080; background: #ffe0e0; }
@media (pointer: coarse) { .ms-flagmode { display: block; } }

/* ==========================================================
   Косынка
   ========================================================== */

.sol-app { background: #0b5d1e; }
.sol-board {
  flex: 1;
  min-height: 0;
  position: relative;
  overflow: hidden;
  touch-action: none;
  /* Сукно: мягкий свет сверху, виньетка и тонкая фактура ткани */
  background:
    radial-gradient(ellipse 120% 90% at 50% 30%, rgba(255,255,255,.10), rgba(255,255,255,0) 60%),
    radial-gradient(ellipse 140% 120% at 50% 40%, rgba(0,0,0,0) 55%, rgba(0,0,0,.42) 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .22 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E"),
    linear-gradient(160deg, #148a34, #0d6f27 55%, #0a5a20);
  --cw: 71px; --ch: 99px;
}
.sol-board::before {
  content: ''; position: absolute; left: 50%; top: 58%; transform: translate(-50%, -50%);
  width: min(60%, 420px); aspect-ratio: 1; border-radius: 50%; pointer-events: none;
  border: 2px solid rgba(255,255,255,.05);
  box-shadow: 0 0 0 14px rgba(255,255,255,.025);
}
.sol-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2000; cursor: pointer; }
.sol-slot {
  position: absolute; left: 0; top: 0;
  width: var(--cw); height: var(--ch);
  border: 2px solid rgba(255,255,255,.22);
  border-radius: calc(var(--cw) * .08);
  background: rgba(0,0,0,.12);
  box-shadow: inset 0 2px 8px rgba(0,0,0,.25);
  transition: box-shadow .15s, border-color .15s;
}
.sol-slot--stock { cursor: pointer; }
.sol-slot--stock.is-empty-recycle::after {
  content: '↻'; position: absolute; inset: 0; display: grid; place-items: center;
  color: rgba(190,255,190,.85); font-size: calc(var(--cw) * .55); text-shadow: 0 0 10px rgba(120,255,120,.6);
}
.sol-slot--f::after { content: 'A'; position: absolute; inset: 0; display: grid; place-items: center; color: rgba(255,255,255,.16); font: bold calc(var(--cw) * .45) Georgia, serif; }
.sol-slot.is-target, .card.is-target .c-front { box-shadow: 0 0 0 3px #ffd84a, 0 0 18px 4px rgba(255,216,74,.65); border-color: #ffd84a; }

.card {
  position: absolute; left: 0; top: 0;
  width: var(--cw); height: var(--ch);
  border-radius: calc(var(--cw) * .08);
  transition: transform .2s cubic-bezier(.25,.8,.35,1);
  cursor: pointer;
  will-change: transform;
  perspective: 600px;
  filter: drop-shadow(0 1px 1.5px rgba(0,0,0,.45));
}
.sol-board.is-dealing .card { transition: transform .5s cubic-bezier(.2,.8,.3,1); }
.card.is-drag { transition: none; filter: drop-shadow(6px 10px 8px rgba(0,0,0,.45)); cursor: grabbing; }
.card.is-nope .c-in { animation: sol-nope .3s; }
@keyframes sol-nope { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.c-in { position: absolute; inset: 0; border-radius: inherit; transform-style: preserve-3d; transition: transform .32s ease-out; }
.card:not(.is-up) .c-in { transform: rotateY(180deg); }
.c-front, .c-back {
  position: absolute; inset: 0;
  border-radius: inherit;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
}
.c-front {
  overflow: hidden;
  background: linear-gradient(170deg, #ffffff 0%, #fbfbf7 60%, #eeeee6 100%);
  border: 1px solid #9a9a92;
  box-shadow: inset 0 0 0 2px #fff;
}
/* Рубашка: синий узор с золотой рамкой и эмблемой */
.c-back {
  transform: rotateY(180deg);
  border: 1px solid #0a1d55;
  background:
    radial-gradient(circle at 50% 50%, rgba(255,215,110,.9) 0 9%, transparent 9.5%),
    radial-gradient(circle at 50% 50%, transparent 0 15%, rgba(255,215,110,.55) 15.5% 17%, transparent 17.5%),
    repeating-conic-gradient(from 45deg at 50% 50%, rgba(255,255,255,.07) 0 15deg, transparent 15deg 30deg),
    repeating-linear-gradient(45deg, rgba(255,255,255,.13) 0 1.5px, transparent 1.5px 6px),
    repeating-linear-gradient(-45deg, rgba(255,255,255,.13) 0 1.5px, transparent 1.5px 6px),
    radial-gradient(ellipse at 50% 30%, #3a6ff0, #1a3aa8 60%, #0f246e);
  box-shadow: inset 0 0 0 3px #f6f2e6, inset 0 0 0 4px #c9a640, inset 0 0 0 7px rgba(255,255,255,.15);
}
.c-back i {
  position: absolute; left: 50%; top: 50%; width: 22%; aspect-ratio: 1; transform: translate(-50%, -50%) rotate(45deg);
  background: linear-gradient(135deg, #fff2c0, #c9a640); border-radius: 3px; box-shadow: 0 0 6px rgba(0,0,0,.4);
}
.card.is-red { color: #c8102e; }
.card.is-black { color: #16181d; }
.c-corner { position: absolute; display: flex; flex-direction: column; align-items: center; line-height: .92; font-family: Georgia, 'Times New Roman', serif; z-index: 1; }
.c-corner b { font-size: calc(var(--cw) * .25); letter-spacing: -1px; }
.c-corner i { font-style: normal; font-size: calc(var(--cw) * .21); font-family: Arial, sans-serif; }
.c-corner.tl { left: 4%; top: 3%; }
.c-corner.br { right: 4%; bottom: 3%; transform: rotate(180deg); }
.c-pips { position: absolute; left: 20%; right: 20%; top: 11%; bottom: 11%; }
.c-pip { position: absolute; transform: translate(-50%, -50%); font-size: calc(var(--cw) * .23); line-height: 1; text-shadow: 0 1px 0 rgba(0,0,0,.08); }
.c-pip.is-flip { transform: translate(-50%, -50%) rotate(180deg); }
.c-ace { position: absolute; inset: 0; display: grid; place-items: center; }
.c-ace span {
  display: grid; place-items: center; width: 56%; aspect-ratio: 1; border-radius: 50%;
  font-size: calc(var(--cw) * .48); line-height: 1;
  background: radial-gradient(circle, rgba(255,255,255,1) 50%, rgba(0,0,0,.04) 51% 56%, transparent 57%);
  box-shadow: 0 0 0 1px rgba(0,0,0,.08);
}
.card.s0.is-ace .c-ace span { font-size: calc(var(--cw) * .6); text-shadow: 0 2px 2px rgba(0,0,0,.25); }
.c-big { display: none; position: absolute; inset: 0; place-items: center; font-size: calc(var(--cw) * .6); padding-top: 8%; }
.sol-board.is-small .c-pips, .sol-board.is-small .c-ace { display: none; }
.sol-board.is-small .c-big { display: grid; }
.sol-board.is-small .c-corner.br { display: none; }
.sol-board.is-small .c-corner b { font-size: calc(var(--cw) * .3); }
.sol-board.is-small .c-face { inset: 38% 10% 6% 10%; }
.sol-board.is-small .c-face-s { display: none; }
/* Картинки: двусторонний портрет на цветном поле */
.c-face {
  position: absolute; inset: 15% 17%;
  border-radius: 4px; overflow: hidden;
  border: 1px solid currentColor;
  background:
    linear-gradient(to bottom right, transparent calc(50% - .6px), currentColor calc(50% - .6px) calc(50% + .6px), transparent calc(50% + .6px)),
    repeating-linear-gradient(135deg, rgba(255,255,255,.18) 0 3px, transparent 3px 7px),
    linear-gradient(160deg, #fff4d0, #f2cf6c 55%, #d9a93a);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.7);
}
.card.is-black .c-face { background:
    linear-gradient(to bottom right, transparent calc(50% - .6px), currentColor calc(50% - .6px) calc(50% + .6px), transparent calc(50% + .6px)),
    repeating-linear-gradient(135deg, rgba(255,255,255,.2) 0 3px, transparent 3px 7px),
    linear-gradient(160deg, #e8f0ff, #9fb8e8 55%, #6f8fd0); }
.c-fg { position: absolute; left: 6%; top: 2%; font-size: calc(var(--cw) * .4); line-height: 1; text-shadow: 0 1px 1px rgba(255,255,255,.8); }
.c-fg.is-flip { left: auto; top: auto; right: 6%; bottom: 2%; transform: rotate(180deg); }
.c-face-s { position: absolute; right: 8%; top: 6%; font-size: calc(var(--cw) * .17); }
.c-face-s.is-flip { right: auto; top: auto; left: 8%; bottom: 6%; transform: rotate(180deg); }

.sol-spark {
  position: absolute; z-index: 1500; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; pointer-events: none;
  box-shadow: 0 0 0 0 rgba(255,230,120,.9), 0 0 20px 8px rgba(255,220,90,.7);
  animation: sol-spark .6s ease-out forwards;
}
@keyframes sol-spark { to { box-shadow: 0 0 0 46px rgba(255,230,120,0), 0 0 40px 20px rgba(255,220,90,0); } }
.sol-pop {
  position: absolute; z-index: 1600; transform: translate(-50%, 0); pointer-events: none; white-space: nowrap;
  font: bold 14px Tahoma, sans-serif; text-shadow: 0 0 3px #000, 1px 1px 0 #000;
  animation: sol-pop 1.3s ease-out forwards;
}
@keyframes sol-pop { 0% { transform: translate(-50%, 6px) scale(.8); opacity: 0; } 15% { transform: translate(-50%, 0) scale(1.1); opacity: 1; } 100% { transform: translate(-50%, -30px); opacity: 0; } }
.sol-board.is-wait .card { cursor: not-allowed; }

.sol-status {
  padding-left: 4px;
  flex: 0 0 auto;
  display: flex; justify-content: flex-start; gap: 0;
  height: 22px;
  background: var(--xp-face);
  border-top: 1px solid #fff;
  font-size: 11px;
}
.sol-status[hidden] { display: none; }
.sol-status span { padding: 3px 12px; border-left: 1px solid #c5c2b2; }

/* Косынка VS: арена с бойцами над столом */
/* Обучение в косынке: подсказка внизу стола и подсветка нужных карт */
.sol-coach { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); z-index: 900; width: min(560px, calc(100% - 20px)); box-sizing: border-box;
  background: #fffbe0; color: #1a1a1a; border: 1px solid #a08a2a; border-radius: 8px; box-shadow: 0 6px 18px rgba(0,0,0,.45); padding: 10px 12px 8px; font: 13px/1.4 Tahoma, Verdana, sans-serif; }
.sol-coach.is-in { animation: sol-coach-in .25s ease-out; }
@keyframes sol-coach-in { from { opacity: 0; transform: translate(-50%, 12px); } }
.sol-coach-n { font-size: 11px; color: #7a6510; font-weight: bold; margin-bottom: 4px; }
.sol-coach-b { display: flex; justify-content: space-between; gap: 8px; margin-top: 8px; }
.sol-coach-b button { font: 12px Tahoma, sans-serif; padding: 3px 10px; border: 1px solid #7a7a7a; border-radius: 3px; background: linear-gradient(#fff, #e3e0d0); cursor: pointer; }
.sol-coach-next { font-weight: bold !important; border-color: #2a5aa8 !important; }
.sol-coach-skip { color: #555; }
.card.is-coach, .sol-slot.is-coach { animation: sol-coach-glow 1s ease-in-out infinite; }
@keyframes sol-coach-glow { 0%, 100% { box-shadow: 0 0 0 2px #ffd84a, 0 0 8px 2px rgba(255,216,74,.6); } 50% { box-shadow: 0 0 0 3px #ffb000, 0 0 18px 6px rgba(255,200,40,.9); } }
.sol-vs { flex: 0 0 auto; position: relative; height: 30%; min-height: 104px; max-height: 230px; background: #120c24; border-bottom: 2px solid #000; }
.sol-vs[hidden] { display: none; }
.sol-arena { display: block; width: 100%; height: 100%; image-rendering: pixelated; image-rendering: crisp-edges; }
.sol-vs-btns { position: absolute; right: 6px; bottom: 6px; display: flex; gap: 4px; }
.sol-vs-btns button {
  padding: 3px 8px; border-radius: 4px; border: 1px solid rgba(255,255,255,.45); cursor: pointer;
  background: rgba(0,0,0,.55); color: #fff; font: bold 11px Tahoma, sans-serif;
}
.sol-vs-btns button:hover { background: rgba(0,0,0,.75); }
.sol-shuf.is-hot { background: linear-gradient(#ffe680, #f0b020); color: #2a1c00; border-color: #ffd84a; animation: sol-hot 1s ease-in-out infinite; }
@keyframes sol-hot { 50% { transform: scale(1.08); box-shadow: 0 0 10px #ffd84a; } }

/* Косынка на двоих: панель игроков */
.sol-mp {
  flex: 0 0 auto; display: flex; align-items: stretch; gap: 6px; padding: 5px 6px;
  background: linear-gradient(#0a4a18, #073812); border-bottom: 1px solid #000; color: #fff; font: 12px Tahoma, sans-serif;
}
.sol-mp[hidden] { display: none; }
.sol-pl {
  flex: 1; min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 3px 8px;
  border-radius: 6px; background: rgba(255,255,255,.08); border-left: 4px solid var(--pc);
}
.sol-pl.is-turn { background: rgba(255,255,255,.2); box-shadow: 0 0 0 1px var(--pc), 0 0 10px var(--pc); }
.sol-pl-n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sol-pl-s { font: bold 17px Tahoma, sans-serif; color: #ffe680; }
.sol-turn { flex: 1.2; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-align: center; }
.sol-turn-t { font-weight: bold; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.sol-turn-bar { display: block; width: 100%; height: 5px; background: rgba(0,0,0,.4); border-radius: 3px; overflow: hidden; }
.sol-turn-bar i { display: block; height: 100%; transition: width .2s linear; }
.sol-combo { min-height: 13px; color: #ffd84a; font-size: 11px; font-weight: bold; }
.sol-pass {
  flex: 0 0 auto; padding: 0 10px; border-radius: 4px; border: 1px solid #ffd84a; color: #2a1c00; font: bold 12px Tahoma, sans-serif; cursor: pointer;
  background: linear-gradient(#ffe680, #f0b020);
}
.sol-pass:disabled { opacity: .4; cursor: default; }
@media (max-width: 560px) {
  .sol-mp { flex-wrap: wrap; }
  .sol-turn { order: -1; flex: 1 1 100%; flex-direction: row; gap: 8px; }
  .sol-turn-bar { flex: 1; }
  .sol-pass { flex: 1 1 100%; padding: 6px; }
}

/* ==========================================================
   Пинбол
   ========================================================== */

.pb-app { background: #000; }
.pb-stage {
  flex: 1; min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 8px;
  background: radial-gradient(ellipse at center, #1a1a3a, #000 70%);
}
.pb-table { position: relative; touch-action: none; cursor: pointer; line-height: 0; }
.pb-canvas { display: block; border: 2px solid #3c3c6a; box-shadow: 0 0 30px rgba(120,80,255,.25); }
.pb-pause {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  background: rgba(0,0,0,.55);
  color: #ffe14a;
  font: bold 32px/1 Arial, sans-serif;
  letter-spacing: 4px;
}
.pb-pause[hidden] { display: none; }
.pb-panel {
  width: 220px;
  display: flex; flex-direction: column; gap: 8px;
  padding: 10px;
  background: #000;
  border: 3px solid #555;
  border-color: #888 #333 #333 #888;
  font-family: 'Courier New', monospace;
  color: #b58cff;
}
.pb-logo {
  display: flex; flex-direction: column; align-items: center;
  padding: 10px 4px;
  background: radial-gradient(circle at 70% 30%, #4a2d9a, #120a33 70%);
  border: 2px solid #6a5aaa;
  font-family: 'Arial Black', Arial, sans-serif;
  text-align: center;
}
.pb-logo small { color: #d0b8ff; font-size: 12px; font-style: italic; }
.pb-logo b { color: #c88bff; font-size: 26px; font-style: italic; line-height: 1; text-shadow: 2px 2px 0 #3b1a7a, 0 0 10px rgba(200,140,255,.6); }
.pb-logo span { color: #ffb24a; font: bold 11px Arial, sans-serif; margin-top: 4px; }
.pb-ballrow, .pb-scorerow {
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  padding: 4px 8px;
  border: 2px solid #444;
  background: #050510;
  font-weight: bold;
}
.pb-ballrow span { color: #ff4a4a; font-size: 16px; }
.pb-ballrow b, .pb-scorerow b { color: #b58cff; font-size: 24px; }
.pb-player { color: #b58cff; font-size: 18px; border-right: 2px solid #444; padding-right: 8px; }
.pb-scorerow b { font-variant-numeric: tabular-nums; }
.pb-msg { min-height: 20px; padding: 2px 6px; font-size: 14px; font-weight: bold; line-height: 1.25; }
.pb-msg1 { color: #c8a8ff; }
.pb-msg2 { color: #9a7ae0; min-height: 36px; }
.pb-rank { color: #ffb24a; font-size: 12px; padding: 0 6px; }
.pb-rank b { color: #ffe14a; }
.pb-launch {
  margin-top: auto;
  padding: 12px;
  border: 2px solid #ff7a3a;
  border-radius: 6px;
  background: linear-gradient(180deg, #8a2a10, #4a0a00);
  color: #ffd2a0;
  font: bold 15px Arial, sans-serif;
  letter-spacing: 1px;
  cursor: pointer;
  touch-action: none;
}
.pb-launch:active { background: linear-gradient(180deg, #ff5a1a, #a02000); }
.pb-stage.is-narrow { flex-direction: column-reverse; justify-content: flex-end; gap: 6px; }
.pb-stage.is-narrow .pb-panel {
  width: 100%; max-width: 520px;
  flex-direction: row; flex-wrap: wrap; align-items: center;
  gap: 4px 8px; padding: 6px;
}
.pb-stage.is-narrow .pb-logo, .pb-stage.is-narrow .pb-rank { display: none; }
.pb-stage.is-narrow .pb-ballrow, .pb-stage.is-narrow .pb-scorerow { padding: 2px 6px; }
.pb-stage.is-narrow .pb-scorerow { flex: 1; }
.pb-stage.is-narrow .pb-ballrow b, .pb-stage.is-narrow .pb-scorerow b { font-size: 18px; }
.pb-stage.is-narrow .pb-msg { flex: 1 1 100%; min-height: 0; font-size: 12px; padding: 0 4px; }
.pb-stage.is-narrow .pb-msg2 { min-height: 0; }
.pb-stage.is-narrow .pb-launch { margin: 0; padding: 8px 12px; order: 3; }

/* Пинбол: сектор, соперник, бусты */
.pb-goal { height: 6px; background: #1a1430; border: 1px solid #444; }
.pb-goal i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #8a6bff, #ffcc33); transition: width .3s; }
.pb-opprow { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 4px 8px; border: 2px solid #5a2a2a; background: #150505; font-weight: bold; }
.pb-opprow[hidden] { display: none; }
.pb-oppname { color: #ff9a7a; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pb-oppscore { color: #ffb08a; font-size: 18px; font-variant-numeric: tabular-nums; }
.pb-boosts { display: flex; flex-wrap: wrap; gap: 6px; min-height: 0; font: bold 13px Arial, sans-serif; }
.pb-boosts:empty { display: none; }
.pb-wait {
  position: absolute; left: 50%; top: 40%; transform: translate(-50%, -50%); max-width: 80%; padding: 10px 14px; line-height: 1.3;
  background: rgba(0,0,0,.75); color: #ffe14a; border: 2px solid #ffe14a; border-radius: 8px; font: bold 14px Arial, sans-serif; text-align: center;
}
.pb-wait[hidden] { display: none; }
.pb-stage.is-narrow .pb-goal { flex: 1 1 100%; order: 2; }
.pb-stage.is-narrow .pb-opprow { padding: 2px 6px; }
.pb-stage.is-narrow .pb-oppscore { font-size: 15px; }
.pb-stage.is-narrow .pb-boosts { flex: 1 1 100%; }
.pb-canvas { border-color: #2a2a4a; border-radius: 4px; }

/* ==========================================================
   Winamp
   ========================================================== */

.wa-app {
  background: #101018 var(--xp-wallpaper, none) center / cover;
  font-family: Arial, Helvetica, sans-serif;
  color: #00e000;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
.wa-desk {
  min-height: 100%;
  display: grid;
  grid-template-columns: minmax(300px, 420px) minmax(0, 1fr);
  gap: 0;
  padding: 16px;
  align-content: center;
  align-items: start;
}
.wa-col { display: flex; flex-direction: column; min-width: 0; }
.wa-win {
  background: linear-gradient(180deg, #3b3b55, #23233a 30%, #1d1d30);
  border: 1px solid #000;
  box-shadow: inset 1px 1px 0 #5a5a7a, inset -1px -1px 0 #0a0a14, 3px 3px 10px rgba(0,0,0,.5);
}
.wa-win.is-hidden { display: none; }
.wa-titlebar {
  display: flex; align-items: center; gap: 6px;
  height: 18px;
  padding: 0 4px;
  background: linear-gradient(180deg, #4c4c6a, #2a2a40);
  border-bottom: 1px solid #000;
}
.wa-tb-l, .wa-tb-r {
  flex: 1; height: 8px;
  background: repeating-linear-gradient(180deg, #b8a35a 0 1px, #403a20 1px 2px);
  border-radius: 1px;
  opacity: .85;
}
.wa-tb-title { color: #e8e8f0; font: bold 10px Arial, sans-serif; letter-spacing: 1.5px; white-space: nowrap; }
.wa-tb-btns { display: flex; gap: 2px; }
.wa-tbb {
  width: 14px; height: 12px;
  padding: 0; line-height: 9px;
  border: 1px solid #000;
  background: linear-gradient(180deg, #9a9ab2, #5a5a72);
  color: #000;
  font: bold 10px Arial, sans-serif;
  cursor: pointer;
}
.wa-tbb:hover { background: linear-gradient(180deg, #c8c8dc, #7a7a92); }

.wa-main-body { padding: 8px 10px 10px; }
.wa-top { display: flex; gap: 8px; }
.wa-display {
  flex: 0 0 auto;
  width: 118px; height: 48px;
  background: #000;
  border: 1px solid;
  border-color: #0a0a14 #6a6a8a #6a6a8a #0a0a14;
  cursor: pointer;
}
.wa-lcd { width: 100%; height: 100%; display: block; image-rendering: pixelated; }
.wa-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.wa-marquee {
  height: 18px;
  padding: 1px 4px;
  background: #000;
  border: 1px solid;
  border-color: #0a0a14 #6a6a8a #6a6a8a #0a0a14;
  color: #00ff3c;
  font: 12px/16px 'Courier New', monospace;
  white-space: pre;
  overflow: hidden;
}
.wa-meta { display: flex; align-items: center; gap: 4px; color: #d8d8e8; font-size: 9px; }
.wa-box { padding: 0 3px; background: #000; color: #00ff3c; font: 11px 'Courier New', monospace; border: 1px solid #0a0a14; }
.wa-ms { margin-left: auto; display: flex; gap: 4px; }
.wa-ms i { font-style: normal; color: #3a3a4a; }
.wa-app.is-playing .wa-stereo { color: #00ff3c; }
.wa-sliders { display: flex; align-items: center; gap: 6px; }
.wa-sliders label { display: flex; }
.wa-vol { flex: 1.6; }
.wa-bal { flex: 1; }
.wa-toggle {
  padding: 1px 4px;
  border: 1px solid #000;
  background: linear-gradient(180deg, #8a8aa2, #4a4a62);
  color: #1a1a1a;
  font: bold 9px Arial, sans-serif;
  cursor: pointer;
  position: relative;
  padding-left: 9px;
}
.wa-toggle::before { content: ''; position: absolute; left: 2px; top: 50%; width: 4px; height: 4px; margin-top: -2px; background: #2a3a2a; }
.wa-toggle.is-on::before { background: #00ff3c; box-shadow: 0 0 4px #00ff3c; }

/* Ползунки Winamp */
.wa-app input[type=range] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 10px;
  margin: 0;
  background: transparent;
  cursor: pointer;
  --p: 50%;
}
.wa-app input[type=range]::-webkit-slider-runnable-track {
  height: 8px;
  border: 1px solid #000;
  background: linear-gradient(90deg, #c8a020 0, #e8c840 var(--p), #262636 var(--p));
}
.wa-app input[type=range]::-moz-range-track { height: 8px; border: 1px solid #000; background: #262636; }
.wa-app input[type=range]::-moz-range-progress { height: 8px; background: #e8c840; }
.wa-app input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px; height: 10px;
  margin-top: -2px;
  border: 1px solid #000;
  background: linear-gradient(180deg, #e8e8f0, #8a8aa2);
}
.wa-app input[type=range]::-moz-range-thumb { width: 14px; height: 10px; border: 1px solid #000; border-radius: 0; background: linear-gradient(180deg, #e8e8f0, #8a8aa2); }
.wa-bal input[type=range]::-webkit-slider-runnable-track { background: linear-gradient(90deg, #262636, #4ad44a 50%, #262636); }
.wa-seek { margin: 10px 0 8px !important; height: 12px !important; }
.wa-seek::-webkit-slider-runnable-track { height: 10px !important; background: linear-gradient(90deg, #3a5aa0 0, #5a8ae0 var(--p), #10101a var(--p)) !important; }
.wa-seek::-webkit-slider-thumb { width: 28px !important; height: 12px !important; margin-top: -2px !important; }

.wa-controls { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.wa-cb {
  width: 30px; height: 22px;
  padding: 3px 5px;
  border: 1px solid #000;
  background: linear-gradient(180deg, #d0d0dc, #8a8aa2 60%, #6a6a82);
  box-shadow: inset 1px 1px 0 #fff;
  cursor: pointer;
}
.wa-cb svg { fill: #1a1a2a; }
.wa-cb:active { background: linear-gradient(180deg, #6a6a82, #a0a0b4); box-shadow: inset 1px 1px 2px #000; }
.wa-eject { margin-left: 6px; }
.wa-shuffle { margin-left: 8px; }
.wa-bolt { width: 26px; height: 26px; margin-left: auto; cursor: pointer; }
.wa-app.is-playing .wa-play svg { fill: #0a6a0a; }

/* Эквалайзер */
.wa-eq-body { padding: 6px 10px 10px; }
.wa-eq-top { display: flex; align-items: center; gap: 4px; margin-bottom: 8px; }
.wa-eq-curve { flex: 1; min-width: 0; height: 22px; background: #000; border: 1px solid #0a0a14; }
.wa-eq-sliders { display: flex; align-items: stretch; gap: 2px; height: 110px; }
.wa-eq-band { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 0; }
.wa-eq-pre { flex: 1.4; margin-right: 2px; }
.wa-eq-band span { color: #d8d8e8; font: bold 8px Arial, sans-serif; white-space: nowrap; }
.wa-eq-band input[type=range] {
  writing-mode: vertical-lr;
  direction: rtl;
  width: 12px !important;
  height: 100% !important;
  flex: 1;
}
.wa-eq-band input[type=range]::-webkit-slider-runnable-track { width: 6px; height: auto; background: linear-gradient(0deg, #2a8a2a, #c8c820 50%, #c83a1a) !important; border: 1px solid #000; }
.wa-eq-band input[type=range]::-webkit-slider-thumb { width: 12px; height: 9px; margin-top: 0; margin-left: -4px; }
.wa-eq-band input[type=range]::-moz-range-track { width: 6px; background: linear-gradient(0deg, #2a8a2a, #c8c820 50%, #c83a1a); }
.wa-eq-band input[type=range]::-moz-range-progress { background: transparent; }
.wa-eq-scale { display: flex; flex-direction: column; justify-content: space-between; color: #d8d8e8; font: bold 7px Arial, sans-serif; padding: 2px 2px 14px; white-space: nowrap; }

/* Плейлист */
.wa-list {
  margin: 0;
  padding: 4px 0;
  list-style: none;
  height: 180px;
  overflow-y: auto;
  background: #000;
  border: 1px solid #0a0a14;
  margin: 4px 6px;
  font: 12px/18px Arial, sans-serif;
  scrollbar-color: #4a4a62 #000;
}
.wa-item { display: flex; gap: 8px; padding: 0 6px; color: #00e000; cursor: pointer; }
.wa-item-t { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wa-item.is-sel { background: #0000c6; }
.wa-item.is-current { color: #fff; }
.wa-item:hover { background: #10105a; }
.wa-empty { padding: 8px; color: #00a000; line-height: 1.4; }
.wa-pl-foot { display: flex; align-items: center; gap: 3px; padding: 2px 6px 6px; }
.wa-pb {
  padding: 2px 5px;
  border: 1px solid #000;
  background: linear-gradient(180deg, #a0a0b4, #5a5a72);
  color: #10101a;
  font: bold 9px Arial, sans-serif;
  cursor: pointer;
}
.wa-total { margin-left: auto; padding: 1px 4px; background: #000; color: #00ff3c; font: 10px 'Courier New', monospace; }

/* Видео */
.wa-col--right { padding-left: 0; }
.wa-video { display: flex; flex-direction: column; }
.wa-screen { position: relative; background: #000; aspect-ratio: 16 / 9; margin: 4px; border: 1px solid #0a0a14; }
.wa-screen:fullscreen { margin: 0; border: 0; }
.wa-vid { position: absolute; inset: 0; width: 100%; height: 100%; background: #000; object-fit: contain; }
.wa-splash {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  background: radial-gradient(circle, #2a2a40, #000 70%);
  color: #e8c840;
  pointer-events: none;
  transition: opacity .3s;
}
.wa-splash-bolt { width: 64px; height: 64px; }
.wa-splash b { font: bold 22px Arial, sans-serif; letter-spacing: 6px; }
.wa-splash small { color: #8a8aa2; font-size: 11px; font-style: italic; }
.wa-app.is-playing .wa-splash, .wa-app.is-paused .wa-splash { opacity: 0; }
.wa-video-foot { display: flex; align-items: center; gap: 6px; padding: 2px 6px 6px; }
.wa-video-title { flex: 1; color: #00e000; font: 11px 'Courier New', monospace; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ==========================================================
   Адаптив под телефоны
   ========================================================== */

@media (max-width: 900px) {
  .wa-desk { grid-template-columns: 1fr; padding: 8px; align-content: start; }
  .wa-col--right { order: -1; }
  .wa-col--left { max-width: 520px; width: 100%; justify-self: center; }
  .wa-col--right { max-width: 720px; width: 100%; justify-self: center; }
}

@media (max-width: 700px) {
  :root { --xp-taskbar-h: 40px; }
  #xp-icons { flex-direction: row; align-content: flex-start; justify-content: flex-start; padding: 12px 8px; gap: 10px 0; }
  .xp-icon { width: 25%; }
  .xp-icon-img { width: 46px; height: 46px; }
  .xp-icon-label { font-size: 12px; }
  #xp-start { padding: 0 12px 0 6px; margin-right: 6px; }
  .xp-task { flex: 0 1 44px; justify-content: center; padding: 0; }
  .xp-task-label { display: none; }
  .xp-task-icon { width: 20px; height: 20px; }
  #xp-startmenu { width: 100%; border-radius: 0; }
  .sm-cols { flex-direction: column; }
  .sm-right { border-left: 0; border-top: 1px solid #95bdee; }
  .sm-item { padding: 6px 8px; }
  .sm-ritem { padding: 6px 8px; }
  .wd-pane { display: none; }
  .wd-page { padding: 24px 20px; min-height: 0; }
  .wd-work { padding: 10px 6px 30px; }
  .wd-st-wide { display: none; }
  .wd-tb { min-width: 30px; height: 30px; }
  .wd-select { height: 26px; }
  .lg-mid { flex-direction: column; justify-content: center; gap: 24px; }
  .lg-left { align-items: center; text-align: center; padding: 0; flex: 0; }
  .lg-sep { width: 70%; height: 1px; align-self: center; margin: 0; background: linear-gradient(90deg, transparent, #fff, transparent); }
  .lg-right { padding: 0; flex: 0; }
  .lg-user { border-radius: 10px; padding: 10px 20px 10px 10px; }
  .lg-account, #xp-login.is-asking .lg-account { border-radius: 10px; background: rgba(0,48,156,.55); }
  .lg-form { padding: 0 14px 12px; }
  .lg-input { width: 100%; min-width: 0; flex: 1; font-size: 16px; height: 32px; }
  .lg-go { width: 32px; height: 32px; }
  .lg-go::after { left: 11px; top: 9px; }
  .lg-title { font-size: 34px; }
  .lg-hint { font-size: 14px; margin-top: 10px; }
  .lg-note { display: none; }
  .boot-win { font-size: 38px; }
  .boot-flag { width: 64px; height: 56px; }
  .lg-welcome { font-size: 38px; }
  .clippy-char { width: 74px; height: 92px; }
  #clippy { right: 4px; }
  .clippy-bubble { margin-right: 14px; font-size: 13px; }
  .xp-titlebar { height: 32px; }
  .xp-tbtn { width: 26px; height: 26px; }
  .xp-tbtn--min::before { left: 7px; bottom: 6px; }
  .xp-tbtn--max::before { left: 6px; top: 6px; }
  .xp-tbtn--close::before, .xp-tbtn--close::after { left: 11px; top: 5px; }
  .xp-menubar-item { padding: 6px 9px; font-size: 13px; }
  .xp-menu { font-size: 14px; }
  .xp-menu-item { min-height: 34px; }
  .wa-cb { width: 38px; height: 30px; }
  .wa-list { height: 150px; font-size: 14px; line-height: 26px; }
  .wa-toggle, .wa-pb { padding-top: 4px; padding-bottom: 4px; }
  .wa-app input[type=range] { height: 20px; }
}

@media (max-height: 500px) and (orientation: landscape) {
  .lg-mid { flex-direction: row; }
  .boot-center { gap: 24px; }
}

/* ===================================================================
   «Путь пояса» — файтинг
   =================================================================== */
.fg-body { background: #000; overflow: hidden; }
.fg-app {
  position: relative; flex: 1; min-height: 0;
  display: flex; flex-direction: column;
  background: #000; color: #fff;
  user-select: none; -webkit-user-select: none; touch-action: none;
  -webkit-tap-highlight-color: transparent;
}
.fg-screen { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.fg-canvas { display: block; image-rendering: pixelated; image-rendering: crisp-edges; cursor: pointer; }

/* Лобби онлайна */
.fg-lobby { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 6; pointer-events: none; }
.fg-lobby[hidden] { display: none; }
.fg-lb-box {
  pointer-events: auto;
  width: min(340px, 90%); max-height: 90%; overflow: auto;
  margin-top: 40px; padding: 14px 18px 16px;
  background: linear-gradient(#1c2a6a, #0c1238); border: 2px solid #6a8cff; border-radius: 6px;
  box-shadow: 0 0 0 2px #000, 0 10px 30px rgba(0,0,0,.6);
  font: 13px Tahoma, Verdana, sans-serif; text-align: center;
}
.fg-lb-box h3 { margin: 0 0 4px; font-size: 16px; color: #ffe060; }
.fg-lb-who { margin: 0 0 10px; opacity: .85; }
.fg-lb-btn {
  font: bold 13px Tahoma, sans-serif; color: #fff; cursor: pointer;
  padding: 7px 14px; border-radius: 4px; border: 1px solid #000;
  background: linear-gradient(#ff9a30, #d05a00); box-shadow: inset 0 1px 0 rgba(255,255,255,.4);
}
.fg-lb-btn:hover { filter: brightness(1.1); }
.fg-lb-btn:active { transform: translateY(1px); }
.fg-lb-or { margin: 8px 0; opacity: .7; }
.fg-lb-join { display: flex; gap: 6px; justify-content: center; }
.fg-lb-code {
  width: 130px; padding: 6px 8px; font: bold 18px Consolas, monospace; letter-spacing: 4px; text-align: center;
  border: 1px solid #000; border-radius: 4px; background: #fff; color: #000;
}
.fg-lb-room[hidden], .fg-lb-main[hidden] { display: none; }
.fg-lb-num { font: bold 44px Consolas, monospace; letter-spacing: 8px; color: #ffe060; text-shadow: 3px 3px 0 #000; margin: 2px 0 8px; }
.fg-lb-room p { margin: 8px 0 0; font-size: 12px; opacity: .85; }
.fg-lb-wait { animation: fg-blink 1s steps(2) infinite; color: #8fd0ff; }
@keyframes fg-blink { 50% { opacity: .3; } }
.fg-lb-status { min-height: 16px; margin: 8px 0 6px; color: #8fd0ff; }
.fg-lb-status.is-bad { color: #ff8080; }
.fg-lb-back { background: linear-gradient(#6a6a8a, #3a3a52); }

/* Просьба повернуть телефон */
.fg-rotate {
  position: absolute; inset: 0; z-index: 20;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  background: #0a0a20; text-align: center; padding: 20px;
  font: 15px Tahoma, sans-serif;
}
.fg-rotate[hidden] { display: none; }
.fg-rotate p { margin: 0; font-weight: bold; font-size: 18px; color: #ffe060; }
.fg-rotate small { opacity: .75; }
.fg-rotate-phone {
  width: 46px; height: 78px; border: 4px solid #fff; border-radius: 9px; position: relative;
  animation: fg-rot 2s ease-in-out infinite;
}
.fg-rotate-phone::after { content: ''; position: absolute; left: 50%; bottom: 4px; width: 8px; height: 8px; margin-left: -4px; border-radius: 50%; background: #fff; }
@keyframes fg-rot { 0%, 25% { transform: rotate(0); } 55%, 100% { transform: rotate(-90deg); } }

/* Экранный геймпад в стиле Xbox */
.fg-pad { position: absolute; inset: 0; z-index: 5; pointer-events: none; }
.fg-app.is-portrait .fg-pad { display: none; }
.fg-pad button, .fg-stick-zone { pointer-events: auto; touch-action: none; }
.fg-stick-zone { position: absolute; left: 0; bottom: 0; width: 40%; height: 72%; }
.fg-stick {
  position: absolute; left: 92px; top: calc(100% - 92px);
  width: 104px; height: 104px; margin: -52px 0 0 -52px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.08) 40%, rgba(255,255,255,.18) 41%, rgba(255,255,255,.1) 70%);
  border: 2px solid rgba(255,255,255,.35);
  opacity: .55; transition: opacity .15s;
}
.fg-stick.is-on { opacity: .9; }
.fg-knob {
  position: absolute; left: 50%; top: 50%; width: 50px; height: 50px; margin: -25px 0 0 -25px; border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #8a8a9a, #2a2a34 70%); border: 2px solid rgba(0,0,0,.6);
  box-shadow: 0 2px 6px rgba(0,0,0,.6);
}
.fg-face { position: absolute; right: 18px; bottom: 14px; width: 162px; height: 162px; }
.fg-btn, .fg-sh, .fg-tr, .fg-sys {
  position: absolute; border: 2px solid rgba(0,0,0,.55); color: #fff; padding: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1;
  font-family: Arial, sans-serif; opacity: .78;
  box-shadow: inset 0 2px 0 rgba(255,255,255,.35), 0 3px 6px rgba(0,0,0,.5);
}
.fg-btn { width: 56px; height: 56px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #555, #1e1e24 70%); }
.fg-btn b { font-size: 22px; text-shadow: 0 0 4px rgba(0,0,0,.6); }
.fg-btn i, .fg-sh i, .fg-tr i { font-style: normal; font-size: 9px; opacity: .85; margin-top: 1px; }
.fg-y { left: 53px; top: 0; } .fg-y b { color: #ffd84a; }
.fg-x { left: 0; top: 53px; } .fg-x b { color: #4aa8ff; }
.fg-b { right: 0; top: 53px; } .fg-b b { color: #ff5a4a; }
.fg-a { left: 53px; bottom: 0; } .fg-a b { color: #5ad85a; }
.fg-btn.is-on, .fg-sh.is-on, .fg-tr.is-on { opacity: 1; transform: scale(.92); filter: brightness(1.4); }
.fg-shoulder { position: absolute; right: 196px; bottom: 14px; width: 152px; height: 122px; pointer-events: none; }
.fg-sh { width: 72px; height: 40px; border-radius: 12px; background: linear-gradient(#5a5a66, #26262e); }
.fg-sh b, .fg-tr b { font-size: 13px; }
.fg-tr { width: 72px; height: 40px; border-radius: 16px 16px 8px 8px; background: linear-gradient(#45454f, #1c1c22); }
.fg-lt { left: 0; top: 34px; } .fg-rt { right: 0; top: 34px; }
.fg-lb { left: 0; bottom: 0; } .fg-rb { right: 0; bottom: 0; }
.fg-sys { width: 34px; height: 26px; border-radius: 13px; background: #2a2a34; top: 0; font-size: 15px; }
.fg-view { left: 36px; } .fg-start { right: 36px; }

/* Полноэкранный режим «как приставка» на телефоне */
body.fg-immersive #xp-taskbar,
body.fg-immersive #clippy,
body.fg-immersive .xp-window[data-app="fighter"] .xp-titlebar { display: none !important; }
body.fg-immersive #xp-desktop { bottom: 0; }
body.fg-immersive .xp-window[data-app="fighter"] { border: 0; border-radius: 0; }
@media (max-height: 420px) {
  .fg-btn { width: 50px; height: 50px; }
  .fg-face { width: 146px; height: 146px; right: 12px; bottom: 8px; }
  .fg-y { left: 48px; } .fg-x { top: 48px; } .fg-b { top: 48px; } .fg-a { left: 48px; }
  .fg-shoulder { right: 172px; bottom: 8px; width: 140px; height: 112px; }
  .fg-sh, .fg-tr { width: 66px; height: 38px; }
  .fg-lt, .fg-rt { top: 30px; }
  .fg-stick { width: 92px; height: 92px; margin: -46px 0 0 -46px; }
}

/* =====================================================================
   Тетрамонтаж — тетрис в Windows Movie Maker
   ===================================================================== */
.tm-body { background: #ece9d8; overflow: hidden; }
.tm-app {
  position: relative; flex: 1; min-height: 0;
  display: flex; flex-direction: column;
  background: #ece9d8; color: #000;
  font: 11px Tahoma, Verdana, sans-serif;
  user-select: none; -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.tm-app button { font: inherit; }

/* Панель инструментов */
.tm-toolbar {
  flex: 0 0 auto; display: flex; align-items: center; gap: 2px;
  padding: 2px 4px; border-bottom: 1px solid #b9b6a8;
  background: linear-gradient(#fbfbf8, #ece9d8 60%, #e1ddcc);
  overflow-x: auto; scrollbar-width: none;
}
.tm-tb {
  display: inline-flex; align-items: center; gap: 4px; flex: 0 0 auto;
  height: 28px; padding: 0 7px; border: 1px solid transparent; border-radius: 3px;
  background: none; cursor: pointer; color: #000; white-space: nowrap;
}
.tm-tb svg { width: 20px; height: 20px; }
.tm-tb:hover { border-color: #b2c4dd; background: linear-gradient(#fff, #e3ecf9); }
.tm-tb.is-on { border-color: #8aa6cf; background: linear-gradient(#e8eef8, #cfdcf0); }
.tm-tb-sep { width: 1px; height: 22px; margin: 0 4px; background: #b9b6a8; box-shadow: 1px 0 #fff; }

/* Основная область: задачи | стол | монитор */
.tm-main { flex: 1; min-height: 0; display: flex; }
.tm-tasks {
  flex: 0 0 200px; overflow: auto; padding: 8px;
  background: linear-gradient(#7ba2e7, #6375d6);
  scrollbar-width: thin;
}
.tm-app.no-tasks .tm-tasks { display: none; }
.tm-tasks-h { color: #fff; font-weight: bold; font-size: 12px; margin: 2px 2px 8px; text-shadow: 0 1px 1px rgba(0,0,0,.3); }
.tm-tp { background: #d6dff7; border-radius: 4px 4px 0 0; margin-bottom: 10px; overflow: hidden; }
.tm-tp h4 { margin: 0; padding: 5px 8px; font-size: 11px; color: #215dc6; background: linear-gradient(90deg, #fff, #c6d3f7); }
.tm-tp p { margin: 6px 8px; line-height: 1.35; color: #1b3a7a; }
.tm-tp .tm-tp-title { font-weight: bold; font-size: 12px; color: #0b2b6b; }
.tm-tp .tm-tp-kind { color: #4b5f8f; }
.tm-stats { display: grid; grid-template-columns: auto 1fr; gap: 3px 8px; margin: 6px 8px; }
.tm-stats dt { color: #4b5f8f; }
.tm-stats dd { margin: 0; text-align: right; font-weight: bold; color: #0b2b6b; font-variant-numeric: tabular-nums; }
.tm-s-score { font-size: 13px; }

.tm-panel-h {
  flex: 0 0 auto; padding: 3px 8px; font-weight: bold; color: #fff;
  background: linear-gradient(#5a8ae0, #2f5fc0); border-bottom: 1px solid #1d3f8a;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tm-stage { flex: 0 0 46%; min-width: 0; display: flex; flex-direction: column; background: #121a33; border-right: 1px solid #b9b6a8; }
.tm-app.no-tasks .tm-stage { flex-basis: 50%; }
.tm-board-wrap {
  position: relative; flex: 1; min-height: 0; min-width: 0;
  display: flex; align-items: center; justify-content: center; padding: 6px;
  background: radial-gradient(ellipse at 50% 30%, #2b3a63, #121a33 70%);
}
.tm-board { display: block; touch-action: none; }

.tm-side { flex: 1; min-width: 0; display: flex; flex-direction: column; background: #ece9d8; }
.tm-monitor { flex: 0 0 auto; padding: 8px 8px 4px; background: #d8d4c4; border-bottom: 1px solid #b9b6a8; }
.tm-screen {
  position: relative; aspect-ratio: 16 / 9; width: 100%; max-height: 46vh; margin: 0 auto;
  background: #000; overflow: hidden; border: 2px solid #3a3a3a; box-shadow: inset 0 0 0 1px #777;
}
.tm-video, .tm-photo, .tm-noise { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; transition: filter .5s; }
.tm-video[hidden], .tm-photo[hidden], .tm-noise[hidden] { display: none; }
.tm-noise { image-rendering: pixelated; }
.tm-photo { object-fit: cover; }
.tm-photo.is-kb { animation: tm-kb 18s ease-in-out infinite alternate; }
@keyframes tm-kb { from { transform: scale(1.05) translate(-1.5%, 1%); } to { transform: scale(1.22) translate(2%, -2%); } }
.tm-caption {
  position: absolute; left: 0; right: 0; bottom: 8%; padding: 0 6%;
  text-align: center; color: #fff; font: bold clamp(11px, 2.4vw, 22px) Georgia, "Times New Roman", serif;
  text-shadow: 0 2px 0 #000, 0 0 6px #000; pointer-events: none;
}
.tm-caption.is-typing::after { content: "\258C"; animation: tm-blink .6s steps(1) infinite; }
@keyframes tm-blink { 50% { opacity: 0; } }
.tm-stamp {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) rotate(-8deg);
  padding: 4px 14px; border: 4px solid; border-radius: 6px; white-space: nowrap;
  font: bold clamp(13px, 2.6vw, 28px) Tahoma, sans-serif; letter-spacing: 1px;
  animation: tm-stamp .35s cubic-bezier(.2, 1.6, .5, 1);
}
.tm-stamp[hidden] { display: none; }
.tm-stamp.is-ok { color: #4dff7a; border-color: #4dff7a; background: rgba(0,40,0,.55); }
.tm-stamp.is-bad { color: #ff5a5a; border-color: #ff5a5a; background: rgba(40,0,0,.55); }
@keyframes tm-stamp { from { transform: translate(-50%, -50%) rotate(-8deg) scale(2.2); opacity: 0; } }

/* Хлопушка */
.tm-clap { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; background: rgba(0,0,0,.45); z-index: 2; }
.tm-clap[hidden] { display: none; }
.tm-clap-top {
  width: min(62%, 300px); height: 13%;
  background: repeating-linear-gradient(-55deg, #111 0 12px, #f4f4f4 12px 24px);
  border: 2px solid #111; transform-origin: 0 100%; transform: rotate(-22deg);
  transition: transform .12s ease-in;
}
.tm-clap.is-clap .tm-clap-top { transform: rotate(0); }
.tm-clap-body {
  width: min(62%, 300px); height: 42%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4%;
  background: #1b1b1b; border: 2px solid #111; color: #fff; box-shadow: 0 6px 20px rgba(0,0,0,.6);
}
.tm-clap-scene { font: bold clamp(8px, 1.5vw, 14px) "Courier New", monospace; letter-spacing: 2px; color: #ddd; }
.tm-clap-n { font: bold clamp(20px, 5vw, 54px) Tahoma, sans-serif; color: #ffd34a; }

.tm-seek { height: 5px; margin: 5px 0 3px; background: #9a9686; border: 1px solid #77735f; }
.tm-seek i { display: block; height: 100%; width: 0; background: linear-gradient(#7bd57b, #2a9a2a); }
.tm-mon-ctrl { display: flex; align-items: center; gap: 6px; }
.tm-mc {
  min-width: 28px; height: 22px; padding: 0 6px; border: 1px solid #7a7768; border-radius: 3px;
  background: linear-gradient(#fff, #dcd8c8); cursor: pointer;
}
.tm-mc:active { background: linear-gradient(#dcd8c8, #fff); }
.tm-time { flex: 1; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tm-vu { display: inline-flex; align-items: flex-end; gap: 2px; height: 16px; }
.tm-vu i { width: 4px; background: #9a9686; }
.tm-vu i:nth-child(1) { height: 30%; } .tm-vu i:nth-child(2) { height: 45%; } .tm-vu i:nth-child(3) { height: 60%; }
.tm-vu i:nth-child(4) { height: 80%; } .tm-vu i:nth-child(5) { height: 100%; }
.tm-vu i.is-on { background: #29a84a; }

.tm-hud { display: none; }
.tm-info { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.tm-coll, .tm-opp-panel { flex: 1; min-height: 0; display: flex; flex-direction: column; background: #fff; }
.tm-coll[hidden], .tm-opp-panel[hidden] { display: none; }
.tm-coll-list { flex: 1; overflow: auto; padding: 6px; display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 6px; align-content: start; }
.tm-ci { display: flex; flex-direction: column; gap: 2px; padding: 3px; border: 1px solid transparent; border-radius: 2px; }
.tm-ci.is-cur { border-color: #316ac5; background: #dbe6f8; }
.tm-ci-th { aspect-ratio: 16 / 9; background: #1b1b2b center / cover no-repeat; border: 1px solid #555; position: relative; filter: grayscale(1) brightness(.6); }
.tm-ci-none .tm-ci-th {
  background-image: linear-gradient(90deg, #c0c0c0 0 14%, #c0c000 14% 28%, #00c0c0 28% 42%, #00c000 42% 56%, #c000c0 56% 70%, #c00000 70% 84%, #0000c0 84%);
}
.tm-ci.is-done .tm-ci-th { filter: none; }
.tm-ci:not(.is-done) .tm-ci-th::after { content: "\1F512"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 18px; }
.tm-ci-t { font-weight: bold; line-height: 1.2; max-height: 2.4em; overflow: hidden; }
.tm-ci small { color: #666; }
.tm-ci.is-done.tm-ci-video small { color: #1a7a2a; }
.tm-ci.is-done:not(.tm-ci-video) small { color: #b02a2a; }

.tm-opp-body { flex: 1; min-height: 0; display: flex; gap: 10px; padding: 6px 8px; align-items: flex-start; background: #f4f3ee; }
.tm-opp-board { border: 2px solid #6f86c0; background: #0d1428; flex: 0 0 auto; }
.tm-o-stats { flex: 1; margin: 0; font-size: 12px; }
.tm-o-stats dd { color: #b02a2a; }

/* Шкала времени */
.tm-tl { flex: 0 0 auto; display: flex; flex-direction: column; background: #fff; border-top: 2px solid #b9b6a8; }
.tm-tl-head {
  display: flex; align-items: center; gap: 12px; padding: 3px 8px;
  background: linear-gradient(#f8f8f4, #e2dfd1); border-bottom: 1px solid #c5c2b2; white-space: nowrap; overflow: hidden;
}
.tm-tl-mode { font-weight: bold; color: #215dc6; }
.tm-tl-proj { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.tm-tl-dl { color: #7a2a2a; font-weight: bold; }
.tm-tl-body { display: flex; }
.tm-tl-names { flex: 0 0 92px; border-right: 1px solid #c5c2b2; background: #f1efe6; }
.tm-tl-sp { height: 18px; border-bottom: 1px solid #c5c2b2; }
.tm-tn { height: 30px; display: flex; align-items: center; gap: 6px; padding: 0 8px; border-bottom: 1px solid #e3e0d4; font-weight: bold; white-space: nowrap; overflow: hidden; }
.tm-tn i { flex: 0 0 auto; width: 10px; height: 10px; border-radius: 2px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.3); }
.tm-tl-area { position: relative; flex: 1; min-width: 0; }
.tm-ruler {
  position: relative; height: 18px; border-bottom: 1px solid #c5c2b2; overflow: hidden;
  background: repeating-linear-gradient(90deg, #8a8678 0 1px, transparent 1px 2.5%) bottom / 100% 5px no-repeat, #faf9f4;
}
.tm-ruler span { position: absolute; top: 1px; padding-left: 3px; font-size: 10px; color: #555; border-left: 1px solid #8a8678; height: 100%; }
.tm-lane {
  position: relative; height: 30px; border-bottom: 1px solid #e3e0d4;
  background: repeating-linear-gradient(90deg, transparent 0 calc(10% - 1px), #eeece2 calc(10% - 1px) 10%), #fbfaf6;
}
.tm-fill { position: absolute; left: 0; top: 3px; bottom: 3px; right: 0; display: flex; pointer-events: none; overflow: hidden; }
.tm-clip {
  flex: 0 0 auto; width: 0; height: 100%; overflow: hidden; white-space: nowrap;
  border-radius: 2px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.4);
  background-color: var(--c); background-size: auto 100%; background-repeat: repeat-x;
  transition: width .45s cubic-bezier(.3, 1.4, .5, 1);
  font: bold 10px/24px Georgia, serif; color: #4a2a00; text-indent: 4px;
}
.tm-clip-audio {
  background-image: repeating-linear-gradient(90deg, rgba(255,255,255,.7) 0 2px, transparent 2px 5px);
  background-size: 100% 55%; background-position: 0 50%; background-repeat: no-repeat;
}
.tm-clip-title { background-image: linear-gradient(rgba(255,255,255,.35), transparent); }
.tm-clip-fx {
  background-image: radial-gradient(circle at 30% 40%, rgba(255,255,255,.9) 0 1.5px, transparent 2px), radial-gradient(circle at 70% 65%, rgba(255,255,255,.7) 0 1px, transparent 1.5px);
  background-size: 14px 100%;
}
.tm-pct { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); font-weight: bold; font-size: 10px; color: #444; background: rgba(255,255,255,.85); padding: 0 3px; border-radius: 2px; z-index: 1; }
.tm-lane.is-full .tm-pct { color: #fff; background: #1a8a2a; }
.tm-lane.is-full .tm-pct::after { content: " \2713"; }
.tm-opp { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: #e02a2a; z-index: 1; transition: left .3s; box-shadow: 0 0 0 1px rgba(255,255,255,.6); }
.tm-opp[hidden] { display: none; }
.tm-playhead { position: absolute; top: 0; bottom: 0; left: 0; width: 2px; margin-left: -1px; background: #2a4fd8; z-index: 2; pointer-events: none; }
.tm-playhead::before { content: ""; position: absolute; top: 0; left: -5px; border: 6px solid transparent; border-top: 8px solid #2a4fd8; }
.tm-playhead.is-late { background: #e02a2a; animation: tm-blink .5s steps(1) infinite; }
.tm-playhead.is-late::before { border-top-color: #e02a2a; }

.tm-status {
  flex: 0 0 auto; display: flex; justify-content: space-between; gap: 10px; padding: 2px 8px;
  border-top: 1px solid #b9b6a8; background: #ece9d8; color: #333; white-space: nowrap; overflow: hidden;
}

/* Частицы поверх всего окна */
.tm-fx { position: absolute; left: 0; top: 0; pointer-events: none; z-index: 5; }

/* Тост */
.tm-toast {
  position: absolute; left: 50%; top: 12%; transform: translateX(-50%); z-index: 8;
  width: max-content; max-width: min(92%, 520px); padding: 10px 14px; border: 1px solid #000; border-radius: 6px;
  background: #ffffe1; box-shadow: 2px 3px 10px rgba(0,0,0,.35); font-size: 12px; line-height: 1.4; text-align: center; pointer-events: none;
}
.tm-toast[hidden] { display: none; }
.tm-toast.is-in { animation: tm-toast .3s ease-out; }
.tm-toast small { color: #1a7a2a; font-weight: bold; margin-left: 4px; }
@keyframes tm-toast { from { transform: translate(-50%, -12px); opacity: 0; } }

/* Диалоги в стиле XP внутри окна */
.tm-overlay {
  position: absolute; inset: 0; z-index: 9; display: flex; align-items: center; justify-content: center;
  padding: 10px; background: rgba(20, 30, 60, .35);
}
.tm-overlay[hidden] { display: none; }
.tm-dlg {
  width: min(100%, 420px); max-height: 100%; display: flex; flex-direction: column;
  background: #ece9d8; border: 3px solid #0831d9; border-top: 0; border-radius: 8px 8px 0 0;
  box-shadow: 4px 6px 24px rgba(0,0,0,.45); animation: tm-dlg .18s ease-out;
}
.tm-dlg-wide { width: min(100%, 640px); }
@keyframes tm-dlg { from { transform: scale(.94); opacity: 0; } }
.tm-dlg-h {
  flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; height: 28px; padding: 0 4px 0 8px;
  background: linear-gradient(#0997ff, #0053ee 12%, #0050ee 85%, #06f); color: #fff; font: bold 13px "Trebuchet MS", Tahoma, sans-serif;
  border-radius: 7px 7px 0 0; margin: 0 -3px; text-shadow: 1px 1px #0f1089;
}
.tm-dlg-x { width: 21px; height: 21px; border: 1px solid #fff; border-radius: 3px; background: linear-gradient(#e97c5c, #c1401c); color: #fff; font-weight: bold; cursor: pointer; line-height: 1; }
.tm-dlg-b { padding: 12px; overflow: auto; min-height: 0; }
.tm-dlg-btns { display: flex; justify-content: flex-end; gap: 6px; margin-top: 12px; flex-wrap: wrap; }
.tm-dlg-btns.tm-col { flex-direction: column; align-items: stretch; }
.tm-btn {
  min-width: 75px; min-height: 24px; padding: 0 12px; border: 1px solid #003c74; border-radius: 3px;
  background: linear-gradient(#fff, #ecebe6 85%, #d6d0c5); cursor: pointer; color: #000;
}
.tm-btn:hover { box-shadow: inset 0 0 0 2px #f9b33f; }
.tm-btn[data-primary] { box-shadow: inset 0 0 0 1px #7da2ce, inset 0 0 0 2px #b9d1ea; }
.tm-btn:disabled { color: #999; border-color: #aaa; }
.tm-btn-big { min-height: 30px; font-weight: bold; }

.tm-wiz { display: flex; gap: 12px; }
.tm-wiz-side {
  flex: 0 0 150px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px;
  padding: 12px 8px; border-radius: 4px; color: #fff; text-align: center;
  background: linear-gradient(160deg, #2f6ae0, #133a9a 60%, #0b2265);
}
.tm-wiz-side b { font: bold 18px "Trebuchet MS", Tahoma, sans-serif; }
.tm-wiz-side small { opacity: .85; line-height: 1.3; }
.tm-wiz-reel {
  width: 84px; height: 84px; margin-bottom: auto; border-radius: 50%;
  background: radial-gradient(circle, #ddd 0 9%, #555 10% 13%, transparent 14%),
    conic-gradient(#222 0 10%, #bbb 10% 20%, #222 20% 30%, #bbb 30% 45%, #222 45% 55%, #bbb 55% 70%, #222 70% 80%, #bbb 80% 95%, #222 95%);
  border: 4px solid #999; box-shadow: 0 0 0 2px #222; animation: tm-spin 6s linear infinite;
}
@keyframes tm-spin { to { transform: rotate(360deg); } }
.tm-wiz-main { flex: 1; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.tm-wiz-hi { margin: 0 0 2px; font-size: 13px; font-weight: bold; color: #0b2b6b; }
.tm-big {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 8px 10px; text-align: left;
  border: 1px solid #7f9db9; border-radius: 4px; background: linear-gradient(#fff, #e6eefb); cursor: pointer;
}
.tm-big:hover { border-color: #316ac5; background: linear-gradient(#fff, #d3e2fa); }
.tm-big b { font-size: 13px; color: #0b2b6b; }
.tm-big small { color: #444; line-height: 1.3; }
.tm-wiz-row { display: flex; gap: 6px; flex-wrap: wrap; }
.tm-wiz-row .tm-btn { flex: 1; }
.tm-wiz-note { margin: 2px 0 0; color: #555; }

.tm-export p { margin: 0 0 8px; }
.tm-progress { height: 16px; padding: 1px; border: 1px solid #686868; border-radius: 3px; background: #fff; }
.tm-progress i { display: block; height: 100%; width: 0; background: repeating-linear-gradient(90deg, #2fbf2f 0 8px, transparent 8px 10px); }
.tm-msg { display: flex; gap: 12px; align-items: flex-start; }
.tm-msg b { font-size: 13px; line-height: 1.35; }
.tm-msg p { margin: 6px 0 0; line-height: 1.4; }
.tm-msg-ico { flex: 0 0 auto; font-size: 34px; line-height: 1; }
.tm-bonus { color: #1a7a2a; font-weight: bold; }
.tm-res { display: grid; grid-template-columns: auto auto; justify-content: start; gap: 3px 14px; margin: 10px 0 0; }
.tm-res dt { color: #555; }
.tm-res dd { margin: 0; font-weight: bold; }
.tm-res .tm-res-score { color: #0b2b6b; font-size: 14px; }
.tm-rank { color: #215dc6; }
.tm-pause p { margin: 0 0 4px; }

.tm-help { font-size: 12px; line-height: 1.45; }
.tm-help h4 { margin: 8px 0 4px; color: #215dc6; }
.tm-help p { margin: 0 0 6px; }
.tm-help-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.tm-keys { border-collapse: collapse; width: 100%; }
.tm-keys th { text-align: left; padding: 2px 6px 2px 0; white-space: nowrap; color: #0b2b6b; vertical-align: top; }
.tm-keys td { padding: 2px 0; color: #333; }
.tm-set label { display: block; margin-bottom: 10px; }
.tm-set input[type=range] { display: block; width: 100%; }
.tm-set .tm-chk { display: flex; gap: 6px; align-items: center; }
.tm-set-note { color: #666; margin: 0; }

.tm-tabs { display: flex; gap: 2px; border-bottom: 1px solid #919b9c; margin-bottom: 8px; }
.tm-tab { padding: 4px 12px; border: 1px solid #919b9c; border-bottom: 0; border-radius: 3px 3px 0 0; background: linear-gradient(#fff, #ecebe6); cursor: pointer; }
.tm-tab.is-on { background: #fcfcfe; border-top: 2px solid #e68b2c; font-weight: bold; position: relative; top: 1px; }
.tm-hall-list { max-height: 50vh; overflow: auto; }
.tm-table { width: 100%; border-collapse: collapse; background: #fff; }
.tm-table th { position: sticky; top: 0; background: linear-gradient(#fff, #ebeadb); border-bottom: 1px solid #c5c2b2; padding: 3px 6px; text-align: left; }
.tm-table td { padding: 3px 6px; border-bottom: 1px solid #f0efe8; font-variant-numeric: tabular-nums; }
.tm-table tr.is-me td { background: #fff3c4; font-weight: bold; }
.tm-empty { color: #666; text-align: center; padding: 20px 0; }

.tm-lobby p { margin: 0 0 10px; line-height: 1.4; }
.tm-lb-row { display: flex; gap: 6px; margin-bottom: 10px; }
.tm-lb-row .tm-btn-big { flex: 1; }
.tm-lb-in { flex: 1; min-width: 0; height: 28px; padding: 0 8px; border: 1px solid #7f9db9; font: bold 16px Tahoma, sans-serif; letter-spacing: 4px; text-align: center; user-select: text; -webkit-user-select: text; }
.tm-lb-code { display: flex; align-items: center; gap: 10px; padding: 8px 10px; margin-bottom: 10px; background: #fff; border: 1px solid #7f9db9; }
.tm-lb-code[hidden] { display: none; }
.tm-lb-num { flex: 1; font: bold 30px Tahoma, sans-serif; letter-spacing: 8px; color: #0b2b6b; }
.tm-lb-msg { color: #215dc6; min-height: 1.4em; }
.tm-lb-msg.is-err { color: #c0201a; }

/* Сенсорные кнопки */
.tm-pad[hidden] { display: none; }
.tm-pb {
  display: flex; align-items: center; justify-content: center; padding: 0;
  border: 2px solid rgba(255,255,255,.45); border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #5a6b96, #26324f 75%); color: #fff;
  font: bold 22px Tahoma, sans-serif; box-shadow: 0 3px 0 #0b1022, 0 4px 10px rgba(0,0,0,.4);
  touch-action: none; -webkit-user-select: none; user-select: none;
}
.tm-app .tm-pb { font: bold 22px Tahoma, sans-serif; }
.tm-pb.is-down { transform: translateY(2px); box-shadow: 0 1px 0 #0b1022; filter: brightness(1.35); }
.tm-pb-hd { background: radial-gradient(circle at 35% 30%, #e86a5a, #8a1f14 75%); }
.tm-app .tm-pb-cw, .tm-app .tm-pb-ccw { background: radial-gradient(circle at 35% 30%, #4fbf6a, #146a2a 75%); font-size: 26px; }
.tm-app .tm-pb-hold { border-radius: 12px; font-size: 12px; background: radial-gradient(circle at 35% 30%, #f0b34a, #8a5a10 75%); }
/* Крестовина: одна зона под большой палец, палец можно вести не отрывая (◀ ▼ ▶, вверх — ⤓) */
.tm-pad { --tm-dp: 168px; --tm-rb: 64px; }
.tm-app.is-phone-l .tm-pad { --tm-dp: 150px; --tm-rb: 58px; }
.tm-dpad {
  position: relative; width: var(--tm-dp); height: var(--tm-dp); flex: 0 0 auto; border-radius: 50%;
  background: radial-gradient(circle, #2b3963 0 28%, #222d4f 29% 100%); border: 2px solid rgba(255,255,255,.25);
  box-shadow: inset 0 2px 8px rgba(0,0,0,.5); touch-action: none; -webkit-user-select: none; user-select: none;
}
.tm-dpad i {
  position: absolute; width: 36%; height: 36%; display: flex; align-items: center; justify-content: center;
  border-radius: 12px; font: bold 22px Tahoma, sans-serif; font-style: normal; color: #fff; pointer-events: none;
  background: radial-gradient(circle at 35% 30%, #5a6b96, #26324f 75%); box-shadow: 0 3px 0 #0b1022;
}
.tm-dpad .tm-dp-u { left: 32%; top: 2%; background: radial-gradient(circle at 35% 30%, #e86a5a, #8a1f14 75%); }
.tm-dpad .tm-dp-d { left: 32%; bottom: 2%; }
.tm-dpad .tm-dp-l { left: 2%; top: 32%; }
.tm-dpad .tm-dp-r { right: 2%; top: 32%; }
.tm-dpad i.is-down { transform: translateY(2px); box-shadow: 0 1px 0 #0b1022; filter: brightness(1.4); }
/* Справа: повороты по диагонали (↻ выше, под большой палец), «запас» сразу над ними */
.tm-pad-r .tm-rbtns { display: grid; grid-template-columns: var(--tm-rb) var(--tm-rb); grid-template-rows: 34px calc(var(--tm-rb) * .45) calc(var(--tm-rb) * .55); gap: 6px 10px; }
.tm-pad-r .tm-pb-hold { grid-area: 1 / 1 / 2 / 3; }
.tm-pad-r .tm-pb-cw { grid-area: 2 / 2 / 4 / 3; width: var(--tm-rb); height: var(--tm-rb); }
.tm-pad-r .tm-pb-ccw { grid-area: 3 / 1 / 5 / 2; width: var(--tm-rb); height: var(--tm-rb); }

/* ---------- Узкое окно на ПК ---------- */
.tm-app.is-narrow .tm-tasks, .tm-app.is-narrow .tm-status { display: none; }
.tm-app.is-narrow .tm-main { flex-direction: column; }
.tm-app.is-narrow .tm-stage { flex: 1; border: 0; }
.tm-app.is-narrow .tm-side { flex: 0 0 auto; order: -1; flex-direction: row; }
.tm-app.is-narrow .tm-monitor { flex: 0 0 50%; }
.tm-app.is-narrow .tm-info { display: none; }

/* ---------- Телефон: общий immersive-режим ---------- */
body.tm-immersive #xp-taskbar,
body.tm-immersive #clippy,
body.tm-immersive .xp-window[data-app="tetris"] .xp-titlebar,
body.tm-immersive .tm-body > .xp-menubar { display: none !important; }
body.tm-immersive #xp-desktop { bottom: 0; }
body.tm-immersive .xp-window[data-app="tetris"] { border: 0; border-radius: 0; }

.tm-app.is-phone-p .tm-toolbar, .tm-app.is-phone-l .tm-toolbar,
.tm-app.is-phone-p .tm-tasks, .tm-app.is-phone-l .tm-tasks,
.tm-app.is-phone-p .tm-status, .tm-app.is-phone-l .tm-status,
.tm-app.is-phone-p .tm-coll, .tm-app.is-phone-l .tm-coll,
.tm-app.is-phone-p .tm-tl-head, .tm-app.is-phone-l .tm-tl-head,
.tm-app.is-phone-p .tm-stage > .tm-panel-h, .tm-app.is-phone-l .tm-stage > .tm-panel-h { display: none; }
.tm-app.is-phone-p .tm-hud, .tm-app.is-phone-l .tm-hud, .tm-app.is-narrow .tm-hud {
  display: flex; align-items: center; justify-content: space-between; gap: 4px; padding: 3px 6px;
  background: linear-gradient(#2f5fc0, #1d3f8a); color: #fff;
}
.tm-hud span { display: flex; flex-direction: column; align-items: center; line-height: 1.1; }
.tm-hud small { font-size: 9px; opacity: .8; }
.tm-hud b { font-size: 13px; font-variant-numeric: tabular-nums; }
.tm-app .tm-h-menu { width: 34px; height: 28px; border: 1px solid rgba(255,255,255,.5); border-radius: 4px; background: rgba(255,255,255,.15); color: #fff; font-size: 17px; line-height: 1; }
.tm-app.is-phone-p .tm-board-wrap, .tm-app.is-phone-l .tm-board-wrap { padding: 2px; }
.tm-app.is-phone-p .tm-monitor, .tm-app.is-phone-l .tm-monitor { padding: 4px; border: 0; }
.tm-app.is-phone-p .tm-mon-ctrl, .tm-app.is-phone-l .tm-mon-ctrl { gap: 4px; }
.tm-app.is-phone-p .tm-time, .tm-app.is-phone-l .tm-time { font-size: 10px; }
.tm-app.is-phone-p .tm-opp-body, .tm-app.is-phone-l .tm-opp-body { padding: 4px; gap: 6px; }
.tm-app.is-phone-p .tm-o-stats, .tm-app.is-phone-l .tm-o-stats { font-size: 10px; gap: 1px 6px; }
/* Компактная шкала */
.tm-app.is-phone-p .tm-tl, .tm-app.is-phone-l .tm-tl { border-top: 1px solid #b9b6a8; }
.tm-app.is-phone-p .tm-tl-names, .tm-app.is-phone-l .tm-tl-names { flex-basis: 60px; font-size: 10px; }
.tm-app.is-phone-p .tm-tn, .tm-app.is-phone-l .tm-tn { height: 15px; padding: 0 4px; gap: 3px; }
.tm-app.is-phone-p .tm-tn i, .tm-app.is-phone-l .tm-tn i { width: 7px; height: 7px; }
.tm-app.is-phone-p .tm-lane, .tm-app.is-phone-l .tm-lane { height: 15px; }
.tm-app.is-phone-p .tm-fill, .tm-app.is-phone-l .tm-fill { top: 2px; bottom: 2px; }
.tm-app.is-phone-p .tm-clip, .tm-app.is-phone-l .tm-clip { font-size: 0; }
.tm-app.is-phone-p .tm-pct, .tm-app.is-phone-l .tm-pct { font-size: 9px; }
.tm-app.is-phone-p .tm-ruler, .tm-app.is-phone-l .tm-ruler,
.tm-app.is-phone-p .tm-tl-sp, .tm-app.is-phone-l .tm-tl-sp { height: 12px; }
.tm-app.is-phone-p .tm-ruler span, .tm-app.is-phone-l .tm-ruler span { font-size: 8px; top: 0; }

/* Портрет: монитор и шкала сверху, поле, кнопки снизу */
.tm-app.is-phone-p .tm-main { flex-direction: column; }
.tm-app.is-phone-p .tm-side { order: -2; flex: 0 0 auto; flex-direction: row; flex-wrap: wrap; }
.tm-app.is-phone-p .tm-monitor { flex: 1 1 100%; }
.tm-app.is-phone-p .tm-screen { max-height: 22vh; width: auto; }
.tm-app.is-phone-p.is-online .tm-monitor { flex: 0 0 56%; }
.tm-app.is-phone-p .tm-info { flex: 1; min-width: 0; }
.tm-app.is-phone-p:not(.is-online) .tm-info { display: none; }
.tm-app.is-phone-p .tm-hud { order: 3; flex: 0 0 100%; }
.tm-app.is-phone-p .tm-main > .tm-tl { order: -1; }
.tm-app.is-phone-p .tm-stage { flex: 1; border: 0; }
.tm-app.is-phone-p .tm-pad {
  flex: 0 0 auto; display: flex; justify-content: space-between; align-items: flex-end;
  padding: 8px 14px calc(40px + env(safe-area-inset-bottom)); background: #1a2340; gap: 8px; /* чуть выше нижнего края, чтобы не цеплять жесты системы */
}

/* Альбом: кнопки по краям, поле, справа монитор и шкала */
.tm-app.is-phone-l { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-rows: minmax(0, 1fr); }
.tm-app.is-phone-l .tm-pad { display: contents; }
.tm-app.is-phone-l .tm-pad-l, .tm-app.is-phone-l .tm-pad-r {
  display: flex; align-items: flex-end; justify-content: center; background: #1a2340;
  padding: 8px 6px calc(10px + env(safe-area-inset-bottom));
}
.tm-app.is-phone-l .tm-pad-l { grid-column: 1; grid-row: 1; padding-left: calc(6px + env(safe-area-inset-left)); }
.tm-app.is-phone-l .tm-pad-r { grid-column: 3; grid-row: 1; padding-right: calc(6px + env(safe-area-inset-right)); }
.tm-app.is-phone-l .tm-main { grid-column: 2; grid-row: 1; }
.tm-app.is-phone-l .tm-stage { flex: 0 0 auto; width: var(--tm-bw, 60%); border: 0; }
.tm-app.is-phone-l .tm-side { flex: 1; overflow: hidden; }
.tm-app.is-phone-l .tm-screen { max-height: 30vh; width: auto; }
.tm-app.is-phone-l .tm-info { flex: 1 1 auto; }
.tm-app.is-phone-l:not(.is-online) .tm-info { display: none; }


@media (max-width: 380px) {
  .tm-app.is-phone-p .tm-pad { --tm-dp: 150px; --tm-rb: 58px; }
  .tm-wiz-side { display: none; }
}
@media (max-height: 500px) {
  .tm-wiz-side { display: none; }
  .tm-dlg-b { padding: 8px; }
}
.tm-npct { margin-left: auto; font-style: normal; font-size: 10px; color: #555; font-variant-numeric: tabular-nums; }
.tm-tn.is-full .tm-npct { color: #1a8a2a; }
.tm-tn.is-full .tm-npct::after { content: " \2713"; }
.tm-tl-names { flex-basis: 120px; }
.tm-app.is-desk .tm-pct, .tm-app.is-narrow .tm-pct { display: none; }
.tm-app.is-phone-p .tm-npct, .tm-app.is-phone-l .tm-npct { display: none; }
.tm-app.is-phone-l .tm-ruler span { font-size: 0; }
.tm-app.is-desk.is-online .tm-screen { max-height: 30vh; }
.tm-o-stats dd { white-space: nowrap; }

/* =====================================================================
   Аркада — общие диалоги игр: режимы, онлайн-лобби, рекорды, итоги
   ===================================================================== */
.ga-host { position: relative; }
.ga-overlay {
  position: absolute; inset: 0; z-index: 60;
  display: flex; align-items: center; justify-content: center; padding: 10px;
  background: rgba(10, 20, 60, .45);
}
.ga-overlay[hidden] { display: none; }
.ga-dlg {
  width: min(440px, 100%); max-height: 100%; display: flex; flex-direction: column;
  background: #ece9d8; color: #000; font: 12px Tahoma, Verdana, sans-serif;
  border: 1px solid #0831d9; border-radius: 8px 8px 3px 3px; overflow: hidden;
  box-shadow: 0 10px 34px rgba(0,0,0,.55);
  animation: ga-pop .16s ease-out;
}
.ga-dlg-wide { width: min(600px, 100%); }
@keyframes ga-pop { from { transform: scale(.94); opacity: 0; } }
.ga-dlg-h {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; flex: 0 0 auto;
  padding: 5px 6px 5px 10px; color: #fff; font-weight: bold; font-size: 13px;
  background: linear-gradient(#0a5fe8, #0646c8 45%, #0a50d8); text-shadow: 1px 1px #0a1f6e;
}
.ga-x {
  width: 22px; height: 22px; border-radius: 3px; border: 1px solid #fff; color: #fff; font-size: 12px; line-height: 1;
  background: linear-gradient(#e8805e, #c7381a); cursor: pointer; padding: 0;
}
.ga-dlg-b { padding: 12px; overflow: auto; }
.ga-btn {
  min-width: 76px; padding: 5px 12px; font: 12px Tahoma, sans-serif; color: #000; cursor: pointer;
  background: linear-gradient(#fff, #ecebe6 80%, #d6d0c5); border: 1px solid #003c74; border-radius: 3px;
}
.ga-btn:hover { box-shadow: inset 0 0 0 2px #fbc560; }
.ga-btn:disabled { color: #999; border-color: #aaa; box-shadow: none; cursor: default; }
.ga-btn-big { padding: 8px 18px; font-weight: bold; }
.ga-btns { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; margin-top: 12px; }
.ga-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: center; margin-top: 8px; }
.ga-col { display: flex; flex-direction: column; gap: 6px; }
.ga-big {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; margin: 0 0 6px;
  padding: 9px 12px; text-align: left; cursor: pointer; color: #0b2a7a; font: 12px Tahoma, sans-serif;
  background: linear-gradient(#fff, #e6eefc); border: 1px solid #7a9ad8; border-radius: 6px;
}
.ga-big b { font-size: 14px; }
.ga-big small { color: #444; font-size: 11px; }
.ga-big:hover, .ga-big:focus { border-color: #f0a000; box-shadow: 0 0 0 2px rgba(255,190,60,.5); outline: none; }
.ga-wiz { display: flex; gap: 12px; }
.ga-wiz-side {
  flex: 0 0 120px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center;
  padding: 12px 8px; border-radius: 6px; color: #fff; background: linear-gradient(160deg, #3b7be8, #133c9c);
}
.ga-wiz-side svg { width: 56px; height: 56px; filter: drop-shadow(0 2px 4px rgba(0,0,0,.4)); }
.ga-wiz-side b { font-size: 16px; }
.ga-wiz-side small { opacity: .85; }
.ga-wiz-main { flex: 1; min-width: 0; }
.ga-hi { margin: 0 0 10px; font-size: 13px; }
.ga-tabs { display: flex; gap: 2px; border-bottom: 1px solid #919b9c; margin-bottom: 8px; }
.ga-tab { padding: 5px 12px; border: 1px solid #919b9c; border-bottom: 0; border-radius: 4px 4px 0 0; background: #f4f3ee; cursor: pointer; font: 12px Tahoma, sans-serif; }
.ga-tab.is-on { background: #fff; border-top: 2px solid #f0a000; font-weight: bold; margin-bottom: -1px; }
.ga-hall { max-height: 52vh; overflow: auto; background: #fff; border: 1px solid #7f9db9; }
.ga-table { width: 100%; border-collapse: collapse; }
.ga-table th { position: sticky; top: 0; background: linear-gradient(#fff, #e3e1d6); text-align: left; padding: 4px 6px; border-bottom: 1px solid #c5c2b2; font-weight: normal; }
.ga-table td { padding: 3px 6px; border-bottom: 1px solid #eee; white-space: nowrap; }
.ga-table tr.is-me td { background: #fff4c2; font-weight: bold; }
.ga-empty { padding: 20px; text-align: center; color: #666; }
.ga-rules { max-height: 60vh; overflow: auto; line-height: 1.45; }
.ga-rules h4 { margin: 10px 0 4px; color: #0b2a7a; }
.ga-rules h4:first-child { margin-top: 0; }
.ga-rules p, .ga-rules ul { margin: 0 0 6px; }
.ga-rules ul { padding-left: 18px; }
.ga-lobby p { margin: 0 0 8px; }
.ga-lobby fieldset { margin: 0 0 8px; padding: 8px; border: 1px solid #b8b5a3; border-radius: 4px; }
.ga-lobby legend { color: #0046d5; padding: 0 4px; }
.ga-opt { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 6px; }
.ga-opt > span { flex: 0 0 90px; color: #333; }
.ga-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.ga-chip { padding: 4px 9px; border: 1px solid #7a9ad8; border-radius: 12px; background: #fff; cursor: pointer; font: 12px Tahoma, sans-serif; }
.ga-chip.is-on { background: #316ac5; color: #fff; border-color: #1a4aa0; }
.ga-chip:disabled { opacity: .6; cursor: default; }
.ga-in { width: 90px; padding: 5px 6px; font: bold 18px Consolas, monospace; letter-spacing: 4px; text-align: center; border: 1px solid #7f9db9; }
.ga-code { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 8px; }
.ga-code[hidden] { display: none; }
.ga-num { font: bold 30px Consolas, monospace; letter-spacing: 6px; color: #0b2a7a; }
.ga-msg { min-height: 16px; color: #0b5a2a; }
.ga-msg.is-err { color: #c00; }
.ga-msg-box { display: flex; gap: 12px; align-items: flex-start; }
.ga-ico { font-size: 40px; line-height: 1; }
.ga-res { display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; margin: 8px 0; }
.ga-res dt { color: #555; }
.ga-res dd { margin: 0; font-weight: bold; }
.ga-big-n { font-size: 18px; color: #0b2a7a; }
.ga-rank { margin: 0; color: #555; font-style: italic; }
.ga-toast {
  position: absolute; left: 50%; top: 12px; z-index: 70; transform: translateX(-50%);
  max-width: min(92%, 460px); padding: 8px 14px; border-radius: 6px; pointer-events: none; text-align: center;
  background: #ffffe1; color: #000; border: 1px solid #000; box-shadow: 2px 3px 8px rgba(0,0,0,.4); font: 12px Tahoma, sans-serif;
}
.ga-toast[hidden] { display: none; }
.ga-toast.is-in { animation: ga-pop .18s ease-out; }
@media (max-width: 480px) {
  .ga-wiz { flex-direction: column; }
  .ga-wiz-side { flex-basis: auto; flex-direction: row; padding: 8px; }
  .ga-wiz-side svg { width: 32px; height: 32px; }
  .ga-wiz-side small { display: none; }
}

/* Сапёр на двоих */
.ms-mp { display: flex; align-items: stretch; gap: 6px; width: min(100%, 560px); font: 12px Tahoma, sans-serif; }
.ms-mp[hidden] { display: none; }
.ms-pl {
  flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 4px 6px;
  background: #c0c0c0; border: 2px solid; border-color: #fff #808080 #808080 #fff; border-top: 4px solid var(--pc);
}
.ms-pl.is-turn { background: #fffbe0; box-shadow: 0 0 0 2px var(--pc), 0 0 12px var(--pc); }
.ms-pl.is-dead { opacity: .55; }
.ms-pl-n { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--pc); }
.ms-pl-l { color: #d00; letter-spacing: 1px; }
.ms-pl-s { font: bold 18px "Courier New", monospace; }
.ms-turn { flex: 1.1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center; color: #fff; text-shadow: 1px 1px 2px #000; }
.ms-turn-t { font-weight: bold; }
.ms-turn-bar { display: block; width: 100%; height: 6px; background: rgba(0,0,0,.35); border-radius: 3px; overflow: hidden; }
.ms-turn-bar i { display: block; height: 100%; width: 100%; transition: width .2s linear; }
.ms-turn.is-late .ms-turn-t { color: #ffb0a0; animation: ga-blink .5s steps(2) infinite; }
@keyframes ga-blink { 50% { opacity: .3; } }
.ms-field { opacity: .85; }
.ms-lives { margin: -2px 0 6px; text-align: center; color: #d00; font: 14px Tahoma, sans-serif; letter-spacing: 2px; }
.ms-lives[hidden] { display: none; }
.ms-cell.is-open.is-by0 { background: #c6cfe6; }
.ms-cell.is-open.is-by1 { background: #e6cbc6; }
.ms-cell.is-open.is-boom { background: #ff0000; }
.ms-cell.is-fby0::before { filter: hue-rotate(220deg) saturate(1.4); }
.ms-gain {
  position: absolute; z-index: 40; transform: translate(-50%, 0); pointer-events: none;
  font: bold 14px Tahoma, sans-serif; text-shadow: 0 0 3px #000, 1px 1px 0 #000; animation: ms-gain .9s ease-out forwards;
}
@keyframes ms-gain { to { transform: translate(-50%, -34px); opacity: 0; } }
@media (max-width: 480px) { .ms-pl-s { font-size: 15px; } .ms-mp { font-size: 11px; } }

/* Тетрамонтаж: кнопка закрытия и музыка */
.tm-app .tm-h-close { background: linear-gradient(#e8805e, #c7381a); }
.tm-tb.is-off svg { opacity: .45; }
.ms-lost { font-style: normal; color: #777; opacity: .5; }

/* Пинбол на телефоне: весь экран, без панели задач и Скрепки */
.pb-sys { display: none; gap: 6px; }
.pb-sys button { width: 38px; height: 34px; border-radius: 6px; border: 1px solid #888; background: #222; color: #fff; font-size: 18px; line-height: 1; }
.pb-sys .pb-close { background: linear-gradient(#e8805e, #c7381a); border-color: #fff; }
body.pb-immersive #xp-taskbar,
body.pb-immersive #clippy,
body.pb-immersive .xp-window[data-app="pinball"] .xp-titlebar,
body.pb-immersive .pb-app > .xp-menubar { display: none !important; }
body.pb-immersive #xp-desktop { bottom: 0; }
body.pb-immersive .xp-window[data-app="pinball"] { border: 0; border-radius: 0; }
body.pb-immersive .pb-sys { display: flex; }
.pb-stage { touch-action: none; overscroll-behavior: none; overflow: hidden; user-select: none; -webkit-user-select: none; }

/* =====================================================================
   Эпоха Windows 7 (2010–2016): диспетчер загрузки, загрузка, вход, Aero
   ===================================================================== */

/* Диспетчер загрузки Windows — выбор периода */
#xp-bootmgr { background: #000; color: #c0c0c0; flex-direction: column; font: 16px/1.4 'Lucida Console', Consolas, 'Courier New', monospace; z-index: 60; }
.bm-head { background: #c0c0c0; color: #000; text-align: center; padding: 4px; }
.bm-body { flex: 1; padding: 6vh 6vw 0; overflow: auto; }
.bm-body p { margin: 0 0 12px; }
.bm-sub { color: #808080; }
.bm-list { margin: 22px 0 22px 3vw; display: flex; flex-direction: column; gap: 6px; max-width: 760px; }
.bm-item { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 6px 12px; border: 0; background: none; color: #c0c0c0; font: inherit; text-align: left; cursor: pointer; }
.bm-item span { font-size: 13px; opacity: .75; }
.bm-item.is-sel { background: #c0c0c0; color: #000; }
.bm-item.is-sel span { opacity: .85; }
.bm-timer b { color: #fff; }
.bm-tools { color: #808080; }
.bm-foot { display: flex; gap: 28px; justify-content: flex-start; padding: 6px 10px calc(6px + env(safe-area-inset-bottom)); background: #c0c0c0; color: #000; }
@media (max-width: 560px) { #xp-bootmgr { font-size: 14px; } .bm-foot span:not(:first-child) { display: none; } .bm-list { margin-left: 0; } }

/* Загрузка: «Запуск Windows» и четыре огонька, собирающиеся в эмблему */
#w7-boot { background: #000; color: #fff; flex-direction: column; align-items: center; justify-content: center; gap: 34px; font-family: 'Segoe UI', Tahoma, sans-serif; }
.w7b-logo { position: relative; width: 120px; height: 120px; }
.w7b-logo i { position: absolute; width: 30px; height: 30px; border-radius: 40% 60% 45% 55%; filter: blur(.5px); opacity: 0; animation: w7b-fly 3.4s ease-in-out forwards; }
.w7b-logo i:nth-child(1) { background: radial-gradient(circle at 35% 35%, #ffb08a, #f0431f 70%); left: 28px; top: 26px; --fx: -140px; --fy: -90px; box-shadow: 0 0 22px #f0431f; }
.w7b-logo i:nth-child(2) { background: radial-gradient(circle at 35% 35%, #d8ff8a, #4cae1c 70%); left: 62px; top: 28px; --fx: 150px; --fy: -110px; box-shadow: 0 0 22px #4cae1c; animation-delay: .15s; }
.w7b-logo i:nth-child(3) { background: radial-gradient(circle at 35% 35%, #9fe2ff, #1d82e0 70%); left: 26px; top: 60px; --fx: -160px; --fy: 120px; box-shadow: 0 0 22px #1d82e0; animation-delay: .3s; }
.w7b-logo i:nth-child(4) { background: radial-gradient(circle at 35% 35%, #fff09a, #f5b000 70%); left: 60px; top: 62px; --fx: 140px; --fy: 130px; box-shadow: 0 0 22px #f5b000; animation-delay: .45s; }
@keyframes w7b-fly {
  0% { opacity: 0; transform: translate(var(--fx), var(--fy)) scale(.3); }
  30% { opacity: 1; }
  70% { transform: translate(0, 0) scale(1); border-radius: 40% 60% 45% 55%; }
  100% { opacity: 1; transform: none; border-radius: 4px 14px 4px 14px; }
}
.w7b-text { font-size: 22px; color: #e8e8e8; animation: w7b-text 3.4s ease forwards; opacity: 0; }
@keyframes w7b-text { 60% { opacity: 0; } 100% { opacity: 1; } }
.w7b-copy { position: absolute; bottom: 22px; font-size: 12px; color: #888; }

/* Обои «семёрки»: синее небо с лучами и стеклянным логотипом */
body.era7 {
  --xp-taskbar-h: 40px;
  --w7-glass: rgba(26, 52, 92, .68);
  --w7-wall:
    radial-gradient(ellipse 60% 45% at 62% 46%, rgba(255,255,255,.55), rgba(255,255,255,0) 60%),
    conic-gradient(from 200deg at 62% 46%, rgba(120,220,255,.0), rgba(120,220,255,.35) 8%, rgba(120,220,255,0) 16%, rgba(255,255,255,.18) 24%, rgba(255,255,255,0) 32%, rgba(80,200,255,.3) 45%, rgba(80,200,255,0) 55%, rgba(255,255,255,.15) 70%, rgba(255,255,255,0) 80%),
    radial-gradient(ellipse 120% 90% at 62% 46%, #2aa8f0 0%, #136bd0 38%, #0a3a8c 70%, #061e52 100%);
}
body.era7 #xp-desktop { background: var(--w7-wall); }
body.era7 #xp-desktop::before {
  content: ''; position: absolute; left: 62%; top: 46%; width: min(30vw, 30vh, 260px); aspect-ratio: 1; transform: translate(-50%, -50%);
  background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cg fill='%23fff' fill-opacity='.22'%3E%3Cpath d='M6 10c5-3 10-3 16 0l-2 12c-5-3-10-3-15 0z'/%3E%3Cpath d='M24 11c6 3 11 3 17 0l-2 12c-6 3-11 3-16 0z'/%3E%3Cpath d='M4.5 24c5-3 10-3 15 0l-2 12c-5-3-10-3-15 0z'/%3E%3Cpath d='M22 25c6 3 11 3 16.5 0l-2 12c-6 3-11 3-16.5 0z'/%3E%3C/g%3E%3C/svg%3E");
  filter: drop-shadow(0 0 30px rgba(255,255,255,.5)); pointer-events: none;
}
body.era7 .xp-icon-label { font-family: 'Segoe UI', Tahoma, sans-serif; font-size: 12px; text-shadow: 0 1px 2px #000, 0 0 3px #000; }
body.era7 .xp-icon-img { width: 46px; height: 46px; }
body.era7 .xp-icon { border-radius: 3px; border: 1px solid transparent; }
body.era7 .xp-icon:hover { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.35); }
body.era7 .xp-icon.is-selected { background: rgba(140,200,255,.3); border-color: rgba(200,230,255,.7); }
body.era7 .xp-icon.is-selected .xp-icon-img { filter: drop-shadow(1px 2px 1px rgba(0,0,0,.35)); }
body.era7 .xp-icon.is-selected .xp-icon-label { background: none; text-shadow: 0 1px 2px #000; }

/* Вход в Windows 7 */
body.era7 #xp-login { background: var(--w7-wall); font-family: 'Segoe UI', Tahoma, sans-serif; }
body.era7 .lg-top, body.era7 .lg-bottom { background: none; border: 0; }
body.era7 .lg-mid { background: none; flex-direction: column; justify-content: center; gap: 14px; }
body.era7 .lg-left { flex: 0 0 auto; align-items: center; padding: 0; text-align: center; order: 2; }
body.era7 .lg-flag { display: none; }
body.era7 .lg-title { font: 300 30px 'Segoe UI', Tahoma, sans-serif; text-shadow: 0 1px 6px rgba(0,0,0,.4); order: 3; margin-top: 18px; }
.lg-7 { font-weight: 600; margin-left: 6px; color: #fff; }
body.era7 .lg-hint { font-size: 14px; margin-top: 6px; opacity: .9; }
body.era7 .lg-sep { display: none; }
body.era7 .lg-right { flex: 0 0 auto; padding: 0; display: flex; justify-content: center; order: 1; }
body.era7 .lg-account { align-items: center; border-radius: 10px; }
body.era7 .lg-user { flex-direction: column; gap: 10px; padding: 10px; border-radius: 8px; background: none; text-align: center; }
body.era7 .lg-user:hover, body.era7 .lg-user:focus-visible { background: rgba(255,255,255,.12); box-shadow: inset 0 0 0 1px rgba(255,255,255,.35); }
body.era7 .lg-avatar { width: 128px; height: 128px; border-radius: 8px; border: 0; padding: 8px; background: linear-gradient(rgba(255,255,255,.55), rgba(255,255,255,.15)); box-shadow: 0 2px 12px rgba(0,0,0,.45), inset 0 0 0 1px rgba(255,255,255,.7); }
body.era7 .lg-user-text { align-items: center; }
body.era7 .lg-name { font-size: 26px; text-shadow: 0 1px 6px rgba(0,0,0,.4); }
body.era7 #xp-login.is-asking .lg-account { background: none; }
body.era7 .lg-form { padding: 0; align-items: center; }
body.era7 .lg-input { border-radius: 3px; border: 1px solid #7aa7d6; box-shadow: inset 0 1px 3px rgba(0,0,0,.25); }
body.era7 .lg-go { border-radius: 50%; background: radial-gradient(circle at 40% 30%, #8fd0ff, #1f6fd0 70%); border: 1px solid #0c3f8c; }
body.era7 .lg-welcome { font: 300 34px 'Segoe UI', Tahoma, sans-serif; text-transform: none; }
body.era7 .lg-bottom { justify-content: flex-end; }
body.era7 .lg-off { width: 40px; height: 40px; border-radius: 4px; justify-content: center; background: linear-gradient(#e8805e, #b8301a); border: 1px solid #7a1a0a; box-shadow: inset 0 1px 0 rgba(255,255,255,.5); }
body.era7 .lg-off span { width: 24px; height: 24px; }
body.era7 .lg-note { order: -1; margin-right: auto; font: 600 14px 'Segoe UI', Tahoma, sans-serif; opacity: .8; }

/* Панель задач Aero: тёмное стекло, сфера «Пуск», значки без подписей */
body.era7 #xp-taskbar {
  background: linear-gradient(rgba(255,255,255,.18), rgba(255,255,255,.05) 50%, rgba(0,0,0,.08) 51%), rgba(20, 40, 70, .78);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255,255,255,.35); box-shadow: 0 -1px 0 rgba(0,0,0,.4);
}
body.era7 #xp-start { width: 54px; padding: 0; margin: 0 4px 0 2px; background: none; box-shadow: none; border-radius: 0; justify-content: center; }
body.era7 .xp-start-flag, body.era7 .xp-start-text { display: none; }
.w7-orb { display: none; }
body.era7 .w7-orb {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; padding: 8px;
  background: radial-gradient(circle at 50% 30%, rgba(255,255,255,.75), rgba(255,255,255,0) 45%), radial-gradient(circle at 50% 80%, #4cc4ff, #0f4ea8 60%, #0a2a66);
  box-shadow: 0 0 0 1px rgba(0,0,0,.55), 0 0 0 2px rgba(255,255,255,.25), 0 0 10px rgba(80,180,255,.5);
  transition: box-shadow .2s, filter .2s;
}
body.era7 #xp-start:hover .w7-orb, body.era7 #xp-start.is-open .w7-orb { box-shadow: 0 0 0 1px rgba(0,0,0,.55), 0 0 0 2px rgba(255,255,255,.4), 0 0 18px rgba(120,210,255,.95); filter: brightness(1.15); }
body.era7 .xp-task {
  flex: 0 0 56px; height: 36px; justify-content: center; padding: 0; border-radius: 4px;
  background: linear-gradient(rgba(255,255,255,.22), rgba(255,255,255,.05)); border: 1px solid rgba(255,255,255,.25);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.3);
}
body.era7 .xp-task:hover { background: linear-gradient(rgba(255,255,255,.35), rgba(255,255,255,.1)); }
body.era7 .xp-task.is-active { background: linear-gradient(rgba(140,200,255,.45), rgba(80,150,230,.2)); box-shadow: inset 0 0 8px rgba(160,220,255,.6); }
body.era7 .xp-task-icon { width: 28px; height: 28px; }
body.era7 .xp-task-label { display: none; }
body.era7 #xp-tray { background: none; border-left: 1px solid rgba(255,255,255,.15); box-shadow: none; padding-right: 0; }
body.era7 #xp-clock { display: flex; flex-direction: column; align-items: center; line-height: 1.15; font-family: 'Segoe UI', Tahoma, sans-serif; padding: 0 8px; }
body.era7 #xp-clock b { font-weight: normal; }
#xp-clock small { display: none; }
body.era7 #xp-clock small { display: block; font-size: 11px; }
#w7-showdesk { display: none; }
body.era7 #w7-showdesk { display: block; width: 14px; align-self: stretch; margin-left: 4px; border: 0; border-left: 1px solid rgba(255,255,255,.3); background: linear-gradient(90deg, rgba(255,255,255,.15), rgba(255,255,255,.05)); cursor: pointer; }
body.era7 #w7-showdesk:hover { background: rgba(255,255,255,.35); }

/* Окна Aero: стеклянная рамка, кнопки справа сверху */
body.era7 .xp-window { border: 7px solid rgba(110, 160, 210, .75); border-top: 0; border-radius: 7px 7px 0 0; background: #f0f0f0; box-shadow: inset 0 0 0 1px rgba(255,255,255,.5); }
body.era7 .xp-window--frameless { border: 0; }
body.era7 .xp-titlebar {
  height: 32px; margin: 0 -7px; padding: 0 0 0 10px; border-radius: 7px 7px 0 0;
  background: linear-gradient(rgba(255,255,255,.55), rgba(255,255,255,.18) 50%, rgba(255,255,255,.05)), linear-gradient(90deg, #6fa8dc, #89c0ec 40%, #5f97cf);
  color: #000; text-shadow: 0 0 8px #fff, 0 0 4px #fff; font: 13px 'Segoe UI', Tahoma, sans-serif;
}
body.era7 .xp-tbtns { gap: 0; align-self: flex-start; margin-right: 6px; }
body.era7 .xp-tbtn { width: 28px; height: 20px; border: 1px solid rgba(0,0,0,.45); border-top: 0; border-radius: 0; background: linear-gradient(rgba(255,255,255,.65), rgba(190,215,240,.55) 50%, rgba(140,180,220,.6)); }
body.era7 .xp-tbtn--min { border-radius: 0 0 0 5px; }
body.era7 .xp-tbtn--close { width: 46px; border-radius: 0 0 5px 0; background: linear-gradient(#e8a08a, #d0472a 50%, #c03018); }
body.era7 .xp-tbtn--min::before { left: 9px; bottom: 6px; width: 9px; height: 3px; background: #fff; box-shadow: 0 0 0 1px #333; }
body.era7 .xp-tbtn--max::before { left: 8px; top: 4px; width: 10px; height: 8px; border: 1px solid #333; border-top-width: 3px; background: rgba(255,255,255,.6); }
body.era7 .xp-tbtn--close::before, body.era7 .xp-tbtn--close::after { left: 22px; top: 3px; height: 13px; box-shadow: 0 0 0 .5px #4a0a00; }
body.era7 .xp-menubar { background: linear-gradient(#fbfcfe, #e3ebf6); border-bottom-color: #b6c6dc; }

/* Меню «Пуск» Windows 7 */
body.era7 #xp-startmenu { width: 410px; border-radius: 8px 8px 0 0; background: rgba(30, 60, 100, .82); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid rgba(255,255,255,.45); box-shadow: 0 0 0 1px rgba(0,0,0,.6), 4px -2px 16px rgba(0,0,0,.5); margin-left: 2px; }
.s7 { display: flex; gap: 8px; padding: 10px 8px 8px 8px; min-height: 0; flex: 1; }
.s7-left { flex: 1.25; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.s7-list { flex: 1; background: #fff; border-radius: 4px; border: 1px solid rgba(0,0,0,.4); padding: 6px 4px; overflow-y: auto; }
.s7-item { display: flex; align-items: center; gap: 8px; width: 100%; padding: 5px 6px; border: 1px solid transparent; border-radius: 3px; background: none; text-align: left; cursor: pointer; font-family: 'Segoe UI', Tahoma, sans-serif; }
.s7-item:hover { background: linear-gradient(#f0f7fe, #d6eafd); border-color: #8cc0ef; }
.s7-icon { width: 32px; height: 32px; flex: 0 0 auto; }
.s7-text { display: flex; flex-direction: column; min-width: 0; }
.s7-text b { font-weight: normal; font-size: 13px; color: #000; }
.s7-text small { color: #6d6d6d; font-size: 11px; }
.s7-sep { height: 1px; margin: 5px 6px; background: #e3e3e3; }
.s7-all { display: flex; align-items: center; justify-content: space-between; padding: 6px 10px; border: 1px solid rgba(255,255,255,.25); border-radius: 3px; background: rgba(255,255,255,.88); color: #000; cursor: pointer; font: 13px 'Segoe UI', Tahoma, sans-serif; }
.s7-all:hover, .s7-all.is-open { background: #fff; box-shadow: inset 0 0 0 1px #8cc0ef; }
.s7-all i { font-style: normal; font-size: 9px; color: #2a6ab8; }
.s7-search { display: flex; align-items: center; background: #fff; border-radius: 3px; border: 1px solid rgba(0,0,0,.5); padding: 0 6px; }
.s7-search input { flex: 1; min-width: 0; border: 0; outline: 0; padding: 6px 2px; font: italic 12px 'Segoe UI', Tahoma, sans-serif; color: #333; background: none; }
.s7-search span { color: #4a6a9a; font-size: 18px; }
.s7-right { flex: 1; display: flex; flex-direction: column; gap: 1px; color: #fff; position: relative; padding-top: 52px; }
.s7-pic { position: absolute; top: -34px; left: 50%; transform: translateX(-50%); width: 64px; height: 64px; padding: 5px; border-radius: 6px; background: linear-gradient(rgba(255,255,255,.7), rgba(255,255,255,.2)); box-shadow: 0 2px 8px rgba(0,0,0,.5); }
.s7-pic img, .s7-pic svg { width: 100%; height: 100%; object-fit: cover; border-radius: 3px; display: block; background: #fff; }
.s7-ritem { padding: 6px 10px; border: 1px solid transparent; border-radius: 3px; background: none; color: #fff; text-align: left; cursor: pointer; font: 13px 'Segoe UI', Tahoma, sans-serif; text-shadow: 0 1px 3px rgba(0,0,0,.6); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.s7-ritem.is-bold { font-weight: 600; }
.s7-ritem:hover { background: linear-gradient(rgba(255,255,255,.3), rgba(255,255,255,.1)); border-color: rgba(255,255,255,.45); }
.s7-rsep { height: 1px; margin: 4px 8px; background: rgba(255,255,255,.25); }
.s7-power { margin-top: auto; display: flex; padding: 8px 4px 0; }
.s7-power button { border: 1px solid rgba(0,0,0,.55); background: linear-gradient(rgba(255,255,255,.35), rgba(255,255,255,.1) 50%, rgba(0,0,0,.1)); color: #fff; font: 12px 'Segoe UI', Tahoma, sans-serif; padding: 5px 10px; cursor: pointer; text-shadow: 0 1px 2px #000; }
.s7-off { flex: 1; border-radius: 3px 0 0 3px; }
.s7-more { border-left: 0 !important; border-radius: 0 3px 3px 0; font-size: 9px !important; }
.s7-power button:hover { background: linear-gradient(rgba(255,255,255,.55), rgba(255,255,255,.2) 50%, rgba(0,0,0,.05)); }
.xp-menu--w7 { border-color: #979797; box-shadow: 2px 2px 6px rgba(0,0,0,.35); background: #f0f0f0; }
.xp-menu--w7 .xp-menu-item:hover, .xp-menu--w7 .xp-menu-item.is-open { background: linear-gradient(#f1f7fe, #d8eafd); color: #000; box-shadow: inset 0 0 0 1px #9ac6f2; border-radius: 3px; }
@media (max-width: 480px) {
  body.era7 #xp-startmenu { width: 100vw; margin: 0; }
  .s7 { flex-direction: column; }
  .s7-right { padding-top: 6px; flex-direction: row; flex-wrap: wrap; }
  .s7-pic { display: none; }
  .s7-ritem { flex: 1 1 45%; }
  .s7-power { flex: 1 1 100%; }
}

/* Выключение «семёрки» */
.off-saving--7 { flex-direction: column; text-align: center; font-family: 'Segoe UI', Tahoma, sans-serif; font-size: 20px; }
body.era7 #xp-off.is-saving { background: var(--w7-wall); }
.w7-spin { width: 34px; height: 34px; border-radius: 50%; border: 4px solid rgba(255,255,255,.25); border-top-color: #fff; animation: w7spin .9s linear infinite; margin: 0 auto 14px; }
@keyframes w7spin { to { transform: rotate(360deg); } }

/* Word 2010 в «семёрке»: светлая лента */
.wd--2010 .xp-menubar { background: linear-gradient(#fdfeff, #dfe9f5); }

.ga-roster[hidden], .ga-create[hidden] { display: none; }
.ga-names { margin: 0 0 6px; padding-left: 22px; line-height: 1.7; }
.ga-names li.is-me { font-weight: bold; color: #0b2a7a; }
.ga-names i { color: #888; }

/* =====================================================================
   Лесопилка (эпоха Windows 7)
   ===================================================================== */
.sm7-app { background: #2a2620; }
.sw-wrap { flex: 1; min-height: 0; display: flex; flex-direction: column; font-family: 'Segoe UI', Tahoma, sans-serif; color: #fff; user-select: none; -webkit-user-select: none; }
.sw-hud {
  flex: 0 0 auto; display: flex; align-items: center; gap: 10px; padding: 6px 8px;
  background: linear-gradient(#4a5a68, #2c3842); border-bottom: 1px solid #12181e; box-shadow: 0 2px 6px rgba(0,0,0,.4); flex-wrap: wrap;
}
.sw-me { display: flex; flex-direction: column; align-items: center; min-width: 64px; line-height: 1; }
.sw-score { font-size: 22px; color: #ffe14a; text-shadow: 0 1px 2px #000; }
.sw-me small { font-size: 10px; opacity: .75; }
.sw-bars { display: flex; gap: 10px; flex: 1 1 300px; min-width: 0; }
.sw-bars label { flex: 1; min-width: 70px; display: flex; flex-direction: column; gap: 2px; font-size: 11px; opacity: .95; }
.sw-bar { position: relative; display: block; height: 12px; background: #151a1f; border: 1px solid #000; border-radius: 6px; overflow: hidden; }
.sw-bar > i { display: block; height: 100%; width: 0; background: #5ac85a; transition: width .15s; }
.sw-carry > i { background: linear-gradient(90deg, #f2cf8a, #b8833c); }
.sw-bar em { position: absolute; inset: 0; display: grid; place-items: center; font: bold 9px Arial, sans-serif; font-style: normal; color: #fff; text-shadow: 0 0 2px #000; }
.sw-others { display: flex; gap: 10px; flex-wrap: wrap; font-size: 12px; }
.sw-o b { color: #ffe14a; }
.sw-o.is-out { opacity: .45; text-decoration: line-through; }
.sw-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 4px; vertical-align: -1px; box-shadow: 0 0 0 1px #000; }
.sw-btns { display: flex; gap: 6px; margin-left: auto; }
.sw-hb { width: 34px; height: 30px; border-radius: 5px; border: 1px solid rgba(255,255,255,.4); background: rgba(255,255,255,.15); color: #fff; font-size: 16px; cursor: pointer; }
.sw-hb.sw-x { background: linear-gradient(#e8805e, #c7381a); }
.sw-stage { position: relative; flex: 1; min-height: 0; overflow: hidden; touch-action: none; }
.sw-cv { display: block; }
.sw-tip {
  position: absolute; left: 50%; top: 8px; transform: translateX(-50%); z-index: 5; max-width: min(92%, 560px);
  padding: 7px 12px; border-radius: 6px; background: rgba(255,255,225,.96); color: #000; border: 1px solid #000; font-size: 13px; text-align: center; box-shadow: 2px 3px 8px rgba(0,0,0,.4); pointer-events: none;
}
.sw-tip[hidden] { display: none; }
.sw-pick {
  position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); z-index: 6; max-width: calc(100% - 16px);
  padding: 8px 10px; border-radius: 10px; background: rgba(30,36,42,.92); border: 1px solid rgba(255,255,255,.3); box-shadow: 0 4px 14px rgba(0,0,0,.5);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.sw-pick[hidden] { display: none; }
.sw-pick.is-steal { border-color: #ffe14a; box-shadow: 0 0 16px rgba(255,225,74,.5); }
.sw-pick-h { font-size: 12px; font-weight: 600; }
.sw-pick-list { display: flex; gap: 5px; flex-wrap: wrap; justify-content: center; }
.sw-pick-list button {
  position: relative; width: var(--w); min-width: 40px; height: 54px; border-radius: 3px; border: 1px solid #7a4e1c; cursor: pointer; color: #3a2408; font: bold 13px Arial, sans-serif;
  background: repeating-linear-gradient(90deg, rgba(122,78,28,.18) 0 2px, transparent 2px 7px), linear-gradient(#f6d9a0, #c08a44);
}
.sw-pick-list button small { position: absolute; left: 3px; top: 2px; font-size: 9px; opacity: .6; }
.sw-pick-list button:disabled { opacity: .35; cursor: not-allowed; }
.sw-pick-list button:not(:disabled):active { transform: translateY(2px); }
.sw-all { padding: 6px 14px; border-radius: 5px; border: 1px solid #000; background: linear-gradient(#ffe680, #f0b020); color: #2a1c00; font: bold 12px 'Segoe UI', Tahoma, sans-serif; cursor: pointer; }
.sw-qte, .sw-five {
  position: absolute; left: 50%; top: 38%; transform: translate(-50%, -50%); z-index: 7; padding: 12px 16px; border-radius: 12px;
  background: rgba(20,28,40,.94); border: 2px solid #7ae8ff; box-shadow: 0 0 24px rgba(122,232,255,.5); text-align: center; min-width: 260px;
}
.sw-qte[hidden], .sw-five[hidden] { display: none; }
.sw-qte-h, .sw-five-h { font-weight: 600; margin-bottom: 6px; }
.sw-qte-seq { display: flex; gap: 6px; justify-content: center; }
.sw-qte-seq b { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 6px; background: #2a3846; border: 1px solid #567; font-size: 22px; }
.sw-qte-seq b.is-ok { background: #2a8a3a; border-color: #7aff8a; }
.sw-qte-seq b.is-cur { border-color: #ffe14a; box-shadow: 0 0 10px #ffe14a; animation: sw-pulse .5s infinite alternate; }
@keyframes sw-pulse { to { transform: scale(1.08); } }
.sw-qte-p { font-size: 12px; opacity: .8; margin-top: 6px; }
.sw-dpad { display: none; grid-template-columns: repeat(3, 56px); grid-template-rows: repeat(2, 50px); gap: 6px; justify-content: center; margin-top: 10px; }
.sw-dpad button { border-radius: 10px; border: 1px solid #000; background: radial-gradient(circle at 40% 30%, #6a7a8a, #2a3440); color: #fff; font-size: 24px; }
.sw-dpad [data-k="U"] { grid-area: 1 / 2; } .sw-dpad [data-k="L"] { grid-area: 2 / 1; } .sw-dpad [data-k="D"] { grid-area: 2 / 2; } .sw-dpad [data-k="R"] { grid-area: 2 / 3; }
@media (pointer: coarse) { .sw-dpad { display: grid; } }
.sw-five { border-color: #ffe14a; box-shadow: 0 0 24px rgba(255,225,74,.5); }
.sw-five-bar { position: relative; height: 22px; background: #2a3846; border-radius: 11px; overflow: hidden; border: 1px solid #000; }
.sw-five-zone { position: absolute; left: 52%; width: 26%; top: 0; bottom: 0; background: linear-gradient(#7aff8a, #2a9a3a); }
.sw-five-mark { position: absolute; top: -2px; bottom: -2px; width: 6px; margin-left: -3px; background: #fff; box-shadow: 0 0 8px #fff; border-radius: 3px; }
.sw-stick-zone { position: absolute; left: 0; bottom: 0; width: 50%; height: 70%; z-index: 3; display: none; }
@media (pointer: coarse) { .sw-stick-zone { display: block; } }
.sw-stick { position: absolute; left: 90px; top: calc(100% - 100px); width: 110px; height: 110px; margin: -55px 0 0 -55px; border-radius: 50%; border: 2px solid rgba(255,255,255,.35); background: radial-gradient(circle, rgba(255,255,255,.06) 40%, rgba(255,255,255,.14) 41%, rgba(255,255,255,.06) 70%); opacity: .55; }
.sw-stick.is-on { opacity: .9; }
.sw-knob { position: absolute; left: 50%; top: 50%; width: 50px; height: 50px; margin: -25px 0 0 -25px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #9aaaba, #2a3440 70%); border: 2px solid rgba(0,0,0,.6); }
.sw-act {
  position: absolute; right: 14px; bottom: calc(14px + env(safe-area-inset-bottom)); z-index: 6; min-width: 120px; padding: 14px 16px; border-radius: 40px;
  border: 2px solid #000; background: radial-gradient(circle at 40% 30%, #ffe680, #e09a10 75%); color: #2a1c00; font: bold 14px 'Segoe UI', Tahoma, sans-serif; box-shadow: 0 4px 10px rgba(0,0,0,.5); cursor: pointer; touch-action: none;
}
.sw-act[hidden] { display: none; }
.sw-act.is-hot { animation: sw-pulse .45s infinite alternate; background: radial-gradient(circle at 40% 30%, #a8ffb0, #2a9a3a 75%); color: #002a08; }
@media (pointer: coarse) { .sw-pick { bottom: auto; top: 54px; } }
.sw-res td, .sw-res th { padding: 3px 8px; }
.sw-res tr.is-me td { background: #fff4c2; font-weight: bold; }
@media (max-width: 560px) {
  .sw-hud { gap: 6px; padding: 4px 6px; }
  .sw-bars { order: 3; flex: 1 1 100%; gap: 6px; }
  .sw-others { font-size: 11px; gap: 6px; }
  .sw-score { font-size: 18px; }
}
body.sw-immersive #xp-taskbar,
body.sw-immersive #clippy,
body.sw-immersive .xp-window[data-app="sawmill"] .xp-titlebar { display: none !important; }
body.sw-immersive #xp-desktop { bottom: 0; }
body.sw-immersive .xp-window[data-app="sawmill"] { border: 0; border-radius: 0; }

/* Лесопилка v3: «режим пусечек» (что в руках), кнопка бега, настройки смены */
.sw-hand { position: absolute; left: 8px; top: 50px; z-index: 5; display: flex; align-items: center; flex-wrap: wrap; gap: 4px 6px; max-width: min(46%, 380px);
  padding: 6px 10px; border-radius: 10px; background: rgba(20,24,30,.82); border: 1px solid rgba(255,255,255,.25); box-shadow: 0 3px 10px rgba(0,0,0,.4); font-size: 12px; pointer-events: none; }
.sw-hand[hidden] { display: none; }
.sw-hand small { flex-basis: 100%; opacity: .8; font-size: 11px; }
.sw-chip { display: inline-grid; place-items: center; min-width: 30px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--c); color: #fff; font: bold 12px Arial, sans-serif; font-style: normal;
  text-shadow: 0 1px 1px rgba(0,0,0,.6); box-shadow: inset 0 -2px 0 rgba(0,0,0,.25), 0 0 0 1px rgba(0,0,0,.5); }
.sw-chip.is-closed { box-shadow: 0 0 0 2px #ff4a2a, 0 0 8px #ff4a2a; animation: sw-pulse .5s infinite alternate; }
.sw-pick-list button[style*="--c"] { border-left: 5px solid var(--c); border-right: 5px solid var(--c); }
.sw-run { position: absolute; right: 150px; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 6; width: 76px; height: 76px; border-radius: 50%; display: none;
  border: 2px solid #000; background: radial-gradient(circle at 40% 30%, #a8e8ff, #2a7ab0 75%); color: #002030; font: bold 14px 'Segoe UI', Tahoma, sans-serif; box-shadow: 0 4px 10px rgba(0,0,0,.5); touch-action: none; }
.sw-run.is-on { transform: scale(.94); background: radial-gradient(circle at 40% 30%, #ffffff, #4ab0e0 75%); }
@media (pointer: coarse) { .sw-run:not([hidden]) { display: block; } }
.sw-set .ga-opt { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.sw-set .ga-opt > span { font-size: 12px; }
.sw-set-note { font-size: 11px; color: #555; margin: 4px 0 0; }
@media (max-height: 460px) { .sw-hand { top: 40px; padding: 4px 8px; } .sw-run { width: 62px; height: 62px; right: 124px; } }

/* Скрепка не закрывает стол пинбола и цех лесопилки */
body.sw-active #clippy, body.pb-active #clippy { display: none !important; }
.s7-pic { top: 2px; }
.s7-right { padding-top: 76px; }

/* Лесопилка v2: панель поверх цеха, только горизонтально на телефоне */
.sw-stage .sw-hud { position: absolute; left: 0; right: 0; top: 0; z-index: 4; background: linear-gradient(rgba(44,56,66,.92), rgba(44,56,66,.75)); padding: 4px 8px; gap: 8px; flex-wrap: nowrap; }
.sw-stage .sw-bars label { flex-direction: row; align-items: center; gap: 6px; }
.sw-stage .sw-bars label > span { white-space: nowrap; }
.sw-stage .sw-bars label .sw-bar { flex: 1; min-width: 50px; }
.sw-stage .sw-score { font-size: 20px; }
.sw-stage .sw-tip { top: 50px; }
.sw-rotate { display: none; position: absolute; inset: 0; z-index: 20; background: rgba(20,24,30,.96); color: #fff; align-items: center; justify-content: center; text-align: center; font-size: 16px; }
.sw-rotate b { display: block; font-size: 64px; animation: sw-rot 1.6s ease-in-out infinite; }
@keyframes sw-rot { 50% { transform: rotate(90deg); } }
.sw-stage.is-portrait .sw-rotate { display: flex; }
.sw-pick { left: auto; right: 12px; transform: none; bottom: 84px; max-width: min(60%, 420px); }
@media (pointer: coarse) { .sw-pick { top: auto; bottom: 84px; } }
.sw-pick-list button.is-closed { box-shadow: inset 0 0 0 2px #c83a2a; }
.sw-stick-zone { width: 45%; height: 80%; }
.sw-stick { left: 90px; top: calc(100% - 90px); }
@media (max-height: 460px) {
  .sw-stage .sw-hud { padding: 2px 6px; }
  .sw-stage .sw-bars { gap: 6px; }
  .sw-stage .sw-bars label { font-size: 10px; }
  .sw-others { font-size: 11px; }
  .sw-act { padding: 10px 14px; min-width: 100px; }
  .sw-pick { bottom: 64px; padding: 5px 8px; }
  .sw-pick-list button { height: 44px; }
  .sw-qte, .sw-five { top: 45%; padding: 8px 12px; }
  .sw-dpad { grid-template-rows: repeat(2, 42px); grid-template-columns: repeat(3, 48px); margin-top: 6px; }
}

/* =====================================================================
   Верю — не верю (театральный)
   ===================================================================== */
.fa-app { background: #1a0606; }
.fa-stage {
  position: relative; flex: 1; min-height: 0; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  padding: 64px 14px calc(18px + env(safe-area-inset-bottom));
  background: radial-gradient(ellipse 70% 55% at 50% 42%, #5a3a2a 0%, #2a1610 55%, #120806 100%);
  font-family: 'Segoe UI', Tahoma, sans-serif; color: #fff; user-select: none; -webkit-user-select: none;
}
.fa-stage::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 22%; background: linear-gradient(transparent, rgba(0,0,0,.55)), repeating-linear-gradient(90deg, #5a3218 0 40px, #4a2812 40px 42px); pointer-events: none; opacity: .7; }
/* Занавес: закрыт до начала, открывается к игре */
.fa-curtain { position: absolute; top: 0; bottom: 0; width: 52%; z-index: 6; pointer-events: none; transition: transform 1.1s cubic-bezier(.6,.05,.3,1);
  background: repeating-linear-gradient(90deg, #8a0f12 0 18px, #b0181c 18px 30px, #6a0a0c 30px 44px); box-shadow: inset 0 0 40px rgba(0,0,0,.6); }
.fa-l { left: 0; transform-origin: left; } .fa-r { right: 0; transform-origin: right; }
.fa-stage.is-open .fa-l { transform: translateX(-88%) scaleX(.6); }
.fa-stage.is-open .fa-r { transform: translateX(88%) scaleX(.6); }
.fa-valance { position: absolute; left: 0; right: 0; top: 0; height: 54px; z-index: 7; pointer-events: none;
  background: radial-gradient(ellipse 40px 26px at 40px 54px, transparent 96%, #9a1418 100%) 0 0 / 80px 54px repeat-x, linear-gradient(#5a080a, #9a1418);
  border-bottom: 3px solid #d8a83a; }
.fa-top { position: absolute; left: 10px; right: 10px; top: 6px; z-index: 8; display: flex; align-items: center; gap: 12px; }
.fa-lives i { font-style: normal; font-size: 20px; color: #4a2020; margin-right: 2px; }
.fa-lives i.is-on { color: #ff4a5a; text-shadow: 0 0 8px #ff4a5a; }
.fa-score { display: flex; align-items: baseline; gap: 4px; }
.fa-score b { font-size: 24px; color: #ffd84a; text-shadow: 0 2px 4px #000; }
.fa-score small { opacity: .8; }
.fa-qn { opacity: .85; font-size: 13px; }
.fa-btns { margin-left: auto; display: flex; gap: 6px; }
.fa-hb { width: 34px; height: 30px; border-radius: 5px; border: 1px solid rgba(255,255,255,.4); background: rgba(0,0,0,.35); color: #fff; font-size: 16px; cursor: pointer; }
.fa-hb.fa-x { background: linear-gradient(#e8805e, #c7381a); }
.fa-players { position: relative; z-index: 3; display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; max-width: 760px; }
.fa-players[hidden] { display: none; }
.fa-pl { min-width: 120px; padding: 5px 10px; border-radius: 8px; background: rgba(0,0,0,.45); border: 2px solid var(--pc); display: flex; flex-direction: column; font-size: 12px; }
.fa-pl b { color: var(--pc); }
.fa-pl em { font-style: normal; opacity: .85; }
.fa-pl.is-ok { box-shadow: 0 0 12px #7aff8a; } .fa-pl.is-bad { box-shadow: 0 0 12px #ff5a4a; }
.fa-pl.is-out { opacity: .45; }
.fa-spot { position: absolute; left: 50%; top: -10%; width: 70%; height: 90%; transform: translateX(-50%); pointer-events: none;
  background: radial-gradient(ellipse 50% 60% at 50% 70%, rgba(255,240,190,.22), rgba(255,240,190,0) 70%); }
.fa-card {
  position: relative; z-index: 2; width: min(640px, 100%); min-height: 150px; padding: 18px 22px 22px; border-radius: 10px; text-align: center;
  background: linear-gradient(#fdf6e0, #efe0b8); color: #2a1406; border: 3px solid #c8963a; box-shadow: 0 10px 30px rgba(0,0,0,.6), inset 0 0 0 2px #fff6dc;
  font-family: Georgia, 'Times New Roman', serif;
}
.fa-card.is-in { animation: fa-in .45s cubic-bezier(.2,.8,.3,1.2); }
@keyframes fa-in { from { transform: translateY(-30px) scale(.9); opacity: 0; } }
.fa-card.is-ok { box-shadow: 0 0 0 4px #4ac85a, 0 10px 30px rgba(0,0,0,.6); }
.fa-card.is-bad { box-shadow: 0 0 0 4px #e04a3a, 0 10px 30px rgba(0,0,0,.6); animation: fa-shake .35s; }
@keyframes fa-shake { 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }
.fa-cat { font: bold 12px 'Segoe UI', Tahoma, sans-serif; text-transform: uppercase; letter-spacing: 2px; color: #8a5a1a; margin-bottom: 8px; }
.fa-q { font-size: clamp(18px, 3.2vw, 26px); line-height: 1.3; }
.fa-note { margin-top: 12px; font: italic 14px Georgia, serif; color: #5a3a1a; }
.fa-note[hidden], .fa-stamp[hidden], .fa-wait[hidden] { display: none; }
.fa-stamp { position: absolute; right: 12px; top: -16px; padding: 4px 12px; border: 3px solid; border-radius: 6px; font: 900 18px 'Arial Black', Arial, sans-serif; transform: rotate(8deg); background: rgba(255,255,255,.85); animation: fa-stamp .3s cubic-bezier(.3,1.6,.5,1); }
.fa-stamp.is-true { color: #1a8a2a; border-color: #1a8a2a; }
.fa-stamp.is-false { color: #c8201a; border-color: #c8201a; }
@keyframes fa-stamp { from { transform: rotate(8deg) scale(2.2); opacity: 0; } }
.fa-timer { position: relative; z-index: 2; width: min(640px, 100%); height: 10px; border-radius: 5px; background: rgba(0,0,0,.5); overflow: hidden; border: 1px solid #000; }
.fa-timer i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #ffd84a, #ff9a2a); }
.fa-timer.is-late i { background: #ff4a3a; }
.fa-answer { position: relative; z-index: 2; display: flex; gap: 14px; width: min(640px, 100%); }
.fa-answer button {
  flex: 1; padding: 18px 10px; border-radius: 12px; border: 3px solid rgba(0,0,0,.5); cursor: pointer;
  font: 900 clamp(20px, 4vw, 30px) 'Arial Black', Arial, sans-serif; letter-spacing: 1px; color: #fff; text-shadow: 0 2px 3px rgba(0,0,0,.6);
  box-shadow: 0 6px 0 rgba(0,0,0,.45), inset 0 2px 0 rgba(255,255,255,.4); transition: transform .08s;
}
.fa-yes { background: linear-gradient(#5ad86a, #1f8a2e); }
.fa-no { background: linear-gradient(#ff7a5a, #b8261a); }
.fa-answer button:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 2px 0 rgba(0,0,0,.45); }
.fa-answer button:disabled { filter: grayscale(.6) brightness(.7); cursor: default; }
.fa-answer button.is-picked { filter: none; outline: 4px solid #ffd84a; }
.fa-wait { position: relative; z-index: 2; opacity: .85; }
.fa-pop { position: absolute; left: 50%; top: 40%; z-index: 9; transform: translate(-50%, -50%) scale(.6); opacity: 0; pointer-events: none; font: 900 34px 'Arial Black', Arial, sans-serif; text-shadow: 0 0 6px #000, 2px 3px 0 #000; white-space: nowrap; }
.fa-pop.is-in { animation: fa-pop 1.4s ease-out forwards; }
@keyframes fa-pop { 15% { transform: translate(-50%, -50%) scale(1.15); opacity: 1; } 70% { opacity: 1; } 100% { transform: translate(-50%, -90%) scale(1); opacity: 0; } }
@media (max-height: 480px) {
  .fa-stage { gap: 8px; padding-top: 58px; }
  .fa-card { min-height: 0; padding: 10px 14px 14px; }
  .fa-answer button { padding: 10px; }
}
body.fa-immersive #xp-taskbar, body.fa-immersive #clippy, body.fa-immersive .xp-window[data-app="faith"] .xp-titlebar { display: none !important; }
body.fa-immersive #xp-desktop { bottom: 0; }
body.fa-immersive .xp-window[data-app="faith"] { border: 0; border-radius: 0; }

/* =====================================================================
   Весёлый суд (юрфак)
   ===================================================================== */
.ct-app { background: #120804; }
.ct-wrap { flex: 1; min-height: 0; display: flex; flex-direction: column; font-family: 'Segoe UI', Tahoma, Arial, sans-serif; color: #fff; user-select: none; -webkit-user-select: none; background: radial-gradient(ellipse at 50% 0, #3a1e0e, #120804 70%); }
.ct-top { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; padding: 6px 8px; background: linear-gradient(#2a1206, #1a0a04); border-bottom: 2px solid #c89a3a; position: relative; z-index: 3; }
.ct-combo { display: flex; gap: 6px; font: bold 12px 'Segoe UI', Tahoma, sans-serif; white-space: nowrap; overflow: hidden; }
.ct-combo[hidden] { display: none; }
.ct-combo b { padding: 3px 8px; border-radius: 10px; color: #fff; animation: ct-fire .6s ease-in-out infinite alternate; }
.ct-combo b.s0 { background: linear-gradient(#3a6ad8, #1a3a8a); box-shadow: 0 0 8px #5a8aff; }
.ct-combo b.s1 { background: linear-gradient(#d83a3a, #8a1a1a); box-shadow: 0 0 8px #ff5a5a; }
@keyframes ct-fire { to { box-shadow: 0 0 14px #ffb040; } }
@media (max-width: 640px) { .ct-combo { font-size: 10px; } }
.ct-stage { padding: 4px 10px; border-radius: 4px; background: rgba(0,0,0,.5); border: 1px solid #d8b040; color: #ffe080; font: bold 13px 'Segoe UI', Tahoma, sans-serif; letter-spacing: .5px; text-transform: uppercase; white-space: nowrap; }
.ct-btns { margin-left: auto; display: flex; gap: 6px; }
.ct-hb { width: 40px; height: 34px; border-radius: 6px; border: 1px solid rgba(255,255,255,.4); background: rgba(255,255,255,.08); color: #fff; font-size: 17px; cursor: pointer; }
.ct-hb.ct-x { background: linear-gradient(#e8805e, #c7381a); }
.ct-main { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.ct-hall { position: relative; flex: 0 0 auto; width: 100%; aspect-ratio: 16 / 9; max-height: 52%; min-height: 0; overflow: hidden; background: #120804; }
.ct-cv { position: absolute; left: 0; top: 0; display: block; image-rendering: pixelated; }
.ct-side { flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; gap: 8px; padding: 10px 10px calc(10px + env(safe-area-inset-bottom)); -webkit-overflow-scrolling: touch; }
.ct-bubble { position: relative; flex: 0 0 auto; padding: 10px 14px 12px; border-radius: 12px; background: #fffbe8; color: #1a0e06; border: 3px solid #1a0e06; box-shadow: 0 4px 0 rgba(0,0,0,.45); font: 17px/1.45 Georgia, 'Times New Roman', serif; cursor: pointer; animation: ct-in .25s ease-out; }
.ct-bubble::before { content: ''; position: absolute; top: -13px; left: 30px; border: 10px solid transparent; border-bottom-color: inherit; border-top: 0; }
.ct-bubble.s1::before { left: auto; right: 30px; }
.ct-bubble.sj::before { left: 50%; margin-left: -10px; }
@keyframes ct-in { from { transform: translateY(6px); opacity: .3; } }
.ct-bubble[hidden], .ct-react[hidden] { display: none; }
.ct-bubble.s0 { border-color: #2a4a9a; background: #f4f8ff; } .ct-bubble.s1 { border-color: #8a2430; background: #fff4f2; } .ct-bubble.sj { border-color: #c89a3a; background: #fffbe8; }
.ct-who { display: block; font: 800 13px 'Segoe UI', Tahoma, sans-serif; letter-spacing: .5px; text-transform: uppercase; color: #6a3a1a; }
.ct-bubble.s0 .ct-who { color: #2a4a9a; } .ct-bubble.s1 .ct-who { color: #8a2430; }
.ct-say { margin: 3px 0 0; min-height: 2.9em; }
.ct-react { position: absolute; left: 50%; bottom: 5%; transform: translateX(-50%); z-index: 5; padding: 6px 16px; border-radius: 20px; font: 900 17px 'Segoe UI', Tahoma, sans-serif; background: rgba(0,0,0,.8); border: 2px solid currentColor; white-space: nowrap; pointer-events: none; animation: ct-pop .4s cubic-bezier(.3,1.7,.5,1); }
@keyframes ct-pop { from { transform: translateX(-50%) scale(.3) rotate(-8deg); } }
.ct-react.t0 { color: #ff6a5a; } .ct-react.t1 { color: #bbb; } .ct-react.t2 { color: #ffe080; } .ct-react.t3 { color: #8aff7a; }
.ct-react.t4 { color: #7ae8ff; font-size: 21px; text-shadow: 0 0 10px #7ae8ff; animation: ct-pop .4s cubic-bezier(.3,1.7,.5,1), ct-glow .5s ease-in-out .4s infinite alternate; }
@keyframes ct-glow { to { text-shadow: 0 0 18px #fff, 0 0 30px #7ae8ff; } }
.ct-panel { flex: 0 0 auto; display: flex; flex-direction: column; gap: 6px; }
.ct-head { display: flex; align-items: center; gap: 10px; font: bold 14px 'Segoe UI', Tahoma, sans-serif; color: #ffe080; }
.ct-step { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ct-timer { flex: 1; height: 10px; background: #000; border-radius: 5px; overflow: hidden; border: 1px solid #5a3a1a; }
.ct-timer i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #d8b040, #ffe080); }
.ct-timer.is-late i { background: #ff4a3a; animation: ct-blink .3s infinite alternate; }
@keyframes ct-blink { to { opacity: .4; } }
.ct-body { font-size: 16px; line-height: 1.45; }
.ct-opts { display: flex; flex-direction: column; gap: 8px; }
.ct-opt { display: flex; align-items: flex-start; gap: 10px; min-height: 52px; padding: 10px 12px; text-align: left; border-radius: 10px; border: 2px solid #d8b040; background: linear-gradient(#fffaf0, #f2e2b4); color: #2a1406; cursor: pointer; font: 16px/1.4 Georgia, 'Times New Roman', serif; box-shadow: 0 3px 0 #8a5a1a; transition: transform .08s, box-shadow .08s; animation: ct-in .3s ease-out backwards; }
.ct-opt:nth-child(2) { animation-delay: .06s; } .ct-opt:nth-child(3) { animation-delay: .12s; }
.ct-opt i { flex: 0 0 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: #2a1406; color: #ffe080; font: normal bold 14px 'Segoe UI', sans-serif; margin-top: 1px; }
.ct-opt:hover { box-shadow: 0 3px 0 #8a5a1a, 0 0 0 3px #ffe080; }
.ct-opt:active { transform: translateY(3px); box-shadow: 0 0 0 #8a5a1a; }
.ct-evpick { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; }
.ct-evpick small { width: 100%; font-size: 14px; color: #ffd8a0; }
.ct-ev { padding: 8px 12px; border-radius: 18px; border: 2px solid #d8b040; background: rgba(0,0,0,.35); color: #ffe080; cursor: pointer; font: 14px/1.3 'Segoe UI', Tahoma, sans-serif; text-align: left; }
.ct-ev.is-on { background: #d8b040; color: #2a1406; box-shadow: 0 0 12px #ffe080; }
.ct-ev:disabled { opacity: .4; }
.ct-waitmsg { margin: 6px 0; opacity: .95; font: 16px 'Segoe UI', Tahoma, sans-serif; color: #ffd8a0; }
.ct-case { padding: 8px 12px; border-radius: 10px; background: rgba(0,0,0,.3); border: 1px solid #5a3a1a; }
.ct-case p { margin: 4px 0; font: 16px/1.4 Georgia, serif; }
.ct-case b, .ct-evs b { color: #ffe080; }
.ct-case i { color: #7ae8ff; }
.ct-row { display: flex; align-items: center; gap: 10px; justify-content: space-between; margin-top: 10px; flex-wrap: wrap; }
.ct-you { color: #7ae8ff; font-weight: bold; }
.ct-go { margin-left: auto; min-height: 46px; padding: 10px 20px; border-radius: 8px; border: 2px solid #000; background: linear-gradient(#ffe680, #d8a020); color: #2a1406; font: bold 16px 'Segoe UI', Tahoma, sans-serif; cursor: pointer; box-shadow: 0 3px 0 #6a4010; animation: ct-nudge 1.4s ease-in-out infinite; }
@keyframes ct-nudge { 50% { transform: translateX(3px); } }
.ct-evs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; font-size: 15px; }
.ct-evs ol { margin: 4px 0 0; padding-left: 22px; }
.ct-hint { opacity: .85; font-size: 14px; margin: 8px 0 0; }
.ct-vtext { font: italic 15px/1.45 Georgia, serif; background: #fff8dc; color: #2a1406; padding: 10px 12px; border-radius: 6px; border: 1px solid #d8b040; }
.ct-ctx { margin: 0 0 4px; font-size: 15px; line-height: 1.4; }
.ct-ctx p { margin: 0 0 6px; }
.ct-ctx b { color: #ffe080; }
.ct-cs { opacity: .85; font-size: 14px; }
.ct-opp { padding: 8px 12px; border-left: 4px solid #ff9a7a; border-radius: 0 8px 8px 0; background: rgba(0,0,0,.35); font: italic 16px/1.4 Georgia, serif; }
.ct-q { font: bold 16px 'Segoe UI', Tahoma, sans-serif; color: #7ae8ff; }
/* Широкий экран и телефон боком: зал слева, текст справа */
@media (min-aspect-ratio: 4/3) {
  .ct-main { flex-direction: row; }
  .ct-hall { flex: 1 1 60%; width: auto; height: 100%; max-height: none; aspect-ratio: auto; }
  .ct-side { flex: 0 0 min(440px, 40%); border-left: 2px solid #c89a3a; background: rgba(0,0,0,.25); }
}
@media (max-height: 480px) and (min-aspect-ratio: 4/3) {
  .ct-top { padding: 3px 6px; } .ct-hb { height: 30px; } .ct-stage { font-size: 12px; }
  .ct-bubble { font-size: 15px; padding: 8px 10px; } .ct-opt { font-size: 15px; min-height: 44px; padding: 8px 10px; }
}
@media (max-width: 640px) { .ct-evs { grid-template-columns: 1fr; } .ct-stage { font-size: 11px; padding: 4px 7px; } }
body.ct-immersive #xp-taskbar, body.ct-immersive #clippy, body.ct-immersive .xp-window[data-app="court"] .xp-titlebar { display: none !important; }
body.ct-immersive #xp-desktop { bottom: 0; }
body.ct-immersive .xp-window[data-app="court"] { border: 0; border-radius: 0; }

body.fa-active #clippy, body.ct-active #clippy { display: none !important; }

/* Лобби: номер комнаты и кнопки — аккуратным столбиком */
.ga-code { flex-direction: column; gap: 4px; padding: 6px 0 2px; }
.ga-code small { color: #555; }
.ga-code-btns { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.ga-code-btns .ga-share { font-weight: bold; background: linear-gradient(#e8f6ff, #b8dcff); border-color: #2a6ab8; }
.ga-lobby fieldset .ga-row { margin-top: 4px; }
.ga-lobby .ga-in { min-width: 0; }
@media (max-width: 480px) {
  .ga-opt > span { flex-basis: 100%; }
  .ga-num { font-size: 26px; letter-spacing: 4px; }
  .ga-code-btns .ga-btn { flex: 1 1 45%; }
}

/* Меню «Поделиться» на телефоне */
.xp-share { position: fixed; inset: 0; z-index: 9500; display: flex; align-items: flex-end; justify-content: center; background: rgba(0,0,0,.45); }
.xp-share-box { width: 100%; max-width: 480px; padding: 14px 14px calc(14px + env(safe-area-inset-bottom)); border-radius: 14px 14px 0 0; background: #f4f4f4; color: #111; font: 14px 'Segoe UI', Tahoma, sans-serif; display: flex; flex-direction: column; gap: 10px; animation: smin .18s ease-out; }
.xp-share-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.xp-share-list a { padding: 12px 6px; border-radius: 10px; background: var(--c); color: #fff; text-align: center; text-decoration: none; font-weight: bold; }
.xp-share-url { width: 100%; padding: 8px; border: 1px solid #bbb; border-radius: 6px; font: 13px Consolas, monospace; }
.xp-share-row { display: flex; gap: 8px; }
.xp-share-row button { flex: 1; padding: 10px; border-radius: 8px; border: 1px solid #888; background: #fff; font: bold 14px 'Segoe UI', Tahoma, sans-serif; }
.xp-share small { color: #666; text-align: center; }

/* =====================================================================
   Пауза игр: своя, общая онлайн и автопауза при обрыве связи
   ===================================================================== */
.ga-pause { position: absolute; inset: 0; z-index: 55; display: flex; align-items: center; justify-content: center; padding: 14px; background: rgba(6, 12, 40, .62); backdrop-filter: blur(3px); }
.ga-pause[hidden] { display: none; }
.ga-pause-box { width: min(380px, 100%); padding: 18px 18px 14px; text-align: center; color: #fff; font: 14px/1.45 'Segoe UI', Tahoma, sans-serif; background: linear-gradient(#2a3a7a, #16204a); border: 2px solid #8ab4ff; border-radius: 12px; box-shadow: 0 12px 40px rgba(0,0,0,.6); animation: ga-pop .18s ease-out; }
.ga-pause-t { display: block; font-size: 20px; margin-bottom: 6px; }
.ga-pause-s { margin: 0 0 12px; opacity: .9; }
.ga-pause .ga-btns { justify-content: center; }
.ga-pause .ga-btn { min-height: 38px; padding: 6px 16px; font-size: 14px; }
.ga-pbtn { position: absolute; z-index: 50; top: 6px; left: 50%; transform: translateX(-50%); width: 36px; height: 28px; border-radius: 14px; border: 1px solid rgba(255,255,255,.55); background: rgba(0,0,0,.42); color: #fff; font: bold 11px/1 Tahoma, sans-serif; letter-spacing: -1px; cursor: pointer; opacity: .75; }
.ga-pbtn:hover, .ga-pbtn.is-on { opacity: 1; background: rgba(40,80,200,.8); }
.ga-pbtn[hidden] { display: none; }
@media (pointer: coarse) { .ga-pbtn { width: 44px; height: 34px; font-size: 13px; } }


/* ==========================================================
   Трубы (Windows 7): серверная, плата и провода
   ========================================================== */
.pp-app { display: flex; flex-direction: column; background: radial-gradient(ellipse at 50% 30%, #1c2a3a, #0a0f16 75%); color: #e8f0f8; font: 12px 'Segoe UI', Tahoma, sans-serif; user-select: none; }
.pp-app > .xp-menubar { color: #1a1a1a; }
.pp-top {
  flex: 0 0 auto; display: flex; align-items: center; gap: 8px; padding: 6px 8px;
  background: linear-gradient(rgba(255,255,255,.16), rgba(255,255,255,.04) 50%, rgba(0,0,0,.15)); border-bottom: 1px solid rgba(0,0,0,.6);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25);
}
.pp-stat { display: flex; flex-direction: column; align-items: center; min-width: 52px; padding: 2px 8px; border-radius: 4px; background: rgba(0,0,0,.35); border: 1px solid rgba(255,255,255,.12); }
.pp-stat small, .pp-opp small { font-size: 10px; color: #9ab4cc; }
.pp-stat b { font: bold 16px 'Segoe UI', Tahoma, sans-serif; color: #fff; }
.pp-clock.is-low b { color: #ff7a6a; animation: pp-blink 1s steps(2) infinite; }
@keyframes pp-blink { 50% { opacity: .45; } }
.pp-task { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #b8d0e8; }
.pp-task b { color: #ffe680; }
.pp-opp { display: flex; flex-direction: column; align-items: flex-end; padding: 2px 10px; border-radius: 4px; background: rgba(200,60,40,.18); border: 1px solid rgba(255,120,100,.35); }
.pp-opp[hidden] { display: none; }
.pp-opp b { font: bold 15px 'Segoe UI', Tahoma, sans-serif; }
.pp-opp i { font-style: normal; font-size: 10px; color: #c8b0a8; }
.pp-opp.is-ahead { background: rgba(220,60,40,.4); }
.pp-btns { display: flex; gap: 4px; }
.pp-b {
  height: 28px; padding: 0 10px; border-radius: 3px; border: 1px solid rgba(0,0,0,.7); color: #fff; cursor: pointer; font: 12px 'Segoe UI', Tahoma, sans-serif;
  background: linear-gradient(rgba(255,255,255,.3), rgba(255,255,255,.08) 50%, rgba(0,0,0,.1)); box-shadow: inset 0 0 0 1px rgba(255,255,255,.25);
}
.pp-b:hover { background: linear-gradient(rgba(140,200,255,.55), rgba(60,130,220,.35) 50%, rgba(30,80,170,.4)); }
.pp-b.is-on { background: linear-gradient(#5aa0ff, #2050c0); }
.pp-field { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 4px; overflow: hidden; }
.pp-cv { display: block; image-rendering: pixelated; image-rendering: crisp-edges; touch-action: none; cursor: crosshair; border-radius: 4px; box-shadow: 0 0 0 2px #050a06, 0 6px 24px rgba(0,0,0,.6); }
.pp-tray {
  flex: 0 0 auto; display: flex; align-items: center; gap: 6px; padding: 6px 8px; min-height: 64px;
  background: linear-gradient(rgba(255,255,255,.1), rgba(0,0,0,.25)); border-top: 1px solid rgba(255,255,255,.15);
}
.pp-items { flex: 1; display: flex; flex-wrap: wrap; gap: 5px; }
.pp-item { position: relative; width: 52px; height: 52px; padding: 3px; border-radius: 5px; cursor: pointer; border: 1px solid rgba(255,255,255,.25); background: rgba(0,0,0,.35); }
.pp-item canvas { width: 44px; height: 44px; image-rendering: pixelated; display: block; border-radius: 3px; }
.pp-item i { position: absolute; right: 2px; bottom: 1px; min-width: 16px; padding: 0 3px; border-radius: 8px; background: #1a5ad8; color: #fff; font: bold 11px/16px Tahoma, sans-serif; font-style: normal; text-align: center; }
.pp-item:hover { border-color: #8ac4ff; }
.pp-item.is-sel { border-color: #ffd84a; box-shadow: 0 0 0 2px #ffd84a, 0 0 12px rgba(255,216,74,.6); background: rgba(255,216,74,.15); }
.pp-item.is-empty { opacity: .3; cursor: default; }
.pp-item.is-empty i { background: #555; }
.pp-rot { flex: 0 0 auto; width: 52px; height: 52px; border-radius: 50%; border: 1px solid rgba(0,0,0,.7); cursor: pointer; color: #fff; font: bold 24px Tahoma, sans-serif;
  background: radial-gradient(circle at 40% 30%, #8ac4ff, #2a6ad8 60%, #143a8a); box-shadow: inset 0 0 0 1px rgba(255,255,255,.35); }
.pp-rot:disabled { opacity: .35; cursor: default; }
@media (max-width: 560px) {
  .pp-top { flex-wrap: wrap; gap: 4px; }
  .pp-task { order: 9; flex: 1 1 100%; }
  .pp-stat { min-width: 44px; padding: 1px 5px; }
  .pp-item { width: 46px; height: 46px; }
  .pp-item canvas { width: 38px; height: 38px; }
  .pp-rot { width: 46px; height: 46px; }
}
