/* Toss Design System (TDS) Inspired Tokens */
:root {
  color-scheme: light;

  /* TDS Neutral Grey Scale */
  --grey-50: #f9fafb;
  --grey-100: #f2f4f6;
  --grey-200: #e5e8eb;
  --grey-300: #d1d6db;
  --grey-400: #b0b8c1;
  --grey-500: #8b95a1;
  --grey-600: #6b7684;
  --grey-700: #4e5968;
  --grey-800: #333d4b;
  --grey-900: #191f28;

  /* TDS Brand Blue */
  --blue-50: #e8f3ff;
  --blue-100: #c9e2ff;
  --blue-500: #3182f6;
  --blue-600: #1b64da;

  /* Semantic Tokens */
  --bg-canvas: var(--grey-100);
  --bg-surface: #ffffff;
  --bg-subtle: var(--grey-100);
  --bg-subtle-hover: var(--grey-200);
  --bg-poster: #f7f8fa;
  --text-primary: var(--grey-900);
  --text-secondary: var(--grey-700);
  --text-tertiary: var(--grey-600);
  --text-muted: var(--grey-500);
  --border: var(--grey-200);
  --border-subtle: rgba(0, 27, 55, 0.06);
  --primary: var(--blue-500);
  --primary-hover: var(--blue-600);
  --primary-weak-bg: var(--blue-50);
  --primary-weak-text: var(--blue-600);
  --star: #f59f00;

  --shadow-card: 0 2px 12px rgba(0, 27, 55, 0.04);
  --shadow-hover: 0 10px 26px rgba(0, 27, 55, 0.08);
  --shadow-modal: 0 24px 64px rgba(0, 20, 46, 0.18);

  --radius-xs: 8px;
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 20px;
  --radius-xl: 24px;

  --font-sans: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
}

[data-theme="dark"] {
  color-scheme: dark;

  --bg-canvas: #101013;
  --bg-surface: #17171c;
  --bg-subtle: #202027;
  --bg-subtle-hover: #2c2c35;
  --bg-poster: #1f1f26;
  --text-primary: #f2f4f6;
  --text-secondary: #c3c8d0;
  --text-tertiary: #9ea6b2;
  --text-muted: #767f8c;
  --border: #2c2c35;
  --border-subtle: rgba(255, 255, 255, 0.06);
  --primary: #3182f6;
  --primary-hover: #4593fc;
  --primary-weak-bg: rgba(49, 130, 246, 0.18);
  --primary-weak-text: #64a8ff;

  --shadow-card: none;
  --shadow-hover: 0 10px 28px rgba(0, 0, 0, 0.42);
  --shadow-modal: 0 28px 72px rgba(0, 0, 0, 0.72);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg-canvas);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "tnum" on;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body.modal-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header (TDS Clean Navigation Bar) */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--bg-surface) 92%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
}

.header-inner {
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.brand-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
  flex-shrink: 0;
}

.brand-title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

/* TDS Buttons */
.tds-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 40px;
  padding: 0 16px;
  border-radius: var(--radius-sm);
  border: 0;
  font-size: 14px;
  font-weight: 600;
  transition: background-color 0.14s ease, color 0.14s ease, transform 0.12s ease;
  white-space: nowrap;
}

.tds-btn:active {
  transform: scale(0.98);
}

.tds-btn svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.tds-btn-sm {
  height: 36px;
  padding: 0 14px;
  font-size: 13px;
  border-radius: 10px;
}

.tds-btn-xs {
  height: 34px;
  padding: 0 12px;
  font-size: 13px;
  border-radius: 10px;
}

.tds-btn-primary {
  background: var(--primary);
  color: #ffffff;
}

.tds-btn-primary:hover {
  background: var(--primary-hover);
}

.tds-btn-weak {
  background: var(--bg-subtle);
  color: var(--text-secondary);
}

.tds-btn-weak:hover {
  background: var(--bg-subtle-hover);
  color: var(--text-primary);
}

.tds-btn-weak.is-active {
  background: var(--primary-weak-bg);
  color: var(--primary-weak-text);
}

