:root {
  --ink: #151918;
  --muted: #64706b;
  --paper: #ffffff;
  --soft: #f4f7f5;
  --line: #d9e1dd;
  --brand: #185c46;
  --brand-strong: #0f3f31;
  --mint: #dff0e8;
  --amber: #b98219;
  --amber-soft: #fff2d3;
  --blue: #245c8f;
  --blue-soft: #e7f0f9;
  --purple: #6b4bb2;
  --purple-soft: #efe9ff;
  --red: #a5413b;
  --red-soft: #fae9e7;
  --target: 46px;
  --primary-target: 58px;
  --header-h: 58px;
  --bottom-nav-h: 74px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --h7-orientation-transition-duration: 380ms;
  --h7-hud-outgoing-fade-duration: 150ms;
  --h7-hud-reduced-motion-duration: 90ms;
  --h7-hud-transition-easing: cubic-bezier(.22, 1, .36, 1);
  --shadow: 0 16px 42px rgba(26, 35, 32, .10);
  color: var(--ink);
  background: #edf2ef;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-width: 320px; scroll-behavior: smooth; }
body { margin: 0; min-height: 100dvh; background: #edf2ef; overflow-x: hidden; }
button, input, select { font: inherit; }
button, select, a, summary, label { min-width: var(--target); min-height: var(--target); }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid var(--brand-strong);
  outline-offset: 3px;
}
p, span, strong, small, b, h1, h2, h3 { overflow-wrap: anywhere; }

.skip-link {
  position: fixed;
  left: 12px;
  top: -80px;
  z-index: 30;
  background: var(--ink);
  color: white;
  padding: 10px 12px;
}
.skip-link:focus { top: 12px; }

.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: calc(var(--header-h) + var(--safe-top));
  padding: var(--safe-top) clamp(10px, 3vw, 34px) 0;
  background: rgba(255,255,255,.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}
.brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: block;
  object-fit: contain;
}
.brand-copy strong, .brand-copy small { display: block; }
.brand-copy strong { font-size: 14px; letter-spacing: 0; }
.brand-copy small { color: var(--muted); font-size: 12px; margin-top: 2px; }
.rail-meta { display: none; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.arena-badge {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  border: 1px solid #b9cec4;
  border-radius: 8px;
  padding: 0 9px;
  color: var(--brand-strong);
  background: var(--mint);
  font-size: 11px;
  font-weight: 850;
}
.icon-button, .avatar-button {
  position: relative;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  display: grid;
  place-items: center;
  font-weight: 850;
}
.icon-button strong {
  position: absolute;
  right: -4px;
  top: -5px;
  min-width: 20px;
  min-height: 20px;
  border-radius: 10px;
  background: var(--amber);
  color: white;
  font-size: 11px;
  display: grid;
  place-items: center;
}
.login-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  padding: 0 14px;
  min-height: 42px;
  color: white;
  background: var(--ink);
  text-decoration: none;
  font-weight: 800;
  font-size: 13px;
}
.portal-account { position: relative; min-width: 0; }
.avatar-button {
  width: auto;
  min-width: 56px;
  height: auto;
  min-height: 58px;
  padding: 4px 6px;
  background: var(--blue);
  color: white;
  display: flex;
  flex-direction: column;
  gap: 3px;
  cursor: pointer;
}
.portal-account-avatar { display: grid; place-items: center; min-height: 28px; font-size: 15px; }
.portal-account-alias { display: block; max-width: 112px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; font-weight: 750; }
.portal-account-popover {
  position: absolute;
  z-index: 160;
  top: calc(100% + 8px);
  right: 0;
  width: min(240px, calc(100vw - 24px));
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: var(--shadow);
}
.portal-account-popover[hidden] { display: none; }
.portal-account-popover button { width: 100%; min-height: 44px; border: 1px solid #a75b61; border-radius: 8px; background: #fff7f7; color: #8f1d26; font: inherit; font-weight: 800; cursor: pointer; }
.portal-account-popover button:disabled { opacity: .6; cursor: wait; }
.portal-account-popover span { display: block; margin-top: 8px; color: var(--muted); font-size: 12px; line-height: 1.4; }
.primary-button:disabled { cursor: wait; opacity: .62; }

.workspace {
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
  padding: calc(var(--header-h) + var(--safe-top) + 18px) 0 calc(var(--bottom-nav-h) + var(--safe-bottom) + 24px);
}
.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 18px;
  align-items: end;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
}
.eyebrow {
  margin: 0 0 8px;
  color: var(--brand);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}
