:root {
  color-scheme: dark;
  --ink: #f8f1e5;
  --muted: #b8afaa;
  --gold: #f2c576;
  --rose: #ee9ac3;
  --violet: #ad4dff;
  --panel: rgba(8, 5, 12, .74);
  --line: rgba(242, 197, 118, .32);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html, body { width: 100%; min-height: 100%; margin: 0; background: #050307; }
body { overflow: hidden; color: var(--ink); font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, a { color: inherit; font: inherit; }
button { cursor: pointer; }

.nana-app {
  min-height: 100dvh;
  background:
    radial-gradient(circle at 75% 35%, rgba(137, 46, 190, .18), transparent 35%),
    linear-gradient(180deg, #08050b 0%, #030204 100%);
}

.nana-header {
  position: fixed;
  z-index: 30;
  inset: 0 0 auto;
  height: 58px;
  display: grid;
  grid-template-columns: minmax(180px, .9fr) minmax(0, 2.4fr) minmax(120px, .7fr);
  align-items: center;
  gap: 18px;
  padding: 8px clamp(16px, 3vw, 54px);
  border-bottom: 1px solid rgba(242, 197, 118, .18);
  background: linear-gradient(180deg, rgba(4, 2, 6, .98), rgba(4, 2, 6, .72));
  backdrop-filter: blur(22px);
}

.nana-brand { display: flex; align-items: center; gap: 10px; width: max-content; padding: 0; border: 0; background: none; text-align: left; }
.nana-brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 10px; color: var(--gold); font: 24px/1 Georgia, serif; box-shadow: 0 0 24px rgba(242, 197, 118, .15); }
.nana-brand-copy { display: grid; letter-spacing: .18em; }
.nana-brand-copy strong { color: var(--gold); font: 18px/1 Georgia, serif; }
.nana-brand-copy small { margin-top: 4px; color: var(--muted); font-size: 8px; }

.nana-product-ticker { min-width: 0; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent); }
.nana-product-track { display: flex; width: max-content; gap: 26px; animation: nanaTicker 36s linear infinite; }
.nana-product-track:hover, .nana-product-track:focus-within { animation-play-state: paused; }
.nana-product-link { border: 0; padding: 7px 0; color: #d7d0cf; background: none; white-space: nowrap; font-size: 12px; letter-spacing: .08em; }
.nana-product-link::after { content: "•"; margin-left: 26px; color: var(--gold); }
@keyframes nanaTicker { to { transform: translateX(-50%); } }

.nana-status { display: flex; justify-content: flex-end; align-items: center; gap: 12px; }
.nana-live { padding: 7px 12px; border: 1px solid rgba(255,255,255,.13); border-radius: 999px; background: rgba(0,0,0,.35); color: #eee; font-size: 11px; }
.nana-live i { display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: #ff3979; box-shadow: 0 0 12px #ff3979; animation: nanaPulse 1.5s ease-in-out infinite; }
@keyframes nanaPulse { 50% { opacity: .45; transform: scale(.82); } }
.nana-circle-button { display: none; width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 50%; background: var(--panel); color: var(--gold); }

.nana-stage { position: fixed; inset: 58px 0 132px; overflow: hidden; perspective: 1600px; }
.nana-stage::after { content: ""; position: absolute; inset: auto 0 0; height: 34%; pointer-events: none; background: linear-gradient(transparent, rgba(2,1,3,.85)); }
.nana-shell-canvas { position: absolute; inset: 0; outline: none; touch-action: none; }

.nana-scene-shell {
  position: absolute;
  overflow: hidden;
  width: min(69vw, 1120px);
  height: min(69vh, 700px);
  left: 50%; top: 48%;
  border: 1px solid rgba(242,197,118,.25);
  border-radius: 28px;
  background: #09060d center/cover no-repeat;
  box-shadow: 0 34px 100px rgba(0,0,0,.72);
  transform-origin: center;
  transition: transform .65s cubic-bezier(.2,.8,.2,1), opacity .45s ease, filter .45s ease;
  will-change: transform;
}
.nana-scene-shell::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(2,1,3,.92) 0%, rgba(4,2,5,.55) 35%, rgba(2,1,3,.05) 67%, rgba(2,1,3,.35) 100%); }
.nana-scene-shell::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 100px rgba(0,0,0,.4); pointer-events: none; }
.nana-scene-shell[data-slot="active"] { z-index: 10; transform: translate(-56%, -50%) scale(1); opacity: 1; }
.nana-scene-shell[data-slot="left"] { z-index: 5; transform: translate(-116%, -48%) scale(.52) rotateY(10deg); opacity: .48; filter: saturate(.75); }
.nana-scene-shell[data-slot="right"] { z-index: 5; transform: translate(22%, -48%) scale(.52) rotateY(-10deg); opacity: .48; filter: saturate(.75); }
.nana-scene-shell[data-slot="up"] { z-index: 3; transform: translate(-52%, -109%) scale(.46) rotateX(-8deg); opacity: .27; }
.nana-scene-shell[data-slot="down"] { z-index: 3; transform: translate(-52%, 15%) scale(.46) rotateX(8deg); opacity: .27; }
.nana-scene-shell[data-slot="diagonal"] { z-index: 2; transform: translate(36%, 14%) scale(.37); opacity: .18; }

.nana-shell-copy { position: absolute; z-index: 2; left: clamp(28px, 5vw, 84px); top: 50%; width: min(410px, 44%); transform: translateY(-50%); }
.nana-shell-copy small { color: var(--gold); letter-spacing: .28em; font-size: 11px; }
.nana-shell-copy h1 { margin: 12px 0 8px; color: #fff7e9; font: clamp(42px, 6vw, 92px)/.9 Georgia, serif; letter-spacing: .05em; text-shadow: 0 5px 34px rgba(0,0,0,.7); }
.nana-shell-copy h2 { margin: 0 0 16px; color: var(--rose); font-size: clamp(16px, 2vw, 28px); font-weight: 450; }
.nana-shell-copy p { max-width: 35ch; margin: 0 0 24px; color: #e1dada; font-size: clamp(13px, 1.1vw, 17px); line-height: 1.65; }
.nana-primary-button { min-height: 44px; padding: 0 22px; border: 1px solid rgba(242,197,118,.68); border-radius: 999px; background: linear-gradient(135deg, rgba(239,174,68,.92), rgba(139,54,220,.85)); box-shadow: 0 8px 35px rgba(169,62,255,.22); font-weight: 700; }

.nana-scene-indicator { position: absolute; z-index: 14; left: clamp(18px, 3vw, 54px); bottom: 18px; display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 11px; letter-spacing: .13em; text-transform: uppercase; }
.nana-scene-indicator strong { color: var(--gold); }

.nana-module-rail { position: absolute; z-index: 18; top: 50%; right: clamp(18px, 3vw, 52px); width: 178px; max-height: calc(100% - 48px); transform: translateY(-50%); overflow: hidden; border: 1px solid var(--line); border-radius: 24px; background: rgba(5,3,8,.72); backdrop-filter: blur(20px); box-shadow: 0 22px 60px rgba(0,0,0,.45); transition: opacity .3s ease, transform .3s ease; }
.nana-module-rail[hidden] { display: none; }
.nana-rail-title { padding: 17px 18px 12px; color: var(--gold); font: 22px Georgia, serif; text-align: center; border-bottom: 1px solid var(--line); }
.nana-module-list { max-height: calc(100vh - 270px); overflow-y: auto; scrollbar-width: none; }
.nana-module-button { display: grid; grid-template-columns: 27px 1fr; align-items: center; width: 100%; min-height: 48px; padding: 7px 13px; border: 0; border-bottom: 1px solid rgba(242,197,118,.14); background: transparent; text-align: left; }
.nana-module-button:hover, .nana-module-button:focus-visible, .nana-module-button.is-active { color: var(--gold); background: linear-gradient(90deg, rgba(242,197,118,.13), rgba(164,64,255,.1)); }
.nana-module-icon { color: var(--gold); font-size: 19px; }
.nana-module-label { font-size: 12px; }

.nana-module-panel { position: absolute; z-index: 24; right: clamp(212px, 17vw, 260px); top: 50%; width: min(360px, calc(100vw - 40px)); padding: 30px; transform: translateY(-50%); border: 1px solid var(--line); border-radius: 24px; background: rgba(6,3,10,.92); backdrop-filter: blur(28px); box-shadow: 0 32px 100px rgba(0,0,0,.7); }
.nana-module-panel small { color: var(--gold); letter-spacing: .2em; }
.nana-module-panel h2 { margin: 10px 0; font: 36px Georgia, serif; }
.nana-module-panel p { color: var(--muted); line-height: 1.6; }
.nana-module-close { position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; border: 0; border-radius: 50%; background: rgba(255,255,255,.07); font-size: 23px; }

.nana-app-universe { position: absolute; z-index: 15; inset: 12% 12% 14% 42%; pointer-events: none; }
.nana-app-universe[hidden] { display: none; }
.nana-app-node { position: absolute; display: grid; place-items: center; width: 104px; min-height: 104px; padding: 12px; border: 1px solid rgba(238,154,195,.5); border-radius: 20px; background: linear-gradient(145deg, rgba(139,44,184,.78), rgba(14,7,23,.85)); box-shadow: 0 0 34px rgba(188,66,255,.32); pointer-events: auto; text-align: center; animation: nanaFloat 4.8s ease-in-out infinite alternate; }
.nana-app-node:hover, .nana-app-node:focus-visible { transform: scale(1.09); box-shadow: 0 0 44px rgba(242,197,118,.45); }
.nana-app-node b { display: block; font-size: 22px; color: #ffd8f1; }
.nana-app-node span { display: block; margin-top: 7px; font-size: 11px; }
.nana-app-node:nth-child(1) { left: 4%; top: 8%; }
.nana-app-node:nth-child(2) { left: 36%; top: 0; animation-delay: -.8s; }
.nana-app-node:nth-child(3) { right: 2%; top: 10%; animation-delay: -1.7s; }
.nana-app-node:nth-child(4) { left: 0; top: 42%; animation-delay: -2.4s; }
.nana-app-node:nth-child(5) { left: 40%; top: 37%; animation-delay: -.3s; }
.nana-app-node:nth-child(6) { right: 0; top: 45%; animation-delay: -1.1s; }
.nana-app-node:nth-child(7) { left: 8%; bottom: 0; animation-delay: -1.9s; }
.nana-app-node:nth-child(8) { left: 44%; bottom: 4%; animation-delay: -2.8s; }
.nana-app-node:nth-child(9) { right: 4%; bottom: 0; animation-delay: -.5s; }
@keyframes nanaFloat { to { translate: 0 -12px; } }

.nana-action-nav { position: fixed; z-index: 31; left: 50%; bottom: calc(98px + var(--safe-bottom)); width: min(92vw, 1120px); height: 34px; display: flex; gap: 6px; transform: translateX(-50%); overflow-x: auto; scrollbar-width: none; padding: 2px; border: 1px solid rgba(242,197,118,.14); border-radius: 999px; background: rgba(4,2,7,.66); backdrop-filter: blur(16px); }
.nana-action-button { flex: 1 0 auto; min-width: 84px; padding: 0 12px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font-size: 10px; }
.nana-action-button.is-active { color: #fff; background: linear-gradient(90deg, rgba(242,197,118,.2), rgba(159,50,255,.25)); }

.nana-gate-nav { position: fixed; z-index: 32; left: 50%; bottom: calc(49px + var(--safe-bottom)); width: min(92vw, 1380px); min-height: 46px; display: grid; grid-template-columns: repeat(9, 1fr); gap: 4px; transform: translateX(-50%); padding: 4px; border: 1px solid var(--line); border-radius: 999px; background: rgba(3,2,5,.88); backdrop-filter: blur(24px); box-shadow: 0 18px 55px rgba(0,0,0,.58); }
.nana-gate-button { min-width: 0; border: 0; border-radius: 999px; background: transparent; color: #c7c0c4; font-size: clamp(9px, .82vw, 13px); white-space: nowrap; }
.nana-gate-button span { margin-right: 6px; color: var(--gold); font-size: 16px; }
.nana-gate-button:hover, .nana-gate-button:focus-visible, .nana-gate-button.is-active { color: #fff; background: linear-gradient(90deg, rgba(242,197,118,.28), rgba(156,45,249,.4)); box-shadow: inset 0 0 0 1px rgba(242,197,118,.38), 0 0 25px rgba(156,45,249,.18); }

.nana-footer { position: fixed; z-index: 33; left: 0; right: 0; bottom: var(--safe-bottom); min-height: 40px; display: flex; justify-content: center; align-items: center; gap: 24px; color: #aaa2a5; background: linear-gradient(180deg, transparent, rgba(2,1,3,.88) 36%); font-size: 9px; }
.nana-footer span + span::before { content: "|"; margin-right: 24px; color: rgba(242,197,118,.45); }

@media (max-width: 920px) {
  .nana-header { grid-template-columns: auto 1fr auto; }
  .nana-brand-copy, .nana-live { display: none; }
  .nana-circle-button { display: grid; place-items: center; }
  .nana-stage { bottom: 138px; }
  .nana-scene-shell { width: 88vw; height: 66vh; }
  .nana-scene-shell[data-slot="active"] { transform: translate(-50%, -50%); }
  .nana-scene-shell[data-slot="left"] { transform: translate(-125%, -48%) scale(.5); }
  .nana-scene-shell[data-slot="right"] { transform: translate(25%, -48%) scale(.5); }
  .nana-scene-shell[data-slot="up"], .nana-scene-shell[data-slot="down"], .nana-scene-shell[data-slot="diagonal"] { display: none; }
  .nana-shell-copy { left: 24px; width: 64%; }
  .nana-module-rail { top: 64px; right: 12px; bottom: 12px; width: min(260px, calc(100vw - 24px)); max-height: none; transform: none; }
  .nana-module-rail.is-mobile-closed { display: none; }
  .nana-module-list { max-height: calc(100% - 56px); }
  .nana-module-panel { right: 16px; }
  .nana-app-universe { inset: 10% 5% 16% 35%; }
  .nana-app-node { width: 78px; min-height: 78px; border-radius: 16px; }
  .nana-gate-nav { justify-content: flex-start; display: flex; overflow-x: auto; padding: 4px 8px; border-radius: 20px; }
  .nana-gate-button { flex: 0 0 auto; min-width: 98px; padding: 0 11px; }
  .nana-footer { gap: 7px; font-size: 7px; white-space: nowrap; }
  .nana-footer span + span::before { margin-right: 7px; }
}

@media (max-width: 560px) {
  .nana-header { height: 52px; padding: 7px 12px; gap: 8px; }
  .nana-product-track { gap: 14px; }
  .nana-product-link { font-size: 9px; }
  .nana-product-link::after { margin-left: 14px; }
  .nana-stage { inset: 52px 0 147px; }
  .nana-shell-copy { top: auto; bottom: 58px; width: calc(100% - 48px); transform: none; }
  .nana-shell-copy h1 { font-size: 42px; }
  .nana-shell-copy p { display: none; }
  .nana-scene-indicator { bottom: 12px; }
  .nana-action-nav { bottom: calc(105px + var(--safe-bottom)); width: 96vw; }
  .nana-gate-nav { bottom: calc(50px + var(--safe-bottom)); width: 96vw; }
  .nana-footer { min-height: 44px; flex-direction: column; gap: 0; line-height: 1.35; }
  .nana-footer span + span::before { content: none; }
  .nana-app-universe { inset: 6% 3% 18%; }
  .nana-app-node { width: 70px; min-height: 70px; padding: 6px; }
  .nana-app-node:nth-child(n+7) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
