:root {
  color-scheme: dark;
  --ink: #f4f2e8;
  --muted: #a8b0a1;
  --soft: #dbe4d1;
  --screen: #0d1713;
  --screen-2: #14211b;
  --panel: rgba(20, 31, 25, 0.92);
  --panel-2: rgba(35, 44, 34, 0.9);
  --line: rgba(133, 175, 139, 0.22);
  --green: #91d36f;
  --cyan: #7bd4d8;
  --yellow: #f0cb67;
  --red: #ee756f;
  --wood: #a96f37;
  --shadow: rgba(0, 0, 0, 0.34);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  min-width: 1080px;
  overflow-x: auto;
  color: var(--ink);
  background: #dfe7d8;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

a {
  color: inherit;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.desk-page {
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
}

#deskScene {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.back-home {
  position: fixed;
  z-index: 5;
  top: 26px;
  left: 28px;
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 15px;
  border: 1px solid rgba(59, 80, 71, 0.16);
  border-radius: 999px;
  color: #5d7b78;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  background: rgba(224, 237, 223, 0.74);
  box-shadow: 0 12px 22px rgba(70, 89, 68, 0.12);
  backdrop-filter: blur(10px);
}

.workbench {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  min-height: 100vh;
  padding: 54px 46px 98px;
  transform-origin: 0 0;
  transition: transform 0.34s cubic-bezier(0.18, 0.82, 0.22, 1);
  will-change: transform;
}

.monitor-shell {
  position: relative;
  width: min(1380px, calc(100vw - 112px));
  min-width: 980px;
  aspect-ratio: 16 / 8.8;
  padding: clamp(16px, 1.25vw, 22px) clamp(16px, 1.3vw, 22px) clamp(46px, 3vw, 58px);
  border: 10px solid #101a17;
  border-radius: 32px;
  background:
    linear-gradient(180deg, #0c1411, #070b09),
    #08100d;
  box-shadow:
    0 4px 0 rgba(255, 255, 255, 0.08) inset,
    0 -2px 0 rgba(0, 0, 0, 0.35) inset,
    0 26px 48px rgba(22, 33, 28, 0.36);
}

.monitor-shell::after {
  position: absolute;
  left: 50%;
  bottom: 10px;
  z-index: 8;
  width: 29px;
  height: 29px;
  border: 5px solid rgba(128, 197, 191, 0.82);
  border-radius: 50%;
  background: #0a1110;
  box-shadow:
    0 0 0 3px rgba(5, 11, 8, 0.86),
    0 0 12px rgba(128, 197, 191, 0.18);
  content: "";
  transform: translateX(-50%);
}

.monitor-screen {
  position: relative;
  display: grid;
  grid-template-rows: 36px minmax(0, 1fr) 78px;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border: 1px solid rgba(133, 175, 139, 0.25);
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(25, 49, 39, 0.86), rgba(7, 16, 13, 0.96)),
    repeating-linear-gradient(0deg, rgba(144, 211, 111, 0.07) 0 1px, transparent 1px 5px);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.02) inset,
    0 0 54px rgba(81, 166, 130, 0.08) inset;
}

.monitor-screen::before {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 4px),
    radial-gradient(circle at 50% -20%, rgba(255, 255, 255, 0.09), transparent 40%);
  mix-blend-mode: screen;
  content: "";
}

.screen-menubar {
  position: relative;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  padding: 0 16px;
  border-bottom: 1px solid rgba(133, 175, 139, 0.16);
  background: rgba(9, 18, 15, 0.75);
}

.menu-brand,
.menu-status {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-mark {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 6px;
  color: #102017;
  font-size: 13px;
  font-weight: 900;
  background: var(--green);
}

.menu-brand strong,
.menu-status span {
  font-size: 12px;
}

.menu-status {
  color: var(--muted);
}

.app-window {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(930px, calc(100% - 44px));
  min-height: 0;
  margin: 22px auto 0;
  overflow: hidden;
  border: 1px solid rgba(137, 185, 143, 0.25);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(19, 31, 26, 0.94), rgba(10, 18, 15, 0.92)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.024) 0 1px, transparent 1px 28px);
  box-shadow: 0 22px 42px rgba(0, 0, 0, 0.32);
}

