/*
 * Stylesheet map
 * 1. Product shell, navigation, buttons, and shared surfaces
 * 2. Home, focus timer, role growth, Todo, calendar, records, and settings
 * 3. Replaceable character-media slots and independent role action layers
 * 4. macOS desktop, windows, Dock, desktop pet, and custom context menu
 * 5. Encounters, completion, keepsake card, and interactive easter eggs
 * 6. Responsive rules and reduced-motion presentation states
 *
 * JavaScript relies on data-* attributes, modifier classes, and CSS custom
 * properties defined here. Preserve those hooks when reorganizing styles.
 */

@font-face {
  font-family: "Tomato Story Pixel";
  src: url("./assets/fonts/fusion-pixel-12px-proportional-zh_hans.ttf.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Tomato Story Pixel Mono";
  src: url("./assets/fonts/fusion-pixel-12px-monospaced-zh_hans.ttf.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: light;
  --font-pixel: "Tomato Story Pixel", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-pixel-mono: "Tomato Story Pixel Mono", "SFMono-Regular", Consolas, monospace;
  --ink: #171822;
  --muted: #747585;
  --line: #e7e5e2;
  --paper: #f5f4f1;
  --white: #ffffff;
  --night: #11121c;
  --night-2: #1a1b28;
  --violet: #7566f4;
  --violet-soft: #ebe8ff;
  --coral: #f17863;
  --amber: #e5aa45;
  --cyan: #4eb9bd;
  --green: #4d9a77;
  --shadow: 0 18px 50px rgba(31, 29, 43, 0.1);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-pixel);
  letter-spacing: 0;
}

button, input, select { font: inherit; }
button { cursor: pointer; }

.app-shell {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 28px 18px 18px;
  color: #f8f8fb;
  background: var(--night);
  display: flex;
  flex-direction: column;
  z-index: 10;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 10px 34px;
}

.brand-mark {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.2);
  background: #292a3a;
  color: #cabfff;
  font-family: var(--font-pixel-mono);
  font-weight: 500;
}
.brand-mark img { width: 32px; height: 32px; display: block; }

