/* Explicit two-mode palette for the public card-search site. Loaded after legacy styles. */
html { color-scheme: light; }
html[data-theme="light"] { color-scheme: light; background: #edf3fa; color: #18314d; }
html[data-theme="dark"] { color-scheme: dark; background: #09131e; color: #e7f2f7; }
body { min-height: 100dvh; }
.site-topbar { display:flex; flex-wrap:wrap; justify-content:space-between; align-items:center; gap:12px; padding:12px clamp(12px,3vw,32px); border-bottom:1px solid #405766; background:#0d2330; color:#edf7fd; }
.site-brand { font-size:14px; font-weight:800; letter-spacing:.04em; color:inherit; text-decoration:none; }
.site-actions { display:flex; flex-wrap:wrap; gap:12px; align-items:center; }
.site-contact-link { color:#afe6ff; text-decoration:underline; text-underline-offset:3px; font-size:13px; }
.site-theme-options { display:inline-flex; align-items:center; padding:3px; gap:3px; border-radius:12px; border:1px solid #657e90; background:#071b2a; }
.site-theme-options button { appearance:none; border:0; border-radius:9px; padding:8px 12px; background:transparent; color:#b6cad9; cursor:pointer; font:600 12px/1.3 system-ui,sans-serif; }
.site-theme-options button[aria-pressed="true"] { background:#d4eefb; color:#102b43; box-shadow:0 1px 3px #0003; }
.site-theme-options button:focus-visible, .site-topbar a:focus-visible { outline:3px solid #75b9e9; outline-offset:2px; }
html[data-theme="light"] .site-topbar { background:#fff; color:#183451; border-color:#cad8e8; }
html[data-theme="light"] .site-contact-link { color:#1554a2; }
html[data-theme="light"] .site-theme-options { background:#e7eef9; border-color:#c0cede; }
html[data-theme="light"] .site-theme-options button { color:#3d5a78; }
html[data-theme="light"] .site-theme-options button[aria-pressed="true"] { background:#244f9f; color:#fff; }
.site-contact { width:min(760px,calc(100% - 32px)); margin:40px auto; border:1px solid #52778d; border-radius:16px; padding:28px; background:#0f2838; color:#edf6fa; line-height:1.8; }
.site-contact h1 { margin-top:0; font-size:clamp(22px,4vw,30px); }
.site-contact p { color:#d3e3ee; }
.site-contact a { color:#a8e0ff; }
.site-contact .contact-action { display:inline-block; padding:10px 16px; background:#1c5478; border:1px solid #6caccf; border-radius:9px; color:#fff; text-decoration:none; font-weight:700; }
html[data-theme="light"] .site-contact { background:#fff; color:#183451; border-color:#ccdaeb; box-shadow:0 6px 24px #23476812; }
html[data-theme="light"] .site-contact p { color:#4d647c; }
html[data-theme="light"] .site-contact a { color:#164f98; }
html[data-theme="light"] .site-contact .contact-action { background:#2557a7; color:#fff; border-color:#2557a7; }
@media (max-width:600px) { .site-topbar { align-items:flex-start; } .site-actions { width:100%; justify-content:space-between; } .site-theme-options button { min-height:40px; } .site-contact { padding:18px; } }

/* Light-mode card workspace: this is intentionally separate from R2 and card data. */
html[data-theme="light"] #wcs-app, 
html[data-theme="light"] #wcs-app:has(.md-deck-editor) { background:#edf3fa !important; color:#18314d !important; }
html[data-theme="light"] #wcs-app .wc-builder.md-deck-editor { background:linear-gradient(140deg,#f7faff,#e9f1fa) !important; color:#18314d !important; --md-lime:#3b67c8; --wc-mint:#2b7192; }
html[data-theme="light"] #wcs-app .md-deck-editor .db-layout>.db-search,
html[data-theme="light"] #wcs-app .md-deck-editor .db-detail,
html[data-theme="light"] #wcs-app .md-deck-editor .db-deck { background:#fff !important; border:1px solid #c9d8e9 !important; box-shadow:0 3px 14px #24466812 !important; border-radius:12px !important; }
html[data-theme="light"] #wcs-app .md-deck-editor .db-layout h2 { background:#edf3fc !important; color:#1d3e69 !important; border-bottom:1px solid #d0ddef; }
html[data-theme="light"] #wcs-app .md-deck-editor .db-search>h2 { background:#dbe9ff !important; border-color:#3569bd !important; color:#173f78 !important; }
html[data-theme="light"] #wcs-app .md-deck-editor .md-library-tools,
html[data-theme="light"] #wcs-app .md-deck-editor .db-toolbar { background:#eaf1fa !important; border-color:#bdcee1 !important; }
html[data-theme="light"] #wcs-app .md-deck-editor .db-result .db-card-title { background:#f4f8fd !important; color:#153b73 !important; border-color:#b7cae2 !important; }
html[data-theme="light"] #wcs-app .md-deck-editor .md-library-name { color:#183451 !important; }
html[data-theme="light"] #wcs-app .md-deck-editor .db-result small,
html[data-theme="light"] #wcs-app .md-deck-editor .db-translation-status,
html[data-theme="light"] #wcs-app .md-deck-editor .db-format-status { color:#4a647e !important; }
html[data-theme="light"] #wcs-app .md-deck-editor #dbResultsInfo,
html[data-theme="light"] #wcs-app .md-deck-editor .db-pager,
html[data-theme="light"] #wcs-app .md-deck-editor #dbStatus { color:#255581 !important; }
html[data-theme="light"] #wcs-app .md-deck-editor #dbDetail { color:#213b5a !important; }
html[data-theme="light"] #wcs-app .md-deck-editor #dbDetail>h3 { background:#e7effa !important; color:#173e6a !important; }
html[data-theme="light"] #wcs-app .md-deck-editor #dbDetail>p { color:#3b5572 !important; }
html[data-theme="light"] #wcs-app .md-deck-editor #dbDetail .db-effect,
html[data-theme="light"] #wcs-app .md-deck-editor .db-effect,
html[data-theme="light"] #wcs-app .md-deck-editor .db-analysis { background:#f4f8fd !important; color:#233e5b !important; border-color:#cfdeee !important; }
html[data-theme="light"] #wcs-app .md-deck-editor .db-match-reason { background:#e7f3fa !important; color:#245678 !important; border-color:#69a5c2 !important; }
html[data-theme="light"] #wcs-app .md-deck-editor .db-locale-bar { background:#edf4fc !important; border-color:#c1d0e1 !important; color:#1c3c60 !important; }
html[data-theme="light"] #wcs-app .md-deck-editor .db-locale-bar label,
html[data-theme="light"] #wcs-app .md-deck-editor .db-limit-filter,
html[data-theme="light"] #wcs-app .md-deck-editor label { color:#1f3f65 !important; }
html[data-theme="light"] #wcs-app .md-deck-editor .db-locale-bar #dbRuleInfo,
html[data-theme="light"] #wcs-app .md-deck-editor .db-data-info p,
html[data-theme="light"] #wcs-app .md-deck-editor .db-data-info summary { color:#416480 !important; }
html[data-theme="light"] #wcs-app .md-deck-editor input,
html[data-theme="light"] #wcs-app .md-deck-editor select,
html[data-theme="light"] #wcs-app .md-deck-editor .md-library-tools input,
html[data-theme="light"] #wcs-app .md-deck-editor #mdSort,
html[data-theme="light"] #wcs-app .md-deck-editor #mdBookmarks,
html[data-theme="light"] #wcs-app .md-deck-editor .db-locale-bar select,
html[data-theme="light"] #wcs-app .md-deck-editor .db-limit-filter select { background:#fff !important; color:#172f50 !important; border-color:#a9bfda !important; }
html[data-theme="light"] #wcs-app .md-deck-editor input::placeholder { color:#627892 !important; opacity:1; }
html[data-theme="light"] #wcs-app .md-deck-editor .md-detail-actions button,
html[data-theme="light"] #wcs-app .md-deck-editor #dbFindMentions,
html[data-theme="light"] #wcs-app .md-deck-editor .db-pager button { background:#e9f1fb !important; color:#22538a !important; border-color:#aabed8 !important; }
html[data-theme="light"] #wcs-app .md-deck-editor .db-mobile-tabs { background:#eff5fd !important; border-color:#c4d5e9 !important; }
html[data-theme="light"] #wcs-app .md-deck-editor .db-mobile-tabs button { background:#e2ebf8 !important; color:#294e7c !important; border-color:#b6cbe5 !important; }
html[data-theme="light"] #wcs-app .md-deck-editor .db-mobile-tabs button[aria-selected="true"],
html[data-theme="light"] #wcs-app .md-deck-editor #mdBookmarks[aria-pressed="true"],
html[data-theme="light"] #wcs-app .md-deck-editor #mdBookmark[aria-pressed="true"] { background:#2c5eb3 !important; color:#fff !important; border-color:#2c5eb3 !important; }
html[data-theme="light"] #wcs-app .md-deck-editor .db-localized-effect p,
html[data-theme="light"] #wcs-app .md-deck-editor #dbDetail .db-official-rulings,
html[data-theme="light"] #wcs-app .md-deck-editor #dbDetail .db-official-rulings p { color:#28415f !important; }
html[data-theme="light"] #wcs-app .md-deck-editor .db-official-rulings { border-color:#bdd1e5 !important; background:#f7fbff !important; }
html[data-theme="light"] #wcs-app .md-deck-editor .db-official-rulings a,
html[data-theme="light"] #wcs-app .md-deck-editor .db-ruling-link a,
html[data-theme="light"] #wcs-app .md-deck-editor .db-data-info a { color:#1559a0 !important; }
html[data-theme="light"] #wcs-app .md-deck-editor .db-limit-badge { background:#e8f0f9 !important; color:#254363 !important; border-color:#b9cee2 !important; }
html[data-theme="light"] #wcs-app .md-deck-editor .db-region-badge { color:#446700 !important; }
html[data-theme="light"] #wcs-app .md-deck-editor .db-art-dialog { background:#fff !important; color:#183451 !important; border-color:#b9cee1 !important; }
html[data-theme="light"] #wcs-app .md-deck-editor .db-filter-drawer,
html[data-theme="light"] #wcs-app .md-deck-editor .md-filter-drawer { background:#f1f7ff !important; color:#183d65 !important; border-color:#aebfda !important; }
html[data-theme="light"] #wcs-app .md-deck-editor .md-filter-drawer>summary { color:#224d79 !important; }
html[data-theme="light"] #wcs-app .md-deck-editor .db-card-title:focus-visible,
html[data-theme="light"] #wcs-app .md-deck-editor button:focus-visible { outline:3px solid #1d5aba !important; outline-offset:2px; }


/*
 * Light search-result cards.
 * The compact result layout in duel-commands.css uses an intentionally dark
 * palette, an artwork overlay title, and !important backgrounds. Override
 * every affected surface ONLY in light mode, after all shared styles.
 */
html[data-theme="light"] #wcs-app .md-deck-editor .db-results-toolbar {
  background:#e8f1fb !important;
  color:#1c4167 !important;
  border-color:#bed0e4 !important;
}
html[data-theme="light"] #wcs-app .md-deck-editor .db-results-toolbar #dbResultsInfo {
  color:#244d76 !important;
  font-weight:700;
}
html[data-theme="light"] #wcs-app .md-deck-editor .db-results-toolbar button {
  background:#fff !important;
  color:#214e84 !important;
  border-color:#aebfd4 !important;
}
html[data-theme="light"] #wcs-app .md-deck-editor .db-results .db-reference-card {
  background:#fff !important;
  color:#183451 !important;
  border:1px solid #b9cde1 !important;
  border-radius:10px;
  padding:10px !important;
  gap:7px;
  box-shadow:0 2px 9px #1d4b7514;
}
/* Give the artwork and title their own rows rather than layering dark ink
   over the image (or hiding it behind a gradient). */
html[data-theme="light"] #wcs-app .md-deck-editor .db-reference-card .db-card-title {
  display:flex !important;
  flex-direction:column;
  align-items:stretch;
  overflow:visible !important;
  height:auto !important;
  min-height:0 !important;
  padding:0 !important;
  text-align:left;
  background:#f3f8fd !important;
  color:#173c63 !important;
  border:1px solid #c1d2e4 !important;
  border-radius:8px;
}
html[data-theme="light"] #wcs-app .md-deck-editor .db-reference-card .db-card-title>.md-card-face {
  display:block;
  position:relative !important;
  inset:auto !important;
  flex:none;
  width:100% !important;
  height:112px !important;
  aspect-ratio:auto !important;
  background:#e8eff7 !important;
  border:0;
  border-radius:7px 7px 0 0;
  overflow:hidden;
}
html[data-theme="light"] #wcs-app .md-deck-editor .db-reference-card .md-card-face>img {
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:50% 35%;
}
html[data-theme="light"] #wcs-app .md-deck-editor .db-reference-card .db-card-title .md-library-name {
  position:static !important;
  display:block !important;
  flex:none;
  min-height:0 !important;
  max-height:none !important;
  padding:8px 9px !important;
  background:transparent !important;
  color:#173858 !important;
  text-shadow:none !important;
  font-size:14px !important;
  font-weight:700;
  line-height:1.5 !important;
  white-space:normal !important;
  overflow:visible !important;
  -webkit-line-clamp:unset !important;
  -webkit-box-orient:initial !important;
  overflow-wrap:anywhere;
}
html[data-theme="light"] #wcs-app .md-deck-editor .db-reference-card .db-card-title .db-print-code-hint {
  display:block !important;
  padding:0 9px 8px !important;
  color:#476587 !important;
  background:transparent !important;
  font-size:11px !important;
  line-height:1.4;
  overflow-wrap:anywhere;
}
html[data-theme="light"] #wcs-app .md-deck-editor .db-reference-card .md-no-image .md-card-fallback {
  color:#284563;
  background:#e8f0f9;
  border-color:#c3d3e5;
  text-shadow:none;
}
html[data-theme="light"] #wcs-app .md-deck-editor .db-results .db-reference-card .db-translation-status,
html[data-theme="light"] #wcs-app .md-deck-editor .db-results .db-reference-card .db-format-status {
  color:#42617f !important;
  font-size:12px;
  line-height:1.55;
}
html[data-theme="light"] #wcs-app .md-deck-editor .db-reference-card .db-effect-summary {
  background:transparent !important;
  color:#243c55 !important;
  border-color:#c9d8e8 !important;
}
html[data-theme="light"] #wcs-app .md-deck-editor .db-reference-card .db-effect-summary h4 {
  color:#284b76 !important;
  font-size:13px;
  font-weight:700;
}
html[data-theme="light"] #wcs-app .md-deck-editor .db-reference-card .db-glance-row {
  background:#eaf4fc !important;
  border:1px solid #d3e3f0;
  padding:6px 7px;
  grid-template-columns:46px minmax(0,1fr);
  gap:7px;
}
html[data-theme="light"] #wcs-app .md-deck-editor .db-reference-card .db-glance-row>b {
  color:#194d73 !important;
  font-size:11px;
  font-weight:700;
  line-height:1.5;
}
html[data-theme="light"] #wcs-app .md-deck-editor .db-reference-card .db-glance-row>span {
  color:#1c3956 !important;
  font-size:12px !important;
  line-height:1.5 !important;
  -webkit-line-clamp:3;
}
html[data-theme="light"] #wcs-app .md-deck-editor .db-reference-card .db-glance-cost {
  background:#fff2dc !important;
  border-color:#eed9b0 !important;
}
html[data-theme="light"] #wcs-app .md-deck-editor .db-reference-card .db-glance-cost>b {
  color:#76470e !important;
}
html[data-theme="light"] #wcs-app .md-deck-editor .db-reference-card .db-glance-resolution {
  background:#e8f6ed !important;
  border-color:#c0e1cc !important;
}
html[data-theme="light"] #wcs-app .md-deck-editor .db-reference-card .db-glance-resolution>b {
  color:#255f3f !important;
}
html[data-theme="light"] #wcs-app .md-deck-editor .db-reference-card .db-glance-restriction {
  background:#f9edf5 !important;
  border-color:#e7cfe0 !important;
}
html[data-theme="light"] #wcs-app .md-deck-editor .db-reference-card .db-glance-restriction>b {
  color:#723c60 !important;
}
html[data-theme="light"] #wcs-app .md-deck-editor .db-reference-card .db-effect-preview,
html[data-theme="light"] #wcs-app .md-deck-editor .db-reference-card .db-effect-item>small {
  color:#244560 !important;
}
html[data-theme="light"] #wcs-app .md-deck-editor .db-reference-card .db-effect-more>summary,
html[data-theme="light"] #wcs-app .md-deck-editor .db-reference-card .db-extra-effects>summary,
html[data-theme="light"] #wcs-app .md-deck-editor .db-reference-card .db-effect-original summary {
  color:#1c5689 !important;
  font-size:12px;
}
html[data-theme="light"] #wcs-app .md-deck-editor .db-reference-card .db-effect-more[open] {
  background:#f2f7fc !important;
  border-color:#bbd0e4 !important;
}
html[data-theme="light"] #wcs-app .md-deck-editor .db-reference-card .db-effect-original p,
html[data-theme="light"] #wcs-app .md-deck-editor .db-reference-card .db-effect-row>b,
html[data-theme="light"] #wcs-app .md-deck-editor .db-reference-card .db-effect-resolution>b {
  color:#294760 !important;
}
html[data-theme="light"] #wcs-app .md-deck-editor .db-reference-card .db-effect-chip {
  color:#20516b !important;
  background:#e9f4fb !important;
  border-color:#a9ccdf !important;
}
html[data-theme="light"] #wcs-app .md-deck-editor .db-reference-card .db-effect-cost .db-effect-chip {
  color:#70420c !important;
  background:#fff1db !important;
  border-color:#e0c38a !important;
}
html[data-theme="light"] #wcs-app .md-deck-editor .db-reference-card .db-effect-restriction .db-effect-chip {
  color:#713d5d !important;
  background:#faedf6 !important;
  border-color:#dcbbd3 !important;
}
html[data-theme="light"] #wcs-app .md-deck-editor .db-reference-card .db-effect-summary .db-match-reason {
  color:#24516f !important;
  background:#e9f3fb !important;
  border-color:#8fbcd7 !important;
}
html[data-theme="light"] #wcs-app .md-deck-editor .db-reference-card .db-card-title:focus-visible {
  outline:3px solid #175ac2 !important;
  outline-offset:2px;
}
@media(max-width:600px) {
  html[data-theme="light"] #wcs-app .md-deck-editor .db-reference-card .db-card-title>.md-card-face { height:92px !important; }
  html[data-theme="light"] #wcs-app .md-deck-editor .db-reference-card .db-card-title .md-library-name { font-size:13px !important; }
}