.window-head {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-height: 82px;
  padding: 16px 22px;
  border-bottom: 1px solid rgba(137, 185, 143, 0.18);
  background: rgba(20, 36, 29, 0.7);
}

.window-lights {
  display: flex;
  gap: 8px;
  align-self: start;
  padding-top: 4px;
}

.window-lights i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}

.window-lights i:nth-child(1) {
  background: var(--red);
}

.window-lights i:nth-child(2) {
  background: var(--yellow);
}

.window-lights i:nth-child(3) {
  background: var(--green);
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.window-head h1 {
  margin-bottom: 0;
  overflow: hidden;
  font-size: 30px;
  line-height: 1.08;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.window-body {
  position: relative;
  min-height: 0;
  overflow: hidden;
}

.app-panel {
  position: absolute;
  inset: 0;
  display: none;
  min-height: 0;
  overflow: auto;
  padding: 18px 22px 22px;
  scrollbar-color: rgba(145, 211, 111, 0.6) rgba(255, 255, 255, 0.04);
}

.app-panel.is-active {
  display: block;
}

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

.span-2 {
  grid-column: span 2;
}

.panel-card,
.feature-panel,
.search-panel {
  min-width: 0;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.section-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  margin-bottom: 14px;
}

.section-title h2 {
  margin-bottom: 0;
  font-size: 17px;
}

.section-title span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.metric-grid div {
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(137, 185, 143, 0.16);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.035);
}

.metric-grid span,
.metric-grid strong {
  display: block;
}

.metric-grid span {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.metric-grid strong {
  overflow: hidden;
  font-size: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.progress-line {
  height: 8px;
  margin-bottom: 13px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(145, 211, 111, 0.12);
}

.progress-line i {
  display: block;
  width: 68%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--cyan));
}

.panel-card p,
.feature-panel p {
  margin: 0;
  color: #dfe8d8;
  font-size: 14px;
  line-height: 1.75;
}

.link-stack,
.path-list,
.todo-list,
.article-list,
.version-list,
.search-results {
  display: grid;
  gap: 9px;
}

.link-stack a,
.path-list a,
.article-list a,
.version-list a,
.search-results a,
.project-card {
  min-width: 0;
  border: 1px solid rgba(137, 185, 143, 0.16);
  border-radius: 7px;
  color: var(--ink);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.035);
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    background 0.16s ease;
}

.link-stack a,
.article-list a,
.search-results a,
.project-card {
  display: grid;
  gap: 3px;
  padding: 12px;
}

.link-stack a:hover,
.path-list a:hover,
.article-list a:hover,
.version-list a:hover,
.search-results a:hover,
.project-card:hover {
  transform: translateY(-1px);
  border-color: rgba(145, 211, 111, 0.5);
  background: rgba(145, 211, 111, 0.08);
}

.link-stack strong,
.article-list strong,
.search-results strong,
.project-card strong {
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.link-stack span,
.article-list span,
.article-list em,
.search-results span,
.project-card span {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.path-list a {
  padding: 10px 12px;
  color: #cbd8c4;
  font-size: 13px;
  font-weight: 800;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.78fr) minmax(0, 1.22fr);
  gap: 15px;
  margin-bottom: 15px;
}

.feature-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 270px;
}

.feature-panel h2 {
  margin: 0 0 13px;
  font-size: 27px;
  line-height: 1.12;
}

.primary-link {
  display: inline-flex;
  align-self: start;
  align-items: center;
  min-height: 38px;
  margin-top: 18px;
  padding: 0 14px;
  border: 1px solid rgba(145, 211, 111, 0.5);
  border-radius: 6px;
  color: #10170f;
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
  background: var(--green);
}

.version-list a {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 4px 12px;
  align-items: center;
  padding: 10px 12px;
}

.version-list b {
  grid-row: span 2;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  color: #10170f;
  font-size: 14px;
  background: var(--cyan);
}

.version-list strong,
.version-list span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.version-list strong {
  font-size: 14px;
}

.version-list span {
  color: var(--muted);
  font-size: 12px;
}

.chapter-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.chapter-strip a {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 8px 10px;
  border: 1px solid rgba(137, 185, 143, 0.16);
  border-radius: 7px;
  color: #dce8d8;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.035);
}

.project-card {
  min-height: 96px;
  align-content: end;
}

