﻿:root {
  --bg: #090909;
  --bg-soft: #111111;
  --panel: #171717;
  --panel-2: #202020;
  --panel-3: #2a2a2a;
  --panel-4: #363636;
  --panel-5: #4a4a4a;
  --border: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(255, 255, 255, 0.22);
  --text: #f4f4f4;
  --muted: rgba(244, 244, 244, 0.62);
  --accent: #ffffff;
  --accent-soft: rgba(255, 255, 255, 0.08);
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
  --left-width: 310px;
  --right-width: 198px;
  --topbar-height: 44px;
}

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

html,
body {
  height: 100%;
}

body {
  overflow: hidden;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.06), transparent 24%),
    linear-gradient(180deg, #121212 0%, var(--bg) 30%);
  color: var(--text);
  font-family: "Trebuchet MS", Verdana, Arial, sans-serif;
  font-size: 13px;
}

button,
input {
  font: inherit;
}

#app {
  display: flex;
  width: 100vw;
  height: 100vh;
}

#left-panel {
  display: none;
  width: var(--left-width);
  min-width: var(--left-width);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 20%), var(--panel);
  border-right: 1px solid var(--border);
  overflow: hidden;
}

#app[data-main-tab="quantum"] #left-panel,
#app[data-main-tab="darkmatter"] #left-panel {
  display: flex;
}

#left-panel-inner {
  width: 100%;
  padding: 16px 14px;
  overflow-y: auto;
}

.lp-section {
  display: none;
  flex-direction: column;
  gap: 14px;
}

#app[data-main-tab="quantum"] #lp-quantum {
  display: flex;
}

#app[data-main-tab="darkmatter"] #lp-darkmatter:not(.hidden) {
  display: flex;
}

.sidebar-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar-title {
  font-size: 19px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.sidebar-sub {
  color: var(--muted);
  line-height: 1.5;
}

.generator-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: visible;
}

.generator-card {
  position: relative;
  z-index: 0;
  overflow: visible;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: var(--panel-2);
  box-shadow: var(--shadow);
}

.generator-card:hover,
.generator-card:focus-within {
  z-index: 120;
}

.generator-card.is-breakable {
  border-color: rgba(255, 255, 255, 0.24);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06), var(--shadow);
}

.gen-btn-wrap {
  width: 100%;
}

.gen-btn {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 15px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 24%), var(--panel-3);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}

.mono-btn {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 24%), var(--panel-3);
}

.gen-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.22);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 24%), var(--panel-4);
}

.gen-btn:disabled,
.break-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.gen-btn[data-tooltip]:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  right: 0;
  transform: none;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: #050505;
  color: var(--text);
  line-height: 1.5;
  white-space: pre-line;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.8);
  z-index: 420;
  pointer-events: none;
}

.gen-btn[data-tooltip]:hover::before {
  content: "";
  position: absolute;
  top: calc(100% + 6px);
  left: 22px;
  width: 10px;
  height: 10px;
  transform: rotate(45deg);
  background: #050505;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
  border-right: 1px solid rgba(255, 255, 255, 0.22);
  z-index: 419;
}

.generator-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.gen-label {
  font-size: 14px;
  font-weight: 900;
}

.gen-count {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.gen-sub {
  color: rgba(244, 244, 244, 0.82);
  font-size: 11px;
}

.break-btn {
  width: 100%;
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 24%), #2b2b2b;
  color: var(--text);
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.12s ease;
}

.break-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.2);
}

.dm-btn {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 20%), #292929;
}

.auto-toggles {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 2px 2px 0;
}

.auto-row,
.arow {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  cursor: pointer;
}

.auto-row input,
.arow input,
.slider-row input {
  accent-color: #ffffff;
}

#center-panel {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#top-bar {
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 20px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #1a1a1a 0%, #111111 100%);
}

.top-stat {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
}

.top-label {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.top-val {
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}

.top-sep {
  color: rgba(255, 255, 255, 0.36);
  font-size: 11px;
  font-weight: 800;
}

.top-context-group {
  display: none;
  align-items: center;
  gap: 8px;
}

#app[data-main-tab="darkmatter"] .top-context-group[data-show-on-tab="darkmatter"] {
  display: inline-flex;
}

