/* Additive theme layer. The original dark artwork and CSS remain the baseline. */
html[data-ciern-theme="dark"] { color-scheme: dark; }
html[data-ciern-theme="light"] { color-scheme: light; }
body.CiernOGCV6 .CiernThemeToggle {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  flex: 0 0 auto; min-width: 92px; min-height: 44px; padding: 5px 8px;
  border: 1px solid #8c6735; border-radius: 24px; background: #15191d;
  color: #eddfbc; cursor: pointer; box-shadow: none;
}
body.CiernOGCV6 .CiernThemeToggle[hidden] { display: none; }
body.CiernOGCV6 .CiernThemeToggle svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; }
body.CiernOGCV6 .CiernThemeTrack { display: block; width: 30px; height: 18px; padding: 2px; box-sizing: border-box; border-radius: 20px; background: #625742; }
body.CiernOGCV6 .CiernThemeTrack span { display: block; width: 14px; height: 14px; border-radius: 50%; background: #f4e5c3; transform: translateX(12px); transition: transform .15s ease; }
body.CiernOGCV6 .CiernThemeToggle:focus-visible { outline: 3px solid #36b8c7; outline-offset: 3px; }
html[data-ciern-theme="light"] .CiernThemeTrack span { transform: translateX(0); }
html[data-ciern-theme="light"] body.CiernOGCV6 .CiernThemeToggle { background: #fffaf0; color: #715021; }
@media (prefers-reduced-motion: reduce) { body.CiernOGCV6 .CiernThemeTrack span { transition: none; } }
/* A separate row on phones keeps menu, logo, music and account controls usable. */
@media (max-width: 600px) {
  body.CiernOGCV6 .CiernOGCHeader { grid-template-areas: "tog brand brand" "act act act" "dev dev dev"; }
  body.CiernOGCV6 .CiernHeaderActions { justify-self: center; flex-wrap: wrap; justify-content: center; }
  body.CiernOGCV6 .CiernHeaderBrand { justify-self: end; }
}
html[data-ciern-theme="light"] {
  --nb-bg: #eee9df; --nb-panel: #fffdf7; --nb-panel-2: #f3eee3;
  --nb-bone: #302e28; --nb-bone-dim: #60594c; --nb-brass: #907044;
  --nb-amber: #815013; --nb-amber-hi: #885215; --nb-teal: #176872;
  --nb-line: #ddd2bf; --nb-line-brass: #c3ab85; --nb-tex: none;
  --v3-bg: #eee9df; --v3-bg-deep: #eee9df; --v3-surface: #fffdf7;
  --v3-surface-2: #f3eee3; --v3-surface-3: #e9e0d0; --v3-panel: #fffdf7;
  --v3-text: #302e28; --v3-muted: #60594c; --v3-subtle: #6d6354;
  --v3-gold: #815013; --v3-gold-hi: #885215; --v3-cyan: #176872;
  --v3-line: #c3ab85; --v3-line-soft: #ddd2bf;
}
html[data-ciern-theme="light"] body.CiernOGCV6,
html[data-ciern-theme="light"] body.CiernOGCV6 #ArtworkHelper { background: #eee9df !important; color: #302e28 !important; }
html[data-ciern-theme="light"] body.CiernOGCV6::before,
html[data-ciern-theme="light"] body.CiernOGCV6::after { background: none !important; }
html[data-ciern-theme="light"] body.CiernOGCV6 :is(.CiernOGCHeader,.CiernMenuBar,.CiernMenuDrop,.CiernLangMenu,.CiernNavPanel,.CiernQuickPanel,#ciern-boosted,.CiernNewsCard),
html[data-ciern-theme="light"] body.CiernOGCV6 #ContentColumn :is(.Box,.BoxContent,.InnerBoxContent,.TableContentContainer,.TableContent,.InnerTableContainer,.CiernLibBody,.CiernWikiBody) {
  background: #fffdf7 !important; color: #302e28 !important; border-color: #c3ab85 !important; text-shadow: none !important;
}
html[data-ciern-theme="light"] body.CiernOGCV6 #ContentColumn :is(h1,h2,h3,h4,p,li,td,th,label,.Text,.CiernNewsTitle,.CiernNewsExcerpt,.CiernNewsBody,.CiernHasInline) { color: #302e28 !important; text-shadow: none !important; }
html[data-ciern-theme="light"] body.CiernOGCV6 #ContentColumn :is(table,tr,td,th,.CaptionContainer,.CaptionInnerContainer) { background-color: #fffdf7 !important; border-color: #ddd2bf !important; }
html[data-ciern-theme="light"] body.CiernOGCV6 #ContentColumn :is(th,tr:nth-child(even) td,.CaptionContainer,.CaptionInnerContainer) { background: #f0e7d7 !important; }
html[data-ciern-theme="light"] body.CiernOGCV6 #ContentColumn a:not(.CiernBtnNB):not(.CiernReleaseDownload) { color: #805014 !important; }
html[data-ciern-theme="light"] body.CiernOGCV6 :is(input:not([type="submit"]):not([type="button"]),select,textarea) { color: #302e28 !important; background-color: #fffdf7 !important; border-color: #a99270 !important; }
html[data-ciern-theme="light"] body.CiernOGCV6 :is(input,textarea)::placeholder { color: #70675b !important; }
html[data-ciern-theme="light"] body.CiernOGCV6 :is(.CiernMenuTop,.CiernMenuDrop a,.CiernLangItem,.CiernShopUnavailable) { color: #403729 !important; text-shadow: none !important; }
html[data-ciern-theme="light"] body.CiernOGCV6 :is(.CiernMenuDrop a:hover,.CiernLangItem:hover) { background-color: #f0e7d7 !important; }
/* Dark illustrated plates retain light type; artwork is never inverted. */
html[data-ciern-theme="light"] body.CiernOGCV6 :is(.CiernHeaderAction,.CiernLangBtn,.CiernBtnNB,.CiernPortalTab,.CiernQuickCard,.CiernNavToggle,.CiernStatusBar,.CiernPanelTitle) {
  --nb-bone: #f4e9d0; --nb-bone-dim: #d5c8ae; --nb-amber-hi: #f0ba6c; --nb-teal: #6fd3df; color: #f4e9d0 !important;
}
html[data-ciern-theme="light"] body.CiernOGCV6 #CiernHeroBrand {
  --nb-bg: #eee9df; --nb-bone: #fff3d6; --nb-bone-dim: #e5d6bc; --nb-amber-hi: #f4c77c;
  background-color: #eee9df !important;
  background-image: linear-gradient(180deg,rgba(239,226,198,.08),rgba(9,11,13,.10) 55%,rgba(9,11,13,.65)),url("images/ciern-web/hero.webp") !important;
  background-size: cover !important; background-position: center 42% !important;
}
html[data-ciern-theme="light"] body.CiernOGCV6 #ciern-boosted :is(.cb__head,.cb__foot,.cb__card,.cb__bonus) { background: #f3eee3 !important; color: #403729 !important; border-color: #d6c6ac !important; }
/* Override legacy global button rules. */
body.CiernOGCV6 #CiernThemeToggle { border: 1px solid #8c6735 !important; border-radius: 24px !important; background: #15191d !important; color: #eddfbc !important; }
html[data-ciern-theme="light"] body.CiernOGCV6 #CiernThemeToggle { background: #fffaf0 !important; color: #715021 !important; }
html[data-ciern-theme="light"] body.CiernOGCV6 .CiernHeaderStatus :is(strong,small) { color: #514735 !important; }
html[data-ciern-theme="light"] body.CiernOGCV6 #ContentColumn :is(input[type="text"],input[type="password"],input[type="email"],input[type="number"],input[type="search"],select,textarea):not(.BigButtonText):not(.MediumButtonText) { background: #fffdf7 !important; color: #302e28 !important; border-color: #a99270 !important; }
html[data-ciern-theme="light"] body.CiernOGCV6 #ContentColumn :is(.BigButtonText,.MediumButtonText,input[type="submit"]) { color: #f4e9d0 !important; background: transparent !important; }
html[data-ciern-theme="light"] body.CiernOGCV6 #ContentColumn .CaptionContainer { border-image: none !important; background: #f0e7d7 !important; }
html[data-ciern-theme="light"] body.CiernOGCV6 #ContentColumn :is(strong,b,em,code) { color: #51402b !important; text-shadow: none !important; }
html[data-ciern-theme="light"] body.CiernOGCV6 :is(.ciern-stat-label,.ciern-stat-value) { color: #f4d394 !important; text-shadow: 0 1px 2px #000; }
html[data-ciern-theme="light"] body.CiernOGCV6 .CiernMenuBar { box-shadow: 0 3px 10px #a99b8030 !important; }
html[data-ciern-theme="light"] body.CiernOGCV6 #ContentColumn input:not([type="submit"]):not([type="button"]):not([type="image"]):not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not(.BigButtonText) { background: #fffdf7 !important; color: #302e28 !important; }
html[data-ciern-theme="light"] body.CiernOGCV6 #ContentColumn .TableContainer .CaptionContainer .CaptionInnerContainer { border-image: none !important; background: #f0e7d7 !important; }
html[data-ciern-theme="light"] body.CiernOGCV6 #ContentColumn :is(.CiernWikiSystem,.CiernWikiSystemBody,.CiernWikiStep,.CiernWikiGuide,.CiernWikiGuide li,.CiernWikiTableWrap,.CiernWikiFooter,.CiernWikiLead,.CiernCraftDemo,.ccd__look,.ccd__how,.ccd__note,.CiernLibItem,.CiernLibHead,.CiernLibFilters,.CiernLibTableWrap,.CiernSetCard,.CiernImbuCard,.CiernHuntPanel,.CiernHuntFilters,.CiernHuntList,.CiernHuntRow,.CiernMapToolbar) { background: #fffdf7 !important; color: #302e28 !important; border-color: #d6c6ac !important; }
html[data-ciern-theme="light"] body.CiernOGCV6 #ContentColumn :is(.CiernWikiSystem,.CiernLibItem,.CiernSetCard,.CiernImbuCard) > summary { background: #f3eee3 !important; color: #302e28 !important; }
html[data-ciern-theme="light"] body.CiernOGCV6 #ContentColumn .CiernWikiSummaryCopy :is(strong,small,span) { color: #51402b !important; }
html[data-ciern-theme="light"] body.CiernOGCV6 #ContentColumn #Footer { background: transparent !important; }
html[data-ciern-theme="light"] body.CiernOGCV6 #ContentColumn .CiernSpriteList > li { background: #f3eee3 !important; color: #302e28 !important; }
html[data-ciern-theme="light"] body.CiernOGCV6 #ContentColumn .CiernSpriteList > li :is(span,b,strong) { color: #51402b !important; }
html[data-ciern-theme="light"] body.CiernOGCV6 #ContentColumn .CiernWikiIntro { background: #f3eee3 !important; color: #302e28 !important; }
@media (min-width: 961px) and (max-width: 1240px) {
 body.CiernOGCV6 .CiernOGCHeader { display: grid !important; grid-template-columns: auto auto minmax(0,1fr) !important; grid-template-areas: "brand status act" "dev dev dev"; column-gap: 8px; row-gap: 4px; }
 body.CiernOGCV6 .CiernHeaderBrand { grid-area: brand; }
 body.CiernOGCV6 .CiernHeaderStatus { grid-area: status; }
 body.CiernOGCV6 .CiernHeaderActions { grid-area: act; justify-self: end; gap: 4px; }
 body.CiernOGCV6 .CiernHeaderDev { grid-area: dev; justify-self: center; }
}
html[data-ciern-theme="light"] body.CiernOGCV6 .CiernNavDialog { background: #fffdf7 !important; color: #302e28 !important; }
html[data-ciern-theme="light"] body.CiernOGCV6 .CiernNavDialog :is(a,strong,span,p,h2) { color: #51402b !important; text-shadow: none !important; }
html[data-ciern-theme="light"] body.CiernOGCV6 .CiernNavDialog :is(section,.CiernNavIntro,.CiernNavFooter) { background: #fffdf7 !important; }
/* V2: coherent ivory and antique-gold surfaces across the first screen. */
body.CiernOGCV6 .CiernBrowserPlay { display:inline-flex; align-items:center; justify-content:center; gap:9px; padding:13px 20px; min-height:46px; box-sizing:border-box; border-radius:8px; border:1px solid #b88539; background:#c79848; color:#201b13 !important; font-weight:800; font-size:15px; text-decoration:none !important; box-shadow:0 4px 12px #291b1420; }
body.CiernOGCV6 .CiernBrowserPlay:focus-visible { outline:3px solid #176872; outline-offset:3px; }
body.CiernOGCV6 .CiernBrowserPlay:hover { background:#d8ad62; }
body.CiernOGCV6 .CiernBrowserPlayHeader { font-size:12px; padding:9px 12px; }
html[data-ciern-theme="light"] body.CiernOGCV6 #CiernOGCHeader { background:#fffdf7 !important; box-shadow:0 2px 12px #8b79531a !important; border-bottom:1px solid #dfd3bd !important; }
html[data-ciern-theme="light"] body.CiernOGCV6 :is(.CiernHeaderAction,.CiernLangBtn,.CiernNavToggle) { border-image:none !important; border:1px solid #cbbb9e !important; border-radius:8px !important; background:#faf6ec !important; color:#51412c !important; text-shadow:none !important; padding:10px 14px !important; min-height:44px !important; height:auto !important; box-shadow:none !important; }
html[data-ciern-theme="light"] body.CiernOGCV6 .CiernHeaderAction.CiernHeaderAccount { background:#b8893e !important; border-color:#a47531 !important; color:#fffdf7 !important; }
html[data-ciern-theme="light"] body.CiernOGCV6 .CiernNavToggleIcon i { background:#685435 !important; }
html[data-ciern-theme="light"] body.CiernOGCV6 .ciern-private-dev-banner.CiernHeaderDev { border-image:none !important; border:1px solid #d8cbb3 !important; border-radius:30px !important; background:#f1eadc !important; color:#736042 !important; min-height:28px !important; height:auto !important; padding:7px 13px !important; text-shadow:none !important; font-size:10px !important; letter-spacing:.06em !important; box-shadow:none !important; }
html[data-ciern-theme="light"] body.CiernOGCV6 #CiernHeroBrand {
 background-color:#f5efdf !important;
 background-image:linear-gradient(90deg,#f7f2e7 0%,#f7f2e7f5 38%,#f7f2e7ad 66%,#f7f2e755 100%),linear-gradient(0deg,#f7f2e7e6,transparent 70%),url("images/ciern-web/hero.webp") !important;
 background-position:center,center,right center !important; background-size:cover,cover,cover !important;
 border:1px solid #dccdaf !important; border-radius:14px !important; text-align:left !important; padding:38px 42px 28px !important; box-shadow:0 12px 35px #725f3812 !important;
 color:#40392b !important; --nb-bone:#40392b; --nb-bone-dim:#685c47; --nb-amber-hi:#83591d;
}
html[data-ciern-theme="light"] body.CiernOGCV6 #CiernHeroBrand .CiernHeroLogo { content:url("images/ciern-web/wordmark-2x.webp"); width:min(410px,75vw) !important; max-height:110px !important; object-fit:contain; object-position:left; filter:none !important; margin:0 !important; }
html[data-ciern-theme="light"] body.CiernOGCV6 #CiernHeroBrand :is(.CiernHeroLogoWrap,.CiernHeroLogoWrap img) { animation:none !important; filter:none !important; }
html[data-ciern-theme="light"] body.CiernOGCV6 #CiernHeroBrand :is(.CiernHeroLogoGlow,.CiernHeroLogoShine,.CiernHeroCorner,.CiernSepNB) { display:none !important; }
html[data-ciern-theme="light"] body.CiernOGCV6 #CiernHeroBrand :is(p,strong,b,em,.CiernHeroCredit,.CiernHeroStats span) { color:#51412c !important; text-shadow:none !important; }
html[data-ciern-theme="light"] body.CiernOGCV6 #CiernHeroBrand p { max-width:520px; font-size:20px !important; line-height:1.5 !important; margin:16px 0 20px !important; }
html[data-ciern-theme="light"] body.CiernOGCV6 #CiernHeroBrand .CiernHeroCredit { text-align:left !important; margin:5px 0 0 !important; }
html[data-ciern-theme="light"] body.CiernOGCV6 #CiernHeroBrand .CiernHeroCta { display:flex !important; justify-content:flex-start !important; flex-wrap:wrap; gap:12px; margin:24px 0 !important; }
html[data-ciern-theme="light"] body.CiernOGCV6 #CiernHeroBrand .CiernHeroCta .CiernBtnNB { border-image:none !important; border:1px solid #bcaa8b !important; border-radius:8px !important; background:#fffdf6 !important; color:#59462a !important; text-shadow:none !important; min-height:48px !important; padding:12px 20px !important; font-size:14px !important; }
html[data-ciern-theme="light"] body.CiernOGCV6 #CiernHeroBrand .CiernHeroStats { display:flex !important; flex-wrap:wrap !important; justify-content:flex-start !important; text-align:left !important; gap:8px 18px !important; max-width:700px; margin:12px 0 0 !important; }
html[data-ciern-theme="light"] body.CiernOGCV6 .CiernPortalTabs { gap:10px !important; margin-top:14px !important; }
html[data-ciern-theme="light"] body.CiernOGCV6 .CiernPortalTabs .CiernPortalTab { border-image:none !important; border:1px solid #d5c5a7 !important; border-radius:9px !important; background:#fffdf7 !important; box-shadow:0 3px 8px #7665450a !important; padding:13px 12px !important; color:#51412c !important; text-shadow:none !important; }
html[data-ciern-theme="light"] body.CiernOGCV6 .CiernPortalTabs .CiernPortalTab :is(strong,small) { color:#51412c !important; text-shadow:none !important; }
html[data-ciern-theme="light"] body.CiernOGCV6 .CiernPortalTabs .CiernPortalTab:hover { background:#eee3cd !important; }
html[data-ciern-theme="light"] body.CiernOGCV6 :is(.ciern-stats-bar,.ciern-stats,.CiernStatsBar) { background:#f5efdf !important; border-image:none !important; border:1px solid #d5c5a7 !important; border-radius:10px !important; box-shadow:none !important; }
html[data-ciern-theme="light"] body.CiernOGCV6 :is(.ciern-stat-label,.ciern-stat-value) { color:#6b512b !important; text-shadow:none !important; }
@media(max-width:1240px) { body.CiernOGCV6 .CiernBrowserPlayHeader { display:none; } }
@media(max-width:600px) {
 html[data-ciern-theme="light"] body.CiernOGCV6 #CiernHeroBrand { padding:26px 20px !important; background-image:linear-gradient(90deg,#f7f2e7ee,#f7f2e7c9),url("images/ciern-web/hero.webp") !important; }
 html[data-ciern-theme="light"] body.CiernOGCV6 #CiernHeroBrand p { font-size:18px !important; }
 html[data-ciern-theme="light"] body.CiernOGCV6 #CiernHeroBrand .CiernHeroCta > a { width:100% !important; }
 html[data-ciern-theme="light"] body.CiernOGCV6 #CiernHeroBrand .CiernHeroStats { display:grid !important; grid-template-columns:1fr 1fr !important; font-size:12px !important; }
 html[data-ciern-theme="light"] body.CiernOGCV6 :is(.CiernHeaderAction,.CiernLangBtn,.CiernNavToggle) { padding:8px 10px !important; }
}
body.CiernOGCV6 #CiernHeroBrand .CiernHeroCta a.CiernBrowserPlay { min-height:48px !important; height:auto !important; padding:12px 20px !important; background:#c99a4a !important; background-image:none !important; border:1px solid #aa7a2e !important; border-radius:8px !important; color:#241e13 !important; text-shadow:none !important; font-size:15px !important; }
html[data-ciern-theme="light"] body.CiernOGCV6 #CiernHeroBrand { display:block !important; }
html[data-ciern-theme="light"] body.CiernOGCV6 #CiernHeroBrand > a { margin:0 !important; }
html[data-ciern-theme="light"] body.CiernOGCV6 #CiernHeroBrand .CiernHeroCta { align-items:center !important; width:auto !important; }
html[data-ciern-theme="light"] body.CiernOGCV6 .ciern-topbar-stats { background:#f7f1e5 !important; background-image:none !important; border-image:none !important; border:1px solid #d5c5a7 !important; border-radius:10px !important; box-shadow:none !important; }
html[data-ciern-theme="light"] body.CiernOGCV6 .ciern-topbar-stats::before,html[data-ciern-theme="light"] body.CiernOGCV6 .ciern-topbar-stats::after { display:none !important; }
html[data-ciern-theme="light"] body.CiernOGCV6 .CiernQuickPanel .CiernQuickCard { border-image:none !important; border:1px solid #dfd3bd !important; border-radius:8px !important; background:#f7f1e5 !important; color:#51412c !important; text-shadow:none !important; }
html[data-ciern-theme="light"] body.CiernOGCV6 .CiernQuickPanel .CiernQuickCard :is(strong,small) { color:#51412c !important; text-shadow:none !important; }
html[data-ciern-theme="light"] body.CiernOGCV6 .ciern-topbar { border-image:none !important; border:0 !important; background:transparent !important; padding:0 !important; box-shadow:none !important; }
html[data-ciern-theme="light"] body.CiernOGCV6 .ciern-topbar::before,html[data-ciern-theme="light"] body.CiernOGCV6 .ciern-topbar::after { display:none !important; }

/* Keep the main play button; avoid crowding the desktop header. */
@media (max-width:1500px){body.CiernOGCV6 .CiernBrowserPlayHeader{display:none!important;}}
