/* Resolution-aware typography and full-bleed route scaling */
:root {
  --font-xs: 13px;
  --font-sm: 15px;
  --font-base: 16px;
  --font-lg: 18px;
  --font-xl: 23px;
  --font-2xl: 32px;
  --font-3xl: 41px;
  --pe-topbar: 64px;
  --pe-sidebar: 260px;
  --content-padding: 32px;
}

body.player-easy-desktop {
  --font-xs: 15px;
  --font-sm: 17px;
  --font-base: 19px;
  --font-lg: 21px;
  --font-xl: 26px;
  --font-2xl: 35px;
  --font-3xl: 44px;
}

body.player-easy-desktop #content {
  overflow-anchor: none;
}

/* Shared shell scale: browser and desktop client */
.desktop-titlebar {
  border-bottom: 0;
  box-shadow: none;
}
.desktop-titlebar-brand strong { font-size: 18px; }
.desktop-titlebar-brand span { font-size: 16px; }
.desktop-titlebar-nav a { min-width: 70px; padding-inline: 17px; font-size: 16px; }
.desktop-titlebar-metrics {
  min-width: 0;
  display: flex;
  align-items: stretch;
  gap: clamp(18px, 2.2vw, 38px);
  padding-inline: 12px;
  border: 0;
  -webkit-app-region: no-drag;
}
.desktop-titlebar-metric {
  min-width: 178px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  padding: 7px 0 6px;
  border: 0;
  background: transparent;
  color: #d7dfeb;
  transition: color .18s ease, opacity .18s ease;
}
.desktop-titlebar-metric:hover {
  color: #fff;
  background: transparent;
  opacity: .88;
}
.desktop-titlebar-metric span {
  overflow: hidden;
  color: #8696aa;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.desktop-titlebar-metric strong {
  color: #f0bd4f;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  letter-spacing: .01em;
  white-space: nowrap;
}
.desktop-titlebar-metric:nth-child(2) strong { color: #57a6ff; }
.desktop-titlebar-metric:nth-child(3) strong { color: #66d4a0; }
.desktop-titlebar-metrics[aria-busy="true"] strong { opacity: .58; }
.sidebar-nav .nav-section-label { font-size: 11px; }
.sidebar-nav .nav-item { min-height: 48px; font-size: 16px; }
.sidebar-nav .nav-item .nav-icon { width: 25px; font-size: 20px; }
.sidebar-user .user-name { font-size: 15px; }
.sidebar-user .user-balance { font-size: 13px; }
.desktop-download-link { min-height: 55px; }
.desktop-download-link strong { font-size: 12px; }
.desktop-download-link small { font-size: 10px; }

input,
select,
textarea { min-height: 46px; font-size: var(--font-sm); }
.btn-primary,
.btn-secondary,
.btn-danger,
.game-card .buy-btn { min-height: 46px; padding: 10px 22px; font-size: var(--font-sm); }
.btn-sm { min-height: 39px; padding: 7px 15px; font-size: var(--font-sm); }
.section-header { min-height: 76px; padding-left: 19px; }
.section-header h2 { font-size: 31px; }
.section-header .subtitle { font-size: 14px; }
.breadcrumb { font-size: 13px; }
.stat-card { min-height: 116px; padding: 20px 20px 18px 66px; }
.stat-card .stat-value { font-size: 28px; }
.stat-card .stat-label { font-size: 12px; }
.modal { font-size: var(--font-sm); }
.modal h2 { font-size: 24px; }
.friends-dock-toggle { min-height: 48px; font-size: 14px; }

body.player-easy-desktop.player-easy-integrated-titlebar .desktop-titlebar {
  height: var(--pe-topbar);
  font-size: 16px;
}
body.player-easy-desktop.player-easy-integrated-titlebar .desktop-titlebar img { width: 40px; height: 40px; }
body.player-easy-desktop.player-easy-integrated-titlebar .desktop-titlebar-nav a { font-size: 16px; }
body.player-easy-desktop.player-easy-integrated-titlebar .desktop-titlebar-metric {
  min-width: 192px;
  padding-inline: 0;
}
body.player-easy-desktop.player-easy-integrated-titlebar .desktop-titlebar-metric span { font-size: 12px; }
body.player-easy-desktop.player-easy-integrated-titlebar .desktop-titlebar-metric strong { font-size: 17px; }

@media (max-width: 1360px) and (min-width: 769px) {
  .desktop-titlebar-metrics { gap: 18px; padding-inline: 8px; }
  .desktop-titlebar-metric { min-width: 150px; padding-inline: 0; }
  body.player-easy-desktop.player-easy-integrated-titlebar .desktop-titlebar-metric {
    min-width: 158px;
    padding-inline: 0;
  }
  .desktop-titlebar-metric span { font-size: 10px; }
  .desktop-titlebar-metric strong { font-size: 14px; }
}

@media (max-width: 1020px) and (min-width: 769px) {
  .desktop-titlebar-metric { min-width: 122px; }
  .desktop-titlebar-metric span { max-width: 118px; }
  .desktop-titlebar > .language-switcher { display: inline-flex !important; }
  .desktop-titlebar > .language-switcher .language-trigger {
    width: 38px;
    min-width: 38px;
    padding-inline: 0;
  }
  .desktop-titlebar > .language-switcher .language-current,
  .desktop-titlebar > .language-switcher .language-chevron { display: none; }
  .desktop-titlebar > .language-switcher .language-menu { right: 0; }
}

/* Full-bleed player market */
body[data-route="market"] #content,
body[data-route="trading"] #content {
  background:
    linear-gradient(90deg, rgba(2, 9, 18, .97), rgba(2, 9, 18, .92) 52%, rgba(2, 9, 18, .88)),
    #020812;
}

body[data-route="market"] #content-inner,
body[data-route="trading"] #content-inner {
  width: 100%;
  max-width: none;
  min-height: 100%;
  margin: 0;
  padding: clamp(22px, 2.3vw, 38px);
  background:
    linear-gradient(180deg, rgba(2, 8, 17, .18), rgba(2, 8, 17, .78)),
    radial-gradient(circle at 79% 20%, rgba(35, 136, 255, .11), transparent 30%);
}