#tab-area {
  flex: 1;
  overflow: auto;
  padding: 18px;
}

.tab-panel {
  display: none;
}

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

.subtab-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin-bottom: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #161616;
  overflow: hidden;
  border-radius: 16px;
}

.rev-subtabs .stab {
  flex: 1 1 150px;
  min-height: 62px;
}

.stab {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 18px;
  border: none;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  background: transparent;
  color: rgba(255, 255, 255, 0.46);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}

.stab:last-child {
  border-right: none;
}

.stab:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.stab.is-active {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.04));
  color: #ffffff;
  box-shadow: inset 0 -3px 0 rgba(255, 255, 255, 0.96);
}

.stab:disabled {
  color: rgba(255, 255, 255, 0.26);
  cursor: not-allowed;
  background: rgba(255, 255, 255, 0.015);
  padding-left: 42px;
}

.stab:disabled::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 50%;
  width: 14px;
  height: 14px;
  transform: translateY(-50%);
  background: center / contain no-repeat url("../Assets/Images/icons/lock.svg");
  opacity: 0.7;
}

.stab-panel {
  display: none;
}

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

.hero-block,
.info-block,
.stats-col,
.progress-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 20%), var(--panel);
  box-shadow: var(--shadow);
}

.hero-block {
  margin-bottom: 18px;
  padding: 24px 28px;
}

.hero-title {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-value {
  margin-top: 6px;
  font-size: clamp(34px, 5vw, 54px);
  font-weight: 900;
  letter-spacing: -0.03em;
}

.hero-sub {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}

.info-block,
.stats-col {
  padding: 16px 18px;
}

.info-title,
.stats-head {
  padding-bottom: 8px;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.info-row,
.stat-line,
.milestone-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.info-row:last-child,
.stat-line:last-child,
.milestone-item:last-child {
  border-bottom: none;
}

.ik,
.sk {
  color: var(--muted);
}

.iv,
.sv {
  color: var(--text);
  font-weight: 900;
}

.progress-card {
  margin-top: 14px;
  padding: 16px 18px;
}

.progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  color: var(--muted);
  font-weight: 800;
}

.inline-progress {
  position: relative;
  height: 18px;
  overflow: hidden;
  border-radius: 999px;
  background: #222222;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

#progress-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.28));
  transition: width 0.28s linear;
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 16px;
}

.section-title {
  font-size: 28px;
  font-weight: 900;
}

.section-sub {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.5;
}

.milestone-list {
  display: flex;
  flex-direction: column;
}

.milestone-item {
  color: var(--text);
}

.milestone-item.is-hit {
  color: #ffffff;
}

.slider-row {
  display: grid;
  grid-template-columns: 1fr minmax(140px, 180px) auto;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  color: var(--muted);
}

.slider-row input[type="range"] {
  width: 100%;
}

.dev-key-row,
.dev-command {
  display: grid;
  gap: 10px;
  color: var(--muted);
}

.dev-key-row {
  margin-top: 12px;
}

.dev-access-input {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font: inherit;
}

.dev-access-input::placeholder {
  color: rgba(255, 255, 255, 0.42);
  letter-spacing: 0.18em;
}

.dev-panel {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.dev-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.locked-msg {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  padding: 16px 0;
}

.locked-icon {
  width: 16px;
  height: 16px;
  background: center / contain no-repeat url("../Assets/Images/icons/lock.svg");
  display: inline-block;
}

.tree-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 308px;
  gap: 18px;
  align-items: stretch;
}

.tree-board,
.tree-detail {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01)), var(--panel);
  box-shadow: var(--shadow);
}

.tree-board {
  min-width: 0;
  padding: 18px;
}

.tree-board-head {
  margin-bottom: 16px;
}

.tree-board-title {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0.03em;
}

.tree-board-sub {
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.5;
}

.tree-flow-shell {
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 10px;
}

.qt-grid {
  min-width: 0;
}

