.site-language { display:inline-flex; align-items:center; gap:6px; margin-inline-start:auto; font:14px/1.3 system-ui,sans-serif; color:#f4e7c6; }
.site-language select { width:auto; min-width:100px; max-width:145px; min-height:36px; padding:5px 24px 5px 8px; border:1px solid #9b8756; border-radius:6px; background:#17212a; color:#fff3d9; font:inherit; }
.site-language select:focus-visible { outline:2px solid #f5d17f; outline-offset:3px; }
.language-status { max-width:220px; font-size:12px; }
.language-status:empty { display:none; }
.localized-card-copy { padding:10px 12px; border:1px solid #8c7952; border-radius:8px; background:#13202d; color:#f5e8c8; font:14px/1.45 system-ui,sans-serif; white-space:pre-wrap; overflow-wrap:anywhere; max-height:38vh; overflow-y:auto; text-align:start; }
.localized-card-copy[hidden] { display:none; }
.localized-card-name { display:none; }
html:not([lang="en"]) .localized-card-name { display:block; position:absolute; inset:auto 3px 3px; z-index:3; padding:3px 4px; border-radius:4px; background:#08131fed; color:#fff0cc; font:600 10px/1.2 system-ui,sans-serif; text-align:center; pointer-events:none; overflow-wrap:anywhere; }
#game-menu > .site-language, #table-drawer > .site-language { display:flex; margin:12px 0; justify-content:flex-start; }
.card-hover-preview.card-face { max-height:calc(100dvh - 24px); overflow-y:auto; }
html:not([lang="en"]) .card-hover-preview.card-face img { max-height:52vh; object-fit:contain; }
html:not([lang="en"]) .overview-zoom { height:auto !important; max-height:calc(100dvh - 32px); overflow:auto; }
html:not([lang="en"]) .overview-zoom img { max-height:55vh; object-fit:contain; }
html:not([lang="en"]) #site-nav { flex-wrap:wrap; }
html:not([lang="en"]) button { overflow-wrap:break-word; }
html:not([lang="en"]) #cards .card-body h3 { display:block !important; margin:4px 0; white-space:normal; height:auto; font:600 13px/1.35 system-ui,sans-serif; color:#fff1ce; }
html:not([lang="en"]) #card-inspector { overflow:auto; }
html:not([lang="en"]) #hand-hover-preview { overflow:auto; max-height:calc(100dvh - 24px); }
html:not([lang="en"]) #hand-hover-preview > img { max-height:55vh; object-fit:contain; }
@media(max-width:600px) { .site-language { margin-inline-start:0; } .site-language select { min-height:40px; } }
/* The SVG already contains the translated name and complete rules. */
:has(> img[data-localized-face]) > .localized-card-copy,
:has(> .inspect-layout img[data-localized-face]) > .localized-card-copy { display:none; }
html:not([lang="en"]) .card-hover-preview.card-face img[data-localized-face] { max-height:calc(100dvh - 36px); object-fit:contain; }
html:not([lang="en"]) #hand-hover-preview > img[data-localized-face] { max-height:calc(100dvh - 36px); }
html:not([lang="en"]) .overview-zoom img[data-localized-face] { max-height:calc(100dvh - 36px); }
html:not([lang="en"]) .unit:has(img[data-localized-face]) > .localized-card-name,
html:not([lang="en"]) #hand .card:has(img[data-localized-face]) > .localized-card-name { display:none; }

.entry-language-field { margin:20px 0; padding:18px; border:1px solid #344e5d; border-radius:8px; background:#0a1b2780; }
.entry-language-field h3 { margin:0 0 8px; }
#entry-language > .site-language { display:flex; flex-wrap:wrap; margin:10px 0 0; font:inherit; }
#entry-language select { min-width:150px; max-width:100%; min-height:44px; }

/* Temporarily hide language selection until localization is ready. */
.site-language,
.entry-language-field { display:none !important; }