.tds-btn-blue-weak {
  background: var(--primary-weak-bg);
  color: var(--primary-weak-text);
}

.tds-btn-blue-weak:hover {
  filter: brightness(0.96);
}

.tds-btn-text {
  background: transparent;
  color: var(--text-secondary);
  height: 36px;
  padding: 0 12px;
  font-size: 14px;
  border-radius: 10px;
}

.tds-btn-text:hover {
  background: var(--bg-subtle);
  color: var(--text-primary);
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.14s ease, color 0.14s ease;
}

.icon-btn:hover {
  background: var(--bg-subtle);
  color: var(--text-primary);
}

.icon-btn svg {
  width: 18px;
  height: 18px;
}

/* Main Card Stack Layout */
.main-content {
  flex: 1;
  padding-top: 24px;
  padding-bottom: 64px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tds-section {
  background: var(--bg-surface);
  border-radius: var(--radius-xl);
  padding: 28px;
  box-shadow: var(--shadow-card);
}

/* Hero Summary Card */
.hero-section {
  padding: 26px 28px;
}

.hero-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px 24px;
}

.hero-heading {
  margin: 0;
  font-size: clamp(22px, 2.8vw, 28px);
  font-weight: 700;
  letter-spacing: -0.028em;
  line-height: 1.32;
  color: var(--text-primary);
}

.hero-sub {
  margin: 6px 0 0;
  font-size: 15px;
  font-weight: 400;
  color: var(--text-tertiary);
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}

.stat-block {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
}

.stat-value {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
  color: var(--text-primary);
}

.stat-value.is-blue {
  color: var(--primary);
}

.stat-unit {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-tertiary);
  margin-left: 2px;
}

/* Directory Section */
.directory-section {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* TDS Filled Grey Search Input */
.search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 16px;
  z-index: 2;
  color: var(--text-muted);
  display: flex;
  pointer-events: none;
}

.search-icon svg {
  width: 18px;
  height: 18px;
}

.search-input {
  width: 100%;
  height: 48px;
  padding: 0 46px 0 44px;
  border-radius: 14px;
  border: 2px solid transparent;
  background: var(--bg-subtle);
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.search-input::placeholder {
  color: var(--text-muted);
  font-weight: 400;
}

.search-input:focus {
  outline: none;
  background: var(--bg-surface);
  border-color: var(--primary);
}

.search-input::-webkit-search-cancel-button {
  -webkit-appearance: none;
}

.search-clear {
  position: absolute;
  right: 12px;
  z-index: 2;
  width: 28px;
  height: 28px;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.search-clear:hover {
  color: var(--text-primary);
}

.search-clear svg {
  width: 18px;
  height: 18px;
}

/* TDS Underline Tabs + Controls Row */
.tabs-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  border-bottom: 1px solid var(--border);
}

.filter-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  margin-bottom: -1px;
}

.filter-tabs::-webkit-scrollbar {
  display: none;
}

.filter-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 44px;
  padding: 0 12px;
  border: 0;
  background: transparent;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  transition: color 0.14s ease;
}

.filter-tab:hover {
  color: var(--text-secondary);
}

.filter-tab.is-active {
  color: var(--text-primary);
  font-weight: 700;
}

.filter-tab.is-active::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 0;
  height: 2.5px;
  border-radius: 2px;
  background: var(--text-primary);
}

.filter-tab .tab-count {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.filter-tab.is-active .tab-count {
  color: var(--primary);
}

.toolbar-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 8px;
}

.sort-select {
  height: 34px;
  padding: 0 28px 0 12px;
  border-radius: 10px;
  border: 0;
  background: var(--bg-subtle);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
}

.sort-select:hover,
.sort-select:focus {
  outline: none;
  background: var(--bg-subtle-hover);
  color: var(--text-primary);
}

/* Result Meta */
.result-meta {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
}

/* Clean 2:3 Poster Card Grid */
.group-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
}

.group-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.2s ease, border-color 0.18s ease;
  cursor: pointer;
  text-align: left;
}

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