/* Explorer filter chips and unselected card panel in the light palette. */
html[data-theme="light"] #wcs-app .md-deck-editor .db-active-filters{
 background:#f2f7fd!important;color:#254460!important;border-color:#c5d7e9!important;
}
html[data-theme="light"] #wcs-app .md-deck-editor .db-active-filters>strong{
 color:#2c5075!important;
}
html[data-theme="light"] #wcs-app .md-deck-editor .db-active-filter-chip{
 background:#e3eefb!important;color:#174574!important;border-color:#9dbbd8!important;
}
html[data-theme="light"] #wcs-app .md-deck-editor .db-active-filter-chip:hover{
 background:#d3e5f8!important;border-color:#5a91bf!important;
}
html[data-theme="light"] #wcs-app .md-deck-editor #dbClearActiveFilters{
 background:#fff!important;color:#1a5389!important;border-color:#aec6de!important;
}
html[data-theme="light"] #wcs-app .md-deck-editor .db-detail-start{
 color:#213b59!important;
}
html[data-theme="light"] #wcs-app .md-deck-editor .db-detail-start-kicker{
 color:#376e9e!important;
}
html[data-theme="light"] #wcs-app .md-deck-editor .db-detail-start>h3,
html[data-theme="light"] #wcs-app .md-deck-editor .db-detail-start>h4{
 color:#183c65!important;
}
html[data-theme="light"] #wcs-app .md-deck-editor .db-detail-start>p{
 color:#4d6781!important;
}
html[data-theme="light"] #wcs-app .md-deck-editor .db-start-guide{
 background:#eff5fc!important;border-color:#c7d8ea!important;
}
html[data-theme="light"] #wcs-app .md-deck-editor .db-start-guide>span{
 color:#2a4766!important;
}
html[data-theme="light"] #wcs-app .md-deck-editor .db-start-guide b{
 color:#27629c!important;
}
html[data-theme="light"] #wcs-app .md-deck-editor .db-detail-quick button,
html[data-theme="light"] #wcs-app .md-deck-editor .db-detail-recent button{
 background:#e8f1fc!important;color:#1f507f!important;border-color:#a8c5e0!important;
}
html[data-theme="light"] #wcs-app .md-deck-editor .db-detail-quick button:hover,
html[data-theme="light"] #wcs-app .md-deck-editor .db-detail-recent button:hover{
 background:#d6e8fa!important;
}
html[data-theme="light"] #wcs-app .md-deck-editor .db-detail-start .db-detail-start-note{
 border-color:#c6d7e8!important;color:#536f88!important;
}