h1, h2, h3 { margin: 0; letter-spacing: 0; }
h1 { font-size: 34px; line-height: 1.04; max-width: 760px; }
h2 { font-size: 25px; line-height: 1.15; }
h3 { font-size: 16px; }
.lead { color: var(--muted); line-height: 1.55; margin: 12px 0 0; max-width: 720px; }
.operator-chip {
  display: grid;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--soft);
}
.operator-chip strong { font-size: 15px; }
.operator-chip span { color: var(--muted); font-size: 12px; }
.chip-dashboard {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: max-content;
  max-width: 100%;
  min-height: 34px;
  margin-top: 4px;
  padding: 0 10px;
  border-radius: 8px;
  background: var(--brand);
  color: white;
  font-size: 12px;
  font-weight: 850;
  text-decoration: none;
}

.tab-nav {
  display: none;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin: 14px 0;
}
.tab-nav button, .bottom-nav button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: #47554f;
  font-weight: 850;
}
.tab-nav button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 12px;
  min-height: var(--primary-target);
}
.tab-nav [aria-current="page"], .bottom-nav [aria-current="page"] {
  background: var(--brand);
  color: white;
  border-color: var(--brand);
}
.tab-nav button[data-route="360"], .bottom-nav button[data-route="360"] { --route-accent: #1f6f55; }
.tab-nav button[data-route="licencias"], .bottom-nav button[data-route="licencias"] { --route-accent: #75500d; }
.tab-nav button[data-route="facturas"], .bottom-nav button[data-route="facturas"] { --route-accent: #245c8f; }
.tab-nav button[data-route="cuenta"], .bottom-nav button[data-route="cuenta"] { --route-accent: #6b4bb2; }
.tab-nav button[data-route="info"], .bottom-nav button[data-route="info"] { --route-accent: #4b5f58; }
.tab-nav button:not([aria-current="page"]), .bottom-nav button:not([aria-current="page"]) {
  box-shadow: inset 0 3px 0 var(--route-accent, var(--brand));
}

.section-heading { margin: 22px 0 14px; }
.purchase-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 14px;
  align-items: start;
}
.flow-panel, .cart-panel, .license-card, .document-row, .account-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
}
.flow-panel { padding: 18px; }
.progress-rail {
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.progress-rail li {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.progress-rail span {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--soft);
}
.progress-rail .active { color: var(--brand-strong); }
.progress-rail .active span { color: white; background: var(--brand); }
.control-group { margin: 18px 0; }
.control-group h3 { margin-bottom: 10px; }
.choice-list, .plan-list, .status-grid, .document-list { display: grid; gap: 10px; }
.choice-card, .plan-card {
  position: relative;
  min-height: 76px;
  display: grid;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 14px;
  cursor: pointer;
}
.choice-card { grid-template-columns: auto minmax(0, 1fr) auto; }
.plan-card { grid-template-columns: minmax(0, 1fr) auto; }
.choice-card input, .plan-card input {
  position: absolute;
  right: 8px;
  top: 8px;
  width: var(--target);
  height: var(--target);
  margin: 0;
  opacity: 0;
}
.choice-card:focus-within, .plan-card:focus-within, .choice-card.selected, .plan-card.selected {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(24, 92, 70, .12);
}
.card-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--blue-soft);
  color: var(--blue);
  font-weight: 900;
}
.choice-card strong, .choice-card small, .plan-card span { display: block; }
.choice-card small, .plan-card span, .document-row small { color: var(--muted); font-size: 12px; margin-top: 4px; }
.state-pill, .tier {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  width: max-content;
  border-radius: 8px;
  padding: 0 8px;
  background: var(--mint);
  color: var(--brand-strong);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}
.tier.supplier { background: var(--purple-soft); color: var(--purple); }
.state-pill.proxima, .state-pill.pendiente { background: var(--amber-soft); color: #75500d; }
.state-pill.vencida, .state-pill.suspendida { background: var(--red-soft); color: var(--red); }
.state-pill.reembolsada, .state-pill.sin { background: var(--blue-soft); color: var(--blue); }
.plan-card b { font-size: 20px; }
.field { display: grid; gap: 8px; }
.field span { color: var(--muted); font-size: 12px; font-weight: 800; }
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 0 12px;
}
.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 4px;
  border-radius: 8px;
  background: var(--soft);
}
.segmented button {
  border: 0;
  border-radius: 8px;
  min-height: var(--primary-target);
  background: transparent;
  color: var(--muted);
  font-weight: 850;
}
.segmented .active { background: white; color: var(--brand-strong); box-shadow: 0 3px 10px rgba(0,0,0,.06); }
.payment-selector .active:last-child { color: #75500d; }
.points-preview {
  margin-top: 10px;
  display: grid;
  gap: 5px;
  border: 1px solid #ecd492;
  border-radius: 8px;
  padding: 12px;
  background: var(--amber-soft);
  color: #69480c;
  font-size: 13px;
}
.points-preview strong { color: #4d3509; }
.action-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; }
.primary-button, .secondary-button, .text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--primary-target);
  border-radius: 8px;
  font-weight: 900;
  text-decoration: none;
}
.primary-button { border: 0; background: var(--brand); color: white; padding: 0 16px; }
.secondary-button { border: 1px solid var(--line); background: white; color: var(--brand); padding: 0 16px; }
.text-button { border: 0; background: transparent; color: var(--red); padding: 0 8px; }