.todo-list span {
  display: block;
  padding: 10px 12px;
  border: 1px solid rgba(137, 185, 143, 0.14);
  border-radius: 7px;
  color: #dce8d8;
  font-size: 13px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.035);
}

.record-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(137, 185, 143, 0.18);
  border-radius: 7px;
  color: #dce8d8;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.035);
}

.search-panel {
  min-height: 100%;
}

.search-box {
  display: grid;
  gap: 8px;
  margin-bottom: 15px;
}

.search-box span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.search-box input {
  width: 100%;
  height: 43px;
  padding: 0 13px;
  border: 1px solid rgba(137, 185, 143, 0.22);
  border-radius: 7px;
  color: var(--ink);
  outline: none;
  background: rgba(6, 13, 11, 0.65);
}

.search-box input:focus {
  border-color: rgba(145, 211, 111, 0.58);
}

.screen-dock {
  position: relative;
  z-index: 6;
  display: flex;
  justify-content: center;
  gap: 10px;
  align-items: end;
  padding: 12px 18px 16px;
}

.screen-dock::before {
  position: absolute;
  inset: 8px auto 10px;
  width: min(510px, calc(100% - 40px));
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 22px;
  background: rgba(14, 24, 20, 0.68);
  box-shadow: 0 18px 28px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(12px);
  content: "";
}

.dock-item {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 4px;
  justify-items: center;
  width: 58px;
  border: 0;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
}

.dock-icon {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  color: #102017;
  font-size: 19px;
  font-weight: 950;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.26), rgba(255, 255, 255, 0)),
    var(--cyan);
  box-shadow: 0 10px 16px rgba(0, 0, 0, 0.26);
  transition:
    transform 0.16s ease,
    background 0.16s ease;
}

.dock-item:hover .dock-icon,
.dock-item.is-active .dock-icon {
  transform: translateY(-7px);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0)),
    var(--green);
}

.dock-label {
  max-width: 58px;
  overflow: hidden;
  color: #dce8d8;
  font-size: 11px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
  opacity: 0.76;
}

.dock-item.is-active::after {
  position: absolute;
  bottom: -5px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
  content: "";
}

.monitor-neck {
  width: 94px;
  height: 106px;
  margin-top: -8px;
  border-left: 15px solid rgba(0, 0, 0, 0.22);
  border-right: 15px solid rgba(0, 0, 0, 0.18);
  background:
    linear-gradient(90deg, #273631, #33423d 54%, #1d2a26);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.24);
}

.monitor-foot {
  width: 292px;
  height: 29px;
  margin-top: -4px;
  border-radius: 6px;
  background: #2c3a35;
  box-shadow:
    0 -8px 0 rgba(0, 0, 0, 0.18) inset,
    0 14px 22px rgba(0, 0, 0, 0.24);
}

.desktop-row {
  position: absolute;
  right: 0;
  bottom: 136px;
  left: 0;
  display: flex;
  justify-content: space-between;
  align-items: end;
  padding: 0 clamp(90px, 12vw, 200px);
  pointer-events: none;
}

.book-rack,
.coffee-cup {
  pointer-events: auto;
}

.book-rack {
  position: relative;
  display: flex;
  align-items: end;
  gap: 5px;
  min-width: 238px;
  height: 112px;
  padding: 0 19px 18px 43px;
}

.book-rack::before {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 25px;
  border-radius: 2px;
  background: #b7834b;
  box-shadow:
    0 -5px 0 rgba(255, 229, 173, 0.16) inset,
    0 5px 0 rgba(0, 0, 0, 0.22);
  content: "";
}

.book-rack::after {
  position: absolute;
  bottom: 18px;
  left: 22px;
  width: 16px;
  height: 85px;
  background: #5d351d;
  box-shadow:
    7px 0 0 rgba(0, 0, 0, 0.16) inset,
    0 18px 0 rgba(255, 255, 255, 0.08) inset;
  content: "";
}

.book {
  position: relative;
  z-index: 1;
  display: grid;
  width: 28px;
  height: 74px;
  place-items: center;
  border: 0;
  color: #403927;
  text-decoration: none;
  background: transparent;
  cursor: pointer;
  transform-origin: bottom center;
}

.book.tall {
  height: 88px;
}

.book::before {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(80, 65, 38, 0.18);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.3), transparent 32%, rgba(0, 0, 0, 0.16) 82%),
    var(--book-color);
  box-shadow:
    0 5px 0 rgba(0, 0, 0, 0.14),
    0 4px 0 rgba(255, 255, 255, 0.18) inset;
  content: "";
}

