:root {
  --bg: #f3efdf;
  --ink: #111712;
  --muted: #687267;
  --line: rgba(17, 23, 18, .11);
  --card: rgba(255, 252, 242, .88);
  --green: #08745a;
  --green-dark: #102018;
  --gold: #f0b23e;
  --orange: #e56d2d;
  --shadow: 0 18px 54px rgba(31, 34, 20, .12);
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 0% 0%, rgba(240,178,62,.34), transparent 28%),
    radial-gradient(circle at 100% 0%, rgba(8,116,90,.18), transparent 25%),
    linear-gradient(120deg, #f6eac8, #eef4e9 48%, #f5f0df);
  overflow: hidden;
}
body::before {
  content: "";
  position: fixed; inset: 0; pointer-events: none; opacity: .12;
  background-image: linear-gradient(rgba(17,23,18,.4) 1px, transparent 1px), linear-gradient(90deg, rgba(17,23,18,.4) 1px, transparent 1px);
  background-size: 54px 54px;
}
.app-shell {
  position: relative;
  width: min(1480px, calc(100vw - 28px));
  height: calc(100vh - 28px);
  margin: 14px auto;
  display: grid;
  grid-template-rows: 64px auto;
  gap: 12px;
}
.app-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px 10px 10px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 252, 242, .62);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}
.brand-row { display: flex; align-items: center; gap: 12px; min-width: 300px; }
.brand-mark { width: 44px; height: 44px; border-radius: 16px; display: grid; place-items: center; background: var(--green); color: white; font-family: Georgia, serif; font-size: 18px; font-weight: 900; }
h1 { margin: 0; font-family: Georgia, serif; font-size: 26px; line-height: 1; letter-spacing: -.04em; }
.brand-row p, .header-status, .panel-title p, label { margin: 4px 0 0; color: var(--muted); font-size: 13px; font-weight: 650; }
.header-status { display: flex; align-items: center; gap: 10px; margin: 0; padding: 9px 12px; border-radius: 999px; background: rgba(255,255,255,.58); border: 1px solid var(--line); color: var(--green); font-weight: 850; }
.header-status b { color: var(--orange); }
.net-dot { width: 9px; height: 9px; border-radius: 50%; background: #36d399; box-shadow: 0 0 0 6px rgba(54,211,153,.16); }
.deploy-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 12px 14px; border-radius: 20px; background: rgba(255, 236, 199, .92); border: 1px solid rgba(229,109,45,.26); box-shadow: var(--shadow);
  margin-bottom: 12px;
}
.deploy-banner strong { display: block; color: var(--orange); text-transform: uppercase; letter-spacing: .12em; font-size: 12px; }
.deploy-banner span { color: #5f574c; font-size: 14px; font-weight: 650; }
.deploy-banner code { color: var(--green); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 800; font-size: 13px; }
.notice-actions { display: flex; gap: 10px; align-items: center; }
.dashboard-grid {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-columns: 430px minmax(560px, 1fr) 390px;
  gap: 12px;
}
.side-stack { min-height: 0; display: grid; grid-template-rows: 1.15fr .85fr; gap: 12px; }
.panel {
  min-height: 0;
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,.7);
  background: var(--card);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
  padding: 18px;
  overflow: hidden;
}
.panel-title { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.panel-title.compact { margin-bottom: 12px; }
.panel-title span { width: 36px; height: 36px; flex: 0 0 auto; border-radius: 13px; display: grid; place-items: center; background: var(--green-dark); color: var(--gold); font-weight: 950; }
h2 { margin: 0; font-family: Georgia, serif; font-size: 29px; line-height: 1; letter-spacing: -.04em; }
.account-strip { display: grid; grid-template-columns: 1.15fr .9fr .75fr; gap: 8px; margin-bottom: 12px; }
.account-strip div { min-width: 0; padding: 12px; border-radius: 16px; background: rgba(255,255,255,.55); border: 1px solid rgba(17,23,18,.06); }
label { display: block; margin: 0 0 5px; }
.account-strip b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 20px; }
.actions-stack { display: grid; gap: 9px; }
.action-line { display: grid; grid-template-columns: 28px 1fr 1fr; gap: 8px; align-items: center; padding: 10px; border: 1px solid rgba(17,23,18,.07); border-radius: 18px; background: rgba(255,255,255,.42); }
.action-line.connect-line { grid-template-columns: 28px minmax(140px, 1fr) 1.05fr; }
.action-line.input-line { grid-template-columns: 28px minmax(104px, .85fr) minmax(72px, .58fr) .95fr .78fr .78fr; }
.action-line.buy-line { grid-template-columns: 28px minmax(116px, .8fr) minmax(80px, .45fr); grid-template-areas: "num label amount" "buttons buttons buttons"; }
.action-line.buy-line .num { grid-area: num; }
.action-line.buy-line .field-label { grid-area: label; }
.action-line.buy-line input { grid-area: amount; }
.button-row { grid-area: buttons; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.action-line.draw-line { grid-template-columns: 28px minmax(104px, .85fr) minmax(72px, .58fr) .95fr .95fr; }
.num { width: 28px; height: 28px; border-radius: 10px; display: grid; place-items: center; background: rgba(8,116,90,.12); color: var(--green); font-weight: 950; }
button { border: 0; border-radius: 14px; padding: 11px 12px; cursor: pointer; color: #fff; background: var(--green-dark); font-size: 14px; font-weight: 850; box-shadow: 0 10px 24px rgba(16,32,24,.13); }
button:hover { filter: brightness(1.04); transform: translateY(-1px); }
button.secondary { background: var(--green); }
button.gold { background: linear-gradient(135deg, #a86518, var(--gold)); color: #211609; }
button.ghost-gold { background: rgba(240,178,62,.22); color: #8a5815; box-shadow: none; border: 1px solid rgba(168,101,24,.16); }
button.small { white-space: nowrap; padding: 10px 14px; }
input { width: 100%; min-width: 0; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.72); padding: 10px 11px; font-size: 16px; font-weight: 800; outline: none; }
.action-copy b, .field-label b { display: block; font-size: 14px; color: var(--ink); }
.action-copy small, .field-label small { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; font-weight: 800; line-height: 1.2; }
.field-label { margin: 0; padding: 0 2px; }
.flow-mini { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(17,23,18,.08); }
.flow-mini span { padding: 6px 8px; border-radius: 999px; background: rgba(17,23,18,.06); font-size: 12px; font-weight: 850; }
.flow-mini i { width: 10px; height: 1px; background: rgba(17,23,18,.24); }
.focus-panel { display: grid; grid-template-rows: auto auto minmax(260px, .9fr) minmax(120px, .7fr); }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.stats-grid div { min-width: 0; padding: 9px 10px; border-radius: 16px; background: rgba(255,255,255,.58); border: 1px solid rgba(17,23,18,.06); }
.stats-grid b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--green); font-size: 17px; line-height: 1.05; }
.stats-grid span { color: var(--muted); font-size: 10px; font-weight: 800; }
.result-stage { display: grid; grid-template-columns: 120px 1fr; gap: 18px; align-items: center; padding: 14px; border-radius: 20px; background: linear-gradient(135deg, rgba(8,116,90,.08), rgba(240,178,62,.16)); border: 1px solid rgba(17,23,18,.07); }
.ring-small { width: 106px; height: 106px; border-radius: 50%; border: 22px solid rgba(8,116,90,.14); background: radial-gradient(circle, rgba(240,178,62,.2), transparent 60%); }
.result-stage small { color: var(--muted); font-weight: 850; }
.result-stage strong { display: block; font-family: Georgia, serif; font-size: 48px; color: var(--orange); line-height: 1; }
.result-stage p { margin: 5px 0 0; color: var(--muted); font-size: 14px; line-height: 1.35; }
.draws { min-height: 0; overflow: auto; display: grid; align-content: start; gap: 8px; padding-right: 4px; }
.draw-meta { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.draw-card { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; padding: 12px; border-radius: 16px; background: rgba(255,255,255,.56); border: 1px solid rgba(17,23,18,.07); }
.draw-card.pending { border-color: rgba(240,178,62,.28); }
.draw-card.claimed { opacity: .78; }
.draw-title { font-size: 15px; }
.draw-result { color: var(--green); font-weight: 900; font-size: 13px; }
.draw-actions button { padding: 8px 10px; border-radius: 12px; font-size: 13px; }
.table-panel { display: grid; grid-template-rows: auto minmax(0, 1fr); }
.tiers { min-height: 0; display: grid; grid-template-columns: 1fr; gap: 7px; overflow: auto; padding-right: 4px; }
.tier { display: grid; grid-template-columns: 54px 1fr auto; align-items: center; gap: 10px; min-height: 44px; padding: 9px 10px; border-radius: 15px; background: rgba(255,255,255,.56); border: 1px solid rgba(17,23,18,.07); }
.tier b { font-size: 14px; }
.tier strong { font-size: 18px; color: var(--orange); }
.tier span { font-size: 12px; color: var(--muted); font-weight: 800; }
.contract-panel { display: grid; grid-template-rows: auto minmax(0, 1fr); }
.addresses { display: grid; gap: 9px; align-content: start; }
.addresses div { min-width: 0; padding: 11px; border-radius: 15px; background: rgba(255,255,255,.56); border: 1px solid rgba(17,23,18,.07); }
.addresses code, .addresses a { display: block; color: var(--green); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; font-weight: 800; word-break: break-all; line-height: 1.35; }
.toast { position: fixed; right: 18px; bottom: 18px; z-index: 100; max-width: min(460px, calc(100% - 36px)); padding: 12px 14px; border-radius: 16px; background: var(--green-dark); color: #fffaf0; font-weight: 800; box-shadow: 0 18px 54px rgba(0,0,0,.22); }
@media (max-width: 1180px) {
  body { overflow: auto; }
  .app-shell { height: auto; min-height: calc(100vh - 28px); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .side-stack { grid-template-rows: auto; }
  .tiers { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .app-shell { width: min(100vw - 18px, 1480px); margin: 9px auto; grid-template-rows: auto auto; }
  .app-header, .deploy-banner { flex-direction: column; align-items: flex-start; }
  .notice-actions { width: 100%; flex-direction: column; align-items: stretch; }
  .account-strip, .action-line, .action-line.input-line, .action-line.connect-line, .action-line.draw-line, .stats-grid, .result-stage, .draw-card, .tiers { grid-template-columns: 1fr; }
  .action-line.buy-line { grid-template-columns: 1fr; grid-template-areas: "num" "label" "amount" "buttons"; }
  .button-row { grid-template-columns: 1fr; }
  button { width: 100%; }
}
/* Dramatic lottery stage */
.lottery-stage {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 18px;
  align-items: center;
  min-height: 168px;
  padding: 14px 16px;
  border-radius: 22px;
  background:
    radial-gradient(circle at 22% 50%, rgba(240,178,62,.46), transparent 30%),
    radial-gradient(circle at 76% 18%, rgba(229,109,45,.24), transparent 30%),
    linear-gradient(135deg, rgba(12,26,20,.94), rgba(8,116,90,.78));
  color: #fff8df;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12), 0 22px 70px rgba(8,116,90,.24);
}
.lottery-stage::before,
.lottery-stage::after {
  content: "";
  position: absolute;
  inset: -40%;
  pointer-events: none;
  background: conic-gradient(from 0deg, transparent, rgba(255,255,255,.14), transparent, rgba(240,178,62,.26), transparent);
  animation: cosmicSpin 12s linear infinite;
}
.lottery-stage::after { animation-duration: 7s; animation-direction: reverse; opacity: .45; }
.jackpot-ribbon {
  position: absolute;
  top: 12px;
  right: -42px;
  z-index: 3;
  transform: rotate(28deg);
  padding: 6px 48px;
  background: linear-gradient(90deg, var(--gold), #fff0a4, var(--orange));
  color: #281806;
  font-size: 10px;
  font-weight: 1000;
  letter-spacing: .12em;
  box-shadow: 0 10px 30px rgba(0,0,0,.22);
}
.wheel-wrap { position: relative; z-index: 2; width: 210px; height: 210px; display: grid; place-items: center; }
.wheel-glow { position: absolute; width: 182px; height: 182px; border-radius: 50%; background: rgba(240,178,62,.35); filter: blur(22px); animation: pulseGlow 1.6s ease-in-out infinite; }
.wheel {
  position: relative;
  width: 172px;
  height: 172px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background:
    conic-gradient(#f0b23e 0 52deg, #e56d2d 52deg 104deg, #fff2b6 104deg 156deg, #0ba77f 156deg 208deg, #f0b23e 208deg 260deg, #e56d2d 260deg 312deg, #102018 312deg 360deg);
  box-shadow: inset 0 0 0 10px rgba(255,255,255,.16), inset 0 0 0 2px rgba(255,255,255,.5), 0 18px 50px rgba(0,0,0,.35);
  animation: idleWheel 9s linear infinite;
}
.wheel::after { content: ""; position: absolute; inset: 42px; border-radius: 50%; background: #111712; box-shadow: inset 0 0 0 2px rgba(255,255,255,.16); }
.wheel span { position: absolute; z-index: 2; color: #111712; font-size: 12px; font-weight: 1000; text-shadow: 0 1px rgba(255,255,255,.5); }
.wheel span:nth-child(1) { transform: rotate(0deg) translateY(-68px) rotate(0deg); }
.wheel span:nth-child(2) { transform: rotate(52deg) translateY(-68px) rotate(-52deg); }
.wheel span:nth-child(3) { transform: rotate(104deg) translateY(-68px) rotate(-104deg); }
.wheel span:nth-child(4) { transform: rotate(156deg) translateY(-68px) rotate(-156deg); }
.wheel span:nth-child(5) { transform: rotate(208deg) translateY(-68px) rotate(-208deg); }
.wheel span:nth-child(6) { transform: rotate(260deg) translateY(-68px) rotate(-260deg); }
.wheel span:nth-child(7) { color: #fff8df; transform: rotate(312deg) translateY(-68px) rotate(-312deg); }
.pointer {
  position: absolute;
  top: 4px;
  z-index: 5;
  width: 0; height: 0;
  border-left: 15px solid transparent;
  border-right: 15px solid transparent;
  border-top: 30px solid #fff8df;
  filter: drop-shadow(0 6px 10px rgba(0,0,0,.28));
}
.core { position: absolute; z-index: 6; width: 74px; height: 74px; border-radius: 50%; display: grid; place-items: center; align-content: center; background: radial-gradient(circle, #fff8df, #f0b23e); color: #111712; box-shadow: 0 8px 28px rgba(0,0,0,.3); }
.core small { font-size: 10px; font-weight: 1000; color: rgba(17,23,18,.62); }
.core strong { font-family: Georgia, serif; font-size: 22px; line-height: .9; }
.stage-copy { position: relative; z-index: 2; min-width: 0; }
.stage-copy small { display: inline-flex; margin-bottom: 8px; padding: 5px 8px; border-radius: 999px; background: rgba(255,255,255,.14); color: #fff2b6; font-size: 11px; text-transform: uppercase; letter-spacing: .12em; font-weight: 950; }
.stage-copy strong { display: block; font-family: Georgia, serif; font-size: clamp(28px, 4vw, 48px); line-height: .9; letter-spacing: -.05em; }
.stage-copy p { max-width: 520px; margin: 10px 0 0; color: rgba(255,248,223,.78); line-height: 1.45; font-weight: 700; }
.sparkline { position: absolute; z-index: 2; left: 18px; right: 18px; bottom: 12px; display: flex; gap: 5px; align-items: end; height: 28px; opacity: .68; }
.sparkline i { flex: 1; border-radius: 999px 999px 0 0; background: linear-gradient(#fff2b6, rgba(255,242,182,.12)); animation: meterDance .9s ease-in-out infinite alternate; }
.sparkline i:nth-child(2) { animation-delay: .1s; } .sparkline i:nth-child(3) { animation-delay: .2s; } .sparkline i:nth-child(4) { animation-delay: .3s; } .sparkline i:nth-child(5) { animation-delay: .4s; } .sparkline i:nth-child(6) { animation-delay: .5s; } .sparkline i:nth-child(7) { animation-delay: .6s; } .sparkline i:nth-child(8) { animation-delay: .7s; }
.lottery-stage.is-rolling .wheel { animation: megaSpin 1.2s cubic-bezier(.15,.82,.27,1) infinite; }
.lottery-stage.is-rolling .wheel-glow { animation: manicGlow .45s ease-in-out infinite; }
.lottery-stage.is-rolling { animation: stageShake .5s ease-in-out infinite; }
.lottery-stage.is-won { animation: winBurst 1.2s ease-in-out 2; }
.lottery-stage.is-won .wheel { animation: winnerWheel 1.1s ease-out both; }
.lottery-stage.is-won .jackpot-ribbon { animation: ribbonFlash .45s ease-in-out 6; }
.draw-card.just-won { background: linear-gradient(135deg, rgba(255,242,182,.92), rgba(255,255,255,.62)); border-color: rgba(229,109,45,.34); box-shadow: 0 12px 34px rgba(229,109,45,.18); animation: cardPop .55s ease-out both; }
@keyframes cosmicSpin { to { transform: rotate(360deg); } }
@keyframes pulseGlow { 0%,100% { transform: scale(.9); opacity: .55; } 50% { transform: scale(1.15); opacity: 1; } }
@keyframes idleWheel { to { transform: rotate(360deg); } }
@keyframes megaSpin { from { transform: rotate(0deg) scale(1); } 50% { transform: rotate(540deg) scale(1.08); } to { transform: rotate(1080deg) scale(1); } }
@keyframes manicGlow { 0%,100% { transform: scale(.9); opacity: .45; } 50% { transform: scale(1.35); opacity: 1; } }
@keyframes stageShake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(1px); } 75% { transform: translateX(-1px); } }
@keyframes winnerWheel { 0% { transform: rotate(0deg) scale(1); } 75% { transform: rotate(1250deg) scale(1.12); } 100% { transform: rotate(1320deg) scale(1); } }
@keyframes winBurst { 0%,100% { box-shadow: inset 0 0 0 1px rgba(255,255,255,.12), 0 22px 70px rgba(8,116,90,.24); } 50% { box-shadow: inset 0 0 0 1px rgba(255,255,255,.18), 0 0 0 8px rgba(240,178,62,.18), 0 28px 90px rgba(229,109,45,.36); } }
@keyframes ribbonFlash { 50% { filter: brightness(1.4); transform: rotate(28deg) scale(1.04); } }
@keyframes meterDance { from { height: 20%; } to { height: 100%; } }
@keyframes cardPop { from { transform: scale(.96); opacity: .4; } to { transform: scale(1); opacity: 1; } }
@media (max-width: 1180px) { .lottery-stage { grid-template-columns: 1fr; } .wheel-wrap { margin: 0 auto; } }
@media (max-width: 720px) { .lottery-stage { padding-bottom: 44px; } .wheel-wrap { width: 190px; height: 190px; } }
/* Tabs + overview commercial page */
.header-right { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tabs { display: flex; gap: 6px; padding: 5px; border-radius: 999px; background: rgba(255,255,255,.58); border: 1px solid var(--line); }
button.tab { width: auto; padding: 8px 12px; border-radius: 999px; background: transparent; color: var(--muted); box-shadow: none; font-size: 12px; }
button.tab.active { color: #fff; background: var(--green-dark); }
.tab-page { display: none; min-height: 0; }
.tab-page.active { display: block; height: 100%; }
#tab-console.active { display: block; }
#tab-overview, #tab-owner { height: 100%; min-height: 0; }
.overview-shell {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(260px, 1.18fr) minmax(118px, .46fr) minmax(118px, .44fr);
  gap: 12px;
}
.overview-main {
  display: grid;
  grid-template-columns: minmax(360px, .92fr) minmax(480px, 1.08fr);
  gap: 16px;
  padding: 20px;
}
.cream-panel {
  background:
    radial-gradient(circle at 14% 15%, rgba(240,178,62,.24), transparent 34%),
    radial-gradient(circle at 96% 7%, rgba(8,116,90,.14), transparent 30%),
    rgba(255,252,242,.9);
}
.overview-text {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}
.overview-text h2 {
  max-width: 560px;
  font-size: clamp(42px, 5.1vw, 74px);
  line-height: .86;
  letter-spacing: -.075em;
}
.overview-text p {
  max-width: 620px;
  margin: 16px 0 0;
  color: #536050;
  font-size: 16px;
  line-height: 1.55;
  font-weight: 760;
}
.relationship-map {
  position: relative;
  min-height: 260px;
  border-radius: 24px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(17,23,18,.04) 1px, transparent 1px),
    linear-gradient(rgba(17,23,18,.04) 1px, transparent 1px),
    radial-gradient(circle at 50% 52%, rgba(240,178,62,.28), transparent 28%),
    linear-gradient(135deg, rgba(255,255,255,.72), rgba(236,244,232,.66));
  background-size: 34px 34px, 34px 34px, auto, auto;
  border: 1px solid rgba(17,23,18,.07);
}
.relationship-map::before,
.relationship-map::after {
  content: "";
  position: absolute;
  inset: 26px 68px;
  border: 1px dashed rgba(8,116,90,.22);
  border-radius: 50%;
  animation: orbitSpin 24s linear infinite;
}
.relationship-map::after { inset: 68px 112px; border-color: rgba(229,109,45,.18); animation-duration: 15s; animation-direction: reverse; }
.map-card {
  position: absolute;
  z-index: 3;
  width: 188px;
  padding: 13px 14px;
  border-radius: 19px;
  background: rgba(255,255,255,.73);
  border: 1px solid rgba(17,23,18,.08);
  box-shadow: 0 14px 38px rgba(17,23,18,.10);
  backdrop-filter: blur(14px);
}
.map-card b { display: block; font-size: 15px; }
.map-card span { display: block; margin-top: 5px; color: var(--muted); font-size: 12px; line-height: 1.35; font-weight: 750; }
.owner-card-mini { left: 8%; top: 12%; }
.user-card-mini { left: 10%; bottom: 13%; }
.exec-card-mini { right: 8%; top: 32%; }
.map-core {
  position: absolute;
  z-index: 4;
  left: 50%;
  top: 52%;
  transform: translate(-50%, -50%);
  width: 164px;
  height: 164px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  align-content: center;
  text-align: center;
  color: #17120a;
  background: radial-gradient(circle, #fff9e8, #f0b23e 72%);
  box-shadow: 0 18px 54px rgba(240,178,62,.28), inset 0 0 0 10px rgba(255,255,255,.34);
  animation: coreBreathPlain 2.7s ease-in-out infinite;
}
.map-core small { color: #875916; font-size: 10px; font-weight: 1000; letter-spacing: .14em; }
.map-core strong { font-family: Georgia, serif; font-size: 42px; line-height: .88; letter-spacing: -.05em; }
.map-core span { color: rgba(17,23,18,.64); font-size: 12px; font-weight: 900; }
.beam {
  position: absolute;
  z-index: 2;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 0 8px rgba(229,109,45,.12);
  animation: dotMove 4s ease-in-out infinite;
}
.b1 { left: 32%; top: 30%; }
.b2 { right: 34%; top: 48%; animation-delay: .9s; background: var(--green); }
.b3 { left: 36%; bottom: 25%; animation-delay: 1.7s; background: var(--gold); }
.overview-steps {
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.overview-steps article,
.overview-roles article {
  position: relative;
  overflow: hidden;
  padding: 16px;
  border-radius: 22px;
  background: rgba(255,252,242,.84);
  border: 1px solid rgba(255,255,255,.72);
  box-shadow: var(--shadow);
}
.overview-steps article.hot { background: linear-gradient(135deg, rgba(16,32,24,.96), rgba(8,116,90,.82)); color: #fff9e8; }
.overview-steps span { color: var(--orange); font-size: 12px; font-weight: 1000; letter-spacing: .12em; }
.overview-steps b { display: block; margin: 5px 0 6px; font-size: 20px; }
.overview-steps p,
.overview-roles p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.36; font-weight: 730; }
.overview-steps article.hot p { color: rgba(255,249,232,.75); }
.overview-roles {
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.overview-roles h3 { margin: 0 0 8px; font-family: Georgia, serif; font-size: 24px; line-height: 1; letter-spacing: -.035em; }
.overview-hero { height: 52%; min-height: 360px; display: grid; grid-template-columns: .86fr 1.14fr; gap: 12px; margin-bottom: 12px; }
.overview-copy { position: relative; overflow: hidden; padding: 34px; border-radius: 28px; color: #fff9e8; background: radial-gradient(circle at 15% 20%, rgba(240,178,62,.45), transparent 30%), linear-gradient(135deg, #102018, #075d49); box-shadow: var(--shadow); }
.overview-copy::after { content: ""; position: absolute; width: 420px; height: 420px; right: -170px; bottom: -210px; border-radius: 50%; border: 60px solid rgba(255,255,255,.08); }
.mega-label { display: inline-flex; margin-bottom: 12px; color: var(--gold); font-size: 12px; font-weight: 1000; letter-spacing: .16em; }
.overview-copy h2, .owner-hero h2 { position: relative; z-index: 1; margin: 0; font-family: Georgia, serif; font-size: clamp(44px, 5vw, 78px); line-height: .9; letter-spacing: -.07em; }
.overview-copy p, .owner-hero p { position: relative; z-index: 1; max-width: 660px; color: rgba(255,249,232,.78); font-size: 17px; line-height: 1.55; font-weight: 700; }
.orbit-map { position: relative; overflow: hidden; border-radius: 28px; background: linear-gradient(135deg, rgba(255,252,242,.9), rgba(236,244,232,.7)); border: 1px solid rgba(255,255,255,.7); box-shadow: var(--shadow); }
.orbit-line { position: absolute; inset: 42px; border: 1px dashed rgba(8,116,90,.22); border-radius: 50%; animation: orbitSpin 28s linear infinite; }
.orbit-2 { inset: 86px; animation-direction: reverse; animation-duration: 18s; border-color: rgba(229,109,45,.22); }
.agent-core-node { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); width: 190px; height: 190px; border-radius: 50%; display: grid; place-items: center; align-content: center; text-align: center; background: radial-gradient(circle, #fff8df, var(--gold)); color: #17120a; box-shadow: 0 22px 70px rgba(240,178,62,.33), inset 0 0 0 12px rgba(255,255,255,.32); animation: coreBreath 2.4s ease-in-out infinite; }
.agent-core-node small { color: #8a5815; font-weight: 1000; letter-spacing: .14em; }
.agent-core-node strong { font-family: Georgia, serif; font-size: 44px; line-height: .9; }
.agent-core-node span { font-size: 12px; font-weight: 900; }
.role-node { position: absolute; z-index: 3; width: 220px; padding: 16px; border-radius: 22px; background: rgba(255,255,255,.72); border: 1px solid rgba(17,23,18,.08); box-shadow: 0 18px 48px rgba(17,23,18,.12); }
.role-node b { display: block; font-size: 17px; }
.role-node span { display: block; margin-top: 6px; color: var(--muted); font-size: 13px; font-weight: 700; }
.brand-node { left: 8%; top: 12%; }
.user-node { left: 10%; bottom: 12%; }
.exec-node { right: 8%; top: 34%; }
.pulse-dot { position: absolute; z-index: 2; width: 12px; height: 12px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 8px rgba(229,109,45,.14); animation: dotMove 4s ease-in-out infinite; }
.d1 { left: 30%; top: 31%; } .d2 { right: 32%; top: 48%; animation-delay: .8s; background: var(--green); } .d3 { left: 35%; bottom: 24%; animation-delay: 1.6s; background: var(--gold); }
.commerce-flow { height: 20%; min-height: 130px; display: grid; grid-template-columns: 1fr 24px 1fr 24px 1fr 24px 1fr; gap: 10px; align-items: stretch; margin-bottom: 12px; }
.commerce-flow > i { align-self: center; height: 2px; background: linear-gradient(90deg, transparent, var(--green), transparent); }
.flow-card { position: relative; overflow: hidden; padding: 16px; border-radius: 22px; background: var(--card); border: 1px solid rgba(255,255,255,.7); box-shadow: var(--shadow); }
.flow-card.hot { background: linear-gradient(135deg, rgba(16,32,24,.95), rgba(8,116,90,.82)); color: white; }
.flow-card span { color: var(--orange); font-weight: 1000; }
.flow-card b { display: block; font-size: 20px; margin: 6px 0; }
.flow-card p { margin: 0; color: var(--muted); font-size: 13px; font-weight: 700; line-height: 1.35; }
.flow-card.hot p { color: rgba(255,255,255,.72); }
.role-matrix { height: calc(28% - 24px); min-height: 150px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.role-matrix article { padding: 18px; border-radius: 24px; background: rgba(255,252,242,.82); border: 1px solid rgba(255,255,255,.7); box-shadow: var(--shadow); }
.role-matrix h3 { margin: 0; font-family: Georgia, serif; font-size: 26px; }
.role-matrix p { color: var(--muted); font-weight: 700; line-height: 1.4; }
.role-matrix b { color: var(--green); }
.owner-grid { height: 100%; min-height: 0; display: grid; grid-template-columns: 1.05fr 1fr 1fr; grid-template-rows: .9fr 1.1fr; gap: 12px; }
.owner-hero { grid-row: 1 / 3; background: linear-gradient(135deg, #102018, #075d49); color: #fff9e8; }
.owner-card textarea { width: 100%; min-height: 150px; resize: vertical; border: 1px solid var(--line); border-radius: 16px; padding: 12px; background: rgba(255,255,255,.65); color: var(--ink); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.owner-card input { margin-bottom: 10px; }
.owner-actions { grid-template-columns: 1fr 1fr; padding: 0; background: transparent; border: 0; }
.readout-list { display: grid; gap: 10px; }
.readout-list div { min-width: 0; padding: 12px; border-radius: 16px; background: rgba(255,255,255,.55); border: 1px solid rgba(17,23,18,.06); }
.readout-list code { color: var(--green); word-break: break-all; font-size: 12px; font-weight: 800; }
@keyframes orbitSpin { to { transform: rotate(360deg); } }
@keyframes coreBreath { 0%,100% { transform: translate(-50%,-50%) scale(.97); } 50% { transform: translate(-50%,-50%) scale(1.04); } }
@keyframes dotMove { 0%,100% { transform: translate(0,0) scale(.8); opacity: .55; } 50% { transform: translate(30px,-22px) scale(1.35); opacity: 1; } }
@keyframes coreBreathPlain { 0%,100% { transform: translate(-50%,-50%) scale(.97); } 50% { transform: translate(-50%,-50%) scale(1.04); } }
@media (max-width: 1180px) {
  body { overflow: auto; }
  .app-shell { height: auto; min-height: calc(100vh - 28px); }
  .header-right { flex-direction: column; align-items: flex-start; }
  .overview-shell { height: auto; grid-template-rows: auto; }
  .overview-main, .overview-steps, .overview-roles, .overview-hero, .commerce-flow, .role-matrix, .owner-grid { height: auto; grid-template-columns: 1fr; }
  .relationship-map { min-height: 430px; }
  .commerce-flow > i { display: none; }
  .owner-hero { grid-row: auto; }
}
@media (max-width: 720px) {
  .brand-row { min-width: 0; }
  .header-right { width: 100%; }
  .tabs { width: 100%; overflow-x: auto; }
  .header-status { width: 100%; justify-content: space-between; }
  .overview-text h2 { font-size: 42px; }
  .relationship-map { min-height: 0; display: grid; gap: 10px; padding: 12px; }
  .map-card { position: relative; left: auto; right: auto; top: auto; bottom: auto; width: auto; margin: 0; }
  .map-core { position: relative; left: auto; top: auto; transform: none; margin: 8px auto 4px; animation: none; }
  .relationship-map::before, .relationship-map::after, .beam { display: none; }
  .role-node { position: static; margin: 10px; width: auto; }
  .agent-core-node { position: relative; left: auto; top: auto; transform: none; margin: 120px auto 20px; }
  .orbit-map { min-height: 620px; }
}

/* Console layout tightening */
.buy-line .button-row button { min-width: 0; white-space: nowrap; padding-inline: 8px; }
.buy-line .ghost-gold { font-size: 13px; }
.focus-panel .lottery-stage { min-height: 250px; height: 100%; grid-template-columns: 190px minmax(0, 1fr); }
.focus-panel .wheel-wrap { width: 180px; height: 180px; }
.focus-panel .wheel { width: 150px; height: 150px; }
.focus-panel .wheel span:nth-child(1) { transform: rotate(0deg) translateY(-58px) rotate(0deg); }
.focus-panel .wheel span:nth-child(2) { transform: rotate(52deg) translateY(-58px) rotate(-52deg); }
.focus-panel .wheel span:nth-child(3) { transform: rotate(104deg) translateY(-58px) rotate(-104deg); }
.focus-panel .wheel span:nth-child(4) { transform: rotate(156deg) translateY(-58px) rotate(-156deg); }
.focus-panel .wheel span:nth-child(5) { transform: rotate(208deg) translateY(-58px) rotate(-208deg); }
.focus-panel .wheel span:nth-child(6) { transform: rotate(260deg) translateY(-58px) rotate(-260deg); }
.focus-panel .wheel span:nth-child(7) { transform: rotate(312deg) translateY(-58px) rotate(-312deg); }
.focus-panel .core { width: 66px; height: 66px; }
.focus-panel .core strong { font-size: 20px; }
.focus-panel .stage-copy strong { font-size: clamp(30px, 3vw, 46px); }
@media (max-width: 1380px) {
  .dashboard-grid { grid-template-columns: 410px minmax(480px, 1fr); }
  .side-stack { grid-column: 1 / -1; grid-template-columns: 1fr 1fr; grid-template-rows: auto; }
}
@media (max-width: 980px) {
  .focus-panel { grid-template-rows: auto auto auto minmax(120px, auto); }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .focus-panel .lottery-stage { grid-template-columns: 1fr; height: auto; }
}
