:root {
  --bg: #fafafa;
  --card: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --accent: #2563eb;
  --border: #e5e7eb;
  --surface: #f9fafb;
}
* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
}

body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Helvetica, Arial;
  background: var(--bg);
  color: var(--text);
}

.container { max-width: 1000px; margin: 0 auto; padding: 16px; }

header h1 { margin: 0 0 4px; }
.subtitle { color: var(--muted); margin: 0; }

.filters {
  display: flex;
  align-items: center;
  justify-content: center;   
  gap: 8px;
  flex-wrap: nowrap;
  margin: 16px auto;         
  max-width: 1000px;         
}

.filters input[type="text"] {
  flex: 1 1 280px;
  min-width: 220px;
  max-width: 320px;          
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #d1d5db;
  background: #fff;
  color: var(--text);
}

.filters select {
  flex: 0 0 200px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #d1d5db;
  background: #fff;
  color: var(--text);
}

.filters label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  white-space: nowrap;
  color: var(--muted);
  font-size: 14px;
  flex: 0 0 auto;
}
.filters input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
}

.filters button {
  flex: 0 0 auto;
  padding: 10px 16px;
  border-radius: 10px;
  border: 0;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

@media (max-width: 720px) {
  .filters {
    flex-wrap: wrap;
    justify-content: center;  
  }
  .filters select { flex: 1 1 180px; }
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}

.card {
  background: var(--card);
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
  min-width: 0; 
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0,0,0,.08);
  border-color: #d1d5db;
}

.card a.link { text-decoration: none; }

.headerline {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  overflow: hidden;
}

.logo-box{
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #f3f4f6;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 20px;
  color: var(--text);
  flex: 0 0 auto;
  overflow: hidden;
  position: relative;
  border: 1px solid #e5e7eb;
}
.logo-box img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  display: none;
}
.logo-box.ok img{ display:block; }
.logo-fallback{
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  color: var(--muted);
}

.logo-box.ok .logo-fallback { display: none; }

.card .title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  max-height: calc(1.3em * 2); 
  overflow: hidden;
  white-space: normal;
  word-break: break-word;
}

.card .desc {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
  max-height: calc(1.4em * 3); 
  overflow: hidden;
  white-space: normal;
  word-break: break-word;
}

.badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 8px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  font-size: 12px;
  color: var(--muted);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tag {
  display: inline-block; padding: 4px 8px; border-radius: 8px;
  background:#f3f4f6; border:1px solid #e5e7eb; font-size:12px; margin-right:6px;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}
.rating { font-variant-numeric: tabular-nums; color: var(--accent); }

.link { color: var(--accent); font-weight: 600; }

#more{
  padding: 10px 14px; border-radius: 10px; background:#f9fafb;
  color: var(--text); border:1px solid #e5e7eb; cursor:pointer;
}
#more:hover{ background:#f3f4f6; }

main { flex: 1; }
.foot {
  color: var(--muted);
  text-align: center;
  padding: 12px;
  border-top: 1px solid #e5e7eb;
  background: #fff;
  border-radius: 16px 16px 0 0;
}

.foot .foot-year{
  color: #374151;            
}

.foot small,
.foot .foot-copy{
  color: #111827;
}

.skeleton {
  background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 37%, #f3f4f6 63%);
  background-size: 400% 100%;
  animation: shimmer 1.2s ease-in-out infinite;
  border-radius: 10px;
}
@keyframes shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}
.skel-card {
  height: 120px;
  padding: 16px;
  border: 1px solid #e5e7eb;
  background: var(--card);
  border-radius: 16px;
}