html[data-theme="light"] #wcs-app .md-deck-editor .db-detail-home{
 background:#e8f1fc!important;color:#205483!important;border-color:#a5c4e0!important;
}
html[data-theme="light"] #wcs-app .md-deck-editor .db-detail-home:hover{
 background:#d9eaf9!important;
}

/*
 * Light palette for the "카드로 검색" reverse-card search form.
 * Its dark styles in duel-commands.css include !important declarations.
 */
html[data-theme="light"] #wcs-app .md-deck-editor .db-search-tabs button {
 background:#e7f0fb !important;color:#234a74 !important;border:1px solid #aec4dd !important;
}
html[data-theme="light"] #wcs-app .md-deck-editor .db-search-tabs button[aria-pressed="true"] {
 background:#2758a5 !important;color:#fff !important;border-color:#204984 !important;font-weight:800;
}
html[data-theme="light"] #wcs-app .md-deck-editor .db-search-tabs button:focus-visible {
 outline:3px solid #1e62bb !important;outline-offset:2px;
}
html[data-theme="light"] #wcs-app .md-deck-editor .db-reverse-panel {
 background:#f4f8fe !important;color:#1c3d61 !important;border:1px solid #bdcfe4 !important;
 border-top:3px solid #487bc0 !important;box-shadow:0 2px 12px #234c7012;
}
html[data-theme="light"] #wcs-app .md-deck-editor .db-reverse-panel h3,
html[data-theme="light"] #wcs-app .md-deck-editor .db-reverse-panel label,
html[data-theme="light"] #wcs-app .md-deck-editor .db-reverse-panel summary {
 color:#193d67 !important;
}
html[data-theme="light"] #wcs-app .md-deck-editor .db-reverse-panel p,
html[data-theme="light"] #wcs-app .md-deck-editor #dbReverseCard {
 color:#345574 !important;
}
html[data-theme="light"] #wcs-app .md-deck-editor .db-reverse-panel input,
html[data-theme="light"] #wcs-app .md-deck-editor .db-reverse-panel select {
 background:#fff !important;color:#173b62 !important;border:1px solid #a3bdd8 !important;box-shadow:none !important;
}
html[data-theme="light"] #wcs-app .md-deck-editor .db-reverse-panel input::placeholder {
 color:#617b99 !important;opacity:1;
}
html[data-theme="light"] #wcs-app .md-deck-editor .db-reverse-panel input:focus-visible,
html[data-theme="light"] #wcs-app .md-deck-editor .db-reverse-panel select:focus-visible {
 outline:3px solid #4c8bd0 !important;outline-offset:1px;
}
html[data-theme="light"] #wcs-app .md-deck-editor .db-reverse-panel .db-search-direction {
 background:#e9f3fc !important;color:#244969 !important;border:1px solid #a6c9df !important;
}
html[data-theme="light"] #wcs-app .md-deck-editor .db-reverse-panel #dbReverseStatus {
 color:#2b5e7f !important;
}
html[data-theme="light"] #wcs-app .md-deck-editor #dbReverseSuggestions {
 background:transparent !important;color:#264e70 !important;
}
html[data-theme="light"] #wcs-app .md-deck-editor #dbReverseSuggestions button {
 background:#fff !important;color:#1e4670 !important;border:1px solid #a9c2db !important;
}
html[data-theme="light"] #wcs-app .md-deck-editor #dbReverseSuggestions button:hover {
 background:#e8f1fb !important;border-color:#6d9fce !important;
}
html[data-theme="light"] #wcs-app .md-deck-editor #dbReverseSuggestions small,
html[data-theme="light"] #wcs-app .md-deck-editor .db-reverse-loaded small,
html[data-theme="light"] #wcs-app .md-deck-editor .db-reverse-loaded dt {
 color:#526f8a !important;
}
html[data-theme="light"] #wcs-app .md-deck-editor .db-reverse-loaded strong {
 color:#174779 !important;
}
html[data-theme="light"] #wcs-app .md-deck-editor .db-reverse-loaded dd,
html[data-theme="light"] #wcs-app .md-deck-editor .db-reverse-loaded details p {
 color:#274966 !important;
}
html[data-theme="light"] #wcs-app .md-deck-editor #dbReverseClear {
 background:#fff !important;color:#255789 !important;border:1px solid #a9c3dd !important;
}
html[data-theme="light"] #wcs-app .md-deck-editor #dbReverseClear:hover {
 background:#e9f2fc !important;
}