.brand strong { display: block; font-size: 15px; }
.brand span { display: block; margin-top: 2px; color: #9596a7; font-size: 11px; }

.nav-list { display: grid; gap: 5px; }
.nav-button {
  width: 100%;
  min-height: 44px;
  border: 0;
  border-radius: 6px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 11px;
  color: #a9aab8;
  background: transparent;
  text-align: left;
}
.nav-button:hover { color: #fff; background: #1e1f2b; }
.nav-button.active { color: #fff; background: #292a38; }
.nav-glyph {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  position: relative;
  overflow: hidden;
  border: 2px solid #454758;
  border-radius: 4px;
  background: #20212e;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.035), 2px 2px 0 rgba(0,0,0,.22);
  image-rendering: pixelated;
}
.nav-button.active .nav-glyph { border-color: #7c7891; box-shadow: inset 0 0 0 2px rgba(255,255,255,.06), 0 0 0 1px rgba(255,255,255,.08); }
.nav-glyph i, .nav-glyph i::before, .nav-glyph i::after { position: absolute; content: ""; display: block; box-sizing: border-box; }
.nav-icon-home { background: #272334; }
.nav-icon-home i { left: 5px; top: 14px; width: 16px; height: 10px; border: 2px solid #4b3540; background: #f0d39d; }
.nav-icon-home i::before { left: -4px; top: -10px; width: 20px; height: 10px; background: #e96758; clip-path: polygon(0 100%,0 70%,20% 70%,20% 40%,40% 40%,40% 10%,60% 10%,60% 40%,80% 40%,80% 70%,100% 70%,100% 100%); }
.nav-icon-home i::after { left: 6px; top: 3px; width: 5px; height: 7px; background: #4eb9bd; box-shadow: -5px -1px 0 -1px #fff1bd; }
.nav-icon-focus { background: #30273b; }
.nav-icon-focus i { left: 4px; top: 4px; width: 18px; height: 18px; border: 2px solid #e5b95d; border-radius: 50%; box-shadow: 0 0 0 3px rgba(229,185,93,.18); }
.nav-icon-focus i::before { left: 7px; top: 2px; width: 2px; height: 7px; background: #fff4bd; box-shadow: 0 8px 0 #f17863; }
.nav-icon-focus i::after { left: 15px; top: 8px; width: 4px; height: 4px; background: #65c6cf; box-shadow: -13px 7px 0 #a899ff; }
.nav-icon-role { background: #29233a; }
.nav-icon-role i { left: 8px; top: 16px; width: 10px; height: 8px; border: 2px solid #523e55; background: #f1b49a; }
.nav-icon-role i::before { left: -5px; top: -14px; width: 20px; height: 13px; background: #8974ef; clip-path: polygon(0 100%,0 76%,25% 76%,25% 54%,40% 54%,40% 8%,60% 8%,60% 36%,75% 36%,75% 70%,100% 70%,100% 100%); }
.nav-icon-role i::after { left: -6px; top: -3px; width: 22px; height: 4px; border: 1px solid #443557; background: #b79aff; box-shadow: 13px -9px 0 -1px #f3ce61; }
.nav-icon-schedule { background: #202f38; }
.nav-icon-schedule i { left: 4px; top: 7px; width: 18px; height: 17px; border: 2px solid #2f505b; background: #e6f3ed; }
.nav-icon-schedule i::before { left: -2px; top: -2px; width: 18px; height: 5px; background: #55c2cb; box-shadow: 3px -4px 0 -1px #dff8f4, 11px -4px 0 -1px #dff8f4; }
.nav-icon-schedule i::after { left: 4px; top: 7px; width: 4px; height: 4px; background: #f17863; box-shadow: 6px 0 #9a8df8, 0 6px #79b990, 6px 6px #e8bb5f; }
.nav-icon-records { background: #342a23; }
.nav-icon-records i { left: 7px; top: 5px; width: 14px; height: 19px; border: 2px solid #59432f; background: #edc56d; }
.nav-icon-records i::before { left: -4px; top: -3px; width: 18px; height: 5px; border: 2px solid #59432f; background: #f5dc91; box-shadow: 0 17px 0 -2px #f5dc91, 0 17px 0 0 #59432f; }
.nav-icon-records i::after { left: 2px; top: 5px; width: 8px; height: 2px; background: #815dad; box-shadow: 0 5px #815dad, 0 10px #d9695c; }
.nav-icon-achievements { background: #302b22; }
.nav-icon-achievements i { left: 7px; top: 5px; width: 12px; height: 10px; border: 2px solid #644823; background: #edb94e; }
.nav-icon-achievements i::before { left: -6px; top: 0; width: 5px; height: 7px; border: 2px solid #b17b30; border-right: 0; background: transparent; box-shadow: 19px 0 0 -2px #302b22, 19px 0 0 0 #b17b30; }
.nav-icon-achievements i::after { left: 3px; top: 8px; width: 6px; height: 6px; border-top: 3px solid #79572b; border-bottom: 3px solid #79572b; background: #63c4cc; box-shadow: -3px 6px 0 #edb94e, 0 6px 0 #edb94e, 3px 6px 0 #edb94e; }
.nav-icon-settings { background: #27303a; }
.nav-icon-settings i { left: 5px; top: 5px; width: 16px; height: 16px; background: #94a8b8; clip-path: polygon(35% 0,65% 0,65% 18%,82% 18%,82% 35%,100% 35%,100% 65%,82% 65%,82% 82%,65% 82%,65% 100%,35% 100%,35% 82%,18% 82%,18% 65%,0 65%,0 35%,18% 35%,18% 18%,35% 18%); }
.nav-icon-settings i::before { left: 4px; top: 4px; width: 8px; height: 8px; border: 2px solid #40505f; background: #f17863; }
.nav-icon-settings i::after { left: 2px; top: 2px; width: 3px; height: 3px; background: #d9e3e8; }

.sidebar-footer {
  margin-top: auto;
  padding: 16px 10px 4px;
  border-top: 1px solid #2b2c3a;
}
.sidebar-footer p { margin: 0 0 10px; color: #878898; font-size: 11px; }
.sidebar-footer strong { color: #fff; }

.main { min-width: 0; padding: 32px clamp(24px, 4vw, 56px) 72px; }
.page { max-width: 1240px; margin: 0 auto; }

.page-header {
  min-height: 58px;
  margin-bottom: 28px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}
.eyebrow { margin: 0 0 6px; color: var(--muted); font-size: 12px; }
h1, h2, h3, p { letter-spacing: 0; }
h1 { margin: 0; font-size: clamp(28px, 4vw, 42px); line-height: 1.15; }
h2 { margin: 0; font-size: 20px; }
h3 { margin: 0; font-size: 15px; }

.header-actions { display: flex; align-items: center; gap: 10px; }
.header-actions .button { white-space: nowrap; }
.status-pill {
  min-height: 38px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  color: #545565;
  font-size: 12px;
}
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px #e3f1ea; }

.button {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--ink);
  color: #fff;
  font-weight: 600;
}
.button:hover { transform: translateY(-1px); }
.button.secondary { background: #fff; color: var(--ink); border-color: var(--line); }
.button.ghost { background: transparent; color: inherit; border-color: rgba(255,255,255,.22); }
.button.danger { background: #fff0ed; color: #b34c3e; }
.button.small { min-height: 34px; padding: 0 12px; font-size: 12px; }

.focus-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(310px, .7fr);
  gap: 18px;
}

.focus-panel {
  min-height: 460px;
  border-radius: 8px;
  padding: clamp(24px, 4vw, 42px);
  position: relative;
  overflow: hidden;
  color: #fff;
  background: #1a1b27;
  box-shadow: var(--shadow);
}
.focus-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(110deg, transparent 42%, rgba(117,102,244,.18)),
    linear-gradient(180deg, transparent, rgba(0,0,0,.22));
  pointer-events: none;
}
.focus-panel::after {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  right: -60px;
  bottom: -78px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 50%;
  box-shadow: 0 0 0 40px rgba(255,255,255,.025), 0 0 0 82px rgba(255,255,255,.018);
}
.focus-content { position: relative; z-index: 1; max-width: 630px; }
.section-kicker { margin: 0 0 12px; color: #b8b9c5; font-size: 12px; }
.focus-title { max-width: 610px; margin: 0 0 8px; font-size: clamp(28px, 4vw, 48px); line-height: 1.15; }
.focus-title > span { display: block; }
.focus-copy { margin: 0 0 28px; color: #aeb0bf; font-size: 14px; }

.duration-row { display: flex; gap: 8px; margin-bottom: 18px; }
.duration-button {
  width: 72px;
  min-height: 40px;
  border: 1px solid #393a4a;
  border-radius: 5px;
  background: #232431;
  color: #aeb0be;
}
.duration-button.active { border-color: #8f81ff; background: #7566f4; color: #fff; }

.focus-todo-picker { margin-bottom: 9px; display: grid; grid-template-columns: 110px minmax(0, 1fr); align-items: center; gap: 9px; }
.focus-todo-picker > span { color: #b7b8c5; font-size: 11px; }
.focus-todo-picker .field { min-width: 0; }
.focus-form {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 150px auto;
  gap: 9px;
}
.field {
  min-height: 46px;
  width: 100%;
  border: 1px solid #393a47;
  border-radius: 5px;
  padding: 0 13px;
  outline: 0;
  background: #232430;
  color: #fff;
}
.field:focus { border-color: #8f81ff; }
.focus-form .button { background: #f2f0ff; color: #28233e; }

.active-session { display: grid; gap: 20px; }
.timer {
  margin: 10px 0 0;
  font-family: var(--font-pixel-mono);
  font-size: clamp(58px, 9vw, 94px);
  line-height: 1;
  letter-spacing: 0;
}
.session-meta { color: #b4b5c2; }
.session-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.session-bar { width: min(540px, 100%); height: 6px; border-radius: 3px; overflow: hidden; background: #30313f; }
.session-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--cyan), #a899ff, var(--coral)); }

.ritual-progress {
  --ritual-accent: #e5aa45;
  width: min(520px, 100%);
  min-height: 132px;
  padding: 10px 18px 10px 10px;
  border: 1px solid rgba(255,255,255,.14);
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  background: rgba(255,255,255,.035);
}
.ritual-progress.task-reading { --ritual-accent: #e5b95d; }
.ritual-progress.task-coding { --ritual-accent: #65c6cf; }
.ritual-progress.task-design { --ritual-accent: #f17863; }
.ritual-progress.task-research { --ritual-accent: #a899ff; }
.ritual-progress.task-course { --ritual-accent: #72b988; }
.ritual-diagram { position: relative; width: 112px; aspect-ratio: 1; }
.ritual-ring { position: absolute; inset: 10px; border: 1px dashed color-mix(in srgb, var(--ritual-accent) 48%, transparent); border-radius: 50%; transform: rotate(calc(var(--ritual-progress) * .12)); transition: transform .8s linear; }
.ritual-ring::before, .ritual-ring::after { content: ""; position: absolute; inset: 17px; border: 1px solid rgba(255,255,255,.12); transform: rotate(45deg); }
.ritual-ring::after { inset: 29px; border-color: color-mix(in srgb, var(--ritual-accent) 45%, transparent); }
.ritual-stroke { position: absolute; z-index: 2; left: 50%; top: 50%; width: 40%; height: 2px; background: rgba(255,255,255,.1); transform-origin: 0 50%; }
.ritual-stroke::before { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--stroke-fill, 0%); background: var(--ritual-accent); box-shadow: 0 0 8px color-mix(in srgb, var(--ritual-accent) 72%, transparent); transition: width .9s linear; }
.ritual-stroke::after { content: ""; position: absolute; right: -2px; top: -2px; width: 6px; height: 6px; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.08); transform: rotate(45deg); }
.ritual-stroke:nth-of-type(2) { transform: rotate(0deg); }
.ritual-stroke:nth-of-type(3) { transform: rotate(45deg); }
.ritual-stroke:nth-of-type(4) { transform: rotate(90deg); }
.ritual-stroke:nth-of-type(5) { transform: rotate(135deg); }
.ritual-stroke:nth-of-type(6) { transform: rotate(180deg); }
.ritual-stroke:nth-of-type(7) { transform: rotate(225deg); }
.ritual-stroke:nth-of-type(8) { transform: rotate(270deg); }
.ritual-stroke:nth-of-type(9) { transform: rotate(315deg); }
.ritual-stroke.lit::after, .ritual-stroke.drawing::after { border-color: color-mix(in srgb, var(--ritual-accent) 82%, white); background: var(--ritual-accent); box-shadow: 0 0 11px var(--ritual-accent); }
.ritual-stroke.drawing::after { animation: ritualInkSpark .7s steps(3, end) infinite alternate; }
.ritual-stroke.lit { animation: ritualInkLock .4s steps(3, end); }
.ritual-core { position: absolute; z-index: 3; left: 50%; top: 50%; width: 15px; height: 15px; border: 2px solid var(--ritual-accent); background: #1a1b27; transform: translate(-50%,-50%) rotate(45deg); box-shadow: 0 0 12px color-mix(in srgb, var(--ritual-accent) 38%, transparent); }
.ritual-copy span, .ritual-copy strong, .ritual-copy small { display: block; }
.ritual-copy span { margin-bottom: 5px; color: #9fa1b1; font-size: 10px; }
.ritual-copy strong { margin-bottom: 8px; font-size: 17px; }
.ritual-copy small { color: #b8b9c5; font: 500 10px var(--font-pixel-mono); }
@keyframes ritualInkLock { 50% { filter: brightness(1.8); } }
@keyframes ritualInkSpark { from { opacity: .45; transform: rotate(45deg) scale(.72); } to { opacity: 1; transform: rotate(45deg) scale(1.25); } }

.focus-screen-page { max-width: none; min-height: calc(100dvh - 118px); margin: -8px -10px 0; padding: clamp(22px, 4vw, 44px); background: #151622; color: #f7f3e8; box-shadow: 12px 12px 0 rgba(15,16,26,.18); }
.focus-screen { --quest-accent: #e5b95d; position: relative; min-height: calc(100dvh - 202px); overflow: hidden; display: flex; flex-direction: column; gap: 18px; padding: clamp(8px, 2vw, 18px); background: #151622; }
.focus-screen::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .42; background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px); background-size: 18px 18px; }
.focus-screen-head, .focus-clock-wrap, .focus-adventure, .focus-screen-footer, .focus-screen-warning { position: relative; z-index: 1; }
.focus-screen-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.focus-screen-head h1 { margin: 0; max-width: min(640px, 72vw); color: #fff; font-size: clamp(22px, 3vw, 34px); line-height: 1.1; overflow-wrap: anywhere; }
.focus-screen-head p:last-child { margin: 7px 0 0; color: #9e9fac; font: 700 10px var(--font-pixel-mono); }
.focus-screen-status { flex: 0 0 auto; border: 2px solid #5e5a76; padding: 7px 10px; color: #d8d1ff; font: 800 9px var(--font-pixel-mono); }
.focus-screen.is-paused .focus-screen-status { border-color: #9d7040; color: #f2c78a; }
.focus-clock-wrap { display: grid; justify-items: center; gap: 8px; padding: 10px 0 0; text-align: center; }
.focus-clock-label { color: #8f90a0; font: 800 9px var(--font-pixel-mono); letter-spacing: .08em; text-transform: uppercase; }
.focus-clock { color: #fff6ca; font: 800 clamp(76px, 14vw, 168px)/.9 var(--font-pixel-mono); letter-spacing: .02em; text-shadow: 7px 7px 0 #5c3b4d, 0 0 22px rgba(229,185,93,.22); }
.focus-clock-track { width: min(620px, 78%); height: 8px; border: 2px solid #353247; padding: 1px; background: #202132; }
.focus-clock-track span { display: block; height: 100%; background: var(--quest-accent); box-shadow: 0 0 10px rgba(229,185,93,.48); transition: width .35s linear; }
.focus-clock-wrap small { color: #898a9a; font: 700 8px var(--font-pixel-mono); }
.focus-adventure { min-height: 260px; flex: 1; overflow: hidden; border: 3px solid #343148; background: #202132; box-shadow: 6px 6px 0 #0d0e16; }
.focus-adventure-sky { position: absolute; inset: 0 0 43%; background: linear-gradient(180deg, #28243e, #24243a 62%, #30304b); }
.focus-adventure-sky::before { content: ""; position: absolute; inset: 16px; opacity: .7; background: radial-gradient(circle, #fff2b1 0 2px, transparent 3px) 8% 25% / 93px 55px, radial-gradient(circle, #9db8f4 0 1px, transparent 2px) 42% 38% / 71px 47px, radial-gradient(circle, #fff2b1 0 1px, transparent 2px) 79% 18% / 82px 60px; }
.focus-moon { position: absolute; right: 10%; top: 19%; width: 42px; height: 42px; border: 4px solid #f3d77c; border-radius: 50%; box-shadow: 5px 0 0 #9e6b84, 0 0 18px rgba(243,215,124,.26); }
.focus-adventure-path { position: absolute; inset: 0; }
.focus-adventure-path::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 43%; background: #303045; border-top: 3px solid #4e4a66; clip-path: polygon(0 35%, 12% 28%, 24% 40%, 37% 22%, 52% 36%, 67% 18%, 79% 30%, 100% 12%, 100% 100%, 0 100%); }
.focus-path-line { position: absolute; left: 7%; right: 7%; bottom: 29%; height: 4px; background: repeating-linear-gradient(90deg, #6b6482 0 22px, transparent 22px 31px); box-shadow: 0 7px 0 rgba(13,14,22,.28); }
.focus-adventure-pet { position: absolute; z-index: 5; bottom: 25%; width: 94px; transform: translateX(-50%); transition: left .8s linear; text-align: center; }
.focus-adventure-pet .default-pet.compact { transform: scale(.58); margin: -48px -29px; }
.focus-adventure-pet > span { display: block; margin-top: -4px; color: #fff7c9; font: 800 8px var(--font-pixel-mono); text-shadow: 2px 2px #171722; }
.focus-monster { position: absolute; z-index: 3; bottom: 28%; left: var(--monster-progress); width: 90px; display: grid; justify-items: center; gap: 4px; transform: translateX(-50%); transition: opacity .25s, filter .25s; }
.focus-monster-sprite { position: relative; display: block; width: 42px; height: 42px; transform: scale(1.35); filter: drop-shadow(3px 3px 0 rgba(0,0,0,.35)); }
.focus-monster strong, .focus-monster small { display: block; white-space: nowrap; text-align: center; }
.focus-monster strong { color: #e9dff0; font-size: 8px; }
.focus-monster small { color: #9894aa; font: 700 7px var(--font-pixel-mono); }
.focus-monster.is-cleared { filter: grayscale(1); opacity: .28; }
.focus-monster.is-cleared .focus-monster-sprite { animation: focusMonsterDefeat .46s steps(3, end); }
.focus-flag { position: absolute; z-index: 3; bottom: 25%; width: 34px; transform: translateX(-50%); text-align: center; }
.focus-flag i { display: block; width: 3px; height: 42px; margin: 0 auto; background: #d7d1da; box-shadow: 3px 0 #777289; }
.focus-flag i::before { content: ""; display: block; width: 22px; height: 15px; background: var(--quest-accent); clip-path: polygon(0 0,100% 18%,74% 100%,0 78%); }
.focus-flag span { display: block; margin-top: 3px; color: #e7c977; font: 800 7px var(--font-pixel-mono); }
.focus-screen-footer { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.focus-screen-ritual { flex: 1; min-width: 0; }
.focus-screen-ritual .ritual-progress { width: min(520px, 100%); min-height: 92px; padding-block: 5px; }
.focus-screen-ritual .ritual-copy strong { font-size: 13px; }
.focus-screen-actions { display: flex; gap: 8px; }
.focus-screen-actions .button { min-width: 78px; }
.focus-screen-warning { margin: 0; color: #e6b879; font: 700 9px var(--font-pixel-mono); }
.focus-screen-ready { justify-content: center; }
.focus-screen-ready .focus-screen-head { align-items: center; }
.focus-screen-ready .focus-screen-head p:last-child { max-width: 440px; line-height: 1.6; }
.focus-ready-controls { position: relative; z-index: 1; width: min(620px, 100%); margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) 130px auto; gap: 8px; }
.focus-ready-controls .field { border-color: #39364d; background: #202132; }
.focus-ready-controls .button { background: #f4edcf; color: #282132; }
.focus-ready-note { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; gap: 9px; color: #9998aa; font: 700 9px var(--font-pixel-mono); }
.focus-ready-note p { margin: 0; }
.focus-ready-pixel { color: #e5b95d; font-size: 18px; }
@keyframes focusMonsterDefeat { 0% { opacity: 1; transform: scale(1.35); } 45% { filter: brightness(2.5); transform: translateX(6px) scale(1.45); } 100% { opacity: .25; transform: translateY(-10px) scale(.55) rotate(12deg); } }

/* Role action layer stays independent from replaceable character media. */
.role-action-layer { --action-accent: #e5b95d; position: relative; min-height: 118px; display: grid; grid-template-columns: 168px minmax(0, 1fr); align-items: center; gap: 14px; overflow: hidden; border: 2px solid #3e3a54; padding: 8px 12px 8px 8px; background: #1d1e2b; }
.role-action-layer.is-compact { min-height: 88px; grid-template-columns: 104px minmax(0, 1fr); gap: 9px; padding: 5px 9px 5px 5px; }
.role-action-mage { --action-accent: #c09aff; }
.role-action-archer { --action-accent: #e5b95d; }
.role-action-blacksmith { --action-accent: #f29a45; }
.role-action-layer.motion-off *, .role-action-layer.motion-off *::before, .role-action-layer.motion-off *::after { animation: none !important; }
.focus-screen.is-paused .role-action-layer *, .focus-screen.is-paused .role-action-layer *::before, .focus-screen.is-paused .role-action-layer *::after { animation-play-state: paused !important; }
.role-action-media { position: relative; width: 100%; min-height: 98px; aspect-ratio: 16 / 9; overflow: hidden; background: transparent; }
.role-action-media::after { content: ""; position: absolute; inset: 0; pointer-events: none; border: 2px solid color-mix(in srgb, var(--action-accent) 34%, #252536); box-shadow: inset 0 0 22px rgba(11,12,20,.34); }
.role-action-video { width: 100%; height: 100%; display: block; }
.role-action-video .keyed-video-canvas { filter: saturate(1.04) contrast(1.03); }
.role-action-scene { position: relative; height: 100%; min-height: 98px; overflow: hidden; background: linear-gradient(180deg, rgba(255,255,255,.025), transparent 55%), repeating-linear-gradient(0deg, rgba(255,255,255,.025) 0 1px, transparent 1px 11px); }
.is-compact .role-action-scene { min-height: 74px; }
.role-action-scene::after { content: ""; position: absolute; left: 9%; right: 9%; bottom: 10px; height: 3px; background: color-mix(in srgb, var(--action-accent) 35%, #171824); box-shadow: 0 4px 0 rgba(0,0,0,.25); }
.role-action-copy span, .role-action-copy strong, .role-action-copy small { display: block; }
.role-action-copy span { color: var(--action-accent); font: 800 8px var(--font-pixel-mono); text-transform: uppercase; }
.role-action-copy strong { margin-top: 7px; color: #f5f1dd; font-size: 13px; line-height: 1.35; }
.role-action-copy small { margin-top: 7px; color: #9c9cac; font: 700 8px var(--font-pixel-mono); }
.is-compact .role-action-copy strong { margin-top: 4px; font-size: 10px; }
.is-compact .role-action-copy small { margin-top: 4px; font-size: 7px; }

/* Mage: eight independent strokes light up as the session advances. */
.action-mage-scene { position: absolute; left: 50%; top: 50%; width: 82px; height: 82px; transform: translate(-50%, -50%) rotate(45deg); }
.action-rune-ring { position: absolute; inset: 8px; border: 2px solid color-mix(in srgb, var(--action-accent) 65%, transparent); border-radius: 50%; box-shadow: 0 0 10px color-mix(in srgb, var(--action-accent) 28%, transparent); animation: actionRunePulse 2.2s steps(4, end) infinite; }
.action-rune-ring.ring-inner { inset: 23px; border-style: dashed; animation-delay: 180ms; }
.action-rune-stroke { position: absolute; left: 50%; top: 50%; width: 35px; height: 2px; transform-origin: 0 50%; background: #4d4764; transition: background .35s, box-shadow .35s; }
.action-rune-stroke:nth-child(3) { transform: rotate(0deg); }
.action-rune-stroke:nth-child(4) { transform: rotate(45deg); }
.action-rune-stroke:nth-child(5) { transform: rotate(90deg); }
.action-rune-stroke:nth-child(6) { transform: rotate(135deg); }
.action-rune-stroke:nth-child(7) { transform: rotate(180deg); }
.action-rune-stroke:nth-child(8) { transform: rotate(225deg); }
.action-rune-stroke:nth-child(9) { transform: rotate(270deg); }
.action-rune-stroke:nth-child(10) { transform: rotate(315deg); }
.action-rune-stroke.is-lit { background: var(--action-accent); box-shadow: 0 0 7px var(--action-accent); }
.action-rune-core { position: absolute; left: 50%; top: 50%; width: 11px; height: 11px; background: var(--action-accent); box-shadow: 0 0 12px var(--action-accent); transform: translate(-50%, -50%); animation: actionCorePulse 1.3s steps(3, end) infinite; }
@keyframes actionRunePulse { 50% { opacity: .55; transform: scale(.94); } }
@keyframes actionCorePulse { 50% { opacity: .55; transform: translate(-50%, -50%) scale(.75); } }

/* Archer: draw, release, and a pulsing target hit. */
.action-archer-scene { position: absolute; inset: 0; }
.action-target { position: absolute; right: 14%; top: 50%; width: 54px; height: 54px; border: 4px solid #d7c08b; border-radius: 50%; background: #725849; box-shadow: inset 0 0 0 7px #e8d8ae, inset 0 0 0 13px #b3574d, 4px 4px 0 rgba(0,0,0,.24); transform: translateY(-50%); }
.action-target i { position: absolute; inset: 17px; border-radius: 50%; background: #e5b95d; box-shadow: 0 0 8px rgba(229,185,93,.7); }
.action-target b { position: absolute; left: 50%; bottom: -22px; width: 4px; height: 22px; background: #7a5d40; box-shadow: -14px 18px 0 -1px #7a5d40, 14px 18px 0 -1px #7a5d40; }
.action-bow { position: absolute; left: 17%; top: 50%; width: 38px; height: 68px; border-right: 5px solid #d89b4d; border-radius: 0 80% 80% 0; transform: translateY(-50%); animation: actionBowDraw 1.8s steps(5, end) infinite; }
.action-bow::after { content: ""; position: absolute; right: -2px; top: 2px; width: 1px; height: 62px; background: #e8dfd0; transform-origin: center; }
.action-arrow { position: absolute; left: 30%; top: 50%; width: 70px; height: 3px; background: #efe4c8; box-shadow: 0 0 7px rgba(229,185,93,.65); transform: translateY(-50%); animation: actionArrowRelease 1.8s steps(7, end) infinite; }
.action-arrow::after { content: ""; position: absolute; right: -7px; top: -4px; border-left: 8px solid #e5b95d; border-block: 5px solid transparent; }
@keyframes actionBowDraw { 0%,35% { transform: translateY(-50%) scaleX(.82); } 52% { transform: translateY(-50%) scaleX(1.08); } 68%,100% { transform: translateY(-50%) scaleX(.88); } }
@keyframes actionArrowRelease { 0%,42% { opacity: 1; transform: translate(-18px,-50%); } 66% { opacity: 1; transform: translate(58px,-50%); } 72%,100% { opacity: 0; transform: translate(58px,-50%); } }

/* Blacksmith: repeated hammer strikes make the metal and sparks glow. */
.action-blacksmith-scene { position: absolute; inset: 0; }
.action-anvil { position: absolute; left: 50%; bottom: 17px; width: 74px; height: 30px; border: 3px solid #24242b; background: #68666b; box-shadow: inset 0 6px #969397, 5px 6px 0 rgba(0,0,0,.25); transform: translateX(-50%); }
.action-anvil::before { content: ""; position: absolute; left: -18px; top: -9px; width: 106px; height: 14px; border: 3px solid #24242b; background: #87848a; clip-path: polygon(0 25%,72% 0,100% 45%,78% 100%,10% 100%); }
.action-anvil::after { content: ""; position: absolute; left: 19px; top: 27px; width: 35px; height: 21px; background: #4b494e; clip-path: polygon(18% 0,82% 0,100% 100%,0 100%); }
.action-anvil i { position: absolute; z-index: 2; left: 14px; top: -8px; width: 46px; height: 7px; background: #f29a45; box-shadow: 0 0 12px rgba(242,154,69,.8); animation: actionMetalGlow 1.5s steps(5, end) infinite; }
.action-hammer { position: absolute; z-index: 4; left: 34%; top: 18%; width: 44px; height: 22px; border: 3px solid #24242b; background: #77747a; box-shadow: inset 0 5px #a8a4a8; transform-origin: 80% 180%; animation: actionHammerStrike 1.5s steps(7, end) infinite; }
.action-hammer::after { content: ""; position: absolute; right: 4px; top: 17px; width: 7px; height: 58px; background: #9b6738; border: 2px solid #3e2b24; transform: rotate(-9deg); transform-origin: top; }
.action-spark { position: absolute; z-index: 5; left: 50%; top: 50%; width: 5px; height: 5px; background: #fff2ad; box-shadow: 0 0 8px #f29a45; opacity: 0; animation: actionForgeSpark 1.5s steps(6, end) infinite; }
.action-spark.spark-one { --spark-x: -39px; --spark-y: -35px; }
.action-spark.spark-two { --spark-x: 34px; --spark-y: -28px; animation-delay: 80ms; }
.action-spark.spark-three { --spark-x: 46px; --spark-y: 8px; animation-delay: 140ms; }
@keyframes actionHammerStrike { 0%,34% { transform: rotate(-28deg); } 52%,62% { transform: rotate(24deg); } 76%,100% { transform: rotate(-28deg); } }
@keyframes actionMetalGlow { 0%,38%,100% { background: #bb6841; box-shadow: 0 0 4px rgba(242,154,69,.35); } 52%,72% { background: #ffd16b; box-shadow: 0 0 16px rgba(242,154,69,.95); } }
@keyframes actionForgeSpark { 0%,46% { opacity: 0; transform: translate(0,0) scale(.4); } 54% { opacity: 1; } 78%,100% { opacity: 0; transform: translate(var(--spark-x),var(--spark-y)) scale(1.2); } }

@media (max-width: 680px) {
  .role-action-layer { min-height: 102px; grid-template-columns: 126px minmax(0, 1fr); gap: 9px; }
  .role-action-layer.is-compact { min-height: 78px; grid-template-columns: 88px minmax(0, 1fr); }
  .role-action-media { min-height: 72px; }
  .role-action-scene { min-height: 84px; }
  .is-compact .role-action-scene { min-height: 64px; }
  .role-action-copy strong { font-size: 11px; }
  .role-action-copy small { font-size: 7px; }
  .action-mage-scene { transform: translate(-50%, -50%) scale(.82) rotate(45deg); }
  .action-target { transform: translateY(-50%) scale(.82); transform-origin: center; }
  .action-blacksmith-scene { transform: scale(.84); transform-origin: center; }
}

/* Focus map: a flat, readable overworld for the timer journey. */
.focus-screen-page.is-focus-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 160;
  width: 100vw;
  height: 100dvh;
  min-height: 100dvh;
  margin: 0;
  padding: clamp(18px, 4vw, 54px);
  overflow: auto;
  background: #12131e;
}
.focus-screen-page.is-focus-fullscreen .focus-screen { min-height: calc(100dvh - clamp(36px, 8vw, 108px)); }
.focus-head-actions { display: flex; align-items: flex-start; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.focus-fullscreen-button { display: inline-flex; align-items: center; gap: 7px; min-height: 31px; border: 2px solid #4a4665; padding: 7px 9px; background: #202132; color: #e8e2fa; font: 800 9px var(--font-pixel-mono); text-transform: uppercase; cursor: pointer; box-shadow: 3px 3px 0 #0d0e16; }
.focus-fullscreen-button span { color: #e5b95d; font-size: 14px; line-height: .7; }
.focus-fullscreen-button:hover { border-color: #e5b95d; color: #fff6ca; }
.focus-map { isolation: isolate; min-height: 330px; border-color: #4a4665; background: #536b57; image-rendering: pixelated; }
.focus-map::after { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: .22; background-image: linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px), linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px); background-size: 24px 24px; mix-blend-mode: screen; }
.focus-map-terrain { position: absolute; inset: 0; z-index: 0; overflow: hidden; background: linear-gradient(160deg, #607b5d 0 34%, #6d875e 34% 58%, #4d6854 58% 100%); }
.focus-map-terrain::before, .focus-map-terrain::after { content: ""; position: absolute; width: 38%; height: 34%; opacity: .62; background: #789164; clip-path: polygon(4% 26%, 26% 8%, 55% 15%, 78% 4%, 100% 28%, 93% 61%, 70% 76%, 40% 69%, 17% 91%, 0 65%); }
.focus-map-terrain::before { left: -3%; top: 5%; }
.focus-map-terrain::after { right: -4%; bottom: 7%; transform: rotate(180deg); }
.focus-map-terrain i { position: absolute; width: 10px; height: 10px; background: #90a86c; box-shadow: 7px 0 #90a86c, 0 7px #90a86c, 7px 7px #90a86c; opacity: .72; }
.focus-map-terrain i:nth-child(1) { left: 15%; top: 20%; }
.focus-map-terrain i:nth-child(2) { left: 45%; top: 15%; transform: scale(.7); }
.focus-map-terrain i:nth-child(3) { left: 84%; top: 52%; transform: scale(1.3); }
.focus-map-terrain i:nth-child(4) { left: 33%; top: 83%; transform: scale(.8); }
.focus-map-terrain i:nth-child(5) { left: 67%; top: 78%; transform: scale(.65); }
.focus-map-sky { position: absolute; inset: 0 0 47%; z-index: 1; opacity: .52; background: linear-gradient(180deg, #3d4963, transparent); pointer-events: none; }
.focus-map-sky .focus-moon { right: 10%; top: 15%; }
.focus-map-route { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.focus-map-route svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.focus-route-shadow, .focus-route-line { fill: none; stroke-linecap: square; stroke-linejoin: bevel; vector-effect: non-scaling-stroke; }
.focus-route-shadow { stroke: rgba(40,48,42,.5); stroke-width: 12; }
.focus-route-line { stroke: #d6bc79; stroke-width: 7; stroke-dashoffset: 0; filter: drop-shadow(2px 3px 0 rgba(42,42,36,.28)); transition: stroke-dasharray .8s linear; }
.focus-map-waypoint { position: absolute; z-index: 3; width: 13px; height: 13px; transform: translate(-50%, -50%) rotate(45deg); border: 2px solid #d6bc79; background: #52684f; box-shadow: 2px 2px 0 rgba(42,42,36,.35); }
.focus-map-waypoint.is-lit { background: #e5b95d; box-shadow: 0 0 0 3px rgba(229,185,93,.18), 2px 2px 0 rgba(42,42,36,.35); }
.focus-map-waypoint i { position: absolute; inset: 3px; background: #eff0c4; }
.focus-map .focus-monster { left: var(--monster-x, 50%); top: var(--monster-y, 50%); bottom: auto; z-index: 5; width: 100px; transform: translate(-50%, -50%); }
.focus-map .focus-monster-sprite { transform: scale(1.18); }
.focus-map .focus-monster strong { margin-top: 4px; color: #fff5d4; text-shadow: 2px 2px #35433a; }
.focus-map .focus-monster small { color: #e2e0b1; text-shadow: 1px 1px #35433a; }
.focus-map .focus-monster.is-cleared { transform: translate(-50%, -50%); }
.focus-map .focus-monster.is-cleared .focus-monster-sprite { animation: focusMonsterDefeat .46s steps(3, end); }
.focus-map .focus-adventure-pet { left: 8%; top: 80%; bottom: auto; z-index: 7; width: 92px; transform: translate(-50%, -50%); transition: left .8s linear, top .8s linear; }
.focus-map .focus-adventure-pet .default-pet.compact { transform: scale(.5); margin: -52px -31px; }
.focus-map .focus-adventure-pet > span { margin-top: -3px; color: #fff7c9; text-shadow: 2px 2px #35433a; }
.focus-map .focus-flag { left: 92%; top: 20%; bottom: auto; z-index: 5; transform: translate(-50%, -50%); }
.focus-map-caption { position: absolute; left: 14px; bottom: 12px; z-index: 8; display: flex; align-items: center; gap: 6px; padding: 6px 8px; border: 2px solid rgba(36,50,42,.55); background: rgba(39,53,44,.72); color: #ecedc5; font: 700 8px var(--font-pixel-mono); }
.map-dot { width: 7px; height: 7px; display: inline-block; background: #e5b95d; }
.map-dot.threat { margin-left: 7px; background: #d87569; }

@media (max-width: 680px) {
  .focus-screen-page.is-focus-fullscreen { padding: 12px 8px 18px; }
  .focus-screen-page.is-focus-fullscreen .focus-screen { min-height: calc(100dvh - 30px); }
  .focus-head-actions { gap: 6px; }
  .focus-fullscreen-button { min-height: 28px; padding: 6px 7px; font-size: 8px; }
  .focus-map { min-height: 248px; }
  .focus-map .focus-monster { width: 70px; }
  .focus-map .focus-monster-sprite { transform: scale(.85); }
  .focus-map .focus-monster strong { font-size: 6px; }
  .focus-map .focus-monster small { display: none; }
  .focus-map .focus-adventure-pet { width: 70px; }
  .focus-map .focus-adventure-pet .default-pet.compact { transform: scale(.39); margin: -60px -43px; }
  .focus-map-caption { left: 8px; bottom: 8px; font-size: 7px; }
}

.role-summary {
  min-height: 460px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: #fff;
  box-shadow: 0 12px 34px rgba(31,29,43,.06);
  display: flex;
  flex-direction: column;
}
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.text-link { border: 0; padding: 0; background: transparent; color: var(--violet); font-size: 12px; }

.media-slot {
  min-height: 278px;
  border: 1px dashed #9e9fac;
  border-radius: 6px;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(150deg, rgba(117,102,244,.11), transparent 50%),
    #f0eff4;
}
.media-slot::before {
  content: "";
  position: absolute;
  width: 150px;
  height: 150px;
  border: 1px solid rgba(117,102,244,.25);
  border-radius: 50%;
  box-shadow: 0 0 0 28px rgba(117,102,244,.05);
}
.media-slot.has-media::before { display: none; }
.media-slot video, .media-slot > img { width: 100%; height: 100%; display: block; object-fit: cover; }
.media-slot-label { position: relative; text-align: center; color: #777887; }
.media-slot-label strong { display: block; margin-bottom: 5px; color: #3d3e4b; font-size: 13px; }
.media-slot-label span { font-size: 11px; }

.pet-stage { border: 2px solid #aaa49a; background-color: #e7e3da; background-image: linear-gradient(45deg, rgba(48,43,53,.045) 25%, transparent 25%, transparent 75%, rgba(48,43,53,.045) 75%), linear-gradient(45deg, rgba(48,43,53,.045) 25%, transparent 25%, transparent 75%, rgba(48,43,53,.045) 75%); background-position: 0 0, 8px 8px; background-size: 16px 16px; }
.pet-stage::before { width: 168px; height: 168px; border: 2px solid rgba(65,54,91,.2); border-radius: 0; box-shadow: 12px 12px 0 rgba(65,54,91,.06), -12px -12px 0 rgba(65,54,91,.04); transform: rotate(45deg); }
.role-summary-media.is-focusing { border-color: #57516f; background-color: #1b1c29; background-image: linear-gradient(45deg, rgba(117,102,244,.055) 25%, transparent 25%, transparent 75%, rgba(117,102,244,.055) 75%), linear-gradient(45deg, rgba(78,185,189,.04) 25%, transparent 25%, transparent 75%, rgba(78,185,189,.04) 75%); }
.role-summary-media.is-focusing::before { border-color: rgba(155,132,235,.3); box-shadow: 12px 12px 0 rgba(101,79,163,.09), -12px -12px 0 rgba(78,185,189,.06), 0 0 28px rgba(117,102,244,.14); }
.role-summary-media .pet-video-slot { width: 100%; height: 100%; min-height: 274px; }
.role-summary-media .pet-video-slot .keyed-video-canvas { object-fit: contain; transform: scale(1.08); }
.role-summary-media.is-paused .default-pet { filter: grayscale(.28); }
.pet-caption { position: absolute; left: 12px; bottom: 10px; padding: 7px 10px; border: 2px solid #4b4650; border-radius: 0; background: #f5f0e6; box-shadow: 3px 3px 0 rgba(42,38,48,.18); }
.pet-caption strong { display: block; font-size: 12px; }
.pet-caption span { color: var(--muted); font-size: 10px; }

.default-pet { position: relative; width: 176px; height: 220px; z-index: 1; display: grid; place-items: center; }
.pixel-pet img { position: relative; z-index: 2; width: 144px; height: 180px; object-fit: contain; image-rendering: pixelated; filter: drop-shadow(6px 7px 0 rgba(34,29,42,.18)); }
.pixel-aura { position: absolute; z-index: 1; width: 150px; height: 150px; border: 3px solid rgba(108,87,170,.25); box-shadow: inset 0 0 0 7px rgba(108,87,170,.06); transform: rotate(45deg); }
.pixel-shadow { position: absolute; z-index: 0; width: 112px; height: 12px; bottom: 12px; background: rgba(32,29,37,.2); }
.mode-idle img { animation: pixelIdle 1.8s steps(2, end) infinite; }
.mode-focus .pixel-aura { border-color: rgba(229,170,69,.6); animation: pixelFocus .8s steps(2, end) infinite; }
.mode-focus img { animation: pixelIdle 1.1s steps(2, end) infinite; }
.mode-paused img { filter: grayscale(.35) drop-shadow(6px 7px 0 rgba(34,29,42,.18)); transform: translateY(4px); }
.pixel-pet.pet-mage.mode-idle img { animation: magePetIdle 2.2s steps(4, end) infinite; }
.pixel-pet.pet-archer.mode-idle img { animation: archerPetIdle 1.7s steps(3, end) infinite; }
.pixel-pet.pet-blacksmith.mode-idle img { animation: blacksmithPetIdle 2s steps(4, end) infinite; }
.pixel-pet.pet-mage.mode-focus img { animation: magePetFocus .9s steps(3, end) infinite; }
.pixel-pet.pet-archer.mode-focus img { animation: archerPetFocus .72s steps(3, end) infinite; }
.pixel-pet.pet-blacksmith.mode-focus img { animation: blacksmithPetFocus .75s steps(4, end) infinite; }
@keyframes magePetIdle { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes archerPetIdle { 0%,100% { transform: translateY(1px); } 48% { transform: translateY(-2px) scaleY(.98); } }
@keyframes blacksmithPetIdle { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-2px) rotate(-1deg); } }
@keyframes magePetFocus { 0%,100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-4px) scale(1.02); } }
@keyframes archerPetFocus { 0%,100% { transform: translateY(0); } 45% { transform: translateY(-3px) scale(1.01); } }
@keyframes blacksmithPetFocus { 0%,100% { transform: translateY(0) rotate(0); } 48% { transform: translateY(3px) rotate(2deg); } }
.default-pet.compact { width: 176px; height: 220px; transform: scale(var(--pet-art-scale, .84)); transform-origin: center; margin: -26px -12px; transition: transform .2s ease; }
.pet-video-slot { width: 150px; height: 170px; overflow: hidden; border-radius: 10px; background: rgba(18,19,31,.2); }
.pet-video-slot video, .pet-video-slot > img { width: 100%; height: 100%; display: block; object-fit: contain; image-rendering: pixelated; }
.pet-video-slot.is-effort-video { border-radius: 0; background: transparent; }
.pet-video-slot.is-effort-video .keyed-video-canvas { object-fit: cover; object-position: center; filter: saturate(1.04) contrast(1.03); }
.pet-video-slot.compact { width: 150px; height: 170px; transform: scale(var(--pet-art-scale, .84)); margin: 0; transition: transform .2s ease; }
.keyed-video { position: relative; width: 100%; height: 100%; display: block; overflow: hidden; }
.keyed-video .keyed-video-source { position: absolute !important; left: -2px; top: -2px; width: 1px !important; height: 1px !important; opacity: 0; pointer-events: none; }
.keyed-video-canvas { width: 100%; height: 100%; display: block; object-fit: cover; object-position: center; image-rendering: auto; }
@keyframes pixelIdle { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes pixelFocus { 0%,100% { box-shadow: inset 0 0 0 7px rgba(229,170,69,.08), 0 0 0 0 rgba(229,170,69,.25); } 50% { box-shadow: inset 0 0 0 7px rgba(229,170,69,.15), 0 0 0 7px rgba(229,170,69,.12); } }

.level-block { margin-top: auto; padding-top: 16px; }
.level-line { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.level-line strong { font-size: 19px; }
.level-line span { color: var(--muted); font-size: 11px; }
.meter { height: 6px; margin-top: 10px; overflow: hidden; border-radius: 4px; background: #ebe9e5; }
.meter span { display: block; height: 100%; background: var(--violet); }

.stats-row {
  margin-top: 18px;
  border-block: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: rgba(255,255,255,.38);
}
.stat { padding: 22px 20px; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat-label { display: block; margin-bottom: 8px; color: var(--muted); font-size: 11px; }
.stat strong { font-size: 24px; }
.stat small { margin-left: 4px; color: var(--muted); }

.section { margin-top: 34px; }
.section-header { margin-bottom: 14px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.section-header p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }

.dashboard-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.panel { border: 1px solid var(--line); border-radius: 8px; padding: 20px; background: #fff; }

.todo-panel { padding: 0; overflow: hidden; }
.todo-panel > .section-header { margin: 0; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.todo-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; }
.todo-list { min-width: 0; padding: 0 20px; }
.todo-item { min-height: 64px; display: grid; grid-template-columns: 24px minmax(0, 1fr) 34px 34px; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); }
.todo-item:last-child { border-bottom: 0; }
.todo-check { width: 20px; height: 20px; position: relative; }
.todo-check input { position: absolute; opacity: 0; pointer-events: none; }
.todo-check span { width: 18px; height: 18px; display: block; border: 2px solid #b6b3be; border-radius: 4px; background: #fff; }
.todo-check input:checked + span { border-color: var(--violet); background: var(--violet); box-shadow: inset 0 0 0 4px #fff; }
.todo-copy { min-width: 0; }
.todo-copy strong, .todo-copy span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.todo-copy strong { font-size: 13px; }
.todo-copy span { margin-top: 3px; color: var(--muted); font-size: 10px; }
.todo-item.is-done .todo-copy { opacity: .52; }
.todo-item.is-done .todo-copy strong { text-decoration: line-through; }
.todo-start, .todo-delete { width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 4px; background: #fff; color: var(--ink); }
.todo-start { color: var(--violet); font-size: 12px; }
.todo-delete { color: #9b6663; font-size: 18px; }
.todo-composer { padding: 16px; border-left: 1px solid var(--line); display: grid; align-content: start; gap: 8px; background: #f7f6f3; }
.todo-composer .field, .calendar-sidebar .field { min-height: 40px; border-color: #d6d3cd; background: #fff; color: var(--ink); }
.todo-empty { padding: 24px 0; color: var(--muted); font-size: 12px; }

.daily-orbit { min-height: 272px; display: grid; grid-template-columns: 180px 1fr; align-items: center; gap: 22px; }
.orbit {
  --progress: 56%;
  width: 154px;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--violet) var(--progress), #eceaf5 0);
  position: relative;
}
.orbit::before { content: ""; position: absolute; inset: 14px; border-radius: 50%; background: #fff; }
.orbit-content { position: relative; text-align: center; }
.orbit-content strong { display: block; font: 500 28px var(--font-pixel-mono); }
.orbit-content span { color: var(--muted); font-size: 11px; }
.daily-copy p { margin: 8px 0 20px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.daily-orbit.role-archer .orbit { background: conic-gradient(#d8a447 var(--progress), #f2eddf 0); }
.daily-orbit.role-blacksmith .orbit { background: conic-gradient(#d7793d var(--progress), #f1e3d8 0); }

.classroom-preview { min-height: 272px; position: relative; overflow: hidden; color: #fff; background: #242331; }
.classroom-preview::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .35;
  background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 32px 32px;
}
.classroom-preview.role-archer { background: #303025; }
.classroom-preview.role-blacksmith { background: #34251f; }
.classroom-copy { position: relative; z-index: 1; }
.classroom-copy p { color: #aeb0bf; font-size: 13px; }
.table-scene { position: absolute; z-index: 3; left: 8%; right: 8%; bottom: 25px; height: 54px; border: 3px solid #3b292a; border-radius: 2px; background: #8a5c46; box-shadow: inset 0 9px 0 #a9775d, 0 12px 0 -6px #171721; transform: perspective(300px) rotateX(48deg); }
.table-scene i { position: absolute; top: 12px; width: 18px; height: 12px; border: 2px solid #312b38; background: #e8d58f; box-shadow: 3px 3px 0 rgba(20,18,28,.25); }
.table-scene i:nth-child(1) { left: 18%; transform: rotate(-8deg); }
.table-scene i:nth-child(2) { left: 48%; width: 14px; background: #78c5c2; transform: rotate(45deg); }
.table-scene i:nth-child(3) { right: 17%; background: #d98775; transform: rotate(7deg); }
.student-row { position: absolute; z-index: 2; left: 7%; right: 7%; bottom: 43px; display: flex; align-items: flex-end; justify-content: space-around; pointer-events: none; }
.classroom-character { position: relative; width: 70px; height: 92px; display: grid; place-items: end center; }
.classroom-character img { width: 72px; height: 88px; display: block; object-fit: contain; image-rendering: pixelated; filter: drop-shadow(3px 4px 0 rgba(7,8,13,.36)); }
.classroom-character:nth-child(2) { transform: translateY(7px) scale(.93); }
.classroom-character:nth-child(3) { transform: translateY(2px) scale(1.04); }
.classroom-character:nth-child(4) { transform: translateY(8px) scale(.9); }
.classroom-character small { position: absolute; left: 50%; bottom: 5px; padding: 2px 4px; border: 1px solid rgba(255,255,255,.55); background: rgba(18,19,29,.82); color: #fff; font-size: 7px; white-space: nowrap; transform: translateX(-50%); }
.classroom-bubble { position: absolute; z-index: 3; left: 50%; bottom: calc(100% - 4px); width: max-content; max-width: 92px; padding: 4px 6px; border: 2px solid #383541; background: #fffdf5; color: #302d36; font-size: 7px; line-height: 1.3; white-space: nowrap; transform: translateX(-50%); box-shadow: 2px 2px 0 rgba(0,0,0,.24); }
.classroom-bubble::after { content: ""; position: absolute; left: 50%; bottom: -4px; width: 6px; height: 6px; border-right: 2px solid #383541; border-bottom: 2px solid #383541; background: #fffdf5; transform: translateX(-50%) rotate(45deg); }
.online-count { position: absolute; right: 18px; top: 18px; color: #d6d6df; font: 500 11px var(--font-pixel-mono); }

.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
table { width: 100%; border-collapse: collapse; min-width: 650px; }
th, td { padding: 15px 18px; border-bottom: 1px solid var(--line); text-align: left; font-size: 13px; }
th { color: var(--muted); font-size: 11px; font-weight: 500; }
tr:last-child td { border-bottom: 0; }
.type-tag { padding: 4px 8px; border-radius: 4px; background: #eeecfb; color: #594fa0; font-size: 11px; }

.page-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 360px); gap: 18px; }
.role-selector { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 18px; }
.role-option { border: 1px solid var(--line); border-radius: 6px; padding: 11px 13px; background: #fff; display: flex; align-items: center; gap: 10px; text-align: left; }
.role-option.active { border-color: var(--violet); box-shadow: inset 0 0 0 1px var(--violet); }
.role-option strong { display: block; }
.role-option small { display: block; margin-top: 2px; color: var(--muted); font-size: 10px; }
.role-swatch { width: 34px; height: 34px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; background: var(--pet-main); color: #fff; font-size: 12px; }
.role-swatch.pet-mage { --pet-main: #7566f4; }
.role-swatch.pet-archer { --pet-main: #d49a39; }
.role-swatch.pet-blacksmith { --pet-main: #bd6d3d; }

.growth-road-panel { margin: 0 0 18px; }
.growth-tier-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.growth-tier-list.tier-count-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.growth-tier { min-width: 0; min-height: 92px; padding: 10px; border: 1px solid var(--line); border-radius: 6px; display: grid; grid-template-columns: 68px minmax(0, 1fr); align-items: center; gap: 11px; background: #f8f7f4; color: var(--ink); text-align: left; transition: border-color .18s, background .18s, transform .18s; }
.growth-tier:hover { border-color: #aaa3db; transform: translateY(-2px); }
.growth-tier.active { border-color: var(--violet); background: #f0edff; box-shadow: inset 0 0 0 1px var(--violet); }
.growth-tier-art { --tier-accent: #8e7df0; position: relative; width: 68px; height: 68px; overflow: hidden; border: 3px solid #45414d; display: block; background: #252633; image-rendering: pixelated; box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--tier-accent) 52%, transparent); }
.growth-tier-art::before { content: ""; position: absolute; z-index: 0; inset: 0; background: linear-gradient(90deg, transparent 47%, color-mix(in srgb, var(--tier-accent) 22%, transparent) 47% 53%, transparent 53%), linear-gradient(transparent 47%, color-mix(in srgb, var(--tier-accent) 22%, transparent) 47% 53%, transparent 53%); transform: rotate(45deg) scale(.72); }
.growth-tier-art::after { content: ""; position: absolute; z-index: 3; inset: 4px; border: 1px solid color-mix(in srgb, var(--tier-accent) 65%, transparent); pointer-events: none; }
.growth-tier-art > img { position: absolute; z-index: 2; left: 50%; bottom: -2px; width: 76px; height: 72px; display: block; object-fit: contain; object-position: center bottom; image-rendering: pixelated; filter: drop-shadow(2px 3px 0 rgba(8,9,14,.38)); transform: translateX(-50%); }
.growth-tier-art.role-mage > img { width: 80px; height: 80px; bottom: -8px; object-fit: cover; object-position: 55% 18%; }
.growth-tier-art.rank-1 > img { transform: translateX(-50%) scale(1.05); }
.growth-tier-art.rank-2 > img { transform: translateX(-50%) scale(1.14); filter: saturate(1.12) brightness(1.08) drop-shadow(2px 3px 0 rgba(8,9,14,.38)); }
.growth-tier-emblem { position: absolute; z-index: 1; inset: 11px; border: 2px solid color-mix(in srgb, var(--tier-accent) 72%, transparent); transform: rotate(45deg); }
.growth-tier-emblem i, .growth-tier-emblem b { position: absolute; width: 5px; height: 5px; display: block; background: var(--tier-accent); }
.growth-tier-emblem i { left: -3px; top: -3px; box-shadow: 43px 0 var(--tier-accent), 0 43px var(--tier-accent), 43px 43px var(--tier-accent); }
.growth-tier-emblem b { left: 19px; top: 19px; background: #f3ce71; box-shadow: 0 0 0 4px color-mix(in srgb, var(--tier-accent) 18%, transparent); }
.growth-tier-art.rank-1 { --tier-accent: #65c3c4; background: #203438; }
.growth-tier-art.rank-1 .growth-tier-emblem { inset: 8px; border-style: double; }
.growth-tier-art.rank-2 { --tier-accent: #e8b956; background: #30263b; box-shadow: inset 0 0 0 2px #9d83df, inset 0 0 0 5px rgba(232,185,86,.12); }
.growth-tier-art.rank-2 .growth-tier-emblem { inset: 7px; border: 3px double var(--tier-accent); }
.growth-tier-art.role-archer { --tier-accent: #e1ad4f; background: #343025; }
.growth-tier-art.role-archer > img { width: 82px; height: 82px; bottom: -8px; }
.growth-tier-art.role-blacksmith { --tier-accent: #e48a45; background: #35261f; }
.growth-tier-art.role-blacksmith > img { inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: center; filter: saturate(1.05) contrast(1.03); transform: none; }
.growth-tier-art.role-blacksmith.rank-1 > img { transform: scale(1.05); }
.growth-tier-art.role-blacksmith.rank-2 > img { transform: scale(1.11); filter: saturate(1.12) contrast(1.05) brightness(1.04); }
.growth-tier-copy { min-width: 0; }
.growth-tier-copy small, .growth-tier-copy strong, .growth-tier-copy em { display: block; }
.growth-tier-copy small { margin-bottom: 4px; color: var(--muted); font: 500 10px var(--font-pixel-mono); }
.growth-tier-copy strong { font-size: 14px; }
.growth-tier-copy em { margin-top: 7px; color: var(--violet); font-size: 10px; font-style: normal; }
.growth-tier:not(.unlocked) .growth-tier-copy em { color: #b06e50; }
.role-page-grid { align-items: start; }
.preview-status { padding: 4px 8px; border: 1px solid #d9d4f4; border-radius: 4px; color: var(--violet); font: 500 10px var(--font-pixel-mono); }
.role-tier-preview { position: relative; min-height: 360px; overflow: hidden; border: 2px solid #514b5a; display: grid; place-items: center; background: #dad7d0; image-rendering: pixelated; }
.role-tier-preview.has-media video { width: 100%; height: 360px; display: block; object-fit: cover; image-rendering: pixelated; }
.role-tier-preview.has-media > img { width: 100%; height: 360px; display: block; padding: 18px 22px 58px; object-fit: contain; image-rendering: auto; }
.role-tier-preview.has-media > .keyed-video { width: 100%; height: 360px; }
.role-tier-preview.has-media > .keyed-video .keyed-video-canvas { object-fit: contain; padding: 18px 22px 58px; }
.role-tier-preview::before { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 68%, rgba(24,23,32,.74)), linear-gradient(90deg, rgba(73,63,100,.06) 1px, transparent 1px), linear-gradient(rgba(73,63,100,.06) 1px, transparent 1px); background-size: auto, 16px 16px, 16px 16px; }
.tier-rune-field { position: absolute; width: 224px; height: 224px; border: 3px solid rgba(117,102,244,.38); transform: rotate(45deg); }
.tier-rune-field span { position: absolute; inset: 28px; border: 2px solid rgba(117,102,244,.28); }
.tier-rune-field span:nth-child(2) { inset: 55px; transform: rotate(45deg); }
.tier-rune-field span:nth-child(3) { inset: 84px; background: rgba(241,198,95,.38); box-shadow: 0 0 22px rgba(241,198,95,.35); }
.tier-pet-art { position: relative; z-index: 2; transform: translateY(-12px); }
.tier-preview-caption { position: absolute; z-index: 4; left: 16px; right: 16px; bottom: 14px; color: #fff; }
.tier-preview-caption span, .tier-preview-caption strong, .tier-preview-caption small { display: block; }
.tier-preview-caption span { color: #d8d2ef; font: 500 10px var(--font-pixel-mono); }
.tier-preview-caption strong { margin-top: 3px; font-size: 19px; }
.tier-preview-caption small { max-width: 430px; margin-top: 3px; color: #d5d3dc; font-size: 10px; }
.role-tier-preview.rank-1 { background: #cbd8d7; }
.role-tier-preview.rank-1 .tier-rune-field { width: 260px; height: 260px; border-color: rgba(78,185,189,.65); box-shadow: 0 0 0 12px rgba(78,185,189,.08), 0 0 28px rgba(78,185,189,.28); animation: tierRune 6s steps(12, end) infinite; }
.role-tier-preview.rank-2 { background: #cfc7d8; }
.role-tier-preview.rank-2 .tier-rune-field { width: 294px; height: 294px; border: 4px double rgba(229,170,69,.82); box-shadow: 0 0 0 16px rgba(117,102,244,.12), 0 0 38px rgba(229,170,69,.32); animation: tierRune 4s steps(12, end) infinite reverse; }
.role-tier-preview.rank-2 .tier-rune-field span { border-color: rgba(241,120,99,.48); }
.role-tier-preview.role-archer { background: #d9d2bf; }
.role-tier-preview.role-archer .tier-rune-field { border-color: rgba(207,154,55,.68); border-radius: 50%; transform: rotate(45deg) scaleY(.72); }
.role-tier-preview.role-archer .tier-rune-field span { border-color: rgba(77,119,114,.48); border-radius: 50%; }
.role-tier-preview.role-blacksmith { background: #d8cbbf; }
.role-tier-preview.role-blacksmith .tier-rune-field { border-color: rgba(205,111,55,.68); transform: rotate(45deg) scale(.86); }
.role-tier-preview.role-blacksmith .tier-rune-field span { border-color: rgba(94,74,65,.44); }
@keyframes tierRune { to { transform: rotate(405deg); } }

.role-page { position: relative; min-height: 100%; }
.role-level-up-overlay { position: absolute; z-index: 40; inset: 0; min-height: 100%; padding: 54px 24px 90px; display: grid; align-items: start; justify-items: center; background: rgba(25,25,35,.88); backdrop-filter: blur(8px); }
.level-up-stage { --level-accent: #8f82e9; position: sticky; top: 24px; width: min(520px, 100%); min-height: 520px; overflow: hidden; border: 4px solid #3a3548; padding: 34px 28px 28px; display: flex; flex-direction: column; align-items: center; color: #fff; background: #242432; box-shadow: inset 0 0 0 3px #8b80b8, 10px 10px 0 rgba(17,16,24,.4); text-align: center; image-rendering: pixelated; animation: levelStageEnter .45s steps(6, end) both; }
.level-up-stage.role-archer { --level-accent: #e1ad4f; background: #302d22; box-shadow: inset 0 0 0 3px #9f7f43, 10px 10px 0 rgba(17,16,24,.4); }
.level-up-stage.role-blacksmith { --level-accent: #e48a45; background: #34251f; box-shadow: inset 0 0 0 3px #a8643c, 10px 10px 0 rgba(17,16,24,.4); }
.level-up-stage::before { content: ""; position: absolute; inset: 0; opacity: .22; background-image: linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px); background-size: 22px 22px; pointer-events: none; }
.level-up-stage > p { position: relative; z-index: 4; margin: 0; color: #f3ce71; font: 800 17px var(--font-pixel-mono); text-shadow: 3px 3px 0 #473b2e; animation: levelLabelEnter .65s steps(7, end) both; }
.level-up-pet { position: relative; z-index: 3; width: 230px; height: 240px; margin: 8px 0 -2px; display: grid; place-items: center; }
.level-up-pet img { position: relative; z-index: 3; width: 210px; height: 225px; object-fit: contain; image-rendering: pixelated; filter: drop-shadow(6px 8px 0 rgba(8,8,13,.38)); animation: levelPetRise 1.2s steps(10, end) both; }
.level-up-aura { position: absolute; z-index: 1; width: 170px; height: 170px; border: 4px double var(--level-accent); box-shadow: 0 0 0 12px color-mix(in srgb, var(--level-accent) 12%, transparent), inset 0 0 24px color-mix(in srgb, var(--level-accent) 25%, transparent); transform: rotate(45deg); animation: levelAura 1.4s steps(12, end) both; }
.level-up-stage h2 { position: relative; z-index: 4; margin: 2px 0 10px; font-size: 25px; }
.level-up-number { position: relative; z-index: 4; display: flex; align-items: center; gap: 14px; font: 800 18px var(--font-pixel-mono); }
.level-up-number span { color: #a9a7b6; }
.level-up-number i { color: var(--level-accent); font-size: 28px; font-style: normal; }
.level-up-number strong { color: #f3ce71; font-size: 25px; }
.level-up-unlock { position: relative; z-index: 4; margin: 12px 0 18px; border: 2px solid color-mix(in srgb, var(--level-accent) 70%, #fff); padding: 8px 18px; background: rgba(12,12,19,.35); }
.level-up-unlock span, .level-up-unlock strong { display: block; }
.level-up-unlock span { color: #bcb9ca; font-size: 8px; }
.level-up-unlock strong { margin-top: 4px; color: #fff; font-size: 13px; }
.level-up-continue { position: relative; z-index: 4; min-width: 150px; }
.level-up-rays { position: absolute; z-index: 0; inset: 88px 50% auto auto; }
.level-up-rays i { position: absolute; left: -170px; top: 88px; width: 340px; height: 2px; background: color-mix(in srgb, var(--level-accent) 45%, transparent); transform: rotate(calc(var(--ray) * 60deg)); animation: levelRay 1.8s steps(12, end) both; }
.level-up-rays i:nth-child(1) { --ray: 0; }
.level-up-rays i:nth-child(2) { --ray: 1; }
.level-up-rays i:nth-child(3) { --ray: 2; }
.level-up-stars { position: absolute; z-index: 2; inset: 0; pointer-events: none; }
.level-up-stars i { position: absolute; width: 7px; height: 7px; background: #f7de83; box-shadow: 9px 0 var(--level-accent), 0 9px var(--level-accent); animation: levelStar 1.5s steps(8, end) both; }
.level-up-stars i:nth-child(1) { left: 18%; top: 22%; animation-delay: .1s; }
.level-up-stars i:nth-child(2) { left: 77%; top: 18%; animation-delay: .3s; }
.level-up-stars i:nth-child(3) { left: 12%; top: 51%; animation-delay: .5s; }
.level-up-stars i:nth-child(4) { left: 84%; top: 48%; animation-delay: .2s; }
.level-up-stars i:nth-child(5) { left: 25%; top: 70%; animation-delay: .65s; }
.level-up-stars i:nth-child(6) { left: 72%; top: 68%; animation-delay: .45s; }
@keyframes levelStageEnter { from { opacity: 0; transform: translateY(18px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes levelLabelEnter { 0%,35% { opacity: 0; transform: translateY(-10px) scale(.8); } 100% { opacity: 1; transform: none; } }
@keyframes levelPetRise { 0% { opacity: 0; transform: translateY(22px) scale(.72); filter: brightness(3) drop-shadow(6px 8px 0 rgba(8,8,13,.2)); } 55% { opacity: 1; transform: translateY(-6px) scale(1.07); filter: brightness(1.8) drop-shadow(0 0 18px var(--level-accent)); } 100% { opacity: 1; transform: none; filter: drop-shadow(6px 8px 0 rgba(8,8,13,.38)); } }
@keyframes levelAura { 0% { opacity: 0; transform: rotate(0) scale(.35); } 55% { opacity: 1; transform: rotate(135deg) scale(1.15); } 100% { opacity: .82; transform: rotate(225deg) scale(1); } }
@keyframes levelRay { from { opacity: 0; transform: rotate(calc(var(--ray) * 60deg)) scaleX(.15); } 55% { opacity: 1; } to { opacity: .22; transform: rotate(calc(var(--ray) * 60deg)) scaleX(1); } }
@keyframes levelStar { 0%,25% { opacity: 0; transform: translateY(8px) scale(.3); } 60% { opacity: 1; transform: translateY(-4px) scale(1.2); } 100% { opacity: .7; transform: none; } }

.equipment-panel { min-width: 0; }
.equipment-count { color: var(--muted); font: 500 10px var(--font-pixel-mono); }
.equipment-board { min-height: 388px; padding: 14px; border: 3px solid #474550; box-shadow: inset 0 0 0 3px #c7c3ba, inset 0 0 0 5px #77737a; display: grid; grid-template-columns: 64px minmax(128px, 1fr) 64px; align-items: center; gap: 10px; background: #a5a19e; image-rendering: pixelated; }
.equipment-column { display: grid; gap: 9px; }
.equipment-slot { position: relative; width: 64px; height: 64px; padding: 4px; border: 3px solid #57545b; border-top-color: #3f3d44; border-left-color: #3f3d44; border-right-color: #d5d1c8; border-bottom-color: #d5d1c8; border-radius: 0; display: grid; place-items: center; background: #7e7a80; color: #f6f1e7; }
.equipment-slot:hover:not(:disabled) { background: #8b858f; }
.equipment-slot:active:not(:disabled) { transform: translateY(1px); }
.equipment-slot.active { border-color: #f0c55e; box-shadow: inset 0 0 0 2px #fff0a4, 0 0 0 2px #6f5428; background: #665f73; }
.equipment-slot:disabled { cursor: default; opacity: .45; }
.equipment-slot small { position: absolute; left: 2px; right: 2px; bottom: 2px; overflow: hidden; color: #f7f4ec; font-size: 8px; text-align: center; white-space: nowrap; text-shadow: 1px 1px #36343a; }
.equipment-item { position: relative; width: 27px; height: 27px; border: 2px solid #49454e; background: #a18af3; box-shadow: inset 4px 4px rgba(255,255,255,.18), 3px 3px rgba(48,44,52,.22); transform: rotate(45deg); }
.equipment-slot.item-2 .equipment-item { border-radius: 50%; background: #58b7b5; }
.equipment-slot.item-3 .equipment-item { width: 11px; background: #e7b657; box-shadow: -8px 8px 0 #e7b657, 8px -8px 0 #e7b657, inset 3px 3px rgba(255,255,255,.2); }
.equipment-slot.item-4 .equipment-item { width: 30px; height: 17px; background: #d96859; transform: rotate(-16deg); }
.equipment-slot.item-5 .equipment-item { width: 21px; height: 29px; background: linear-gradient(90deg, #ece0ad 45%, #63526f 45%, #63526f 55%, #ece0ad 55%); transform: none; }
.equipment-slot.empty .equipment-item { display: none; }
.equipment-character { min-width: 0; min-height: 340px; padding: 8px 6px; border: 2px solid #5d5962; display: flex; flex-direction: column; align-items: center; justify-content: center; background: #8e8a8f; box-shadow: inset 0 0 0 3px rgba(236,232,223,.35); }
.equipment-character-art { width: 100%; height: 218px; overflow: hidden; display: grid; place-items: center; }
.equipment-character-art .default-pet.compact { transform: scale(.72); margin: -30px; }
.equipment-character > strong { margin-top: 2px; font-size: 13px; }
.equipment-character > span { margin: 2px 0 9px; color: #4b4851; font-size: 9px; }
.equipment-character > .equipment-slot { width: 58px; height: 58px; }
.equipment-hint { margin: 10px 0 0; color: var(--muted); font-size: 10px; text-align: center; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.filter { min-height: 34px; padding: 0 12px; border: 1px solid var(--line); border-radius: 18px; background: #fff; color: var(--muted); font-size: 11px; }
.filter.active { background: var(--ink); color: #fff; border-color: var(--ink); }

.record-tabs { margin-top: 22px; display: flex; gap: 2px; border-bottom: 1px solid var(--line); }
.record-tab { min-height: 42px; padding: 0 16px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); }
.record-tab.active { border-bottom-color: var(--violet); color: var(--ink); font-weight: 700; }
.record-tab span { margin-left: 5px; padding: 2px 6px; border-radius: 9px; background: #eceaf5; color: var(--violet); font-size: 9px; }
.encounter-log-list { border-top: 1px solid var(--line); }
.encounter-log-item { min-height: 150px; padding: 22px 0; display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: 18px; border-bottom: 1px solid var(--line); }
.encounter-log-index { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid #b9b4d5; color: var(--violet); font: 500 11px var(--font-pixel-mono); transform: rotate(45deg); }
.encounter-log-index span { transform: rotate(-45deg); }
.encounter-log-meta { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 10px; }
.encounter-log-item h3 { margin: 10px 0 6px; font-size: 17px; }
.encounter-log-item p { margin: 0; color: #656570; font-size: 12px; line-height: 1.65; }
.encounter-log-item small { display: block; margin-top: 10px; color: var(--violet); }

.calendar-app { min-height: 690px; border: 1px solid #cfcdd0; display: grid; grid-template-columns: 222px minmax(0, 1fr); overflow: hidden; background: #fff; box-shadow: 0 18px 42px rgba(31,29,43,.08); }
.calendar-sidebar { min-width: 0; padding: 18px 14px; border-right: 1px solid #d8d6d8; background: rgba(239,238,239,.94); }
.calendar-sidebar > .button { width: 100%; min-height: 38px; }
.calendar-sidebar section { margin-top: 24px; }
.calendar-sidebar h3 { margin: 0 0 10px; font-size: 12px; }
.calendar-filter { min-height: 31px; display: flex; align-items: center; gap: 8px; font-size: 12px; }
.calendar-filter input { accent-color: var(--calendar-color); }
.calendar-filter span { width: 10px; height: 10px; border-radius: 50%; background: var(--calendar-color); }
.calendar-composer { display: grid; gap: 8px; }
.calendar-composer .button { width: 100%; }
.calendar-inspector { margin-top: 18px; padding: 12px 0; border-block: 1px solid #d6d4d7; display: grid; grid-template-columns: 10px minmax(0, 1fr) 28px; align-items: center; gap: 9px; }
.calendar-inspector-color { width: 9px; height: 38px; border-radius: 4px; background: var(--event-color); }
.calendar-inspector strong { display: block; font-size: 11px; }
.calendar-inspector p { margin: 3px 0 0; color: var(--muted); font-size: 9px; }
.calendar-inspector button { width: 28px; height: 28px; border: 0; background: transparent; color: #9b6663; font-size: 18px; }
.calendar-main { min-width: 0; overflow: auto; }
.calendar-toolbar { height: 58px; padding: 0 18px; display: grid; grid-template-columns: 90px 1fr 90px; align-items: center; border-bottom: 1px solid #d8d6d8; }
.calendar-toolbar > div { display: flex; gap: 6px; }
.calendar-toolbar button { width: 31px; height: 29px; border: 1px solid #c9c7ca; border-radius: 5px; background: #fff; font-size: 20px; line-height: 1; }
.calendar-toolbar h2 { margin: 0; text-align: center; font-size: 18px; }
.calendar-toolbar > span { justify-self: end; padding: 5px 10px; border: 1px solid #cac8ca; border-radius: 5px; font-size: 10px; }
.calendar-weekdays, .calendar-grid { min-width: 760px; display: grid; grid-template-columns: repeat(7, 1fr); }
.calendar-weekdays { height: 28px; border-bottom: 1px solid #d8d6d8; }
.calendar-weekdays span { display: grid; place-items: center; border-right: 1px solid #eceaec; color: #77757c; font-size: 9px; }
.calendar-grid { grid-template-rows: repeat(6, minmax(98px, 1fr)); }
.calendar-day { min-width: 0; padding: 5px; border-right: 1px solid #73747a; border-bottom: 1px solid #73747a; }
.calendar-day:nth-child(7n) { border-right: 0; }
.calendar-day.is-light-square { background: #f7f7f4; color: #34343a; }
.calendar-day.is-dark-square { background: #292a2f; color: #f2f1ed; }
.calendar-day.is-outside { color: #929198; }
.calendar-day.is-light-square.is-outside { background: #dededb; }
.calendar-day.is-dark-square.is-outside { background: #3a3b40; }
.calendar-day.is-selected { position: relative; z-index: 1; box-shadow: inset 0 0 0 2px #7566f4; }
.calendar-day-head { height: 29px; display: flex; align-items: center; justify-content: space-between; }
.calendar-day-number { width: 25px; height: 25px; margin-left: auto; border: 0; border-radius: 50%; display: grid; place-items: center; background: transparent; color: inherit; font: 500 10px var(--font-pixel-mono); }
.calendar-day-number.is-today { font-weight: 800; }
.calendar-today-pet { width: 38px; height: 32px; margin-top: -5px; overflow: hidden; display: grid; place-items: center; image-rendering: pixelated; filter: drop-shadow(2px 2px 0 rgba(0,0,0,.2)); }
.calendar-today-pet img { width: 48px; height: 48px; object-fit: contain; transform: translateY(6px); image-rendering: pixelated; }
.calendar-day-events { display: grid; gap: 3px; }
.calendar-event { min-width: 0; min-height: 38px; padding: 3px 5px; border: 0; border-left: 4px solid var(--event-color); border-radius: 3px; overflow: hidden; display: grid; grid-template-columns: 25px minmax(0, 1fr); align-items: center; gap: 5px; background: color-mix(in srgb, var(--event-color) 18%, white); color: #34323a; text-align: left; }
.calendar-event-copy { min-width: 0; display: block; }
.calendar-event-copy strong, .calendar-event-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.calendar-event-copy strong { font-size: 9px; }
.calendar-event-copy small { margin-top: 1px; color: color-mix(in srgb, var(--event-color) 72%, #222); font: 500 7px var(--font-pixel-mono); }
.calendar-event-marker { width: 11px; height: 11px; margin-left: 6px; background: var(--event-color); transform: rotate(45deg); box-shadow: 2px 2px 0 rgba(45,43,50,.18); }
.calendar-event-piece { position: relative; width: 18px; height: 23px; margin-left: 3px; display: block; color: #4a4652; filter: drop-shadow(1px 1px rgba(255,255,255,.55)); }
.calendar-event-piece::before, .calendar-event-piece::after, .calendar-event-piece i { content: ""; position: absolute; display: block; box-sizing: border-box; background: currentColor; }
.calendar-event-piece::after { left: 2px; bottom: 1px; width: 14px; height: 3px; }
.calendar-event-piece.role-mage::before { left: 6px; top: 1px; width: 7px; height: 7px; border-radius: 50%; box-shadow: -2px 7px 0 1px currentColor; }
.calendar-event-piece.role-mage i { left: 4px; top: 11px; width: 11px; height: 8px; clip-path: polygon(25% 0,75% 0,100% 100%,0 100%); }
.calendar-event-piece.role-archer::before { left: 3px; top: 2px; width: 13px; height: 17px; border: 3px solid currentColor; border-left: 0; border-radius: 0 80% 80% 0; background: transparent; }
.calendar-event-piece.role-archer i { left: 1px; top: 10px; width: 16px; height: 2px; transform: rotate(-12deg); }
.calendar-event-piece.role-blacksmith::before { left: 2px; top: 4px; width: 15px; height: 7px; clip-path: polygon(0 25%,70% 0,100% 45%,78% 100%,8% 100%); }
.calendar-event-piece.role-blacksmith i { left: 6px; top: 11px; width: 7px; height: 9px; clip-path: polygon(20% 0,80% 0,100% 100%,0 100%); }
.calendar-event.is-selected { box-shadow: inset 0 0 0 1px var(--event-color); }

.weekly-chart { height: 250px; display: flex; align-items: flex-end; gap: 14px; padding-top: 30px; }
.bar-group { flex: 1; min-width: 30px; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; text-align: center; }
.chart-bar { height: var(--h); min-height: 8px; flex: 0 0 auto; margin-bottom: 8px; border-radius: 4px 4px 1px 1px; background: #d7d3f6; }
.bar-group:nth-child(5) .chart-bar, .bar-group:nth-child(6) .chart-bar { background: var(--violet); }
.bar-group span { color: var(--muted); font-size: 10px; }

.badge-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.badge-card { min-height: 220px; border: 1px solid var(--line); border-radius: 8px; padding: 24px; background: #fff; text-align: center; }
.badge-medal { width: 86px; height: 86px; margin: 0 auto 18px; display: grid; place-items: center; border-radius: 50%; border: 8px double rgba(255,255,255,.65); background: var(--badge); color: #fff; font: 500 22px var(--font-pixel-mono); box-shadow: 0 8px 24px rgba(30,31,45,.16); }
.badge-card.locked { filter: grayscale(1); opacity: .48; }
.badge-card p { margin: 8px 0 0; color: var(--muted); font-size: 12px; }

.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.setting-list { display: grid; }
.setting-row { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--line); }
.setting-row:last-child { border-bottom: 0; }
.setting-copy strong { display: block; font-size: 13px; }
.setting-copy span { color: var(--muted); font-size: 11px; }
.toggle { width: 43px; height: 24px; border: 0; border-radius: 14px; padding: 3px; background: #d8d6d2; }
.toggle::after { content: ""; display: block; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.14); transition: transform .2s; }
.toggle.on { background: var(--violet); }
.toggle.on::after { transform: translateX(19px); }
.range { accent-color: var(--violet); }

.desktop-view {
  position: fixed;
  inset: 0;
  z-index: 80;
  overflow: hidden;
  color: #fff;
  background: #324b59 url("./assets/macos-wallpaper.jpg") center / cover no-repeat;
}
.desktop-view::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 -120px 180px rgba(10,21,27,.12);
}
.desktop-view[data-wallpaper="1"] { background-color: #40395c; background-image: linear-gradient(rgba(85,64,121,.36), rgba(27,30,53,.2)), url("./assets/macos-wallpaper.jpg"); background-blend-mode: color, normal; }
.desktop-view[data-wallpaper="2"] { background-color: #31544e; background-image: linear-gradient(rgba(39,104,91,.34), rgba(18,40,42,.12)), url("./assets/macos-wallpaper.jpg"); background-blend-mode: color, normal; }
.mac-menubar { position: relative; z-index: 50; height: 30px; padding: 0 12px; display: flex; align-items: center; justify-content: space-between; gap: 18px; background: rgba(245,245,245,.72); color: #181818; box-shadow: 0 1px 0 rgba(0,0,0,.15); backdrop-filter: blur(22px) saturate(1.4); font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif; font-size: 12px; }
.mac-menu-left, .mac-menu-right { min-width: 0; display: flex; align-items: center; gap: 17px; white-space: nowrap; }
.mac-menu-left strong { font-weight: 700; }
.mac-apple { margin-right: 1px; font-size: 16px; line-height: 1; }
.mac-menu-right { gap: 12px; font-size: 11px; }
.mac-mobile-preview { min-height: 22px; border: 0; border-radius: 5px; padding: 0 7px; display: flex; align-items: center; gap: 5px; color: #202126; background: rgba(255,255,255,.34); font: 600 10px -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif; }
.mac-mobile-preview:hover { background: rgba(255,255,255,.68); }
.mac-mobile-preview:active { transform: translateY(1px); }
.mac-mobile-preview i { position: relative; width: 9px; height: 15px; border: 1.5px solid currentColor; border-radius: 3px; }
.mac-mobile-preview i::after { content: ""; position: absolute; left: 50%; bottom: 1px; width: 2px; height: 2px; border-radius: 50%; background: currentColor; transform: translateX(-50%); }
.mac-focus-status { display: none; align-items: center; gap: 5px; color: #4a326f; font-weight: 700; }
.mac-focus-status.is-active { display: flex; }
.mac-focus-status i { width: 11px; height: 11px; border: 2px solid #4a326f; border-top-color: transparent; border-radius: 50%; transform: rotate(-35deg); filter: drop-shadow(0 0 3px rgba(117,102,244,.45)); }
.mac-focus-status b { font-size: 10px; }
.mac-control-center { width: 18px; height: 14px; display: grid; align-content: center; gap: 3px; }
.mac-control-center i { position: relative; display: block; height: 3px; border-radius: 3px; background: #1f2024; }
.mac-control-center i::after { content: ""; position: absolute; top: -1px; left: 4px; width: 5px; height: 5px; border-radius: 50%; background: #f3f3f3; border: 1px solid #1f2024; }
.mac-control-center i:last-child::after { left: 9px; }
.mac-wifi { width: 16px; height: 11px; border-top: 2px solid #1f2024; border-radius: 50% 50% 0 0; position: relative; }
.mac-wifi::before, .mac-wifi::after { content: ""; position: absolute; left: 3px; right: 3px; top: 2px; height: 7px; border-top: 2px solid #1f2024; border-radius: 50%; }
.mac-wifi::after { left: 7px; right: 7px; top: 7px; width: 3px; height: 3px; border: 0; border-radius: 50%; background: #1f2024; }
.mac-battery { width: 22px; height: 10px; padding: 1px; border: 1px solid #1f2024; border-radius: 3px; position: relative; }
.mac-battery::after { content: ""; position: absolute; right: -3px; top: 2px; width: 2px; height: 4px; border-radius: 0 2px 2px 0; background: #1f2024; }
.mac-battery i { display: block; width: 86%; height: 100%; border-radius: 1px; background: #1f2024; }
.desktop-files { position: absolute; z-index: 3; top: 54px; right: 24px; display: grid; gap: 20px; }
.mac-context-menu { position: fixed; z-index: 190; width: 224px; padding: 5px; border: 1px solid rgba(255,255,255,.72); border-radius: 8px; display: grid; background: rgba(241,241,239,.91); color: #202126; box-shadow: 0 14px 36px rgba(13,18,24,.34), inset 0 1px 0 rgba(255,255,255,.75); backdrop-filter: blur(24px) saturate(1.25); -webkit-backdrop-filter: blur(24px) saturate(1.25); }
.mac-context-menu button { min-width: 0; min-height: 27px; padding: 0 8px; border: 0; border-radius: 5px; display: flex; align-items: center; justify-content: space-between; gap: 14px; background: transparent; color: inherit; font: 500 12px -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif; text-align: left; }
.mac-context-menu button:hover { background: #7566f4; color: #fff; }
.mac-context-menu button:active { transform: translateY(1px); }
.mac-context-menu button:disabled { color: #9b9b9f; pointer-events: none; }
.mac-context-menu kbd { color: #77777c; font: 500 10px -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif; white-space: nowrap; }
.mac-context-menu button:hover kbd { color: rgba(255,255,255,.8); }
.context-menu-separator { height: 1px; margin: 4px 7px; background: rgba(62,62,67,.16); }
.desktop-file { width: 86px; border: 0; background: transparent; text-align: center; color: #fff; font-size: 11px; text-shadow: 0 1px 3px rgba(0,0,0,.72); }
.desktop-file:hover { color: #fff; }
.file-icon { width: 48px; height: 40px; margin: 0 auto 6px; border: 1px solid rgba(25,27,37,.25); border-radius: 5px; background: rgba(255,255,255,.9); box-shadow: 0 5px 12px rgba(15,16,26,.25); }
.file-folder { clip-path: polygon(0 18%, 38% 18%, 46% 0, 100% 0, 100% 100%, 0 100%); background: #e5b95d; }
.file-note { background: repeating-linear-gradient(to bottom, #f2efe7 0 7px, #9aa6b0 8px 9px); }
.file-drive { height: 43px; border-radius: 7px; background: #d9dce1; box-shadow: inset 0 -7px 0 #b6bac2, 0 5px 12px rgba(15,16,26,.25); }
.file-drive::after { content: ""; display: block; width: 5px; height: 5px; margin: 31px 0 0 36px; border-radius: 50%; background: #71b6d0; }

.pet-wrap { position: absolute; z-index: 22; left: 78%; top: 56%; width: 188px; min-height: 220px; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; overscroll-behavior: contain; }
.pet-slot, .pet-slot * { touch-action: none; user-select: none; -webkit-user-select: none; -webkit-user-drag: none; }
.pet-slot img, .pet-slot video { pointer-events: none; }
.focus-trace-wrap { position: absolute; z-index: 18; right: -10px; bottom: 52px; animation: petCharmFloat 2.2s steps(4, end) infinite alternate; }
.focus-trace-wrap:hover { animation-play-state: paused; }
.focus-trace-button { position: relative; width: 40px; height: 40px; padding: 0; border: 2px solid rgba(255,255,255,.64); border-radius: 50%; background: rgba(18,19,30,.86); color: #fff; box-shadow: 2px 3px 0 rgba(10,11,18,.32), 0 0 10px rgba(229,170,69,.18); backdrop-filter: blur(8px); }
.trace-ring { position: absolute; inset: 4px; border: 1px solid rgba(255,255,255,.18); border-radius: 50%; }
.trace-ring i { position: absolute; inset: 8px; border: 1px solid rgba(229,170,69,.7); transform: rotate(45deg); box-shadow: 0 0 6px rgba(229,170,69,.35); }
.trace-mark { position: absolute; left: 50%; top: 50%; width: 4px; height: 4px; margin: -2px; border: 1px solid rgba(255,255,255,.3); background: #3d3e4b; transform: rotate(calc(var(--trace-index) * 60deg)) translateY(-13px); }
.trace-mark.is-lit { border-color: #fff0bd; background: #e5aa45; box-shadow: 0 0 7px #e5aa45; }
.focus-trace-button > b { position: absolute; right: -5px; top: -5px; min-width: 16px; height: 16px; padding: 0 3px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.72); border-radius: 9px; background: #7566f4; color: #fff; font: 700 8px var(--font-pixel-mono); }
.focus-trace-popover { position: absolute; right: 0; bottom: calc(100% + 9px); width: 196px; padding: 12px; border: 2px solid rgba(255,255,255,.55); background: rgba(19,20,31,.94); color: #fff; box-shadow: 5px 5px 0 rgba(8,9,15,.3); }
.focus-trace-popover p, .focus-trace-popover strong, .focus-trace-popover span, .focus-trace-popover small { display: block; }
.focus-trace-popover p { margin: 0 0 6px; color: #bcbeca; font-size: 9px; }
.focus-trace-popover strong { font-size: 13px; }
.focus-trace-popover span { margin-top: 3px; color: #e5aa45; font: 500 10px var(--font-pixel-mono); }
.focus-trace-popover small { margin-top: 8px; color: #aeb0bf; font-size: 9px; }
.pet-wrap[data-snap="窗口右侧"] .focus-trace-wrap, .pet-wrap[data-snap="桌面右侧"] .focus-trace-wrap { right: auto; left: -30px; }
.pet-wrap[data-snap="窗口右侧"] .focus-trace-popover, .pet-wrap[data-snap="桌面右侧"] .focus-trace-popover { right: auto; left: 0; }
.pet-timer { position: absolute; z-index: 12; right: -8px; top: 3px; min-width: 43px; padding: 3px 5px; border: 1px solid rgba(255,255,255,.52); background: rgba(15,16,26,.88); color: #fff; box-shadow: 2px 2px 0 rgba(15,16,26,.28); font: 500 9px var(--font-pixel-mono); font-variant-numeric: tabular-nums; }
.pet-bubble { position: relative; max-width: 180px; margin: 0 auto 10px; padding: 10px 12px; border: 2px solid #3c3742; border-radius: 0; background: #fffdf5; color: var(--ink); font-size: 11px; box-shadow: 4px 4px 0 rgba(23,20,29,.24); }
.pet-bubble::after { content: ""; position: absolute; left: 50%; bottom: -6px; width: 12px; height: 12px; background: #fff; transform: translateX(-50%) rotate(45deg); }
.pet-bubble.is-encounter { border-color: #7566f4; background: #f4f1ff; animation: encounterBubbleIn .28s steps(3, end); }
.pet-bubble.is-encounter small { display: block; margin-bottom: 5px; color: #7566f4; font: 700 8px var(--font-pixel-mono); }
.pet-slot { width: 150px; height: 170px; margin: 0 auto; border: 0; border-radius: 12px; display: grid; place-items: center; position: relative; overflow: visible; background: transparent; text-align: center; cursor: grab; }
.pet-slot:active { cursor: grabbing; }
.pet-wrap.is-snapped .pet-slot::after { content: ""; position: absolute; z-index: 9; left: 50%; bottom: -5px; width: 34px; height: 3px; background: rgba(255,255,255,.72); transform: translateX(-50%); box-shadow: 0 0 8px rgba(255,255,255,.32); }
.pet-wrap[data-snap="窗口顶部"], .pet-wrap[data-snap="窗口底部"], .pet-wrap[data-snap="桌面顶部"], .pet-wrap[data-snap="桌面底部"] { animation: none; }
.pet-wrap[data-snap="窗口左侧"], .pet-wrap[data-snap="窗口右侧"], .pet-wrap[data-snap="桌面左侧"], .pet-wrap[data-snap="桌面右侧"] { animation: petWalkEdgeY 3.2s steps(7, end) infinite alternate; }
.pet-wrap[data-snap="Safari搜索框"] { width: 110px !important; min-height: 104px; animation: safariSearchWalk 5.2s steps(12, end) 1 both; }
.pet-wrap[data-snap="Safari搜索框"] .focus-trace-wrap, .pet-wrap[data-snap="Safari搜索框"] .pet-bubble { display: none; }
.pet-wrap[data-snap="Safari搜索框"] .pet-slot { width: 110px; height: 104px; transform: translateY(16px); }
.pet-wrap[data-snap="Safari搜索框"] .default-pet.compact, .pet-wrap[data-snap="Safari搜索框"] .pet-video-slot.compact { transform: scale(.4); margin: -58px -34px; }
.pet-wrap[data-easter-egg="notes-eating"] .pixel-pet img { transform-origin: 50% 78%; animation: petChomp .34s steps(2, end) infinite; }
.pet-wrap[data-easter-egg="notes-eating"] .pet-bubble { border-color: #c49347; background: #fff4cf; }
.pet-wrap[data-interaction]:not([data-interaction=""]) .pet-bubble { border-color: #7566f4; background: #f7f3ff; }
.pet-wrap[data-interaction="greet"] .pet-slot { animation: petGreeting .7s steps(5, end); }
.pet-wrap[data-interaction="progress"] .pet-slot { animation: petChecking .7s steps(4, end); }
.pet-wrap[data-interaction="encourage"] .pet-slot { animation: petEncouraging .75s steps(5, end); }
.pet-wrap[data-snap^="窗口"] .default-pet.compact, .pet-wrap[data-snap^="窗口"] .pet-video-slot.compact { transform: scale(var(--pet-snap-scale, .52)); }
.pet-wrap[data-snap^="窗口"] .pet-bubble { opacity: 0; transform: translateY(4px); transition: opacity .18s, transform .18s; }
.pet-wrap[data-snap^="窗口"]:hover .pet-bubble, .pet-wrap[data-snap^="窗口"]:has(.pet-menu) .pet-bubble { opacity: 1; transform: none; }
.pet-wrap[data-snap^="窗口"][data-interaction]:not([data-interaction=""]) .pet-bubble { opacity: 1; transform: none; }
.pet-wrap:hover, .pet-wrap:has(.pet-menu) { animation-play-state: paused; }
@keyframes petWalkEdgeY { from { transform: translateY(-16px); } to { transform: translateY(16px); } }
@keyframes safariSearchWalk {
  0% { transform: translateX(0) scaleX(1); }
  46% { transform: translateX(var(--safari-walk, 220px)) scaleX(1); }
  50% { transform: translateX(var(--safari-walk, 220px)) scaleX(-1); }
  96%, 100% { transform: translateX(0) scaleX(-1); }
}
@keyframes petChomp { from { transform: rotate(-3deg) translateY(0); } to { transform: rotate(5deg) translateY(4px); } }
@keyframes petGreeting { 0%,100% { transform: translateY(0) rotate(0); } 35% { transform: translateY(-8px) rotate(-4deg); } 65% { transform: translateY(-4px) rotate(4deg); } }
@keyframes petChecking { 0%,100% { transform: translateY(0); } 38% { transform: translateY(4px) scale(.96); } 68% { transform: translateY(-3px) scale(1.02); } }
@keyframes petEncouraging { 0%,100% { transform: translateY(0) scale(1); } 30% { transform: translateY(-10px) scale(1.04); } 55% { transform: translateY(2px) scale(.98); } 76% { transform: translateY(-5px) scale(1.02); } }
.ritual-progress.compact { position: absolute; z-index: 0; left: -18px; top: -4px; width: 186px; min-height: 186px; padding: 0; border: 0; display: block; background: transparent; pointer-events: none; }
.ritual-progress.compact .ritual-diagram { width: 186px; opacity: .98; filter: drop-shadow(0 0 7px color-mix(in srgb, var(--ritual-accent) 52%, transparent)); animation: petRitualBreathe 2.8s steps(5, end) infinite alternate; }
.ritual-progress.compact .ritual-diagram::before, .ritual-progress.compact .ritual-diagram::after { content: ""; position: absolute; pointer-events: none; }
.ritual-progress.compact .ritual-diagram::before { inset: 24px; border: 2px dotted color-mix(in srgb, var(--ritual-accent) 58%, transparent); border-radius: 50%; animation: petRitualOrbit 12s steps(24, end) infinite; }
.ritual-progress.compact .ritual-diagram::after { inset: 45px; border: 2px solid color-mix(in srgb, var(--ritual-accent) 44%, transparent); transform: rotate(45deg); box-shadow: 0 0 12px color-mix(in srgb, var(--ritual-accent) 24%, transparent); }
.ritual-progress.compact .ritual-ring { inset: 17px; border-width: 2px; box-shadow: inset 0 0 12px color-mix(in srgb, var(--ritual-accent) 20%, transparent), 0 0 12px color-mix(in srgb, var(--ritual-accent) 24%, transparent); }
.ritual-progress.compact .ritual-stroke { width: 43%; height: 3px; background: color-mix(in srgb, var(--ritual-accent) 15%, transparent); }
.ritual-progress.compact .ritual-core { width: 18px; height: 18px; background: rgba(15,16,26,.72); box-shadow: 0 0 18px color-mix(in srgb, var(--ritual-accent) 68%, transparent); }
@keyframes petRitualBreathe { from { opacity: .78; transform: scale(.96); } to { opacity: 1; transform: scale(1.02); } }
@keyframes petRitualOrbit { to { transform: rotate(360deg); } }
@keyframes petCharmFloat { from { transform: translateY(2px) rotate(-2deg); } to { transform: translateY(-8px) rotate(3deg); } }
.pet-menu { position: absolute; left: 50%; bottom: calc(100% + 8px); width: 220px; transform: translateX(-50%); border: 2px solid rgba(255,255,255,.45); border-radius: 0; padding: 10px; background: rgba(20,21,31,.94); box-shadow: 5px 5px 0 rgba(0,0,0,.28); }
.pet-menu-title { margin: 0 0 9px; color: #b8b9c5; font-size: 10px; }
.pet-menu-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.pet-menu-actions .button { min-height: 34px; padding: 0 6px; font-size: 10px; }
.pet-status-input { margin-top: 8px; display: flex; gap: 6px; }
.pet-status-input .field { min-height: 34px; font-size: 10px; }
.pet-status-input .button { min-height: 34px; padding: 0 10px; font-size: 10px; }
.pet-scale-control { margin-top: 8px; padding-top: 8px; border-top: 1px solid rgba(255,255,255,.14); display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #b8b9c5; font-size: 10px; }
.pet-scale-control span b { color: #fff; font: 500 10px var(--font-pixel-mono); }
.pet-scale-control > div { display: flex; gap: 5px; }
.pet-scale-control button { width: 30px; height: 28px; border: 1px solid rgba(255,255,255,.2); border-radius: 4px; background: #2e2f3d; color: #fff; font-size: 16px; line-height: 1; }

.desktop-dock { position: absolute; z-index: 35; left: 50%; bottom: 9px; height: 68px; padding: 8px 10px; display: flex; align-items: center; gap: 7px; transform: translateX(-50%); border: 1px solid rgba(255,255,255,.36); border-radius: 18px; background: rgba(235,236,239,.38); box-shadow: 0 8px 28px rgba(15,24,31,.26); backdrop-filter: blur(24px) saturate(1.35); }
.dock-app { position: relative; width: 50px; height: 50px; padding: 0; border: 0; border-radius: 11px; background: rgba(255,255,255,.88); color: #272835; font: 500 12px var(--font-pixel-mono); transition: transform .15s ease; }
.dock-app:hover { transform: translateY(-7px) scale(1.08); }
.dock-app.primary { padding: 0; overflow: visible; background: transparent; color: #fff; }
.dock-app.primary img { width: 50px; height: 50px; display: block; border-radius: 11px; box-shadow: 0 5px 12px rgba(15,16,26,.24); }
.dock-running-dot { position: absolute; left: 50%; bottom: -7px; width: 4px; height: 4px; border-radius: 50%; background: transparent; transform: translateX(-50%); }
.dock-app.is-minimized .dock-running-dot { background: rgba(255,255,255,.9); }
.dock-separator { width: 1px; height: 40px; margin: 0 2px; background: rgba(50,53,62,.28); }
.finder-face { position: absolute; inset: 0; overflow: hidden; border-radius: 11px; background: #66baf2; }
.finder-face::before { content: ""; position: absolute; inset: 0 0 0 50%; background: #d8f0ff; }
.finder-face::after { content: ""; position: absolute; left: 13px; top: 16px; width: 25px; height: 14px; border-bottom: 2px solid #18324d; border-radius: 0 0 50% 50%; }
.finder-face i::before, .finder-face i::after { content: ""; position: absolute; z-index: 2; top: 14px; width: 3px; height: 7px; border-radius: 50%; background: #18324d; }
.finder-face i::before { left: 14px; }
.finder-face i::after { right: 14px; }
.launchpad-grid { position: absolute; inset: 9px; border-radius: 9px; background: radial-gradient(circle, #fff 0 3px, transparent 4px) 0 0 / 12px 12px, #454754; }
.notes-app-icon { position: absolute; inset: 0; border-radius: 11px; background: repeating-linear-gradient(to bottom, #f2c94c 0 13px, #fff 14px 20px); }
.safari-app-icon { position: absolute; inset: 3px; border: 3px solid #e9f6ff; border-radius: 50%; background: conic-gradient(from 24deg, #f05e64 0 9%, #2c99e8 9% 59%, #d9f2ff 59% 100%); box-shadow: inset 0 0 0 2px #fff; }
.safari-app-icon::after { content: ""; position: absolute; left: 50%; top: 50%; width: 3px; height: 28px; background: #fff; transform: translate(-50%,-50%) rotate(28deg); }
.music-app-icon { position: absolute; inset: 0; display: grid; place-items: center; border-radius: 11px; background: #ee6078; color: #fff; font-size: 28px; }
.ruflow-app-icon { position: absolute; inset: 0; overflow: hidden; border-radius: 11px; background: #fff; box-shadow: inset 0 0 0 1px rgba(33,75,118,.08); }
.ruflow-app-icon i { position: absolute; left: 10px; width: 31px; height: 11px; border-bottom: 5px solid #2696ff; border-radius: 0 0 60% 50%; transform: skewX(-14deg) rotate(-2deg); }
.ruflow-app-icon i:nth-child(1) { top: 7px; }
.ruflow-app-icon i:nth-child(2) { top: 18px; left: 9px; }
.ruflow-app-icon i:nth-child(3) { top: 29px; left: 8px; width: 28px; }
.trash-icon { position: absolute; inset: 7px 11px 5px; border: 2px solid rgba(42,48,55,.54); border-radius: 3px 3px 8px 8px; background: rgba(242,246,248,.78); }
.trash-icon::before { content: ""; position: absolute; left: -4px; right: -4px; top: -6px; height: 4px; border: 2px solid rgba(42,48,55,.54); border-radius: 3px; }

.desktop-window { position: absolute; z-index: 12; left: 8%; top: 10%; width: min(760px, 66vw); height: min(520px, 72vh); overflow: hidden; border: 1px solid rgba(255,255,255,.52); border-radius: 10px; background: #f4f2ed; color: var(--ink); box-shadow: 0 26px 70px rgba(13,24,31,.38), 0 0 0 1px rgba(0,0,0,.08); }
.desktop-window-lumen { left: 50%; top: 46px; width: min(1160px, calc(100% - 110px)); height: calc(100% - 126px); transform: translateX(-50%); }
.desktop-window-ruflow { left: 50%; top: 62px; width: min(820px, calc(100% - 130px)); height: min(650px, calc(100% - 150px)); transform: translateX(-50%); }
.desktop-window.is-fullscreen, .desktop-window-lumen.is-fullscreen { position: fixed; z-index: 60; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 0; transform: none; }
.desktop-view.is-fullscreen-mode .mac-menubar, .desktop-view.is-fullscreen-mode .desktop-files, .desktop-view.is-fullscreen-mode .desktop-dock { visibility: hidden; pointer-events: none; }
.desktop-view.is-fullscreen-mode .pet-wrap { z-index: 70; }
.window-titlebar { height: 42px; padding: 0 14px; display: grid; grid-template-columns: 92px 1fr 92px; align-items: center; border-bottom: 1px solid #d8d5cf; background: #ebe9e4; cursor: grab; user-select: none; touch-action: none; }
.window-titlebar:active, body.is-window-dragging .window-titlebar { cursor: grabbing; }
.window-titlebar .window-controls, .window-titlebar button { cursor: default; }
.window-title { min-width: 0; display: flex; align-items: center; justify-content: center; gap: 7px; }
.window-title img { width: 20px; height: 20px; border-radius: 5px; }
.window-titlebar strong { font-size: 12px; }
.window-app-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--violet); }
.window-controls { display: flex; gap: 8px; }
.traffic-light { position: relative; width: 13px; height: 13px; padding: 0; border: 1px solid rgba(0,0,0,.14); border-radius: 50%; }
.traffic-close { background: #ff5f57; }
.traffic-minimize { background: #febc2e; }
.traffic-fullscreen { background: #28c840; }
.mac-traffic-lights:hover .traffic-close::after { content: "×"; }
.mac-traffic-lights:hover .traffic-minimize::after { content: "−"; }
.mac-traffic-lights:hover .traffic-fullscreen::after { content: "↗"; font-size: 8px; }
.mac-traffic-lights:hover .traffic-fullscreen.is-exit::after { content: "↙"; }
.traffic-light::after { position: absolute; inset: -2px 0 0; display: grid; place-items: center; color: rgba(45,32,31,.72); font-size: 10px; font-weight: 700; line-height: 1; }
.window-body { height: calc(100% - 42px); overflow: auto; }
.desktop-window-lumen .window-body { overflow: hidden; }
.desktop-full-app, .desktop-full-app > .app-shell { height: 100%; min-height: 0; }
.desktop-full-app > .app-shell { grid-template-columns: 196px minmax(0, 1fr); }
.desktop-full-app .sidebar { position: relative; top: auto; width: auto; height: 100%; padding: 22px 14px 16px; }
.desktop-full-app .brand { padding: 0 9px 24px; }
.desktop-full-app .main { height: 100%; overflow: auto; padding: 28px 30px 72px; }
.desktop-full-app .page { max-width: none; }
.desktop-full-app .page-header { margin-bottom: 22px; }
.desktop-full-app .page-header .button[data-action="desktop"] { display: none; }
.desktop-full-app h1 { font-size: clamp(28px, 3.3vw, 40px); }
.desktop-full-app .focus-panel, .desktop-full-app .role-summary { min-height: 420px; }
.desktop-full-app .media-slot { min-height: 238px; }
.desktop-full-app .sidebar-footer { padding-bottom: 0; }
.lumen-window-body { min-height: 100%; display: grid; grid-template-columns: 42% 58%; }
.window-pet-preview { min-width: 0; display: grid; place-items: center; align-content: center; position: relative; overflow: hidden; color: #fff; background: #1b1c29; }
.window-pet-preview::before { content: ""; position: absolute; width: 220px; height: 220px; border: 1px solid rgba(255,255,255,.12); transform: rotate(45deg); }
.window-pet-preview > div:last-child { position: relative; z-index: 2; margin-top: -16px; text-align: center; }
.window-pet-preview > div:last-child strong, .window-pet-preview > div:last-child span { display: block; }
.window-pet-preview > div:last-child span { margin-top: 3px; color: #aaaab9; font-size: 10px; }
.window-dashboard { padding: 34px; }
.window-kicker { margin: 0 0 8px; color: var(--muted); font: 500 10px var(--font-pixel-mono); }
.window-dashboard h2, .mock-window-content h2 { margin: 0; font-size: 24px; }
.window-role-row { margin: 24px 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.window-role { min-width: 0; padding: 9px; border: 1px solid var(--line); border-radius: 4px; display: flex; align-items: center; gap: 7px; background: #fff; text-align: left; }
.window-role.active { border-color: var(--violet); box-shadow: inset 0 0 0 1px var(--violet); }
.window-role strong, .window-role small { display: block; }
.window-role small { color: var(--muted); font-size: 9px; }
.window-stat-row { display: grid; grid-template-columns: repeat(3, 1fr); border-block: 1px solid var(--line); }
.window-stat-row div { padding: 16px 10px; border-right: 1px solid var(--line); }
.window-stat-row div:last-child { border-right: 0; }
.window-stat-row strong, .window-stat-row span { display: block; }
.window-stat-row strong { font-size: 18px; }
.window-stat-row span { margin-top: 3px; color: var(--muted); font-size: 9px; }
.window-actions { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 8px; }
.mock-window-content { padding: 34px; }
.easter-egg-guide { min-height: 42px; margin-bottom: 22px; padding: 8px 10px; border: 1px solid #d2cdc2; display: flex; align-items: center; justify-content: space-between; gap: 16px; background: #ebe7dc; color: #5f5b62; font-size: 10px; }
.easter-egg-guide span { min-width: 0; line-height: 1.45; }
.easter-egg-guide b { margin-right: 8px; color: #4f476f; font: 700 9px var(--font-pixel-mono); }
.easter-egg-guide button { flex: 0 0 auto; min-height: 26px; padding: 0 9px; border: 1px solid #938aa8; border-radius: 3px; background: #fbfaf6; color: #4f476f; font: 700 9px var(--font-pixel-mono); }
.easter-egg-guide button:hover { background: #fff; border-color: #665d7d; }
.easter-egg-guide button:active { transform: translateY(1px); }
.notes-drop-zone { position: relative; min-height: 100%; }
.notes-text-zone { position: relative; min-height: 246px; margin-top: 12px; padding: 4px 10px 64px; isolation: isolate; border: 1px dashed #d5d0c4; background: rgba(255,255,255,.28); transition: border-color .16s, background-color .16s, box-shadow .16s; }
.notes-experience-guide { position: relative; z-index: 1; padding: 12px 10px 4px; color: #34313a; }
.notes-guide-hero { display: grid; grid-template-columns: 108px minmax(0,1fr); align-items: center; gap: 14px; padding-bottom: 14px; border-bottom: 2px solid #d4cfc3; }
.notes-guide-party { height: 78px; padding: 6px; display: flex; align-items: flex-end; justify-content: center; overflow: hidden; border: 2px solid #292936; background-color: #1b1c29; background-image: linear-gradient(45deg, rgba(255,255,255,.04) 25%, transparent 25%, transparent 75%, rgba(255,255,255,.04) 75%), linear-gradient(45deg, rgba(255,255,255,.04) 25%, transparent 25%, transparent 75%, rgba(255,255,255,.04) 75%); background-position: 0 0, 6px 6px; background-size: 12px 12px; box-shadow: 4px 4px 0 #c8c1b5; }
.notes-guide-party img { width: 48px; height: 64px; object-fit: contain; image-rendering: pixelated; filter: drop-shadow(2px 3px 0 rgba(0,0,0,.38)); }
.notes-guide-party img + img { margin-left: -14px; }
.notes-guide-party img:nth-child(2) { transform: translateY(4px); }
.notes-guide-party img:nth-child(3) { transform: translateY(1px); }
.notes-guide-hero strong, .notes-guide-hero p { display: block; }
.notes-guide-hero strong { font-size: 14px; line-height: 1.5; }
.notes-guide-hero p { margin: 7px 0 0; color: #716c74; font-size: 10px; line-height: 1.65; }
.notes-feature-list { margin: 14px 0 16px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); border: 2px solid #34313a; background: #fbf8ef; box-shadow: 4px 4px 0 #d5cec0; }
.notes-feature-list span { min-width: 0; padding: 8px 9px; color: #4d4852; font: 700 9px/1.3 var(--font-pixel-mono); }
.notes-feature-list span:nth-child(odd) { border-right: 1px solid #bdb6aa; }
.notes-feature-list span:nth-child(-n+2) { border-bottom: 1px solid #bdb6aa; }
.notes-feature-list span::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 7px; background: #7566f4; box-shadow: 2px 2px 0 #342f55; }
.notes-play-guide h3 { margin: 0 0 7px; font-size: 12px; }
.notes-play-step { min-height: 50px; display: grid; grid-template-columns: 42px minmax(0,1fr); align-items: center; gap: 10px; border-bottom: 1px solid #d8d2c6; }
.notes-play-step:last-child { border-bottom: 0; }
.notes-play-step > div strong, .notes-play-step > div span { display: block; }
.notes-play-step > div strong { font-size: 10px; }
.notes-play-step > div span { margin-top: 3px; color: #777179; font-size: 9px; line-height: 1.45; }
.notes-step-visual { position: relative; width: 34px; height: 34px; display: grid; place-items: center; overflow: hidden; border: 2px solid #35333c; background: #20212d; box-shadow: 3px 3px 0 #c9c2b6; font-style: normal; }
.notes-step-visual img { display: block; object-fit: contain; image-rendering: pixelated; }
.step-app img { width: 27px; height: 27px; }
.step-todo b { position: absolute; left: 12px; width: 15px; height: 3px; background: #f3eddc; box-shadow: -6px 0 #65c6cf; }
.step-todo b:nth-child(1) { top: 9px; }
.step-todo b:nth-child(2) { top: 16px; }
.step-todo b:nth-child(3) { top: 23px; }
.step-timer b { width: 24px; height: 24px; display: grid; place-items: center; border: 3px solid #7566f4; color: #fff; font: 700 8px var(--font-pixel-mono); }
.step-pet img { width: 43px; height: 43px; transform: translateY(5px); }
.step-reward b { width: 14px; height: 14px; background: #e5aa45; box-shadow: 0 -6px 0 -3px #fff0a8, 0 6px 0 -3px #fff0a8, -6px 0 0 -3px #fff0a8, 6px 0 0 -3px #fff0a8; transform: rotate(45deg); }
.notes-experience-guide.is-eaten { transform-origin: 82% 54%; animation: notesGuideSandAway 3.25s steps(13,end) forwards; }
.notes-experience-guide.is-eaten .notes-guide-hero { animation: notesPaperTremble .7s steps(5,end) .15s both; }
.notes-experience-guide.is-eaten .notes-feature-list { animation: notesPaperTremble .7s steps(5,end) .34s both; }
.notes-experience-guide.is-eaten .notes-play-guide { animation: notesPaperTremble .7s steps(5,end) .52s both; }
.notes-sand-cloud { position: absolute; z-index: 5; inset: 4px 10px 52px; overflow: visible; pointer-events: none; }
.notes-sand-grain { position: absolute; left: var(--sand-left); top: var(--sand-top); width: var(--sand-size); height: var(--sand-size); opacity: 0; background: var(--sand-color); box-shadow: calc(var(--sand-size) * .7) calc(var(--sand-size) * .35) 0 color-mix(in srgb, var(--sand-color) 72%, transparent); image-rendering: pixelated; animation: notesSandFly 1.95s steps(12,end) var(--sand-delay) forwards; }
.notes-drop-hint { position: absolute; right: 9px; bottom: 8px; min-width: 148px; padding: 6px 8px; border-left: 3px solid #a29aa9; background: rgba(244,241,234,.92); color: #747078; pointer-events: none; }
.notes-drop-hint strong, .notes-drop-hint span { display: block; }
.notes-drop-hint strong { color: #55515b; font: 700 8px var(--font-pixel-mono); }
.notes-drop-hint span { margin-top: 2px; font-size: 9px; }
.notes-drop-hint .drop-hint-near, .notes-drop-hint .drop-hint-ready { display: none; }
.notes-text-zone.is-pet-near { border-color: #c49347; background: #fff8df; box-shadow: inset 0 0 0 2px rgba(196,147,71,.18), 0 0 0 3px rgba(255,255,255,.65); }
.notes-text-zone.is-pet-near .notes-drop-hint { border-left-color: #c49347; background: #fff0bd; color: #5d4930; }
.notes-text-zone.is-pet-near .drop-hint-idle { display: none; }
.notes-text-zone.is-pet-near .drop-hint-near { display: block; }
.notes-text-zone.is-pet-ready { border-style: solid; background: #fff2c6; box-shadow: inset 0 0 0 3px rgba(196,147,71,.28), 0 0 0 3px rgba(255,255,255,.7); }
.notes-text-zone.is-pet-ready .drop-hint-near { display: none; }
.notes-text-zone.is-pet-ready .drop-hint-ready { display: block; color: #43341f; font-weight: 700; }
.notes-empty-message { position: relative; z-index: 2; margin-top: 34px; opacity: 0; color: var(--muted); text-align: center; animation: notesEmptyReveal .3s ease 3.25s forwards; }
.notes-empty-message strong, .notes-empty-message span { display: block; }
.notes-empty-message strong { color: var(--ink); font-size: 14px; }
.notes-empty-message span { margin-top: 4px; font-size: 10px; }
.notes-empty-message .button { width: auto; min-height: 30px; margin-top: 14px; padding: 0 12px; }
.notes-empty-message.is-visible { opacity: 1; animation: none; }
@keyframes notesGuideSandAway {
  0%,12% { opacity: 1; clip-path: polygon(0 0,100% 0,100% 12%,100% 24%,100% 36%,100% 48%,100% 60%,100% 72%,100% 84%,100% 100%,0 100%); transform: none; filter: none; }
  32% { opacity: .98; clip-path: polygon(0 0,94% 0,89% 12%,96% 24%,91% 36%,95% 48%,88% 60%,94% 72%,90% 84%,95% 100%,0 100%); transform: translateX(3px); filter: contrast(.98); }
  56% { opacity: .9; clip-path: polygon(0 0,69% 0,62% 12%,72% 24%,64% 36%,70% 48%,59% 60%,68% 72%,61% 84%,70% 100%,0 100%); transform: translate(9px,-2px); filter: contrast(.94) saturate(.82); }
  78% { opacity: .72; clip-path: polygon(0 0,37% 0,29% 12%,42% 24%,31% 36%,38% 48%,25% 60%,35% 72%,27% 84%,40% 100%,0 100%); transform: translate(17px,-5px) skewX(-1deg); filter: blur(.45px) saturate(.64); }
  100% { opacity: 0; clip-path: polygon(0 0,2% 0,0 12%,4% 24%,0 36%,3% 48%,0 60%,4% 72%,0 84%,2% 100%,0 100%); transform: translate(29px,-10px) skewX(-2deg); filter: blur(1.2px) saturate(.35); }
}
@keyframes notesPaperTremble { 0%,100% { transform: none; } 35% { transform: translate(2px,-1px); } 60% { transform: translate(-1px,1px); } 82% { transform: translate(1px,0); } }
@keyframes notesSandFly { 0%,8% { opacity: 0; transform: translate(0,0) scale(.4) rotate(0); } 18% { opacity: .95; } 56% { opacity: .82; transform: translate(var(--sand-mid-x),var(--sand-mid-y)) scale(1) rotate(90deg); } 82% { opacity: .55; } 100% { opacity: 0; transform: translate(var(--sand-x),var(--sand-y)) scale(.5) rotate(220deg); } }
@keyframes notesEmptyReveal { to { opacity: 1; } }
.mock-address { margin: -12px 0 26px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 4px; background: #fff; color: var(--muted); font: 500 10px var(--font-pixel-mono); }
.safari-search-zone { min-height: 34px; display: flex; align-items: center; justify-content: center; gap: 8px; transition: border-color .18s, box-shadow .18s; }
.safari-search-zone.is-patrolling { color: #5c5384; background: #f6f3ff; }
.safari-guide { margin-top: -18px; }
.safari-search-icon { position: relative; width: 11px; height: 11px; border: 2px solid #8d8c94; border-radius: 50%; }
.safari-search-icon::after { content: ""; position: absolute; width: 5px; height: 2px; right: -5px; bottom: -2px; background: #8d8c94; transform: rotate(45deg); }
.desktop-view:has(.pet-wrap[data-snap="Safari搜索框"]) .safari-search-zone { border-color: #6b63a9; box-shadow: inset 0 0 0 1px rgba(117,102,244,.22); }
.mock-result-grid, .mock-file-grid { margin-top: 24px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mock-result-grid article, .mock-file-grid div { min-height: 110px; padding: 15px; border: 1px solid var(--line); border-radius: 5px; background: #fff; }
.mock-result-grid span, .mock-file-grid span { display: block; margin-bottom: 20px; color: var(--violet); font: 500 11px var(--font-pixel-mono); }
.mock-result-grid strong, .mock-file-grid strong { display: block; font-size: 12px; }
.mock-result-grid p { color: var(--muted); font-size: 10px; }
.mock-file-grid { grid-template-columns: repeat(4, 1fr); }
.mock-player { min-height: 100%; display: grid; grid-template-columns: 220px 1fr; align-items: center; gap: 30px; }
.mock-cover { width: 220px; aspect-ratio: 1; display: grid; place-items: center; background: #262736; color: #e4b75d; font-size: 64px; }
.mock-player p { color: var(--muted); font-size: 11px; }
.mock-track { height: 5px; margin: 30px 0 18px; background: #ddd9d3; }
.mock-track span { display: block; width: 38%; height: 100%; background: var(--violet); }
.mock-player-actions { display: flex; gap: 8px; }
.mock-player-actions button { width: 38px; height: 34px; border: 1px solid var(--line); border-radius: 4px; background: #fff; }

.desktop-window-trash { width: min(820px, 76vw); height: min(560px, 74vh); }
.trash-window-content { min-height: 100%; padding: 26px 28px 34px; background: #efeeeb; }
.trash-window-content > header { min-height: 56px; margin-bottom: 22px; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.trash-window-content h2 { margin: 0; font-size: 22px; }
.trash-window-content p { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.trash-window-content > header > span { padding: 5px 8px; border: 1px solid #cbc8c3; border-radius: 4px; color: var(--muted); font: 500 9px var(--font-pixel-mono); }
.trash-file-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.trash-file { min-width: 0; min-height: 122px; padding: 12px; border: 1px solid #d3d0cb; border-radius: 5px; display: grid; grid-template-columns: 44px minmax(0, 1fr); grid-template-rows: 1fr auto; column-gap: 10px; align-items: center; background: #f9f8f5; color: var(--ink); text-align: left; }
.trash-file:hover { border-color: #888291; background: #fff; }
.trash-file:active { transform: translateY(1px); }
.trash-file-icon { position: relative; grid-row: 1 / 3; width: 40px; height: 48px; border: 2px solid #68636e; background: #ded9cc; box-shadow: 3px 3px 0 rgba(67,62,73,.15); }
.trash-file-icon::before { content: ""; position: absolute; right: -2px; top: -2px; width: 13px; height: 13px; border-left: 2px solid #68636e; border-bottom: 2px solid #68636e; background: #f9f8f5; }
.trash-file-icon::after { content: ""; position: absolute; left: 7px; top: 19px; width: 21px; height: 3px; background: #8379b6; box-shadow: 0 7px #b0695b, 0 14px #a29d91; }
.trash-file.item-3 .trash-file-icon, .trash-file.item-6 .trash-file-icon, .trash-file.item-9 .trash-file-icon { background: #ccd9d6; }
.trash-file.item-2 .trash-file-icon, .trash-file.item-5 .trash-file-icon, .trash-file.item-8 .trash-file-icon { background: #d9d1e5; }
.trash-file strong { align-self: end; overflow: hidden; font-size: 11px; line-height: 1.35; overflow-wrap: anywhere; }
.trash-file small { align-self: start; margin-top: 4px; color: var(--muted); font-size: 9px; }
.trash-file.is-winner { position: relative; border-color: #c9922f; background: #fff8dc; box-shadow: inset 0 0 0 2px #f4d574, 4px 4px 0 rgba(93,66,23,.16); }
.trash-file.is-winner:hover { border-color: #8e621c; background: #fffbed; }
.trash-file.is-winner .trash-file-icon { border-color: #5f451c; background: #f0c44f; box-shadow: 3px 3px 0 #9e6d25; }
.trash-file.is-winner .trash-file-icon::after { background: #fff3ae; box-shadow: 0 7px #df7e38, 0 14px #8f55b7; }
.trash-file.is-winner small { color: #8a5d18; }
.trash-win-badge { display: inline-block; margin-left: 6px; padding: 2px 4px; border: 2px solid #4a3516; background: #f2c84e; color: #34230c; font: 900 8px var(--font-pixel-mono); box-shadow: 2px 2px 0 #9b6b20; vertical-align: 1px; }

.classroom-overlay, .completion-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 24px;
  color: #fff;
  background: rgba(12,13,23,.92);
  backdrop-filter: blur(14px);
}
.classroom-overlay { --entry-accent: #e5aa45; animation: classroomOverlayIn .28s ease-out both; }
.classroom-overlay.task-reading { --entry-accent: #e5b95d; }
.classroom-overlay.task-coding { --entry-accent: #65c6cf; }
.classroom-overlay.task-design { --entry-accent: #f17863; }
.classroom-overlay.task-research { --entry-accent: #a899ff; }
.classroom-overlay.task-course { --entry-accent: #72b988; }
.classroom-stage { width: min(920px, 100%); min-height: min(510px, calc(100vh - 48px)); border: 2px solid rgba(255,255,255,.22); border-radius: 4px; overflow: hidden; position: relative; background: #20212e; box-shadow: 0 24px 70px rgba(0,0,0,.42), 0 0 38px color-mix(in srgb, var(--entry-accent) 15%, transparent); animation: classroomStageIn .52s cubic-bezier(.2,.8,.2,1) both; }
.classroom-stage::after { content: ""; position: absolute; z-index: 8; inset: 0; pointer-events: none; background: var(--entry-accent); opacity: 0; animation: classroomFlash 4s steps(2, end) both; }
.classroom-stage .media-slot { position: absolute; z-index: 0; inset: 0; min-height: 100%; border: 0; border-radius: 0; background: #272837; color: #fff; opacity: .32; transform: scale(1.06); animation: classroomMediaReveal 4s ease-out both; }
.classroom-stage .media-slot-label { opacity: 0; }
.classroom-scene { position: absolute; z-index: 1; inset: 0; overflow: hidden; background-color: #292a38; background-image: linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px); background-size: 22px 22px; opacity: 0; transform: scale(1.08); animation: classroomSceneReveal 4s cubic-bezier(.2,.8,.2,1) both; }
.classroom-scene::before { content: ""; position: absolute; left: 8%; right: 8%; top: 14%; height: 48%; border: 3px solid rgba(229,217,190,.22); border-bottom: 0; clip-path: polygon(0 100%, 0 22%, 12% 0, 88% 0, 100% 22%, 100% 100%); }
.classroom-window { position: absolute; top: 20%; width: 92px; height: 142px; border: 3px solid rgba(229,217,190,.34); background: #171923; box-shadow: inset 0 0 0 8px rgba(101,198,207,.05); }
.classroom-window::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; background: rgba(229,217,190,.24); }
.window-left { left: 14%; }
.window-right { right: 14%; }
.classroom-long-table { position: absolute; left: 16%; right: 16%; bottom: 20%; height: 58px; border: 3px solid #151620; background: #614a44; box-shadow: inset 0 8px 0 #8a6760, 0 18px 0 -10px rgba(10,11,17,.62); transform: perspective(320px) rotateX(54deg); }
.classroom-students { position: absolute; left: 20%; right: 20%; bottom: 29%; display: flex; align-items: flex-end; justify-content: space-between; }
.classroom-student { position: relative; width: 30px; height: 45px; border: 3px solid #151620; background: #7566f4; opacity: 0; transform: translateY(18px); animation: classroomStudentArrive 4s steps(4, end) calc(var(--student-index) * 55ms) both; }
.classroom-student:nth-child(2n) { background: #4eb9bd; }
.classroom-student:nth-child(3n) { background: #d87562; }
.classroom-student i { position: absolute; left: 5px; top: -17px; width: 14px; height: 14px; border: 3px solid #151620; background: #e7c4a5; }
.entry-portal { position: absolute; z-index: 4; left: 50%; top: 48%; width: 310px; height: 310px; transform: translate(-50%,-50%); animation: entryPortalSequence 4s cubic-bezier(.2,.8,.2,1) both; }
.entry-ring { position: absolute; left: 50%; top: 50%; border: 2px solid var(--entry-accent); box-shadow: 0 0 12px color-mix(in srgb, var(--entry-accent) 55%, transparent), inset 0 0 12px color-mix(in srgb, var(--entry-accent) 24%, transparent); }
.entry-ring::before, .entry-ring::after { content: ""; position: absolute; inset: 14%; border: 1px solid rgba(255,255,255,.34); transform: rotate(45deg); }
.entry-ring::after { inset: 30%; border-color: var(--entry-accent); }
.entry-ring.ring-outer { inset: 12px; border-radius: 50%; animation: entryRingSpin 2.8s linear infinite; }
.entry-ring.ring-middle { inset: 48px; transform: rotate(45deg); animation: entryRingSpinReverse 2s linear infinite; }
.entry-ring.ring-inner { inset: 91px; border-radius: 50%; animation: entryRingPulse .8s steps(3, end) infinite; }
.entry-rune { position: absolute; left: 50%; top: 50%; width: 9px; height: 9px; margin: -4.5px; border: 2px solid #fff1bd; background: var(--entry-accent); box-shadow: 0 0 10px var(--entry-accent); transform: rotate(calc(var(--rune-index) * 45deg)) translateY(-145px); animation: entryRuneIgnite .8s steps(2, end) calc(var(--rune-index) * 70ms) both; }
.entry-flare { position: absolute; left: 50%; top: 50%; width: 18px; height: 18px; background: #fff; box-shadow: 0 0 22px 8px var(--entry-accent); transform: translate(-50%,-50%) rotate(45deg); animation: entryFlare 4s ease-out both; }
.entry-pet { position: absolute; z-index: 3; inset: 40px; display: grid; place-items: center; animation: entryPetTransit 4s steps(8, end) both; }
.entry-pet .default-pet.compact { transform: scale(.7); margin: -20px; }
.classroom-caption { position: absolute; z-index: 6; left: 30px; right: 30px; bottom: 26px; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; opacity: 0; animation: classroomCaptionIn 4s ease-out both; }
.classroom-caption h2 { margin: 5px 0 0; font-size: 26px; }
.classroom-caption p { margin: 7px 0 0; color: #c9cad3; font-size: 12px; }
.presence-stack { display: flex; gap: 8px; }
.presence { width: 34px; height: 34px; border: 2px solid #242331; border-radius: 50%; background: var(--cyan); }
.presence:nth-child(2) { background: var(--coral); margin-left: -16px; }
.presence:nth-child(3) { background: var(--amber); margin-left: -16px; }
.entry-status { position: absolute; z-index: 7; left: 30px; right: 30px; top: 24px; display: flex; align-items: center; gap: 18px; font: 500 9px var(--font-pixel-mono); }
.entry-status > div { position: relative; width: 98px; height: 14px; }
.entry-status span, .entry-status strong { position: absolute; left: 0; top: 0; white-space: nowrap; }
.entry-status > div > span { color: #b9bac6; animation: entryStatusConnecting 4s both; }
.entry-status strong { color: #fff; opacity: 0; animation: entryStatusReady 4s both; }
.entry-progress { position: relative !important; flex: 1; height: 4px; overflow: hidden; background: rgba(255,255,255,.14); }
.entry-progress i { display: block; width: 100%; height: 100%; background: var(--entry-accent); transform-origin: left; animation: entryProgress 3.7s linear both; }
.classroom-overlay.motion-off *, .classroom-overlay.motion-off *::before, .classroom-overlay.motion-off *::after { animation-duration: .01ms !important; animation-delay: 0ms !important; }
.classroom-overlay { cursor: pointer; }
.entry-skip-hint { color: rgba(255,255,255,.5); font: 500 9px var(--font-pixel-mono); white-space: nowrap; }
.completion-cinematic-overlay { cursor: pointer; }
.cinematic-skip-hint { position: absolute; z-index: 10; right: 28px; bottom: 34px; color: rgba(255,255,255,.5); font: 500 9px var(--font-pixel-mono); }
@keyframes classroomOverlayIn { from { opacity: 0; } }
@keyframes classroomStageIn { from { opacity: 0; transform: scale(.9); } to { opacity: 1; transform: none; } }
@keyframes classroomMediaReveal { 0%,35% { opacity: 0; transform: scale(1.12); } 70%,100% { opacity: .32; transform: scale(1.02); } }
@keyframes classroomSceneReveal { 0%,35% { opacity: 0; transform: scale(1.08); } 62%,100% { opacity: 1; transform: none; } }
@keyframes classroomFlash { 0%,49%,57%,100% { opacity: 0; } 52% { opacity: .3; } }
@keyframes entryPortalSequence { 0% { opacity: 0; transform: translate(-50%,-50%) scale(.32) rotate(-18deg); } 18%,46% { opacity: 1; transform: translate(-50%,-50%) scale(1) rotate(0); } 62%,100% { opacity: 0; transform: translate(-50%,-50%) scale(1.55) rotate(8deg); } }
@keyframes entryRingSpin { to { transform: rotate(360deg); } }
@keyframes entryRingSpinReverse { from { transform: rotate(405deg); } to { transform: rotate(45deg); } }
@keyframes entryRingPulse { 50% { box-shadow: 0 0 22px var(--entry-accent), inset 0 0 16px color-mix(in srgb, var(--entry-accent) 45%, transparent); } }
@keyframes entryRuneIgnite { from { opacity: 0; } to { opacity: 1; } }
@keyframes entryFlare { 0%,32% { opacity: 0; transform: translate(-50%,-50%) rotate(45deg) scale(.2); } 48% { opacity: 1; transform: translate(-50%,-50%) rotate(135deg) scale(1); } 62%,100% { opacity: 0; transform: translate(-50%,-50%) rotate(225deg) scale(4); } }
@keyframes entryPetTransit { 0%,12% { opacity: 0; transform: translateY(48px) scale(.65); } 24%,46% { opacity: 1; transform: none; } 60%,100% { opacity: 0; transform: translateY(-70px) scale(.35); } }
@keyframes classroomStudentArrive { 0%,52% { opacity: 0; transform: translateY(18px); } 66%,100% { opacity: 1; transform: none; } }
@keyframes classroomCaptionIn { 0%,58% { opacity: 0; transform: translateY(16px); } 72%,100% { opacity: 1; transform: none; } }
@keyframes entryStatusConnecting { 0%,68% { opacity: 1; } 76%,100% { opacity: 0; } }
@keyframes entryStatusReady { 0%,68% { opacity: 0; } 76%,100% { opacity: 1; } }
@keyframes entryProgress { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.companion-scene-overlay { position: fixed; z-index: 112; inset: 0; display: grid; place-items: center; padding: 24px; pointer-events: none; background: rgba(11,12,20,.56); backdrop-filter: blur(7px); animation: companionOverlaySequence 2.8s both; }
.companion-scene-stage, .completion-cinematic-stage { --scene-accent: #65c6cf; position: relative; overflow: hidden; border: 2px solid rgba(255,255,255,.28); background-color: #20212e; background-image: linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px); background-size: 18px 18px; color: #fff; box-shadow: 0 24px 74px rgba(0,0,0,.5), 0 0 40px color-mix(in srgb, var(--scene-accent) 18%, transparent); }
.companion-scene-stage.task-reading, .completion-cinematic-stage.task-reading { --scene-accent: #e5b95d; }
.companion-scene-stage.task-coding, .completion-cinematic-stage.task-coding { --scene-accent: #65c6cf; }
.companion-scene-stage.task-design, .completion-cinematic-stage.task-design { --scene-accent: #f17863; }
.companion-scene-stage.task-research, .completion-cinematic-stage.task-research { --scene-accent: #a899ff; }
.companion-scene-stage.task-course, .completion-cinematic-stage.task-course { --scene-accent: #72b988; }
.companion-scene-stage { width: min(760px, 100%); height: 380px; animation: companionStageSequence 2.8s cubic-bezier(.2,.8,.2,1) both; }
.companion-scene-stage::before { content: ""; position: absolute; inset: 0; border: 12px solid rgba(255,255,255,.025); pointer-events: none; }
.companion-scene-stage > header { position: absolute; z-index: 8; left: 22px; right: 22px; top: 18px; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.companion-scene-stage > header span { color: var(--scene-accent); font: 700 9px var(--font-pixel-mono); }
.companion-scene-stage > header strong { max-width: 50%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.companion-rift { position: absolute; z-index: 7; left: 50%; top: 49%; width: 240px; height: 240px; transform: translate(-50%,-50%); animation: companionRift 2.8s ease-out both; }
.companion-rift i { position: absolute; inset: 8px; border: 2px solid var(--scene-accent); border-radius: 50%; box-shadow: 0 0 20px color-mix(in srgb, var(--scene-accent) 65%, transparent); animation: companionRiftSpin 1s steps(8, end) infinite; }
.companion-rift i:nth-child(2) { inset: 43px; border-radius: 0; transform: rotate(45deg); animation-direction: reverse; }
.companion-rift i:nth-child(3) { inset: 84px; border-radius: 50%; animation-duration: .6s; }
.companion-party, .farewell-party { position: absolute; z-index: 5; display: flex; align-items: flex-end; justify-content: space-around; }
.companion-party { left: 78px; right: 78px; bottom: 102px; animation: companionPartyArrive 2.8s steps(6, end) both; }
.pixel-companion { position: relative; width: 62px; height: 88px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; filter: drop-shadow(4px 5px 0 rgba(7,8,13,.35)); }
.companion-head { position: relative; width: 27px; height: 25px; border: 3px solid #11121a; background: #edc39e; }
.companion-head::before { content: ""; position: absolute; left: -3px; right: -3px; top: -8px; height: 9px; border: 3px solid #11121a; background: #6954b8; }
.companion-head i { position: absolute; left: 5px; top: 9px; width: 3px; height: 3px; background: #242331; box-shadow: 10px 0 #242331; }
.companion-body { width: 42px; height: 42px; border: 3px solid #11121a; background: #7566f4; box-shadow: inset 0 -7px 0 rgba(0,0,0,.16); }
.companion-2 .companion-head::before { background: #277f84; }
.companion-2 .companion-body { background: #4eb9bd; }
.companion-3 .companion-head::before { background: #a94e46; }
.companion-3 .companion-body { background: #e47868; }
.companion-bubble { position: absolute; z-index: 8; left: 50%; bottom: calc(100% + 8px); width: max-content; max-width: 126px; padding: 7px 9px; border: 2px solid #383541; background: #fffdf5; color: #302d36; font-size: 9px; line-height: 1.35; text-align: center; transform: translateX(-50%); box-shadow: 3px 3px 0 rgba(0,0,0,.22); }
.companion-bubble::after { content: ""; position: absolute; left: 50%; bottom: -5px; width: 8px; height: 8px; border-right: 2px solid #383541; border-bottom: 2px solid #383541; background: #fffdf5; transform: translateX(-50%) rotate(45deg); }
.companion-self { position: relative; width: 92px; height: 104px; display: grid; place-items: end center; }
.companion-self .default-pet.compact, .farewell-self .default-pet.compact { transform: scale(.46); margin: -68px -48px; }
.companion-self .companion-bubble { bottom: 101%; }
.companion-table-surface, .farewell-table { position: absolute; z-index: 4; left: 58px; right: 58px; height: 58px; border: 3px solid #11121a; background: #75554d; box-shadow: inset 0 9px 0 #9a7064, 0 17px 0 -9px rgba(7,8,13,.68); transform: perspective(360px) rotateX(55deg); }
.companion-table-surface { bottom: 68px; animation: companionTableArrive 2.8s steps(6, end) both; }
.companion-table-surface i { position: absolute; left: 50%; top: 10px; width: 12px; height: 12px; border: 2px solid var(--scene-accent); transform: translateX(-50%) rotate(45deg); box-shadow: 0 0 12px var(--scene-accent); }
.companion-scene-stage > footer { position: absolute; z-index: 8; left: 22px; right: 22px; bottom: 18px; display: flex; justify-content: space-between; color: #b9bac5; font: 500 9px var(--font-pixel-mono); animation: companionFooter 2.8s both; }
.companion-scene-stage > footer strong { color: #fff; }
@keyframes companionOverlaySequence { 0%,100% { opacity: 0; } 10%,86% { opacity: 1; } }
@keyframes companionStageSequence { 0% { opacity: 0; transform: scale(.86) translateY(18px); } 16%,88% { opacity: 1; transform: none; } 100% { opacity: 0; transform: scale(.96) translateY(-10px); } }
@keyframes companionRift { 0% { opacity: 0; transform: translate(-50%,-50%) scale(.2); } 12%,25% { opacity: 1; transform: translate(-50%,-50%) scale(1); } 42%,100% { opacity: 0; transform: translate(-50%,-50%) scale(1.5); } }
@keyframes companionRiftSpin { to { transform: rotate(360deg); } }
@keyframes companionPartyArrive { 0%,24% { opacity: 0; transform: translateY(30px); } 42%,86% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(-8px); } }
@keyframes companionTableArrive { 0%,20% { opacity: 0; transform: perspective(360px) rotateX(55deg) scaleX(.2); } 38%,88% { opacity: 1; transform: perspective(360px) rotateX(55deg) scaleX(1); } 100% { opacity: 0; } }
@keyframes companionFooter { 0%,38% { opacity: 0; } 54%,88% { opacity: 1; } 100% { opacity: 0; } }

.completion-cinematic-overlay { background: rgba(9,10,17,.96); }
.completion-cinematic-stage { width: min(920px, 100%); min-height: min(520px, calc(100vh - 48px)); border-radius: 4px; animation: completionStageIn .45s ease-out both; }
.completion-cinematic-stage > .media-slot { position: absolute; z-index: 0; inset: 0; min-height: 100%; border: 0; border-radius: 0; opacity: .18; background: #1e1f2a; }
.completion-cinematic-stage > .media-slot .media-slot-label { opacity: 0; }
.completion-cinematic-stage::after { content: ""; position: absolute; z-index: 12; inset: 0; pointer-events: none; background: var(--scene-accent); opacity: 0; animation: completionFarewellFlash 4.1s steps(2, end) both; }
.completion-close-ritual { position: absolute; z-index: 7; left: 50%; top: 44%; width: 290px; height: 290px; transform: translate(-50%,-50%); animation: completionRitualClose 4.1s ease-in-out both; }
.close-ring { position: absolute; border: 2px solid var(--scene-accent); box-shadow: 0 0 14px color-mix(in srgb, var(--scene-accent) 55%, transparent); }
.close-ring.ring-a { inset: 6px; border-radius: 50%; animation: entryRingSpin 2.2s linear infinite; }
.close-ring.ring-b { inset: 46px; transform: rotate(45deg); animation: entryRingSpinReverse 1.6s linear infinite; }
.close-ring.ring-c { inset: 88px; border-radius: 50%; animation: entryRingPulse .7s steps(3, end) infinite; }
.completion-close-ritual > i { position: absolute; left: 50%; top: 50%; width: 20px; height: 20px; background: #fff; box-shadow: 0 0 26px 9px var(--scene-accent); transform: translate(-50%,-50%) rotate(45deg); }
.farewell-party { left: 17%; right: 17%; bottom: 143px; animation: farewellPartyLeave 4.1s steps(8, end) both; }
.farewell-party .pixel-companion { transform: scale(.82); transform-origin: bottom; }
.farewell-party .companion-bubble { font-size: 8px; }
.farewell-self { position: relative; width: 92px; height: 105px; display: grid; place-items: end center; }
.farewell-table { bottom: 110px; animation: farewellTableLeave 4.1s both; }
.journey-road { position: absolute; z-index: 5; left: 7%; right: 7%; bottom: 92px; height: 78px; opacity: 0; animation: journeyRoadReveal 4.1s both; }
.road-line { position: absolute; left: 0; right: 0; bottom: 15px; height: 5px; background: #675851; box-shadow: 0 -3px 0 #8c7568, 0 6px 0 rgba(0,0,0,.28); }
.road-marker { position: absolute; bottom: 20px; width: 8px; height: 8px; background: var(--scene-accent); transform: rotate(45deg); box-shadow: 0 0 9px var(--scene-accent); }
.marker-one { left: 42%; }
.marker-two { left: 72%; }
.journey-pet { --journey-distance: calc(100% + 540px); position: absolute; left: 2%; bottom: 12px; width: 110px; height: 110px; display: grid; place-items: center; animation: journeyPetWalk 4.1s steps(12, end) both; }
.journey-pet .default-pet.compact { transform: scale(.48); margin: -66px -46px; }
.completion-cinematic-copy { position: absolute; z-index: 9; left: 28px; top: 24px; }
.completion-cinematic-copy span, .completion-cinematic-copy strong { display: block; }
.completion-cinematic-copy span { margin-bottom: 7px; color: var(--scene-accent); font: 700 9px var(--font-pixel-mono); }
.completion-cinematic-copy strong { font-size: 22px; }
.copy-together { animation: completionCopyTogether 4.1s both; }
.copy-alone { opacity: 0; animation: completionCopyAlone 4.1s both; }
.completion-cinematic-progress { position: absolute; z-index: 10; left: 28px; right: 28px; bottom: 24px; height: 4px; background: rgba(255,255,255,.14); }
.completion-cinematic-progress i { display: block; width: 100%; height: 100%; background: var(--scene-accent); transform-origin: left; animation: entryProgress 3.9s linear both; }
@keyframes completionStageIn { from { opacity: 0; transform: scale(.9); } to { opacity: 1; transform: none; } }
@keyframes completionFarewellFlash { 0%,36%,46%,100% { opacity: 0; } 40% { opacity: .36; } }
@keyframes completionRitualClose { 0% { opacity: 0; transform: translate(-50%,-50%) scale(1.4) rotate(-15deg); } 15%,35% { opacity: 1; transform: translate(-50%,-50%) scale(1) rotate(0); } 44% { opacity: 1; transform: translate(-50%,-50%) scale(.12) rotate(35deg); } 52%,100% { opacity: 0; transform: translate(-50%,-50%) scale(.05) rotate(45deg); } }
@keyframes farewellPartyLeave { 0%,8% { opacity: 0; transform: translateY(18px); } 18%,38% { opacity: 1; transform: none; } 48%,100% { opacity: 0; transform: translateY(-18px); } }
@keyframes farewellTableLeave { 0%,10% { opacity: 0; } 18%,40% { opacity: 1; } 52%,100% { opacity: 0; transform: perspective(360px) rotateX(55deg) scaleX(.25); } }
@keyframes journeyRoadReveal { 0%,44% { opacity: 0; transform: translateY(18px); } 56%,100% { opacity: 1; transform: none; } }
@keyframes journeyPetWalk { 0%,48% { opacity: 0; transform: translateX(0); } 56% { opacity: 1; transform: translateX(0); } 100% { opacity: 1; transform: translateX(var(--journey-distance)); } }
@keyframes completionCopyTogether { 0%,38% { opacity: 1; } 48%,100% { opacity: 0; transform: translateY(-8px); } }
@keyframes completionCopyAlone { 0%,50% { opacity: 0; transform: translateY(8px); } 62%,100% { opacity: 1; transform: none; } }

.completion-card { width: min(520px, 100%); border-radius: 8px; padding: 32px; background: #fff; color: var(--ink); box-shadow: 0 30px 80px rgba(0,0,0,.34); }
.completion-media { min-height: 170px; margin: -14px -14px 24px; }
.reward-row { margin: 22px 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.reward { padding: 13px; border-radius: 6px; background: #f4f2ee; text-align: center; }
.reward strong { display: block; font-size: 18px; }
.reward span { color: var(--muted); font-size: 10px; }
.encounter-summary-button { width: 100%; min-height: 56px; margin: -6px 0 18px; padding: 10px 14px; display: flex; align-items: center; justify-content: space-between; text-align: left; background: #262736; color: #fff; }
.encounter-summary-button span { color: #bfc0cb; font-size: 10px; }
.encounter-summary-button strong { font-size: 12px; }
.encounter-toast { position: fixed; z-index: 115; right: 18px; bottom: 18px; width: min(286px, calc(100% - 36px)); padding: 10px 30px 10px 12px; border: 1px solid #7467a9; background: #f7f3ff; color: var(--ink); box-shadow: 4px 4px 0 rgba(22,20,30,.2); animation: encounterBubbleIn .2s steps(3, end); }
.desktop-view + .encounter-toast { bottom: 88px; }
.encounter-toast > button { position: absolute; right: 5px; top: 5px; width: 22px; height: 22px; border: 0; background: transparent; color: #777181; font-size: 15px; line-height: 1; }
.encounter-toast span, .encounter-toast strong { display: block; }
.encounter-toast span { margin-bottom: 3px; color: var(--violet); font: 700 8px var(--font-pixel-mono); }
.encounter-toast strong { font-size: 12px; }
.encounter-toast p { margin: 3px 0 0; color: #656570; font-size: 9px; line-height: 1.45; }
.encounter-review-overlay { overflow: auto; }
.encounter-review { width: min(720px, 100%); max-height: min(760px, calc(100vh - 48px)); overflow: auto; border: 2px solid #ded9cf; padding: 28px; background: #f8f6f1; color: var(--ink); box-shadow: 10px 10px 0 rgba(0,0,0,.25); }
.encounter-review > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.encounter-review > header h2 { margin: 4px 0 6px; font-size: 27px; }
.encounter-review > header p { margin: 0; color: var(--muted); font-size: 11px; }
.encounter-count { padding: 6px 9px; border: 1px solid #c8c4d7; color: var(--violet); font: 500 9px var(--font-pixel-mono); white-space: nowrap; }
.encounter-timeline { position: relative; }
.encounter-timeline::before { content: ""; position: absolute; left: 31px; top: 0; bottom: 0; width: 1px; background: #c9c4d4; }
.encounter-story { position: relative; padding: 24px 0; display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 18px; border-bottom: 1px solid var(--line); }
.encounter-story-marker { position: relative; z-index: 2; width: 52px; height: 52px; display: grid; place-items: center; border: 2px solid #7566f4; background: #f8f6f1; transform: rotate(45deg); }
.encounter-story-marker span { transform: rotate(-45deg); color: var(--violet); font: 700 9px var(--font-pixel-mono); }
.encounter-story h3 { margin: 5px 0 7px; font-size: 18px; }
.encounter-story > div:last-child > p:not(.eyebrow) { margin: 0; color: #5f5e67; font-size: 12px; line-height: 1.7; }
.encounter-choices { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 7px; }
.encounter-choices .button { min-height: 36px; }
.encounter-resolution { margin-top: 14px; padding: 11px 13px; border-left: 3px solid var(--violet); background: #ece9f7; }
.encounter-resolution span { color: var(--violet); font-size: 9px; }
.encounter-resolution p { margin: 4px 0 0; color: var(--ink); font-size: 11px; }
.encounter-review-actions { padding-top: 20px; display: flex; justify-content: flex-end; }
@keyframes encounterBubbleIn { from { opacity: 0; transform: translateY(8px) scale(.96); } to { opacity: 1; transform: none; } }
.keepsake-overlay { overflow: auto; }
.keepsake-shell { width: min(480px, 100%); }
.keepsake-card { position: relative; min-height: 560px; overflow: hidden; border: 4px solid #ece5d5; outline: 2px solid #181923; padding: 22px; background-color: #1b1c29; background-image: linear-gradient(90deg, rgba(255,255,255,.025) 50%, transparent 50%), linear-gradient(rgba(255,255,255,.025) 50%, transparent 50%); background-size: 12px 12px; color: #fff; box-shadow: 10px 10px 0 rgba(0,0,0,.28); }
.keepsake-card::before, .keepsake-card::after { content: ""; position: absolute; width: 72px; height: 72px; border: 2px solid #e5aa45; transform: rotate(45deg); opacity: .55; }
.keepsake-card::before { left: -42px; top: 70px; }
.keepsake-card::after { right: -42px; bottom: 72px; }
.keepsake-top, .keepsake-footer { position: relative; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #bcbeca; font: 500 9px var(--font-pixel-mono); }
.keepsake-top { padding-bottom: 14px; border-bottom: 1px solid rgba(255,255,255,.18); }
.keepsake-ritual { position: relative; height: 250px; display: grid; place-items: center; }
.keepsake-ritual .default-pet.compact { position: relative; z-index: 3; transform: scale(.62); margin: -34px; }
.keepsake-ring { position: absolute; left: 50%; top: 50%; border: 2px solid rgba(229,170,69,.68); box-shadow: 0 0 18px rgba(229,170,69,.2); transform: translate(-50%,-50%); }
.keepsake-ring.ring-one { width: 192px; height: 192px; border-radius: 50%; }
.keepsake-ring.ring-two { width: 134px; height: 134px; transform: translate(-50%,-50%) rotate(45deg); }
.keepsake-star { position: absolute; left: 50%; top: 50%; color: #e5aa45; font-size: 218px; line-height: 1; opacity: .08; transform: translate(-50%,-52%); }
.keepsake-card > p { margin: 0 0 6px; color: #4eb9bd; font: 500 10px var(--font-pixel-mono); }
.keepsake-card > h2 { margin: 0; max-width: 100%; overflow-wrap: anywhere; color: #fff; font-size: 24px; line-height: 1.2; }
.keepsake-stats { margin: 20px 0; display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid rgba(255,255,255,.2); }
.keepsake-stats div { min-width: 0; padding: 13px 8px; border-right: 1px solid rgba(255,255,255,.2); text-align: center; }
.keepsake-stats div:last-child { border-right: 0; }
.keepsake-stats strong, .keepsake-stats span { display: block; }
.keepsake-stats strong { color: #f0c765; font-size: 18px; }
.keepsake-stats span { margin-top: 2px; color: #bcbeca; font-size: 9px; }
.keepsake-footer { padding-top: 13px; border-top: 1px solid rgba(255,255,255,.18); }
.keepsake-actions { margin-top: 18px; display: flex; justify-content: center; gap: 8px; }

.toast { position: fixed; z-index: 200; right: 20px; top: 20px; max-width: 320px; padding: 13px 16px; border-radius: 6px; background: #181923; color: #fff; box-shadow: var(--shadow); font-size: 12px; animation: toastIn .25s ease; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px); } }

@media (max-width: 980px) {
  .app-shell { grid-template-columns: 78px minmax(0, 1fr); }
  .sidebar { padding-inline: 12px; }
  .brand { padding-inline: 8px; justify-content: center; }
  .brand-copy, .nav-label, .sidebar-footer { display: none; }
  .nav-button { justify-content: center; padding: 0; }
  .focus-grid, .page-grid { grid-template-columns: 1fr; }
  .role-summary { min-height: 420px; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .badge-grid { grid-template-columns: repeat(2, 1fr); }
  .todo-layout { grid-template-columns: 1fr; }
  .todo-composer { border-top: 1px solid var(--line); border-left: 0; grid-template-columns: minmax(0, 1fr) 120px 110px auto; }
  .growth-tier-list { grid-template-columns: 1fr; }
  .trash-file-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  .app-shell { display: block; }
  .sidebar { position: fixed; top: auto; bottom: 0; width: 100%; height: 64px; padding: 8px 10px; flex-direction: row; z-index: 70; }
  .brand, .sidebar-footer { display: none; }
  .nav-list { width: 100%; grid-template-columns: repeat(7, 1fr); gap: 2px; }
  .nav-button { min-height: 48px; flex-direction: column; gap: 2px; font-size: 9px; }
  .nav-label { display: block; }
  .nav-glyph { width: 30px; height: 30px; transform: scale(.86); }
  .main { padding: 20px 14px 90px; }
  .focus-screen-page { min-height: calc(100dvh - 104px); margin: -6px -4px 0; padding: 12px 8px 18px; }
  .focus-screen { min-height: calc(100dvh - 148px); gap: 12px; padding: 4px; }
  .focus-screen-head { gap: 8px; }
  .focus-screen-head h1 { max-width: 70vw; font-size: 21px; }
  .focus-screen-head p:last-child { font-size: 8px; }
  .focus-screen-status { padding: 6px 7px; font-size: 8px; }
  .focus-clock { font-size: clamp(66px, 20vw, 104px); }
  .focus-clock-track { width: 92%; }
  .focus-adventure { min-height: 210px; }
  .focus-moon { width: 30px; height: 30px; right: 9%; }
  .focus-monster { width: 70px; }
  .focus-monster strong { font-size: 7px; }
  .focus-monster small { display: none; }
  .focus-adventure-pet { width: 74px; }
  .focus-adventure-pet .default-pet.compact { transform: scale(.46); margin: -54px -40px; }
  .focus-screen-footer { align-items: stretch; flex-direction: column; gap: 10px; }
  .focus-screen-ritual .ritual-progress { min-height: 84px; }
  .focus-screen-actions { justify-content: stretch; }
  .focus-screen-actions .button { flex: 1; }
  .focus-screen-ready { justify-content: flex-start; padding-top: 32px; }
  .focus-screen-ready .focus-screen-head { align-items: flex-start; }
  .focus-ready-controls { grid-template-columns: 1fr; }
  .focus-ready-controls .button { width: 100%; }
  .focus-ready-note { align-items: flex-start; justify-content: flex-start; }
  .page-header { align-items: flex-start; }
  .status-pill { display: none; }
  .focus-panel, .role-summary { min-height: auto; }
  .focus-form { grid-template-columns: 1fr; }
  .focus-todo-picker { grid-template-columns: 1fr; gap: 5px; }
  .focus-form .button { width: 100%; }
  .ritual-progress { grid-template-columns: 92px minmax(0, 1fr); min-height: 112px; padding-right: 12px; gap: 12px; }
  .ritual-progress:not(.compact) .ritual-diagram { width: 92px; }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .daily-orbit { grid-template-columns: 1fr; text-align: center; }
  .orbit { margin: 0 auto; }
  .badge-grid, .settings-grid { grid-template-columns: 1fr; }
  .role-selector { grid-template-columns: 1fr; }
  .growth-tier { grid-template-columns: 58px minmax(0, 1fr); }
  .growth-tier-art { width: 58px; height: 58px; transform: scale(.85); transform-origin: left center; }
  .role-level-up-overlay { padding: 26px 12px 84px; }
  .level-up-stage { top: 10px; min-height: 480px; padding: 28px 14px 22px; }
  .level-up-pet { width: 190px; height: 210px; }
  .level-up-pet img { width: 184px; height: 198px; }
  .level-up-aura { width: 146px; height: 146px; }
  .role-tier-preview { min-height: 330px; }
  .equipment-board { min-height: 350px; padding: 10px 8px; grid-template-columns: 52px minmax(100px, 1fr) 52px; gap: 7px; }
  .equipment-column { gap: 7px; }
  .equipment-slot { width: 52px; height: 52px; }
  .equipment-character { min-height: 310px; padding-inline: 3px; }
  .equipment-character-art { height: 196px; }
  .equipment-character-art .default-pet.compact { transform: scale(.6); margin: -38px; }
  .equipment-character > .equipment-slot { width: 52px; height: 52px; }
  .todo-composer { grid-template-columns: 1fr; }
  .todo-item { grid-template-columns: 24px minmax(0, 1fr) 32px 32px; gap: 7px; }
  .calendar-app { min-height: 0; grid-template-columns: 1fr; overflow: visible; }
  .calendar-sidebar { border-right: 0; border-bottom: 1px solid #d8d6d8; }
  .calendar-main { overflow: auto; }
  .calendar-toolbar, .calendar-weekdays, .calendar-grid { min-width: 700px; }
  .calendar-grid { grid-template-rows: repeat(6, 92px); }
  .encounter-review { padding: 18px; }
  .encounter-review > header { flex-direction: column; }
  .encounter-story { grid-template-columns: 52px minmax(0, 1fr); gap: 12px; }
  .encounter-story-marker { width: 42px; height: 42px; }
  .encounter-timeline::before { left: 21px; }
  .encounter-toast { right: 14px; bottom: 78px; width: min(286px, calc(100% - 28px)); }
  .pet-wrap { left: auto; right: 8px; top: auto; bottom: 78px; width: 126px !important; min-height: 148px; transform: none; }
  .pet-wrap .pet-bubble { max-width: 122px; padding: 7px 9px; font-size: 9px; }
  .focus-trace-wrap { right: -5px; bottom: 8px; transform: scale(.82); transform-origin: bottom right; }
  .pet-wrap[data-snap="窗口右侧"] .focus-trace-wrap, .pet-wrap[data-snap="桌面右侧"] .focus-trace-wrap { left: -5px; }
  .pet-wrap .pet-slot { width: 112px; height: 118px; }
  .pet-wrap .default-pet.compact, .pet-wrap .pet-video-slot.compact { transform: scale(var(--pet-mobile-scale, .58)); margin: -48px -34px; }
  .pet-wrap[data-snap^="窗口"] .default-pet.compact, .pet-wrap[data-snap^="窗口"] .pet-video-slot.compact { transform: scale(var(--pet-snap-mobile-scale, .42)); }
  .pet-wrap .pet-menu { left: auto; right: 0; width: 210px; transform: none; }
  .mac-menubar { padding-inline: 9px; }
  .mac-menu-left { gap: 9px; }
  .mac-menu-left > span:not(.mac-apple), .mac-control-center, .mac-wifi, .mac-battery, .mac-focus-status { display: none; }
  .mac-mobile-preview span { display: none; }
  .mac-menu-right { gap: 0; }
  .desktop-files { display: none; }
  .desktop-dock { height: 60px; bottom: 8px; padding: 7px 9px; border-radius: 16px; }
  .dock-app { width: 44px; height: 44px; border-radius: 10px; }
  .dock-app.primary img { width: 44px; height: 44px; border-radius: 10px; }
  .dock-launchpad, .dock-trash, .dock-separator { display: none; }
  .desktop-window, .desktop-window-lumen { left: 12px; top: 50px; width: calc(100% - 24px); height: calc(100% - 128px); transform: none; }
  .desktop-window.is-fullscreen, .desktop-window-lumen.is-fullscreen { inset: 0; width: 100%; height: 100%; }
  .window-titlebar { grid-template-columns: 74px 1fr 74px; padding-inline: 10px; }
  .desktop-full-app > .app-shell { position: relative; display: block; height: 100%; }
  .desktop-full-app .sidebar { position: absolute; z-index: 20; top: auto; bottom: 0; width: 100%; height: 58px; padding: 6px 8px; flex-direction: row; }
  .desktop-full-app .brand, .desktop-full-app .sidebar-footer { display: none; }
  .desktop-full-app .nav-list { width: 100%; grid-template-columns: repeat(7, 1fr); gap: 2px; }
  .desktop-full-app .nav-button { min-height: 46px; flex-direction: column; gap: 1px; padding: 0; font-size: 9px; }
  .desktop-full-app .nav-label { display: block; }
  .desktop-full-app .main { height: 100%; padding: 18px 14px 76px; }
  .desktop-full-app .page-header { min-height: auto; margin-bottom: 18px; }
  .desktop-full-app h1 { font-size: 28px; }
  .lumen-window-body { grid-template-columns: 1fr; }
  .window-pet-preview { display: none; }
  .window-dashboard, .mock-window-content { padding: 22px; }
  .easter-egg-guide { align-items: flex-start; gap: 10px; }
  .easter-egg-guide b { display: block; margin: 0 0 3px; }
  .window-role-row, .mock-result-grid { grid-template-columns: 1fr; }
  .mock-file-grid { grid-template-columns: 1fr 1fr; }
  .trash-window-content { padding: 20px 16px 28px; }
  .trash-file-grid { grid-template-columns: 1fr; }
  .trash-file { min-height: 86px; }
  .mock-player { grid-template-columns: 1fr; }
  .mock-cover { width: 140px; }
  .classroom-caption { flex-direction: column; align-items: flex-start; }
  .companion-scene-overlay { padding: 12px; }
  .companion-scene-stage { height: 390px; }
  .companion-scene-stage > header { left: 14px; right: 14px; align-items: flex-start; flex-direction: column; gap: 4px; }
  .companion-scene-stage > header strong { max-width: 100%; }
  .companion-party { left: 10px; right: 10px; bottom: 104px; }
  .companion-party .pixel-companion { width: 45px; transform: scale(.7); transform-origin: bottom; }
  .companion-party .companion-3 { display: none; }
  .companion-self { width: 72px; }
  .companion-self .default-pet.compact { transform: scale(.4); }
  .companion-bubble { max-width: 78px; padding: 5px 6px; font-size: 7px; }
  .companion-table-surface { left: 14px; right: 14px; }
  .companion-scene-stage > footer { left: 14px; right: 14px; }
  .completion-cinematic-stage { min-height: 520px; }
  .completion-close-ritual { width: 240px; height: 240px; }
  .farewell-party { left: 4%; right: 4%; }
  .farewell-party .pixel-companion { width: 45px; transform: scale(.58); }
  .farewell-party .companion-3 { display: none; }
  .farewell-self { width: 70px; }
  .farewell-self .default-pet.compact { transform: scale(.4); }
  .farewell-table { left: 16px; right: 16px; }
  .completion-cinematic-copy { left: 18px; right: 18px; }
  .completion-cinematic-copy strong { font-size: 18px; }
  .completion-cinematic-progress { left: 18px; right: 18px; }
  .journey-road { left: 5%; right: 5%; }
  .journey-pet { --journey-distance: 220px; width: 82px; }
  .journey-pet .default-pet.compact { transform: scale(.42); }
  .reward-row { grid-template-columns: 1fr; }
  .keepsake-card { min-height: 500px; padding: 16px; }
  .keepsake-ritual { height: 205px; }
  .keepsake-ritual .default-pet.compact { transform: scale(.54); }
  .keepsake-top, .keepsake-footer { align-items: flex-start; flex-direction: column; gap: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .notes-experience-guide.is-eaten, .notes-experience-guide.is-eaten::after, .notes-empty-message { animation-delay: 0ms !important; }
}

/* Pixel easter eggs and game-like progress surfaces. */
.baidu-window { padding-top: 30px; background: #fbfbfd; }
.baidu-paw-logo { position: relative; width: 156px; height: 84px; margin: 0 auto 14px; color: #315efb; image-rendering: pixelated; }
.baidu-paw-logo > i { position: absolute; width: 17px; height: 25px; border: 3px solid #203aa2; background: #6282ff; box-shadow: inset 4px 4px 0 #a9b9ff, 4px 4px 0 rgba(28,40,88,.14); transform: rotate(-12deg); }
.baidu-paw-logo > i:nth-child(1) { left: 34px; top: 8px; }
.baidu-paw-logo > i:nth-child(2) { left: 59px; top: 0; transform: rotate(-3deg); }
.baidu-paw-logo > i:nth-child(3) { left: 85px; top: 3px; transform: rotate(7deg); }
.baidu-paw-logo > i:nth-child(4) { left: 108px; top: 14px; transform: rotate(15deg); }
.baidu-paw-logo > b { position: absolute; left: 55px; top: 29px; width: 61px; height: 42px; border: 4px solid #203aa2; background: #4f72f5; clip-path: polygon(20% 0,80% 0,100% 34%,100% 78%,82% 100%,18% 100%,0 78%,0 34%); box-shadow: inset 7px 6px 0 #7892ff; }
.baidu-paw-logo > b::before { content: ""; position: absolute; left: 13px; top: 10px; width: 9px; height: 9px; background: #dbe2ff; box-shadow: 21px 0 #dbe2ff, 10px 14px 0 3px #a9b9ff; }
.baidu-paw-logo > span { position: absolute; left: 50%; top: 76px; width: 180px; color: #243b9a; font: 800 10px var(--font-pixel-mono); text-align: center; transform: translateX(-50%); }
.baidu-paw-logo > small { position: absolute; left: 50%; top: 93px; width: 220px; color: #747991; font-size: 8px; text-align: center; transform: translateX(-50%); }
.baidu-search-shell { width: min(590px, 92%); min-height: 48px; margin: 36px auto 14px; border: 2px solid #315efb; display: grid; grid-template-columns: minmax(0, 1fr) 92px; background: #fff; transition: box-shadow .16s steps(2, end); }
.baidu-search-field { min-width: 0; padding: 0 15px; display: flex; align-items: center; gap: 10px; color: #8d8f99; font-size: 11px; }
.baidu-search-shell > button { border: 0; background: #315efb; color: #fff; font-size: 12px; font-weight: 700; }
.baidu-search-shell > button:hover { background: #244bcc; }
.baidu-search-shell.is-patrolling { box-shadow: 5px 5px 0 #bfd0ff; }
.baidu-window .safari-guide { width: min(590px, 92%); margin: 0 auto 25px; }
.bookmark-heading { margin-top: 18px; display: flex; align-items: end; justify-content: space-between; border-bottom: 2px solid #26283a; padding-bottom: 9px; }
.bookmark-heading h2 { margin: 2px 0 0; }
.bookmark-heading > span { color: #757782; font: 700 8px var(--font-pixel-mono); }

.pixel-music-player { background: #191a28; color: #f7f4ea; }
.pixel-music-player .mock-cover { position: relative; overflow: hidden; border: 4px solid #e6ddc7; outline: 2px solid #11121d; background: repeating-linear-gradient(0deg, transparent 0 12px, rgba(255,255,255,.04) 12px 14px), #31334a; box-shadow: 8px 8px 0 #0f1019; }
.pixel-music-player .mock-cover::before { content: ""; position: absolute; width: 94px; height: 94px; border: 5px solid #e6b853; transform: rotate(45deg); box-shadow: 0 0 0 5px #8d425c, inset 0 0 0 5px #8d425c; }
.pixel-music-player .mock-cover b { position: relative; z-index: 2; color: #fff1b9; font: 800 32px var(--font-pixel-mono); text-shadow: 4px 4px 0 #8d425c; }
.pixel-wing { position: absolute; z-index: 2; width: 54px; height: 18px; background: #67b9c6; clip-path: polygon(0 0,100% 35%,72% 52%,100% 100%,0 65%); }
.wing-left { left: 4px; transform: scaleX(-1); }
.wing-right { right: 4px; }
.music-copy h2 { margin: 6px 0 5px; color: #fff; font-size: clamp(18px, 2.6vw, 27px); letter-spacing: 0; }
.pixel-music-player .music-artist { color: #a9a9b7; }
.pixel-music-player blockquote { margin: 24px 0 20px; border-left: 4px solid #e7b84f; padding: 11px 14px; background: #26283a; color: #fff0b5; font-size: 13px; line-height: 1.55; }
.pixel-music-player .mock-track { width: 100%; height: 10px; margin: 6px 0 5px; padding: 0; border: 2px solid #0d0e17; appearance: none; background: linear-gradient(90deg, #e7b84f var(--music-progress), #4a4c60 var(--music-progress)); cursor: pointer; }
.pixel-music-player .mock-track::-webkit-slider-thumb { width: 14px; height: 18px; border: 3px solid #171824; border-radius: 0; appearance: none; background: #fff4c7; box-shadow: 3px 3px 0 rgba(0,0,0,.25); }
.music-time { display: flex; justify-content: space-between; color: #9092a1; font: 700 8px var(--font-pixel-mono); }
.pixel-music-player .mock-player-actions { margin-top: 18px; align-items: center; }
.pixel-music-player .mock-player-actions button { border: 2px solid #e2dbc9; border-radius: 0; background: #2c2e42; color: #fff; box-shadow: 3px 3px 0 #0e0f17; }
.pixel-music-player .mock-player-actions .music-play-button { width: 48px; height: 42px; background: #e4b54b; color: #1f202e; }

.calendar-game-hint { margin-top: 18px; border: 2px solid #55515d; padding: 10px; background: #fffdf5; box-shadow: 3px 3px 0 #c8c3b8; }
.calendar-game-hint b, .calendar-game-hint span { display: block; }
.calendar-game-hint b { color: #6558c4; font: 800 9px var(--font-pixel-mono); }
.calendar-game-hint span { margin-top: 5px; color: #67636d; font-size: 9px; line-height: 1.55; }
.calendar-today-pet { position: relative; z-index: 5; border: 0; padding: 0; background: transparent; cursor: grab; touch-action: none; }
.calendar-today-pet:active { cursor: grabbing; }
.calendar-today-pet.is-drag-source { opacity: .2; }
body.is-calendar-dragging, body.is-calendar-dragging * { cursor: grabbing !important; user-select: none !important; }
body.is-calendar-dragging .calendar-app, body.is-calendar-dragging .calendar-main { overscroll-behavior: none; touch-action: none; }
.calendar-hero-ghost { position: fixed; z-index: 999; width: 46px; height: 42px; border: 0; padding: 0; background: transparent; pointer-events: none; filter: drop-shadow(4px 6px 0 rgba(0,0,0,.22)); }
.calendar-hero-ghost img { width: 54px; height: 54px; object-fit: contain; transform: translateY(4px); image-rendering: pixelated; }
.calendar-day.is-drop-ready { box-shadow: inset 0 0 0 4px #f2c552, inset 0 0 20px rgba(242,197,82,.55); }
.calendar-day { position: relative; }
.calendar-day-events { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 5px; }
.calendar-event.is-monster { position: relative; width: 42px; min-width: 42px; height: 42px; min-height: 42px; overflow: visible; border: 0; border-radius: 0; padding: 0; display: grid; place-items: center; background: transparent; box-shadow: none; }
.calendar-event.is-monster:hover { transform: translateY(-2px); }
.calendar-event.is-monster.is-selected { box-shadow: none; }
.calendar-monster { position: relative; width: 29px; height: 32px; display: block; image-rendering: pixelated; filter: drop-shadow(3px 3px 0 rgba(0,0,0,.3)); transform: scale(1.12); }
.calendar-monster::before, .calendar-monster::after, .calendar-monster i, .calendar-monster i::before, .calendar-monster i::after { content: ""; position: absolute; display: block; }
.monster-dragon::before { left: 4px; top: 4px; width: 17px; height: 16px; background: #b64245; clip-path: polygon(0 30%,22% 30%,22% 0,42% 24%,78% 24%,100% 45%,80% 65%,95% 100%,55% 82%,22% 100%,28% 62%,0 62%); }
.monster-dragon::after { left: 1px; top: 8px; width: 6px; height: 12px; background: #ef8757; box-shadow: 17px 0 #ef8757; }
.monster-dragon i { left: 9px; top: 10px; width: 3px; height: 3px; background: #ffe997; box-shadow: 7px 0 #ffe997, 3px 10px #743239, 8px 10px #743239; }
.monster-slime::before { left: 3px; top: 7px; width: 20px; height: 17px; border: 3px solid #245f67; background: #52b8b8; clip-path: polygon(20% 0,80% 0,100% 35%,100% 100%,0 100%,0 35%); }
.monster-slime::after { left: 8px; top: 14px; width: 3px; height: 3px; background: #fff; box-shadow: 9px 0 #fff, 4px 7px #245f67, 9px 7px #245f67; }
.monster-golem::before { left: 4px; top: 2px; width: 18px; height: 23px; border: 3px solid #4d4a52; background: #94909a; clip-path: polygon(20% 0,80% 0,80% 16%,100% 16%,100% 86%,75% 86%,75% 100%,25% 100%,25% 86%,0 86%,0 16%,20% 16%); }
.monster-golem::after { left: 9px; top: 9px; width: 3px; height: 3px; background: #ffd45f; box-shadow: 7px 0 #ffd45f; }
.monster-wraith::before { left: 4px; top: 2px; width: 19px; height: 24px; background: #705cac; clip-path: polygon(50% 0,80% 12%,100% 45%,82% 100%,60% 82%,44% 100%,25% 80%,0 100%,8% 45%,22% 12%); }
.monster-wraith::after { left: 9px; top: 9px; width: 3px; height: 5px; background: #ddf6ff; box-shadow: 7px 0 #ddf6ff; }
.calendar-monster-speech { position: absolute; z-index: 10; left: 4px; bottom: calc(100% + 7px); width: 138px; border: 2px solid #282733; padding: 8px 9px; background: #fffbe8; color: #2f2d35; text-align: left; line-height: 1.4; box-shadow: 3px 3px 0 rgba(0,0,0,.22); }
.calendar-monster-speech strong, .calendar-monster-speech small { display: block; }
.calendar-monster-speech strong { font-size: 9px; }
.calendar-monster-speech small { margin-top: 4px; color: #77717c; font: 700 7px var(--font-pixel-mono); }
.calendar-monster-speech::after { content: ""; position: absolute; left: 17px; bottom: -7px; width: 8px; height: 8px; border-right: 2px solid #282733; border-bottom: 2px solid #282733; background: #fffbe8; transform: rotate(45deg); }
.calendar-event.is-being-defeated { animation: monsterHit .72s steps(4, end) both; }
.calendar-event.is-being-defeated::after { content: ""; position: absolute; z-index: 11; left: 1px; top: 12px; width: 35px; height: 5px; background: #fff4bb; box-shadow: 0 -5px #ef6762, 0 5px #ef6762; transform: rotate(-32deg); animation: calendarSlash .72s steps(4, end) both; }
.calendar-event.is-defeated { display: none; }
.calendar-today-pet.is-attacking { animation: calendarHeroAttack .72s steps(4, end) both; }
@keyframes monsterHit { 0%,30% { opacity: 1; transform: none; } 45% { filter: brightness(3); transform: translateX(5px); } 70% { opacity: 1; transform: translateX(-5px); } 100% { opacity: 0; transform: scale(.3) rotate(18deg); } }
@keyframes calendarSlash { 0%,28% { opacity: 0; transform: translate(-25px,14px) rotate(-32deg); } 38%,58% { opacity: 1; transform: translate(10px,-5px) rotate(-32deg); } 100% { opacity: 0; transform: translate(22px,-12px) rotate(-32deg); } }
@keyframes calendarHeroAttack { 0% { transform: translateX(-12px); } 38% { transform: translateX(18px) translateY(6px) rotate(9deg); } 70%,100% { transform: none; } }

.weekly-chart { position: relative; border-left: 3px solid #36343e; border-bottom: 3px solid #36343e; padding: 32px 8px 0; background-image: linear-gradient(rgba(67,64,76,.1) 1px, transparent 1px); background-size: 100% 34px; }
.bar-group { position: relative; }
.bar-group > strong { margin-bottom: 4px; color: #5d5869; font: 700 7px var(--font-pixel-mono); }
.chart-bar { position: relative; overflow: hidden; border: 2px solid #4d465d; border-radius: 0; background: #b6a9ef; box-shadow: 3px 0 0 #5f5688; }
.chart-bar::before { content: ""; position: absolute; inset: 3px; border-top: 3px solid rgba(255,255,255,.45); border-left: 3px solid rgba(255,255,255,.25); }
.chart-bar::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, transparent 0 7px, rgba(54,50,71,.14) 7px 9px); }
.bar-group:nth-child(5) .chart-bar, .bar-group:nth-child(6) .chart-bar { background: #6e60e8; box-shadow: 3px 0 0 #40378f; }
.bar-group span { margin-top: 3px; font-weight: 700; }
.badge-card { position: relative; border: 3px solid #3c3945; border-radius: 0; background: repeating-linear-gradient(0deg, #fff 0 11px, #f6f3eb 11px 12px); box-shadow: 6px 6px 0 #c7c1b6; }
.badge-card::before, .badge-card::after { content: ""; position: absolute; width: 9px; height: 9px; background: #3c3945; }
.badge-card::before { left: 6px; top: 6px; }
.badge-card::after { right: 6px; bottom: 6px; }
.badge-medal { position: relative; width: 90px; height: 90px; border: 5px solid #f6e8b7; border-radius: 0; outline: 4px solid color-mix(in srgb, var(--badge) 65%, #282632); background: var(--badge); clip-path: polygon(28% 0,72% 0,100% 28%,100% 72%,72% 100%,28% 100%,0 72%,0 28%); box-shadow: none; text-shadow: 3px 3px 0 rgba(0,0,0,.25); }
.badge-medal::before { content: ""; position: absolute; inset: 9px; border: 3px dashed rgba(255,255,255,.74); clip-path: inherit; }
.badge-card.locked .badge-medal { background: #6c6d75; }

@media (max-width: 680px) {
  .baidu-window { padding-inline: 14px; }
  .baidu-search-shell { grid-template-columns: minmax(0, 1fr) 78px; }
  .baidu-search-field { padding-inline: 9px; }
  .pixel-music-player { padding: 22px; }
  .calendar-monster-speech { width: 102px; }
}

.companion-encounter-toast { --companion-accent: #65c6cf; position: fixed; z-index: 116; right: 18px; bottom: 18px; width: min(310px, calc(100% - 36px)); height: 184px; overflow: hidden; border: 0; outline: 0; background: transparent; color: #fff; animation: miniCompanionToast 4.3s steps(6, end) both; }
.desktop-view + .companion-encounter-toast { bottom: 88px; }
.companion-encounter-toast.task-reading { --companion-accent: #e5b95d; }
.companion-encounter-toast.task-design { --companion-accent: #f17863; }
.companion-encounter-toast.task-research { --companion-accent: #a899ff; }
.companion-encounter-toast.task-course { --companion-accent: #72b988; }
.companion-encounter-toast > button { position: absolute; z-index: 20; right: 5px; top: 4px; width: 22px; height: 22px; border: 0; background: transparent; color: #bdbdca; font-size: 16px; }
.companion-encounter-toast > header { position: absolute; z-index: 10; left: 10px; right: 30px; top: 8px; display: flex; justify-content: space-between; gap: 8px; }
.companion-encounter-toast > header span { color: var(--companion-accent); font: 800 8px var(--font-pixel-mono); }
.companion-encounter-toast > header strong { font-size: 9px; }
.mini-companion-scene { position: absolute; inset: 30px 8px 24px; overflow: hidden; border: 0; background: transparent; }
.mini-rift { position: absolute; z-index: 8; left: 50%; top: 46%; width: 72px; height: 72px; border: 3px solid var(--companion-accent); transform: translate(-50%,-50%) rotate(45deg); box-shadow: 0 0 12px var(--companion-accent), inset 0 0 12px color-mix(in srgb, var(--companion-accent) 55%, transparent); animation: miniRiftFlash 4.3s steps(5, end) both; }
.mini-rift::before { content: ""; position: absolute; inset: 13px; border: 2px solid #fff; border-radius: 50%; }
.mini-long-table { position: absolute; z-index: 5; left: 22px; right: 22px; bottom: 18px; height: 28px; border: 3px solid #11121a; background: #76564d; box-shadow: inset 0 6px 0 #a37465, 0 9px 0 -4px #11121a; transform: perspective(180px) rotateX(50deg); animation: miniTableFlash 4.3s steps(5, end) both; }
.mini-long-table > i { position: absolute; left: 50%; top: 7px; width: 8px; height: 8px; border: 2px solid var(--companion-accent); transform: translateX(-50%) rotate(45deg); box-shadow: 0 0 8px var(--companion-accent); }
.mini-classmate, .mini-self { position: absolute; z-index: 7; bottom: 38px; width: 34px; height: 50px; animation: miniClassmateFlash 4.3s steps(6, end) both; }
.mini-classmate b { position: absolute; left: 8px; top: 2px; width: 17px; height: 17px; border: 2px solid #11121a; background: #e8bf9c; }
.mini-classmate b::before { content: ""; position: absolute; left: -2px; right: -2px; top: -5px; height: 6px; border: 2px solid #11121a; background: #7566f4; }
.mini-classmate b::after { content: ""; position: absolute; left: 4px; top: 7px; width: 2px; height: 2px; background: #292734; box-shadow: 7px 0 #292734; }
.mini-classmate > span { position: absolute; left: 3px; bottom: 0; width: 28px; height: 29px; border: 2px solid #11121a; background: #7566f4; }
.mini-two b::before, .mini-two > span { background: #4eb9bd; }
.mini-three b::before, .mini-three > span { background: #e47868; }
.mini-one { left: 28px; }
.mini-two { left: 86px; animation-delay: 80ms; }
.mini-three { right: 28px; animation-delay: 160ms; }
.mini-self { right: 79px; width: 42px; }
.mini-self img { position: absolute; left: -4px; bottom: -3px; width: 51px; height: 51px; object-fit: contain; image-rendering: pixelated; filter: drop-shadow(2px 2px 0 rgba(0,0,0,.35)); }
.mini-classmate > i, .mini-self > i { position: absolute; z-index: 9; left: 50%; bottom: calc(100% + 3px); width: max-content; max-width: 80px; border: 2px solid #34323d; padding: 3px 5px; background: #fffdf5; color: #34313a; font: normal 7px/1.25 var(--font-pixel); transform: translateX(-50%); box-shadow: 2px 2px 0 rgba(0,0,0,.25); animation: miniBubbleFlash 4.3s steps(4, end) both; }
.mini-classmate > i::after, .mini-self > i::after { content: ""; position: absolute; left: 50%; bottom: -4px; width: 6px; height: 6px; border-right: 2px solid #34323d; border-bottom: 2px solid #34323d; background: #fffdf5; transform: translateX(-50%) rotate(45deg); }
.companion-encounter-toast > footer { position: absolute; z-index: 10; left: 10px; right: 10px; bottom: 5px; display: flex; justify-content: space-between; color: #aeb0bd; font: 700 7px var(--font-pixel-mono); }
.companion-encounter-toast > footer strong { color: #fff; }
.companion-encounter-toast.motion-off, .companion-encounter-toast.motion-off *, .completion-ritual-animation.motion-off, .completion-ritual-animation.motion-off * { animation: none !important; }
.completion-ritual-animation.motion-off .completion-ring { opacity: .8; transform: translate(-50%,-50%) scale(1); }
.completion-ritual-animation.motion-off .completion-diamond { opacity: .7; transform: translate(-50%,-50%) rotate(45deg); }
.completion-ritual-animation.motion-off .completion-stroke { opacity: .7; transform: rotate(var(--angle)) translateX(24px); }
.completion-ritual-animation.motion-off .completion-core { opacity: 1; transform: translate(-50%,-50%) rotate(45deg); }
@keyframes miniCompanionToast { 0% { opacity: 0; transform: translate(20px,12px) scale(.92); } 10%,88% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(7px); } }
@keyframes miniRiftFlash { 0%,8% { opacity: 0; transform: translate(-50%,-50%) rotate(0) scale(.2); } 14%,28% { opacity: 1; transform: translate(-50%,-50%) rotate(90deg) scale(1); } 38%,100% { opacity: 0; transform: translate(-50%,-50%) rotate(180deg) scale(1.5); } }
@keyframes miniTableFlash { 0%,20% { opacity: 0; transform: perspective(180px) rotateX(50deg) scaleX(.2); } 34%,90% { opacity: 1; transform: perspective(180px) rotateX(50deg) scaleX(1); } 100% { opacity: 0; } }
@keyframes miniClassmateFlash { 0%,28% { opacity: 0; transform: translateY(14px); } 42%,90% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(-5px); } }
@keyframes miniBubbleFlash { 0%,45% { opacity: 0; transform: translate(-50%,5px) scale(.8); } 56%,88% { opacity: 1; transform: translateX(-50%); } 100% { opacity: 0; } }

.completion-ritual-animation { --ritual-accent: #65c6cf; position: relative; height: 224px; margin: -14px -14px 24px; overflow: hidden; border: 2px solid #aba8b5; background-color: #202230; background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px); background-size: 14px 14px; color: #fff; }
.completion-ritual-animation.task-reading { --ritual-accent: #e5b95d; }
.completion-ritual-animation.task-design { --ritual-accent: #f17863; }
.completion-ritual-animation.task-research { --ritual-accent: #a899ff; }
.completion-ritual-animation.task-course { --ritual-accent: #72b988; }
.completion-ritual-animation.role-completion-archer { --ritual-accent: #e5b95d; }
.completion-ritual-animation.role-completion-blacksmith { --ritual-accent: #f29a45; }
.completion-ritual-animation.role-completion-archer .completion-ritual-field, .completion-ritual-animation.role-completion-blacksmith .completion-ritual-field { display: none; }
.completion-role-layer { position: absolute; z-index: 5; inset: 0; overflow: hidden; }
.completion-role-archer { background: linear-gradient(180deg, rgba(229,185,93,.08), transparent 68%); }
.completion-target { position: absolute; left: 58%; top: 50%; width: 126px; height: 126px; border: 8px solid #d6bd86; border-radius: 50%; background: #735748; box-shadow: inset 0 0 0 17px #eee0b8, inset 0 0 0 32px #b4574d, 8px 9px 0 rgba(0,0,0,.22); transform: translate(-50%,-50%); }
.completion-target i { position: absolute; inset: 40px; border-radius: 50%; background: #e5b95d; box-shadow: 0 0 24px rgba(229,185,93,.7); }
.completion-arrow { position: absolute; z-index: 3; left: 8%; top: 50%; width: 190px; height: 7px; background: #f2e7c9; box-shadow: 0 0 13px rgba(229,185,93,.8); opacity: 0; animation: completionArrowFly 3.2s steps(9, end) both; }
.completion-arrow::after { content: ""; position: absolute; right: -15px; top: -8px; border-left: 17px solid #e5b95d; border-block: 11px solid transparent; }
.completion-hit { position: absolute; z-index: 4; left: 58%; top: 50%; width: 34px; height: 34px; border: 5px double #fff3bd; transform: translate(-50%,-50%) rotate(45deg); opacity: 0; animation: completionTargetHit 3.2s steps(7, end) both; }
@keyframes completionArrowFly { 0%,48% { opacity: 0; transform: translateX(-45px); } 55% { opacity: 1; } 76%,100% { opacity: 1; transform: translateX(265px); } }
@keyframes completionTargetHit { 0%,72% { opacity: 0; transform: translate(-50%,-50%) rotate(45deg) scale(.2); } 80% { opacity: 1; transform: translate(-50%,-50%) rotate(45deg) scale(1.5); } 100% { opacity: .35; transform: translate(-50%,-50%) rotate(225deg) scale(2.4); } }
.completion-role-blacksmith { background: radial-gradient(circle at 50% 68%, rgba(242,154,69,.2), transparent 38%), linear-gradient(180deg, rgba(242,154,69,.08), transparent 68%); }
.completion-anvil { position: absolute; left: 50%; bottom: 42px; width: 132px; height: 54px; border: 5px solid #25242b; background: #66646a; box-shadow: inset 0 10px #9c999e, 8px 9px 0 rgba(0,0,0,.28); transform: translateX(-50%); }
.completion-anvil::before { content: ""; position: absolute; left: -34px; top: -18px; width: 200px; height: 28px; border: 5px solid #25242b; background: #89868c; clip-path: polygon(0 25%,72% 0,100% 45%,78% 100%,10% 100%); }
.completion-anvil::after { content: ""; position: absolute; left: 38px; top: 49px; width: 58px; height: 40px; background: #49474c; clip-path: polygon(18% 0,82% 0,100% 100%,0 100%); }
.completion-anvil i { position: absolute; z-index: 3; left: 25px; top: -16px; width: 82px; height: 12px; background: #f29a45; box-shadow: 0 0 22px 5px rgba(242,154,69,.75); animation: completionMetalForge 3.2s steps(8, end) both; }
.completion-hammer { position: absolute; z-index: 6; left: 33%; top: 14%; width: 76px; height: 38px; border: 5px solid #24232a; background: #77747a; box-shadow: inset 0 8px #aaa6ab; transform-origin: 86% 210%; animation: completionHammerFall 3.2s steps(10, end) both; }
.completion-hammer::after { content: ""; position: absolute; right: 8px; top: 32px; width: 11px; height: 96px; border: 3px solid #3e2b24; background: #9b6738; transform: rotate(-10deg); transform-origin: top; }
.completion-forged-core { position: absolute; z-index: 7; left: 50%; top: 58%; width: 38px; height: 18px; background: #fff0a8; box-shadow: 0 0 30px 12px #f29a45; opacity: 0; transform: translate(-50%,-50%); animation: completionForgedCore 3.2s steps(7, end) both; }
.completion-forge-sparks { position: absolute; z-index: 8; left: 50%; top: 57%; width: 6px; height: 6px; background: #fff4be; box-shadow: -78px -52px #f29a45, -44px -76px #ffd16b, 52px -68px #fff4be, 84px -32px #f29a45, 66px 18px #ffd16b, -72px 12px #fff4be; opacity: 0; animation: completionForgeSparks 3.2s steps(7, end) both; }
@keyframes completionHammerFall { 0%,42% { transform: rotate(-34deg); } 58%,68% { transform: rotate(27deg); } 82%,100% { transform: rotate(-24deg); } }
@keyframes completionMetalForge { 0%,44% { background: #a4563d; box-shadow: 0 0 6px rgba(242,154,69,.35); } 60%,86% { background: #ffd16b; box-shadow: 0 0 28px 8px rgba(242,154,69,.95); } 100% { background: #d98755; box-shadow: 0 0 10px rgba(242,154,69,.55); } }
@keyframes completionForgedCore { 0%,54% { opacity: 0; transform: translate(-50%,-50%) scale(.3); } 68%,88% { opacity: 1; transform: translate(-50%,-50%) scale(1.15); } 100% { opacity: .35; transform: translate(-50%,-50%) scale(1.8); } }
@keyframes completionForgeSparks { 0%,52% { opacity: 0; transform: scale(.2); } 62% { opacity: 1; transform: scale(1); } 84%,100% { opacity: 0; transform: scale(1.55) rotate(22deg); } }
.completion-ritual-animation.motion-off .completion-role-layer *, .completion-ritual-animation.motion-off .completion-role-layer *::before, .completion-ritual-animation.motion-off .completion-role-layer *::after { animation: none !important; }
.completion-ritual-field { position: absolute; left: 56%; top: 48%; width: 190px; height: 190px; transform: translate(-50%,-50%); }
.completion-ring, .completion-diamond, .completion-core, .completion-stroke { position: absolute; left: 50%; top: 50%; }
.completion-ring { border: 2px solid var(--ritual-accent); opacity: 0; box-shadow: 0 0 9px color-mix(in srgb, var(--ritual-accent) 65%, transparent); transform: translate(-50%,-50%) scale(.55); animation: completionRingClose 3.2s steps(8, end) both; }
.completion-ring-outer { width: 150px; height: 150px; border-radius: 50%; }
.completion-ring-inner { width: 96px; height: 96px; border-radius: 50%; animation-delay: 140ms; }
.completion-diamond { width: 108px; height: 108px; border: 2px solid color-mix(in srgb, var(--ritual-accent) 72%, white); transform: translate(-50%,-50%) rotate(45deg) scale(.4); animation: completionDiamondClose 3.2s steps(8, end) both; }
.completion-strokes { position: absolute; inset: 0; }
.completion-stroke { width: 70px; height: 3px; background: var(--ritual-accent); box-shadow: 0 0 7px var(--ritual-accent); transform-origin: left center; opacity: 0; animation: completionStrokeDraw 3.2s steps(5, end) both; }
.completion-stroke:nth-child(1) { --angle: 0deg; animation-delay: 0ms; }
.completion-stroke:nth-child(2) { --angle: 45deg; animation-delay: 110ms; }
.completion-stroke:nth-child(3) { --angle: 90deg; animation-delay: 220ms; }
.completion-stroke:nth-child(4) { --angle: 135deg; animation-delay: 330ms; }
.completion-stroke:nth-child(5) { --angle: 180deg; animation-delay: 440ms; }
.completion-stroke:nth-child(6) { --angle: 225deg; animation-delay: 550ms; }
.completion-stroke:nth-child(7) { --angle: 270deg; animation-delay: 660ms; }
.completion-stroke:nth-child(8) { --angle: 315deg; animation-delay: 770ms; }
.completion-core { width: 15px; height: 15px; background: #fff; opacity: 0; box-shadow: 0 0 8px 4px var(--ritual-accent); transform: translate(-50%,-50%) rotate(45deg); animation: completionCoreRelease 3.2s steps(6, end) both; }
.completion-particles { position: absolute; inset: 0; }
.completion-particles i { position: absolute; left: 50%; top: 50%; width: 4px; height: 4px; background: #fff7cf; opacity: 0; transform: rotate(calc(var(--particle) * 36deg)) translateX(12px); animation: completionParticleRelease 3.2s steps(5, end) both; animation-delay: calc(var(--particle) * 20ms); }
.completion-ritual-pet { position: absolute; z-index: 5; left: -50px; bottom: -3px; width: 78px; height: 78px; object-fit: contain; image-rendering: pixelated; filter: drop-shadow(3px 3px 0 rgba(0,0,0,.32)); animation: completionPetCast 3.2s steps(7, end) both; }
.completion-ritual-caption { position: absolute; z-index: 8; left: 14px; top: 13px; }
.completion-ritual-caption span, .completion-ritual-caption strong { display: block; }
.completion-ritual-caption span { color: var(--ritual-accent); font: 800 8px var(--font-pixel-mono); }
.completion-ritual-caption strong { margin-top: 5px; font-size: 11px; }
@keyframes completionStrokeDraw { 0%,8% { opacity: 0; transform: rotate(var(--angle)) translateX(24px) scaleX(0); } 38%,70% { opacity: 1; transform: rotate(var(--angle)) translateX(24px) scaleX(1); } 84%,100% { opacity: 0; transform: rotate(var(--angle)) translateX(5px) scaleX(.15); } }
@keyframes completionRingClose { 0%,24% { opacity: 0; transform: translate(-50%,-50%) scale(.55); } 42%,72% { opacity: 1; transform: translate(-50%,-50%) scale(1); } 86%,100% { opacity: 0; transform: translate(-50%,-50%) scale(.08); } }
@keyframes completionDiamondClose { 0%,30% { opacity: 0; transform: translate(-50%,-50%) rotate(0) scale(.4); } 48%,72% { opacity: 1; transform: translate(-50%,-50%) rotate(135deg) scale(1); } 88%,100% { opacity: 0; transform: translate(-50%,-50%) rotate(225deg) scale(.05); } }
@keyframes completionCoreRelease { 0%,64% { opacity: 0; transform: translate(-50%,-50%) rotate(45deg) scale(.2); } 72% { opacity: 1; transform: translate(-50%,-50%) rotate(135deg) scale(1); } 83% { opacity: 1; transform: translate(-50%,-50%) rotate(225deg) scale(4); } 100% { opacity: .35; transform: translate(-50%,-50%) rotate(315deg) scale(.65); } }
@keyframes completionParticleRelease { 0%,70% { opacity: 0; transform: rotate(calc(var(--particle) * 36deg)) translateX(12px); } 79% { opacity: 1; } 100% { opacity: 0; transform: rotate(calc(var(--particle) * 36deg)) translateX(90px); } }
@keyframes completionPetCast { 0%,12% { transform: translateY(8px); } 32% { transform: translateY(0) rotate(-3deg); } 68% { transform: translateY(-4px) rotate(4deg); } 82% { filter: brightness(2) drop-shadow(0 0 8px var(--ritual-accent)); } 100% { transform: none; } }

@media (max-width: 680px) {
  .companion-encounter-toast { right: 12px; bottom: 78px; width: min(300px, calc(100% - 24px)); }
  .completion-ritual-animation { height: 190px; }
  .completion-ritual-field { left: 60%; transform: translate(-50%,-50%) scale(.82); }
  .completion-ritual-caption strong { max-width: 160px; }
}

.dock-app.launchpad-easter-egg { z-index: 70; overflow: visible; }
.dock-app.launchpad-easter-egg > .launchpad-grid { z-index: 6; animation: dockAppBlockLift 3.6s steps(10, end) both; }
.dock-easter-pet { position: absolute; z-index: 8; left: -2px; top: 0; width: 54px; height: 54px; pointer-events: none; animation: dockPetRushAndBump 3.6s steps(14, end) both; }
.dock-app .dock-easter-pet img { width: 58px; height: 58px; border-radius: 0; object-fit: contain; image-rendering: pixelated; box-shadow: none; filter: drop-shadow(3px 3px 0 rgba(0,0,0,.34)); }
.dock-hit-spark { position: absolute; z-index: 10; left: 20px; top: -27px; width: 8px; height: 8px; opacity: 0; background: #fff5a7; box-shadow: -13px 0 #f5cc4f, 13px 0 #f5cc4f, 0 -13px #fff5a7, 0 13px #fff5a7, -9px -9px #f5cc4f, 9px -9px #f5cc4f; pointer-events: none; animation: dockHitSpark 3.6s steps(5, end) both; }
.dock-mushroom { position: absolute; z-index: 9; left: 8px; top: -74px; width: 35px; height: 38px; opacity: 0; pointer-events: none; transform-origin: center bottom; animation: dockMushroomGrow 3.6s steps(9, end) both; }
.dock-mushroom::before { content: ""; position: absolute; left: 0; top: 0; width: 35px; height: 23px; border: 3px solid #281e25; background: #e5534f; clip-path: polygon(22% 0,78% 0,100% 35%,100% 82%,82% 100%,18% 100%,0 82%,0 35%); box-shadow: inset 0 -5px 0 #b9383b; }
.dock-mushroom::after { content: ""; position: absolute; left: 11px; top: 22px; width: 15px; height: 16px; border: 3px solid #281e25; border-top: 0; background: #f3d5aa; box-shadow: inset 3px 0 #fff0cd; }
.dock-mushroom > i { position: absolute; z-index: 2; left: 5px; top: 6px; width: 7px; height: 7px; background: #fff4d2; box-shadow: 18px 1px #fff4d2, 9px 10px 0 -1px #fff4d2; }
.dock-app.launchpad-easter-egg.motion-off > .launchpad-grid { animation: none; transform: translateY(-42px); }
.dock-app.launchpad-easter-egg.motion-off .dock-easter-pet { animation: none; transform: translateY(-10px); }
.dock-app.launchpad-easter-egg.motion-off .dock-mushroom { animation: none; opacity: 1; transform: translateY(14px); }
@keyframes dockAppBlockLift {
  0%,5% { transform: translateY(0); }
  12%,43% { transform: translateY(-72px); }
  47% { transform: translateY(-80px); }
  52%,82% { transform: translateY(-72px); }
  90% { transform: translateY(-14px); }
  100% { transform: translateY(0); }
}
@keyframes dockPetRushAndBump {
  0% { opacity: 0; transform: translate(-390px,12px) rotate(-8deg); }
  7% { opacity: 1; }
  31% { opacity: 1; transform: translate(-34px,12px) rotate(0); }
  39% { transform: translate(-8px,-2px) rotate(-5deg); }
  47% { transform: translate(0,-31px) rotate(3deg); }
  53% { transform: translate(2px,-20px) rotate(0); }
  66% { opacity: 1; transform: translate(48px,7px) rotate(5deg); }
  88% { opacity: 1; transform: translate(260px,4px) rotate(10deg); }
  100% { opacity: 0; transform: translate(390px,-20px) rotate(16deg); }
}
@keyframes dockHitSpark {
  0%,43% { opacity: 0; transform: scale(.2) rotate(0); }
  47%,52% { opacity: 1; transform: scale(1) rotate(45deg); }
  60%,100% { opacity: 0; transform: scale(1.8) rotate(90deg); }
}
@keyframes dockMushroomGrow {
  0%,46% { opacity: 0; transform: translateY(42px) scale(.2); }
  54% { opacity: 1; transform: translateY(22px) scale(.72); }
  66%,78% { opacity: 1; transform: translateY(-15px) scale(1); }
  86% { opacity: 0; transform: translate(30px,-24px) scale(.8); }
  100% { opacity: 0; transform: translate(60px,-30px) scale(.5); }
}

.launchpad-click-counter { position: absolute; z-index: 52; right: 14px; top: 38px; min-width: 134px; border: 2px solid rgba(255,255,255,.78); padding: 7px 9px; display: grid; grid-template-columns: 1fr auto; gap: 1px 10px; visibility: hidden; opacity: 0; transform: translateY(-5px); background: rgba(25,27,38,.86); color: #fff; box-shadow: 4px 4px 0 rgba(14,15,22,.25); pointer-events: none; backdrop-filter: blur(12px); transition: opacity .12s ease, transform .12s ease, visibility 0s linear .12s; }
.launchpad-click-counter.is-visible { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
.launchpad-click-counter span { color: #c9cbd5; font-size: 8px; }
.launchpad-click-counter strong { grid-row: 1 / 3; grid-column: 2; align-self: center; color: #81c8ff; font: 800 12px var(--font-pixel-mono); }
.launchpad-click-counter small { color: #8e909c; font: 700 7px var(--font-pixel-mono); }
.launchpad-click-counter.is-triggered { border-color: #ffe073; box-shadow: 4px 4px 0 rgba(14,15,22,.25), 0 0 14px rgba(255,224,115,.45); }
.launchpad-click-counter.is-triggered strong { color: #ffe073; }

.ruflow-window-content { min-height: 100%; padding: 0 26px 28px; background: #f6f7f9; }
.ruflow-header { position: sticky; z-index: 4; top: 0; min-height: 112px; margin: 0 -26px 12px; padding: 22px 28px; border-bottom: 1px solid #d9dde3; display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; align-items: center; gap: 16px; background: rgba(248,249,251,.96); backdrop-filter: blur(14px); }
.ruflow-brand-icon { position: relative; width: 54px; height: 54px; overflow: hidden; border-radius: 13px; background: #fff; box-shadow: 0 5px 14px rgba(26,65,106,.14), inset 0 0 0 1px #e6eaf0; }
.ruflow-brand-icon i { position: absolute; left: 11px; width: 34px; height: 12px; border-bottom: 6px solid #2696ff; border-radius: 0 0 60% 50%; transform: skewX(-14deg) rotate(-2deg); }
.ruflow-brand-icon i:nth-child(1) { top: 7px; }
.ruflow-brand-icon i:nth-child(2) { top: 20px; left: 10px; }
.ruflow-brand-icon i:nth-child(3) { top: 33px; left: 9px; width: 30px; }
.ruflow-header p { margin: 0; color: #2e87d9; font: 800 8px var(--font-pixel-mono); }
.ruflow-header h2 { margin: 4px 0 2px; font-size: 21px; }
.ruflow-header div:nth-child(2) > span { color: #7c818b; font-size: 9px; }
.ruflow-thanks { display: block; margin-top: 5px; color: #557696; font-size: 9px; }
.ruflow-header > strong { border: 1px solid #ccd3dc; padding: 6px 9px; color: #555b65; font: 700 9px var(--font-pixel-mono); }
.ruflow-list-head { height: 28px; padding: 0 13px; display: grid; grid-template-columns: 34px minmax(180px, 1fr) minmax(180px, 1.3fr) 74px; align-items: center; color: #92969f; font-size: 8px; }
.ruflow-member-list { border: 1px solid #d9dde3; background: #fff; box-shadow: 0 8px 24px rgba(35,43,55,.06); }
.ruflow-person { min-height: 64px; padding: 7px 13px; border-bottom: 1px solid #e5e7eb; display: grid; grid-template-columns: 34px 48px minmax(130px, .8fr) minmax(180px, 1.3fr) 74px; align-items: center; gap: 10px; }
.ruflow-person:last-child { border-bottom: 0; }
.ruflow-person:hover { background: #f7fbff; }
.ruflow-index { align-self: start; padding-top: 4px; color: #2e91e8; font: 800 10px var(--font-pixel-mono); }
.ruflow-avatar { position: relative; width: 43px; height: 43px; overflow: hidden; border: 2px solid #3d4855; background: var(--avatar-bg); image-rendering: pixelated; box-shadow: 3px 3px 0 rgba(43,54,67,.12); }
.ruflow-avatar::before { content: ""; position: absolute; left: 11px; top: 8px; width: 19px; height: 19px; border: 2px solid #3d4855; background: #efc7a5; }
.ruflow-avatar::after { content: ""; position: absolute; left: 6px; bottom: -4px; width: 31px; height: 20px; border: 2px solid #3d4855; background: var(--avatar-accent); clip-path: polygon(18% 0,82% 0,100% 100%,0 100%); }
.ruflow-avatar i { position: absolute; z-index: 2; left: 9px; top: 5px; width: 23px; height: 9px; border: 2px solid #3d4855; background: var(--avatar-accent); box-shadow: 6px 13px 0 -4px #3d4855, 15px 13px 0 -4px #3d4855; }
.ruflow-person-name { min-width: 0; }
.ruflow-person-name strong, .ruflow-person-name small { display: block; }
.ruflow-person-name strong { font-size: 12px; }
.ruflow-person-name small { margin-top: 2px; color: #91959d; font: 700 8px var(--font-pixel-mono); }
.ruflow-role { color: #5e636d; font-size: 10px; }
.ruflow-status { display: flex; align-items: center; gap: 5px; color: #777c85; font-size: 9px; }
.ruflow-status > i { width: 7px; height: 7px; border-radius: 50%; background: #46b979; box-shadow: 0 0 0 2px #dff4e8; }
.ruflow-status.is-忙碌 > i { background: #e2a546; box-shadow: 0 0 0 2px #f8ecd8; }
.ruflow-status.is-离开 > i { background: #a5a8ae; box-shadow: 0 0 0 2px #e9eaec; }

@media (max-width: 680px) {
  .launchpad-click-counter { display: none; }
  .desktop-window-ruflow { left: 12px; top: 50px; width: calc(100% - 24px); height: calc(100% - 128px); transform: none; }
  .ruflow-window-content { padding-inline: 12px; }
  .ruflow-header { margin-inline: -12px; padding-inline: 14px; grid-template-columns: 48px minmax(0, 1fr); }
  .ruflow-brand-icon { width: 46px; height: 46px; transform: scale(.84); transform-origin: left center; }
  .ruflow-header > strong { display: none; }
  .ruflow-list-head { display: none; }
  .ruflow-person { grid-template-columns: 20px 43px minmax(90px, 1fr) 86px; gap: 7px; }
  .ruflow-role { font-size: 8px; }
  .ruflow-status { display: none; }
}

/* --------------------------------------------------------------------------
 * 7. Interaction & finish polish (visual pass)
 * Hover / active / focus-visible states, scrollbars, selection color, HUD
 * typography, and micro-transitions. Appended last on purpose so it refines
 * earlier rules without touching the data-* hooks, modifier classes, or
 * custom properties JavaScript relies on.
 * ------------------------------------------------------------------------ */
::selection { background: color-mix(in srgb, var(--violet) 30%, transparent); }
:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }

html { scrollbar-width: thin; scrollbar-color: rgba(116,117,133,.42) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { border: 3px solid transparent; border-radius: 8px; background: rgba(116,117,133,.42); background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(116,117,133,.62); background-clip: padding-box; }

/* Faint pixel grid on the light shell, echoing the dark surfaces' texture. */
body { background-image: linear-gradient(rgba(23,24,34,.016) 1px, transparent 1px), linear-gradient(90deg, rgba(23,24,34,.016) 1px, transparent 1px); background-size: 22px 22px; }

/* HUD typography: kickers as mono capitals, numerals aligned and tabular. */
.eyebrow, .section-kicker { font-family: var(--font-pixel-mono); font-size: 11px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; }
.stat strong, .level-line strong, .sidebar-footer strong { font-family: var(--font-pixel-mono); }
.timer, .focus-clock, .pet-timer, .music-time, .stat strong { font-variant-numeric: tabular-nums; }

.button, .nav-button, .duration-button, .field, .filter, .record-tab, .role-option, .todo-start, .todo-delete, .text-link, .toggle, .status-pill, .calendar-day-number, .badge-card, .equipment-slot { transition: background-color .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease, transform .16s ease, opacity .16s ease, filter .16s ease; }

.button:hover { box-shadow: 0 7px 18px rgba(23,24,34,.16); }
.button:active { transform: translateY(0); box-shadow: none; }
.button.secondary:hover { border-color: #cbc8d8; background: #faf9ff; }
.button.danger:hover { background: #ffe4de; }
.button.ghost:hover { background: rgba(255,255,255,.08); }

.nav-button.active { box-shadow: inset 2px 0 0 var(--violet); }

.duration-button:hover { border-color: #565873; color: #fff; background: #2c2d3d; }
.duration-button.active:hover { border-color: #8f81ff; background: #7566f4; }

.field:focus { box-shadow: 0 0 0 3px rgba(117,102,244,.2); }

.text-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.filter:hover { border-color: #cfcdc9; color: var(--ink); }
.filter.active:hover { color: #fff; }
.record-tab:hover { color: var(--ink); }
.todo-start:hover { border-color: #c3bcf6; background: #f4f2ff; }
.todo-delete:hover { border-color: #e6bcb6; background: #fff0ed; }
.role-option:hover { border-color: #c9c5f2; box-shadow: 0 5px 16px rgba(31,29,43,.08); }
.toggle:hover { filter: brightness(.94); }
.toggle.on:hover { filter: brightness(1.08); }
.calendar-day-number:not(:disabled):hover { background: rgba(127,127,140,.24); }
.badge-card:not(.locked):hover { transform: translateY(-3px); box-shadow: var(--shadow); }
tbody tr { transition: background-color .14s ease; }
tbody tr:hover td { background: #faf9f5; }

/* Toast picks up the pixel hard-shadow language of the rest of the UI. */
.toast { border-left: 3px solid var(--violet); box-shadow: 6px 6px 0 rgba(15,16,26,.16), var(--shadow); }

@media (prefers-reduced-motion: reduce) {
  .button, .nav-button, .duration-button, .field, .filter, .record-tab, .role-option, .todo-start, .todo-delete, .text-link, .toggle, .status-pill, .calendar-day-number, .badge-card, .equipment-slot, tbody tr { transition: none; }
  .badge-card:not(.locked):hover { transform: none; }
  .level-up-stage, .level-up-stage > p, .level-up-pet img, .level-up-aura, .level-up-rays i, .level-up-stars i { animation: none; }
}