.cart-panel {
  position: sticky;
  top: calc(var(--header-h) + var(--safe-top) + 14px);
  padding: 16px;
}
.panel-heading { display: flex; align-items: start; justify-content: space-between; gap: 8px; margin-bottom: 14px; }
.cart-items { display: grid; gap: 10px; }
.cart-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}
.cart-item strong, .cart-item span, .cart-item small { display: block; }
.cart-item span, .cart-item small { color: var(--muted); font-size: 12px; margin-top: 4px; }
.quantity { display: grid; grid-template-columns: var(--target) 32px var(--target); align-items: center; text-align: center; }
.quantity button { border: 1px solid var(--line); border-radius: 8px; background: white; font-weight: 900; }
.totals { margin: 14px 0; border-top: 1px solid var(--line); padding-top: 12px; }
.totals div { display: flex; justify-content: space-between; gap: 12px; margin: 8px 0; color: var(--muted); }
.totals .grand-total { color: var(--ink); font-size: 18px; font-weight: 900; }
.payment-modes { display: grid; gap: 8px; margin: 14px 0; }
.mode { min-height: var(--primary-target); border: 1px solid var(--line); border-radius: 8px; background: white; color: var(--muted); text-align: left; padding: 0 12px; }
.mode.active { border-color: var(--brand); color: var(--brand-strong); background: var(--mint); }
.mode:disabled { opacity: .62; cursor: not-allowed; }
.consent {
  display: flex;
  gap: 10px;
  align-items: center;
  min-height: var(--target);
  margin: 12px 0;
  line-height: 1.4;
}
.consent input { width: var(--target); height: var(--target); flex: 0 0 var(--target); margin: 0; accent-color: var(--brand); }
.inline-error { border-radius: 8px; padding: 10px 12px; background: var(--red-soft); color: var(--red); font-weight: 850; margin: 8px 0; }
.empty-state { border: 1px dashed #b9c7c0; border-radius: 8px; padding: 18px; display: grid; gap: 4px; color: var(--muted); }
.empty-state strong { color: var(--ink); }

.status-grid, .legal-grid, .pre360-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.legal-grid, .pre360-grid { display: grid; gap: 10px; }
.license-card { padding: 16px; }
.license-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 12px; }
.license-card h3 { margin-top: 14px; }
.license-card p, .license-card small, .microcopy { color: var(--muted); line-height: 1.5; }
.legal-card p strong { color: var(--ink); }
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: var(--target);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: var(--soft);
  color: var(--brand-strong);
  font-size: 12px;
  font-weight: 850;
}
.meter { height: 9px; border-radius: 8px; background: var(--soft); overflow: hidden; margin: 14px 0; }
.meter span { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), var(--amber)); }
.document-row {
  min-height: 76px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 14px;
}
.account-panel { display: grid; gap: 10px; }
.session-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--paper);
  box-shadow: var(--shadow);
}
.session-summary.pending { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.session-summary span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  margin-bottom: 4px;
}
.account-card { padding: 0; overflow: hidden; }
.account-card summary {
  min-height: var(--primary-target);
  display: flex;
  align-items: center;
  padding: 12px 16px;
  cursor: pointer;
  font-weight: 900;
}
.account-card p { color: var(--muted); line-height: 1.55; padding: 0 16px 16px; margin: 0; }
.dashboard-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  text-decoration: none;
  margin-bottom: 10px;
}
.portal-logout { width: 100%; margin-bottom: 10px; }

.bottom-nav {
  display: grid;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 25;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  min-height: calc(var(--bottom-nav-h) + var(--safe-bottom));
  background: rgba(255,255,255,.94);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(14px);
}
.bottom-nav button { display: grid; place-items: center; gap: 3px; min-height: 56px; padding: 4px; }
.bottom-nav span { font-weight: 900; line-height: 1; }
.bottom-nav small { font-size: 11px; font-weight: 850; }
.close-cart { display: none; }
.cookie-banner, .cookie-panel {
  position: fixed;
  left: 14px;
  right: 14px;
  z-index: 26;
  max-width: 920px;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: white;
  box-shadow: var(--shadow);
}
.cookie-banner[hidden], .cookie-panel[hidden] { display: none; }
.cookie-banner {
  bottom: 84px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}