/* Light compact gallery: only the card artwork and name are visible. */
html[data-theme="light"] #wcs-app .md-deck-editor.search-only .db-results .db-gallery-card{
 background:#fff!important;border-color:#b9cde3!important;
 box-shadow:0 2px 9px #1d4b7514!important;
 padding:5px!important;
}
html[data-theme="light"] #wcs-app .md-deck-editor.search-only .db-gallery-card .db-card-title{
 background:#f1f6fd!important;color:#163c67!important;
 border:1px solid #bed0e5!important;
 height:auto!important;overflow:hidden!important;
}
html[data-theme="light"] #wcs-app .md-deck-editor.search-only .db-gallery-card .db-card-title>.md-card-face{
 background:#edf3fb!important;height:150px!important;
}
html[data-theme="light"] #wcs-app .md-deck-editor.search-only .db-gallery-card .md-card-face .md-card-fallback{
 color:#315778!important;background:#e6eef9!important;border-color:#c1d2e5!important;
}
html[data-theme="light"] #wcs-app .md-deck-editor.search-only .db-gallery-card .db-card-title .md-library-name{
 background:#f0f5fc!important;color:#1a426f!important;
 text-shadow:none!important;max-height:50px!important;
 -webkit-line-clamp:2!important;overflow:hidden!important;
 font-size:13px!important;padding:6px 8px!important;
}
html[data-theme="light"] #wcs-app .md-deck-editor.search-only .db-gallery-card .db-card-title[aria-pressed="true"]{
 outline:3px solid #1b62b0!important;
}
html[data-theme="light"] #wcs-app .md-deck-editor.search-only .db-gallery-empty{
 color:#315e83!important;
}

