/**
 * Bayern KR — 데스크톱 UI 시스템 (1024px+)
 * 모바일 스타일은 mobile-ui-system.css 유지
 */

@media (min-width: 1024px) {
  :root {
    --bg-page: #f6f7f9;
    --bg-surface: #ffffff;
    --bg-subtle: #f8f9fb;

    --text-primary: #171a1f;
    --text-secondary: #68707c;
    --text-muted: #949ba5;

    --brand-red: #dc052d;
    --brand-soft: #fff0f3;

    --border-default: #e4e7ec;
    --border-light: #eceef1;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;

    --shadow-panel: 0 4px 16px rgba(17, 24, 39, 0.045);

    --site-page-max: min(1440px, calc(100vw - 48px));
    --font-body: 14px;
    --font-meta: 12.5px;
    --font-section: 19px;
    --font-page-title: 26px;
    --font-list-title: 15px;
  }

  body.page-data {
    --site-page-max: min(1480px, calc(100vw - 48px));
  }

  body.page-community.community-section-board,
  body.page-community.community-section-score,
  body.page-community.community-section-worldcup {
    --site-page-max: min(1360px, calc(100vw - 48px));
  }

  /* ── Layout width ── */
  body.theme-intel.page-community .layout.layout--intel {
    max-width: var(--site-page-max);
    margin-inline: auto;
    width: 100%;
    padding-left: 0;
    padding-right: 0;
    box-sizing: border-box;
  }

  body.theme-intel.page-community {
    background: var(--bg-page);
  }

  /* ── Card hierarchy ── */
  body.theme-intel .panel-level-1,
  body.theme-intel .today-home__card,
  body.theme-intel .intel-panel--board,
  body.theme-intel .community-hub__panel > .intel-panel__body > .intel-panel--board,
  body.theme-intel .news-hub-section--issues,
  body.theme-intel .next-match-card {
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-panel);
    background: var(--bg-surface);
  }

  body.theme-intel .today-home__card--secondary,
  body.theme-intel .intel-hot-rank__row,
  body.theme-intel .news-hub-rail__block {
    border: 0;
    box-shadow: none;
    background: var(--bg-subtle);
    border-radius: var(--radius-md);
  }

  /* ── Page header ── */
  .page-header {
    margin-bottom: 20px;
  }

  .page-header__title {
    margin: 0;
    font-size: var(--font-page-title);
    font-weight: 800;
    line-height: 1.2;
    color: var(--text-primary);
    letter-spacing: -0.02em;
  }

  .page-header__sub {
    margin: 6px 0 0;
    font-size: 14px;
    line-height: 1.45;
    color: var(--text-secondary);
  }

  .page-header__meta {
    margin-top: 4px;
    font-size: var(--font-meta);
    color: var(--text-muted);
  }

  /* ── Nav active: indicator style ── */
  body.theme-intel:not(.mobile-layout) .site-primary-nav__link.is-active,
  body.theme-intel:not(.mobile-layout) .site-primary-nav__link[aria-current="page"] {
    background: rgba(220, 5, 45, 0.06);
    border-color: transparent;
    box-shadow: inset 0 -2px 0 var(--brand-red);
    border-radius: 8px 8px 0 0;
  }

  /* ── SEO prerender hidden after hydrate ── */
  body.app-hydrated .schedule-seo,
  body.app-hydrated #seo-page-head {
    display: none !important;
  }

  /* ── Today standings collapse ── */
  .today-home__standings-more {
    display: block;
    width: 100%;
    margin-top: 8px;
    padding: 10px 12px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    background: var(--bg-subtle);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
  }

  .today-home__standings-more:hover {
    color: var(--brand-red);
    border-color: rgba(220, 5, 45, 0.25);
    background: var(--brand-soft);
  }

  .today-home__standings-scroll {
    max-height: none;
    overflow: visible;
  }

  .today-home__standings-body.is-collapsed .today-home__standings-row:nth-child(n + 9) {
    display: none;
  }

  /* ── News hub editorial 1+2 ── */
  .news-issues-grid--editorial {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
    gap: 12px;
    align-items: stretch;
  }

  .news-issues-grid--editorial .news-issues-grid__subs {
    display: grid;
    gap: 12px;
    align-content: start;
  }

  .news-issues-grid--editorial .news-hub-issue--lead {
    min-height: 100%;
    padding: 18px 20px;
  }

  .news-issues-grid--editorial .news-hub-issue--lead .news-hub-issue__title {
    font-size: 20px;
    line-height: 1.35;
  }

  .news-issues-grid--editorial .news-hub-issue--lead .news-hub-issue__summary {
    font-size: 14px;
    line-height: 1.5;
    -webkit-line-clamp: 3;
  }

  /* ── News feed rows ── */
  .news-hub-row {
    min-height: 48px;
    padding: 12px 8px;
    border-bottom: 1px solid var(--border-light);
    border-radius: 0;
    box-shadow: none;
    background: transparent;
  }

  .news-hub-row__title {
    font-size: var(--font-list-title);
    font-weight: 600;
    line-height: 1.35;
  }

  .news-hub-row__time,
  .news-hub-row__source {
    font-size: var(--font-meta);
    color: var(--text-secondary);
  }

  /* ── Community board table ── */
  .community-board-row td {
    padding: 11px 12px;
    font-size: 14px;
  }

  .community-board-title {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.35;
  }

  .community-board-row .col-date,
  .community-board-row .col-views,
  .community-board-row .col-votes,
  .community-board-row .col-comments {
    text-align: right;
    font-size: 13px;
    color: var(--text-secondary);
  }

  .community-board-row--notice td {
    background: rgba(220, 5, 45, 0.04);
  }

  .community-board-row--notice td:first-child {
    box-shadow: inset 3px 0 0 var(--brand-red);
  }

  .community-board-tag {
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 6px;
  }

  /* ── Schedule hub desktop ── */
  .schedule-page--hub {
    display: grid;
    gap: 20px;
  }

  .standings-list--compact .standings-row {
    padding: 11px 0;
    font-size: 14px;
  }

  /* ── Intel header typography ── */
  .intel-panel__title {
    font-size: var(--font-section);
  }

  .intel-header__title {
    font-size: var(--font-page-title);
  }

  /* ── Page header slot (legacy — headers disabled) ── */
  .site-page-header-slot {
    display: none !important;
  }

  body.has-desktop-page-header .intel-panel__head--hot,
  body.has-desktop-page-header.community-section-hot #intel-kpi-strip {
    display: none;
  }

  body.has-desktop-page-header.community-section-score .intel-panel__head--compact {
    display: none;
  }

  /* ── Transfer hot detail hero ── */
  .intel-hot-detail__head--hero {
    padding: 16px 18px;
    background: linear-gradient(180deg, #fff 0%, #fafbfc 100%);
  }

  .intel-hot-detail__hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
    gap: 16px 20px;
    align-items: start;
  }

  .intel-hot-detail__head-row {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex-wrap: nowrap;
  }

  .intel-hot-detail__head-row .intel-hot-detail__badge {
    flex-shrink: 0;
    align-self: center;
    position: relative;
    z-index: 1;
  }

  .intel-hot-detail__head-row .intel-hot-detail__avatar {
    flex-shrink: 0;
    position: relative;
    z-index: 0;
  }

  .intel-hot-detail__avatar--hero {
    width: 56px;
    height: 56px;
    min-width: 56px;
    min-height: 56px;
    max-width: 56px;
    max-height: 56px;
    font-size: 18px;
    overflow: hidden;
  }

  .intel-hot-detail__avatar--hero.intel-hot-detail__avatar--photo img {
    width: 100%;
    height: 100%;
    max-width: 56px;
    max-height: 56px;
    object-fit: cover;
    display: block;
  }

  .intel-detail-hero .intel-hot-detail__avatar {
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    max-width: 48px;
    max-height: 48px;
    overflow: hidden;
  }

  .intel-hot-detail__name {
    font-size: 20px;
    font-weight: 800;
    line-height: 1.25;
  }

  .intel-hot-detail__route-main {
    font-size: 14px;
    font-weight: 700;
    margin-top: 10px;
  }

  .intel-hot-detail__progress-title {
    margin: 0 0 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
  }

  .transfer-progress--hot-detail {
    margin: 0;
  }

  .transfer-progress--hot-detail .transfer-progress__step {
    min-width: 44px;
  }

  .intel-hot-detail__kv-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border-light);
  }

  .intel-hot-detail__kv {
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    background: var(--bg-subtle);
  }

  .intel-hot-detail__kv-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 4px;
  }

  .intel-hot-detail__kv-value {
    display: block;
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
    letter-spacing: -0.02em;
  }

  .intel-hot-detail__kv-value--hero {
    color: var(--brand-red);
    font-size: 26px;
  }

  .intel-hot-detail__kv-value--status {
    font-size: 22px;
  }

  .intel-hot-detail__kv-value--collapsed {
    color: #6b7280;
    font-size: 24px;
  }

  .intel-hot-detail__kv-value--official {
    color: #b45309;
    font-size: 24px;
  }

  .transfer-progress--collapsed .transfer-progress__step.is-muted .transfer-progress__dot {
    border-color: #d1d5db;
    background: #f3f4f6;
  }

  .transfer-progress--collapsed .transfer-progress__step.is-failed .transfer-progress__dot--mark {
    border-color: #9ca3af;
    background: #e5e7eb;
    color: #4b5563;
    font-size: 11px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .transfer-progress--collapsed .transfer-progress__line.is-muted,
  .transfer-progress--collapsed .transfer-progress__step.is-muted .transfer-progress__label {
    opacity: 0.55;
  }

  .transfer-progress--official .transfer-progress__step.is-done .transfer-progress__dot {
    border-color: #dc052d;
    background: #dc052d;
  }

  .transfer-progress--official .transfer-progress__step.is-complete .transfer-progress__dot--mark {
    border-color: #d97706;
    background: linear-gradient(180deg, #fcd34d, #f59e0b);
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .transfer-progress--official .transfer-progress__step.is-complete .transfer-progress__label {
    color: #b45309;
    font-weight: 800;
  }

  .transfer-progress--official .transfer-progress__line.is-done {
    background: rgba(220, 5, 45, 0.35);
  }

  .intel-hot-detail__tier-row {
    margin-top: 8px;
  }

  .intel-hot-tier-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
  }

  .intel-hot-tier-pill--top {
    background: rgba(220, 5, 45, 0.08);
    color: #b00020;
  }

  .intel-hot-tier-pill--mid {
    background: rgba(245, 158, 11, 0.12);
    color: #b45309;
  }

  .intel-hot-tier-pill--low {
    background: #f3f4f6;
    color: #6b7280;
  }

  .intel-hot-hype {
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    background: var(--bg-subtle);
    border: 1px solid var(--border-light);
  }

  .intel-hot-hype__title {
    margin: 0 0 10px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
  }

  .intel-hot-hype__bar {
    height: 8px;
    border-radius: 999px;
    background: #e5e7eb;
    overflow: hidden;
    margin-bottom: 10px;
  }

  .intel-hot-hype__yes {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #dc052d, #f43f5e);
    border-radius: inherit;
  }

  .intel-hot-hype__actions {
    display: flex;
    gap: 8px;
  }

  .intel-hot-hype__btn {
    flex: 1;
    padding: 8px 10px;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    background: #fff;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    color: var(--text-secondary);
  }

  .intel-hot-hype__btn.is-selected {
    border-color: rgba(220, 5, 45, 0.35);
    background: #fff0f3;
    color: var(--brand-red);
  }

  .intel-hot-hype__meta {
    margin: 8px 0 0;
    font-size: 11px;
    color: var(--text-muted);
  }

  .intel-hot-detail__reason-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
  }

  .intel-hot-detail__reason-head .intel-hot-detail__section-title {
    margin: 0;
  }

  .intel-hot-fantalk-list {
    display: grid;
    gap: 8px;
  }

  .intel-hot-fantalk-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px;
    border-radius: var(--radius-sm);
    background: var(--bg-subtle);
    text-decoration: none;
    color: inherit;
  }

  .intel-hot-fantalk-row:hover {
    background: #fff0f3;
  }

  .intel-hot-fantalk-row__title {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
  }

  .intel-hot-fantalk-row__meta {
    font-size: 12px;
    color: var(--text-secondary);
  }
}

  /* ── Data center inspector 3-column feel ── */
  body.page-data .data-center-shell {
    width: min(var(--site-page-max), calc(100vw - 48px));
    max-width: var(--site-page-max);
  }

  body.page-data .data-main-layout.dc-analytics-layout--split {
    grid-template-columns: minmax(0, 1fr) minmax(360px, 400px);
    gap: 18px;
  }

  body.page-data .dc-analytics-main {
    min-width: 0;
  }

  body.page-data .dc-player-detail-panel.datacenter-inspector {
    min-height: 320px;
  }

  .dc-inspector-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 280px;
    padding: 24px 16px;
  }

  .dc-inspector-empty__glyph {
    width: 48px;
    height: 48px;
    margin-bottom: 12px;
    border-radius: 50%;
    background: var(--bg-subtle, #f3f4f6);
    border: 1px dashed var(--border-default, #e4e7ec);
    position: relative;
  }

  .dc-inspector-empty__glyph::after {
    content: '';
    position: absolute;
    inset: 14px 12px 10px;
    border-radius: 50% 50% 40% 40%;
    background: #d1d5db;
  }

  .dc-inspector-empty__title {
    margin: 0 0 6px;
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary, #171a1f);
  }

  .dc-inspector-empty__desc {
    margin: 0;
    font-size: 13px;
    line-height: 1.45;
    color: var(--text-secondary, #68707c);
    max-width: 28ch;
  }
}

@media (min-width: 1400px) {
  body.page-community .dashboard-layout--intel.has-news-hub-rail {
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 20px;
  }
}