.site-header {
  background: var(--card);
  border-bottom: 1px solid #e5e7eb; 
  border-radius: 0 0 16px 16px;     
  padding: 8px 16px 14px;
  margin: 0 0 16px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.site-header .container {
  padding-left: 0;
  padding-right: 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 10px;       
  padding-bottom: 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.brand-mark {
  width: 32px; height: 32px; border-radius: 10px;
  background: #f3f4f6;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 900; letter-spacing: .5px; color: var(--text);
  border: 1px solid #e5e7eb;
}
.brand-name { font-weight: 800; font-size: 18px; color: var(--text); }
.brand-badge{
  margin-left: 6px; font-size: 11px;  color: #fff; background: var(--accent);
  padding: 2px 6px; border-radius: 999px; font-weight: 700;
}

.nav-actions { display: flex; align-items: center; gap: 10px; }
.nav-link {
  color: var(--muted); text-decoration: none; font-size: 14px;
  padding: 8px 10px; border-radius: 10px; border: 1px solid transparent;
}
.nav-link:hover { color: var(--text); border-color: #e5e7eb; background: #f3f4f6; }
.nav-cta {
  background: var(--accent); color: #fff; text-decoration: none;
  font-weight: 700; padding: 8px 12px; border-radius: 10px; border: 0;
}
.nav-cta:hover { filter: brightness(1.05); }

.hero { padding-block: 12px 6px; text-align:center; }
.hero-title {
  margin: 0 0 6px;
  font-size: clamp(22px, 3.4vw, 28px);
  line-height: 1.1;
  color: var(--text);
}
.hero-subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}
.hero-stats {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-top: 10px; justify-content:center;
}
.stat-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px; border-radius: 999px;
  background: #f3f4f6; border: 1px solid #e5e7eb; color: var(--muted);
  font-size: 12px;
}
.stat-pill b { color: var(--text); font-variant-numeric: tabular-nums; }

@media (max-width: 640px){
  .topbar { padding-block: 10px; }
  .nav-actions { gap: 6px; }
  .nav-link { display:none; } 
}

.tagline {
  text-align: center;
  flex: 1;
}

.tagline .hero-title {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
}

.tagline .hero-subtitle {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.modal {
  position: fixed !important;       
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2147483647 !important;   
}
.modal.hidden { display: none; }

.modal .backdrop {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(2px) saturate(140%);
  z-index: 0;
  pointer-events: none;             
}

.modal .dialog {
  position: relative;
  z-index: 2;                       
  max-width: 860px;
  width: clamp(320px, 90vw, 860px);
  max-height: 90vh;
  overflow: auto;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.15);
  pointer-events: auto;             
}

.modal .header {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 18px 20px 0;
}
.modal .body {
  padding: 12px 20px 20px;
  color: #333;
  line-height: 1.6;
}
.modal .footer {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px 18px;

  position: relative;
  z-index: 3;
  pointer-events: auto;
}

.modal h2 {
  margin: 0;
  font-size: 22px;
  color: #111;
}
.modal .rating {
  font-size: 12px;
  color: #b56b00;
  background: #fff7d6;
  border: 1px solid #f4e0a3;
  border-radius: 999px;
  padding: 4px 8px;
}
.modal .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.modal .badge {
  font-size: 12px;
  color: #444;
  border: 1px solid #e2e8f0;
  background: #f7f8fa;
  border-radius: 999px;
  padding: 4px 8px;
}

.modal .desc { margin-top: 12px; }
.modal .video {
  margin-top: 16px;
  border: 1px dashed #ddd;
  border-radius: 12px;
  aspect-ratio: 16/9;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #888;
}

.video.thumb-mode .play-btn{
  box-shadow: 0 6px 20px rgba(0,0,0,.25);
}

.btn, a.btn, #m-visit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #d1d5db;
  background: #f9fafb;
  color: #111;
  border-radius: 10px;
  padding: 10px 14px;
  text-decoration: none;
  transition: background 0.2s;

  position: relative;
  z-index: 4;
  pointer-events: auto;
  cursor: pointer;
}
.btn:hover { background: #eef2f6; }
.btn.primary {
  background: #2563eb;
  color: #fff !important;
  border-color: #2563eb;
}
.btn.primary:hover { background: #1d4ed8; }

.logo-box-md {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;

  position: relative;         
  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 10px;
  background: rgba(0, 0, 0, 0.04);
  overflow: hidden;           
}

.logo-box-md .logo-fallback {
  position: static !important; 
  inset: auto !important;

  display: flex;
  align-items: center;
  justify-content: center;

  width: 100%;
  height: 100%;

  font-size: 22px;
  line-height: 1;
  font-weight: 700;
  color: #555;
}

.logo-box-md img {
  max-width: 100%;
  max-height: 100%;
  display: block;
  object-fit: contain;
}

.modal .close {
  position: absolute;
  z-index: 5;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid #fca5a5;    
  background: #fee2e2;          
  color: #b91c1c;               
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
}

.modal .close:hover {
  background: #ef4444;          
  color: #fff;                  
  border-color: #ef4444;
  transform: scale(1.05);
}

#m-visit {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 130px;
  height: 40px;
  font-size: 14px !important;
  font-weight: 500;
  line-height: 1;
  border-radius: 10px;
  cursor: pointer !important;
  pointer-events: auto !important;
  opacity: 1 !important;
  visibility: visible !important;
  text-decoration: none !important;
  text-align: center;
  background: #2563eb !important; 
  color: #fff !important;          
  border: 1px solid #2563eb !important;
  transition: background 0.2s ease;
}

#m-visit:hover {
  background: #1d4ed8 !important;
}

