/* ============================================================================
   dc-theme.css — Theme System (Phase 5)
   Merged: dc-premium-shell-bg.css + project-shell.css
   Load via includes/shell/theme.php → dc_theme_stylesheet_link()
   Responsive tokens: assets/dc-responsive.css
   ============================================================================ */

/* ---- 1. Design tokens --------------------------------------------------- */
:root {
  --dc-color-brand: #ff8a00;
  --dc-color-brand-soft: #ffb347;
  --dc-color-surface: #000000;
  --dc-color-surface-auth: #030304;
  --dc-color-text: #ffffff;
  --dc-guest-glass-bg: linear-gradient(168deg, rgba(14, 22, 36, 0.92), rgba(6, 10, 18, 0.94));
  --dc-guest-glass-border: rgba(148, 163, 184, 0.14);
  --dc-guest-glass-radius: 20px;
  --dc-guest-glass-shadow: 0 12px 32px rgba(0, 0, 0, 0.34), 0 0 40px rgba(56, 189, 248, 0.04);
  /* Legacy aliases */
  --dream-orange: var(--dc-color-brand);
  --dream-orange-2: var(--dc-color-brand-soft);
  --dream-white: var(--dc-color-text);
}

@keyframes logoGlow {
  from { opacity: .45; transform: scale(.96); }
  to { opacity: 1; transform: scale(1.04); }
}

@keyframes logoFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}

/* ---- 2. Base shell canvas (ex project-shell) ---------------------------- */
@media (min-width: 431px) {
  body.user-mode:not(.feed-v2-surface) { background: var(--dc-color-surface) !important; }
  body.user-mode:not(.feed-v2-surface) .wrap {
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .05), 0 0 70px rgba(255, 138, 0, .08) !important;
  }
}

button, .btn, a, input[type="button"], input[type="submit"], .page-btn, .user-bottom-nav a {
  -webkit-tap-highlight-color: transparent !important;
  touch-action: manipulation !important;
}
button:focus:not(:focus-visible), .btn:focus:not(:focus-visible), a:focus:not(:focus-visible),
.page-btn:focus:not(:focus-visible), .user-bottom-nav a:focus:not(:focus-visible) {
  outline: 0 !important;
  box-shadow: inherit;
}

html, body {
  background: var(--dc-color-surface) !important;
  background-color: var(--dc-color-surface) !important;
  background-image: none !important;
  background-attachment: fixed !important;
}
body:not(.feed-v2-surface)::before {
  content: "" !important;
  position: fixed !important;
  inset: 0 !important;
  z-index: -1 !important;
  pointer-events: none !important;
  background: var(--dc-color-surface) !important;
}
body.user-mode:not(.feed-v2-surface) {
  background: var(--dc-color-surface) !important;
  background-color: var(--dc-color-surface) !important;
  background-image: none !important;
  background-attachment: fixed !important;
}

/* ---- 3. Premium shell surfaces (ex dc-premium-shell-bg) ----------------- */
html.dc-premium-shell-open,
html:has(body.dc-premium-shell-open){
  min-height:100%;
  background:var(--dc-color-surface);
}

