/* ==========================================
   BUILD YOUR ULTIMATE IDOL – JKT48
   Ultimate Matrix Table & Glassmorphism Theme
   ========================================== */

/* ── CSS Variables ── */
:root {
  --pink: #ff6b9d;
  --pink-light: #ff9ec2;
  --pink-dark: #d4387a;
  --purple: #9b5de5;
  --purple-dark: #6d28d9;
  --blue: #48cae4;
  --blue-dark: #0096c7;
  --gold: #ffd60a;
  --gold-dark: #e8a900;
  --green: #06d6a0;
  --red: #ef233c;

  /* Flat dark theme colors */
  --bg-dark: #121212;
  --bg-card: #1e1e1e;
  --bg-card-hover: #2a2a2a;
  --border: #333333;
  --border-hover: #555555;
  --text-primary: #ffffff;
  --text-secondary: #a0a0a0;
  --text-muted: #666666;

  /* Remove heavy shadows */
  --shadow-glow: none;
  --shadow-card: none;
  --shadow-hover: 0 4px 12px rgba(0,0,0,0.5);

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  --transition: all 0.2s ease-in-out;
  --transition-slow: all 0.3s ease-in-out;
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  max-width: 100vw;
  width: 100%;
  overflow-x: hidden !important;
}
body {
  font-family: 'Outfit', 'Noto Sans JP', sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  min-height: 100vh;
  max-width: 100vw;
  width: 100%;
  overflow-x: hidden !important;
  position: relative;
  line-height: 1.5;
  margin: 0;
  padding: 0;
}

/* ── Animated Background ── */
.bg-animated {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.22;
  animation: orbFloat 14s ease-in-out infinite;
}