.market-tabs { min-height: 54px; padding: 4px; }
.market-tab { min-height: 44px; padding: 10px 22px; font-size: 14px; }
.market-browse-tools { gap: 10px; }
.market-browse-tools input { width: 225px; }
.market-browse-tools select { width: 170px; }
.market-browse-tools input,
.market-browse-tools select,
.market-browse-tools button { min-height: 46px; font-size: 14px; }
.kline-panel-header { min-height: 66px; padding: 10px 17px; }
.kline-panel-header > span small { font-size: 11px; }
.kline-panel-header > span strong { font-size: 18px; }
.kline-tf-btn { min-width: 57px; min-height: 38px; font-size: 13px; }
.kline-container { min-height: 440px !important; }
.market-grid { grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 17px; }
.market-card-header { height: 148px; }
.market-card-header > span { font-size: 48px; }
.market-card-body { padding: 16px; }
.market-card-game { font-size: 18px; }
.market-card-meta,
.market-card-compare,
.market-card-seller { font-size: 13px; }
.market-card-price { margin-top: 6px; font-size: 27px; }
.market-card-actions { padding: 0 16px 16px; }
.market-listing-row {
  min-height: 108px;
  grid-template-columns: 155px minmax(200px, 1.2fr) minmax(125px, .7fr) 100px minmax(165px, .9fr) 145px;
  gap: 18px;
  padding: 15px 18px;
}
.market-listing-cover { height: 78px; font-size: 36px; }
.market-listing-name strong { font-size: 18px; }
.market-listing-name small { font-size: 13px; }
.market-listing-price strong { font-size: 22px; }
.market-listing-price small,
.market-listing-qty small,
.market-listing-status small,
.market-listing-status time { font-size: 11px; }
.market-listing-qty b,
.market-listing-status b { font-size: 14px; }
.market-purchase-dialog,
.market-sell-dialog { gap: 18px; font-size: 15px; }
.market-order-product { padding: 15px; }
.market-order-summary > div { padding: 11px 0; }
.market-order-summary .total b { font-size: 24px; }
.market-sell-estimate span { font-size: 11px; }
.market-sell-estimate b { font-size: 14px; }

.market-dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  min-width: 0;
}
.market-dashboard-main { min-width: 0; }
.market-dashboard-main .stat-cards { margin-bottom: 12px !important; }
.market-dashboard-main .kline-expand-panel { margin-bottom: 0 !important; }
.market-dashboard-main .kline-container {
  height: 280px;
  min-height: 280px !important;
}
.market-dashboard + .section-header { margin-top: 18px; }