.cookie-panel {
  bottom: 84px;
  display: grid;
  gap: 10px;
  max-height: min(76vh, 620px);
  overflow: auto;
}
.cookie-banner p { margin: 4px 0 0; color: var(--muted); font-size: 13px; line-height: 1.4; }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.cookie-actions button { border: 1px solid var(--line); border-radius: 8px; background: white; min-height: var(--primary-target); padding: 0 10px; font-weight: 850; }
.cookie-actions button:last-child { background: var(--brand); color: white; border-color: var(--brand); }
.consent.locked { color: var(--muted); }
.install-recommendation-button {
  position: fixed;
  right: calc(var(--safe-right) + 12px);
  bottom: calc(var(--safe-bottom) + var(--bottom-nav-h) + 12px);
  z-index: 24;
  width: 46px;
  min-width: 46px;
  height: 46px;
  min-height: 46px;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 8px;
  background: #185c46;
  color: white;
  box-shadow: 0 12px 28px rgba(0,0,0,.20);
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
}
.install-recommendation-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: calc(var(--safe-top) + 18px) calc(var(--safe-right) + 14px) calc(var(--safe-bottom) + 18px) calc(var(--safe-left) + 14px);
  background: rgba(11, 17, 14, .48);
}
.install-recommendation-modal[hidden] {
  display: none !important;
  pointer-events: none;
}
.install-recommendation-card {
  width: min(420px, 100%);
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  padding: 18px;
  box-shadow: 0 18px 52px rgba(0,0,0,.26);
}
.install-recommendation-actions {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 8px;
  align-items: center;
}
.install-recommendation-actions .text-button {
  color: var(--muted);
}
.legal-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 10px 0;
  color: var(--muted);
  font: inherit;
  line-height: 1.55;
}
.pre360-card ul {
  margin: 12px 0 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.55;
}
.contract-list {
  display: grid;
  gap: 8px;
  margin: 14px 0;
}
.contract-list div {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 10px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}
.contract-list dt {
  color: var(--muted);
  font-weight: 850;
}
.contract-list dd {
  margin: 0;
  font-weight: 850;
}
.compact-contract-list {
  margin-bottom: 0;
  font-size: 12px;
}
.compact-contract-list div {
  grid-template-columns: minmax(132px, auto) minmax(0, 1fr);
}
.app-footer {
  display: flex;
  justify-content: center;
  padding: 0 0 96px;
}
.app-footer .text-button {
  border: 1px solid var(--line);
  color: var(--brand);
  background: white;
  padding: 0 14px;
}

.nav-svg, .hud-svg {
  width: 24px;
  height: 24px;
  display: block;
  flex: 0 0 auto;
  object-fit: contain;
  opacity: .84;
}
.tab-nav [aria-current="page"] .nav-svg,
.bottom-nav [aria-current="page"] .nav-svg,
.hud-icon-button .hud-svg {
  filter: brightness(0) invert(1);
  opacity: 1;
}