.group-card:active {
  transform: translateY(-1px) scale(0.99);
}

.group-card:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.card-poster {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: var(--bg-poster);
}

.card-poster-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.group-card:hover .card-poster-img {
  transform: scale(1.03);
}

/* Clean TDS Minimal Poster Placeholder */
.card-poster-placeholder {
  width: 100%;
  height: 100%;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--bg-poster);
  color: var(--text-primary);
}

.placeholder-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.placeholder-index {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
}

.placeholder-tier {
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 6px;
  background: var(--bg-surface);
  color: var(--text-tertiary);
}

.placeholder-center {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: auto 0;
}

.placeholder-en {
  font-size: clamp(16px, 1.6vw, 20px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.18;
  color: var(--text-primary);
  word-break: break-word;
}

.placeholder-ko {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-tertiary);
}

.placeholder-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
}

/* Card Footer */
.card-footer {
  padding: 13px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  background: var(--bg-surface);
}

.card-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px;
}

.card-names {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.card-name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-name-en {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-fav-btn {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin: -3px -5px 0 0;
  transition: background-color 0.14s ease, color 0.14s ease;
}

.card-fav-btn:hover {
  background: var(--bg-subtle);
  color: var(--star);
}

.card-fav-btn.is-active {
  color: var(--star);
}

.card-fav-btn svg {
  width: 16px;
  height: 16px;
}

.card-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.tds-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 600;
}

.tds-badge-blue {
  background: var(--primary-weak-bg);
  color: var(--primary-weak-text);
}

.tds-badge-grey {
  background: var(--bg-subtle);
  color: var(--text-tertiary);
}

.card-tier-text {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}

.card-match-hint {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 64px 20px;
}

.empty-title {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
}

.empty-desc {
  margin: 6px 0 20px;
  font-size: 14px;
  color: var(--text-tertiary);
}

/* Footer */
.site-footer {
  padding: 20px 0 40px;
  font-size: 12.5px;
  color: var(--text-muted);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
}

.footer-inner p {
  margin: 0;
}

.footer-sub {
  color: var(--text-muted);
}

/* TDS Modal & Mobile Bottom Sheet */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.48);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-panel {
  width: 100%;
  max-width: 920px;
  max-height: min(88vh, 840px);
  background: var(--bg-surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-modal);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalIn 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.sheet-handle {
  display: none;
  width: 40px;
  height: 4px;
  border-radius: 999px;
  background: var(--border);
  margin: 10px auto 0;
  flex-shrink: 0;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-topbar {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
}

.modal-topbar-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
}

.modal-topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.modal-body {
  padding: 26px 28px 32px;
  overflow-y: auto;
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.modal-sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.modal-poster-wrap {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

.modal-group-title {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.25;
}

.modal-group-en {
  margin: 2px 0 0;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-muted);
}

.modal-aliases {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.alias-tag {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 7px;
  background: var(--bg-subtle);
  color: var(--text-secondary);
}

.modal-facts {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  font-size: 13px;
}

.modal-fact-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.modal-fact-label {
  color: var(--text-tertiary);
}

.modal-fact-value {
  color: var(--text-primary);
  font-weight: 600;
  text-align: right;
}

.modal-content {
  display: flex;
  flex-direction: column;
  gap: 28px;
  min-width: 0;
}

.detail-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.detail-section-title {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.detail-section-count {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
}

/* TDS ListRow Style for Official Channels */
.official-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.official-row {
  --platform-color: #3182f6;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  transition: background-color 0.14s ease, transform 0.12s ease;
  min-width: 0;
}

.official-row:hover {
  background: var(--bg-subtle-hover);
}

.official-row:active {
  transform: scale(0.99);
}

.platform-icon-box {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: var(--bg-surface);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--platform-color);
}

[data-theme="dark"] .platform-icon-box[data-monochrome="true"] {
  color: var(--text-primary);
}

.platform-icon-box svg {
  width: 17px;
  height: 17px;
}

.official-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.official-platform {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-muted);
}

.official-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.row-chevron {
  margin-left: auto;
  color: var(--text-muted);
  display: flex;
  flex-shrink: 0;
}

.row-chevron svg {
  width: 16px;
  height: 16px;
}

/* Member Filter Chips (TDS Chip Style) */
.member-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.member-chip {
  height: 34px;
  padding: 0 13px;
  border-radius: 10px;
  border: 0;
  background: var(--bg-subtle);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: background-color 0.14s ease, color 0.14s ease;
}

.member-chip:hover {
  background: var(--bg-subtle-hover);
  color: var(--text-primary);
}

.member-chip.is-active {
  background: var(--primary);
  color: #ffffff;
}

.member-chip .chip-count {
  font-size: 12px;
  margin-left: 4px;
  opacity: 0.78;
}

.type-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.type-chip {
  height: 28px;
  padding: 0 10px;
  border-radius: 8px;
  border: 0;
  background: transparent;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.type-chip.is-active {
  background: var(--bg-subtle);
  color: var(--text-primary);
}

/* TDS ListRow Style for Fan Accounts */
.fan-group-block {
  margin-bottom: 20px;
}

.fan-group-block:last-child {
  margin-bottom: 0;
}

.fan-group-heading {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-tertiary);
  margin: 0 0 8px 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.fan-group-heading span {
  color: var(--text-muted);
  font-weight: 600;
}

.fan-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.fan-row {
  --platform-color: #3182f6;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 10px 10px 12px;
  border-radius: 14px;
  background: transparent;
  transition: background-color 0.14s ease;
  min-width: 0;
}

.fan-row:hover {
  background: var(--bg-subtle);
}

.fan-link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.fan-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--bg-subtle);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--platform-color);
}