/* Full-bleed creator platform */
#content-inner:has(> #creator-root) {
  width: 100%;
  max-width: none;
  min-height: 100%;
  margin: 0;
  padding: 0;
}

#creator-root.creator-page {
  min-height: 100%;
  padding: clamp(15px, 1.7vw, 27px) !important;
  background:
    linear-gradient(90deg, rgba(2, 9, 18, .93), rgba(2, 9, 18, .72) 54%, rgba(2, 9, 18, .5)),
    linear-gradient(180deg, rgba(2, 8, 17, .18), rgba(2, 8, 17, .82)),
    url('../assets/bg.png') center / cover no-repeat,
    #020812;
}

.creator-home { min-height: 100%; }
.creator-home-layout { grid-template-columns: minmax(0, 1fr) 320px; gap: 14px; }
.creator-home-hero { min-height: 455px; }
.creator-home-copy { width: 69%; padding: 38px 34px 25px; }
.creator-home-copy > p { font-size: 12px; }
.creator-home-copy h1 { font-size: clamp(36px, 3.25vw, 50px); }
.creator-home-copy > span { font-size: 16px; line-height: 1.8; }
.creator-home-actions { gap: 12px; margin-top: 24px; }
.creator-home-primary,
.creator-home-secondary { min-height: 49px; padding-inline: 22px; font-size: 14px; }
.creator-home-flow-title { margin-top: 32px; font-size: 14px; }
.creator-home-flow { gap: 8px; margin-top: 11px; }
.creator-home-flow > div { height: 69px; padding: 11px 9px 9px 41px; }
.creator-home-flow b { left: 10px; top: 12px; font-size: 13px; }
.creator-home-flow strong { font-size: 13px; }
.creator-home-flow small { font-size: 10px; }
.creator-home-benefits { padding: 18px 0 10px; }
.creator-home-benefits h2 { font-size: 18px; }
.creator-home-benefits > div { gap: 11px; }
.creator-home-benefits article { min-height: 108px; padding: 16px 14px 13px 55px; }
.creator-home-benefits article > i { width: 32px; height: 32px; font-size: 20px; }
.creator-home-benefits strong { font-size: 13px; }
.creator-home-benefits small { font-size: 10px; }
.creator-home-bottom { gap: 14px; margin-top: 10px; }
.creator-home-panel { min-height: 205px; padding: 15px; }
.creator-home-panel h3,
.creator-home-side-card h3 { font-size: 16px; }
.creator-home-panel h3 a { font-size: 11px; }
.creator-home-plan li { grid-template-columns: 28px 1fr; gap: 9px; }
.creator-home-plan li > i { width: 26px; height: 26px; font-size: 12px; }
.creator-home-plan strong,
.creator-home-perks strong,
.creator-home-feature > strong,
.creator-home-rank-row strong { font-size: 11px; }
.creator-home-plan small,
.creator-home-perks small,
.creator-home-feature > small { font-size: 9px; }
.creator-home-plan button { min-height: 34px; font-size: 11px; }
.creator-home-feature-image { height: 92px; }
.creator-home-side { gap: 14px; }
.creator-home-side-card { padding: 16px; }
.creator-home-rank-tabs button { height: 32px; font-size: 10px; }
.creator-home-rank-row { min-height: 47px; }
.creator-home-rank-no { width: 22px; height: 22px; font-size: 11px; }
.creator-home-rank-row em { font-size: 10px; }
.creator-home-rank-more { height: 37px; font-size: 10px; }
.creator-home-overview span { min-height: 92px; padding: 12px; }
.creator-home-overview small { font-size: 10px; }
.creator-home-overview strong { font-size: 16px; }
.creator-home-overview em,
.creator-home-overview p { font-size: 9px; }

/* Full-bleed and proportionally enlarged concept wizard */
#content-inner:has(> #creator-concept-root) {
  width: 100%;
  max-width: none;
  min-height: 100%;
  margin: 0;
  padding: 0;
}