html.dc-premium-shell-open::before,
html:has(body.dc-premium-shell-open)::before{
  content:"";
  position:fixed;
  inset:0;
  z-index:0;
  pointer-events:none;
  background:
    radial-gradient(circle at 88% 14%,rgba(255,255,255,.085),transparent 32%),
    linear-gradient(180deg,#000 0%,#000 100%);
}

html.dc-premium-shell-open::after,
html:has(body.dc-premium-shell-open)::after{
  content:"";
  position:fixed;
  inset:0;
  z-index:0;
  pointer-events:none;
  background:radial-gradient(circle at 100% -4%,rgba(34,34,34,.78),transparent 44%);
}

body.dc-premium-shell-open{
  position:relative;
  z-index:1;
  background:transparent!important;
  background-color:transparent!important;
  background-image:none!important;
}

body.dc-premium-shell-open .wrap{
  background:transparent!important;
}

body.dc-premium-shell-open.feed-v2-surface.feed-publications-open:not(.admin-mode),
body.dc-premium-shell-open.feed-v2-surface.public-feed-open:not(.admin-mode){
  background:transparent!important;
}

body.dc-premium-shell-open.feed-v2-surface.feed-publications-open,
body.dc-premium-shell-open.public-feed-open.feed-publications-open{
  background-color:transparent!important;
  background-image:none!important;
  --dc-guest-glass-bg:linear-gradient(168deg,rgba(14,22,36,.92),rgba(6,10,18,.94));
  --dc-guest-glass-border:rgba(148,163,184,.14);
  --dc-guest-glass-radius:20px;
  --dc-guest-glass-shadow:0 12px 32px rgba(0,0,0,.34), 0 0 40px rgba(56,189,248,.04);
}

html.dc-premium-shell-open:has(body.dc-premium-shell-open.feed-v2-surface.feed-publications-open)::before,
html:has(body.dc-premium-shell-open.feed-v2-surface.feed-publications-open)::before,
html.dc-premium-shell-open:has(body.dc-premium-shell-open.feed-v2-surface.feed-publications-open)::after,
html:has(body.dc-premium-shell-open.feed-v2-surface.feed-publications-open)::after,
html.dc-premium-shell-open:has(body.dc-premium-shell-open.public-feed-open.feed-publications-open)::before,
html:has(body.dc-premium-shell-open.public-feed-open.feed-publications-open)::before,
html.dc-premium-shell-open:has(body.dc-premium-shell-open.public-feed-open.feed-publications-open)::after,
html:has(body.dc-premium-shell-open.public-feed-open.feed-publications-open)::after{
  content:none!important;
  display:none!important;
}

body.dc-premium-shell-open.feed-v2-surface.feed-publications-open .wrap,
body.dc-premium-shell-open.feed-v2-surface.feed-publications-open .feed-v2-page,
body.dc-premium-shell-open.feed-v2-surface.feed-publications-open .feed-v2-workspace,
body.dc-premium-shell-open.feed-v2-surface.feed-publications-open .feed-v2-pane-feed,
body.dc-premium-shell-open.feed-v2-surface.feed-publications-open .feed-v2-pane-feed > #feedPosts,
body.dc-premium-shell-open.feed-v2-surface.feed-publications-open .feed-v2-pane-chat,
body.dc-premium-shell-open.feed-v2-surface.feed-publications-open .feed-v2-pane-chat .feed-v2-chat-thread,
body.dc-premium-shell-open.public-feed-open.feed-publications-open .wrap,
body.dc-premium-shell-open.public-feed-open.feed-publications-open .feed-v2-page,
body.dc-premium-shell-open.public-feed-open.feed-publications-open .feed-v2-workspace,
body.dc-premium-shell-open.public-feed-open.feed-publications-open .feed-v2-pane-feed,
body.dc-premium-shell-open.public-feed-open.feed-publications-open .feed-v2-pane-feed > #feedPosts,
body.dc-premium-shell-open.public-feed-open.feed-publications-open .feed-v2-pane-chat,
body.dc-premium-shell-open.public-feed-open.feed-publications-open .feed-v2-pane-chat .feed-v2-chat-thread{
  background:transparent!important;
  background-color:transparent!important;
}

/* Feed V2 chat panel skin: feed-v2-shell.css + feed-v4-channel.css (Nova canvas must bleed through). */

html:has(body.dc-premium-shell-open.feed-v2-surface.feed-publications-open) .dc-safe-top-chrome,
html.dc-premium-shell-open:has(body.dc-premium-shell-open.feed-v2-surface.feed-publications-open) .dc-safe-top-chrome,
html:has(body.dc-premium-shell-open.public-feed-open.feed-publications-open) .dc-safe-top-chrome,
html.dc-premium-shell-open:has(body.dc-premium-shell-open.public-feed-open.feed-publications-open) .dc-safe-top-chrome{
  background:var(--dc-color-surface)!important;
}

body.dc-premium-shell-open:not(.guest-home-open):not(.auth-form-open):not(.public-feed-open)::before{
  content:none!important;
  display:none!important;
}

body.dc-premium-shell-open.guest-home-open,
html.dc-premium-shell-open:has(body.guest-home-open){
  background:transparent!important;
  background-color:transparent!important;
  background-image:none!important;
}

html.dc-premium-shell-open:has(body.guest-home-open)::before,
html.dc-premium-shell-open:has(body.guest-home-open)::after,
html:has(body.guest-home-open)::before,
html:has(body.guest-home-open)::after{
  content:none!important;
  display:none!important;
}

html:has(body.auth-form-open),
body.auth-form-open.dc-premium-shell-open{
  background-color:var(--dc-color-surface-auth)!important;
  background-image:none!important;
}

html.dc-premium-shell-open:has(body.auth-form-open)::before,
html.dc-premium-shell-open:has(body.auth-form-open)::after,
html:has(body.auth-form-open)::before,
html:has(body.auth-form-open)::after{
  content:none!important;
  display:none!important;
}

html.auth-form-open .dc-safe-top-chrome,
html.dc-premium-shell-open:has(body.auth-form-open) .dc-safe-top-chrome{
  background:var(--dc-color-surface-auth)!important;
}

body.auth-form-open.dc-premium-shell-open::before{
  content:""!important;
  display:block!important;
  position:fixed!important;
  inset:0!important;
  z-index:0!important;
  pointer-events:none!important;
  background-color:var(--dc-color-surface-auth)!important;
  background-image:
    linear-gradient(180deg,rgba(28,28,32,.74) 0%,rgba(20,20,24,.48) 26%,rgba(14,14,16,.22) 54%,transparent 76%),
    radial-gradient(circle at 88% 12%,rgba(255,255,255,.085),transparent 32%),
    url("guest-home-bg.svg?v=20260611_bg_left_dark_v1")!important;
  background-position:center!important;
  background-size:cover!important;
  background-repeat:no-repeat!important;
  transform:translateZ(0);
}

body.auth-form-open.dc-premium-shell-open::after{
  content:""!important;
  display:block!important;
  position:fixed!important;
  inset:0!important;
  z-index:0!important;
  pointer-events:none!important;
  background:
    radial-gradient(circle at 100% -4%,rgba(34,34,34,.68),transparent 46%),
    radial-gradient(circle at 8% 28%,rgba(34,34,38,.34),transparent 50%)!important;
}

body.auth-form-open.dc-premium-shell-open .wrap,
body.auth-form-open.dc-premium-shell-open .auth-scroll-pane{
  position:relative;
  z-index:1;
  background:transparent!important;
  background-color:transparent!important;
}

body.dc-premium-shell-open.comments-mode:not(.comments-admin-user-visual),
html.dc-premium-shell-open body.comments-mode:not(.comments-admin-user-visual),
html.dc-premium-shell-open.comments-mode body.comments-mode:not(.comments-admin-user-visual){
  background:transparent!important;
  background-color:transparent!important;
  background-image:none!important;
}

body.dc-premium-shell-open.comments-mode:not(.comments-admin-user-visual)::before{
  content:none!important;
  display:none!important;
}

@media (max-width:767px){
  html.dc-premium-shell-open.comments-mode,
  html.dc-premium-shell-open.comments-mode body.comments-mode:not(.comments-admin-user-visual),
  html.dc-comments-bottom-anchor body.dc-premium-shell-open.comments-mode:not(.comments-admin-user-visual),
  html.dc-comments-bottom-anchor body.dc-premium-shell-open.comments-mode.device-mobile:not(.comments-admin-user-visual),
  body.dc-premium-shell-open.comments-mode.device-mobile:not(.comments-admin-user-visual){
    background:transparent!important;
    background-color:transparent!important;
    background-image:none!important;
  }
}

/* ---- 4. PWA install iOS modal (ex project-shell) ------------------------ */
.pwa-ios-modal {
  position: fixed;
  inset: 0;
  z-index: 7000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}
.pwa-ios-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .72);
  backdrop-filter: blur(8px);
}
.pwa-ios-card {
  position: relative;
  z-index: 1;
  width: min(92vw, 390px);
  border-radius: 24px;
  padding: 22px;
  background: linear-gradient(180deg, #151515, #070707);
  border: 1px solid rgba(255, 138, 0, .28);
  box-shadow: 0 22px 70px rgba(0, 0, 0, .62);
  color: #fff;
}
.pwa-ios-card h2 { margin: 8px 0 10px; font-size: 22px; }
.pwa-ios-card p { margin: 0 0 10px; color: rgba(255, 255, 255, .78); }
.pwa-ios-card ol {
  margin: 10px 0 0;
  padding-left: 20px;
  color: rgba(255, 255, 255, .88);
  line-height: 1.55;
}
.pwa-ios-icon {
  display: block;
  width: 74px;
  height: 74px;
  object-fit: cover;
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .45);
}
.pwa-ios-close {
  position: absolute;
  right: 12px;
  top: 10px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .16);
  background: rgba(255, 255, 255, .08);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

/* DREAMCARS theme lock marker: 20260617_dc_theme_v1 */
