:root {
  --bg: #07111e;
  --line: rgba(255, 255, 255, 0.12);
  --text: #eff5ff;
  --muted: #96a8c6;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  overflow: hidden;
  font-family: Inter, Arial, Helvetica, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top right, rgba(61, 121, 255, 0.16), transparent 20%),
    radial-gradient(circle at bottom left, rgba(12, 194, 255, 0.10), transparent 24%),
    linear-gradient(180deg, #050d17, #07111e 55%, #091726);
}
.app-shell {
  display: grid;
  grid-template-columns: 360px 1fr;
  height: 100vh;
  overflow: hidden;
}
.sidebar {
  height: 100vh;
  background: linear-gradient(180deg, rgba(4, 10, 18, 0.96), rgba(7, 17, 30, 0.98));
  border-right: 1px solid var(--line);
  padding: 0 18px 20px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.brand-block { padding: 28px 6px 16px; }
.eyebrow { display: inline-block; font-size: 11px; text-transform: uppercase; letter-spacing: 0.16em; color: #8cb8ff; margin-bottom: 12px; }
.brand-block h1 { margin: 0; font-size: 34px; line-height: 1.05; letter-spacing: -0.03em; }
.brand-block h1 span { color: #cce1ff; }
/* Classic: bold chrome, like badging on a hood */
body[data-style="classic"] .brand-block h1 {
  text-transform: uppercase;
  font-weight: 900;
  font-size: 31px;
  letter-spacing: 0.01em;
  background: linear-gradient(180deg, #f4f9fd 8%, #b9cddc 38%, #62809a 52%, #9db7c9 62%, #e3eef5 95%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.45));
}
body[data-style="classic"] .brand-block h1 span { color: transparent; }
/* Bloom: soft script, pastel petals */
body[data-style="bloom"] .brand-block h1 {
  font-family: "Segoe Script", "Snell Roundhand", "Brush Script MT", cursive;
  font-weight: 600;
  font-size: 29px;
  line-height: 1.3;
  letter-spacing: 0;
  background: linear-gradient(120deg, #ffd9ec 10%, #ffa9d3 45%, #cf9bff 80%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 10px rgba(255, 158, 207, 0.28));
}
body[data-style="bloom"] .brand-block h1 span { color: transparent; }
body[data-style="bloom"] .eyebrow { color: #ffb1d8; }
body[data-style="bloom"] .quote-ref { color: #ffb1d8; }
body[data-style="bloom"] .quote-card { background: linear-gradient(180deg, rgba(255, 158, 207, 0.10), rgba(255,255,255,.04)); border-color: rgba(255, 177, 216, 0.22); }
.brand-block p { color: var(--muted); font-size: 14px; line-height: 1.6; margin: 14px 0 0; }
.toolbar {
  display: flex; gap: 10px; position: sticky; top: 0; z-index: 5;
  margin: 0 -18px 14px; padding: 14px 24px;
  background: #060f1b; border-bottom: 1px solid var(--line);
}
.tool-btn {
  border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.04); color: var(--text);
  border-radius: 12px; padding: 10px 14px; cursor: pointer; font-size: 13px;
  transition: transform .2s ease, background .2s ease;
}
.tool-btn:hover { transform: translateY(-1px); background: rgba(255,255,255,.08); }
.tool-btn.primary { background: rgba(82, 145, 255, 0.18); border-color: rgba(125, 172, 255, .45); }
.build-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 0 6px 18px; }
.build-toggle.active { background: rgba(255, 200, 106, 0.16); border-color: rgba(255, 200, 106, 0.5); }
.build-status { flex-basis: 100%; font-size: 12px; color: #ffc86a; letter-spacing: .04em; }
.item-subtitle.empty { font-style: italic; color: rgba(150, 168, 198, 0.55); }
.info-actions { display: flex; gap: 8px; margin-top: 12px; }
.mini-btn {
  display: inline-block; border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.05); color: var(--text);
  border-radius: 10px; padding: 8px 13px; cursor: pointer; font-size: 13px; text-decoration: none; font-family: inherit;
  transition: transform .2s ease, background .2s ease;
}
.mini-btn:hover { transform: translateY(-1px); background: rgba(255,255,255,.10); }
.mini-btn.primary { background: rgba(82, 145, 255, 0.22); border-color: rgba(125, 172, 255, .5); }
.modal-backdrop {
  position: fixed; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center;
  background: rgba(3, 8, 15, 0.72); backdrop-filter: blur(8px); padding: 20px;
}
.modal-backdrop[hidden] { display: none; }
.modal {
  width: min(760px, 100%); max-height: min(82vh, 720px); overflow-y: auto; overscroll-behavior: contain;
  background: linear-gradient(180deg, rgba(10, 22, 38, 0.98), rgba(7, 16, 29, 0.98));
  border: 1px solid rgba(255,255,255,.14); border-radius: 22px; padding: 20px 20px 22px;
  box-shadow: 0 40px 120px rgba(0,0,0,.55);
}
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; margin-bottom: 16px; position: sticky; top: -20px; padding: 20px 0 10px; margin-top: -20px; background: linear-gradient(180deg, rgba(10, 22, 38, 0.99) 78%, transparent); z-index: 2; }
.modal-kicker { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: #8cb8ff; margin-bottom: 6px; }
.modal-title { margin: 0; font-size: 21px; line-height: 1.2; }
.modal-close {
  border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.05); color: var(--text);
  width: 34px; height: 34px; border-radius: 50%; font-size: 18px; line-height: 1; cursor: pointer; flex: 0 0 auto;
}
.modal-close:hover { background: rgba(255,255,255,.12); }
.picker-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.picker-card {
  text-align: left; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.04); color: var(--text);
  border-radius: 14px; padding: 12px 14px; cursor: pointer; display: flex; flex-direction: column; gap: 6px; font-family: inherit;
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}
.picker-card:hover { transform: translateY(-1px); background: rgba(255,255,255,.08); border-color: rgba(125, 172, 255, .45); }
.picker-card.placed { opacity: .55; }
.picker-card.current { border-color: rgba(255, 200, 106, 0.6); background: rgba(255, 200, 106, 0.08); }
.picker-theme { font-size: 14px; font-weight: 600; color: #ffc86a; }
.picker-blurb { font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.picker-badge { align-self: flex-start; font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: #9ab7e2; border: 1px solid rgba(255,255,255,.16); border-radius: 999px; padding: 3px 9px; }
.picker-badge.current { color: #ffc86a; border-color: rgba(255, 200, 106, 0.5); }
.share-modal { width: min(560px, 100%); }
.share-label { display: block; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: #9ab7e2; margin: 14px 0 8px; }
.share-input {
  width: 100%; border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.05); color: var(--text);
  border-radius: 12px; padding: 11px 13px; font-size: 14px; font-family: inherit; outline: none;
}
.share-input:focus { border-color: rgba(125, 172, 255, .55); }
.share-input.link { font-size: 12.5px; color: #cce1ff; }
.share-link-row { display: flex; gap: 8px; align-items: stretch; }
.share-link-row .mini-btn { flex: 0 0 auto; }
.share-actions { display: flex; align-items: center; gap: 12px; margin-top: 16px; flex-wrap: wrap; }
.share-hint { font-size: 12px; color: var(--muted); line-height: 1.5; }
.style-switcher { padding: 0 6px 18px; }
.switcher-label { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: #9ab7e2; margin-bottom: 10px; }
.switcher-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.style-btn {
  border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.03); color: var(--text);
  border-radius: 12px; padding: 11px 12px; cursor: pointer; font-size: 13px; font-weight: 600;
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
}
.style-btn:hover { transform: translateY(-1px); background: rgba(255,255,255,.07); }
.style-btn.active { background: rgba(82, 145, 255, 0.18); border-color: rgba(125, 172, 255, .45); box-shadow: inset 0 0 0 1px rgba(125,172,255,.15); }
.theme-nav { display: flex; flex-direction: column; gap: 16px; padding: 0 4px; }
.theme-group { border: 1px solid rgba(255,255,255,.08); border-radius: 16px; background: rgba(255,255,255,.03); overflow: hidden; }
.group-label { padding: 12px 14px; font-size: 12px; letter-spacing: .12em; color: #94b8ea; text-transform: uppercase; background: rgba(255,255,255,.03); border-bottom: 1px solid rgba(255,255,255,.06); }
.theme-item {
  width: 100%; border: 0; border-top: 1px solid rgba(255,255,255,.06); background: transparent; color: var(--text);
  text-align: left; padding: 12px 14px; display: grid; grid-template-columns: 32px 1fr 18px; align-items: center; gap: 10px;
  cursor: pointer; transition: background .22s ease, padding-left .22s ease;
}
.theme-item:first-of-type { border-top: 0; }
.theme-item:hover { background: rgba(255,255,255,.05); }
.theme-item.active { background: linear-gradient(90deg, rgba(74, 133, 255, 0.28), rgba(74, 133, 255, 0.10)); padding-left: 18px; }
.item-num { font-size: 12px; color: #9ab7e2; font-variant-numeric: tabular-nums; }
.item-title { font-size: 14px; line-height: 1.35; }
.item-subtitle { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; }
.item-arrow { color: #9ab7e2; font-size: 18px; }
.quote-card { margin: 18px 6px 8px; padding: 16px 16px 14px; border-radius: 18px; background: linear-gradient(180deg, rgba(95, 130, 186, 0.12), rgba(255,255,255,.04)); border: 1px solid rgba(255,255,255,.10); }
.quote-inner { transition: opacity .45s ease; }
.quote-inner.fading { opacity: 0; }
.quote-text { font-size: 14px; line-height: 1.55; color: #d8e7ff; font-style: italic; }
.quote-ref { margin-top: 8px; font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: #8fc1ff; }
.quote-ref:empty { display: none; }
.experience { position: relative; overflow: hidden; height: 100vh; }
.experience-topbar { position: absolute; z-index: 10; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center; padding: 20px 24px 0; pointer-events: none; }
.topbar-title {
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #d7e8ff;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(7, 16, 28, 0.65);
  border: 1px solid rgba(255,255,255,.10);
  backdrop-filter: blur(10px);
}
.topbar-hint { font-size: 12px; color: rgba(190, 208, 235, .75); }
.viewport {
  position: relative;
  height: 100vh;
  overflow: hidden;
  background: radial-gradient(circle at 50% 65%, rgba(67, 138, 255, 0.15), transparent 24%), radial-gradient(circle at 75% 25%, rgba(22, 194, 255, 0.08), transparent 20%), linear-gradient(180deg, #08111d 0%, #0a1423 52%, #0b1728 100%);
}
.ambient-grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 44px 44px; opacity: .09;
  mask-image: linear-gradient(180deg, transparent, rgba(0,0,0,.7) 12%, rgba(0,0,0,.86) 100%);
}
.scene-stage { position: absolute; inset: 0; }
.scene-layer {
  position: absolute; left: 50%; top: 50%; width: min(1320px, 88vw); aspect-ratio: 16 / 9;
  transform: translate(-50%, -50%) scale(1); transform-origin: center center;
  transition: transform 1000ms cubic-bezier(.22,1,.36,1), opacity 520ms ease; opacity: 0; pointer-events: none;
}
.scene-layer.active { opacity: 1; }
.scene-layer img { width: 100%; height: 100%; object-fit: cover; border-radius: 28px; box-shadow: 0 40px 100px rgba(0,0,0,.42), 0 0 0 1px rgba(255,255,255,.08) inset; display: block; }
.scene-sheen { position: absolute; inset: 0; border-radius: 28px; background: linear-gradient(180deg, rgba(255,255,255,.10), transparent 20%, transparent 80%, rgba(255,255,255,.04)); mix-blend-mode: screen; }
.focus-reticle { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 122px; height: 122px; opacity: 0; transition: opacity .25s ease; pointer-events: none; z-index: 4; }
.focus-reticle.show { opacity: 1; }
.reticle-ring { position: absolute; inset: 0; border: 1px solid rgba(120, 191, 255, .75); border-radius: 50%; }
.ring-a { animation: pulse 2.2s infinite; }
.ring-b { inset: 18px; opacity: .65; }
.reticle-dot { position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; transform: translate(-50%, -50%); border-radius: 50%; background: #fff; box-shadow: 0 0 16px rgba(255,255,255,.9); }
@keyframes pulse { 0% { transform: scale(1); opacity: .9; } 70% { transform: scale(1.15); opacity: .12; } 100% { transform: scale(1.15); opacity: 0; } }
.info-panel {
  position: absolute; right: 26px; bottom: 28px; z-index: 8; width: min(430px, calc(100% - 52px));
  display: grid; grid-template-columns: 72px 1fr; gap: 16px; padding: 18px 18px 18px 16px;
  border-radius: 24px; background: rgba(6, 16, 29, 0.84); backdrop-filter: blur(16px); border: 1px solid rgba(255,255,255,.12); box-shadow: 0 24px 80px rgba(0,0,0,.35);
  opacity: 0; transform: translateY(12px); transition: opacity .32s ease, transform .32s ease;
}
.info-panel.show { opacity: 1; transform: translateY(0); }
.info-number { display: flex; align-items: flex-start; justify-content: center; padding-top: 4px; font-size: 30px; font-weight: 700; color: #87beff; opacity: .92; }
.info-kicker { font-size: 11px; letter-spacing: .14em; color: #8eb8ef; margin-bottom: 8px; }
.info-panel h2 { margin: 0 0 6px; font-size: 28px; line-height: 1.05; }
.info-theme { color: #ffc86a; font-size: 16px; margin-bottom: 10px; }
.info-panel p { margin: 0; font-size: 15px; line-height: 1.6; color: #e8f0ff; }
.overview-message {
  position: absolute; left: 30px; bottom: 28px; z-index: 6; display: flex; gap: 16px; align-items: center; max-width: min(620px, calc(100% - 80px));
  padding: 18px 20px; border-radius: 22px; background: rgba(6, 16, 29, 0.72); border: 1px solid rgba(255,255,255,.10); backdrop-filter: blur(12px);
  transition: opacity .28s ease, transform .28s ease;
}
.overview-message.hide { opacity: 0; transform: translateY(8px); pointer-events: none; }
.overview-line { width: 3px; align-self: stretch; background: linear-gradient(180deg, #7bb8ff, rgba(123,184,255,.15)); border-radius: 999px; }
.overview-small { font-size: 11px; letter-spacing: .18em; color: #9bc4ff; margin-bottom: 8px; }
.overview-big { font-size: 21px; line-height: 1.35; color: #f1f6ff; }
.scene-loader {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 7;
  display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 999px;
  background: rgba(7, 16, 28, 0.72); border: 1px solid rgba(255,255,255,.12); backdrop-filter: blur(10px);
  color: #d7e8ff; font-size: 12px; letter-spacing: .08em; text-transform: uppercase;
  opacity: 0; pointer-events: none; transition: opacity .25s ease;
}
.scene-loader.show { opacity: 1; }
.loader-ring {
  width: 15px; height: 15px; border-radius: 50%; flex: 0 0 auto;
  border: 2px solid rgba(125, 172, 255, .28); border-top-color: #78b6ff;
  animation: spin .9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.scene-caption { position: absolute; left: 28px; top: 84px; z-index: 6; padding: 10px 14px; border-radius: 999px; background: rgba(7, 16, 28, 0.65); border: 1px solid rgba(255,255,255,.10); color: #d7e8ff; font-size: 12px; letter-spacing: .10em; text-transform: uppercase; backdrop-filter: blur(10px); }
.progress-dots { position: absolute; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 8; display: flex; gap: 8px; }
.progress-dot { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,.24); transition: transform .2s ease, background .2s ease; }
.progress-dot.active { background: #78b6ff; transform: scale(1.22); }
@media (max-width: 1100px) {
  body { overflow: auto; }
  .app-shell { grid-template-columns: 1fr; grid-template-rows: auto 1fr; height: auto; overflow: visible; }
  .sidebar { height: auto; max-height: 44vh; border-right: 0; border-bottom: 1px solid var(--line); }
  .experience { height: 100vh; }
  .viewport { height: 100vh; }
  .experience-topbar { padding-top: 14px; }
  .scene-caption { top: 70px; }
}
@media (max-width: 700px) {
  .sidebar { padding: 18px 12px 14px; }
  .brand-block h1 { font-size: 28px; }
  .info-panel { right: 14px; left: 14px; width: auto; bottom: 14px; grid-template-columns: 54px 1fr; }
  .info-number { font-size: 24px; }
  .info-panel h2 { font-size: 24px; }
  .overview-message { left: 14px; right: 14px; bottom: 14px; max-width: none; }
  .overview-big { font-size: 18px; }
  .scene-caption { left: 14px; }
  .topbar-title, .topbar-hint { font-size: 11px; }
  .progress-dots { bottom: 8px; }
  .picker-grid { grid-template-columns: 1fr; }
  .modal-backdrop { padding: 12px; }
}