/* Full-effect detail text and the original categorized overview in light mode. */
html[data-theme="light"] #wcs-app .md-deck-editor #dbDetail .db-detail-overview{
 background:#f3f8fd!important;color:#193e63!important;
 border-color:#c3d5e8!important;
}
html[data-theme="light"] #wcs-app .md-deck-editor #dbDetail .db-detail-overview>h4,
html[data-theme="light"] #wcs-app .md-deck-editor #dbDetail .db-detail-section-heading{
 color:#1c4e7f!important;
}
html[data-theme="light"] #wcs-app .md-deck-editor #dbDetail .db-detail-analysis-note{
 color:#42617d!important;
}
html[data-theme="light"] #wcs-app .md-deck-editor #dbDetail .db-detail-overview .db-effect-summary{
 background:#fff!important;color:#213f5e!important;
 border-color:#c4d7e8!important;
}
html[data-theme="light"] #wcs-app .md-deck-editor #dbDetail .db-detail-overview .db-effect-summary h4{
 color:#24527d!important;
}
html[data-theme="light"] #wcs-app .md-deck-editor #dbDetail .db-detail-overview .db-glance-row{
 background:#eaf3fc!important;border:1px solid #d5e2ee!important;
}
html[data-theme="light"] #wcs-app .md-deck-editor #dbDetail .db-detail-overview .db-glance-row>b{
 color:#22547f!important;
}
html[data-theme="light"] #wcs-app .md-deck-editor #dbDetail .db-detail-overview .db-glance-row>span{
 color:#223c59!important;
}
html[data-theme="light"] #wcs-app .md-deck-editor #dbDetail .db-detail-overview .db-glance-cost{
 background:#fff1da!important;border-color:#f0dbb6!important;
}
html[data-theme="light"] #wcs-app .md-deck-editor #dbDetail .db-detail-overview .db-glance-cost>b{
 color:#774811!important;
}
html[data-theme="light"] #wcs-app .md-deck-editor #dbDetail .db-detail-overview .db-glance-resolution{
 background:#e8f6ec!important;border-color:#c7e4d0!important;
}
html[data-theme="light"] #wcs-app .md-deck-editor #dbDetail .db-detail-overview .db-glance-resolution>b{
 color:#246342!important;
}
html[data-theme="light"] #wcs-app .md-deck-editor #dbDetail .db-detail-overview .db-glance-restriction{
 background:#faedf5!important;border-color:#e9d2e2!important;
}
html[data-theme="light"] #wcs-app .md-deck-editor #dbDetail .db-detail-overview .db-glance-restriction>b{
 color:#773b62!important;
}
html[data-theme="light"] #wcs-app .md-deck-editor #dbDetail .db-detail-overview .db-effect-more>summary{
 color:#1c5689!important;
}
html[data-theme="light"] #wcs-app .md-deck-editor #dbDetail .db-detail-overview .db-effect-original p{
 color:#263f5c!important;
}
@media(max-width:600px){
 html[data-theme="light"] #wcs-app .md-deck-editor.search-only .db-gallery-card .db-card-title>.md-card-face{height:132px!important;}
 html[data-theme="light"] #wcs-app .md-deck-editor.search-only .db-gallery-card .db-card-title .md-library-name{font-size:12.5px!important;}
}