body[data-route="360"] {
  overflow: hidden;
  background: #0f1713;
}
body[data-route="360"] .app-header {
  --h7-hud-bg: rgba(8, 14, 12, .58);
  --h7-hud-border-color: rgba(255,255,255,.14);
  --h7-hud-shadow: none;
  background: rgba(8, 14, 12, .58);
  border-bottom-color: rgba(255,255,255,.14);
  color: white;
  transition:
    opacity var(--h7-orientation-transition-duration) var(--h7-hud-transition-easing),
    transform var(--h7-orientation-transition-duration) var(--h7-hud-transition-easing),
    background-color var(--h7-orientation-transition-duration) var(--h7-hud-transition-easing),
    border-color var(--h7-orientation-transition-duration) var(--h7-hud-transition-easing),
    box-shadow var(--h7-orientation-transition-duration) var(--h7-hud-transition-easing);
}
body[data-route="360"] .brand-mark { box-shadow: 0 0 0 1px rgba(255,255,255,.18), 0 8px 22px rgba(0,0,0,.22); }
body[data-route="360"] .brand-copy small,
body[data-route="360"] .arena-badge {
  color: rgba(255,255,255,.78);
}
body[data-route="360"] .arena-badge,
body[data-route="360"] .icon-button,
body[data-route="360"] .avatar-button {
  background: rgba(255,255,255,.12);
  border-color: rgba(255,255,255,.18);
  color: white;
}
body[data-route="360"] .login-link {
  background: rgba(255,255,255,.92);
  color: #102018;
}
body[data-route="360"] .bottom-nav {
  --h7-hud-bg: rgba(8, 14, 12, .68);
  --h7-hud-border-color: rgba(255,255,255,.16);
  --h7-hud-shadow: none;
  background: rgba(8, 14, 12, .68);
  border-top-color: rgba(255,255,255,.16);
  transition:
    opacity var(--h7-orientation-transition-duration) var(--h7-hud-transition-easing),
    transform var(--h7-orientation-transition-duration) var(--h7-hud-transition-easing),
    background-color var(--h7-orientation-transition-duration) var(--h7-hud-transition-easing),
    border-color var(--h7-orientation-transition-duration) var(--h7-hud-transition-easing),
    box-shadow var(--h7-orientation-transition-duration) var(--h7-hud-transition-easing);
}
body[data-route="360"] .bottom-nav button {
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.16);
  color: rgba(255,255,255,.80);
}
body[data-route="360"] .bottom-nav [aria-current="page"] {
  background: rgba(25, 113, 84, .86);
  color: white;
  border-color: rgba(102, 230, 177, .54);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.16), 0 0 22px rgba(52, 180, 130, .20);
}
body[data-route="360"][data-hud-transition-active="true"] .app-header,
body[data-route="360"][data-hud-transition-active="true"] .bottom-nav,
body[data-route="360"] .app-header[data-hud-interactive="false"],
body[data-route="360"] .bottom-nav[data-hud-interactive="false"] {
  pointer-events: none;
}
body[data-route="360"][data-hud-transition="outgoing"] .app-header,
body[data-route="360"][data-hud-transition="outgoing"] .bottom-nav {
  animation: h7-hud-outgoing-fade var(--h7-hud-outgoing-fade-duration) ease-out both;
}
body[data-route="360"][data-hud-transition="portrait-to-landscape"] .app-header {
  animation: h7-hud-rail-left-in var(--h7-orientation-transition-duration) var(--h7-hud-transition-easing) both;
}
body[data-route="360"][data-hud-transition="portrait-to-landscape"] .bottom-nav {
  animation: h7-hud-rail-right-in var(--h7-orientation-transition-duration) var(--h7-hud-transition-easing) both;
}
body[data-route="360"][data-hud-transition="landscape-to-portrait"] .app-header {
  animation: h7-hud-portrait-top-in var(--h7-orientation-transition-duration) var(--h7-hud-transition-easing) both;
}
body[data-route="360"][data-hud-transition="landscape-to-portrait"] .bottom-nav {
  animation: h7-hud-portrait-bottom-in var(--h7-orientation-transition-duration) var(--h7-hud-transition-easing) both;
}
body[data-route="360"][data-hud-transition="reduced"] .app-header,
body[data-route="360"][data-hud-transition="reduced"] .bottom-nav {
  animation: h7-hud-reduced-fade var(--h7-hud-reduced-motion-duration) ease-out both;
}
.app-shell[data-route="360"] .workspace {
  width: 100%;
  height: 100dvh;
  min-height: 100dvh;
  padding: 0;
  overflow: hidden;
}
.app-shell[data-route="360"] .hero-panel,
.app-shell[data-route="360"] .tab-nav,
.app-shell[data-route="360"] .app-footer {
  display: none;
}
.view-360 {
  height: 100dvh;
  min-height: 100dvh;
}
.panorama-stage {
  position: relative;
  height: 100dvh;
  min-height: 100dvh;
  overflow: hidden;
  background: #0f1713;
}
.panorama-canvas-wrap {
  position: absolute;
  inset: 0;
  touch-action: none;
  cursor: grab;
}
.panorama-canvas-wrap:active { cursor: grabbing; }
.panorama-canvas-wrap canvas {
  display: block;
  width: 100%;
  height: 100%;
  contain: strict;
}
.orientation-transition {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
}
.orientation-transition::before {
  content: "";
  position: absolute;
  inset: 0;
  background: transparent;
  opacity: 0;
}
.orientation-transition[data-reveal="portrait-to-landscape"],
.orientation-transition[data-reveal="landscape-to-portrait"],
.orientation-transition[data-reveal="reduced"] {
  opacity: 1;
}
.orientation-transition[data-reveal="portrait-to-landscape"]::before {
  animation: reveal-sides var(--h7-orientation-transition-duration) ease both;
  background:
    linear-gradient(90deg,
      rgba(5, 10, 8, .78) 0%,
      rgba(5, 10, 8, .42) 19%,
      rgba(5, 10, 8, .04) 39%,
      rgba(5, 10, 8, 0) 50%,
      rgba(5, 10, 8, .04) 61%,
      rgba(5, 10, 8, .42) 81%,
      rgba(5, 10, 8, .78) 100%);
  backdrop-filter: blur(5px);
}
.orientation-transition[data-reveal="landscape-to-portrait"]::before {
  animation: reveal-vertical var(--h7-orientation-transition-duration) ease both;
  background:
    linear-gradient(180deg,
      rgba(5, 10, 8, .72) 0%,
      rgba(5, 10, 8, .34) 19%,
      rgba(5, 10, 8, .03) 38%,
      rgba(5, 10, 8, 0) 50%,
      rgba(5, 10, 8, .03) 62%,
      rgba(5, 10, 8, .34) 81%,
      rgba(5, 10, 8, .72) 100%);
  backdrop-filter: blur(4px);
}
.orientation-transition[data-reveal="reduced"]::before {
  animation: reveal-reduced var(--h7-hud-reduced-motion-duration) ease both;
  background: rgba(5, 10, 8, .16);
}
.orientation-debug {
  position: absolute;
  left: calc(var(--safe-left) + 8px);
  bottom: calc(var(--safe-bottom) + 8px);
  z-index: 5;
  max-width: min(92vw, 760px);
  padding: 6px 8px;
  border: 1px solid rgba(216, 255, 235, .28);
  border-radius: 6px;
  background: rgba(5, 10, 8, .74);
  color: #e8fff5;
  font: 11px/1.35 ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  letter-spacing: 0;
  pointer-events: none;
  white-space: normal;
  overflow-wrap: anywhere;
}
@keyframes reveal-sides {
  0% { opacity: 1; clip-path: inset(0 0 0 0); }
  60% { opacity: .62; clip-path: inset(0 8% 0 8%); }
  100% { opacity: 0; clip-path: inset(0 24% 0 24%); }
}
@keyframes reveal-vertical {
  0% { opacity: 1; clip-path: inset(0 0 0 0); }
  60% { opacity: .58; clip-path: inset(8% 0 8% 0); }
  100% { opacity: 0; clip-path: inset(22% 0 22% 0); }
}
@keyframes reveal-reduced {
  0% { opacity: .5; }
  100% { opacity: 0; }
}
@keyframes h7-hud-outgoing-fade {
  0% {
    opacity: 1;
    background-color: var(--h7-hud-bg);
    border-color: var(--h7-hud-border-color);
    box-shadow: var(--h7-hud-shadow);
  }
  100% {
    opacity: 0;
    background-color: rgba(8, 14, 12, 0);
    border-color: rgba(255,255,255,0);
    box-shadow: none;
  }
}
@keyframes h7-hud-rail-left-in {
  0%, 39% {
    opacity: 0;
    transform: translateX(-6px);
    background-color: rgba(8, 14, 12, 0);
    border-color: rgba(255,255,255,0);
    box-shadow: none;
  }
  100% {
    opacity: 1;
    transform: translateX(0);
    background-color: var(--h7-hud-bg);
    border-color: var(--h7-hud-border-color);
    box-shadow: var(--h7-hud-shadow);
  }
}
@keyframes h7-hud-rail-right-in {
  0%, 39% {
    opacity: 0;
    transform: translateX(6px);
    background-color: rgba(8, 14, 12, 0);
    border-color: rgba(255,255,255,0);
    box-shadow: none;
  }
  100% {
    opacity: 1;
    transform: translateX(0);
    background-color: var(--h7-hud-bg);
    border-color: var(--h7-hud-border-color);
    box-shadow: var(--h7-hud-shadow);
  }
}
@keyframes h7-hud-portrait-top-in {
  0%, 39% {
    opacity: 0;
    transform: translateY(-6px);
    background-color: rgba(8, 14, 12, 0);
    border-color: rgba(255,255,255,0);
    box-shadow: none;
  }
  100% {
    opacity: 1;
    transform: translateY(0);
    background-color: var(--h7-hud-bg);
    border-color: var(--h7-hud-border-color);
    box-shadow: var(--h7-hud-shadow);
  }
}
@keyframes h7-hud-portrait-bottom-in {
  0%, 39% {
    opacity: 0;
    transform: translateY(6px);
    background-color: rgba(8, 14, 12, 0);
    border-color: rgba(255,255,255,0);
    box-shadow: none;
  }
  100% {
    opacity: 1;
    transform: translateY(0);
    background-color: var(--h7-hud-bg);
    border-color: var(--h7-hud-border-color);
    box-shadow: var(--h7-hud-shadow);
  }
}
@keyframes h7-hud-reduced-fade {
  0% {
    opacity: 0;
    background-color: rgba(8, 14, 12, 0);
    border-color: rgba(255,255,255,0);
    box-shadow: none;
  }
  100% {
    opacity: 1;
    background-color: var(--h7-hud-bg);
    border-color: var(--h7-hud-border-color);
    box-shadow: var(--h7-hud-shadow);
  }
}
.panorama-loading {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  transform: translate(-50%, -50%);
  max-width: min(86vw, 360px);
  min-height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 8px;
  padding: 10px 14px;
  background: rgba(5, 10, 8, .68);
  color: white;
  text-align: center;
  font-weight: 850;
  backdrop-filter: blur(10px);
}
.panorama-loading[data-tone="warning"] {
  background: rgba(76, 42, 15, .78);
}
.panorama-hud {
  position: absolute;
  right: calc(var(--safe-right) + clamp(10px, 3vw, 20px));
  top: calc(var(--safe-top) + var(--header-h) + 8px);
  z-index: 3;
  width: min(calc(100vw - var(--safe-left) - var(--safe-right) - 20px), 560px);
  display: grid;
  gap: 6px;
  pointer-events: none;
}
.panorama-compact-row,
.panorama-status-strip {
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 8px;
  background: rgba(8, 14, 12, .58);
  color: white;
  box-shadow: 0 12px 34px rgba(0,0,0,.24);
  backdrop-filter: blur(12px);
}
.panorama-compact-row {
  min-height: 48px;
  display: grid;
  grid-template-columns: minmax(132px, 1fr) auto auto auto;
  align-items: center;
  gap: 7px;
  padding: 6px;
  pointer-events: auto;
}
.panorama-compact-title {
  min-width: 0;
  padding: 0 4px 0 8px;
}
.panorama-compact-title span {
  display: block;
  color: #94e0bf;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}
.panorama-compact-title h2 {
  margin-top: 1px;
  font-size: 16px;
  line-height: 1.12;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hud-button,
.hud-icon-button {
  min-height: 44px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.2);
  background: rgba(255,255,255,.11);
  color: white;
  font-weight: 900;
}
.hud-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 11px;
  white-space: nowrap;
  font-size: 13px;
}
.hud-icon-button {
  width: 44px;
  display: grid;
  place-items: center;
}
.motion-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d8e6df;
  box-shadow: 0 0 0 3px rgba(216,230,223,.12);
}
.hud-button[data-motion-state="active"] .motion-dot {
  background: #76e4b7;
  box-shadow: 0 0 0 3px rgba(118,228,183,.2), 0 0 14px rgba(118,228,183,.52);
}
.hud-button[data-motion-state="waiting"] .motion-dot {
  background: #ffd98a;
  box-shadow: 0 0 0 3px rgba(255,217,138,.18);
}
.panorama-status-strip {
  justify-self: end;
  width: min(100%, 420px);
  min-height: 28px;
  padding: 6px 10px;
  font-size: 12px;
  line-height: 1.3;
  color: rgba(255,255,255,.86);
  opacity: 0;
  transform: translateY(-3px);
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}
.panorama-status-strip[data-visible="true"] {
  opacity: 1;
  transform: translateY(0);
}
.panorama-status-strip[data-tone="warning"] {
  background: rgba(76, 42, 15, .78);
}
.panorama-static {
  position: absolute;
  inset: 0;
  display: block;
}
.panorama-static img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.webgl-fallback {
  position: absolute;
  inset: auto 14px 14px;
  z-index: 2;
  display: grid;
  gap: 4px;
  border-radius: 8px;
  padding: 12px;
  background: rgba(8,14,12,.78);
  color: white;
}
.license-gate {
  margin-bottom: 14px;
}
.license-status-grid {
  margin-top: 14px;
}