.concept-showcase {
  min-height: max(720px, calc(100vh - var(--pe-topbar, 64px)));
  padding: clamp(28px, 3.5vw, 57px) clamp(28px, 4.4vw, 72px) 64px;
  background-size: auto, auto, cover, auto;
  background-position: center;
}
.concept-showcase-content { width: min(55%, 820px); min-width: 650px; }
.concept-showcase-heading { min-height: 66px; gap: 18px; }
.concept-showcase-heading > span { height: 66px; width: 5px; }
.concept-showcase-heading h1 { font-size: clamp(30px, 2.2vw, 37px); }
.concept-showcase-heading p { font-size: 13px; }
.concept-showcase-steps { margin: 22px 0 24px; }
.concept-showcase-steps::before { top: 13px; }
.concept-showcase-steps span { width: 27px; height: 27px; font-size: 10px; }
.concept-showcase-steps strong { font-size: 12px; }
.concept-showcase-stage,
.concept-showcase-panel { min-height: 460px; }
.concept-showcase-panel { padding: 25px; }
.concept-basic-panel { gap: 20px 22px; }
.concept-field > span,
.concept-tag-field > span { margin-bottom: 9px; font-size: 12px; }
.concept-field input,
.concept-field select,
.concept-tag-entry input { height: 42px; padding-inline: 13px; font-size: 12px; }
.concept-field textarea { min-height: 124px; padding: 13px; font-size: 12px; }
.concept-input-wrap > small { right: 11px; bottom: 11px; font-size: 10px; }
.concept-tag-field > p { margin-bottom: 10px; font-size: 10px; }
.concept-tags button { min-height: 32px; font-size: 10px; }
.concept-tag-entry { grid-template-columns: minmax(0, 1fr) 76px; }
.concept-tag-entry button { font-size: 11px; }
.concept-panel-title { gap: 16px; margin-bottom: 22px; padding-bottom: 17px; }
.concept-panel-title > span { width: 38px; height: 38px; flex-basis: 38px; font-size: 12px; }
.concept-panel-title h2 { font-size: 21px; }
.concept-panel-title p { font-size: 11px; }
.concept-upload-grid { gap: 13px; }
.concept-upload-grid label { min-height: 170px; }
.concept-upload-grid i { font-size: 30px; }
.concept-upload-grid strong { font-size: 12px; }
.concept-upload-grid small,
.concept-upload-grid b { font-size: 10px; }
.concept-file-list > p { font-size: 11px; }
.concept-confirm-summary small { font-size: 10px; }
.concept-confirm-summary strong { font-size: 13px; }
.concept-confirm-summary p,
.concept-consent { font-size: 11px; }
.concept-showcase-actions { grid-template-columns: 155px minmax(220px, 1fr); margin-top: 21px; }
.concept-showcase-actions button { min-height: 50px; font-size: 13px; }

@media (max-width: 1280px) and (min-width: 769px) {
  :root { --pe-sidebar: 76px; --sidebar-width: 76px; --content-padding: 22px; }
  .desktop-titlebar-brand { width: 80px; flex-basis: 80px; }
  .desktop-titlebar-brand strong,
  .desktop-titlebar-brand span,
  .sidebar-nav .nav-section-label,
  .sidebar-user .user-info,
  .logout-btn { display: none; }
  .sidebar-nav .nav-item { justify-content: center; padding: 10px; font-size: 0; }
  .sidebar-footer { padding: 9px; }
  .sidebar-user { justify-content: center; }
  .desktop-download-link { display: none; }
  .creator-home-layout { grid-template-columns: minmax(0, 1fr) 285px; }
  .creator-home-copy { width: 73%; padding-inline: 27px; }
  .concept-showcase-content { width: min(64%, 780px); min-width: 610px; }
}

