:root {
  --bg: #07060a;
  --ink: #f3e3c3;
  --muted: rgba(243, 227, 195, 0.66);
  --amber: #e8a33d;
  --amber-hi: #ffb347;
  --panel: rgba(16, 11, 7, 0.86);
  --glass: rgba(12, 8, 5, 0.55);
  --line: rgba(232, 163, 61, 0.28);
  --display: "Bebas Neue", Impact, sans-serif;
  --sans: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: max(16px, env(safe-area-inset-left));
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
}

#scene {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  outline: none;
}

button { font: inherit; color: inherit; }

/* ---------------------------------------------------------------- barra superior */

.bar {
  position: fixed;
  top: max(14px, env(safe-area-inset-top));
  left: var(--gutter);
  right: var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.8s 0.6s, transform 0.8s 0.6s;
}
.ready .bar { opacity: 1; transform: none; }
.bar > * { pointer-events: auto; }

.brand {
  margin: 0;
  display: flex;
  flex-direction: column;
  line-height: 0.85;
  font-family: var(--display);
  font-weight: 400;
  text-transform: uppercase;
  text-shadow: 0 0 18px rgba(255, 122, 26, 0.45);
}
.brand-small { color: var(--amber); font-size: 17px; letter-spacing: 0.32em; }
.brand-big { font-size: 46px; letter-spacing: 0.04em; }

.nav { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.nav button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}
.nav button:hover { border-color: var(--amber); background: rgba(40, 24, 10, 0.7); }
.nav button:active { transform: scale(0.97); }
.nav button:focus-visible, .dot:focus-visible, .btn:focus-visible, #panel-close:focus-visible {
  outline: 2px solid var(--amber-hi);
  outline-offset: 2px;
}
.nav .accent { background: var(--amber); color: #1a0f06; border-color: var(--amber); }
.nav .accent:hover { background: var(--amber-hi); }
#cheers-count { color: var(--amber); font-variant-numeric: tabular-nums; }
#sound[aria-pressed="false"] { opacity: 0.6; }

/* ---------------------------------------------------------------- puntos sobre los objetos */

#dots { position: fixed; inset: 0; pointer-events: none; opacity: 0; transition: opacity 0.6s 1.8s; }
.ready #dots { opacity: 1; }
.dot {
  position: absolute;
  left: 0;
  top: 0;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  padding: 0;
  border: 2px solid var(--amber-hi);
  border-radius: 50%;
  background: rgba(232, 163, 61, 0.28);
  cursor: pointer;
  pointer-events: auto;
  transition: opacity 0.25s;
}
.dot::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  border: 2px solid var(--amber-hi);
  animation: ping 2.4s ease-out infinite;
}
.dot::before {
  content: attr(data-label);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  white-space: nowrap;
  padding: 5px 10px;
  border-radius: 8px;
  background: var(--panel);
  border: 1px solid var(--line);
  font-size: 12.5px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.dot:hover::before, .dot:focus-visible::before { opacity: 1; }
@keyframes ping {
  0% { transform: scale(1); opacity: 0.8; }
  80%, 100% { transform: scale(2.4); opacity: 0; }
}
.has-panel #dots { opacity: 0.35; }

#tooltip {
  position: fixed;
  left: 0;
  top: 0;
  padding: 6px 11px;
  border-radius: 8px;
  background: var(--panel);
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
}
#tooltip.show { opacity: 1; }

/* ---------------------------------------------------------------- panel lateral */

#panel {
  position: fixed;
  top: 92px;
  right: var(--gutter);
  bottom: 16px;
  width: min(540px, calc(100vw - 32px));
  overflow: auto;
  padding: 30px 28px 26px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: translateX(24px);
  transition: opacity 0.3s, transform 0.3s;
}
#panel.open { opacity: 1; transform: none; }
#panel-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: transparent;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
#panel-close:hover { border-color: var(--amber); }