.fan-row:hover .fan-icon {
  background: var(--bg-surface);
}

[data-theme="dark"] .fan-icon[data-monochrome="true"] {
  color: var(--text-primary);
}

.fan-icon svg {
  width: 14px;
  height: 14px;
}

.fan-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.fan-handle {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fan-sub {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fan-copy-btn {
  height: 28px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: var(--bg-subtle);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
  transition: background-color 0.14s ease, color 0.14s ease;
}

.fan-row:hover .fan-copy-btn {
  background: var(--bg-surface);
}

.fan-copy-btn:hover {
  color: var(--primary);
}

.placeholder-notice {
  padding: 20px 22px;
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  color: var(--text-secondary);
  font-size: 13.5px;
  line-height: 1.6;
}

.placeholder-notice strong {
  display: block;
  color: var(--text-primary);
  font-size: 14px;
}

.placeholder-notice p {
  margin: 4px 0 0;
  color: var(--text-tertiary);
}

.notice-actions {
  margin-top: 14px;
}

/* TDS Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  z-index: 200;
  padding: 12px 20px;
  border-radius: 14px;
  background: rgba(25, 31, 40, 0.92);
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
}

[data-theme="dark"] .toast {
  background: #2c2c35;
  color: #f2f4f6;
}

/* Responsive */
@media (max-width: 1120px) {
  .group-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .group-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
  }

  .modal-body {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .modal-sidebar {
    position: static;
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 16px;
    align-items: start;
  }

  .modal-facts {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .container {
    padding: 0 12px;
  }

  .main-content {
    padding-top: 14px;
    gap: 12px;
  }

  .tds-section {
    padding: 20px 16px;
    border-radius: 20px;
  }

  .hero-stats {
    gap: 20px;
  }

  .group-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .btn-text-hide-sm {
    display: none;
  }

  .modal-backdrop {
    padding: 0;
    align-items: flex-end;
  }

  .modal-panel {
    max-height: 92vh;
    border-radius: 24px 24px 0 0;
  }

  .sheet-handle {
    display: block;
  }

  .modal-topbar {
    padding: 12px 16px;
  }

  .modal-body {
    padding: 16px 16px 28px;
  }

  .modal-sidebar {
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 12px;
  }

  .official-grid,
  .fan-list {
    grid-template-columns: 1fr;
  }
}