@media (max-width: 980px) {
  .market-dashboard-main .kline-container { height: 250px; min-height: 250px !important; }
  .creator-home-layout { grid-template-columns: 1fr; }
  .creator-home-side { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .creator-home-copy { width: 72%; }
  .creator-home-benefits > div { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .concept-showcase-content { width: min(82%, 760px); min-width: 0; }
}

@media (max-width: 768px) {
  :root {
    --pe-topbar: 0px;
    --pe-sidebar: 0px;
    --sidebar-width: 0px;
    --content-padding: 12px;
    --font-xs: 12px;
    --font-sm: 14px;
    --font-base: 15px;
    --font-lg: 17px;
    --font-xl: 21px;
    --font-2xl: 28px;
    --font-3xl: 36px;
  }
  #mobile-bar { min-height: 58px; }
  .mobile-brand img { width: 34px; height: 34px; }
  .mobile-logo { font-size: 15px; }
  .mobile-sub { font-size: 10px; }
  #sidebar { width: 270px; min-width: 270px; left: -290px; }
  .sidebar-nav .nav-item { min-height: 48px; font-size: 15px; }
  input,
  select,
  textarea { min-height: 44px; font-size: 14px; }
  .btn-primary,
  .btn-secondary,
  .btn-danger { min-height: 44px; font-size: 14px; }
  .section-header { min-height: 64px; }
  .section-header h2 { font-size: 25px; }
  .section-header .subtitle { font-size: 12px; }
  .stat-card { min-height: 96px; }
  .stat-card .stat-value { font-size: 20px; }
  .stat-card .stat-label { font-size: 10px; }

  body[data-route="market"] #content-inner,
  body[data-route="trading"] #content-inner { padding: 12px 10px 82px; background-size: cover; }
  .market-tabs { width: 100%; }
  .market-tab { min-height: 44px; padding: 9px; font-size: 13px; }
  .market-browse-tools { width: 100%; display: grid; grid-template-columns: 1fr 1fr; }
  .market-browse-tools input { width: 100%; grid-column: 1 / -1; }
  .market-browse-tools select,
  .market-browse-tools button { width: 100%; }
  .kline-container { min-height: 300px !important; }
  .market-dashboard { grid-template-columns: 1fr; }
  .market-dashboard-main .kline-container { height: 260px; min-height: 260px !important; }
  .market-grid { grid-template-columns: 1fr; gap: 12px; }
  .market-card-header { height: 128px; }
  .market-card-game { font-size: 17px; }
  .market-card-meta,
  .market-card-compare,
  .market-card-seller { font-size: 12px; }
  .market-card-price { font-size: 24px; }

  #creator-root.creator-page { padding: 11px !important; background-position: 64% center; }
  .creator-home-layout { gap: 10px; }
  .creator-home-hero { min-height: 560px; background-position: 64% center; }
  .creator-home-copy { width: 100%; padding: 28px 18px; }
  .creator-home-copy h1 { font-size: 34px; }
  .creator-home-copy > span { font-size: 14px; }
  .creator-home-primary,
  .creator-home-secondary { min-height: 47px; font-size: 13px; }
  .creator-home-flow { grid-template-columns: repeat(5, 165px); }
  .creator-home-flow > div { height: 69px; }
  .creator-home-benefits > div { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .creator-home-bottom,
  .creator-home-side { grid-template-columns: 1fr; }
  .creator-home-panel { min-height: auto; }

  .concept-showcase {
    min-height: calc(100dvh - 58px);
    padding: 25px 11px 38px;
    background-size: cover;
    background-position: 64% center;
  }
  .concept-showcase-content { width: 100%; }
  .concept-showcase-heading { min-height: 58px; }
  .concept-showcase-heading > span { height: 56px; }
  .concept-showcase-heading h1 { font-size: 31px; }
  .concept-showcase-heading p { font-size: 11px; }
  .concept-showcase-steps strong { font-size: 10px; }
  .concept-showcase-steps span { width: 25px; height: 25px; }
  .concept-showcase-stage,
  .concept-showcase-panel { min-height: 0; }
  .concept-showcase-panel { padding: 17px; }
  .concept-basic-panel,
  .concept-detail-grid,
  .concept-upload-grid { grid-template-columns: 1fr; }
  .concept-field-wide { grid-column: auto; }
  .concept-field > span,
  .concept-tag-field > span { font-size: 12px; }
  .concept-field input,
  .concept-field select,
  .concept-tag-entry input,
  .concept-field textarea { font-size: 12px; }
  .concept-field input,
  .concept-field select,
  .concept-tag-entry input { height: 43px; }
  .concept-showcase-actions { grid-template-columns: minmax(110px, .65fr) minmax(165px, 1.35fr); gap: 12px; }
  .concept-showcase-actions button { min-height: 48px; font-size: 13px; }
}

@media (max-width: 430px) {
  .creator-home-benefits > div { grid-template-columns: 1fr; }
  .creator-home-featured > div { grid-template-columns: 1fr; }
  .creator-home-feature-image { height: 145px; }
  .concept-showcase-panel { padding: 14px; }
  .concept-showcase-actions { grid-template-columns: 1fr 1.35fr; }
}