#panel h2 {
  margin: 4px 0 14px;
  font: 400 44px/0.95 var(--display);
  letter-spacing: 0.02em;
}
#panel p { color: var(--muted); margin: 0 0 16px; }
.eyebrow {
  margin: 0;
  color: var(--amber) !important;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.sym { color: var(--amber); }
.small { font-size: 13px; }
.ticks, .rules { margin: 0 0 22px; padding: 0; list-style: none; }
#panel h3 { margin: 20px 0 8px; color: var(--amber); font: 400 22px/1 var(--display); letter-spacing: 0.04em; }
#panel code { padding: 1px 5px; border-radius: 4px; background: rgba(243, 227, 195, 0.1); font-size: 0.9em; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin: 4px 0 16px; }
.stat { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: rgba(232, 163, 61, 0.06); }
.stat b { color: var(--ink); font: 400 32px/1 var(--display); letter-spacing: 0.02em; }
.stat b.up { color: #6fd08a; }
.stat b.down { color: #ff7a6a; }
.stat span { color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.stat small { color: var(--muted); font-size: 11.5px; }
.tagline { margin: 0 0 16px; padding: 12px 16px; border-left: 3px solid var(--amber); background: rgba(232, 163, 61, 0.07); font: italic 700 20px/1.3 "Playfair Display", Georgia, serif; }
.tagline cite { display: block; margin-top: 4px; color: var(--muted); font: 500 12px var(--sans); }
.rows { margin: 0 0 16px; padding: 0; list-style: none; }
.rows li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid rgba(243, 227, 195, 0.08); }
.rows li > span { display: flex; flex-direction: column; }
.rows small, .books small { color: var(--muted); font-size: 12.5px; }
.rows a { color: var(--amber); }
.rows em { color: var(--amber); font: 400 24px/1 var(--display); font-style: normal; }
.books { margin: 0 0 16px; padding: 0; list-style: none; }
.books li { display: grid; grid-template-columns: 52px 1fr; gap: 10px; padding: 8px 0; border-bottom: 1px solid rgba(243, 227, 195, 0.08); }
.books .yr { color: var(--amber); font: 400 22px/1.2 var(--display); }
.books b, .rows b { font-weight: 600; }
.books li > span { display: flex; flex-direction: column; }
.cards { display: grid; gap: 8px; margin: 0 0 16px; padding: 0; list-style: none; }
.cards li { display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; align-items: center; column-gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; }
.cards li b { grid-column: 1; }
.cards li span { grid-column: 1; color: var(--muted); font-size: 13px; }
.cards li .btn { grid-column: 2; grid-row: 1 / 3; margin: 0; }
.btn.small { min-height: 0; padding: 7px 12px; margin: 0; font-size: 13px; }
.yt { position: relative; aspect-ratio: 16 / 9; margin: 0 0 14px; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: #000; }
.yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.yt-load {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  border: 0;
  background: radial-gradient(circle at 50% 45%, #3d220d, #050302 75%);
  color: var(--ink);
  cursor: pointer;
}
.yt-play { width: 64px; height: 64px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 30px rgba(232, 163, 61, 0.5); clip-path: circle(50%); position: relative; }
.yt-play::after { content: ""; position: absolute; left: 25px; top: 19px; border-left: 20px solid #1a0f06; border-top: 13px solid transparent; border-bottom: 13px solid transparent; }
.yt-label { font: 400 24px/1 var(--display); letter-spacing: 0.04em; }
.yt-load small { color: var(--muted); font-size: 12px; }
.yt-load:hover .yt-play { background: var(--amber-hi); }
.tapes { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; margin: 0 0 14px; }
.tape { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-left: 6px solid #3a2410; border-radius: 6px; background: #120b06; text-align: left; cursor: pointer; }
.tape b { font-weight: 600; font-size: 13.5px; }
.tape span { color: var(--muted); font-size: 12px; }
.tape:hover, .tape.on { border-color: var(--amber); }
.tape.on { border-left-color: var(--amber); background: rgba(232, 163, 61, 0.1); }
.tokhead { display: flex; align-items: center; gap: 14px; margin: 0 0 14px; }
.tokhead img { flex: none; border-radius: 50%; box-shadow: 0 0 24px rgba(232, 163, 61, 0.35); }
.tokhead p { margin: 0 !important; }
.chart:empty { display: none; }
.chart { margin: 0 0 14px; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; }
.chart iframe { display: block; width: 100%; height: 340px; border: 0; }
.src { margin: 18px 0 0 !important; padding-top: 12px; border-top: 1px solid rgba(243, 227, 195, 0.1); font-size: 12px; }
.src a { color: var(--amber); }
.live-status { margin: 0 0 12px !important; }
.ticks li, .rules li { position: relative; padding: 7px 0 7px 26px; border-bottom: 1px solid rgba(243, 227, 195, 0.08); }
.ticks li::before { content: "—"; position: absolute; left: 0; color: var(--amber); }
.rules { counter-reset: r; }
.rules li { counter-increment: r; padding-left: 34px; }
.rules li::before {
  content: counter(r);
  position: absolute;
  left: 0;
  top: 5px;
  font: 400 24px/1 var(--display);
  color: var(--amber);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 18px;
  margin: 0 8px 10px 0;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.btn:hover { border-color: var(--amber); }
.btn.primary { background: var(--amber); border-color: var(--amber); color: #1a0f06; }
.btn.primary:hover { background: var(--amber-hi); }
.btn.is-disabled { opacity: 0.45; cursor: default; }
.row { display: flex; flex-wrap: wrap; margin-top: 4px; }

.facts { margin: 0 0 16px; }
.facts div { display: grid; grid-template-columns: 90px 1fr; gap: 10px; padding: 9px 0; border-bottom: 1px solid rgba(243, 227, 195, 0.08); }
.facts dt { color: var(--muted); font-size: 13px; }
.facts dd { margin: 0; font-weight: 600; }
.mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 13px; word-break: break-all; }
.disclaimer {
  margin-top: 18px !important;
  padding-top: 14px;
  border-top: 1px solid rgba(243, 227, 195, 0.1);
  font-size: 12.5px;
}

/* ---------------------------------------------------------------- Critical Drinker OS 98 (el PC del monitor) */

.pc {
  --bevel-out: inset -1px -1px #0a0a0a, inset 1px 1px #dfdfdf, inset -2px -2px #808080, inset 2px 2px #fff;
  --bevel-btn: inset -1px -1px #0a0a0a, inset 1px 1px #fff, inset -2px -2px #808080, inset 2px 2px #dfdfdf;
  --bevel-press: inset 1px 1px #0a0a0a, inset -1px -1px #fff, inset 2px 2px #808080, inset -2px -2px #dfdfdf;
  --bevel-in: inset 1px 1px #808080, inset -1px -1px #fff, inset 2px 2px #0a0a0a, inset -2px -2px #dfdfdf;
  --navy: #000080;
  position: fixed;
  left: 0;
  top: 0;
  z-index: 6;
  width: 1024px;
  height: 576px;
  transform-origin: 0 0;
  overflow: hidden;
  background: #000;
  color: #000;
  font: 13px/1.35 Tahoma, Verdana, "Segoe UI", sans-serif;
  user-select: none;
  -webkit-user-select: none;
}
.pc.full { width: 100vw; height: 100dvh; transform: none !important; }
.pc button { font: inherit; color: inherit; }
.pc svg { display: block; }

.pc-desk { position: absolute; inset: 0 0 40px 0; overflow: hidden; }
.pc-wall {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 62% 45%, #3d220d, #0a0604 75%);
}
.pc-wall[data-wall="neon"] { background: radial-gradient(circle at 60% 40%, #4a1405, #120404 70%); }
.pc-wall[data-wall="teal"] { background: #008080; }
.pc-logo {
  margin-left: 18%;
  text-align: center;
  font-family: var(--display);
  line-height: 0.85;
  text-transform: uppercase;
  pointer-events: none;
}
.pc-logo span { display: block; color: var(--amber); font-size: 46px; letter-spacing: 0.04em; }
.pc-logo b { display: block; color: #f3e3c3; font-size: 150px; font-weight: 400; }
.pc-logo i { display: block; margin-top: 12px; color: rgba(243, 227, 195, 0.7); font: 600 20px var(--sans); text-transform: none; }
.pc-wall[data-wall="neon"] .pc-logo b { color: #ffc28a; text-shadow: 0 0 16px #ff6a10, 0 0 40px #ff6a10; }
.pc-wall[data-wall="teal"] .pc-logo span, .pc-wall[data-wall="teal"] .pc-logo b { color: #fff; text-shadow: 3px 3px 0 #004848; }
.pc-wall[data-wall="teal"] .pc-logo i { color: #e0ffff; }
.pc-desk.flash .pc-wall { animation: pc-flash 0.25s; }
@keyframes pc-flash { 50% { filter: brightness(1.7); } }

.pc-icons { position: absolute; inset: 0; pointer-events: none; }
.pc-icon {
  position: absolute;
  pointer-events: auto;
  touch-action: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  width: 92px;
  padding: 4px 2px;
  border: 0;
  background: none;
  color: #fff !important;
  cursor: pointer;
}
.pc-icon svg { width: 36px; height: 36px; }
.pc-icon span { padding: 1px 3px; font-size: 12px; text-align: center; text-shadow: 1px 1px 1px #000; }
.pc-icon:focus-visible { outline: none; }
.pc-icon.sel span, .pc-icon:focus-visible span { background: var(--navy); outline: 1px dotted #fff; text-shadow: none; }
.pc-icon.sel svg { filter: brightness(0.75) sepia(0.4) hue-rotate(190deg); }

.pc-windows { position: absolute; inset: 0; pointer-events: none; }
.pc-windows > * { pointer-events: auto; }

/* ventanas */
.pc .win {
  position: absolute;
  display: flex;
  flex-direction: column;
  min-width: 200px;
  padding: 3px;
  background: #c0c0c0;
  box-shadow: var(--bevel-out), 4px 6px 16px rgba(0, 0, 0, 0.45);
}
.pc .win.opening { animation: win-open 0.18s ease-out; }
@keyframes win-open {
  from { opacity: 0; clip-path: inset(40% 40% 40% 40%); }
  to { opacity: 1; clip-path: inset(0 0 0 0); }
}
.pc .win.max, .pc.full .win { left: 0 !important; top: 0 !important; width: 100% !important; height: 100% !important; }
.win-title {
  flex: none;
  display: flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 3px 0 4px;
  background: linear-gradient(90deg, #808080, #b5b5b5);
  color: #d4d0c8;
  font-weight: 700;
  cursor: default;
  touch-action: none;
}
.win.active .win-title { background: linear-gradient(90deg, var(--navy), #1084d0); color: #fff; }
.win-title h2 { flex: 1; margin: 0; overflow: hidden; font: inherit; white-space: nowrap; text-overflow: ellipsis; }
.win-icon svg { width: 16px; height: 16px; }
.win-ctrls { display: flex; gap: 2px; }
.win-ctrls button {
  position: relative;
  width: 18px;
  height: 16px;
  padding: 0;
  border: 0;
  background: #c0c0c0;
  color: #000 !important;
  box-shadow: var(--bevel-btn);
  cursor: pointer;
}
.win-ctrls [data-act="close"] { margin-left: 2px; }
.win-ctrls button:active, .w98btn:active:not(:disabled):not([aria-disabled]) { box-shadow: var(--bevel-press); }
.g-min { position: absolute; left: 4px; bottom: 4px; width: 7px; height: 2px; background: #000; }
.g-max { position: absolute; left: 4px; top: 3px; width: 9px; height: 8px; border: 1px solid #000; border-top-width: 2px; }
.g-close { position: absolute; inset: 0; font: 700 13px/15px Tahoma, sans-serif; font-style: normal; text-align: center; }
.win-menu { position: relative; flex: none; display: flex; padding: 1px 2px; }
.win-menu > button { padding: 2px 8px; border: 0; background: none; cursor: pointer; }
.win-menu > button.down, .win-menu > button:focus-visible { background: var(--navy); color: #fff !important; outline: none; }
.menu-drop, .pc-ctx {
  position: absolute;
  z-index: 100001;
  display: flex;
  flex-direction: column;
  min-width: 180px;
  padding: 3px;
  background: #c0c0c0;
  box-shadow: var(--bevel-out), 2px 2px 0 rgba(0, 0, 0, 0.3);
}
.menu-drop { top: 100%; }
.menu-drop[hidden], .pc-ctx[hidden], .pc-start-menu[hidden], .pc-overlay[hidden] { display: none; }
.menu-drop button, .pc-ctx button { padding: 4px 22px; border: 0; background: none; text-align: left; cursor: pointer; }
.menu-drop button:hover:not(:disabled), .menu-drop button:focus-visible,
.pc-ctx button:hover, .pc-ctx button:focus-visible { background: var(--navy); color: #fff !important; outline: none; }
.menu-drop button:disabled { color: #808080 !important; text-shadow: 1px 1px #fff; cursor: default; }
.menu-drop hr, .pc-start-items hr { margin: 3px 2px; border: 0; border-top: 1px solid #808080; border-bottom: 1px solid #fff; }
.win-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  margin: 1px 2px;
  padding: 12px 14px;
  box-shadow: inset 1px 1px #808080, inset -1px -1px #fff;
  user-select: text;
  -webkit-user-select: text;
}
.win-body.flush { padding: 0; }
.win-status { flex: none; display: flex; gap: 3px; margin-top: 3px; }
.win-status span { min-height: 20px; padding: 2px 8px; box-shadow: inset 1px 1px #808080, inset -1px -1px #fff; }
.win-status span:first-child { flex: 1; }
.win-status span:empty { display: none; }

/* barra de tareas, Inicio, bandeja */
.pc-taskbar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 40px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  background: #c0c0c0;
  box-shadow: inset 0 2px #fff;
}
.pc-start, .pc-task {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  border: 0;
  background: #c0c0c0;
  box-shadow: var(--bevel-btn);
  cursor: pointer;
}
.pc-start { padding: 0 10px 0 6px; font-weight: 700 !important; font-size: 15px !important; }
.pc-start svg { width: 22px; height: 22px; }
.pc-start.down, .pc-task.down { box-shadow: var(--bevel-press); }
.pc-tasks { flex: 1; min-width: 0; display: flex; gap: 4px; overflow: hidden; }
.pc-task { flex: 0 1 170px; min-width: 44px; padding: 0 8px; }
.pc-task.down { background: repeating-conic-gradient(#c0c0c0 0 25%, #dcdcdc 0 50%) 0 0 / 2px 2px; font-weight: 700; }
.pc-task svg { flex: none; width: 16px; height: 16px; }
.pc-task span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.pc-tray { display: flex; align-items: center; gap: 4px; height: 32px; padding: 0 4px; box-shadow: inset 1px 1px #808080, inset -1px -1px #fff; }
.pc-tray-btn { width: 26px; height: 26px; padding: 3px; border: 0; background: none; cursor: pointer; }
.pc-tray-btn svg { width: 20px; height: 20px; }
.pc-clock { min-width: 44px; text-align: center; }
.pc button:focus-visible { outline: 1px dotted #000; outline-offset: -4px; }

.pc-start-menu {
  position: absolute;
  left: 2px;
  bottom: 0;
  z-index: 100000;
  display: flex;
  width: 260px;
  padding: 3px;
  background: #c0c0c0;
  box-shadow: var(--bevel-out), 3px 3px 0 rgba(0, 0, 0, 0.3);
}
.pc-start-band {
  width: 30px;
  padding: 10px 0;
  background: linear-gradient(0deg, var(--navy), #1084d0);
  color: #c0c0c0;
  font: 400 22px/30px var(--display);
  letter-spacing: 0.05em;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}
.pc-start-band b { color: #fff; font-weight: 400; }
.pc-start-items { flex: 1; display: flex; flex-direction: column; }
.pc-start-items button, .pc-sub button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 5px 10px; border: 0; background: none; text-align: left; cursor: pointer; }
.pc-mi { position: relative; }
.pc-mi .arrow { margin-left: auto; font-style: normal; }
.pc-sub {
  position: absolute;
  left: calc(100% - 4px);
  bottom: -3px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  min-width: 220px;
  padding: 3px;
  background: #c0c0c0;
  box-shadow: var(--bevel-out), 3px 3px 0 rgba(0, 0, 0, 0.3);
}
.pc-sub[hidden] { display: none; }
.pc-sub svg { width: 20px !important; height: 20px !important; }
.pc-sub button:hover, .pc-sub button:focus-visible { background: var(--navy); color: #fff !important; outline: none; }
.pc-mi:has(> .pc-sub:not([hidden])) > button { background: var(--navy); color: #fff !important; }
.pc.full .pc-sub { left: 24px; bottom: auto; top: 100%; }
.pc-start-items svg { width: 26px; height: 26px; }
.pc-start-items button:hover, .pc-start-items button:focus-visible { background: var(--navy); color: #fff !important; outline: none; }

.pc-overlay { position: absolute; inset: 0; z-index: 100002; display: grid; place-items: center; background: #000; }
.pc-boot { display: grid; justify-items: center; gap: 8px; color: #f3e3c3; font-family: var(--display); text-transform: uppercase; }
.pc-boot b { font-size: 72px; font-weight: 400; line-height: 0.9; color: var(--amber); }
.pc-boot span { font-size: 24px; letter-spacing: 0.1em; }
.pc-boot-bar { width: 260px; height: 14px; margin-top: 14px; padding: 2px; border: 1px solid #555; }
.pc-boot-bar i { display: block; height: 100%; background: repeating-linear-gradient(90deg, var(--amber) 0 14px, transparent 14px 18px); animation: boot 1s steps(14) forwards; }
@keyframes boot { from { width: 0; } to { width: 100%; } }
.pc-off { padding: 20px; color: #ff8c1a; font: 400 44px/1.1 var(--display); text-align: center; text-transform: uppercase; }

/* controles comunes */
.w98btns { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.w98btns:last-child { margin-bottom: 0; }
.w98btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 90px;
  min-height: 28px;
  padding: 4px 12px;
  border: 0;
  background: #c0c0c0;
  color: #000 !important;
  font: inherit;
  text-decoration: none;
  box-shadow: var(--bevel-btn);
  cursor: pointer;
}
.w98btn:disabled, .w98btn[aria-disabled="true"] { color: #808080 !important; text-shadow: 1px 1px #fff; cursor: default; }
.w98group {
  margin: 0 0 10px;
  padding: 6px 12px 10px;
  border: 0;
  box-shadow: inset -1px -1px #fff, inset 1px 1px #808080, inset -2px -2px #808080, inset 2px 2px #fff;
}
.w98group legend { padding: 0 4px; }
.w98group dl { display: grid; gap: 6px; margin: 0; }
.w98group dl div { display: grid; grid-template-columns: 82px 1fr; align-items: center; gap: 8px; }
.w98group dd { margin: 0; font-weight: 700; }
.w98field, .w98input { padding: 3px 6px; border: 0; background: #fff; box-shadow: var(--bevel-in); }
.w98field { font: 12px/1.3 "Lucida Console", Consolas, monospace !important; word-break: break-all; }
.w98input { font: inherit; color: #000; outline: none; }
.sunken { background: #fff; box-shadow: var(--bevel-in); }
.chk { display: flex; align-items: center; gap: 6px; padding: 2px 0; cursor: pointer; }
.chk small { margin-left: auto; padding-left: 8px; color: #555; }
.kicker { margin: 0 0 4px; color: var(--navy); font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.note { margin: 0; color: #333; font-size: 11.5px; }

/* CD Token */
.tok { display: flex; gap: 18px; align-items: flex-start; }
.tok-coin {
  flex: none;
  display: grid;
  place-items: center;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle at 50% 45%, #3d220d, #0a0604 70%);
  box-shadow: var(--bevel-in);
  perspective: 500px;
}
.tok-coin img { width: 120px; height: 120px; border-radius: 50%; animation: coin-spin 5s linear infinite; }
@keyframes coin-spin { to { transform: rotateY(360deg); } }
.tok-main { flex: 1; min-width: 0; }
.tok-main h3 { margin: 0 0 10px; font: 700 24px/1.15 Tahoma, Verdana, sans-serif; }
.tok-main h3 span { color: var(--navy); }

/* Review-O-Matic */
.rev { display: flex; flex-direction: column; gap: 10px; }
.rev-film { display: flex; align-items: center; gap: 8px; }
.rev-film input { flex: 1; }
.rev-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rev-cols .w98group { margin: 0; }
.rev-out { display: flex; align-items: center; gap: 16px; padding: 8px 14px; }
.rev-score { color: var(--navy); font: 400 56px/1 var(--display); }
.rev-score span { color: #666; font-size: 26px; }
.rev-text p { margin: 0 0 2px; }
.rev-verdict { font-size: 15px; font-weight: 700; }
.rev-glasses { display: flex; gap: 5px; margin-top: 6px; }
.rev-glasses i { width: 14px; height: 16px; border: 2px solid #333; border-top: 0; background: linear-gradient(transparent 35%, #d88a2c 35%); }

/* Critic Bingo */
.bingo-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin: 6px 0 10px; }
.bingo-cell {
  min-height: 66px;
  padding: 4px;
  border: 0;
  background: #fff;
  font-size: 12px !important;
  line-height: 1.2;
  box-shadow: var(--bevel-in);
  cursor: pointer;
}
.bingo-cell.on { background: #ffe39a; font-weight: 700; }
.bingo-cell.line { background: var(--amber); }

/* Notepad */
.notepad {
  display: block;
  width: 100%;
  height: 100%;
  padding: 6px 8px;
  border: 0;
  background: #fff;
  color: #000;
  font: 14px/1.4 "Lucida Console", Consolas, monospace;
  resize: none;
  outline: none;
  box-shadow: var(--bevel-in);
}

/* My Bar */
.meter { height: 22px; padding: 3px; }
.meter span { display: block; height: 100%; background: repeating-linear-gradient(90deg, var(--navy) 0 12px, transparent 12px 14px); transition: width 0.3s; }
.barcp-level { margin: 6px 0 8px; }
.barcp-quote { margin: 0 0 8px; font-style: italic; }

/* CD Media Player (YouTube) */
.mp2 { display: flex; flex-direction: column; gap: 8px; height: 100%; }
.mp2-pick { display: flex; align-items: center; gap: 8px; }
.mp2-pick select { flex: 1; }
.mp2-screen { position: relative; flex: 1; min-height: 160px; background: #000; }
.mp2-screen iframe { position: absolute; inset: 2px; width: calc(100% - 4px); height: calc(100% - 4px); border: 0; }
.mp2-idle {
  position: absolute;
  inset: 2px;
  display: grid;
  place-items: center;
  align-content: center;
  background: radial-gradient(circle at 50% 40%, #3d220d, #050302 75%);
  color: #f3e3c3;
  font-family: var(--display);
  line-height: 0.9;
  text-align: center;
  text-transform: uppercase;
}
.mp2-idle span { color: var(--amber); font-size: 20px; letter-spacing: 0.1em; }
.mp2-idle b { font-size: 60px; font-weight: 400; }
.mp2-idle i { margin-top: 8px; color: rgba(243, 227, 195, 0.75); font: 12px Tahoma, sans-serif; text-transform: none; }

/* My Computer */
.ex { display: flex; flex-direction: column; height: 100%; }
.ex-bar { display: flex; align-items: center; gap: 6px; padding: 6px; }
.ex-nav { min-width: 0; }
.ex-addr { flex: 1; display: flex; align-items: center; gap: 6px; min-width: 0; }
.ex-path { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ex-view { flex: 1; overflow: auto; margin: 0 6px 6px; padding: 8px; display: flex; flex-wrap: wrap; align-content: flex-start; gap: 4px; }
.ex-item { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 92px; padding: 4px; border: 0; background: none; text-align: center; cursor: pointer; }
.ex-item svg { width: 34px; height: 34px; }
.ex-item span { padding: 1px 2px; font-size: 12px; word-break: break-word; }
.ex-item.sel span { background: var(--navy); color: #fff; outline: 1px dotted #000; }
.ex-view.list { flex-direction: column; flex-wrap: nowrap; gap: 0; }
.ex-view.list .ex-item { flex-direction: row; width: 100%; gap: 8px; padding: 2px 4px; text-align: left; }
.ex-view.list .ex-item svg { width: 18px; height: 18px; }

/* Internet Explorer */
.ie { display: flex; flex-direction: column; height: 100%; }
.ie-bar { display: flex; align-items: center; gap: 6px; padding: 6px; }
.ie-bar label { flex: 1; display: flex; align-items: center; gap: 6px; }
.ie-bar input { flex: 1; min-width: 0; }
.ie-page { flex: 1; overflow: auto; margin: 0 6px 6px; padding: 14px 18px; color: #000; font: 15px/1.4 "Times New Roman", Times, serif; }
.ie-page h3 { margin: 0 0 8px; color: #800000; font-size: 24px; text-align: center; }
.ie-page h4 { margin: 10px 0 4px; font-size: 16px; }
.ie-page ul { margin: 0; padding-left: 20px; }
.ie-page a { color: #0000ee; }
.ie-page a:visited { color: #551a8b; }
.ie-marquee { overflow: hidden; margin: 0 0 8px; padding: 3px 0; background: #ffffcc; border: 1px solid #ccc; white-space: nowrap; }
.ie-marquee span { display: inline-block; padding-left: 100%; animation: marquee 14s linear infinite; }
@keyframes marquee { to { transform: translateX(-100%); } }
.ie-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ie-foot { margin: 14px 0 0; color: #666; font-size: 12px; text-align: center; }
.pc.full .ie-cols { grid-template-columns: 1fr; }

/* Display Properties */
.disp { display: flex; flex-direction: column; gap: 10px; }
.disp-mon { position: relative; width: 190px; height: 120px; margin: 0 auto; padding: 10px; background: #d8d0b8; box-shadow: var(--bevel-out); }
.disp-mon .disp-screen { inset: 10px; }
.disp-list { width: 100%; }
.disp-btns { justify-content: flex-end; }

/* bordes para redimensionar ventanas */
.rz { position: absolute; z-index: 2; }
.rz-n, .rz-s { left: 6px; right: 6px; height: 6px; cursor: ns-resize; }
.rz-e, .rz-w { top: 6px; bottom: 6px; width: 6px; cursor: ew-resize; }
.rz-n { top: -3px; } .rz-s { bottom: -3px; } .rz-e { right: -3px; } .rz-w { left: -3px; }
.rz-ne, .rz-nw, .rz-se, .rz-sw { width: 12px; height: 12px; }
.rz-ne { top: -3px; right: -3px; cursor: nesw-resize; }
.rz-sw { bottom: -3px; left: -3px; cursor: nesw-resize; }
.rz-nw { top: -3px; left: -3px; cursor: nwse-resize; }
.rz-se { bottom: -3px; right: -3px; cursor: nwse-resize; }
.win.max .rz, .pc.full .rz { display: none; }

/* recuadro de selección del escritorio */
.pc-band { position: absolute; z-index: 1; border: 1px dotted #fff; background: rgba(0, 0, 128, 0.2); pointer-events: none; }
.pc-band[hidden] { display: none; }
.pc-wall[data-wall="plain"] { background: #000; }
.pc-wall[data-wall="plain"] .pc-logo { display: none; }

/* Recycle Bin */
.bin { display: flex; flex-direction: column; gap: 8px; height: 100%; padding: 8px; }
.bin-list { flex: 1; overflow: auto; }
.bin-head, .bin-row { display: grid; grid-template-columns: 1fr 90px; gap: 8px; width: 100%; padding: 3px 8px; border: 0; background: none; text-align: left; }
.bin-head { background: #c0c0c0; font-weight: 700; box-shadow: var(--bevel-btn); }
.bin-row { cursor: pointer; }
.bin-row.sel { background: var(--navy); color: #fff !important; }
.bin-empty { margin: 0; padding: 20px; color: #555; }

/* diálogos y Acerca de */
.dlg { display: flex; align-items: flex-start; gap: 14px; }
.dlg svg { flex: none; width: 34px; height: 34px; }
.dlg p { margin: 0; }
.dlg-btns { display: flex; justify-content: center; margin-top: 16px; }
.about p { margin: 0 0 8px; }
.about-logo { color: #000; font: 400 36px/1 var(--display) !important; text-transform: uppercase; }
.about-logo span { display: block; color: var(--navy); font-size: 20px; }
.about-logo em { color: #808080; font-size: 22px; font-style: normal; }

/* pantalla completa (móvil) */
.pc.full .pc-icons { inset: 6px 6px auto 6px; display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; pointer-events: auto; }
.pc.full .pc-icon { position: static; width: 84px; }
.pc.full .pc-logo { margin: 0; padding-top: 30vh; }
.pc.full .pc-logo span { font-size: 26px; }
.pc.full .pc-logo b { font-size: 84px; }
.pc.full .pc-logo i { font-size: 14px; }
.pc.full .pc-task span { display: none; }
.pc.full .pc-task { flex: 0 0 44px; justify-content: center; padding: 0; }
.pc.full .tok, .pc.full .rev-cols { display: flex; flex-direction: column; }
.pc.full .tok-coin { width: auto; height: 120px; }
.pc.full .tok-coin img { width: 100px; height: 100px; }
.pc.full .bingo-cell { min-height: 58px; font-size: 11px !important; }
.pc.full .win-body { padding: 10px; }

.pc-mode .dot { pointer-events: none; }
.pc-mode #dots, .pc-mode .hint { opacity: 0 !important; }

/* ---------------------------------------------------------------- avisos y pie */

#toast {
  position: fixed;
  z-index: 20;
  left: 50%;
  bottom: 64px;
  max-width: min(560px, calc(100vw - 32px));
  padding: 12px 20px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-weight: 600;
  text-align: center;
  opacity: 0;
  transform: translate(-50%, 12px);
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }

.hint, .fanmade {
  position: fixed;
  bottom: max(14px, env(safe-area-inset-bottom));
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.8s 1.2s;
}
.ready .hint, .ready .fanmade { opacity: 1; }
.hint { left: var(--gutter); }
.fanmade { right: var(--gutter); }

/* ---------------------------------------------------------------- pantalla de carga */

#loader {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: radial-gradient(circle at 50% 45%, #1d120a, var(--bg) 65%);
  transition: opacity 0.9s, visibility 0.9s;
  --p: 0;
}
#loader.done { opacity: 0; visibility: hidden; }
.glass {
  position: relative;
  width: 76px;
  height: 88px;
  border: 3px solid var(--ink);
  border-top: none;
  border-radius: 4px 4px 12px 12px;
  clip-path: polygon(0 0, 100% 0, 92% 100%, 8% 100%);
  overflow: hidden;
}
.fill {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(var(--p) * 92%);
  background: linear-gradient(#ffb347, #b8601a);
  transition: height 0.3s;
}
.loader-title {
  margin: 8px 0 0;
  font: 400 34px/1 var(--display);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-shadow: 0 0 18px rgba(255, 122, 26, 0.5);
}
#loader-text { margin: 0; color: var(--muted); font-size: 14px; }

/* ---------------------------------------------------------------- móvil */

@media (max-width: 860px) {
  .bar { flex-direction: column; align-items: flex-start; gap: 10px; }
  .brand { flex-direction: row; align-items: baseline; gap: 8px; }
  .brand-small { font-size: 14px; letter-spacing: 0.2em; }
  .brand-big { font-size: 30px; }
  .bar { right: 0; }
  .nav { justify-content: flex-start; flex-wrap: nowrap; max-width: 100%; overflow-x: auto; padding-right: 16px; scrollbar-width: none; }
  .nav button { flex: none; padding: 7px 12px; font-size: 13px; }
  .has-panel .fanmade { display: none; }
  #sound span { display: none; }

  #panel {
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-height: 78vh;
    border-radius: 18px 18px 0 0;
    padding: 26px 20px calc(20px + env(safe-area-inset-bottom));
    transform: translateY(40px);
  }
  #panel h2 { font-size: 36px; }
  .hint { display: none; }
  #toast { bottom: 48px; }
}


@media (prefers-reduced-motion: reduce) {
  .dot::after, .tok-coin img, .ie-marquee span, .pc-boot-bar i { animation: none; }
  .ie-marquee span { padding-left: 0; }
  * { transition-duration: 0.01s !important; }
}
