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

:root {
  --bg-wood: #08090c;
  --ink-light: #f4f5f7;
  --ink-muted: #9ca3af;
  --ink-dark: #121418;
  --paper-ivory: #f5f3ee;
  --accent-lime: #a3e635;
  --accent-coral: #fb7185;
  --card-dark: rgba(13, 16, 23, 0.86);
  --border-subtle: rgba(255, 255, 255, 0.12);
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  background-color: var(--bg-wood);
  color: var(--ink-light);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: none;
}

.desk-scene {
  position: relative;
  width: 100vw;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  overflow: hidden;
  background:
    radial-gradient(ellipse 72% 58% at 50% 48%, rgba(40, 46, 60, 0.42) 0%, rgba(10, 12, 16, 0.93) 68%, #040507 100%),
    repeating-linear-gradient(
      0.4deg,
      rgba(255, 255, 255, 0.014) 0px,
      rgba(255, 255, 255, 0.014) 1px,
      transparent 1px,
      transparent 4px
    ),
    #08090c;
}

.desk-keylight {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle 580px at 50% 54%, rgba(255, 255, 255, 0.06) 0%, transparent 74%);
  z-index: 1;
}

.top-bar {
  position: relative;
  width: 100%;
  height: 58px;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 40;
  flex-shrink: 0;
}

.brand-pill {
  appearance: none;
  border: none;
  background: transparent;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink-light);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.02em;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 999px;
  transition: background-color 0.15s ease;
}

.brand-pill:hover {
  background: rgba(255, 255, 255, 0.05);
}

.brand-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent-lime);
  box-shadow: 0 0 10px rgba(163, 230, 53, 0.78);
  display: inline-block;
  flex-shrink: 0;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sfx-btn {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: #d1d5db;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.sfx-btn:hover {
  border-color: rgba(255, 255, 255, 0.28);
}

.sfx-indicator {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-lime);
}

.sfx-indicator.is-muted {
  background: #6b7280;
}

.touch-btn {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: #f4f5f7;
  color: #0b0c10;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.touch-btn:hover {
  transform: translateY(-1px);
  background: #ffffff;
}