@media (max-width: 900px) {
  .workspace { width: min(100% - 20px, 760px); padding-top: calc(var(--header-h) + var(--safe-top) + 14px); }
  .hero-panel { grid-template-columns: 1fr; padding: 16px; }
  h1 { font-size: 27px; }
  h2 { font-size: 22px; }
  .tab-nav { display: none; }
  .bottom-nav { display: grid; }
  .purchase-layout { grid-template-columns: 1fr; }
  .cart-panel {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: 86px;
    top: auto;
    max-height: min(72vh, 620px);
    overflow: auto;
    transform: translateY(calc(100% + 110px));
    transition: transform .2s ease;
    z-index: 24;
  }
  .cart-panel.open { transform: translateY(0); }
  .close-cart { display: grid; }
  .status-grid, .legal-grid, .pre360-grid { grid-template-columns: 1fr; }
  .cookie-banner { grid-template-columns: 1fr; bottom: 86px; }
  .cookie-panel { bottom: 86px; }
  .install-recommendation-actions { grid-template-columns: 1fr; }
}

	@media (max-width: 520px) {
  .app-header { min-height: calc(56px + var(--safe-top)); padding: var(--safe-top) 10px 0; }
  .brand-copy small { display: none; }
  .brand-mark { width: 36px; height: 36px; }
  .arena-badge { display: none; }
  .login-link { padding: 0 10px; font-size: 12px; }
  .hero-panel { box-shadow: none; }
  .progress-rail { grid-template-columns: repeat(4, minmax(44px, 1fr)); }
  .progress-rail li { font-size: 0; justify-content: center; }
  .progress-rail span { font-size: 12px; }
  .choice-card { grid-template-columns: minmax(0, 1fr) auto; }
	  .card-icon { display: none; }
	  .plan-card { grid-template-columns: 1fr; }
	  .action-row { grid-template-columns: 1fr; }
	  .document-row { grid-template-columns: auto minmax(0, 1fr); }
	  .document-row b { grid-column: 2; }
	  .session-summary, .session-summary.pending { grid-template-columns: 1fr; }
	  .panorama-hud {
	    top: calc(var(--safe-top) + 58px);
	    right: calc(var(--safe-right) + 8px);
	    width: min(calc(100vw - var(--safe-left) - var(--safe-right) - 16px), 430px);
	  }
	  .panorama-compact-row {
	    grid-template-columns: minmax(96px, 1fr) auto auto auto;
	    gap: 4px;
	    min-height: 44px;
	    padding: 5px;
	  }
	  .panorama-compact-title { padding-left: 6px; }
	  .panorama-compact-title span { font-size: 10px; }
	  .panorama-compact-title h2 { font-size: 14px; }
	  .hud-button {
	    max-width: 132px;
	    min-width: 44px;
	    padding: 0 9px;
	    font-size: 0;
	  }
	  .hud-button #motion-toggle-label { display: none; }
	  .hud-icon-button { width: 42px; min-width: 42px; }
  .panorama-status-strip { width: min(100%, 360px); font-size: 11px; }
  .install-recommendation-button {
    right: calc(var(--safe-right) + 10px);
    bottom: calc(var(--safe-bottom) + var(--bottom-nav-h) + 10px);
  }
	}

