.mtc-game-selector { position:relative; }
.mtc-game-button { padding:.45rem .75rem; border:1px solid currentColor; font-size:.8rem; border-radius:4px; color:var(--foreground); cursor:pointer; white-space:nowrap; }
.mtc-game-tooltip { display:none; position:absolute; top:calc(100% + 12px); right:0; width:max-content; max-width:min(320px,85vw); padding:.6rem .8rem; background:var(--popover); color:var(--popover-foreground); border:1px solid var(--border); font-size:.8rem; }
.mtc-game-selector:has(>button:hover) > .mtc-game-tooltip,.mtc-game-selector:has(>button:focus-visible) > .mtc-game-tooltip { display:block; }
.mtc-game-options { position:absolute; top:calc(100% + 12px); right:0; width:min(350px,calc(100vw - 32px)); max-height:70svh; overflow:auto; padding:1rem; background:var(--popover); color:var(--popover-foreground); border:1px solid var(--border); box-shadow:0 8px 30px #0003; }
.mtc-game-options label { display:flex; align-items:center; gap:.7rem; font-size:.85rem; padding:.6rem 0; cursor:pointer; }
.mtc-game-options input { width:18px; height:18px; accent-color:var(--ring); flex-shrink:0; }
html[data-design="mtc"] header .mtc-game-options a { display:block; font-size:.8rem; letter-spacing:normal; text-transform:none; padding-top:.7rem; color:var(--popover-foreground); }
.mtc-game-card { text-align:left; cursor:pointer; }
.mtc-game-card[aria-pressed="true"] { outline:2px solid var(--ring); }
.mtc-game-card h2 { font-size:1.1rem; }
.mtc-game-admin { display:grid; gap:.7rem; border-top:1px solid var(--border); padding-top:1rem; }
.mtc-admin-card .mtc-check-label { display:flex; align-items:center; gap:.7rem; }
.mtc-admin-card .mtc-check-label input { width:18px; height:18px; }
.mtc-game-model-picker { display:grid; gap:.65rem; }
.mtc-admin-card input[type="color"] { height:44px; max-width:160px; padding:2px; }
@media(max-width:1050px) {
 .mtc-logo-wide { display:none; }.mtc-logo-small { display:block; }
 .mtc-top-nav { grid-template-columns:40px auto minmax(0,1fr); gap:.5rem; padding-inline:1rem; }
 .mtc-top-nav > .mtc-section-tabs { margin:0; }
 .mtc-top-nav > .mtc-section-tabs > a,.mtc-models-menu > a { padding-inline:.6rem; }
}
@media(max-width:736px) {
 .mtc-top-nav { grid-template-columns:40px minmax(0,1fr); }
 .mtc-game-options { position:fixed; top:var(--mtc-nav-height,112px); right:1rem; }
 .mtc-game-tooltip { right:-40px; }
}
.mtc-selected-game { display:block; padding:.2rem 0; }
/* Compact country preview anchored beside the pointer, not to a page corner. */
html[data-design="mtc"] .mtc-country-card {
 position:fixed; right:auto; bottom:auto; width:min(360px,calc(100vw - 24px));
 grid-template-columns:34% minmax(0,1fr); max-height:min(300px,calc(100svh - var(--mtc-nav-height,64px) - 24px)); overflow:auto;
}
html[data-design="mtc"] .mtc-country-card .mtc-card-preview { min-height:150px; }
html[data-design="mtc"] .mtc-country-card .mtc-category-copy { padding:1rem; }
html[data-design="mtc"] .mtc-country-card h2 { font-size:.85rem; letter-spacing:.04rem; }
html[data-design="mtc"] .mtc-country-card p { font-size:.78rem; line-height:1.6; }
html[data-design="mtc"] .mtc-country-card .mtc-register-link { font-size:.72rem; padding:.45rem .6rem; }
.mtc-candidate-tabs { flex-wrap:wrap; justify-content:center; }
.mtc-disabled-tab { display:flex; align-items:center; padding:.65rem 1.1rem; text-transform:uppercase; letter-spacing:.12rem; font-size:.8rem; font-weight:700; color:#8b9098; opacity:.55; cursor:not-allowed; user-select:none; }
@media(max-width:736px) {
 .mtc-disabled-tab { min-height:44px; padding:.6rem .65rem; font-size:.7rem; letter-spacing:.05rem; }
}
.mtc-candidate-shell .mtc-admin-nav .mtc-disabled-tab { padding:.7rem .5rem; text-transform:none; letter-spacing:normal; font-size:.85rem; }
.mtc-pending-label { padding:.5rem; border:1px solid var(--border); background:var(--secondary); }

/* Public map starts beneath the navigation. */
html[data-design="mtc"] .mtc-top-header + main:has(> .mtc-map-landing) {
  padding-top:var(--mtc-nav-height,64px);
}
html[data-design="mtc"] .mtc-top-header + main > section.mtc-map-landing {
  min-height:calc(100svh - var(--mtc-nav-height,64px));
  padding-top:0;
}
/* Model catalogue presentation copied from MTC's project-card/project-image/project-info. */
.mtc-model-catalog { background:var(--background); min-height:100svh; }
html.dark .mtc-model-catalog { background:var(--background); }
html[data-design="mtc"] .mtc-top-header + main:has(.mtc-model-catalog) { padding-top:0; }
html[data-design="mtc"] header.mtc-top-header:has(+ main .mtc-model-hero) {
 background:rgba(30,35,30,.35); border-bottom-color:#ffffff40; color:#fff;
 --foreground:#fff; --muted-foreground:#eee; --primary:#fff; --primary-foreground:#171717; --secondary:#ffffff1a;
}
.mtc-model-hero { height:100svh; min-height:500px; width:100%; position:relative; overflow:hidden; background:var(--background); color:var(--foreground); }
.mtc-model-hero > img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; opacity:0; transition:opacity 3s ease; }
.mtc-model-hero > img.is-active { opacity:1; }
.mtc-hero-empty { display:grid; place-items:center; height:100%; padding:2rem; text-align:center; color:var(--muted-foreground); }
.mtc-model-hero-controls { position:absolute; bottom:1.5rem; left:50%; transform:translateX(-50%); display:flex; align-items:center; gap:.4rem; padding:.25rem .5rem; background:#0007; backdrop-filter:blur(8px); border:1px solid #ffffff40; }
.mtc-model-hero-controls :is(button,a) { width:40px; height:40px; display:grid; place-items:center; color:#fff; cursor:pointer; }
.mtc-model-hero-controls :is(button,a):focus-visible { outline:2px solid white; }
.mtc-model-content { max-width:1200px; margin:auto; padding:4rem 2rem; scroll-margin-top:calc(var(--mtc-nav-height,64px) + 1rem); }
html[data-design="mtc"] .mtc-model-content > h1 { font-size:clamp(1.75rem,3vw,2.5rem); margin-bottom:1rem; }
.mtc-model-content :is(.mtc-category-grid,.mtc-model-results) { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:2rem; margin-top:2rem; }
html[data-design="mtc"] .mtc-model-catalog :is(.mtc-category-card,.mtc-model-result) {
 display:block; background:var(--card); color:var(--card-foreground); border:0; border-radius:8px; overflow:hidden;
 box-shadow:0 2px 8px #0000001a; transition:transform .3s,box-shadow .3s; min-height:320px;
}
html[data-design="mtc"] .mtc-model-catalog :is(.mtc-category-card,.mtc-model-result):hover { transform:translateY(-4px); box-shadow:0 4px 16px #00000026; outline:none; }
.mtc-model-catalog .mtc-card-preview { width:100%; height:200px; min-height:200px; }
.mtc-model-catalog .mtc-card-preview img { transition:opacity 1s,transform .3s; }
.mtc-model-catalog .mtc-category-card:hover .mtc-card-preview img { transform:scale(1.05); }
.mtc-model-catalog :is(.mtc-category-copy,.mtc-model-result-copy) { padding:1.5rem; }
html[data-design="mtc"] .mtc-model-catalog :is(.mtc-category-copy h3,.mtc-model-result h2) { font-size:1.2rem; font-weight:900; letter-spacing:.2rem; line-height:1.3; margin:0 0 .75rem; }
.mtc-model-catalog .mtc-model-result > img,.mtc-model-catalog .mtc-result-empty { width:100%; height:200px; aspect-ratio:auto; object-fit:cover; }
.mtc-model-catalog .mtc-model-result p { margin:0; }
.mtc-model-catalog .mtc-model-author { text-decoration:underline; color:var(--muted-foreground); font-size:.85rem; }
.mtc-model-catalog .mtc-model-excerpt { font-size:.85rem; padding-top:.75rem; display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; }
.mtc-category-back { display:inline-block; margin-bottom:1.5rem; text-decoration:underline; }
@media(max-width:1000px) { .mtc-model-content :is(.mtc-category-grid,.mtc-model-results) { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:600px) { .mtc-model-content { padding:2.5rem 1rem; }.mtc-model-content :is(.mtc-category-grid,.mtc-model-results) { grid-template-columns:1fr; gap:1.5rem; }.mtc-model-hero { min-height:420px; } }
@media(prefers-reduced-motion:reduce) { .mtc-model-hero > img,.mtc-model-catalog :is(.mtc-category-card,.mtc-model-result) { transition:none; } }
.mtc-creator-avatar { width:100px; height:100px; object-fit:cover; border-radius:50%; margin-block:1rem; }
.mtc-creator-about { white-space:pre-wrap; max-width:800px; margin-block:1rem 3rem; }
.mtc-creator-permission { display:flex; flex-wrap:wrap; align-items:center; gap:1rem; padding:1rem; border:1px solid var(--border); margin-top:.75rem; }
.mtc-creator-permission span { flex:1; }
.mtc-creator-permission input { width:20px; height:20px; }
