/* Cotardo — original artwork, electric blue, scarlet and midnight. */
:root {
  color-scheme: dark;
  --accent: #59c7ff;
  --bg: #060811;
  --surface: #101624;
  --text: #f7f9ff;
  --muted: #a7b3ca;
  --cotardo-blue: #2459e8;
  --cotardo-red: #ff536b;
  --cotardo-edge: #33415a;
  --font-ui: "Segoe UI Variable", "SF Pro Display", Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --ui-panel: #141d30;
  --ui-raised: #18243b;
  --ui-quiet: var(--muted);
  --ui-edge: var(--cotardo-edge);
  --ui-control-edge: #637593;
  --ui-selected: #152c48;
  --line: var(--cotardo-edge);
  --line-strong: var(--accent);
  --hud-edge: var(--cotardo-edge);
  --hud-edge-strong: #637593;
  --danger: #ff8294;
  --marble-gold: var(--accent);
  --marble-deep: var(--surface);
  --marble-page: linear-gradient(var(--bg), var(--bg));
  --marble-surface: linear-gradient(var(--surface), var(--surface));
  --marble-tab: linear-gradient(var(--ui-panel), var(--ui-panel));
}
html, body { background: var(--bg); color: var(--text); touch-action: pan-x pan-y; }
#marbleBackdrop, .ambient, .ambient-grid { display: none!important; }
:is(.global-header,.sidebar,.mobile-footer) { background: var(--bg); }
.global-header { border-bottom: 1px solid var(--line); }
.identity strong { letter-spacing: .08em; font-weight: 850; text-transform: uppercase; }
.identity small { color: var(--muted); }
.logo, .auth-logo-mini { border-radius: 50%; overflow: hidden; border: 1px solid var(--accent); background: var(--bg); }
.logo img, .auth-logo-mini img { width: 100%; height: 100%; object-fit: contain; }
.sidebar { border-right-color: var(--line); }
.sidebar nav button.active { background: var(--ui-selected); color: var(--text); }
.sidebar nav button.active::before { background: var(--accent); }
.primary, #authView #authSubmit, .cotardo-telegram-link {
  background: var(--cotardo-blue); color: #fff; border: 1px solid #4879ff;
  border-radius: 12px; font-weight: 750; min-height: 48px; box-shadow: none; text-decoration: none;
}
.primary:hover, #authView #authSubmit:hover { background: #1d4dd0; filter: none; transform: none; }
.primary:active { background: #193ead; }
:where(button,a,input,textarea,select,summary):focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.ghost, .icon-btn { color: var(--text); border-color: var(--line); }
.eyebrow, .console-tag { color: var(--accent); font-weight: 750; letter-spacing: .14em; }
.workspace { padding-top: 32px; }
/* The artwork is the focal point; the rest of the page stays quiet. */
.hero {
  display: grid; grid-template-columns: minmax(0,1.15fr) minmax(240px,.85fr);
  padding: 0; gap: 0; border: 1px solid var(--line); border-radius: 20px;
  background: var(--surface); overflow: hidden; isolation: isolate;
}
.hero-copy { padding: clamp(28px,4vw,52px); min-width: 0; }
.hero-copy>.eyebrow { padding-left: 16px; position: relative; }
.hero-copy>.eyebrow::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--cotardo-red); position: absolute; left: 0; top: 4px; }
.hero h1 { font-weight: 850; font-size: clamp(36px,4.3vw,64px); letter-spacing: -.045em; line-height: 1.04; max-width: 12ch; margin: 22px 0; color: var(--text); }
.hero-description, .hero p { color: var(--muted); font-size: 16px; line-height: 1.65; max-width: 38ch; }
.hero-actions { margin-top: 28px; }
.cotardo-hero-art { margin: 0; padding: 24px 24px 18px; background: #03050b; align-self: stretch; display: flex; flex-direction: column; justify-content: center; min-width: 0; border-left: 1px solid var(--line); }
.cotardo-hero-art img { width: 100%; height: auto; max-width: 380px; align-self: center; display: block; border-radius: 50%; }
.cotardo-hero-art figcaption { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; justify-content: space-between; padding-top: 20px; color: var(--muted); }
.cotardo-hero-art figcaption span { color: var(--accent); font-size: 10px; letter-spacing: .18em; font-weight: 800; }
.cotardo-hero-art figcaption b { font-size: 11px; font-weight: 500; }
.hero-guide { grid-column: 1/-1; flex: none; border: 0; border-top: 1px solid var(--line); padding: 20px 32px; background: var(--bg); }
.hero-guide>span { font-size: 10px; }
.hero-guide ol { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 24px; margin: 14px 0 0; }
.hero-guide ol li { min-width: 0; }
.hero-guide ol b { font-size: 13px; }
.hero-guide ol small { font-size: 12px; color: var(--muted); line-height: 1.5; }
.dashboard-shortcuts { gap: 12px; }
.dashboard-shortcuts button { background: var(--surface); border-color: var(--line); border-radius: 14px; min-height: 88px; }
.dashboard-shortcuts button>span { color: var(--cotardo-red); }
.home-live-feed, .catalog-product-section, .panel, .info-sheet, .cart-item, .quick-card { border-color: var(--line); }
.product-card { background: var(--surface)!important; border-color: var(--line)!important; }
.product-card h3, .catalog-section-head h2 { color: var(--text); }
.product-price, .product-price strong, .cart-total strong { color: var(--accent); }
.catalog-category-filter button.active, .view-toggle button.active { background: var(--ui-selected); color: var(--accent); }
input, textarea, select { background: var(--bg); color: var(--text); border-color: var(--ui-control-edge); }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .85; }
.app-footer { color: var(--muted); border-color: var(--line); }
#customFooter { color: var(--text); letter-spacing: .16em; font-weight: 850; }
.mobile-footer button.active { color: var(--accent); }
/* Access screens and saved-state feedback share the same identity. */
.auth-shell, #authView.auth-shell { background: var(--bg); }
.auth-shell::before, .access-card::before { display: none!important; }
.access-card, #authView .access-card { background: var(--surface); border: 1px solid var(--line); box-shadow: none; border-radius: 20px; }
.access-card .auth-art { background: #03050b; border-color: var(--line); padding: 40px; }
.access-card .auth-art .auth-logo-stage { width: min(280px,100%); aspect-ratio: 1; margin: 0 0 24px; border-radius: 50%; overflow: hidden; }
.auth-logo-stage img { object-fit: contain; filter: none; }
.access-card .auth-art h1 { font-size: clamp(30px,3.2vw,44px); font-weight: 800; line-height: 1.1; letter-spacing: -.035em; }
.access-card .auth-art h1 em { color: var(--accent); }
.access-card .auth-form { background: var(--surface); }
.access-card .auth-form h2 { color: var(--text); }
.access-card .auth-form p, .access-footline { color: var(--muted); }
.access-live, .access-step { color: var(--accent); }
.access-live i, .access-footline i { background: var(--accent); box-shadow: none; }
.cotardo-telegram-link { display: inline-flex; justify-content: space-between; align-items: center; gap: 20px; padding: 14px 18px; margin-top: 12px; }
.save-overlay-card { background: var(--surface); border-color: var(--line); }
.save-orbit img { border-radius: 50%; }
/* No white/gold flash before the app or a credential screen is ready. */
html.booting, html.booting body, html.booting #loadingView, #loadingView.loading-shell { background: var(--bg)!important; }
#loadingView .loading-card, html.booting #loadingView .loading-card { width: min(360px,80vw); padding: 20px; background: transparent!important; border: 0; box-shadow: none; }
#loadingView .loading-frame-stage { background: transparent; border-radius: 50%; overflow: hidden; }
#loadingView .loading-frame-stage img { border-radius: 50%; object-fit: contain; }
#loadingView .loading-frame-stage::before, #loadingView .loading-frame-stage::after, #loadingView .loading-particles, #loadingView .loading-energy { display: none!important; }
html.booting #loadingView .loading-track, #loadingView .loading-track { margin: 28px 16px 0; background: #1b2941; box-shadow: none; }
html.booting #loadingView .loading-track i, #loadingView .loading-track i, #loadingView .loading-track::after { background: var(--accent); box-shadow: none; }
@media(max-width:950px) {
  .workspace { padding-top: 24px; }
  .hero h1 { font-size: clamp(36px,5.5vw,50px); }
}
@media(max-width:650px) {
  .hero { grid-template-columns: 1fr; border-radius: 16px; }
  .hero-copy { padding: 28px 24px 24px; }
  .hero h1 { max-width: 13ch; font-size: 40px; margin: 18px 0; }
  .hero-description, .hero p { font-size: 15px; }
  .hero-actions { margin-top: 22px; }
  .hero-actions .primary { width: 100%; }
  .cotardo-hero-art { border-left: 0; border-top: 1px solid var(--line); padding: 20px 24px 18px; }
  .cotardo-hero-art img { max-width: 240px; }
  .hero-guide { padding: 20px 24px; }
  .hero-guide ol { grid-template-columns: 1fr; gap: 16px; }
  .hero-guide ol li { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 6px 14px; }
  .hero-guide ol li b { width: 100%; }
  .access-card .auth-art { padding: 28px; }
  .access-card .auth-art .auth-logo-stage { width: 156px; margin: 0 0 18px; }
  .access-card .auth-art h1 { font-size: 30px; }
  .access-card .auth-form { padding: 28px; }
  .cotardo-telegram-link { font-size: 14px; }
  .identity strong { font-size: 14px; }
  .global-header { padding-inline: 16px; }
}
@media(prefers-reduced-motion:reduce) {
  *, *::before, *::after { animation: none!important; transition: none!important; scroll-behavior: auto!important; }
}
/* Keep status feedback clear of the brand name on narrow screens. */
.network-rail { top: calc(var(--header) + 8px); left: auto; right: 16px; transform: translateY(-8px); background: var(--surface); backdrop-filter: none; }
.network-rail.visible { transform: translateY(0); }
.cotardo-hero-art figcaption, .cotardo-hero-art figcaption b { font-family: var(--font-ui); }
.sale-hype-badge, .detail-sale-signal { color: #fff; background: #bd2541; border-color: #ff8294; box-shadow: none; }

/* Prevent focus magnification in mobile WebViews, including Owner forms. */
@media (hover: none), (pointer: coarse) {
  input, select, textarea, [contenteditable="true"] { font-size: max(16px, 1rem) !important; }
}

/* Cotardo / discovery & motion — a quieter shell and clearer actions. */
:root { --motion-fast: 160ms; --motion-ease: cubic-bezier(.22,.8,.25,1); }
.global-header { box-shadow: 0 8px 28px #0003; }
.page-intro h1, .console-head h1 { letter-spacing: -.045em; font-weight: 850; }
.page-intro { padding-bottom: 24px; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.hero { border-top: 3px solid var(--accent); }
.hero-actions .primary { padding-inline: 28px; }
.hero-guide ol { counter-reset: guide; }
.hero-guide ol li { position: relative; padding-left: 30px; counter-increment: guide; }
.hero-guide ol li::before { content: '0' counter(guide); position: absolute; left: 0; top: 0; font-size: 11px; font-weight: 800; color: var(--accent); }
.dashboard-shortcuts button { text-align: left; border-radius: 12px; transition: border-color var(--motion-fast), background var(--motion-fast), transform var(--motion-fast); }
.dashboard-shortcuts button>span { color: var(--accent); font-size: 12px; font-variant-numeric: tabular-nums; }
.dashboard-shortcuts button i { color: var(--accent); }
.catalog-discovery { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 20px; }
.catalog-search { display: flex; align-items: center; flex: 1 1 280px; gap: 12px; min-width: 0; border: 1px solid var(--ui-control-edge); border-radius: 12px; background: var(--surface); padding: 0 16px; }
.catalog-search:focus-within { outline: 2px solid var(--accent); outline-offset: 3px; }
.catalog-search svg { width: 20px; height: 20px; flex-shrink: 0; color: var(--accent); }
.catalog-search input { width: 100%; min-width: 0; border: 0; outline: none; background: transparent; min-height: 52px; padding: 12px 0; font-size: 16px; box-shadow: none; }
.catalog-search input:focus-visible { outline: none; }
#catalogResultCount { flex: 1 0 100%; margin: 0; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
#catalogReset { min-height: 48px; }
.catalog-no-results { padding: clamp(24px,5vw,48px); margin-bottom: 24px; background: var(--surface); border: 1px dashed var(--line); border-radius: 16px; }
.catalog-no-results h2 { margin: 16px 0 12px; letter-spacing: -.03em; }
.catalog-no-results p { color: var(--muted); line-height: 1.6; max-width: 48ch; }
.catalog-no-results .primary { margin-top: 16px; }
[hidden] { display: none!important; }
.catalog-category-filter { padding-bottom: 8px; gap: 8px; }
.catalog-category-filter button { min-height: 44px; border-radius: 10px; }
.catalog-category-filter button.active { border-color: var(--accent); }
.product-card { border-radius: 16px!important; box-shadow: 0 12px 32px #0002!important; transition: border-color var(--motion-fast), box-shadow var(--motion-fast); }
.product-card .product-pricing { background: #0b1120; }
.product-card h3 { letter-spacing: -.025em; }
.product-media-frame { overflow: hidden; }
.product-media-frame img { transition: transform 260ms var(--motion-ease); }
.product-details-trigger { min-height: 44px; color: var(--accent); }
.purchase-control .primary { min-height: 48px; }
.mobile-footer { border-top: 1px solid var(--line); box-shadow: 0 -10px 30px #0004; }
.mobile-footer button { min-height: 54px; }
.tab-motion-indicator { background: var(--ui-selected)!important; border: 1px solid #305375; border-radius: 10px; }
.cart-item, .panel { border-radius: 16px; }
dialog { border: 1px solid var(--line); border-radius: 20px; background: var(--surface); box-shadow: 0 24px 80px #0008; }
dialog::backdrop { background: #02040bd9; backdrop-filter: blur(4px); }
.dialog-close { min-width: 44px; min-height: 44px; background: var(--ui-raised); }
@media (hover:hover) {
 .dashboard-shortcuts button:hover { transform: translateY(-3px); border-color: var(--accent); background: var(--ui-panel); }
 .product-card:hover { border-color: #637593!important; box-shadow: 0 16px 36px #0004!important; }
 .product-media-frame:hover img { transform: scale(1.025); }
}
@media(max-width:650px) {
 .workspace { padding-inline: 16px; }
 .catalog-discovery { gap: 12px; }
 .catalog-search { flex-basis: 100%; }
 #catalogResultCount { flex: 1; }
 .page-intro h1 { font-size: 32px; }
 .cotardo-hero-art img { max-width: 200px; }
 .hero-guide ol { gap: 14px; }
 .hero-guide ol li b { width: auto; }
 dialog { max-width: calc(100vw - 24px); border-radius: 16px; }
}
.motion-disabled *, .motion-disabled *::before, .motion-disabled *::after { animation: none!important; transition: none!important; scroll-behavior: auto!important; }
.sr-only { position: absolute!important; width: 1px!important; height: 1px!important; padding: 0!important; margin: -1px!important; overflow: hidden!important; clip-path: inset(50%); white-space: nowrap!important; border: 0!important; }
.cart-open { background: var(--cotardo-blue); color: #fff; border: 1px solid #4879ff; }