#m-visit[disabled],
#m-visit:disabled {
  opacity: 1 !important;
  background: #2563eb !important;
  color: #fff !important;
  pointer-events: auto !important;
}

#lang-toggle {
  border: 1px solid #e2e8f0;
  background: #fff;
  border-radius: 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  width: 46px;
  height: 32px;
  padding: 0;
  transition: background 0.3s ease, transform 0.3s ease;
}

#lang-toggle:hover {
  background: #f7f8fa;
  transform: scale(1.05);
}

#lang-toggle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 8px;
  opacity: 0;
  transform: scale(0.95);
  transition:
    opacity 0.45s ease,
    transform 0.45s ease;
}

#lang-toggle img.visible {
  opacity: 1;
  transform: scale(1);
}

#lang-toggle img.fade-out {
  opacity: 0;
  transform: scale(0.95);
}

@media (max-width: 768px) {
  .topbar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding-block: 10px;
  }

  .brand { justify-content: center; }
  .brand-mark { width: 28px; height: 28px; }
  .brand-name { font-size: 16px; }

  .tagline {
    order: 2;
    text-align: center;
    padding: 0 8px;
  }
  .tagline .hero-title {
    font-size: 18px;
    line-height: 1.2;
  }
  .tagline .hero-subtitle { font-size: 12px; }

  .nav-actions {
    order: 3;
    justify-content: center;
    gap: 8px;
  }
  .nav-cta {
    padding: 8px 12px;
    font-size: 14px;
  }

  .site-header {
    padding: 0 12px 14px;
    margin-bottom: 12px;
    border-radius: 0 0 10px 10px;
  }

  .container { padding: 12px; }
}

@media (max-width: 820px) {
  .filters {
    flex-wrap: wrap;
    gap: 8px;
  }
  .filters input[type="text"] {
    flex: 1 1 100%;
    min-width: 0;
    max-width: none;
  }
  .filters select {
    flex: 1 1 calc(50% - 8px);
  }
  .filters label {
    flex: 1 1 calc(50% - 8px);
    justify-content: center;
  }
  .filters button#apply {
    flex: 1 1 100%;
  }
}

@media (max-width: 480px) {
  .filters select,
  .filters label {
    flex: 1 1 100%;
  }
}

@media (max-width: 640px){
  .modal{ align-items: flex-end; }
  .modal .backdrop{ pointer-events: auto; }

  .modal .dialog{
    width: 100vw;
    max-width: none;
    max-height: 92vh;                      
    margin: 0;
    border-radius: 16px 16px 0 0;          
    overflow: auto;
  }

  .modal .header{ padding: 14px 16px 0; }
  .modal .body{   padding: 10px 16px 16px; }
  .modal .footer{
    position: sticky;
    bottom: 0;
    padding: 10px 16px 16px;
    background: #fff;
    border-top: 1px solid #e5e7eb;
  }

  .modal h2{ font-size: 18px; }
  .modal .meta{ gap: 6px; }
  .logo-box-md{ width: 40px; height: 40px; }

  .modal .close{
    top: 8px; right: 8px;
    width: 38px; height: 38px;
    font-size: 18px;
  }

  #m-visit{
    width: 100%;
    height: 44px;
    font-size: 16px !important;
  }
}