/* Reader v2 light mode: compact card identity and parallel original/summary. */
html[data-theme="light"] #wcs-app .md-deck-editor #dbDetail .db-detail-meta{
 border-color:#ccdaea!important;
}
html[data-theme="light"] #wcs-app .md-deck-editor #dbDetail .db-detail-english{
 color:#58718c!important;
}
html[data-theme="light"] #wcs-app .md-deck-editor #dbDetail .db-detail-kind{
 color:#1f456c!important;
}
html[data-theme="light"] #wcs-app .md-deck-editor #dbDetail .db-detail-password{
 color:#52728e!important;
}
html[data-theme="light"] #wcs-app .md-deck-editor #dbDetail .db-detail-password code{
 color:#1c4f80!important;
}
html[data-theme="light"] #wcs-app .md-deck-editor #dbDetail .db-detail-no-art{
 background:#edf4fc!important;color:#365f84!important;
 border-color:#9ab5d0!important;
}
html[data-theme="light"] #wcs-app .md-deck-editor #dbDetail .db-detail-art>small{
 color:#526c86!important;
}
html[data-theme="light"] #wcs-app .md-deck-editor #dbDetail .db-detail-release{
 background:#f2f7fd!important;border-color:#c1d4e8!important;
}
html[data-theme="light"] #wcs-app .md-deck-editor #dbDetail .db-detail-release>summary{
 color:#215180!important;
}
html[data-theme="light"] #wcs-app .md-deck-editor #dbDetail .db-detail-release>summary>span{
 color:#577491!important;
}
html[data-theme="light"] #wcs-app .md-deck-editor #dbDetail .db-detail-release .db-format-status,
html[data-theme="light"] #wcs-app .md-deck-editor #dbDetail .db-detail-release .db-translation-status{
 color:#476784!important;
}
html[data-theme="light"] #wcs-app .md-deck-editor #dbDetail .db-detail-release .db-print-codes{
 background:#fff!important;border-color:#c8d9e9!important;
 color:#274765!important;
}
html[data-theme="light"] #wcs-app .md-deck-editor #dbDetail .db-detail-original{
 background:#f7fafe!important;border-color:#c7d7e8!important;
}
html[data-theme="light"] #wcs-app .md-deck-editor #dbDetail .db-detail-original>.db-detail-section-heading{
 color:#1f5081!important;
}
html[data-theme="light"] #wcs-app .md-deck-editor #dbDetail .db-detail-original>.db-effect{
 background:transparent!important;border:0!important;
 color:#233f5f!important;
}


/* Translation-review hints and sourced effect-timing clarification. */
#wcs-app .md-deck-editor #dbDetail .db-translation-review,
#wcs-app .md-deck-editor #dbDetail .db-effect-ruling-note{
 margin:10px 0;padding:10px 12px;
 border:1px solid #a07742;border-left:4px solid #e7b45b;
 border-radius:8px;background:#34291c;color:#ffe9bb;
 font-size:12px;line-height:1.65;
}
#wcs-app .md-deck-editor #dbDetail .db-translation-review strong,
#wcs-app .md-deck-editor #dbDetail .db-effect-ruling-note strong{
 display:block;font-size:13px;margin:0 0 4px;color:inherit;
}
#wcs-app .md-deck-editor #dbDetail .db-translation-review p,
#wcs-app .md-deck-editor #dbDetail .db-effect-ruling-note p{
 margin:0 0 5px;font-size:12px;line-height:1.65;color:inherit;
}
#wcs-app .md-deck-editor #dbDetail .db-translation-review a,
#wcs-app .md-deck-editor #dbDetail .db-effect-ruling-note a{
 color:#a7e7ff;text-decoration:underline;text-underline-offset:2px;
}
html[data-theme="light"] #wcs-app .md-deck-editor #dbDetail .db-translation-review,
html[data-theme="light"] #wcs-app .md-deck-editor #dbDetail .db-effect-ruling-note{
 background:#fff7e8!important;color:#674318!important;
 border-color:#e6c996!important;border-left-color:#ad752b!important;
}
html[data-theme="light"] #wcs-app .md-deck-editor #dbDetail .db-translation-review a,
html[data-theme="light"] #wcs-app .md-deck-editor #dbDetail .db-effect-ruling-note a{
 color:#225f93!important;
}


/* Manually verified, unnumbered multi-effect summaries and linked rulings. */
#wcs-app .md-deck-editor #dbDetail .db-curated-overview{
 display:grid;gap:10px;
}
#wcs-app .md-deck-editor #dbDetail .db-curated-effect{
 display:grid;gap:6px;padding:10px;
 border:1px solid #4b7187;border-radius:9px;background:#15374a;
}
#wcs-app .md-deck-editor #dbDetail .db-curated-effect>h5{
 margin:0 0 3px;color:#e8f6ff;font-size:13px;font-weight:800;
}
#wcs-app .md-deck-editor #dbDetail .db-curated-effect .db-glance-row{
 display:grid;grid-template-columns:48px minmax(0,1fr);gap:8px;
 border-radius:6px;padding:6px 8px;font-size:12px;
}
#wcs-app .md-deck-editor #dbDetail .db-curated-effect .db-glance-row>span{
 font-size:12.5px;line-height:1.55;white-space:normal;
}
#wcs-app .md-deck-editor #dbDetail .db-curated-note{
 margin:0;font-size:12px;line-height:1.65;color:#c0dbea;
}
#wcs-app .md-deck-editor #dbDetail .db-related-rulings ul{
 margin:6px 0 10px;padding-left:19px;line-height:1.75;
}
#wcs-app .md-deck-editor #dbDetail .db-related-rulings li{
 margin:4px 0;overflow-wrap:anywhere;
}
#wcs-app .md-deck-editor #dbDetail .db-related-rulings a,
#wcs-app .md-deck-editor #dbDetail .db-ruling-source{
 color:#9dd6ff;text-decoration:underline;text-underline-offset:2px;
}
html[data-theme="light"] #wcs-app .md-deck-editor #dbDetail .db-curated-effect{
 background:#fff!important;border-color:#bfd4e8!important;
}
html[data-theme="light"] #wcs-app .md-deck-editor #dbDetail .db-curated-effect>h5{
 color:#1b507e!important;
}
html[data-theme="light"] #wcs-app .md-deck-editor #dbDetail .db-curated-note{
 color:#345c78!important;
}
html[data-theme="light"] #wcs-app .md-deck-editor #dbDetail .db-related-rulings a,
html[data-theme="light"] #wcs-app .md-deck-editor #dbDetail .db-ruling-source{
 color:#205c91!important;
}