.orb1 {
  width: 650px; height: 650px;
  background: radial-gradient(circle, #ff6b9d, #9b5de5);
  top: -200px; left: -200px;
  animation-delay: 0s;
}

.orb2 {
  width: 550px; height: 550px;
  background: radial-gradient(circle, #48cae4, #9b5de5);
  bottom: -150px; right: -150px;
  animation-delay: -5s;
}

.orb3 {
  width: 450px; height: 450px;
  background: radial-gradient(circle, #ffd60a, #ff6b9d);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: -9s;
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0,0) scale(1); }
  33% { transform: translate(30px,-40px) scale(1.05); }
  66% { transform: translate(-20px,30px) scale(0.95); }
}

.bg-particles { position: absolute; inset: 0; }

/* ── Glass Card ── */
.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

/* ── Header ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #121212;
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
}

.header-inner {
  max-width: 1550px;
  margin: 0 auto;
  min-height: 70px;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 6px 0;
  box-sizing: border-box;
}

.logo-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  width: 36px;
  height: 36px;
}

.logo-img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.logo-img:hover {
  transform: scale(1.1) rotate(6deg);
}

.logo-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
  letter-spacing: -0.5px;
}

.logo-sub {
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
}

.header-nav {
  display: flex;
  gap: 8px;
}

.nav-btn {
  background: #1e1e1e;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 10px 24px;
  border-radius: 99px;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.nav-btn:hover {
  background: #2a2a2a;
  color: var(--text-primary);
}

.nav-btn.active {
  background: #ffffff;
  border-color: #ffffff;
  color: #121212;
}

/* ── Main Content ── */
.main-content {
  position: relative;
  z-index: 1;
  max-width: 1550px;
  width: 100%;
  margin: 16px auto 0;
  padding: 20px 20px 60px;
  box-sizing: border-box;
  overflow-x: hidden;
}

/* ── Tab Sections ── */
.tab-section { display: none; animation: fadeIn 0.3s ease; }
.tab-section.active { display: block; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Builder Layout (Members Pool + Matrix) ── */
.builder-layout {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
}

/* ── Members Panel (Left Sidebar) ── */
.members-panel {
  padding: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  order: 2; /* Ensure it's below the matrix */
}

.panel-header {
  padding: 14px 14px 10px;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.03);
}

.panel-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.search-row {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
}

.search-input, .filter-select {
  background: rgba(255,255,255,0.07);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.78rem;
  padding: 7px 9px;
  outline: none;
  transition: var(--transition);
}

.search-input-wrap {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
}

.search-input {
  width: 100%;
  padding-right: 28px;
}

.search-input::placeholder { color: var(--text-muted); }
.search-input:focus, .filter-select:focus { border-color: var(--pink); }

.btn-clear-search {
  position: absolute;
  right: 8px;
  background: rgba(255,255,255,0.12);
  border: none;
  border-radius: 50%;
  color: rgba(255,255,255,0.7);
  width: 18px;
  height: 18px;
  font-size: 0.65rem;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.btn-clear-search.show {
  display: flex;
}

.btn-clear-search:hover {
  background: var(--pink);
  color: #fff;
  transform: scale(1.1);
}
.filter-select { cursor: pointer; }
.filter-select option { background: #1a0a2e; }

.member-count-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.btn-refresh {
  background: #2a2a2a;
  border: 1px solid var(--border);
  color: var(--text-primary);
  border-radius: 50%;
  cursor: pointer;
  transition: var(--transition);
  padding: 4px;
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-refresh:hover {
  background: #3a3a3a;
  transform: rotate(180deg);
}

/* ── Members Grid ── */
.members-grid {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(125px, 1fr));
  gap: 12px;
  scrollbar-width: thin;
  scrollbar-color: var(--pink-dark) transparent;
}

.members-grid::-webkit-scrollbar { width: 5px; }
.members-grid::-webkit-scrollbar-track { background: transparent; }
.members-grid::-webkit-scrollbar-thumb { background: var(--pink-dark); border-radius: 999px; }

/* ── Member Card ── */
.member-card {
  background: rgba(255,255,255,0.05);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: grab;
  transition: var(--transition);
  user-select: none;
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 205px;
  height: auto;
}

.member-card:hover {
  border-color: var(--pink);
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.member-card:active { cursor: grabbing; transform: scale(0.96); opacity: 0.85; }

.member-card.dragging {
  opacity: 0.4;
  transform: scale(0.95);
  border-color: var(--pink);
}

.member-card.placed {
  border-color: var(--pink);
  box-shadow: 0 0 14px rgba(255, 107, 157, 0.4);
}

.member-card.selected-for-tap {
  border-color: var(--pink);
  box-shadow: 0 0 0 2px var(--pink);
  transform: translateY(-2px);
  z-index: 25;
}

.member-card, .td-matrix-cell, .btn-action, .btn-mode-toggle, .nav-btn, .btn-clear-search {
  touch-action: manipulation;
}

.member-place-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 2px;
}

.member-img-wrap {
  position: relative;
  width: 100%;
  height: 145px;
  min-height: 145px;
  background: #2a2a2a;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.member-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
  transition: var(--transition-slow);
}

.member-card:hover .member-img { transform: scale(1.07); }

.member-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  background: #2a2a2a;
}

.member-team-badge {
  position: absolute;
  top: 5px;
  right: 5px;
  font-size: 0.58rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 99px;
  letter-spacing: 0.05em;
  z-index: 2;
}

.badge-love { background: #ff48a5; color: #fff; }
.badge-dream { background: #4e9af1; color: #fff; }
.badge-passion { background: #ff8c00; color: #fff; }
.badge-trainee { background: linear-gradient(135deg, #eab308 0%, #a855f7 100%); color: #fff; }

.color-love { color: #ff48a5; }
.color-dream { color: #4e9af1; }
.color-passion { color: #ff8c00; }
.color-trainee { 
  background: linear-gradient(135deg, #facc15 0%, #c084fc 100%); 
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.member-info {
  padding: 8px 6px;
  text-align: center;
  min-height: 54px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: rgba(18,10,32,0.85);
}

.member-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  white-space: normal;
  overflow: hidden;
  text-overflow: ellipsis;
}

.member-nickname {
  font-size: 0.72rem;
  font-weight: 600;
  margin-top: 3px;
}

.matrix-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  order: 1; /* Above the member panel */
}

/* ── Top Controls Bar ── */
.top-controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  gap: 12px;
  flex-wrap: wrap;
}

.group-stats-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
}

.stat-chip {
  background: #1e1e1e;
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 5px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  height: 32px;
  min-height: 32px;
  max-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  white-space: nowrap;
}

.progress-bar-wrap {
  width: 100%;
  height: 6px;
  background: rgba(255,255,255,0.08);
  border-radius: 99px;
  overflow: hidden;
  margin: 6px 0 2px;
  position: relative;
  border: 1px solid rgba(255,255,255,0.06);
}

.progress-bar-fill {
  height: 100%;
  background: var(--pink);
  border-radius: 99px;
  transition: width 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.control-buttons-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.btn-mode-toggle {
  background: #1e1e1e;
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 9px 15px;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-mode-toggle:hover {
  background: #2a2a2a;
  border-color: #555;
}

/* ── Buttons ── */
.btn-action {
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 9px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 5px;
  background: #1e1e1e;
  color: var(--text-primary);
}

.btn-action:hover { background: #2a2a2a; border-color: #555; }
.btn-action:active { transform: scale(0.98); }

.btn-clear { color: #ff6b6b; border-color: #552222; }
.btn-clear:hover { background: #2a1a1a; border-color: #ff6b6b; }
.btn-auto { color: var(--green); border-color: #1a3a2a; }
.btn-auto:hover { background: #1a2a22; border-color: var(--green); }
.btn-save { background: #2a2a2a; color: var(--text-primary); }
.btn-save:hover { background: #3a3a3a; border-color: #555; }
.btn-share { background: #2a2a2a; color: var(--text-primary); }
.btn-share:hover { background: #3a3a3a; border-color: #555; }
.btn-gallery { background: #2a2a2a; color: var(--text-primary); }

/* =========================================================
   THE ICONIC IDOL MATRIX TABLE (DEFAULT / PREMIUM GLASS MODE)
   ========================================================= */
.matrix-table-wrapper {
  overflow: hidden;
  border-radius: var(--radius-lg);
  padding: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
}

.idol-matrix-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: auto;
}

/* ── Top Player Name Row (Green Header Bar) ── */
.th-player-name {
  background: #222222;
  color: #fff;
  padding: 12px 16px;
  text-align: center;
  border-bottom: 1px solid #333;
}

.player-name-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  max-width: 420px;
  margin: 0 auto;
}

.player-name-icon { font-size: 1.3rem; }

.player-name-input {
  background: #1e1e1e;
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 5px 16px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  text-align: center;
  width: 220px;
  outline: none;
  transition: var(--transition);
}

.player-name-input:focus {
  background: #2a2a2a;
  border-color: #555;
}

.btn-random-name {
  background: rgba(0,0,0,0.15);
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}
.btn-random-name:hover { background: rgba(0,0,0,0.3); transform: rotate(180deg); }

/* ── Column Headers (Diagonal + 5 Teams) ── */
.th-diagonal {
  background: #1e1e1e;
  color: var(--text-primary);
  height: 48px;
  border: 1px solid var(--border);
  font-size: 1rem;
}

.diag-header-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  height: 100%;
  font-size: inherit;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: transparent;
}

.diag-top, .diag-bottom {
  position: static;
  color: inherit;
}

.diag-sep {
  opacity: 0.5;
  margin: 0 2px;
}

.th-team {
  font-size: 1rem;
  font-weight: 800;
  text-align: center;
  padding: 10px 6px;
  border: 1px solid rgba(0,0,0,0.25);
  letter-spacing: 0.5px;
}

/* Iconic Team Colors from user's screenshot */
.th-love { background: #ff48a5; color: #ffffff; text-shadow: 0 1px 2px rgba(0,0,0,0.3); }
.th-dream { background: #4e9af1; color: #ffffff; text-shadow: 0 1px 2px rgba(0,0,0,0.3); }
.th-passion { background: #ff8c00; color: #ffffff; text-shadow: 0 1px 2px rgba(0,0,0,0.3); }
.th-trainee { background: linear-gradient(135deg, #eab308 0%, #a855f7 100%); color: #ffffff; text-shadow: 0 1px 2px rgba(0,0,0,0.5); }
.th-jkt48 { background: #ff0000; color: #ffffff; text-shadow: 0 1px 2px rgba(0,0,0,0.4); }

.td-category {
  background: #1e1e1e;
  border: 1px solid var(--border);
  padding: 10px 12px;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--text-primary);
  text-align: left;
  white-space: nowrap;
}

.category-label-flex {
  display: flex;
  align-items: center;
  gap: 8px;
}
.category-label-icon { font-size: 1.1rem; }

/* ── Interactive Data Cells (45 matrix slots) ── */
.td-matrix-cell {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  height: 54px;
  vertical-align: middle;
  text-align: center;
  padding: 4px;
  transition: var(--transition);
  position: relative;
  cursor: pointer;
}

.td-matrix-cell:hover {
  background: rgba(255,255,255,0.09);
  border-color: var(--pink);
}

.td-matrix-cell.drag-over {
  background: rgba(255,107,157,0.15);
  border: 2px dashed var(--pink);
}

.td-matrix-cell.tap-target {
  border: 2px dashed var(--pink);
  background: rgba(255, 107, 157, 0.1);
  cursor: pointer;
}

/* Empty Hint inside cell */
.cell-empty-hint {
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 500;
  opacity: 0.45;
  transition: var(--transition);
}
.td-matrix-cell:hover .cell-empty-hint { opacity: 0.9; color: var(--text-secondary); }

/* Filled cell content (Mini Avatar + Nickname) */
.cell-content-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 99px;
  padding: 4px 10px 4px 4px;
  margin: 0 auto;
  max-width: 95%;
  position: relative;
  transition: var(--transition);
}

.td-matrix-cell:hover .cell-content-pill {
  background: rgba(255,255,255,0.18);
  border-color: var(--pink-light);
}

.cell-mini-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top;
  flex-shrink: 0;
  border: 1.5px solid rgba(255,255,255,0.4);
}

.cell-mini-emoji {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  background: rgba(155,93,229,0.4);
  flex-shrink: 0;
}

.cell-member-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-cell-remove {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  border: none;
  font-size: 0.6rem;
  font-weight: 900;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition);
}
.td-matrix-cell:hover .btn-cell-remove { opacity: 1; }
.btn-cell-remove:hover { transform: scale(1.2); }

/* =========================================================
   EXCEL CLASSIC SPREADSHEET MODE (MIMIC SCREENSHOT 100%)
   ========================================================= */
body.excel-classic-mode .idol-matrix-table {
  background: #ffffff;
  color: #000000;
  font-family: 'Calibri', 'Arial', sans-serif;
  border: 2px solid #000000;
}

body.excel-classic-mode .th-player-name {
  background: #85c17e !important;
  color: #000000 !important;
  border: 1px solid #000000 !important;
}
body.excel-classic-mode .player-name-input {
  background: transparent !important;
  border: 1px dashed #000000 !important;
  color: #000000 !important;
  border-radius: 0 !important;
}
body.excel-classic-mode .player-name-input:focus {
  background: #fff !important;
  border-style: solid !important;
}

body.excel-classic-mode .th-diagonal {
  background: #f6b28e !important;
  color: #000000 !important;
  border: 1px solid #000000 !important;
}
body.excel-classic-mode .diag-header-box {
  background: transparent !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
}

body.excel-classic-mode .th-team {
  border: 1px solid #000000 !important;
}
body.excel-classic-mode .th-love { background: #ff48a5 !important; color: #000000 !important; text-shadow: none !important; }
body.excel-classic-mode .th-dream { background: #4e9af1 !important; color: #000000 !important; text-shadow: none !important; }
body.excel-classic-mode .th-passion { background: #fff000 !important; color: #000000 !important; }
body.excel-classic-mode .th-trainee { background: #737373 !important; color: #000000 !important; text-shadow: none !important; }
body.excel-classic-mode .th-jkt48 { background: #ff0000 !important; color: #000000 !important; text-shadow: none !important; }

body.excel-classic-mode .td-category {
  background: #ffffff !important;
  color: #000000 !important;
  border: 1px solid #000000 !important;
  font-weight: 700 !important;
}
body.excel-classic-mode .category-label-icon {
  display: none !important;
}

body.excel-classic-mode .td-matrix-cell {
  background: #ffffff !important;
  border: 1px solid #000000 !important;
  color: #000000 !important;
}
body.excel-classic-mode .td-matrix-cell:hover {
  background: #f0f7ff !important;
}
body.excel-classic-mode .cell-empty-hint {
  display: none !important;
}

/* In Excel Classic mode, remove the pill and avatar so it looks like plain text in the spreadsheet cell */
body.excel-classic-mode .cell-content-pill {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
}
body.excel-classic-mode .cell-mini-avatar,
body.excel-classic-mode .cell-mini-emoji {
  display: none !important;
}
body.excel-classic-mode .cell-member-name {
  color: #000000 !important;
  font-size: 0.95rem !important;
  font-weight: 400 !important;
}

/* ── Table Help Hint ── */
.table-help-hint {
  font-size: 0.78rem;
  color: var(--text-secondary);
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── Gallery ── */
.gallery-header {
  padding: 22px;
  margin-bottom: 18px;
  text-align: center;
}

.section-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.section-desc { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 16px; }

.gallery-sort-row {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.sort-btn {
  background: rgba(255,255,255,0.07);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 8px 18px;
  border-radius: 99px;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.sort-btn.active, .sort-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--pink);
  color: var(--text-primary);
}

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

.gallery-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
}

.gallery-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.gc-header {
  padding: 16px;
  background: var(--bg-card-hover);
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.gc-name {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
}

.gc-meta {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 3px;
}

.gc-score-badge {
  background: var(--gold-dark);
  color: #0a0612;
  font-weight: 800;
  font-size: 0.85rem;
  padding: 4px 12px;
  border-radius: 99px;
  white-space: nowrap;
}

.gc-matrix-preview {
  padding: 10px 14px;
  overflow-x: auto;
}

.mini-matrix-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.65rem;
  background: rgba(0,0,0,0.25);
  border-radius: 6px;
  overflow: hidden;
}
.mini-matrix-table th, .mini-matrix-table td {
  border: 1px solid rgba(255,255,255,0.1);
  padding: 3px 5px;
  text-align: center;
}
.mini-matrix-table th { font-weight: 700; color: var(--pink-light); }
.mini-matrix-table td { color: var(--text-secondary); }

.gc-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}

.gc-tier {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 99px;
}

.tier-legendary { background: rgba(255,214,10,0.2); color: var(--gold); border: 1px solid rgba(255,214,10,0.4); }
.tier-epic { background: rgba(155,93,229,0.2); color: var(--purple); border: 1px solid rgba(155,93,229,0.4); }
.tier-great { background: rgba(72,202,228,0.2); color: var(--blue); border: 1px solid rgba(72,202,228,0.4); }
.tier-good { background: rgba(6,214,160,0.2); color: var(--green); border: 1px solid rgba(6,214,160,0.4); }
.tier-starter { background: rgba(255,255,255,0.1); color: var(--text-muted); border: 1px solid var(--border); }

.gc-vote-row {
  display: flex;
  gap: 6px;
  align-items: center;
}

.btn-vote {
  background: rgba(255,107,157,0.15);
  border: 1px solid rgba(255,107,157,0.3);
  color: var(--pink);
  padding: 5px 12px;
  border-radius: 99px;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-vote:hover { background: rgba(255,107,157,0.3); }
.btn-vote.voted { background: rgba(255,107,157,0.4); border-color: var(--pink); }

/* ── Empty State ── */
.empty-gallery {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.empty-icon { font-size: 4rem; animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 0%,100%{transform:scale(1);} 50%{transform:scale(1.1);} }

/* ── Guide ── */
.guide-content { padding: 32px; max-width: 800px; margin: 0 auto; }
.guide-steps { display: flex; flex-direction: column; gap: 20px; margin: 24px 0; }

.guide-step {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  transition: var(--transition);
}

.guide-step:hover { border-color: var(--border-hover); background: var(--bg-card-hover); }

.step-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--pink-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1rem;
  flex-shrink: 0;
}

.step-content h3 { font-size: 1rem; font-weight: 700; margin-bottom: 4px; }
.step-content p { font-size: 0.85rem; color: var(--text-secondary); }

.category-guide { margin-top: 24px; }
.category-guide h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 14px; color: var(--text-primary); }
.cat-list { display: flex; flex-direction: column; gap: 8px; }

.cat-item {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-secondary);
  padding: 8px 12px;
  background: rgba(255,255,255,0.04);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.cat-item span { font-size: 1.2rem; }
.cat-item strong { color: var(--text-primary); }

/* ── Modals ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}

.modal-overlay.open { display: flex; }

.modal-box {
  max-width: 480px;
  width: 100%;
  padding: 32px;
  text-align: center;
  animation: popIn 0.35s cubic-bezier(0.34,1.56,0.64,1);
}

.modal-box.modal-lg {
  max-width: 680px;
}

@keyframes popIn {
  from { transform: scale(0.7); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-icon { font-size: 3rem; margin-bottom: 12px; }
.modal-title { font-size: 1.4rem; font-weight: 800; margin-bottom: 8px; color: var(--text-primary); }
.modal-desc { font-size: 0.9rem; color: var(--text-secondary); margin-bottom: 20px; }

.modal-preview-table {
  margin-bottom: 20px;
  overflow-x: auto;
}

.modal-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ── Clean Disclaimer Modal Pop-up (Natural, Non-AI-slop design) ── */
.disclaimer-popup-box {
  max-width: 500px !important;
  width: 100%;
  padding: 0 !important;
  background: #111827 !important;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  overflow: hidden;
  text-align: left !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.65);
}

.disclaimer-popup-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 24px 18px;
  background: #1f2937;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.disclaimer-popup-icon-wrap {
  color: #ff6b9d;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.disclaimer-popup-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: #f9fafb;
}

.disclaimer-popup-body {
  padding: 24px 24px 10px;
  color: #e5e7eb;
  font-size: 0.95rem;
  line-height: 1.65;
}

.disclaimer-popup-lead {
  margin: 0 0 14px 0;
  color: #f3f4f6;
}

.disclaimer-popup-p {
  margin: 0 0 16px 0;
  color: #d1d5db;
}

.disclaimer-popup-muted {
  margin: 0;
  font-size: 0.82rem;
  color: #9ca3af;
  font-style: italic;
  line-height: 1.5;
}

.disclaimer-popup-footer {
  padding: 16px 24px 22px;
  display: flex;
  justify-content: flex-end;
}

.btn-disclaimer-mengerti {
  background: #0284c7;
  color: #ffffff;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  padding: 10px 24px;
  font-size: 0.92rem;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
}

.btn-disclaimer-mengerti:hover {
  background: #0369a1;
  transform: translateY(-1px);
}

@media (max-width: 600px) {
  .disclaimer-popup-header {
    padding: 16px 20px;
  }
  .disclaimer-popup-body {
    padding: 20px 20px 10px;
    font-size: 0.9rem;
  }
  .disclaimer-popup-footer {
    padding: 14px 20px 20px;
  }
}

/* ── Share Buttons ── */
.share-buttons { display: flex; flex-direction: column; gap: 10px; width: 100%; }

.share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 20px;
  border-radius: var(--radius-md);
  border: none;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  width: 100%;
}

.share-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.4); }
.share-btn.twitter { background: #000; color: #fff; }
.share-btn.twitter:hover { background: #1a1a1a; }
.share-btn.facebook { background: #1877f2; color: #fff; }
.share-btn.facebook:hover { background: #1565d8; }
.share-btn.whatsapp { background: #25d366; color: #fff; }
.share-btn.whatsapp:hover { background: #1ebe5a; }
.share-btn.copy { background: rgba(255,255,255,0.1); color: var(--text-primary); border: 1px solid var(--border); }
.share-btn.copy:hover { background: rgba(255,255,255,0.18); }

/* ── Star Rating ── */
.star-rating {
  display: flex;
  justify-content: center;
  gap: 8px;
  font-size: 2.5rem;
  margin: 16px 0 24px;
}

.star {
  cursor: pointer;
  color: rgba(255,255,255,0.2);
  transition: var(--transition);
  display: inline-block;
}

.star:hover, .star.active {
  color: var(--gold);
  transform: scale(1.2);
  text-shadow: 0 0 20px rgba(255,214,10,0.7);
}

/* ── Loading State ── */
.loading-state {
  grid-column: 1/-1;
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255,107,157,0.2);
  border-top-color: var(--pink);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 12px;
}

/* ── Toast ── */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  left: auto;
  transform: translateY(100px);
  background: rgba(20,10,35,0.95);
  border: 1px solid var(--pink);
  border-radius: var(--radius-md);
  padding: 12px 20px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  z-index: 99999;
  transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1), opacity 0.35s ease;
  white-space: normal;
  max-width: 340px;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.6);
  opacity: 0;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* ── Comprehensive Responsive & Mobile-Friendly Styles ── */
@media (max-width: 1100px) {
  .builder-layout {
    grid-template-columns: 280px 1fr;
    gap: 16px;
  }
}

@media (max-width: 880px) {
  .site-header {
    height: auto !important;
    min-height: auto !important;
    padding: 12px 16px !important;
  }
  .site-header .header-inner {
    height: auto !important;
    min-height: auto !important;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
    padding: 4px 0;
  }
  .header-nav {
    width: 100%;
    justify-content: center;
    margin-bottom: 4px;
  }
  .main-content {
    padding: 8px 4px 16px !important;
    margin-top: 8px !important;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    box-sizing: border-box;
  }
  .builder-layout {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }
  .matrix-panel {
    display: flex;
    flex-direction: column;
    gap: 16px;
    order: 1;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }
  .matrix-table-wrapper {
    width: 100% !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: var(--radius-sm);
    box-sizing: border-box;
  }
  .idol-matrix-table {
    width: 100% !important;
    table-layout: auto !important;
  }
  .th-diagonal {
    font-size: 0.72rem;
    padding: 6px 4px;
  }
  .th-team {
    font-size: 0.72rem;
    padding: 6px 2px;
  }
  .td-category {
    font-size: 0.72rem;
    padding: 6px 4px;
    white-space: normal !important;
  }
  .td-matrix-cell {
    padding: 4px 2px;
    font-size: 0.65rem;
    height: 40px;
  }
  .cell-content-pill {
    padding: 2px 4px;
    gap: 4px;
    border-radius: 99px;
  }
  .cell-mini-avatar {
    width: 20px;
    height: 20px;
  }
  .cell-mini-name {
    font-size: 0.6rem;
  }
  .table-help-hint {
    order: 4;
  }
  .top-controls-bar {
    order: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 10px;
    box-sizing: border-box;
  }
  .mode-switch-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    width: 100%;
  }
  .mode-switch-tabs .btn-tab {
    flex: 1 1 auto;
    text-align: center;
    padding: 8px 12px;
    font-size: 0.85rem;
  }
  .group-stats-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 6px;
    width: 100%;
  }
  .group-stats-row .stat-chip {
    flex: 1 1 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    padding: 5px 8px;
    height: 28px;
    white-space: nowrap;
    border-radius: 99px;
  }
  .control-buttons-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 6px;
    width: 100%;
    padding-bottom: 0;
    overflow: visible;
  }
  .control-buttons-row .btn-action,
  .control-buttons-row .btn-mode-toggle {
    flex: 1 1 auto;
    font-size: 0.75rem;
    padding: 8px 10px;
    text-align: center;
    white-space: nowrap;
    justify-content: center;
  }

  .panel-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-top: 22px !important;
  }
  .panel-title {
    margin-bottom: 0;
    font-size: 1.1rem;
  }
  .search-row {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
  }
  .search-input-wrap {
    flex: 1 1 160px;
  }
  .filter-select {
    flex: 1 1 120px;
  }
  .members-grid {
    grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
    gap: 10px;
  }
  .group-stats-row {
    justify-content: center;
    flex-wrap: wrap;
  }
}

@media (max-width: 600px) {
  .site-header {
    padding: 12px 14px !important;
  }
  .site-header .header-inner {
    height: auto !important;
    min-height: auto !important;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
    padding: 4px 0;
  }
  .header-nav {
    width: 100%;
    justify-content: center;
    margin-top: 4px;
    margin-bottom: 6px;
  }
  .nav-btn {
    flex: 1;
    padding: 9px 12px;
    font-size: 0.85rem;
  }
  .main-content {
    padding: 16px 6px 40px !important;
    margin-top: 18px !important;
  }
  .search-row {
    flex-direction: row;
    gap: 8px;
  }
  .search-input-wrap, .filter-select {
    width: auto;
  }
  .members-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    max-height: 420px;
  }
  .member-card {
    min-height: 140px;
    height: 140px;
  }
  .member-img-wrap {
    height: 96px;
    min-height: 96px;
  }
  .member-info {
    min-height: 44px;
    padding: 4px 2px;
  }
  .member-name {
    font-size: 0.73rem;
    -webkit-line-clamp: 2;
    line-clamp: 2;
  }
  .member-nickname {
    font-size: 0.65rem;
  }
  .member-team-badge {
    font-size: 0.52rem;
    padding: 1px 5px;
  }
  .control-buttons-row {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 6px !important;
    width: 100% !important;
    overflow: visible !important;
  }
  .control-buttons-row .btn-action,
  .control-buttons-row .btn-mode-toggle {
    flex: 1 1 auto !important;
    font-size: 0.74rem !important;
    padding: 7px 8px !important;
    text-align: center !important;
    white-space: nowrap !important;
    justify-content: center !important;
  }
  .group-stats-row {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 6px !important;
    width: 100% !important;
  }
  .group-stats-row .stat-chip {
    flex: 1 1 auto !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0.7rem !important;
    padding: 4px 8px !important;
    height: 28px !important;
    white-space: nowrap !important;
  }

  /* Table shrinks to fit perfectly, no cutoff */
  .matrix-table-wrapper {
    width: 100% !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: var(--radius-sm);
    box-sizing: border-box;
  }
  .idol-matrix-table {
    width: 100% !important;
    table-layout: fixed !important;
  }
  .th-diagonal {
    font-size: 0.55rem;
    padding: 2px;
    width: 15%;
  }
  .th-team {
    font-size: 0.55rem;
    padding: 2px 1px;
    width: 17%;
    word-break: break-word;
  }
  .td-category {
    font-size: 0.55rem;
    padding: 2px;
    white-space: normal !important;
    word-break: break-word;
  }
  .category-label-flex {
    flex-direction: column;
    gap: 2px;
  }
  .category-label-flex i {
    width: 14px !important;
    height: 14px !important;
  }
  .td-matrix-cell {
    padding: 2px 1px;
    font-size: 0.55rem;
    height: 36px;
  }
  .cell-mini-avatar {
    width: 16px;
    height: 16px;
  }
  .cell-mini-name {
    font-size: 0.55rem;
  }
  .table-help-hint {
    font-size: 0.78rem;
    line-height: 1.4;
    padding: 8px;
  }
  .toast {
    bottom: 20px;
    right: 12px;
    left: 12px;
    max-width: none;
    text-align: center;
    font-size: 0.82rem;
  }
}

@media (max-width: 420px) {
  .members-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }
}

/* ==========================================
   DISCLAIMER BANNER & EXPORT FOOTER STYLES
   ========================================== */
@keyframes disclaimerSlideIn {
  from {
    opacity: 0;
    transform: translateY(-12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes disclaimerPulseGlow {
  0% {
    border-color: rgba(255, 107, 157, 0.35);
    box-shadow: 0 4px 18px rgba(255, 107, 157, 0.08), inset 0 0 12px rgba(255, 107, 157, 0.03);
  }
  50% {
    border-color: rgba(155, 93, 229, 0.55);
    box-shadow: 0 4px 24px rgba(155, 93, 229, 0.16), inset 0 0 16px rgba(155, 93, 229, 0.06);
  }
  100% {
    border-color: rgba(255, 107, 157, 0.5);
    box-shadow: 0 4px 22px rgba(255, 107, 157, 0.15), inset 0 0 14px rgba(255, 107, 157, 0.05);
  }
}

@keyframes disclaimerShimmer {
  0% {
    left: -100%;
  }
  25% {
    left: 150%;
  }
  100% {
    left: 150%;
  }
}

@keyframes disclaimerIconHeartbeat {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 12px rgba(255, 107, 157, 0.4);
  }
  15% {
    transform: scale(1.12);
    box-shadow: 0 0 18px rgba(255, 107, 157, 0.7);
  }
  30% {
    transform: scale(1.02);
    box-shadow: 0 0 14px rgba(255, 107, 157, 0.5);
  }
  45% {
    transform: scale(1.08);
    box-shadow: 0 0 16px rgba(255, 107, 157, 0.65);
  }
}

.disclaimer-banner {
  margin: 0 0 20px 0;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: linear-gradient(135deg, rgba(255, 107, 157, 0.13), rgba(155, 93, 229, 0.13));
  border: 1px solid rgba(255, 107, 157, 0.35);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 20px rgba(255, 107, 157, 0.08);
  transition: var(--transition-slow);
  position: relative;
  overflow: hidden;
  animation: disclaimerSlideIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards,
             disclaimerPulseGlow 4s ease-in-out infinite alternate;
}

.disclaimer-banner::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.08),
    transparent
  );
  transform: skewX(-20deg);
  pointer-events: none;
  animation: disclaimerShimmer 6s ease-in-out infinite;
}

.disclaimer-banner:hover {
  border-color: rgba(255, 107, 157, 0.75);
  box-shadow: 0 6px 28px rgba(255, 107, 157, 0.25);
  transform: translateY(-2px);
}

.disclaimer-banner-content {
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
  z-index: 1;
}

.disclaimer-icon-wrap {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pink), var(--purple));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #fff;
  box-shadow: 0 0 12px rgba(255, 107, 157, 0.4);
  animation: disclaimerIconHeartbeat 3s ease-in-out infinite;
  transition: transform 0.3s ease;
}

.disclaimer-icon-wrap:hover {
  transform: scale(1.15) rotate(6deg);
}

.disclaimer-text {
  font-size: 0.88rem;
  color: var(--text-primary);
  line-height: 1.45;
}

.disclaimer-title {
  display: inline-block;
  font-weight: 700;
  color: var(--pink-light);
  margin-bottom: 2px;
  font-size: 0.92rem;
}

.disclaimer-text p {
  margin: 0;
  color: var(--text-secondary);
}

.disclaimer-text p strong {
  color: var(--text-primary);
}

/* ── Matrix Export Footer (Watermark on PNG / screenshot) ── */
.matrix-export-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  margin-top: 14px;
  border-top: 1px dashed rgba(255, 255, 255, 0.15);
  font-size: 0.76rem;
  color: var(--text-secondary);
  background: rgba(0, 0, 0, 0.25);
  border-radius: var(--radius-sm);
  flex-wrap: wrap;
}

.export-brand {
  font-weight: 700;
  color: var(--pink-light);
  display: inline-flex;
  align-items: center;
}

.export-subtitle {
  color: var(--text-muted);
}

.export-footer-right {
  color: #d1d5db;
  font-style: italic;
}

/* Excel Classic Mode adjustment for Export Footer */
body.excel-classic-mode .matrix-export-footer {
  background: #f8fafc;
  border-top: 1px solid #cbd5e1;
  color: #475569;
}
body.excel-classic-mode .export-brand {
  color: #1e293b;
}
body.excel-classic-mode .export-footer-right {
  color: #334155;
  font-style: normal;
  font-weight: 500;
}

@media (max-width: 768px) {
  .disclaimer-banner {
    padding: 12px 14px;
    gap: 10px;
  }
  .disclaimer-icon-wrap {
    width: 34px;
    height: 34px;
  }
  .disclaimer-text {
    font-size: 0.8rem;
  }
  .disclaimer-title {
    font-size: 0.85rem;
  }
  .matrix-export-footer {
    flex-direction: column;
    text-align: center;
    gap: 6px;
  }
}


