:root {
  --teal: #008080;
  --teal-deep: #005f66;
  --win-bg: #c0c0c0;
  --win-light: #ffffff;
  --win-hi: #dfdfdf;
  --win-shadow: #808080;
  --win-dark: #000000;
  --navy: #000080;
  --navy-end: #1084d0;
  --ink: #111111;
  --link: #0000cc;
  --link-hover: #ff0066;
  --paper: #fffef6;
  --gold: #ffee00;
  --spring: cubic-bezier(0.22, 1.28, 0.36, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --font-ui: "MS Sans Serif", "Tahoma", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: "Courier New", ui-monospace, Menlo, monospace;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: var(--font-ui);
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink);
  background: var(--teal);
  -webkit-font-smoothing: antialiased;
}

.skip-link {
  position: fixed;
  top: -100px;
  left: 12px;
  z-index: 99999;
  padding: 8px 14px;
  background: var(--gold);
  color: #000;
  font-weight: 700;
  border: 2px solid #000;
}
.skip-link:focus { top: 12px; }

[hidden] { display: none !important; }

/* Silent Windose 98 boot: hold 1200ms, dissolve 200ms. */
.intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #101324;
  background: linear-gradient(#5a8fcb 0%, #94b8dd 36%, #d9e6ee 75%, #f3f4f0 100%);
  transition: opacity 200ms ease-out;
}
.intro-overlay.is-leaving { opacity: 0; pointer-events: none; }
.boot-clouds {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 35% 10% at 13% 17%, #fff9 5%, #fff4 55%, transparent 75%),
    radial-gradient(ellipse 32% 9% at 42% 23%, #fffb 8%, #fff5 50%, transparent 78%),
    radial-gradient(ellipse 48% 13% at 90% 49%, #fffd 6%, #fff6 48%, transparent 75%),
    radial-gradient(ellipse 40% 8% at 8% 63%, #fffa 10%, #fff4 54%, transparent 78%),
    radial-gradient(ellipse 55% 9% at 47% 86%, #fffb 6%, #fff5 54%, transparent 78%);
}
.intro-core { position: relative; width: min(590px, 88vw); margin-top: -5vh; }
.boot-flag { display: block; width: 58%; margin: 0 auto -22px; filter: drop-shadow(2px 4px 0 #fff3); }
.boot-wordmark { width: fit-content; margin: auto; font-family: Arial, Helvetica, sans-serif; }
.boot-maker { margin: 0 0 -10px 6px; font-size: clamp(20px, 3.6vw, 32px); font-weight: 400; letter-spacing: -0.5px; color: #162238; }
.boot-maker sup { font-size: 0.45em; vertical-align: super; }
.boot-name { margin: 0; font-size: clamp(48px, 8.2vw, 90px); font-weight: 900; letter-spacing: -4px; line-height: 1.15; color: #0b0e18; }
.boot-name span { font-weight: 800; font-style: italic; color: #ff5500; padding-left: 8px; letter-spacing: -3px; text-shadow: 2px 2px 0 rgba(255, 255, 255, 0.7); }
.boot-copy { position: absolute; right: 20px; bottom: 26px; font: 11px Arial, Helvetica, sans-serif; color: #2a4668; opacity: 0.85; }
.intro-bar { position: absolute; bottom: 0; left: 0; right: 0; height: 18px; overflow: hidden; border-top: 1px solid #f2ffff; background: #0c38b5; }
.intro-bar-fill { display: block; width: 200%; height: 100%; background: repeating-linear-gradient(90deg, #032a9a 0, #1265db 8%, #6bd4ef 16%, #f3ffff 23%, #176bc5 29%, #032a9a 33.333%); animation: bootScan 900ms linear infinite; }
@keyframes bootScan { to { transform: translateX(-33.333%); } }
@media (max-width: 600px) {
  .boot-flag { width: 76%; margin-bottom: -12px; }
  .boot-name { letter-spacing: -3px; }
  .boot-maker { margin-bottom: -4px; }
  .boot-copy { right: 12px; font-size: 10px; }
}

/* ========== Win98 真实桌面背景 ========== */
.desktop {
  position: relative;
  width: 100%;
  height: 100%;
  background-color: var(--teal);
  background-image:
    radial-gradient(circle at 18% 15%, rgba(0, 212, 212, 0.24), transparent 46%),
    radial-gradient(circle at 86% 82%, rgba(0, 48, 86, 0.38), transparent 52%),
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 28px 28px, 28px 28px;
  overflow: hidden;
}

.crt-scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 8000;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 0px,
    rgba(0, 0, 0, 0) 2px,
    rgba(0, 0, 0, 0.032) 3px
  );
  mix-blend-mode: multiply;
}

/* ========== 桌面左侧快捷图标列 ========== */
.desktop-icons {
  position: absolute;
  top: 14px;
  left: 12px;
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 82px;
}

.d-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px 4px;
  background: transparent;
  border: 1px dotted transparent;
  color: #ffffff;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: transform 160ms var(--spring);
}
.d-icon:hover {
  transform: translateY(-2px);
}
.d-icon:hover .d-icon-label,
.d-icon:focus-visible .d-icon-label {
  background: #000080;
  outline: 1px dotted #ffff00;
}
.d-icon:active {
  transform: scale(0.95);
}
.d-icon-pic {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  filter: drop-shadow(2px 2px 0 rgba(0, 0, 0, 0.45));
}
.d-icon-label {
  font-size: 11px;
  line-height: 1.25;
  padding: 1px 4px;
  text-shadow: 1px 1px 0 #000000;
  word-break: keep-all;
}

/* ========== Win98 经典 3D 凹凸斜边通用 ========== */
.win98-window {
  position: absolute;
  background: var(--win-bg);
  border-top: 2px solid var(--win-light);
  border-left: 2px solid var(--win-light);
  border-right: 2px solid var(--win-dark);
  border-bottom: 2px solid var(--win-dark);
  box-shadow:
    inset 1px 1px 0 var(--win-hi),
    inset -1px -1px 0 var(--win-shadow),
    6px 8px 0 rgba(0, 0, 0, 0.28),
    0 18px 42px rgba(0, 0, 0, 0.24);
  display: flex;
  flex-direction: column;
  transition: opacity 180ms var(--ease-out), transform 220ms var(--spring);
  will-change: transform, left, top;
}

.win98-window.is-minimized {
  visibility: hidden;
  opacity: 0;
  transform: translateY(40px) scale(0.86);
  pointer-events: none;
}

.win98-window.is-maximized {
  top: 8px !important;
  left: 8px !important;
  right: 8px !important;
  width: calc(100vw - 16px) !important;
  height: calc(100vh - 50px) !important;
}

/* 默认窗口定位（1440px 桌面黄金零重叠排布） */
#win-portal {
  top: 14px;
  left: 102px;
  width: min(942px, calc(100vw - 496px));
  min-width: 720px;
  height: calc(100vh - 64px);
  z-index: 20;
}

.win-paint {
  top: 42px;
  right: 14px;
  width: 364px;
  z-index: 24;
}

.win-readme {
  max-height: calc(100dvh - 162px);
  top: 110px;
  left: 220px;
  width: min(440px, calc(100vw - 32px));
  z-index: 30;
}

/* 标题栏 */
.win98-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 3px 5px;
  margin: 2px 2px 0;
  background: linear-gradient(90deg, #7f7f7f, #b0b0b0);
  color: #e6e6e6;
  font-weight: 700;
  font-size: 12px;
  user-select: none;
  cursor: grab;
}
.win98-titlebar:active { cursor: grabbing; }
.win98-window.is-active .win98-titlebar {
  background: linear-gradient(90deg, var(--navy) 0%, var(--navy-end) 100%);
  color: #ffffff;
}
.win98-title-left {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.win98-title-left span:last-child {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.win98-controls {
  display: flex;
  gap: 2px;
  flex-shrink: 0;
}

.win-btn, .win98-btn {
  background: var(--win-bg);
  color: #000;
  border-top: 2px solid var(--win-light);
  border-left: 2px solid var(--win-light);
  border-right: 2px solid var(--win-dark);
  border-bottom: 2px solid var(--win-dark);
  box-shadow: inset -1px -1px 0 var(--win-shadow);
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
  line-height: 1;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: filter 120ms ease;
}
.win-btn {
  width: 19px;
  height: 18px;
  font-weight: 900;
  padding: 0;
}
.win98-btn {
  padding: 5px 10px;
  font-weight: 700;
  gap: 4px;
}
.win-btn:active, .win98-btn:active {
  border-top-color: var(--win-dark);
  border-left-color: var(--win-dark);
  border-right-color: var(--win-light);
  border-bottom-color: var(--win-light);
  box-shadow: inset 1px 1px 0 var(--win-shadow);
  transform: translate(1px, 1px);
}

/* ========== IE 5.0 顶部栏与地址栏 ========== */
.ie-menubar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 10px;
  border-bottom: 1px solid var(--win-shadow);
  font-size: 12px;
  flex-wrap: wrap;
}
.ie-home-pill {
  margin-left: auto;
  padding: 2px 10px;
  background: linear-gradient(90deg, #ff0066, #ff6600);
  color: #fff !important;
  font-weight: 800;
  text-decoration: none;
  border: 2px outset #ff99cc;
  box-shadow: 2px 2px 0 #000;
  transition: transform 160ms var(--spring), filter 160ms ease;
}
.ie-home-pill:hover {
  transform: translateY(-1px) scale(1.02);
  filter: brightness(1.1);
}

.ie-addressbar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-top: 1px solid var(--win-light);
  border-bottom: 1px solid var(--win-shadow);
}
.ie-addr-label {
  font-size: 12px;
  color: #222;
  white-space: nowrap;
}
.ie-addr-box {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  background: #ffffff;
  border-top: 2px solid var(--win-shadow);
  border-left: 2px solid var(--win-shadow);
  border-right: 2px solid var(--win-light);
  border-bottom: 2px solid var(--win-light);
  font-family: var(--font-mono);
  font-size: 12px;
  overflow: hidden;
}
.ie-addr-box code {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ie-go-btn {
  padding: 4px 10px;
  white-space: nowrap;
}
.ie-throbber {
  width: 26px;
  height: 24px;
  display: grid;
  place-items: center;
  background: #000044;
  color: #00ffff;
  font-size: 16px;
  border: 2px inset #808080;
  animation: spinSlow 6s linear infinite;
}
@keyframes spinSlow {
  to { transform: rotate(360deg); }
}

/* ========== 门户主滚动视口（2001 高密度大字报 + 炸鱼工艺） ========== */
.ie-viewport {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  margin: 4px 4px 0;
  background: #e8f0ff;
  border-top: 2px solid var(--win-shadow);
  border-left: 2px solid var(--win-shadow);
  border-right: 2px solid var(--win-light);
  border-bottom: 2px solid var(--win-light);
  scroll-behavior: smooth;
}

/* 爆炸式 2001 个人主页 Hero 横幅 */
.portal-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #09185c 0%, #1d2f99 42%, #720e75 78%, #cc1866 100%);
  color: #ffffff;
  border-bottom: 4px ridge #ffe600;
}

.hero-burst-bg {
  position: absolute;
  inset: -40%;
  background: repeating-conic-gradient(
    from 0deg,
    rgba(255, 240, 0, 0.14) 0deg 8deg,
    rgba(0, 255, 255, 0.04) 8deg 16deg
  );
  animation: burstRotate 42s linear infinite;
  pointer-events: none;
}
@keyframes burstRotate {
  to { transform: rotate(360deg); }
}

.hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 232px;
  gap: 18px;
  align-items: center;
  padding: 18px 20px 14px;
}

.hero-badges-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}
.blink-badge, .hot-badge, .ver-badge {
  display: inline-block;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
  border: 2px outset #ffffff;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.5);
}
.blink-badge {
  background: #ffee00;
  color: #cc0000;
  animation: badgePulse 1.4s steps(2, end) infinite;
}
@keyframes badgePulse {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.18); }
}
.hot-badge { background: #ff0055; color: #ffffff; }
.ver-badge { background: #00e5ff; color: #001b44; }

/* 真正有千禧年 WordArt 味 + 鼠标 3D 弹性倾角的标题 */
.wordart-box {
  perspective: 720px;
  margin: 4px 0 10px;
  max-width: 100%;
}
.wordart-3d {
  margin: 0;
  display: inline-block;
  transform: rotate(-3deg) skewX(-6deg);
  transform-style: preserve-3d;
  font-family: "Arial Black", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-weight: 900;
  font-size: clamp(32px, 4.4vw, 56px);
  line-height: 1.12;
  letter-spacing: -0.02em;
  transition: transform 140ms ease-out;
  will-change: transform;
}
.wa-line {
  display: block;
  position: relative;
  color: transparent;
  background: linear-gradient(180deg, #fff94c 0%, #ffaa00 28%, #ff2277 56%, #00f0ff 82%, #ffffff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-stroke: 1.5px #ffffff;
  paint-order: stroke fill;
  filter: drop-shadow(3px 3px 0 #000066) drop-shadow(5px 5px 0 #ff0099);
}
.wa-line-2 {
  padding-left: 0.45em;
}

.hero-sub {
  margin: 0;
  max-width: 600px;
  padding: 8px 12px;
  background: rgba(0, 0, 48, 0.56);
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: inset 1px 1px 0 rgba(255, 255, 255, 0.2);
  font-size: 12.5px;
  line-height: 1.55;
  color: #f3f7ff;
}
.hero-sub a {
  color: #ffee00;
  font-weight: 800;
  text-decoration: underline;
}

/* 右侧高密度门户挂件 */
.hero-right {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.hit-counter-card {
  background: #c0c0c0;
  color: #000;
  padding: 8px 10px;
  text-align: center;
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-right: 2px solid #000;
  border-bottom: 2px solid #000;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.45);
}
.hc-title {
  font-size: 11px;
  font-weight: 900;
  color: #cc0000;
  margin-bottom: 4px;
}
.hc-label {
  font-size: 11px;
  margin-bottom: 4px;
}
.led-counter {
  display: inline-flex;
  gap: 2px;
  padding: 4px 6px;
  background: #080b08;
  border: 2px inset #808080;
  font-family: var(--font-mono);
  font-weight: 900;
  font-size: 16px;
  color: #39ff14;
  text-shadow: 0 0 8px rgba(57, 255, 20, 0.75);
}
.led-counter span {
  display: inline-block;
  width: 14px;
  text-align: center;
  background: #101d10;
  border: 1px solid #1e3b1e;
}
.hc-sub {
  margin-top: 5px;
  font-size: 10.5px;
  color: #333;
}

.fish-trophy {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  background: linear-gradient(135deg, #fff599, #ffd1ea);
  color: #1a0033;
  border: 2px outset #ffffff;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.4);
  transition: transform 240ms var(--spring);
}
.fish-trophy:hover {
  transform: rotate(-2deg) scale(1.03);
}
.fish-trophy img {
  width: 66px;
  height: auto;
  display: block;
  filter: drop-shadow(2px 2px 0 rgba(0, 0, 0, 0.3));
}
.fish-caption {
  font-size: 11px;
  line-height: 1.35;
}
.fish-caption b {
  color: #cc0055;
  font-size: 12px;
}

/* 经典跑马灯公告条 */
.marquee-bar {
  position: relative;
  z-index: 2;
  background: #000033;
  border-top: 2px solid #ffee00;
  color: #ffee00;
  font-weight: 700;
  font-size: 12px;
  padding: 5px 0;
  overflow: hidden;
  white-space: nowrap;
}
.marquee-track {
  display: inline-flex;
  gap: 48px;
  animation: marqueeScroll 24s linear infinite;
}
.marquee-bar:hover .marquee-track {
  animation-play-state: paused;
}
@keyframes marqueeScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ========== Win98 标签页 + 千禧年工具货架 ========== */
.portal-catalog {
  padding: 14px 16px 12px;
  background:
    linear-gradient(rgba(0, 0, 128, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 128, 0.03) 1px, transparent 1px),
    #dfe6f5;
  background-size: 16px 16px;
}

.catalog-topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.win98-tabs {
  display: flex;
  gap: 2px;
  position: relative;
  z-index: 2;
  margin-bottom: -2px;
}

.win98-tab {
  padding: 6px 13px;
  background: #b6bac4;
  color: #111;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  border-top: 2px solid var(--win-light);
  border-left: 2px solid var(--win-light);
  border-right: 2px solid var(--win-dark);
  border-bottom: 2px solid var(--win-shadow);
  border-radius: 3px 3px 0 0;
  transition: transform 140ms var(--spring), background 120ms ease;
}
.win98-tab:hover {
  background: #cfd3dc;
}
.win98-tab.is-active {
  background: var(--win-bg);
  color: #000080;
  padding-bottom: 8px;
  border-bottom-color: var(--win-bg);
  transform: translateY(-1px);
}

.catalog-quick-actions {
  display: flex;
  gap: 6px;
  padding-bottom: 6px;
}

.win98-tabpanel {
  background: var(--win-bg);
  padding: 14px;
  border-top: 2px solid var(--win-light);
  border-left: 2px solid var(--win-light);
  border-right: 2px solid var(--win-dark);
  border-bottom: 2px solid var(--win-dark);
  box-shadow: inset -1px -1px 0 var(--win-shadow);
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 256px), 1fr));
  gap: 10px;
}

/* 千禧年凸起工具卡片 */
.tool-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 10px;
  background: #f5f5ef;
  color: #111;
  text-decoration: none;
  border-top: 2px solid #ffffff;
  border-left: 2px solid #ffffff;
  border-right: 2px solid #000000;
  border-bottom: 2px solid #000000;
  box-shadow: inset -1px -1px 0 #808080, 2px 2px 0 rgba(0, 0, 0, 0.14);
  transition: transform 220ms var(--spring), box-shadow 220ms var(--ease-out), background 140ms ease;
}
.tool-card:hover {
  background: #ffffff;
  transform: translateY(-3px);
  box-shadow:
    inset -1px -1px 0 #808080,
    4px 6px 0 rgba(0, 0, 128, 0.28),
    0 0 0 1px #000080;
}
.tool-card:active {
  transform: translate(1px, 1px);
  border-top-color: #000;
  border-left-color: #000;
  border-right-color: #fff;
  border-bottom-color: #fff;
  box-shadow: inset 1px 1px 0 #808080;
}
.tool-card.is-hidden {
  display: none;
}

.tc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.tc-tag {
  font-size: 10.5px;
  font-weight: 800;
  padding: 1px 6px;
  border: 1px solid #000;
}
.tag-online { background: #fff066; color: #5c2800; }
.tag-eff { background: #a8f0ff; color: #002e5c; }
.tag-mc { background: #b8ff99; color: #0d4a00; }

.tc-badge-hot, .tc-badge-new {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 900;
  padding: 1px 5px;
}
.tc-badge-hot { background: #ff0044; color: #fff; }
.tc-badge-new { background: #000080; color: #00ffff; }

.tc-body {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.tc-icon {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  font-size: 19px;
  font-weight: 900;
  color: #fff;
  text-shadow: 1px 1px 0 #000;
  background: linear-gradient(145deg, var(--ic), var(--ic2));
  border-top: 2px solid rgba(255, 255, 255, 0.85);
  border-left: 2px solid rgba(255, 255, 255, 0.85);
  border-right: 2px solid #000;
  border-bottom: 2px solid #000;
  transition: transform 240ms var(--spring);
}
.tool-card:hover .tc-icon {
  transform: rotate(-6deg) scale(1.08);
}

.tc-info h3 {
  margin: 0 0 3px;
  font-size: 13.5px;
  font-weight: 800;
  color: var(--link);
  text-decoration: underline;
}
.tool-card:hover .tc-info h3 {
  color: var(--link-hover);
}
.tc-info p {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.45;
  color: #2b2b2b;
}

.tc-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding-top: 6px;
  border-top: 1px dashed #a8a8a8;
  font-size: 11px;
}
.tc-foot code {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: #555;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tc-go {
  flex-shrink: 0;
  padding: 2px 7px;
  background: var(--win-bg);
  color: #000;
  font-weight: 800;
  border-top: 1px solid #fff;
  border-left: 1px solid #fff;
  border-right: 1px solid #000;
  border-bottom: 1px solid #000;
}
.tool-card:hover .tc-go {
  background: #000080;
  color: #ffee00;
}

/* ========== 88x31 像素复古徽章墙 ========== */
.portal-badges {
  padding: 12px 16px 18px;
  background: #cfd8ec;
  text-align: center;
}
.rainbow-hr {
  height: 4px;
  margin-bottom: 12px;
  background: linear-gradient(90deg, #ff0044, #ff9900, #ffee00, #00dd44, #00ccff, #6633ff, #ff00aa);
  border-top: 1px solid #000;
  border-bottom: 1px solid #fff;
}
.badge-wall {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-bottom: 10px;
}
.b88 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: 88px;
  height: 31px;
  flex-direction: column;
  gap: 0;
  line-height: 1.1;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 900;
  text-decoration: none;
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-right: 2px solid #000;
  border-bottom: 2px solid #000;
  box-shadow: 1px 1px 0 rgba(0, 0, 0, 0.35);
  transition: transform 160ms var(--spring);
}
.b88:hover { transform: translateY(-2px); }
.b88-main { background: #000080; color: #ffee00; }
.b88-cyan { background: #004466; color: #00ffff; }
.b88-gold { background: #ffcc00; color: #440000; }
.b88-pink { background: #cc0066; color: #ffffff; }
.b88-green { background: #006633; color: #aaffaa; }
.b88-blue { background: #2244aa; color: #ffffff; }

.portal-copyright {
  margin: 0;
  font-size: 11.5px;
  color: #222;
}
.portal-copyright a {
  color: #0000aa;
  font-weight: 700;
}

/* ========== Win98 状态栏 ========== */
.win98-statusbar {
  display: flex;
  gap: 4px;
  padding: 3px 4px;
  font-size: 11.5px;
  background: var(--win-bg);
}
.sb-cell {
  padding: 2px 6px;
  border-top: 1px solid var(--win-shadow);
  border-left: 1px solid var(--win-shadow);
  border-right: 1px solid var(--win-light);
  border-bottom: 1px solid var(--win-light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sb-main { flex: 1; }
.sb-zone { flex-shrink: 0; }

/* ========== 真·Win98 画图窗口 ========== */
.paint-body {
  display: flex;
  gap: 6px;
  padding: 6px;
  background: var(--win-bg);
}
.paint-toolbox {
  display: grid;
  grid-template-columns: repeat(2, 26px);
  align-content: start;
  gap: 3px;
}
.pt-btn {
  width: 26px;
  height: 26px;
  padding: 0;
  background: var(--win-bg);
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-right: 2px solid #000;
  border-bottom: 2px solid #000;
  cursor: pointer;
  font-size: 13px;
  display: grid;
  place-items: center;
}
.pt-btn.is-active,
.pt-btn:active:not(:disabled) {
  background: #e6e6e6;
  border-top-color: #000;
  border-left-color: #000;
  border-right-color: #fff;
  border-bottom-color: #fff;
}
.pt-btn:disabled { opacity: 0.4; cursor: default; }

.paint-canvas-frame {
  flex: 1;
  background: #ffffff;
  border-top: 2px solid var(--win-shadow);
  border-left: 2px solid var(--win-shadow);
  border-right: 2px solid var(--win-light);
  border-bottom: 2px solid var(--win-light);
  overflow: hidden;
}
#paint-canvas {
  display: block;
  width: 100%;
  height: auto;
  cursor: crosshair;
  touch-action: none;
}

.paint-palette {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 6px 6px;
  border-top: 1px solid var(--win-shadow);
}
.paint-current-swatch {
  width: 24px;
  height: 24px;
  border: 2px inset #808080;
  flex-shrink: 0;
}
.paint-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
}
.swatch {
  width: 20px;
  height: 20px;
  padding: 0;
  border: 2px outset #fff;
  cursor: pointer;
}
.swatch.is-active {
  outline: 2px solid #000080;
  outline-offset: 1px;
}

/* ========== 记事本窗口 ========== */
.notepad-body {
  display: flex;
  flex: 1;
  min-height: 0;
  padding: 4px;
}
.notepad-body pre {
  margin: 0;
  padding: 10px 12px;
  background: #ffffff;
  border: 2px inset #808080;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
  max-height: none;
  overflow-y: auto;
  overflow-wrap: anywhere;
  min-height: 0;
  flex: 1;
}

/* ========== 底部 Win98 任务栏 + 开始菜单 ========== */
.taskbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 36px;
  z-index: 6000;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 6px;
  background: var(--win-bg);
  border-top: 2px solid var(--win-light);
  box-shadow: inset 0 1px 0 var(--win-hi);
}

.start-btn {
  height: 28px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--win-bg);
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-right: 2px solid #000;
  border-bottom: 2px solid #000;
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
}
.start-btn[aria-expanded="true"],
.start-btn:active {
  border-top-color: #000;
  border-left-color: #000;
  border-right-color: #fff;
  border-bottom-color: #fff;
  background: #d8d8d8;
}
.start-logo {
  color: #000080;
  font-size: 15px;
}

.taskbar-sep {
  width: 2px;
  height: 24px;
  border-left: 1px solid var(--win-shadow);
  border-right: 1px solid var(--win-light);
}

.taskbar-tasks {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
}
.task-btn {
  height: 26px;
  padding: 0 10px;
  max-width: 170px;
  background: var(--win-bg);
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-right: 2px solid #000;
  border-bottom: 2px solid #000;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}
.task-btn.is-active {
  background: #e4e4e4;
  border-top-color: #000;
  border-left-color: #000;
  border-right-color: #fff;
  border-bottom-color: #fff;
}

.taskbar-tray {
  height: 26px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-top: 1px solid var(--win-shadow);
  border-left: 1px solid var(--win-shadow);
  border-right: 1px solid var(--win-light);
  border-bottom: 1px solid var(--win-light);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
}
.tray-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #00cc44;
  box-shadow: 0 0 6px #00cc44;
}

/* 开始菜单 */
.start-menu {
  position: fixed;
  left: 6px;
  bottom: 38px;
  z-index: 6500;
  display: flex;
  width: 248px;
  background: var(--win-bg);
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-right: 2px solid #000;
  border-bottom: 2px solid #000;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.35);
}
.start-sidebar {
  width: 26px;
  background: linear-gradient(180deg, #000080, #1084d0);
  color: #ffffff;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 10px;
}
.start-sidebar span {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-weight: 900;
  font-size: 13px;
  letter-spacing: 0.08em;
}
.start-sidebar b { color: #ffee00; }
.start-items {
  flex: 1;
  padding: 4px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.start-item {
  width: 100%;
  padding: 7px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 0;
  color: #000;
  text-decoration: none;
  text-align: left;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.start-item:hover {
  background: #000080;
  color: #ffffff;
}
.start-sep {
  height: 2px;
  margin: 3px 4px;
  border-top: 1px solid var(--win-shadow);
  border-bottom: 1px solid var(--win-light);
}

/* ========== 中小屏自适应（绝不裁切、绝不溢出） ========== */
@media (max-width: 1218px) {
  html, body {
    overflow: auto;
    height: auto;
  }
  .desktop {
    min-height: 100vh;
    height: auto;
    padding: 10px 10px 52px;
    overflow: visible;
  }
  .desktop-icons {
    position: static;
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
  }
  .window-stage {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  .win98-window,
  #win-portal,
  .win-paint,
  .win-readme {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    width: 100% !important;
    min-width: 0;
    height: auto !important;
  }
  .win98-window.is-minimized { display: none; }
  .win-readme { max-height: none; }
  .ie-viewport {
    overflow: visible;
  }
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .hero-right {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .hit-counter-card, .fish-trophy {
    flex: 1 1 180px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* 祝福挂件与门户彩条，不改变窗口占地。 */
:root {
  --celebrate-glint: 700ms;
  --sticker-press: 160ms;
  --flag-blink: 1800ms;
}
.portal-hero::before,
.portal-hero::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  height: 5px;
  z-index: 3;
  pointer-events: none;
}
.portal-hero::before {
  width: 100%;
  background: linear-gradient(90deg, #ff00b7, #ff00b7 18%, #00f5ff 52%, #ff00b7 84%, #00f5ff);
  box-shadow: 0 2px 0 #00005f;
}
.portal-hero::after {
  width: 35%;
  opacity: 0;
  background: linear-gradient(90deg, transparent, #fff, transparent);
  transform: translateX(-100%);
}
.portal-hero.is-celebrating::after {
  animation: portalGlint var(--celebrate-glint) var(--ease-out);
}
@keyframes portalGlint {
  0% { transform: translateX(-100%); opacity: 0; }
  15% { opacity: 1; }
  100% { transform: translateX(300%); opacity: 0; }
}
.wordart-trigger {
  display: block;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  line-height: inherit;
  letter-spacing: inherit;
  text-align: left;
  cursor: pointer;
}
.welcome-gift {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.welcome-count { min-width: 0; }
.fortune-button {
  display: grid;
  place-items: center;
  flex: 0 0 72px;
  width: 72px;
  height: 76px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  transition: transform var(--sticker-press) var(--spring);
}
.fortune-diamond {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border: 3px double #a50013;
  background: #fff000;
  box-shadow: 3px 3px 0 #990014;
  transform: rotate(45deg);
}
.fortune-diamond>span {
  font: 900 36px/1 "Songti SC", "SimSun", serif;
  color: #b90018;
  transform: rotate(135deg);
}
.fortune-button:active { transform: scale(.96); }
.led-counter { font-size: 14px; padding: 4px; }
.led-counter span { width: 11px; }
.hc-sub { font-size: 11px; }
.fish-trophy { font-family: inherit; text-align: left; cursor: pointer; }
.fish-trophy:active { transform: scale(.97); }
.construction-strip {
  margin: 0 auto 12px;
  width: min(100%, 300px);
  padding: 3px 14px;
  border: 1px solid #111;
  background: repeating-linear-gradient(135deg, #161616 0 7px, #ffe600 7px 14px);
}
.construction-strip span {
  display: block;
  padding: 2px 8px;
  background: #fff5a0;
  color: #282000;
  font-size: 12px;
}
.pixel-flag {
  border: 1px solid #fff;
  box-shadow: 1px 1px 0 #000;
  animation: pixelFlag var(--flag-blink) steps(1, end) 3;
}
@keyframes pixelFlag {
  0%, 70%, 100% { background: #ce0034; color: #fff; }
  85% { background: #fff000; color: #96002a; }
}
.star-layer {
  position: fixed;
  inset: 0;
  z-index: 7000;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
  contain: strict;
}
.wish-star {
  position: absolute;
  left: 0;
  top: 0;
  clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 94%, 50% 72%, 21% 94%, 32% 57%, 2% 35%, 39% 35%);
  will-change: transform, opacity;
}
button:focus-visible, a:focus-visible {
  outline: 2px solid #000080;
  outline-offset: 3px;
}
.portal-hero button:focus-visible { outline-color: #fff000; }
.notepad-body a { color: #000080; }
.tc-info, .tc-foot code { min-width: 0; }
.tc-info h3, .tc-info p { overflow-wrap: anywhere; }
.tc-info p { font-size: 12px; }

@media (max-width: 600px) {
  .hero-grid { padding: 20px 12px 12px; gap: 16px; }
  .hero-left { min-width: 0; }
  .wordart-3d { font-size: clamp(28px, 7.5vw, 42px); }
  .hero-sub { padding: 8px; font-size: 12px; }
  .hero-right { gap: 8px; }
  .hit-counter-card, .fish-trophy { flex-basis: 100%; }
  .fish-trophy { justify-content: center; }
  .portal-catalog { padding: 12px 8px; }
  .win98-tabpanel { padding: 8px; }
  .win98-tabs { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .win98-tab { min-height: 44px; }
  .catalog-quick-actions { flex-wrap: wrap; }
  .catalog-quick-actions .win98-btn { min-height: 40px; }
  .ie-home-pill { margin: 0; font-size: 11px; max-width: 100%; }
  .ie-addressbar { gap: 4px; padding-inline: 4px; }
  .ie-throbber { display: none; }
  .sb-zone { display: none; }
  .task-btn { max-width: 110px; }
  .taskbar-tray { padding-inline: 6px; }
  .paint-body { flex-direction: column; }
  .paint-toolbox { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .pt-btn { width: 100%; height: 40px; }
  .paint-swatches { gap: 6px; }
  .swatch { width: 32px; height: 32px; }
}
@media (hover: none) {
  .tool-card:hover, .tool-card:hover .tc-icon, .fish-trophy:hover { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .star-layer { display: none; }
  .wordart-3d { transform: rotate(-3deg) skewX(-6deg) !important; }
  .marquee-bar { white-space: normal; padding: 6px 10px; }
  .marquee-track { display: block; }
  .marquee-track [aria-hidden="true"] { display: none; }
}

/* Window-edge greetings and the right-hand desktop shelf. */
:root { --metal-sweep: 5.5s; --neon-breathe: 4.2s; --ice-drip: 3.8s; }
#win-portal { top: 104px; height: calc(100vh - 154px); }
.edge-wordart {
  position: absolute;
  z-index: 3;
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
  line-height: 1;
  will-change: translate;
}
.edge-gold {
  top: -91px;
  right: 32px;
  font: 900 82px/1 "Songti SC", "SimSun", serif;
  transform: rotate(-7deg) skewX(-8deg);
  color: #ffe995;
  filter: drop-shadow(0 2px 0 #fff4af) drop-shadow(3px 4px 0 #950016) drop-shadow(6px 8px 0 #580023);
}
.edge-gold span {
  display: block;
  position: relative;
  background: linear-gradient(#fffbd3 5%, #ffd734 38%, #a84c00 47%, #fff5b0 51%, #ffe000 66%, #ef7413 100%);
  background-clip: text;
  -webkit-text-fill-color: transparent;
  -webkit-text-stroke: 1px #ffdf7a;
}
.edge-gold span::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 38%, #fff 48%, #fff 51%, transparent 61%);
  background-size: 280% 100%;
  background-clip: text;
  -webkit-text-stroke: 0;
  animation: metalSweep var(--metal-sweep) linear infinite;
}
@keyframes metalSweep { 0%, 25% { background-position: 130% 0; } 65%, 100% { background-position: -40% 0; } }
.edge-neon {
  left: -83px;
  top: 44%;
  writing-mode: vertical-rl;
  font: 900 54px/1.15 "Arial Black", "PingFang SC", sans-serif;
  transform: rotate(-9deg) skewY(-8deg);
  color: #bbff00;
  -webkit-text-stroke: 1px #084e2b;
  text-shadow: 3px 3px #ff007f, 6px 6px #ff007f, 8px 8px #310052, 0 0 12px #a5ff35;
}
.edge-neon span { display: block; animation: neonBreathe var(--neon-breathe) var(--spring) infinite alternate; }
@keyframes neonBreathe { from { transform: scale(.98); } to { transform: scale(1.025); } }
/* ========== 居中聚焦单主窗布局（清晰交互层级） + Windose 98 蓝屏 + 乱炖大字 + 椰树牌铭牌 ========== */
#win-portal {
  top: 74px;
  left: max(112px, calc(50% - 550px));
  width: min(1100px, calc(100vw - 140px));
  height: calc(100vh - 124px);
  z-index: 20;
}
.win-paint {
  top: 96px;
  right: 28px;
  width: 372px;
  z-index: 32;
}

/* Windose 98 假蓝屏彩蛋 */
.bsod-overlay {
  position: fixed;
  inset: 0;
  z-index: 9500;
  background: #0000aa;
  color: #ffffff;
  display: grid;
  place-items: center;
  padding: 28px;
  font-family: var(--font-mono);
  cursor: pointer;
}
.bsod-box {
  max-width: 640px;
  line-height: 1.7;
  font-size: 14px;
}
.bsod-pill {
  display: inline-block;
  margin-bottom: 18px;
  padding: 2px 12px;
  background: #c0c0c0;
  color: #0000aa;
  font-weight: 900;
}
.bsod-box ul {
  list-style: none;
  padding: 0;
  margin: 14px 0 22px;
}
.bsod-prompt {
  text-align: center;
  animation: badgePulse 1s steps(2, end) infinite;
}

/* 荧光彩虹流动斜纹边框 */
.hero-rainbow-frame {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  border: 4px solid transparent;
  background:
    repeating-linear-gradient(
      125deg,
      #ff0099 0 14px,
      #ffee00 14px 28px,
      #00ff66 28px 42px,
      #00e5ff 42px 56px,
      #7733ff 56px 70px
    ) border-box;
  -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.92;
}

/* 复刻「每个字都要最大号」多色多描边乱炖爆炸 WordArt */
.wa-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: baseline;
  gap: 2px;
}
.wa-row-2 {
  padding-left: 0.4em;
  margin-top: -4px;
}
.ch {
  display: inline-block;
  font-family: "Arial Black", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-weight: 900;
  line-height: 1.05;
  transition: transform 200ms var(--spring);
}
.wordart-trigger:hover .ch {
  transform: translateY(-3px) scale(1.06);
}
.ch-1 { color: #ffee00; font-size: 1.04em; -webkit-text-stroke: 2px #cc0033; transform: rotate(-6deg); filter: drop-shadow(3px 4px 0 #000066); }
.ch-2 { color: #00f5ff; font-size: 0.96em; -webkit-text-stroke: 2px #002299; transform: rotate(4deg) translateY(2px); filter: drop-shadow(3px 4px 0 #ff0088); }
.ch-3 { color: #ff44bb; font-size: 1.08em; -webkit-text-stroke: 2px #ffffff; transform: rotate(-3deg); filter: drop-shadow(3px 4px 0 #330066); }
.ch-4 { color: #aaff00; font-size: 0.98em; -webkit-text-stroke: 2px #005522; transform: rotate(5deg); filter: drop-shadow(3px 4px 0 #000080); }
.ch-5 { color: #ff9900; font-size: 1.1em; -webkit-text-stroke: 2px #ffffff; transform: rotate(-5deg) translateY(-2px); filter: drop-shadow(3px 4px 0 #990033); }
.ch-6 { color: #ffffff; font-size: 1.05em; -webkit-text-stroke: 2px #ff0055; transform: rotate(4deg); filter: drop-shadow(4px 4px 0 #000080); }
.ch-7 { color: #ffe600; font-size: 1.12em; -webkit-text-stroke: 2px #0033cc; transform: rotate(-5deg); filter: drop-shadow(4px 4px 0 #ff0099); }
.ch-8 { color: #00ffaa; font-size: 0.94em; -webkit-text-stroke: 2px #004433; transform: rotate(6deg) translateY(3px); filter: drop-shadow(3px 4px 0 #220066); }
.ch-9 { color: #ff2255; font-size: 1.16em; -webkit-text-stroke: 2px #ffee00; transform: rotate(-4deg) translateY(-2px); filter: drop-shadow(4px 5px 0 #000055); }
.ch-10 { color: #00ddff; font-size: 1.14em; -webkit-text-stroke: 2px #ffffff; transform: rotate(4deg); filter: drop-shadow(4px 5px 0 #cc0066); }
.ch-11 { color: #ffee00; font-size: 1.24em; -webkit-text-stroke: 2px #ff0000; transform: rotate(10deg) translateY(-3px); filter: drop-shadow(4px 5px 0 #000); }

/* 复古老黄历 + 上世纪复古新闻轮播卡片 */
.almanac-card {
  background: #fff9e6;
  color: #2b1408;
  border: 2px solid #b80018;
  outline: 2px solid #ffee00;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.45);
  overflow: hidden;
}
.almanac-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 3px 8px;
  background: linear-gradient(90deg, #b80018, #e62e00);
  color: #ffee00;
  font-size: 11px;
  font-weight: 900;
}
.almanac-date {
  font-family: var(--font-mono);
  color: #ffffff;
  font-size: 11px;
}
.almanac-body {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  background:
    repeating-linear-gradient(0deg, rgba(184, 0, 24, 0.04) 0 1px, transparent 1px 12px),
    #fffaf0;
}
.almanac-body .fortune-button {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
}
.almanac-body .fortune-diamond {
  width: 30px;
  height: 30px;
  border-width: 2px;
}
.almanac-body .fortune-diamond > span {
  font-size: 20px;
}
.almanac-lines {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
}
.almanac-row {
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.alm-tag {
  flex-shrink: 0;
  padding: 0 4px;
  font-size: 10px;
  font-weight: 900;
  border-radius: 2px;
}
.alm-yi { background: #137a2e; color: #ffffff; }
.alm-ji { background: #c4001d; color: #ffee00; }

.retro-news {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px;
  border: 0;
  border-top: 1px dashed #c87a38;
  background: #0b1a44;
  color: #f4fbff;
  font-family: inherit;
  font-size: 11px;
  text-align: left;
  cursor: pointer;
  transition: background 140ms ease;
}
.retro-news:hover { background: #142c6e; }
.rn-badge {
  flex-shrink: 0;
  padding: 1px 4px;
  background: #ff0044;
  color: #ffee00;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 900;
}
.rn-text {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ========== 3D 文字龙卷风画布 + CD 镭射千禧年工具卡 ========== */
.text-tornado-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  opacity: 0.9;
}
.tool-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(
    220px circle at var(--mx, 50%) var(--my, 50%),
    rgba(255, 0, 153, 0.14),
    rgba(0, 238, 255, 0.14) 38%,
    rgba(255, 238, 0, 0.1) 62%,
    transparent 76%
  );
  mix-blend-mode: multiply;
  transition: opacity 220ms ease;
}
.tool-card:hover::after {
  opacity: 1;
}

/* 主窗口右下角纯透明立体冰块探头全身像（平时探出上半截，hover 弹起露全身） */
.portal-ad-dock {
  position: absolute;
  right: 18px;
  bottom: 26px;
  width: 174px;
  height: 292px;
  overflow: hidden;
  pointer-events: none;
  z-index: 30;
}
.corner-ad {
  --thaw: 0; --ice: .88; --warmth: 1;
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 0;
  pointer-events: auto;
  background: transparent;
  filter: drop-shadow(0 8px 16px rgba(0, 48, 86, 0.42));
  transform: translateY(146px);
  transition: transform 360ms var(--spring), filter 220ms ease;
}
.corner-ad:hover,
.corner-ad:focus-within,
.corner-ad.is-playing {
  transform: translateY(4px);
  filter: drop-shadow(0 12px 22px rgba(0, 170, 255, 0.55));
}
.freeze-scene {
  position: relative;
  width: 100%;
  background: transparent;
}
.frozen-cube-img {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
  filter: saturate(var(--warmth)) contrast(1.03);
}
.ice-shell { opacity: var(--ice); }
.ice-rim { opacity: var(--ice); filter: drop-shadow(0 0 6px rgba(130, 240, 255, 0.9)); }
.ice-cracks { opacity: var(--cracks); stroke-dasharray: 1; stroke-dashoffset: var(--crack-offset); filter: drop-shadow(0 0 3px #00ccff); }
.melt-drops { opacity: var(--cracks); }
.drop { animation: meltDrop var(--ice-drip) linear infinite; }
.drop-b { animation-delay: -1.2s; }
.drop-c { animation-delay: -2.5s; }
@keyframes meltDrop { 0% { transform: translateY(-12px); opacity: 0; } 20%, 75% { opacity: .95; } 100% { transform: translateY(26px); opacity: 0; } }

.freeze-sound {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  padding: 0;
  cursor: pointer;
  border-radius: 50%;
  background: rgba(12, 24, 42, 0.72);
  backdrop-filter: blur(6px);
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35);
  font-size: 16px;
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 180ms ease, transform 220ms var(--spring);
}
.corner-ad:hover .freeze-sound,
.corner-ad:focus-within .freeze-sound,
.corner-ad.is-playing .freeze-sound {
  opacity: 1;
  transform: scale(1);
}
.freeze-sound:active { transform: scale(0.92); }

.ad-close {
  position: absolute;
  top: 14px;
  left: 14px;
  width: 22px;
  height: 22px;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(12, 24, 42, 0.62);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.65);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transition: opacity 160ms ease, background 140ms ease;
}
.corner-ad:hover .ad-close,
.corner-ad:focus-within .ad-close { opacity: 0.9; }
.ad-close:hover { opacity: 1; background: rgba(180, 0, 30, 0.85); }

.music-notes {
  position: absolute;
  top: 6px;
  right: 52px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 200ms ease;
}
.corner-ad.is-playing .music-notes { opacity: 1; }
.music-notes span {
  position: absolute;
  color: #ffee00;
  font-size: 15px;
  font-weight: 900;
  text-shadow: 1px 1px 0 #cc0033, 0 0 8px rgba(255, 238, 0, 0.8);
  animation: noteFloat 1.8s ease-out infinite;
}
.music-notes span:nth-child(2) { left: 12px; animation-delay: -0.6s; color: #00f5ff; }
.music-notes span:nth-child(3) { left: -10px; animation-delay: -1.2s; color: #ff66cc; }
@keyframes noteFloat {
  0% { transform: translateY(10px) scale(0.7); opacity: 0; }
  30% { opacity: 1; }
  100% { transform: translateY(-22px) translateX(6px) scale(1.1); opacity: 0; }
}

.effects-paused .edge-wordart *, .effects-paused .drop { animation-play-state: paused; }
@media (hover: none) {
  .corner-ad { transform: translateY(0); }
  .freeze-sound, .ad-close { opacity: 1; transform: scale(1); }
}
@media (max-width: 1218px) {
  #win-portal { margin-top: 88px; }
  .edge-gold { top: -85px; right: 20px; font-size: 64px; }
  .edge-neon { top: -40px; left: 14px; font-size: 32px; writing-mode: horizontal-tb; transform: rotate(-8deg) skewX(-8deg); }
  .portal-ad-dock { right: 8px; bottom: 26px; width: 196px; height: 132px; }
  .frozen-portrait { height: 124px; }
}
@media (max-width: 600px) {
  .edge-gold { top: -83px; right: 10px; font-size: 54px; }
  .edge-neon { top: -32px; left: 4px; font-size: 28px; }
  .portal-ad-dock { right: 6px; bottom: 26px; width: 164px; height: 112px; }
  .frozen-portrait { height: 106px; }
  .win98-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .win98-tab { padding-inline: 4px; font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  .edge-wordart { translate: none !important; }
  .edge-gold span::after { display: none; }
  .drop { opacity: .65; }
}
@media (min-width: 1219px) and (max-height: 859px) {
  html, body { overflow-y: auto; }
  .desktop { min-height: 900px; }
  #win-portal { height: 746px; }
}

/* Language-specific typesetting; the desktop geometry and artwork stay intact. */
.language-toggle { flex: 0 0 44px; height: 26px; padding: 0 5px; font-size: 12px; font-weight: 700; }
html[lang="en"] .wordart-3d { font-size: clamp(28px, 3.2vw, 43px); }
html[lang="en"] .wa-row { gap: 0; }
html[lang="en"] .ch-1, html[lang="en"] .ch-2 { margin-right: .22em; }
html[lang="en"] .ch-8 { margin-right: .22em; }
html[lang="en"] .ch { paint-order: stroke fill; }
html[lang="en"] .edge-gold { font-family: "Arial Black", Arial, sans-serif; font-size: 48px; top: -61px; }
html[lang="en"] .yeshu-side { text-orientation: mixed; letter-spacing: .08em; }
html[lang="en"] .yeshu-sub { font-size: 9px; padding-inline: 2px; }
html[lang="en"] .fortune-diamond > span { font: 900 11px Arial, sans-serif; }
html[lang="en"] .tc-info h3 { overflow-wrap: anywhere; }
@media (max-width: 1218px) {
  html[lang="en"] .edge-gold { font-size: clamp(22px, 4.1vw, 48px); top: -64px; }
}
@media (max-width: 600px) {
  html[lang="en"] .wordart-3d { font-size: clamp(23px, 6.2vw, 34px); }
  html[lang="en"] .edge-gold { font-size: 25px; right: 8px; }
  html[lang="en"] .ie-menubar { column-gap: 10px; }
}