/* Nested choices: one parent effect can have separately selectable subeffects. */
#wcs-app .md-deck-editor #dbDetail .db-curated-choices{
 margin:5px 0 8px;padding:9px;border:1px solid #577d93;border-radius:8px;
 background:#0d293a;display:grid;gap:7px;
}
#wcs-app .md-deck-editor #dbDetail .db-curated-choices h6{
 margin:0;font-size:12px;line-height:1.45;color:#c2e5f8;
}
#wcs-app .md-deck-editor #dbDetail .db-curated-option{
 border:1px solid #486e83;border-radius:7px;padding:9px;
 background:#153449;color:#e9f6fd;
}
#wcs-app .md-deck-editor #dbDetail .db-curated-option strong{
 display:block;margin-bottom:6px;font-size:12.5px;color:inherit;
}
#wcs-app .md-deck-editor #dbDetail .db-curated-option p{
 margin:4px 0;font-size:12px;line-height:1.6;color:inherit;
}
#wcs-app .md-deck-editor #dbDetail .db-curated-option p b{
 display:inline-block;min-width:38px;
}
#wcs-app .md-deck-editor #dbDetail .db-curated-choice-note{
 margin:4px 0;padding:9px;font-size:12px;line-height:1.6;
 background:#183e53;border-left:3px solid #92c9e3;color:#d9ecf7;
}
html[data-theme="light"] #wcs-app .md-deck-editor #dbDetail .db-curated-choices{
 background:#e9f2fc!important;border-color:#bfd4e8!important;
}
html[data-theme="light"] #wcs-app .md-deck-editor #dbDetail .db-curated-choices h6{
 color:#204b76!important;
}
html[data-theme="light"] #wcs-app .md-deck-editor #dbDetail .db-curated-option{
 background:#fff!important;border-color:#c6d8e9!important;color:#244765!important;
}
html[data-theme="light"] #wcs-app .md-deck-editor #dbDetail .db-curated-choice-note{
 background:#e7f2fc!important;border-left-color:#366eaa!important;color:#234b6d!important;
}

/* Layered grammar: canonical condition / payment / outcome / limits. */
#wcs-app .md-deck-editor #dbDetail .db-composed-guide{display:grid;gap:11px;margin:8px 0;}
#wcs-app .md-deck-editor #dbDetail .db-composed-guide>h4{margin:6px 0 0;font-size:13px;color:#cbe8fb;}
#wcs-app .md-deck-editor #dbDetail .db-composed-effect,
#wcs-app .md-deck-editor #dbDetail .db-composed-summon{
 padding:10px;border:1px solid #466e85;border-radius:9px;background:#112f42;
 display:grid;gap:6px;min-width:0;
}
#wcs-app .md-deck-editor #dbDetail .db-composed-effect>h5,
#wcs-app .md-deck-editor #dbDetail .db-composed-summon>h5{margin:0 0 4px;font-size:13px;color:#ecf7fd;}
#wcs-app .md-deck-editor #dbDetail .db-composed-guide .db-glance-row{
 grid-template-columns:48px minmax(0,1fr);gap:7px;padding:7px;
}
#wcs-app .md-deck-editor #dbDetail .db-composed-guide .db-glance-row>b{font-size:12px;line-height:1.6;}
#wcs-app .md-deck-editor #dbDetail .db-composed-values{
 display:flex;flex-wrap:wrap;gap:5px;min-width:0;font-size:12px;line-height:1.65;overflow-wrap:anywhere;
}
#wcs-app .md-deck-editor #dbDetail .db-composed-values>span{
 display:inline-block;max-width:100%;padding:2px 6px;
 border-radius:5px;border:1px solid #617f91;background:#244458;
}
#wcs-app .md-deck-editor #dbDetail .db-composed-values .db-composed-unknown{
 opacity:.78;font-style:italic;border-style:dashed;
}
#wcs-app .md-deck-editor #dbDetail .db-composed-guide details,
#wcs-app .md-deck-editor #dbDetail .db-legacy-analysis{
 padding:6px;border-top:1px solid #587b92;
}
#wcs-app .md-deck-editor #dbDetail .db-composed-guide summary,
#wcs-app .md-deck-editor #dbDetail .db-legacy-analysis>summary{
 cursor:pointer;font-size:11.5px;line-height:1.6;color:#b6d5ea;
}
#wcs-app .md-deck-editor #dbDetail .db-composed-guide details>p{
 white-space:pre-wrap;line-height:1.7;font-size:12px;overflow-wrap:anywhere;
}
html[data-theme="light"] #wcs-app .md-deck-editor #dbDetail .db-composed-guide>h4{color:#1d4d79!important;}
html[data-theme="light"] #wcs-app .md-deck-editor #dbDetail .db-composed-effect,
html[data-theme="light"] #wcs-app .md-deck-editor #dbDetail .db-composed-summon{
 background:#fff!important;border-color:#bed2e4!important;color:#234665!important;
}
html[data-theme="light"] #wcs-app .md-deck-editor #dbDetail .db-composed-effect>h5,
html[data-theme="light"] #wcs-app .md-deck-editor #dbDetail .db-composed-summon>h5{color:#1e507e!important;}
html[data-theme="light"] #wcs-app .md-deck-editor #dbDetail .db-composed-values>span{
 background:#edf4fc!important;color:#234a6e!important;border-color:#c2d4e8!important;
}
html[data-theme="light"] #wcs-app .md-deck-editor #dbDetail .db-composed-guide summary,
html[data-theme="light"] #wcs-app .md-deck-editor #dbDetail .db-legacy-analysis>summary{color:#285a86!important;}


