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

:root {
  --bg: #21273f;
  --text: #d4e8ff;
  --text-glow: #38b764;
}

html,
body {
  height: 100%;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: 'Press Start 2P', monospace;
  overflow: hidden;
}

.header {
  position: fixed;
  top: clamp(1rem, 4vh, 2.5rem);
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  text-align: center;
  width: min(98vw, 1100px);
}

.title {
  font-size: clamp(1.4rem, 7vw, 3rem);
  letter-spacing: 0.12em;
  color: var(--text);
  text-shadow:
    0 0 12px var(--text-glow),
    2px 2px 0 rgba(0, 0, 0, 0.9);
  line-height: 1.4;
}

.tagline {
  margin-top: clamp(0.75rem, 2vh, 1.25rem);
  font-size: clamp(0.5rem, 2.4vw, 0.95rem);
  letter-spacing: 0.06em;
  line-height: 1.9;
  color: rgba(180, 210, 240, 0.85);
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.9);
  max-width: min(95vw, 52em);
  margin-left: auto;
  margin-right: auto;
  padding: 0 0.5rem;
}

.hero {
  position: fixed;
  inset: 0;
}

.scene-wrap {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.scene-inner {
  position: relative;
  flex-shrink: 0;
  min-width: 100%;
  min-height: 100%;
  aspect-ratio: 1024 / 636;
}

.scene-bg {
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.bowl-layer {
  position: absolute;
  left: calc(var(--bowl-x) * 100%);
  top: calc(var(--bowl-y) * 100%);
  width: calc(var(--bowl-w) * 100%);
  height: calc(var(--bowl-h) * 100%);
  z-index: 2;
}

.bowl-media {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.holders-widget {
  position: absolute;
  left: calc(var(--holders-x) * 100%);
  top: calc(var(--holders-y) * 100%);
  width: calc(var(--holders-w) * 100%);
  aspect-ratio: 858 / 496;
  z-index: 1;
  pointer-events: none;
}

.holders-panel {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  filter: drop-shadow(2px 4px 6px rgba(0, 0, 0, 0.35));
}

.holders-screen {
  position: absolute;
  left: var(--holders-screen-x);
  top: var(--holders-screen-y);
  width: var(--holders-screen-w);
  height: var(--holders-screen-h);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  container-type: size;
}

.holders-count {
  margin: 0;
  padding-bottom: 0.06em;
  text-align: center;
  font-family: 'Press Start 2P', monospace;
  font-size: min(68cqh, 88cqw);
  line-height: 1;
  letter-spacing: 0.02em;
  color: #ff5a45;
  text-shadow:
    0 0 6px rgba(255, 70, 50, 0.95),
    0 0 12px rgba(255, 40, 40, 0.55),
    1px 1px 0 rgba(0, 0, 0, 0.95);
  white-space: nowrap;
}

.holders-count.is-loading {
  opacity: 0.55;
}

.doc-trigger {
  position: absolute;
  left: calc(var(--doc-x) * 100%);
  top: calc(var(--doc-y) * 100%);
  width: calc(var(--doc-w) * 100%);
  aspect-ratio: var(--doc-aspect);
  z-index: 3;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  background: transparent;
  transform: rotate(2deg);
  transform-origin: 55% 90%;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.doc-trigger-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  filter: drop-shadow(3px 5px 8px rgba(0, 0, 0, 0.55));
  pointer-events: none;
}

.doc-trigger:hover,
.doc-trigger:focus-visible {
  transform: rotate(1deg) scale(1.04);
  filter: brightness(1.12);
  outline: none;
}

.doc-trigger:focus-visible .doc-trigger-img {
  filter:
    drop-shadow(3px 5px 8px rgba(0, 0, 0, 0.55))
    drop-shadow(0 0 10px rgba(255, 60, 40, 0.65));
}

body.doc-open {
  overflow: hidden;
}

.doc-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(8, 12, 24, 0.72);
  backdrop-filter: blur(2px);
  cursor: pointer;
}

.doc-overlay[hidden] {
  display: none;
}

.doc-note {
  position: relative;
  z-index: 1;
  width: min(75vw, 920px);
  height: min(75vh, 780px);
  transform: rotate(-0.6deg);
  display: flex;
  flex-direction: column;
  padding: clamp(1rem, 2.5vw, 1.75rem);
  background:
    linear-gradient(165deg, #fff6bf 0%, #f3e088 38%, #e9cf62 100%);
  border: 3px solid #c9a832;
  box-shadow:
    0 0 0 2px #8a6d1d,
    8px 10px 0 rgba(0, 0, 0, 0.45),
    0 0 40px rgba(255, 220, 80, 0.25);
  color: #2a2418;
  overflow: hidden;
  cursor: default;
  image-rendering: pixelated;
}

.doc-note-header {
  flex-shrink: 0;
  border-bottom: 2px dashed rgba(120, 90, 20, 0.45);
  padding-bottom: 0.75rem;
  margin-bottom: 0.75rem;
}

.doc-note-label {
  font-size: clamp(0.35rem, 1.4vw, 0.5rem);
  letter-spacing: 0.14em;
  color: rgba(80, 60, 10, 0.85);
  margin-bottom: 0.6rem;
}

.doc-note-title {
  font-size: clamp(0.7rem, 2.8vw, 1.1rem);
  letter-spacing: 0.1em;
  line-height: 1.5;
  color: #1a1508;
  text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.35);
}

.doc-note-subtitle {
  margin-top: 0.5rem;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(0.75rem, 2vw, 1rem);
  font-style: italic;
  line-height: 1.5;
  color: rgba(50, 38, 8, 0.9);
}

.doc-note-body {
  flex: 1;
  overflow-y: auto;
  padding-right: 0.5rem;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(0.72rem, 1.65vw, 0.92rem);
  line-height: 1.65;
  letter-spacing: 0.01em;
}

.doc-note-body section + section {
  margin-top: 0;
}

.doc-note-body h2 {
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(0.52rem, 1.85vw, 0.72rem);
  letter-spacing: 0.06em;
  line-height: 1.7;
  margin: 0 0 0.75rem;
  color: #3d2f0a;
}

.doc-note-body h3 {
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(0.44rem, 1.5vw, 0.58rem);
  letter-spacing: 0.06em;
  line-height: 1.6;
  margin-bottom: 0.35rem;
  color: #3d2f0a;
}

.doc-divider {
  border: none;
  border-top: 2px dashed rgba(120, 90, 20, 0.4);
  margin: 1.1rem 0;
}

.doc-emphasis {
  margin-top: 0.75rem;
  font-weight: 700;
  color: #1a1508;
  line-height: 1.55;
}

.doc-generation {
  margin-top: 1rem;
  padding-left: 0.65rem;
  border-left: 3px solid rgba(138, 109, 29, 0.45);
}

.doc-generation + .doc-generation {
  margin-top: 0.85rem;
}

.doc-range {
  margin-bottom: 0.35rem;
  font-size: 0.92em;
  color: rgba(60, 45, 10, 0.85);
}

.doc-note-body p {
  margin-bottom: 0.55rem;
  color: rgba(35, 28, 12, 0.92);
}

.doc-note-body p:last-child {
  margin-bottom: 0;
}

.doc-note-body li {
  position: relative;
  padding-left: 1.1em;
  margin-bottom: 0.35rem;
  color: rgba(35, 28, 12, 0.92);
}

.doc-note-body ul {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0.75rem;
}

.doc-note-body li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: #8a6d1d;
}

.doc-note-body strong {
  color: #1a1508;
}

.doc-note-hint {
  flex-shrink: 0;
  margin-top: 0.75rem;
  font-size: clamp(0.32rem, 1.2vw, 0.45rem);
  letter-spacing: 0.06em;
  color: rgba(80, 60, 10, 0.65);
  text-align: center;
}

.doc-note-body::-webkit-scrollbar {
  width: 8px;
}

.doc-note-body::-webkit-scrollbar-thumb {
  background: rgba(120, 90, 20, 0.45);
  border: 2px solid #f3e088;
}
