/* Shared Atlas language for destinations beyond the home page. */
:root {
  --atlas-deep: #10251e;
  --atlas-deep-2: #183a2f;
  --atlas-accent: #ceee91;
  --atlas-focus: #78a848;
}

body:is(.portal-v3,.feature-page,.chatpage-body,.pack-expedition,.lottery-v2,.view-v2,.admin-studio) {
  letter-spacing: 0;
}
body:is(.portal-v3,.feature-page,.chatpage-body,.pack-expedition,.lottery-v2,.view-v2,.admin-studio) :is(h1,h2,h3,h4,button,a,label,th) {
  letter-spacing: 0;
}
body:is(.portal-v3,.feature-page,.chatpage-body,.pack-expedition,.lottery-v2,.view-v2,.admin-studio) :is(a,button,input,select,textarea,summary):focus-visible {
  outline: 2px solid var(--atlas-focus);
  outline-offset: 3px;
}

/* Shared masthead and brand mark. */
body:is(.feature-page,.chatpage-body,.pack-expedition) .nav,
.portal-v3 .pnav {
  background: #10251ef0;
  border-bottom: 1px solid #d1e4bf26;
  box-shadow: none;
}
body:is(.feature-page,.chatpage-body,.pack-expedition) .nav .brand,
.portal-v3 .pnav .brand,
.lottery-v2 .top .brand,
.view-v2 .top .brand {
  color: #f4f2df;
  font-size: 20px;
  font-weight: 800;
  text-shadow: none;
}
body:is(.feature-page,.chatpage-body,.pack-expedition) .nav .brand span,
.portal-v3 .pnav .brand span,
.lottery-v2 .top .brand b,
.view-v2 .top .brand span { color: var(--atlas-accent); }
body:is(.feature-page,.chatpage-body,.pack-expedition) .nav-links a { color: #c5d2c3; font-size: 13px; }
body:is(.feature-page,.chatpage-body,.pack-expedition) .nav-links a:hover { color: #fffde9; }
body:is(.feature-page,.chatpage-body,.pack-expedition) .nav-account,
.portal-v3 :is(.pnav-back,.pnav-user,.pnav-logout),
.chatpage-body .cp-back {
  min-height: 38px;
  border: 1px solid #d4e5c339;
  border-radius: 2px;
  background: #ffffff08;
  box-shadow: none;
  color: #e3e8d9;
  text-shadow: none;
}
body:is(.feature-page,.chatpage-body,.pack-expedition) .brand-mark {
  border-radius: 0;
  background: var(--atlas-accent);
  box-shadow: 3px 3px 0 #739358;
  color: var(--atlas-deep);
}

/* Community pages use the same light content bands as the home page. */
html[data-theme="light"] body.portal-v3 {
  --mc-bedrock: #f5f6f3;
  --mc-deepslate: #edf1e9;
  --mc-stone: #fff;
  --mc-smooth-stone: #f4f7f1;
  --mc-line: #d5dcd7;
  --mc-line-strong: #b9cabe;
  --mc-ink: #20362c;
  --mc-ink-soft: #51665a;
  --mc-ink-faint: #687c6d;
  --mc-emerald: #537c3c;
  --bg: #f5f6f3;
  --bg-2: #edf1e9;
  --ink: #20362c;
  --ink-soft: #51665a;
  --ink-faint: #687c6d;
  --pink: #477443;
  --cyan: #38746b;
  --sun: #9a6729;
  --violet: #637e5a;
  --line: #d5dcd7;
  --line-2: #b9cabe;
  --panel: #fff;
  --mcc-bg: #f5f6f3;
  --mcc-panel: #fff;
  --mcc-panel-2: #f5f8f3;
  --mcc-slot: #f4f7f1;
  --mcc-line: #d5dcd7;
  --mcc-ink: #20362c;
  --mcc-ink-soft: #51665a;
  --mcc-ink-faint: #687c6d;
  --mcc-lime: #537c3c;
  --mcc-lime-hi: #456d36;
  --mcc-lime-deep: #70944e;
  --mcc-gold: #8d6428;
  --mcc-gold-hi: #79531e;
  color-scheme: light;
  background: #f5f6f3;
  color: #20362c;
}
html[data-theme="light"] body.portal-v3::before { background: #f5f6f3; }
html[data-theme="light"] body.portal-v3::after { display: none; }
.portal-v3 .phero {
  max-width: 1200px;
  margin: 0 auto;
  padding: 70px 28px 35px;
  text-align: left;
}
.portal-v3 .phero-kicker { margin-bottom: 8px; padding: 0; border: 0; border-radius: 0; font-size: 11px; text-shadow: none; }
.portal-v3 .phero-kicker::before { width: 7px; height: 7px; background: var(--atlas-focus); filter: none; }
.portal-v3 .phero-title { font-size: 58px; line-height: 1.2; font-weight: 800; text-shadow: none; }
.portal-v3 .phero-title em { color: var(--mcc-lime); background: none; -webkit-text-fill-color: currentColor; text-shadow: none; }
.portal-v3 .phero-desc { margin: 12px 0 0; font-size: 14px; line-height: 1.8; }
html[data-theme="light"] body.portal-v3 .phero-title { color: #20362c; }
html[data-theme="light"] body.portal-v3 .phero-desc { color: #51665a; }
html[data-theme="light"] body.portal-v3 .phero-kicker { color: #537c3c; }
.portal-v3 .pwrap { max-width: 1200px; padding: 0 28px 90px; }
.portal-v3 .sec-head { margin-top: 38px; padding-bottom: 13px; border-bottom: 1px solid var(--mcc-line); }
.portal-v3 .sec-head h2 { font-size: 20px; text-shadow: none; }
.portal-v3 .sec-head .line { display: none; }
.portal-v3 .empty { padding-block: 36px; }
.portal-v3 :is(.card,.poll,.form-card,.poll-nav-panel,.pmodal-card,.share-item,.post-detail) {
  border: 1px solid var(--mcc-line);
  border-radius: 3px;
  background: var(--mcc-panel);
  box-shadow: none;
}
.portal-v3 :is(.field input,.field textarea,.field select,.entry-input,.comment-input,.opt,.img-up-drop) {
  border: 1px solid var(--mcc-line);
  border-radius: 2px;
  background: var(--mcc-slot);
  box-shadow: none;
  color: var(--mcc-ink);
}
.portal-v3 :is(.field input,.field textarea,.field select,.entry-input,.comment-input)::placeholder { color: var(--mcc-ink-faint); }
.portal-v3 :is(.btn,.sec-cta,.pnav-login) {
  border: 1px solid #6b8d4f;
  border-radius: 2px;
  background: #ceee91;
  box-shadow: 0 3px 0 #6b8d4f;
  color: #193328;
  text-shadow: none;
  font-weight: 700;
}
.portal-v3 :is(.btn.ghost,.share-btn,.like-btn,.poll-share-trigger) {
  border: 1px solid var(--mcc-line);
  border-radius: 2px;
  background: var(--mcc-panel);
  box-shadow: none;
  color: var(--mcc-ink);
  text-shadow: none;
}
.portal-v3 .opt:hover:not(.disabled) { background: var(--mcc-slot); }
.portal-v3 :is(.poll-tab.active,.gallery-filters button.is-active) { color: var(--mcc-ink); }
.portal-v3 :is(.poll-tag,.badge,.tag,.share-btn,.like-btn) { border-radius: 2px; }
.portal-v3 .pfoot { background: var(--mcc-panel-2); }
.portal-v3 .ptoast { border-radius: 3px; background: var(--atlas-deep); color: #f4f2df; }
html[data-theme="dark"] body.portal-v3 :is(.phero-title,.phero-title em,.sec-head h2) { text-shadow: none; }

/* Gallery, streams and sponsor flows retain their content and media layouts. */
html[data-theme="light"] body.feature-page {
  --bg: #f5f6f3;
  --ink: #20362c;
  --ink-soft: #51665a;
  --ink-faint: #687c6d;
  --text-primary: #20362c;
  --text-secondary: #51665a;
  --text-tertiary: #687c6d;
  --bg-bedrock: #f5f6f3;
  --bg-deepslate: #f0f4ed;
  --bg-smooth-stone: #fff;
  --border-subtle: #d5dcd7;
  --border-strong: #9eb69e;
  --accent-emerald: #537c3c;
  --accent-diamond: #38746b;
  --mcc-bg: #f5f6f3;
  --mcc-panel: #fff;
  --mcc-panel-2: #f5f8f3;
  --mcc-slot: #f4f7f1;
  --mcc-line: #d5dcd7;
  --mcc-ink: #20362c;
  --mcc-ink-soft: #51665a;
  --mcc-lime: #537c3c;
  --mcc-lime-hi: #456d36;
  --mcc-gold: #8d6428;
  --mcc-gold-hi: #79531e;
  --surface-0: #f5f6f3;
  --surface-1: #fff;
  --surface-2: #f4f7f1;
  --surface-3: #e9efe5;
  --surface-4: #dce7da;
  --text-1: #20362c;
  --text-2: #51665a;
  --text-3: #687c6d;
  --text-4: #687c6d;
  color-scheme: light;
  background: #f5f6f3;
  color: #20362c;
}
html[data-theme="light"] body.feature-page::before { background: #f5f6f3; }
.feature-page .feature-main { max-width: none; }
.feature-page .feature-intro { max-width: 1280px; padding: 78px 28px 36px; border-bottom: 1px solid var(--mcc-line,#d5dcd7); box-shadow: none; }
.feature-page .feature-intro::before { display: none; }
.feature-page .feature-kicker { color: var(--mcc-lime); font-size: 11px; text-shadow: none; }
.feature-page .feature-kicker::before { width: 7px; height: 7px; background: var(--atlas-focus); filter: none; }
.feature-page .feature-title { max-width: none; margin-top: 8px; font-size: 58px; line-height: 1.2; color: var(--text-primary); text-shadow: none; }
.feature-page .feature-title em { color: var(--mcc-lime); text-shadow: none; }
.feature-page .feature-title,
.feature-page .feature-title em,
.sponsor-page .feature-title,
.sponsor-page .feature-title em {
  text-shadow: none;
  background: none;
  -webkit-text-fill-color: currentColor;
  letter-spacing: 0;
}
.sponsor-page .feature-title { color: var(--text-primary); line-height: 1.2; }
.sponsor-page .feature-title em { color: var(--mcc-lime); }
.feature-page .feature-desc { max-width: 62ch; margin-top: 12px; font-size: 14px; line-height: 1.8; }
html[data-theme="light"] body.feature-page .nav-links a { color: #c5d2c3; }
html[data-theme="light"] body.feature-page .nav-links a:hover,
html[data-theme="light"] body.feature-page .nav-links a.is-current { color: #fffde9; }
html[data-theme="light"] body.feature-page .nav-account .na-label { color: #e3e8d9; }
html[data-theme="light"] body.feature-page .nav-account .na-avatar { color: #ceee91; background: #c7e59d17; }
html[data-theme="light"] body.feature-page .feature-title { color: #20362c; }
html[data-theme="light"] body.feature-page .feature-desc { color: #51665a; }
html[data-theme="light"] body.feature-page .feature-kicker { color: #537c3c; }
.feature-page .feature-content { max-width: 1280px; margin: 0 auto; padding: 35px 28px 90px; }
.feature-page :is(.gallery,.streams) { max-width: none; }
.feature-page :is(.gallery-head,.sponsor-section-head) h2 { color: var(--text-primary); }
.feature-page :is(.sponsor-panel,.sponsor-checkout,.sponsor-leaderboard,.order-card,.order-notice,.orders-list-shell,.sponsor-modal-card,.payment-checkout-card) {
  border: 1px solid var(--mcc-line);
  border-radius: 3px;
  background: var(--mcc-panel);
  box-shadow: none;
}
.feature-page .gallery-card { border: 1px solid var(--mcc-line); border-radius: 3px; box-shadow: none; }
.feature-page .gallery-card:hover { box-shadow: 0 6px 20px #19332818; }
.feature-page .gallery-filters button.is-active { border: 1px solid var(--mcc-line); background: var(--mcc-panel); color: var(--mcc-ink); box-shadow: none; }
.feature-page .gallery-search input,
.feature-page :is(.sponsor-amount,.sponsor-tier,.sponsor-stat) { border: 1px solid var(--mcc-line); border-radius: 2px; background: var(--mcc-slot); box-shadow: none; color: var(--mcc-ink); }
.feature-page :is(.feature-action.primary,.gallery-submit,.sponsor-button) {
  border: 1px solid #6b8d4f;
  border-radius: 2px;
  background: #ceee91;
  color: #193328;
  box-shadow: 0 3px 0 #6b8d4f;
  text-shadow: none;
}
.feature-page :is(.feature-action:not(.primary),.gallery-refresh,.icon-btn) { border: 1px solid var(--mcc-line); border-radius: 2px; background: var(--mcc-panel); color: var(--mcc-ink); box-shadow: none; text-shadow: none; }
html[data-theme="light"] .feature-page .footer { border-top: 1px solid #d5dcd7; background: #e9eddd; color: #51665a; }

/* Tool and game surfaces echo the dark status band on the home page. */
body:is(.chatpage-body,.lottery-v2,.view-v2) { --mcc-bg: #142a21; --mcc-panel: #203a2f; --mcc-panel-2: #1a3329; --mcc-slot: #152b22; --mcc-line: #395344; --mcc-ink: #eef3e2; --mcc-ink-soft: #becdb5; }
body:is(.chatpage-body,.lottery-v2,.view-v2)::before { background: #142a21; }
.chatpage-body :is(.cp-side,.cp-main,.cp-context,.cp-gate-card),
.lottery-v2 :is(.stage,.side-card,.case-dialog) { border: 1px solid #46614d; border-radius: 3px; background: #203a2f; box-shadow: none; }
.chatpage-body .cp-back { box-shadow: none; }
.chatpage-body .cp-side-head,
.chatpage-body .cp-context-head,
.chatpage-body .cp-main-head { border-bottom: 1px solid #46614d; box-shadow: none; text-shadow: none; }
.chatpage-body .cp-ch.on { border: 1px solid #739358; border-radius: 2px; background: #2b4834; box-shadow: inset 3px 0 #ceee91; color: #e7f2d4; }
.chatpage-body .cp-ch:hover { border-color: #527459; background: #294436; }
.chatpage-body .cmsg-text { border: 1px solid #46614d; background: #1a3329; box-shadow: none; }
.chatpage-body .cmsg.mine .cmsg-text { background: #2b4834; box-shadow: none; }
.chatpage-body .chat-foot { border-top: 1px solid #46614d; background: #1a3329; }
.chatpage-body .chat-foot input { border: 1px solid #527459; background: #142a21; box-shadow: none; }
.chatpage-body .chat-foot > button { border: 1px solid #6b8d4f; background: #ceee91; box-shadow: 0 3px #6b8d4f; }
.lottery-v2 .top { border-bottom: 1px solid #46614d; box-shadow: none; }
.lottery-v2 .top a[href="index.html#community"], .lottery-v2 .lottery-account { border: 1px solid #46614d; border-radius: 2px; background: #203a2f; box-shadow: none; }
.lottery-v2 .brand { letter-spacing: 0; }
.view-v2 .wrap { max-width: 1120px; }
.view-v2 :is(.vital,.attr,.slot) { border-radius: 3px; }

/* World detail pages retain full color photography, with the home page's field-kit rhythm. */
.pack-expedition .pk-hero { min-height: min(720px,78svh); }
.pack-expedition .pk-title { text-shadow: 0 3px 24px #10251e88; }
.pack-expedition .pk-title em:not(.pk-version) { text-shadow: none; }
.pack-expedition .pk-btn-primary { border-radius: 2px; background: #ceee91; color: #193328; box-shadow: 0 3px #6b8d4f; text-shadow: none; }
.pack-expedition .pk-card, .pack-expedition .pk-feat { border-radius: 3px; }

/* Admin pages keep their compact information architecture. */
body.admin-studio { --studio-nav: #10251e; }
body.admin-studio :is(.panel,.workspace-tabs,.modal-box,.page-context,.studio-page-mark) { border-radius: 3px; }
body.admin-studio :is(button,input,select,textarea) { letter-spacing: 0; }
body.admin-studio :is(input,select,textarea) { border-radius: 3px; }
body.admin-studio .studio-page-topbar { background: #10251e; }
body.admin-studio .studio-page-mark { background: #ceee91; color: #193328; border-color: #b5d986; box-shadow: 3px 3px #739358; }
body.admin-studio .studio-page-nav a { border-radius: 2px; }
body.admin-studio .studio-page-nav a[aria-current=page] { background: #ceee91; color: #193328; }

/* Authentication remains a compact tool, with the same field-kit edges. */
body:has(.identity-main) { background: #102019; }
.identity-main > header { border-bottom: 1px solid #395344; padding-bottom: 20px; }
.identity-main .eyebrow { color: #ceee91; letter-spacing: 0; }
.identity-main h1 { color: #f4f2df; font-weight: 800; letter-spacing: 0; }
.identity-main :is(.panel,.binding-card,.connection-card,.prelogin-connection,.replace-confirm,.connection-notice) {
  border-radius: 3px;
  box-shadow: none;
}
.identity-main :is(button,input,select,.login-link,.badge,.saved-identity) { border-radius: 2px; letter-spacing: 0; }
.identity-main button:not(.secondary):not(.text-button),
.identity-main .login-link { box-shadow: 0 3px 0 #6b8d4f; }
.identity-main :is(button,input,select,a,summary):focus-visible { outline: 2px solid #ceee91; outline-offset: 3px; }

@media (max-width: 700px) {
  .portal-v3 .phero { padding: 40px 18px 25px; }
  .portal-v3 .pwrap { padding: 0 18px 68px; }
  .feature-page .feature-intro { padding: 48px 18px 28px; }
  .feature-page .feature-content { padding: 30px 18px 68px; }
  .feature-page .feature-title, .portal-v3 .phero-title { font-size: 36px; }
  .sponsor-page .feature-intro { padding: 108px 18px 30px; gap: 22px; }
  .sponsor-page .feature-title { font-size: 36px; }
  .sponsor-page .feature-kicker { letter-spacing: 0; }
  .sponsor-page .sponsor-leaderboard { order: 0; }
  .sponsor-page .sponsor-section-head { display: block; padding-top: 1px; }
  .sponsor-page .sponsor-section-head h2 { max-width: 100%; }
  .sponsor-page .sponsor-live { position: absolute; top: 0; right: 0; }
  .portal-v3 .phero-desc { display: block; }
  .feature-page .nav-toggle { color: #e3e8d9; }
  .feature-page .nav-toggle span { background: #e3e8d9; }
  .feature-page .nav-actions { flex-wrap: wrap; }
  .feature-page .sponsor-breadcrumb { display: none; }
  .lottery-v2 .top .brand, .view-v2 .top .brand { font-size: 17px; }
}
@media (max-width: 380px) {
  .portal-v3 .phero, .feature-page .feature-intro { padding-inline: 14px; }
  .portal-v3 .pwrap, .feature-page .feature-content { padding-inline: 14px; }
  .portal-v3 .phero-title, .feature-page .feature-title { font-size: 31px; overflow-wrap: anywhere; }
}