.desk-prop {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 6;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.desk-prop.is-off {
  opacity: 0;
  visibility: hidden;
}

.desk-prop canvas {
  display: block;
}

.prop-watch {
  transform-origin: 0 0;
  transform: scale(var(--k, 1)) rotate(-9deg);
}

.prop-mascot {
  width: 160px;
  height: 240px;
  transform-origin: 0 0;
  transform: scale(var(--k, 1));

  mix-blend-mode: lighten;
  appearance: none;
  border: 0;
  padding: 0;
  background: transparent;
  pointer-events: auto;
  cursor: pointer;
}

.prop-mascot:focus-visible {
  outline: 2px solid var(--accent-lime);
  outline-offset: 4px;
}

.mascot-video {
  display: block;
  width: 160px;
  height: 240px;
}

.prop-pen {
  width: 196px;
  height: 11px;
  border-radius: 6px 999px 999px 6px;
  background:
    linear-gradient(90deg, transparent 0 84%, rgba(163, 230, 53, 0.95) 84% 86%, transparent 86%),
    linear-gradient(180deg, #7b8496 0%, #3a4150 38%, #151821 70%, #0a0c11 100%);
  box-shadow: 0 14px 18px rgba(0, 0, 0, 0.7), 0 3px 4px rgba(0, 0, 0, 0.6);
  transform-origin: 0 0;
  transform: scale(var(--k, 1)) rotate(-31deg);
}

.prop-pen::after {
  content: "";
  position: absolute;
  right: -16px;
  top: 1.5px;
  border-left: 18px solid #c7ccd4;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  filter: drop-shadow(0 3px 3px rgba(0, 0, 0, 0.6));
}

.pen-clip {
  position: absolute;
  left: 12px;
  top: -3px;
  width: 58px;
  height: 4px;
  border-radius: 3px;
  background: linear-gradient(180deg, #d1d5db, #6b7280);
  box-shadow: 0 3px 4px rgba(0, 0, 0, 0.55);
}

.prop-card {
  appearance: none;
  border: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  width: 176px;
  height: 108px;
  pointer-events: auto;
  cursor: pointer;
  transform-origin: 0 0;
  transform: scale(var(--k, 1)) rotate(-11deg);
  color: inherit;
  font: inherit;
  text-align: left;
}

.biz-card {
  position: absolute;
  inset: 0;
  border-radius: 9px;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.2s ease, box-shadow 0.25s ease;
}

.biz-card-back {
  background: linear-gradient(150deg, #f4f5f7, #b9bec7);
  transform: translate(14px, 10px) rotate(7deg);
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.7);
}

.biz-card-front {
  padding: 14px 16px;
  background:
    radial-gradient(circle at 85% 15%, rgba(163, 230, 53, 0.08), transparent 55%),
    linear-gradient(145deg, #1a1e28, #0b0d12);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.prop-card:hover .biz-card-front,
.prop-card:focus-visible .biz-card-front {
  transform: translate(-4px, -8px) rotate(-3deg);
  border-color: rgba(163, 230, 53, 0.45);
  box-shadow: 0 26px 38px rgba(0, 0, 0, 0.85);
}

.prop-card:hover .biz-card-back {
  transform: translate(18px, 12px) rotate(10deg);
}

.prop-card:focus-visible {
  outline: none;
}

.biz-row {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.92rem;
  font-weight: 700;
  color: #f3f4f6;
}

.biz-sub {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  color: var(--ink-muted);
}

.biz-cta {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
  font-size: 0.62rem;
  color: var(--accent-lime);
  opacity: 0.75;
  transition: opacity 0.2s ease;
}

.prop-card:hover .biz-cta {
  opacity: 1;
}

.book-stage {
  position: relative;
  flex: 1;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
  padding: 4px 16px;

  pointer-events: none;
}

.book-stage .book-mover {
  pointer-events: auto;
}

.book-mover {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.book-mover.is-front-closed {
  transform: translateX(-25%);
}

.book-mover.is-back-closed {
  transform: translateX(25%);
}

.book-desk-shadow {
  position: absolute;
  top: 6px;
  bottom: 2px;
  left: 0;
  width: 100%;
  border-radius: 8px;
  pointer-events: none;
  z-index: 0;
  box-shadow:
    0 28px 54px rgba(0, 0, 0, 0.86),
    0 10px 24px rgba(0, 0, 0, 0.64);
  transition: left 0.38s ease, width 0.38s ease;
}

.book-mover.is-front-closed:not(.is-flipping-active) .book-desk-shadow {
  left: 50%;
  width: 50%;
}

.book-mover.is-back-closed:not(.is-flipping-active) .book-desk-shadow {
  left: 0;
  width: 50%;
}

.mobile-stack-underlay {
  display: none;
}

.stf__parent {
  position: relative;
  display: block;
  box-sizing: border-box;
  z-index: 2;
  transform: translateZ(0);
  touch-action: none;
}

.stf__wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: visible;
  border-radius: 6px;
  box-sizing: border-box;
}

.stf__block {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  box-sizing: border-box;
  perspective: 2600px;
}

.stf__item {
  display: none;
  position: absolute;
  border: 0;
  outline: none;
  box-shadow: none;
  transform-style: preserve-3d;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  will-change: transform, clip-path;
}

.stf__outerShadow,
.stf__innerShadow,
.stf__hardShadow,
.stf__hardInnerShadow {
  display: none !important;
  border: 0 !important;
  outline: none !important;
  box-shadow: none !important;
}

.stf__underShadowWrap {
  display: none;
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.stf__underShadowBand {
  position: absolute;
  pointer-events: none;
  background: linear-gradient(
    to right,
    rgba(0, 0, 0, 0.68) 0%,
    rgba(0, 0, 0, 0.46) 18%,
    rgba(0, 0, 0, 0.24) 46%,
    rgba(0, 0, 0, 0.08) 74%,
    rgba(0, 0, 0, 0) 100%
  );
}

.stf__frontBendWrap {
  display: none;
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.stf__frontBendBand {
  position: absolute;
  pointer-events: none;
  background: linear-gradient(
    to right,
    rgba(0, 0, 0, 0.38) 0%,
    rgba(0, 0, 0, 0.16) 40%,
    rgba(0, 0, 0, 0) 100%
  );
}

.stf__flapShadowWrap {
  display: none;
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  -webkit-filter: blur(12px);
  filter: blur(12px);
}

.stf__flapShadowWrap.is-mid-lift {
  -webkit-filter: blur(18px);
  filter: blur(18px);
}

.stf__flapShadowWrap.is-high-lift {
  -webkit-filter: blur(25px);
  filter: blur(25px);
}

.stf__flapShadowShape {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  pointer-events: none;
}

.stf__curlOverlay {
  display: none;
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.stf__curlBand {
  position: absolute;
  pointer-events: none;
  background: linear-gradient(
    to right,
    rgba(0, 0, 0, 0.72) 0%,
    rgba(0, 0, 0, 0.38) 6%,
    rgba(255, 255, 255, 0.12) 13%,
    rgba(255, 255, 255, 0.34) 19%,
    rgba(255, 255, 255, 0.25) 24%,
    rgba(255, 255, 255, 0.06) 33%,
    rgba(0, 0, 0, 0.08) 58%,
    rgba(0, 0, 0, 0.22) 88%,
    rgba(0, 0, 0, 0.32) 100%
  );
}

.stf__curlBand.is-light-paper {
  background: linear-gradient(
    to right,
    rgba(12, 15, 24, 0.42) 0%,
    rgba(12, 15, 24, 0.18) 6%,
    rgba(255, 255, 255, 0.54) 14%,
    rgba(255, 255, 255, 0.90) 20%,
    rgba(255, 255, 255, 0.64) 25%,
    rgba(255, 255, 255, 0.14) 35%,
    rgba(15, 19, 28, 0.08) 64%,
    rgba(15, 19, 28, 0.21) 100%
  );
}

.stf__coverCast {
  display: none;
  position: absolute;
  top: 0;
  bottom: 0;
  pointer-events: none;
}

.stf__portraitFlapStock {
  background: #141822;
  border: 0;
  outline: none;
  box-shadow: none;
}

.stf__portraitFlapStock.is-light-paper {
  background: #edeae2;
}

.book-page {
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 0;
  border: 0;
  outline: none;
  box-shadow: none;
  background-color: #0b0d13;
  color: var(--ink-light);
}

.book-page.--left:not(.is-back-flap)::after,
.book-page.--right:not(.is-back-flap)::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 28px;
  pointer-events: none;
  z-index: 6;
}

.book-page.--left:not(.is-back-flap)::after {
  right: 0;
  background: linear-gradient(to left, rgba(0, 0, 0, 0.34), transparent);
}

.book-page.--right:not(.is-back-flap)::after {
  left: 0;
  background: linear-gradient(to right, rgba(0, 0, 0, 0.36), transparent);
}

.bg-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 1;
}

.page-inner {
  position: relative;
  z-index: 3;
  width: 100%;
  height: 100%;
  padding: 24px 28px 18px;
  display: flex;
  flex-direction: column;
}

.page-cover {
  background:
    radial-gradient(circle at 66% 24%, rgba(163, 230, 53, 0.09), transparent 56%),
    linear-gradient(150deg, #1b1e28 0%, #0e1016 58%, #08090d 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.page-cover.is-folding {
  box-shadow: none;
}

.cover-spine-groove {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 14px;
  width: 3px;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.85), rgba(255, 255, 255, 0.1));
  z-index: 4;
  pointer-events: none;
}

.cover-spine-groove.right-groove {
  left: auto;
  right: 14px;
}

.cover-inner {
  justify-content: space-between;
  padding: 28px 32px;
}

.cover-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.94rem;
  letter-spacing: -0.01em;
}

.cover-center {
  margin: auto 0;
}

.cover-title {
  font-size: clamp(1.55rem, 2.2vw, 2.15rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.12;
  margin-bottom: 10px;
  color: #ffffff;
}

.cover-subtitle {
  font-size: 0.94rem;
  color: #d1d5db;
  line-height: 1.45;
  max-width: 28ch;
}

.cover-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.cover-hint {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  color: var(--accent-lime);
}

.page-light {
  background: var(--paper-ivory);
  color: var(--ink-dark);
}

.page-meta-light {
  display: flex;
  justify-content: space-between;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  color: #6b7280;
  font-weight: 600;
}

.contents-heading {
  font-size: 1.82rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 8px 0 12px;
  color: #111317;
}

.toc-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: auto;
}

.toc-btn {
  appearance: none;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid rgba(17, 19, 23, 0.11);
  background: rgba(255, 255, 255, 0.82);
  color: #111317;
  cursor: pointer;
  text-align: left;
  font-size: 0.85rem;
  font-weight: 600;
  transition: background-color 0.15s ease, transform 0.15s ease;
}

.toc-btn:hover {
  background: #ffffff;
  transform: translateX(2px);
}

.toc-btn.toc-featured {
  background: #14161e;
  color: #f9fafb;
  border-color: #14161e;
}

.toc-num {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
  font-size: 0.73rem;
  color: #6b7280;
}

.toc-btn.toc-featured .toc-num,
.toc-btn.toc-featured .toc-arrow {
  color: var(--accent-lime);
}

.toc-label {
  flex: 1;
}

.toc-summary-strip {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
  font-size: 0.63rem;
  color: #6b7280;
  border-top: 1px solid rgba(17, 19, 23, 0.1);
  padding-top: 8px;
  margin-top: 8px;
}

.page-dark {
  background: #0b0d13;
}

.page-sky {
  background: linear-gradient(180deg, #172554 0%, #1d4ed8 55%, #0f172a 100%);
}

.page-hills {
  background: linear-gradient(180deg, #132030 0%, #1c2f2f 55%, #0d1518 100%);
}

.page-warm {
  background:
    radial-gradient(circle at 78% 20%, rgba(251, 146, 60, 0.18), transparent 52%),
    linear-gradient(160deg, #17151c 0%, #0d1017 100%);
}

.chapter-kicker {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
  font-size: 0.67rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #9ca3af;
  margin-bottom: 7px;
}

.kicker-look {
  text-transform: none;
  letter-spacing: -0.01em;
  font-family: "Inter", sans-serif;
  font-size: 0.92rem;
  font-weight: 600;
  color: #bae6fd;
}

.page-title {
  font-size: clamp(1.28rem, 1.85vw, 1.72rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.14;
  color: #ffffff;
  margin-bottom: 8px;
}

.title-fire {
  color: #ff6b4a;
}

.serif-accent {
  font-family: "Instrument Serif", Georgia, serif;
  font-weight: 400;
  font-size: clamp(1.65rem, 2.3vw, 2.15rem);
  letter-spacing: -0.01em;
}

.page-desc {
  font-size: 0.82rem;
  line-height: 1.46;
  color: #e5e7eb;
  max-width: 38ch;
}

.bottom-copy-block {
  margin-top: auto;
  margin-bottom: 8px;
  padding: 13px 15px;
  border-radius: 10px;
  background: rgba(9, 11, 17, 0.76);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-subtle);
}

.bottom-auto {
  margin-top: auto;
  margin-bottom: 8px;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.tag-pill {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(10, 13, 22, 0.86);
  border: 1px solid rgba(125, 211, 252, 0.34);
  color: #e0f2fe;
}

.tag-pill-lime {
  color: var(--accent-lime);
  border-color: rgba(163, 230, 53, 0.42);
  background: rgba(10, 14, 18, 0.88);
}

.glass-box {
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--card-dark);
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(8px);
}

.iris-card {
  max-width: 256px;
  margin-left: auto;
}

.glass-title {
  font-size: 0.86rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 4px;
}

.glass-text {
  font-size: 0.78rem;
  line-height: 1.44;
  color: #d1d5db;
}

.mode-btn-row {
  display: flex;
  gap: 6px;
  margin-top: 9px;
}

.mode-btn,
.mini-action-btn {
  appearance: none;
  padding: 5px 10px;
  border-radius: 6px;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  background: rgba(255, 255, 255, 0.09);
  color: #e5e7eb;
  border: 1px solid rgba(255, 255, 255, 0.16);
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.14s ease, border-color 0.14s ease;
}

.mode-btn:hover,
.mini-action-btn:hover {
  background: rgba(255, 255, 255, 0.16);
}

.mode-btn.is-active {
  background: var(--accent-lime);
  color: #090b0f;
  border-color: var(--accent-lime);
}

.top-row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.side-note {
  font-size: 0.8rem;
  color: #e2e8f0;
  background: rgba(11, 14, 21, 0.84);
  padding: 8px 12px;
  border-left: 2px solid var(--accent-lime);
  border-radius: 6px;
  max-width: 26ch;
}

.hardware-deck {
  margin-top: auto;
  margin-bottom: 8px;
  padding: 12px;
  border-radius: 12px;
  background: linear-gradient(180deg, #191d28, #0e1118);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow:
    0 14px 24px rgba(0, 0, 0, 0.65),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.oled-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 8px;
  background: #06080c;
  border: 1px solid rgba(163, 230, 53, 0.32);
  margin-bottom: 10px;
}

.oled-top {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.oled-title {
  font-size: 0.79rem;
  font-weight: 700;
  color: #f9fafb;
}

.oled-status {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
  font-size: 0.66rem;
  color: var(--accent-lime);
}

.cta-chip-btn {
  appearance: none;
  border: none;
  border-radius: 7px;
  padding: 7px 12px;
  background: var(--accent-lime);
  color: #090b0e;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.12s ease, filter 0.12s ease;
}

.cta-chip-btn:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.cta-chip-btn.full-width {
  width: 100%;
  padding: 8px 14px;
}

.keycap-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}

.mech-key {
  appearance: none;
  height: 40px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: linear-gradient(180deg, #272c3a 0%, #171b24 100%);
  box-shadow: 0 3px 0 #07090d, 0 5px 10px rgba(0, 0, 0, 0.55);
  color: #e5e7eb;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.08s ease, box-shadow 0.08s ease, border-color 0.12s ease;
}

.mech-key:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #07090d;
}

.mech-key.is-lit {
  border-color: var(--accent-lime);
  color: var(--accent-lime);
  box-shadow: 0 3px 0 #07090d, 0 0 12px rgba(163, 230, 53, 0.28);
}

.inline-link {
  display: inline-block;
  margin-top: 8px;
  color: var(--accent-lime);
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
  font-size: 0.73rem;
  font-weight: 600;
  text-decoration: none;
}

.inline-link:hover {
  text-decoration: underline;
}

.tubes-prompt {
  font-size: 0.75rem;
  color: #cbd5e1;
  margin-bottom: 8px;
}

.tubes-arena {
  position: relative;
  flex: 1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 11px;
  padding: 14px 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 8px;
}

.tube-col {
  appearance: none;
  width: 48px;
  height: 144px;
  padding: 5px;
  border-radius: 8px 8px 22px 22px;
  border: 2px solid rgba(255, 255, 255, 0.26);
  border-top-width: 1px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.02));
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  justify-content: flex-start;
  gap: 5px;
  cursor: pointer;
  transition: transform 0.14s ease, border-color 0.14s ease;
}

.tube-col.is-selected {
  transform: translateY(-7px);
  border-color: var(--accent-lime);
  box-shadow: 0 8px 18px rgba(163, 230, 53, 0.24);
}

.orb-ball {
  width: 31px;
  height: 31px;
  border-radius: 50%;
  display: block;
  pointer-events: none;
  box-shadow: inset -4px -5px 8px rgba(0, 0, 0, 0.38), inset 3px 3px 6px rgba(255, 255, 255, 0.42);
}

.orb-lime {
  background: radial-gradient(circle at 35% 30%, #d9f99d, #65a30d);
}

.orb-coral {
  background: radial-gradient(circle at 35% 30%, #fecdd3, #e11d48);
}

.orb-cyan {
  background: radial-gradient(circle at 35% 30%, #bae6fd, #0284c7);
}

.endcard-overlay {
  position: absolute;
  inset: 0;
  border-radius: 12px;
  background: rgba(9, 11, 16, 0.93);
  backdrop-filter: blur(6px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 14px;
  text-align: center;
}

.endcard-badge {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  color: var(--accent-lime);
  font-weight: 700;
}

.endcard-heading {
  font-size: 1.18rem;
  font-weight: 700;
}

.endcard-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.weblab-card {
  padding: 12px;
  border-radius: 11px;
  background: rgba(11, 13, 19, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.weblab-card-head {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #ffffff;
}

.weblab-select {
  width: 100%;
  padding: 7px 10px;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: #171b26;
  color: #f9fafb;
  font-size: 0.77rem;
  cursor: pointer;
}

.weblab-preview-strip {
  padding: 7px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.73rem;
  color: #cbd5e1;
}

.back-cover-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.cover-cta-primary,
.cover-cta-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 15px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.14s ease, filter 0.14s ease;
}

.cover-cta-primary {
  background: var(--accent-lime);
  color: #090b0f;
}

.cover-cta-primary:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.cover-cta-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: #f9fafb;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.cover-cta-secondary:hover {
  background: rgba(255, 255, 255, 0.16);
}

.reopen-btn {
  appearance: none;
  background: transparent;
  border: none;
  color: var(--ink-muted);
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
  font-size: 0.74rem;
  cursor: pointer;
}

.reopen-btn:hover {
  color: #ffffff;
}

.page-foot {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
  font-size: 0.66rem;
  color: rgba(255, 255, 255, 0.44);
  margin-top: auto;
}

.page-foot-light {
  color: #6b7280;
}

.bottom-nav {
  position: relative;
  margin-bottom: 12px;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(14, 16, 23, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  z-index: 40;
  flex-shrink: 0;
}

.nav-btn {
  appearance: none;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: #f3f4f6;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
  font-size: 0.74rem;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.nav-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.16);
}

.nav-btn:disabled {
  opacity: 0.32;
  cursor: default;
}

.nav-btn-accent {
  color: var(--accent-lime);
}

.nav-page-label {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
  font-size: 0.72rem;
  color: #cbd5e1;
  min-width: 102px;
  text-align: center;
  display: inline-block;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 5, 8, 0.78);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 100;
}

.modal-panel {
  width: 100%;
  max-width: 396px;
  padding: 22px;
  border-radius: 14px;
  background: #12151e;
  border: 1px solid rgba(255, 255, 255, 0.16);
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.85);
}

.modal-title {
  font-size: 1.2rem;
  font-weight: 700;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.copy-toast {
  padding: 7px 10px;
  border-radius: 8px;
  background: rgba(163, 230, 53, 0.14);
  border: 1px solid rgba(163, 230, 53, 0.38);
  color: var(--accent-lime);
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
  font-size: 0.72rem;
  text-align: center;
}

.is-hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

@media (max-width: 768px) {
  .desk-prop {
    display: none;
  }

  .top-bar {
    height: 50px;
    padding: 0 14px;
  }

  .book-stage {
    padding: 2px 10px 16px;
  }

  .book-mover,
  .book-mover.is-front-closed,
  .book-mover.is-back-closed {
    transform: none;
  }

  .book-mover.is-front-closed:not(.is-flipping-active) .book-desk-shadow,
  .book-mover.is-back-closed:not(.is-flipping-active) .book-desk-shadow {
    left: 0;
    width: 100%;
  }

  .mobile-stack-underlay {
    display: block;
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
  }

  .mobile-stack-underlay.is-last-page {
    display: none;
  }

  .stack-sheet {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 6px;
    background: linear-gradient(180deg, #212636, #131722);
    border: 1px solid rgba(255, 255, 255, 0.18);
  }

  .stack-sheet-1 {
    width: calc(100% - 10px);
    height: 100%;
    top: 6px;
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.65);
  }

  .stack-sheet-2 {
    width: calc(100% - 22px);
    height: 100%;
    top: 11px;
    opacity: 0.74;
  }

  .page-inner {
    padding: 20px 20px 16px;
  }

  .cover-inner {
    padding: 24px 22px;
  }

  .tube-col {
    width: 48px;
    height: 154px;
  }
}

.torn-ghost {
  position: fixed;
  z-index: 90;
  pointer-events: none;
  will-change: transform, clip-path;
}

.torn-ghost-page {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.torn-ghost-crease,
.paper-ball-skin {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(115deg, transparent 37%, rgba(255, 255, 255, 0.24) 40%, transparent 43%),
    linear-gradient(62deg, transparent 51%, rgba(0, 0, 0, 0.3) 54%, transparent 57%),
    linear-gradient(160deg, transparent 27%, rgba(0, 0, 0, 0.24) 30%, transparent 33%),
    linear-gradient(20deg, transparent 65%, rgba(255, 255, 255, 0.2) 68%, transparent 71%),
    linear-gradient(140deg, transparent 71%, rgba(0, 0, 0, 0.22) 74%, transparent 77%),
    linear-gradient(88deg, transparent 18%, rgba(255, 255, 255, 0.14) 21%, transparent 24%),
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.36), transparent 46%),
    radial-gradient(circle at 70% 76%, rgba(0, 0, 0, 0.38), transparent 56%),
    var(--ball-tint, #262c3a);
}

.torn-ghost-crease {
  opacity: 0;
}

.paper-ball {
  position: fixed;
  z-index: 30;
  width: 76px;
  height: 70px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  filter: drop-shadow(0 12px 12px rgba(0, 0, 0, 0.62)) drop-shadow(0 2px 2px rgba(0, 0, 0, 0.5));
  transform: rotate(var(--ball-rot, 0deg));
  transition: transform 0.2s ease;
}

.paper-ball:hover,
.paper-ball:focus-visible {
  transform: rotate(var(--ball-rot, 0deg)) translateY(-4px) scale(1.08);
}

.paper-ball:focus-visible {
  outline: 2px solid var(--accent-lime);
  outline-offset: 4px;
}

.paper-ball-flying {
  z-index: 95;
  pointer-events: none;
  transition: none;
}

.paper-bin {
  position: fixed;
  right: 24px;
  bottom: 22px;
  z-index: 45;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(14, 16, 23, 0.92);
  backdrop-filter: blur(10px);
  color: #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.6);
}

.paper-bin.is-hidden {
  display: none;
}

.paper-bin-count {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--accent-lime);
  color: #090b0f;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 768px) {
  .paper-bin {
    right: 14px;
    bottom: 70px;
    width: 46px;
    height: 46px;
  }
}

.tear-hint{position:fixed;left:50%;bottom:150px;z-index:60;transform:translate(-50%,-8px);max-width:calc(100% - 32px);padding:10px 16px;border:1px solid rgba(163,230,53,.35);border-radius:999px;background:rgba(10,13,20,.92);color:#e5e7eb;font:500 13px/1.3 Inter,system-ui,sans-serif;text-align:center;opacity:0;pointer-events:none;transition:opacity .3s ease,transform .3s ease}
.tear-hint.is-visible{opacity:1;transform:translate(-50%,0)}
@media (prefers-reduced-motion: reduce){.tear-hint{transition:none}}

@media (max-width: 768px) {
  .notepad-root {
    position: relative;
    margin-top: 16px;
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
    z-index: 2;
  }

  .notepad-root .notepad-page {
    position: absolute;
    inset: 0;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset;
  }

  .notepad-flap,
  .notepad-crease,
  .notepad-shade {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    pointer-events: none;
  }

  .notepad-shade {
    z-index: 11;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.18) 45%, transparent);
  }

  .notepad-crease {
    z-index: 13;
    height: 34px;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.28));
  }

  .notepad-flap {
    --curl: 1;
    --shine: 38%;
    z-index: 14;
    overflow: hidden;
  }

  .notepad-flap::before,
  .notepad-flap::after {
    content: "";
    position: absolute;
    inset: 0;
  }

  .notepad-flap::before {
    background:
      repeating-linear-gradient(180deg, transparent 0 27px, rgba(128, 128, 128, 0.06) 27px 28px),
      linear-gradient(180deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.0) 40%);
  }

  .notepad-flap::after {
    opacity: var(--curl);
    background: linear-gradient(180deg,
      rgba(0, 0, 0, 0.12) 0%,
      rgba(255, 255, 255, 0.18) var(--shine, 38%),
      rgba(255, 255, 255, 0.04) calc(var(--shine, 38%) + 24%),
      rgba(0, 0, 0, 0.22) 84%,
      rgba(0, 0, 0, 0.45) 100%);
  }

  .notepad-grip {
    display: none;
    position: absolute;
    left: 50%;
    z-index: 15;
    width: 44px;
    height: 5px;
    margin-left: -22px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.42);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25);
    pointer-events: none;
    transition: opacity 0.2s ease;
  }

  .notepad-grip-top {
    top: 16px;
  }

  .notepad-grip-bottom {
    bottom: 10px;
  }

  .notepad-root.is-game .notepad-grip {
    display: block;
  }

  .notepad-root.is-peeling .notepad-grip {
    opacity: 0;
  }

  .notepad-root .cover-spine-groove {
    display: none;
  }

  .notepad-root::before,
  .notepad-root::after {
    content: "";
    position: absolute;
    left: 14px;
    right: 14px;
    pointer-events: none;
    z-index: 200;
  }

  .notepad-root::after {
    top: 4px;
    height: 8px;
    background: radial-gradient(circle at 50% 50%, #05060a 0 2.6px, rgba(5, 6, 10, 0.35) 3.4px, transparent 4px) 0 0 / 18px 8px repeat-x;
  }

  .notepad-root::before {
    top: -12px;
    height: 22px;
    background:
      radial-gradient(ellipse 5px 10px at 50% 50%, transparent 0 3px, #e4e8f0 3.6px, #8b94a7 4.6px, transparent 5.2px) 0 0 / 18px 22px repeat-x;
    filter: drop-shadow(0 2px 1.5px rgba(0, 0, 0, 0.55));
  }
}