.book span {
  position: relative;
  z-index: 1;
  display: block;
  max-height: 58px;
  overflow: hidden;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.1;
  text-align: center;
  writing-mode: vertical-rl;
}

.book:hover,
.book.is-active {
  transform: translateY(-7px);
}

.book.is-active::before {
  outline: 2px solid rgba(126, 198, 188, 0.58);
  outline-offset: 2px;
}

.coffee-cup {
  position: relative;
  display: grid;
  width: 70px;
  height: 64px;
  place-items: end center;
  padding-bottom: 13px;
  color: #70532b;
  font-weight: 950;
  text-decoration: none;
}

.coffee-cup::before {
  position: absolute;
  inset: 9px 11px 0 3px;
  border-radius: 4px;
  background: #d9c391;
  box-shadow:
    0 6px 0 rgba(0, 0, 0, 0.2),
    0 5px 0 rgba(255, 255, 255, 0.24) inset;
  content: "";
}

.coffee-cup::after {
  position: absolute;
  top: 22px;
  right: 0;
  width: 18px;
  height: 26px;
  border: 7px solid #d9c391;
  border-left: 0;
  border-radius: 0 5px 5px 0;
  content: "";
}

.coffee-cup span {
  position: relative;
  z-index: 1;
}

body.focus-open {
  overflow: hidden;
}

body.focus-open .back-home {
  opacity: 0;
  pointer-events: none;
}

body.focus-open .workbench {
  z-index: 20;
  transform: translate3d(var(--focus-x, 0px), var(--focus-y, 0px), 0) scale(var(--focus-scale, 1));
}

body.focus-open .monitor-shell {
  box-shadow:
    0 0 0 5px rgba(27, 36, 32, 0.86),
    0 34px 90px rgba(0, 0, 0, 0.64),
    inset 0 0 0 2px rgba(116, 209, 214, 0.08);
}

@media (max-width: 1180px) {
  body {
    min-width: 0;
  }

  .workbench {
    min-height: 100vh;
    padding: 72px 18px 188px;
  }

  .monitor-shell {
    width: min(100%, 980px);
    min-width: 0;
    aspect-ratio: 1.1 / 1;
    border-radius: 22px;
  }

  .monitor-screen {
    grid-template-rows: 34px minmax(0, 1fr) 75px;
  }

  .app-window {
    width: calc(100% - 24px);
    margin-top: 12px;
  }

  .window-head {
    min-height: 74px;
    grid-template-columns: 54px minmax(0, 1fr);
    padding: 13px 15px;
  }

  .window-head h1 {
    font-size: 24px;
  }

  .screen-dock {
    gap: 5px;
    padding-inline: 8px;
  }

  .screen-dock::before {
    width: calc(100% - 20px);
  }

  .dock-item {
    width: 49px;
  }

  .dock-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    font-size: 16px;
  }

  .dock-label {
    font-size: 10px;
  }

  .dashboard-grid,
  .split-layout {
    grid-template-columns: 1fr;
  }

  .span-2 {
    grid-column: auto;
  }

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

  .desktop-row {
    bottom: 104px;
    padding: 0 28px;
  }
}

@media (max-width: 720px) {
  .back-home {
    top: 14px;
    left: 14px;
    min-height: 34px;
    padding: 0 12px;
    font-size: 12px;
  }

  .workbench {
    padding: 60px 8px 170px;
  }

  .monitor-shell {
    aspect-ratio: 0.72 / 1;
    padding: 10px 10px 28px;
    border-width: 6px;
  }

  .menu-status span:nth-child(1),
  .menu-status span:nth-child(2) {
    display: none;
  }

  .app-panel {
    padding: 13px;
  }

  .feature-panel {
    min-height: 0;
  }

  .desktop-row {
    bottom: 78px;
    padding: 0 16px;
  }

  .book-rack {
    transform: scale(0.84);
    transform-origin: left bottom;
  }

  .coffee-cup {
    transform: scale(0.82);
    transform-origin: right bottom;
  }
}