/* Multi-stage effect grammar: conditional processing and exceptional activation. */
#wcs-app .md-deck-editor #dbDetail .db-composed-follow-ups,
#wcs-app .md-deck-editor #dbDetail .db-composed-conditional{
 display:grid;gap:7px;padding:9px;border-radius:8px;
 border:1px solid #5c7e92;background:#17354a;
}
#wcs-app .md-deck-editor #dbDetail .db-composed-follow-ups>h6,
#wcs-app .md-deck-editor #dbDetail .db-composed-conditional>h6{
 margin:0;font-size:12.5px;line-height:1.5;color:#dfedf8;
}
#wcs-app .md-deck-editor #dbDetail .db-composed-follow-up{
 display:grid;gap:5px;padding:6px 7px;
 border:1px solid #507184;border-radius:6px;
}
#wcs-app .md-deck-editor #dbDetail .db-composed-follow-up>p{
 margin:0;font-size:11.5px;line-height:1.65;color:#b8d9ea;
}
html[data-theme="light"] #wcs-app .md-deck-editor #dbDetail .db-composed-follow-ups,
html[data-theme="light"] #wcs-app .md-deck-editor #dbDetail .db-composed-conditional{
 background:#edf5fc!important;border-color:#c0d5e8!important;
}
html[data-theme="light"] #wcs-app .md-deck-editor #dbDetail .db-composed-follow-ups>h6,
html[data-theme="light"] #wcs-app .md-deck-editor #dbDetail .db-composed-conditional>h6{
 color:#1b4c78!important;
}
html[data-theme="light"] #wcs-app .md-deck-editor #dbDetail .db-composed-follow-up{
 border-color:#c2d4e5!important;
}
html[data-theme="light"] #wcs-app .md-deck-editor #dbDetail .db-composed-follow-up>p{
 color:#386283!important;
}


/* Extra Deck original-text sections and shared card-name restrictions. */
#wcs-app .md-deck-editor #dbDetail .db-printed-material,
#wcs-app .md-deck-editor #dbDetail .db-printed-summon,
#wcs-app .md-deck-editor #dbDetail .db-printed-effects{
 display:grid;gap:5px;margin:0 0 12px;padding:9px;
 border:1px solid #496c83;border-radius:8px;
 background:#153245;color:#e5f5fc;min-width:0;
}
#wcs-app .md-deck-editor #dbDetail .db-printed-material>h5,
#wcs-app .md-deck-editor #dbDetail .db-printed-summon>h5,
#wcs-app .md-deck-editor #dbDetail .db-printed-effects>h5{
 margin:0;color:#c4eaff;font-size:12.5px;font-weight:800;
}
#wcs-app .md-deck-editor #dbDetail .db-printed-material>p,
#wcs-app .md-deck-editor #dbDetail .db-printed-summon>p,
#wcs-app .md-deck-editor #dbDetail .db-printed-effects>p{
 margin:0!important;padding:0!important;
 background:transparent!important;border:0!important;
 font-size:12.5px!important;line-height:1.75!important;
 white-space:pre-wrap;overflow-wrap:anywhere;color:inherit!important;
}
#wcs-app .md-deck-editor #dbDetail .db-card-name-limits{
 display:grid;gap:5px;padding:10px;border:1px solid #6a85a0;
 border-radius:9px;background:#1b394d;color:#e5f3fc;
}
#wcs-app .md-deck-editor #dbDetail .db-card-name-limits>h5{
 font-size:12.5px;margin:0 0 2px;color:#d6edfa;
}
#wcs-app .md-deck-editor #dbDetail .db-card-name-limits>span{
 display:block;padding:5px 8px;border:1px solid #6c89a2;
 border-radius:6px;line-height:1.6;font-size:12.5px;
}
html[data-theme="light"] #wcs-app .md-deck-editor #dbDetail .db-printed-material,
html[data-theme="light"] #wcs-app .md-deck-editor #dbDetail .db-printed-summon,
html[data-theme="light"] #wcs-app .md-deck-editor #dbDetail .db-printed-effects{
 background:#f4f8fe!important;color:#25466a!important;
 border-color:#c2d4e7!important;
}
html[data-theme="light"] #wcs-app .md-deck-editor #dbDetail .db-printed-material>h5,
html[data-theme="light"] #wcs-app .md-deck-editor #dbDetail .db-printed-summon>h5,
html[data-theme="light"] #wcs-app .md-deck-editor #dbDetail .db-printed-effects>h5{
 color:#205383!important;
}
html[data-theme="light"] #wcs-app .md-deck-editor #dbDetail .db-card-name-limits{
 background:#eaf3fc!important;color:#20446d!important;border-color:#bcd2e8!important;
}
html[data-theme="light"] #wcs-app .md-deck-editor #dbDetail .db-card-name-limits>h5{
 color:#1a4e7e!important;
}
html[data-theme="light"] #wcs-app .md-deck-editor #dbDetail .db-card-name-limits>span{
 border-color:#c2d6e8!important;
}

/* Usage guidance belongs to the top-right site menu, not repeated per card. */
.site-guide{position:relative;font-size:13px;z-index:30}
.site-guide>summary{cursor:pointer;padding:6px 9px;border:1px solid currentColor;border-radius:7px;list-style-position:inside;color:inherit}
.site-guide-content{position:absolute;right:0;top:calc(100% + 8px);width:min(360px,calc(100vw - 28px));padding:14px 16px;border-radius:12px;border:1px solid #638594;background:#0d293b;color:#eff7ff;box-shadow:0 12px 30px #0004;line-height:1.65}
.site-guide-content p{margin:8px 0;font-size:12px}
.site-guide-content small{display:block;margin-top:12px;padding-top:10px;border-top:1px solid #638594;font-size:11px;line-height:1.6}
:root[data-theme="light"] .site-topbar .site-guide-content{background:#fff;color:#173b56;border-color:#b8cfe0}
@media(max-width:540px){.site-guide-content{position:fixed;right:12px;left:12px;top:64px;width:auto;max-height:65vh;overflow:auto}}
/* Existing detailed explanation remains accessible inside each concise effect. */
#wcs-app .db-composed-more{margin-top:10px}
#wcs-app .db-composed-more>summary{cursor:pointer}

/* Official Pendulum effect domain headings are legible in light mode. */
html[data-theme="light"] #wcs-app .md-deck-editor #dbDetail .db-printed-pendulum,
html[data-theme="light"] #wcs-app .md-deck-editor #dbDetail .db-printed-monster{
 color:#233f5f!important;
}
html[data-theme="light"] #wcs-app .md-deck-editor #dbDetail .db-printed-pendulum>h5,
html[data-theme="light"] #wcs-app .md-deck-editor #dbDetail .db-printed-monster>h5{
 color:#205383!important;
}
