:root {
  --bg: #c5deff;
  --panel: #0c0d0f;
  --panel2: #121419;
  --text: #f3f4f6;
  --muted: #b6bbc4;
  --border: rgba(255, 255, 255, 0.08);
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.35);
  --radius: 16px;
  --radius-sm: 12px;
  --focus: rgba(255, 255, 255, 0.18);
}

* {
  box-sizing: border-box;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

html,
body {
  height: 100%;
}

*::-webkit-scrollbar {
  width: 0;
  height: 0;
}

body {
  margin: 0;
  background: radial-gradient(1200px 700px at 20% 10%, rgba(255, 255, 255, 0.15), transparent 55%),
    radial-gradient(1000px 700px at 90% 20%, rgba(255, 255, 255, 0.08), transparent 65%),
    var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji",
    "Segoe UI Emoji";
  line-height: 1.4;
}

.app {
  height: 100%;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 18px;
  padding: 18px;
}

.panel {
  background: linear-gradient(180deg, var(--panel2), var(--panel));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.panel--thin {
  box-shadow: none;
}

.sidebar {
  display: flex;
  flex-direction: column;
  padding: 18px;
  overflow: hidden;
}

.brand__title {
  font-weight: 650;
  letter-spacing: -0.02em;
  font-size: 18px;
}

.brand__subtitle {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.nav {
  margin-top: 18px;
  overflow: auto;
  padding-right: 6px;
}

.nav__section + .nav__section {
  margin-top: 14px;
}

.nav__label {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.nav__item {
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, transform 120ms ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.nav__item:active {
  transform: translateY(1px);
}

.nav__item[aria-current="page"] {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.14);
}

.nav__item:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.sidebar__footer {
  margin-top: auto;
  padding-top: 14px;
}

.hint {
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
}

.controls-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 26px;
}

.control-group {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  background: rgba(255, 255, 255, 0.02);
}

.control-group__label {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: grid;
  place-items: center;
  z-index: 50;
}

.overlay__fatty {
  color: #ff4c4c;
  font-size: clamp(48px, 8vw, 88px);
  font-weight: 900;
  letter-spacing: 0.15em;
  transform: rotate(-16deg);
  text-shadow: 0 0 22px rgba(255, 76, 76, 0.7);
}

.overlay[hidden] {
  display: none;
}

.tank-overlay {
  background: rgba(0, 0, 0, 0.9);
}

.tank-overlay__card {
  background: rgba(12, 13, 15, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  padding: 18px;
  width: min(520px, 90vw);
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
}

.tank-overlay__close {
  align-self: flex-end;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-size: 12px;
  letter-spacing: 0.25em;
  padding: 6px 16px;
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease;
}

.tank-overlay__close:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
}

.tank-overlay__image-wrapper {
  width: 100%;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
}

.tank-overlay__image-wrapper img {
  width: 100%;
  display: block;
  height: auto;
}

.tank-overlay__caption {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

.jordan-overlay__card {
  background: rgba(8, 8, 10, 0.96);
  border: 1px solid rgba(241, 196, 15, 0.4);
  border-radius: var(--radius);
  padding: 18px;
  width: min(520px, 90vw);
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.75);
}

.jordan-overlay__close {
  align-self: flex-end;
  border: 1px solid rgba(241, 196, 15, 0.6);
  border-radius: 999px;
  background: rgba(241, 196, 15, 0.18);
  color: var(--text);
  font-size: 12px;
  letter-spacing: 0.25em;
  padding: 6px 16px;
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease;
}

.jordan-overlay__close:hover {
  background: rgba(241, 196, 15, 0.3);
  border-color: rgba(241, 196, 15, 1);
}

.jordan-overlay__image-wrapper {
  width: 100%;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
}

.jordan-overlay__image-wrapper img {
  width: 100%;
  display: block;
  height: auto;
}

.jordan-overlay__caption {
  margin: 0;
  font-size: 13px;
  color: #f8c471;
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

.code-access {
  position: fixed;
  top: 18px;
  right: 18px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  z-index: 30;
}

.code-access__toggle {
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: rgba(17, 24, 39, 0.75);
  border-radius: 16px;
  color: #79c2ff;
  font-size: 24px;
  font-weight: 700;
  display: grid;
  place-content: center;
  cursor: pointer;
  transition: transform 120ms ease, background 120ms ease;
}

.code-access__toggle:hover {
  background: rgba(15, 23, 42, 0.95);
  transform: translateY(-1px);
}

.code-access__panel {
  width: min(320px, 90vw);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-sm);
  background: rgba(12, 13, 15, 0.9);
  padding: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
}

.code-access__form {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.code-access__label {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.code-access__input-row {
  display: flex;
  gap: 6px;
  align-items: center;
}

.code-access__input {
  flex: 1;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  padding: 6px 12px;
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.code-access__input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.code-access__message {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
  min-height: 20px;
}

.code-access__message--error {
  color: #ffb997;
}

.main {
  padding: 22px;
  overflow: auto;
}

.main__footer-note {
  margin-top: 24px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  text-align: center;
}

.pageTitle {
  font-size: 22px;
  font-weight: 720;
  letter-spacing: -0.02em;
  margin: 0;
}

.lead {
  color: var(--muted);
  margin: 10px 0 0 0;
  max-width: 66ch;
}

.bookHierarchy {
  margin-bottom: 20px;
  padding: 16px;
  border-left: 3px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-sm);
}

.bookHierarchy__title {
  font-size: 22px;
  font-weight: 700;
}

.bookHierarchy__sub {
  font-size: 16px;
  color: var(--muted);
  margin-top: 4px;
}

.bookHierarchy__owner,
.bookHierarchy__count {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
  margin-top: 4px;
}

.bookHierarchy__description {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.7);
  max-width: 72ch;
  font-size: 14px;
}

.bookHierarchy__recommend {
  margin-top: 6px;
  font-size: 13px;
  color: #fdd835;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.tabHierarchy {
  margin: 0;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.015);
}

.tabHierarchy__title {
  font-size: 18px;
  font-weight: 600;
}

.tabHierarchy__summary {
  font-size: 13px;
  color: var(--muted);
  margin-top: 6px;
}

.tabHierarchy__list {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tabHierarchy__chip {
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  padding: 8px 12px;
  background: transparent;
  font-size: 13px;
}

.bookContent {
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.5;
  font-size: 14px;
}

.controls {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border-radius: 999px;
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: background 120ms ease, border-color 120ms ease, transform 120ms ease;
}

.btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.22);
}

.btn:active {
  transform: translateY(1px);
}

.btn--ghost {
  background: transparent;
}

.console {
  margin-top: 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.28);
  padding: 12px;
}

.console__label {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.console__line {
  margin-top: 8px;
  font-size: 14px;
}

.storyMeta {
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.65);
  font-size: 12px;
  letter-spacing: 0.04em;
}

.storyBody {
  margin-top: 16px;
  max-width: 72ch;
  font-size: 15px;
}

.storyBody p {
  margin: 0 0 12px 0;
}

@media (max-width: 860px) {
  .app {
    grid-template-columns: 1fr;
  }
  .sidebar {
    max-height: 44vh;
  }
}