body.modal-open{ overflow: hidden; }

#m-video {
  width: calc(100% + 40px);       
  margin-left: -20px !important;
  margin-right: -20px !important;
  margin-top: 0 !important;       
}

.modal .video {
  position: relative;             
  width: 100%;
  aspect-ratio: 16 / 9;           
  border-radius: 0 !important;    
  overflow: hidden;
  margin: 0 !important;
  padding: 0 !important;
}

.modal .video iframe {
  position: absolute;
  inset: 0;                       
  width: 100% !important;
  height: 100% !important;
  border: none;
  display: block;
}

.video.thumb-mode {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 0 !important;
  overflow: hidden;
}
.video.thumb-mode img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.embed-fallback img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 0 !important;
}

.th24-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.18);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.th24-backdrop.th24-hidden { display: none; }

.th24-modal {
  position: relative;
  max-width: 640px;
  width: min(640px, 94vw);
  background: var(--card);                      
  color: var(--text);
  border-radius: 18px;
  padding: 24px 24px 20px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.20);
  border: 1px solid var(--border);

  opacity: 0;
  transform: translateY(10px) scale(0.97);
  animation: th24-modal-in 0.22s ease-out forwards;
}

@keyframes th24-modal-in {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.th24-modal-header h2 {
  margin: 8px 0 4px;
  font-size: 20px;
  color: var(--text);
}

.th24-modal-body p {
  margin: 8px 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
}

.th24-modal-body ul {
  margin: 8px 0 8px 18px;
  padding: 0;
  font-size: 14px;
  color: var(--text);
}

.th24-modal-footer {
  margin-top: 16px;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.th24-btn-primary {
  border: none;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 14px;
  cursor: pointer;
  background: linear-gradient(135deg, #22c55e, #0ea5e9);
  color: #020617;
  font-weight: 600;
}

.th24-btn-primary:hover { filter: brightness(1.05); }

.th24-btn-ghost {
  border-radius: 999px;
  padding: 8px 16px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: transparent;
  color: #e5e7eb;
  font-size: 13px;
  cursor: pointer;
}

.th24-btn-ghost:hover { background: rgba(15, 23, 42, 0.8); }

.th24-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 1px solid rgba(37, 99, 235, 0.35);    
  color: var(--accent);
  background: #eff6ff;
}

.th24-links {
  margin-top: 12px;
  font-size: 13px;
  color: var(--muted);
}

.th24-link {
  text-decoration: underline;
  cursor: pointer;
  color: var(--accent);
}

.th24-link-disabled {
  opacity: 0.5;
  pointer-events: none;
}

.th24-intro-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border-radius: 10px;                
  border: 1px solid #fca5a5;
  background: #fee2e2;
  color: #b91c1c;
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.04);
  z-index: 10000;
  transition: all 0.25s ease;
}

.th24-intro-close:hover {
  background: #ef4444;
  color: #fff;
  border-color: #ef4444;
  transform: scale(1.05);
}