.qt-flow {
  position: relative;
  border-radius: 20px;
  background:
    radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.14) 0, rgba(255, 255, 255, 0.14) 1px, transparent 1.5px) 0 0 / 18px 18px,
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0)),
    #121212;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.qt-links {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.qt-link {
  fill: none;
  stroke: rgba(255, 255, 255, 0.14);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.qt-node {
  position: absolute;
  width: 98px;
  height: 98px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  border: 2px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
  color: var(--text);
  cursor: pointer;
  box-shadow: 14px 14px 0 rgba(0, 0, 0, 0.18);
  transition: transform 0.14s ease, border-color 0.14s ease, background 0.14s ease, box-shadow 0.14s ease;
}

.qt-node:hover,
.qt-node:focus-visible,
.qt-node.is-focused {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.76);
  box-shadow: 16px 16px 0 rgba(0, 0, 0, 0.22);
  outline: none;
}

.qt-node.is-can-buy {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.04));
  border-color: rgba(255, 255, 255, 0.92);
}

.qt-node.is-speed {
  box-shadow: 14px 14px 0 rgba(0, 0, 0, 0.18), inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.qt-node.is-pressure {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.02));
}

.qt-node.is-sync {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.01));
}

.qt-node.is-power {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.03));
}

.qt-node.is-core {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.05));
}

.qt-node.is-bought {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.08));
  border-color: rgba(255, 255, 255, 0.98);
}

.qt-node.is-locked {
  opacity: 0.34;
  cursor: default;
}

.qt-node:disabled {
  pointer-events: none;
}

.qt-node.is-locked .qt-node-icon {
  color: transparent;
  background:
    center / 24px 24px no-repeat url("../Assets/Images/icons/lock.svg"),
    rgba(255, 255, 255, 0.05);
}

.qt-node-code {
  align-self: flex-start;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.7);
}

.qt-node-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0.08em;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.qt-node-title {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.88);
  text-align: center;
  min-height: 26px;
}

.tree-detail {
  padding: 18px;
  display: flex;
  flex-direction: column;
}

.tree-detail-code {
  align-self: flex-start;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.72);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.tree-detail-icon {
  width: 92px;
  height: 92px;
  margin-top: 18px;
  display: grid;
  place-items: center;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 34px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.tree-detail-name {
  margin-top: 18px;
  font-size: 28px;
  font-weight: 900;
  line-height: 1.08;
}

.tree-detail-desc {
  margin-top: 12px;
  color: var(--muted);
  line-height: 1.65;
}

.tree-detail-line {
  margin-top: 12px;
  font-size: 14px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.84);
}

.tree-detail-status {
  margin-top: auto;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tree-detail-action {
  width: 100%;
  margin-top: 14px;
  font-size: 15px;
  font-weight: 900;
}

.tree-detail-action:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none !important;
}

.tree-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tree-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tree-node {
  min-width: 180px;
  max-width: 240px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: var(--panel-2);
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}

.tree-node:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.18);
}

.tree-node.is-locked {
  opacity: 0.35;
  cursor: not-allowed;
}

.tree-node.is-bought {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.24);
}

.tree-node.is-can-buy {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.26);
}

.tn-name {
  font-weight: 900;
  font-size: 12px;
  margin-bottom: 4px;
}

.tn-desc {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.tn-cost {
  margin-top: 8px;
  font-size: 11px;
  font-weight: 900;
  color: var(--text);
}

.tn-status {
  margin-top: 4px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.74);
}

.ach-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
}

.ach-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 22%), var(--panel);
  box-shadow: var(--shadow);
}

.ach-card.unlocked {
  border-color: rgba(255, 255, 255, 0.2);
}

.ach-card.locked {
  opacity: 0.35;
  filter: grayscale(1);
}

.ach-icon-img {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  border-radius: 14px;
  background: #101010;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 8px;
}

.ach-name {
  font-size: 13px;
  font-weight: 900;
}

.ach-desc,
.info-p {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.55;
}