@media (orientation: landscape) and (max-width: 1180px) {
  body[data-route="360"] .app-header {
    top: 0;
    right: auto;
    bottom: 0;
    width: calc(76px + var(--safe-left));
    min-height: 100dvh;
    flex-direction: column;
    justify-content: flex-start;
    gap: 8px;
    padding: calc(var(--safe-top) + 8px) 8px calc(var(--safe-bottom) + 8px) calc(var(--safe-left) + 8px);
    border-right: 1px solid rgba(255,255,255,.16);
    border-bottom: 0;
    transform: translateX(0);
    transition: transform .28s ease, opacity .28s ease, background-color .28s ease;
  }
  body[data-route="360"] .brand {
    width: 48px;
    min-width: 48px;
    min-height: 48px;
    justify-content: center;
  }
  body[data-route="360"] .brand-copy { display: none; }
  body[data-route="360"] .brand-mark {
    width: 42px;
    height: 42px;
  }
  body[data-route="360"] .rail-meta {
    width: 48px;
    display: grid;
    gap: 6px;
    color: rgba(255,255,255,.86);
    font-size: 10px;
    font-weight: 850;
    line-height: 1.15;
    text-align: center;
  }
  body[data-route="360"] .rail-meta span {
    min-height: 30px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 8px;
    padding: 3px;
    background: rgba(255,255,255,.08);
  }
  body[data-route="360"] .header-actions {
    margin-top: auto;
    width: 48px;
    flex-direction: column;
    gap: 6px;
  }
  body[data-route="360"] .arena-badge {
    display: grid;
    width: 48px;
    min-width: 48px;
    padding: 0;
    font-size: 10px;
  }
  body[data-route="360"] .login-link {
    width: 48px;
    min-width: 48px;
    min-height: 44px;
    padding: 0 4px;
    font-size: 10px;
    line-height: 1.1;
    text-align: center;
  }
  body[data-route="360"] .avatar-button,
  body[data-route="360"] .icon-button {
    width: 48px;
    min-width: 48px;
    height: 48px;
  }
  body[data-route="360"] .bottom-nav {
    top: 0;
    left: auto;
    bottom: 0;
    width: calc(76px + var(--safe-right));
    min-height: 100dvh;
    grid-template-columns: 1fr !important;
    grid-auto-rows: minmax(56px, auto);
    align-content: center;
    gap: 7px;
    padding: calc(var(--safe-top) + 8px) calc(var(--safe-right) + 8px) calc(var(--safe-bottom) + 8px) 8px;
    border-top: 0;
    border-left: 1px solid rgba(255,255,255,.16);
    transform: translateX(0);
    transition: transform .28s ease, opacity .28s ease, background-color .28s ease;
  }
  body[data-route="360"] .bottom-nav button {
    width: 52px;
    min-width: 52px;
    min-height: 52px;
    padding: 3px;
  }
  body[data-route="360"] .bottom-nav small {
    max-width: 48px;
    font-size: 9px;
    line-height: 1.05;
  }
  body[data-route="360"] .nav-svg {
    width: 22px;
    height: 22px;
  }
  body[data-route="360"] .panorama-hud {
    top: calc(var(--safe-top) + 10px);
    right: calc(var(--safe-right) + 86px);
    width: min(380px, calc(100vw - var(--safe-left) - var(--safe-right) - 184px));
  }
  body[data-route="360"] .panorama-compact-row {
    grid-template-columns: minmax(96px, 1fr) auto auto auto;
    min-height: 44px;
    padding: 5px;
  }
  body[data-route="360"] .panorama-compact-title span { font-size: 10px; }
  body[data-route="360"] .panorama-compact-title h2 { font-size: 14px; }
  body[data-route="360"] .hud-button {
    min-width: 44px;
    max-width: 126px;
    padding: 0 9px;
    font-size: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
  .orientation-transition::before {
    backdrop-filter: none !important;
  }
  .install-recommendation-modal {
    background: rgba(11, 17, 14, .58);
  }
}