.brand-24{
  background: linear-gradient(90deg, #fb923c, #facc15);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  font-weight: 900;
  display: inline-block;
  margin-left: 2px;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.home-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: #f1f5f9;
  color: #0f172a;
  border: 1px solid #cbd5e1;
  box-shadow: 0 2px 4px rgba(0,0,0,0.08);
  text-decoration: none;
  cursor: pointer;
  transition: all .2s ease;
}

.home-badge:hover {
  background: #e2e8f0;
  border-color: #94a3b8;
  transform: translateY(-1px);
}

@media (max-width: 640px) {
  .th24-backdrop {
    align-items: flex-end;
    padding: 0;
  }

  .th24-modal {
    width: 100vw;
    max-width: none;
    margin: 0;
    border-radius: 16px 16px 0 0;   
    padding: 16px 16px 14px;
    max-height: 85vh;               
    overflow: auto;
  }

  .th24-modal-body {
    font-size: 13px;
    line-height: 1.5;
  }

  .th24-modal-body p { margin: 6px 0; }

  .th24-modal-body ul { margin: 6px 0 6px 18px; }

  .th24-intro-close {
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    font-size: 18px;
  }
}

.th-tip{
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 22px;
  height: 22px;
  border-radius: 999px;

  border: 1px solid #e5e7eb;
  background: #ffffff;
  color: #64748b;

  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  cursor: help;

  padding: 0;
  user-select: none;
}

.th-tip:hover{
  border-color: #cbd5e1;
  background: #f8fafc;
  color: #0f172a;
}

.th-tip:focus{ outline: none; }

.th-tip:focus-visible{
  outline: 2px solid rgba(37, 99, 235, .35);
  outline-offset: 2px;
}

.th-tip::after{
  content: attr(data-tip);
  position: absolute;
  z-index: 30;

  left: 50%;
  bottom: calc(100% + 10px);
  transform: translateX(-50%);

  min-width: 200px;
  max-width: 320px;

  padding: 10px 12px;
  border-radius: 12px;

  background: rgba(255,255,255,.98);
  border: 1px solid #e5e7eb;
  color: #0f172a;

  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;

  box-shadow: 0 14px 34px rgba(15, 23, 42, .12);

  opacity: 0;
  pointer-events: none;
  transition: opacity .12s ease, transform .12s ease;
}

.th-tip::before{
  content: "";
  position: absolute;
  z-index: 31;

  left: 50%;
  bottom: calc(100% + 4px);
  transform: translateX(-50%) rotate(45deg);

  width: 10px;
  height: 10px;
  background: rgba(255,255,255,.98);
  border-left: 1px solid #e5e7eb;
  border-top: 1px solid #e5e7eb;

  opacity: 0;
  pointer-events: none;
  transition: opacity .12s ease;
}

.th-tip:hover::after,
.th-tip:focus::after,
.th-tip:hover::before,
.th-tip:focus::before,
.th-tip.is-open::after,
.th-tip.is-open::before{
  opacity: 1;
}

.th-tip:hover::after,
.th-tip:focus::after,
.th-tip.is-open::after{
  transform: translateX(-50%) translateY(-2px);
}

#stats-btn.stats-btn{
  border: 1px solid #e2e8f0;
  background: #fff;
  border-radius: 10px;

  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  overflow: hidden;
  width: 46px;
  height: 32px;
  padding: 0;

  position: relative;
  transition: background 0.3s ease, transform 0.3s ease;
}

#stats-btn.stats-btn:hover{
  background: #f7f8fa;
  transform: scale(1.05);
}

#stats-btn.stats-btn img{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;

  display: block;
  object-fit: cover;
  border-radius: 8px;

  margin: 0;
  padding: 0;

  opacity: 0;
  transform: translateY(6px) scale(0.98);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

#stats-btn.stats-btn img.visible{
  opacity: 1;
  transform: translateY(0) scale(1);
}

#stats-btn.stats-btn img.fade-out{
  opacity: 0;
  transform: translateY(-6px) scale(0.98);
}

#stats-modal .brand-24 { margin-left: 2px; }

.subsystems-grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.subsystem-card{
  display:flex;
  align-items:flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
}

.subsystem-head{ min-width:0; }
.subsystem-name{
  font-weight: 800;
  font-size: 16px;
  color: #111827;
}
.subsystem-desc{
  margin-top: 6px;
  font-size: 13px;
  color: #6b7280;
  line-height: 1.45;
}

@media (max-width: 640px){
  .subsystem-card{
    flex-direction: column;
    align-items: stretch;
  }
}