code {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

#right-hotbar {
  width: var(--right-width);
  min-width: var(--right-width);
  padding: 16px 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-left: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(180deg, var(--panel-5), #2f2f2f);
  overflow-y: auto;
}

.rhb-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  width: calc(100% - 10px);
  min-height: 56px;
  margin-left: 10px;
  padding: 0 16px;
  border: none;
  border-left: 4px solid transparent;
  border-radius: 12px 0 0 12px;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease;
}

.rhb-btn:hover {
  background: rgba(255, 255, 255, 0.06);
}

.rhb-btn.is-active {
  background: rgba(255, 255, 255, 0.12);
  border-left-color: rgba(255, 255, 255, 0.9);
}

.rhb-btn.is-locked {
  opacity: 0.42;
  cursor: not-allowed;
}

.rhb-icon {
  width: 28px;
  height: 28px;
  display: block;
  flex-shrink: 0;
}

.rhb-label {
  font-size: 15px;
  font-weight: 800;
  line-height: 1.15;
}

.rb-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.12), rgba(0, 0, 0, 0.95) 65%);
  z-index: 9999;
  overflow: hidden;
}

.rb-overlay.hidden {
  display: none;
}

.rb-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
  filter: grayscale(1) contrast(1.08);
}

.rb-text {
  position: relative;
  z-index: 1;
  color: #fff;
  font-size: clamp(34px, 6vw, 60px);
  font-weight: 900;
  letter-spacing: 0.18em;
  text-shadow: 0 0 26px rgba(255, 255, 255, 0.4), 0 0 80px rgba(0, 0, 0, 0.75);
  animation: rb-pop 0.9s ease;
}

@keyframes rb-pop {
  0% {
    opacity: 0;
    transform: scale(0.86);
    filter: blur(6px);
  }

  55% {
    opacity: 1;
    transform: scale(1.04);
    filter: blur(0);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.modal-bg {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.75);
  z-index: 8888;
}

.modal-bg.hidden {
  display: none;
}

.modal-box {
  width: min(92vw, 380px);
  padding: 26px 28px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.modal-title {
  font-size: 20px;
  font-weight: 900;
  margin-bottom: 10px;
}

.modal-desc {
  margin-bottom: 18px;
  color: var(--muted);
  line-height: 1.55;
}

.modal-row {
  display: flex;
  gap: 10px;
}

.mbtn {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: var(--panel-3);
  color: var(--text);
  cursor: pointer;
  font-weight: 800;
}

.mbtn:hover,
.action-btn:hover {
  transform: translateY(-1px);
}

.danger {
  background: #3a3a3a;
}

.ghost {
  background: transparent;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: var(--panel-3);
  color: var(--text);
  cursor: pointer;
  font-weight: 800;
  transition: transform 0.12s ease, border-color 0.12s ease;
}

.danger-btn {
  background: #2c2c2c;
}

.hidden {
  display: none !important;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.14);
  border-radius: 999px;
}

@media (max-width: 1120px) {
  :root {
    --left-width: 270px;
    --right-width: 176px;
  }

  .rhb-label {
    font-size: 13px;
  }

  .tree-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  body {
    overflow: auto;
  }

  #app {
    flex-direction: column;
    min-height: 100vh;
    height: auto;
  }

  #left-panel {
    width: 100%;
    min-width: 0;
  }

  #right-hotbar {
    order: -1;
    width: 100%;
    min-width: 0;
    flex-direction: row;
    gap: 6px;
    padding: 10px;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .rhb-btn {
    width: max-content;
    min-width: 148px;
    margin-left: 0;
    border-radius: 12px;
    border-left-width: 0;
    border-bottom: 3px solid transparent;
  }

  .rhb-btn.is-active {
    border-left-color: transparent;
    border-bottom-color: rgba(255, 255, 255, 0.9);
  }

  .slider-row {
    grid-template-columns: 1fr;
  }

  .gen-btn[data-tooltip]:hover::after,
  .gen-btn[data-tooltip]:hover::before {
    display: none;
  }

  #tab-area {
    padding: 14px;
  }

  .tree-board,
  .tree-detail {
    padding: 14px;
    border-radius: 18px;
  }

  .tree-detail-name {
    font-size: 22px;
  }
}

