/* Core club screens 1–7: canonical premium shell from the supplied visual references. */
@media (min-width: 901px) {
  body.home-view-active:not(.game-session-active) .app,
  body.panel-view-active:not(.admin-view-active):not(.moderation-view-active) .app {
    width: 100%;
    max-width: none;
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 0 2px 4px;
  }

  body.home-view-active:not(.game-session-active) .topbar,
  body.panel-view-active:not(.admin-view-active):not(.moderation-view-active) .topbar {
    position: relative;
    width: 100%;
    min-height: 145px;
    height: 145px;
    flex: 0 0 145px;
    display: grid;
    grid-template-columns: minmax(465px, 31%) minmax(390px, 1fr) minmax(450px, 30%);
    align-items: center;
    gap: 8px;
    border: 1px solid #5d461b;
    border-radius: 0 0 18px 18px;
    padding: 0 22px;
    background: radial-gradient(circle at 50% 120%, rgb(24 91 59 / 18%), transparent 42%), linear-gradient(180deg, #010807, #020e0b);
    box-shadow: 0 8px 25px rgb(0 0 0 / 45%), inset 0 -1px rgb(212 160 54 / 12%);
    backdrop-filter: none;
  }

  .topbar-player-summary {
    min-width: 0;
    height: 100%;
    display: grid;
    grid-template-columns: 118px minmax(145px, .7fr) minmax(155px, .8fr);
    align-items: center;
    gap: 5px;
  }
  .topbar-player-summary .profile-menu-wrap { position: relative; justify-self: start; }
  .topbar-player-summary .profile-menu { left: 0; right: auto; top: calc(100% + 8px); }
  .topbar-player-summary .profile-trigger.polished-button {
    width: 114px !important;
    min-width: 114px !important;
    height: 120px !important;
    min-height: 120px !important;
  }
  .topbar-player-summary .profile-trigger-frame { width: 112px !important; height: 112px !important; flex-basis: 112px !important; }
  .topbar-player-copy { min-width: 0; display: grid; gap: 6px; }
  .topbar-player-copy strong { overflow: hidden; color: #f2bd50; font: 700 23px/1 Georgia, serif; text-overflow: ellipsis; white-space: nowrap; }
  .topbar-player-copy span { color: #f0c65f; font: 700 15px Georgia, serif; }
  .topbar-player-copy > i { width: 138px; height: 7px; overflow: hidden; border-radius: 99px; background: #3e301d; box-shadow: inset 0 1px 3px #000; }
  .topbar-player-copy > i b { height: 100%; display: block; border-radius: inherit; background: linear-gradient(90deg, #f0a224, #ff7121); }
  .topbar-wallet { min-width: 0; display: grid; gap: 8px; }
  .topbar-wallet > span { min-height: 42px; display: grid; grid-template-columns: 35px minmax(70px, 1fr) 36px; align-items: center; overflow: hidden; border: 1px solid #63491a; border-radius: 22px; background: rgb(3 15 12 / 90%); }
  .topbar-wallet i { width: 30px; height: 30px; display: grid; place-items: center; border: 2px solid #9e7425; border-radius: 50%; margin-left: 4px; background: radial-gradient(circle at 35% 30%, #ffd76e, #9c5d10); color: #4a2804; font-style: normal; }
  .topbar-wallet > span:nth-child(2) i { background: radial-gradient(circle at 35% 30%, #d6f4ff, #1d79a5); color: #e7fbff; }
  .topbar-wallet strong { color: #efc965; font: 700 20px Georgia, serif; text-align: center; }
  .topbar-wallet button { width: 36px; min-width: 36px; height: 40px; min-height: 40px; border: 0; border-left: 1px solid #493814; border-radius: 0; padding: 0; background: transparent; box-shadow: none; color: #e8a938; font-size: 27px; }

  body.home-view-active:not(.game-session-active) .topbar .brand-lockup,
  body.panel-view-active:not(.admin-view-active):not(.moderation-view-active) .topbar .brand-lockup {
    width: 100%;
    min-width: 0;
    height: 138px;
    justify-content: center;
    align-self: center;
    padding: 0;
  }
  body.home-view-active:not(.game-session-active) .topbar .brand-emblem,
  body.panel-view-active:not(.admin-view-active):not(.moderation-view-active) .topbar .brand-emblem { width: 94px; height: 94px; flex-basis: 94px; margin: 0 -8px; }
  body.home-view-active:not(.game-session-active) .topbar .brand-copy strong,
  body.panel-view-active:not(.admin-view-active):not(.moderation-view-active) .topbar .brand-copy strong { display: flex; align-items: center; justify-content: center; font-size: clamp(32px, 2.65vw, 46px); letter-spacing: -.04em; }
  body.home-view-active:not(.game-session-active) .topbar .brand-copy strong > span,
  body.panel-view-active:not(.admin-view-active):not(.moderation-view-active) .topbar .brand-copy strong > span { color: transparent; background: inherit; background-clip: text; -webkit-background-clip: text; }
  body.home-view-active:not(.game-session-active) .topbar .brand-copy small,
  body.panel-view-active:not(.admin-view-active):not(.moderation-view-active) .topbar .brand-copy small { display: none; }

  body.home-view-active:not(.game-session-active) .topbar .tabs,
  body.panel-view-active:not(.admin-view-active):not(.moderation-view-active) .topbar .tabs { min-width: 0; width: 100%; height: 100%; margin: 0; justify-content: flex-end; }
  .topbar-quick-actions { width: 100%; display: grid; grid-template-columns: repeat(5, minmax(70px, 1fr)); align-items: center; gap: 5px; }
  .topbar-quick-actions > button.polished-button {
    position: relative;
    min-width: 0;
    min-height: 104px;
    display: grid;
    grid-template-rows: 58px auto;
    place-items: center;
    gap: 4px;
    border: 0;
    padding: 4px 1px;
    background: transparent;
    box-shadow: none;
    color: #e7b851;
  }
  .topbar-quick-actions > button > span { width: 58px; height: 58px; display: grid; place-items: center; border: 1px solid #674814; border-radius: 50%; color: #e7a835; font: 700 29px Georgia, serif; }
  .topbar-quick-actions > button > strong { overflow: hidden; max-width: 100%; font: 700 13px Georgia, serif; text-overflow: ellipsis; white-space: nowrap; }
  .topbar-quick-actions > button > b { position: absolute; right: 14%; top: 7px; min-width: 23px; height: 23px; display: grid; place-items: center; border: 1px solid #ff5b4a; border-radius: 50%; background: #bd1717; color: #fff; font: 800 12px system-ui, sans-serif; }
  body.home-view-active:not(.game-session-active) .main-menu-toggle,
  body.panel-view-active:not(.admin-view-active):not(.moderation-view-active) .main-menu-toggle { display: none !important; }

  body.home-view-active:not(.game-session-active) #home { min-height: 0; flex: 1 1 auto; overflow: hidden; margin-top: 0; padding: 0; }
  body.home-view-active:not(.game-session-active) #home .lobby-dashboard {
    width: 100%;
    height: 100%;
    grid-template-columns: 258px minmax(620px, 1fr) 430px !important;
    gap: 10px;
    padding: 10px 14px 10px;
  }
  #home:not(.game-active) .lobby-side-rail { border-radius: 18px; padding: 0; background: linear-gradient(180deg, #031510, #010d0b); }
  .lobby-side-rail .lobby-player-heading,
  .lobby-side-rail .lobby-progress-list button {
    min-height: 77px;
    grid-template-columns: 55px minmax(0, 1fr);
    gap: 10px;
    border: 0;
    border-bottom: 1px solid rgb(210 159 52 / 15%);
    border-radius: 0;
    padding: 10px 19px;
    background: transparent;
    box-shadow: none;
  }
  .lobby-side-rail .lobby-player-heading { order: 0; border: 1px solid #d89d27; border-radius: 14px; background: linear-gradient(90deg, rgb(31 99 42 / 65%), rgb(8 30 18 / 72%)); }
  .lobby-side-rail .lobby-player-heading .lobby-feature-icon,
  .lobby-side-rail .lobby-progress-list .lobby-feature-icon { width: 50px; height: 50px; display: grid; place-items: center; color: #e7a832; font-size: 31px; text-shadow: 0 2px 4px #000; }
  .lobby-side-rail .lobby-player-heading strong,
  .lobby-side-rail .lobby-progress-list strong { color: #efc66e; font: 700 18px Georgia, serif; text-transform: uppercase; }
  .lobby-side-rail .lobby-progress-list small { display: none; }
  .lobby-side-rail .lobby-progress-list { display: flex; flex-direction: column; gap: 0; }
  #lobbyTournamentsBtn { order: 1; }
  #lobbyLeaderboardBtn { order: 2; }
  #lobbyClubBtn { order: 3; }
  #lobbyAdminBtn { order: 4; }
  #lobbyRewardsBtn, #lobbyCatalogBtn { display: none; }
  .lobby-tournament-promo { min-height: 222px; align-content: end; border-radius: 15px; margin: auto 12px 12px; padding: 17px; background: radial-gradient(circle at 85% 10%, rgb(235 185 70 / 20%), transparent 30%), linear-gradient(150deg, #0b2b20, #071810) !important; }
  .lobby-tournament-promo > span { font-size: 12px; }
  .lobby-tournament-promo > strong { font-size: 20px; }
  .lobby-tournament-promo > small { font-size: 12px; }
  .lobby-tournament-promo button { min-height: 48px; font-size: 14px; }

  #home:not(.game-active) .lobby-command-center { border-radius: 20px; padding: 20px 15px; background: linear-gradient(145deg, #061c15, #020f0c); }
  .lobby-welcome { align-items: center; min-height: 60px; margin: 0 15px 8px; }
  .lobby-welcome h2 { color: #edbd60; font-size: 26px; text-transform: uppercase; letter-spacing: .01em; }
  .lobby-welcome p { margin: 6px 0 0; color: #d1ba8f; font: 15px Georgia, serif; }
  .lobby-primary-actions { gap: 12px; }
  .lobby-action-card { min-height: 300px; grid-template-columns: minmax(0, 1fr) 48%; grid-template-rows: auto 1fr auto; border-color: #bc8126; border-radius: 18px; padding: 21px 28px 17px; background: radial-gradient(circle at 70% 52%, rgb(28 125 66 / 35%), transparent 45%), linear-gradient(145deg, #073d23, #042619); }
  .lobby-action-card.rooms-card { background: radial-gradient(circle at 70% 52%, rgb(26 99 144 / 38%), transparent 45%), linear-gradient(145deg, #082f47, #061b2c); }
  .lobby-action-card > div:nth-child(2) { align-self: start; text-align: center; }
  .lobby-action-card h3 { font-size: 26px; text-transform: uppercase; }
  .lobby-action-card p { max-width: none; color: #d3bd92; font: 15px Georgia, serif; }
  .lobby-action-card > button { width: 100%; min-height: 58px; justify-content: center; border: 1px solid #f0c867; border-radius: 12px; font-size: 21px; text-transform: uppercase; }
  .lobby-action-card > button { grid-column: 1 / -1; grid-row: 3; }
  .lobby-action-art { grid-column: 1 / -1; grid-row: 2; width: 72%; justify-self: center; }
  .mini-table { inset: auto 2% 13px; height: 105px; transform: none; }
  .floating-card { width: 56px; height: 80px; }
  .floating-card.card-one { right: 23%; top: 6px; }
  .floating-card.card-two { right: 42%; top: 15px; }
  .lobby-friends-banner { min-height: 116px; grid-template-columns: 210px minmax(0, 1fr) 330px; margin-top: 12px; padding: 15px 28px; }
  .friends-stack i { width: 54px; height: 54px; font-size: 18px; }
  .lobby-friends-banner strong { font-size: 22px; text-transform: uppercase; }
  .lobby-friends-banner small { font-size: 14px; }
  .lobby-friends-banner > b { border: 1px solid #a9792b; border-radius: 10px; padding: 18px; font-size: 14px; text-align: center; text-transform: uppercase; }
  .lobby-recent-section { margin-top: 10px; }
  .lobby-recent-section > header { justify-content: center; }
  .lobby-recent-section .eyebrow, .lobby-recent-section > header button { display: none; }
  .lobby-recent-section h3 { color: #edbd60; font-size: 20px; text-transform: uppercase; }
  .lobby-recent-matches { grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: hidden; }
  .lobby-match-row { grid-template-columns: 34px minmax(0, 1fr); grid-template-rows: auto auto; min-height: 96px; }
  .lobby-match-row > b, .lobby-match-row > em { grid-column: auto; }

  .lobby-right-rail { gap: 12px; }
  .lobby-summary-card { flex: 0 0 auto; min-height: 220px; padding: 16px; }
  .lobby-summary-card > header { justify-content: center; color: #e2b655; font: 700 20px Georgia, serif; text-transform: uppercase; }
  .lobby-summary-card > header button { position: absolute; right: 10px; }
  .lobby-stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); overflow: hidden; border: 1px solid rgb(213 166 54 / 25%); border-radius: 13px; margin-top: 15px; background: rgb(211 163 49 / 16%); }
  .lobby-stat-grid > div { min-height: 72px; display: grid; place-content: center; justify-items: center; gap: 3px; background: #031a14; }
  .lobby-stat-grid strong { color: #efbd58; font: 700 28px Georgia, serif; }
  .lobby-stat-grid span { color: #c8a774; font: 13px Georgia, serif; }
  .lobby-vip-card { position: relative; min-height: 290px; align-content: start; padding: 22px !important; background: radial-gradient(circle at 90% 54%, rgb(225 176 65 / 22%), transparent 34%), linear-gradient(145deg, #071711, #11120f) !important; }
  .lobby-vip-card > span { font-size: 21px; text-transform: uppercase; }
  .lobby-vip-card > strong { font-size: 16px; }
  .lobby-vip-card ul { z-index: 1; display: grid; gap: 8px; margin: 10px 0; padding: 0; color: #d9b96c; font-size: 13px; list-style: none; }
  .lobby-vip-card li::before { content: "✓"; margin-right: 8px; color: #87c334; }
  .lobby-vip-card > i { position: absolute; right: 28px; bottom: 64px; color: rgb(231 187 73 / 35%); font-size: 125px; font-style: normal; }
  .lobby-vip-card button { z-index: 1; min-height: 49px; margin-top: auto; font-size: 15px; text-transform: uppercase; }
  .lobby-daily-card { min-height: 145px; grid-template-columns: 78px 1fr auto; padding: 18px; }
  .daily-gift { width: 70px; height: 70px; font-size: 32px; }
  .lobby-daily-card strong { font-size: 18px; text-transform: uppercase; }
  .lobby-daily-card small { font-size: 13px; }
  .lobby-daily-card button { min-height: 48px; font-size: 14px; }
  .lobby-right-rail > .lobby-quick-button { display: none; }

  #home.lobby-layer-active::before { display: none; }
  #home.lobby-layer-active .lobby-command-center,
  #home.lobby-layer-active .lobby-right-rail { display: none; }
  #home:not(.game-active) .lobby-panel.lobby-layer-open {
    position: relative;
    inset: auto;
    z-index: 2;
    grid-column: 2 / 4;
    grid-row: 1;
    width: 100%;
    height: 100%;
    max-height: none;
    overflow: hidden;
    border-radius: 18px;
    padding: 15px 20px;
    background: linear-gradient(145deg, #061a14, #020e0b);
    box-shadow: none;
  }
  .lobby-panel-heading { min-height: 62px; margin-bottom: 8px; }
  .lobby-panel-heading h2 { color: #e7b74f; font-size: 29px; text-transform: uppercase; }
  .lobby-panel-heading > div > p { color: #d3bd91; font-size: 15px; }
  .lobby-panel-heading .eyebrow { display: none; }
  .lobby-panel-close { order: -1; width: 72px; min-width: 72px; height: 60px; margin-right: 18px; border-radius: 11px; }
  .lobby-panel-heading > div { flex: 1; }
  .lobby-panel-heading { justify-content: flex-start; }
  .lobby-setup-layout { height: calc(100% - 138px); grid-template-columns: minmax(600px, 1fr) 440px; gap: 18px; }
  .lobby-option-stack { min-height: 0; grid-template-rows: repeat(3, minmax(0, 1fr)) 80px; gap: 8px; }
  .lobby-option-stack fieldset { padding: 10px 14px; }
  .lobby-option-stack legend > b { color: #e5a92e; font-size: 20px; }
  .lobby-option-stack legend > span { color: #e8b94f; font: 700 17px Georgia, serif; text-transform: uppercase; }
  .lobby-option-stack legend small { display: none; }
  .lobby-choice-grid button { min-height: 70px; }
  .lobby-choice-grid button strong { font-size: 17px; }
  .lobby-choice-grid button small { color: #d1bd94; font-size: 13px; }
  .lobby-joker-options { display: none; }
  .lobby-appearance-option { width: 100%; min-height: 70px; display: grid; grid-template-columns: 55px 1fr 35px; align-items: center; border-color: #7c581f; background: transparent; color: #e7b84d; text-align: left; }
  .lobby-appearance-option > span { font-size: 28px; }
  .lobby-appearance-option > strong { font: 700 16px Georgia, serif; text-transform: uppercase; }
  .lobby-appearance-option > i { font-size: 30px; font-style: normal; }
  .lobby-table-preview { border-color: #8a6324; padding: 16px; }
  .lobby-table-preview > .eyebrow { display: block; color: #e8b84f; font: 700 20px Georgia, serif; text-align: center; text-transform: uppercase; }
  .preview-table { width: min(100%, 385px); margin: 31px auto; }
  .lobby-table-preview > button { min-height: 70px; font-size: 23px; text-transform: uppercase; }
  .lobby-create-actions { height: 60px; justify-content: flex-end; }

  .lobby-wait-layout { height: calc(100% - 145px); grid-template-columns: minmax(650px, 1fr) 355px; min-height: 0; }
  .lobby-roomline { justify-content: flex-start; padding-left: 18px; font-size: 17px; }
  .lobby-wait-table { min-height: 0; margin: 0 18px; }
  .lobby-wait-table::before { inset: 55px 8% 45px; border-width: 15px; }
  .lobby-players .waiting-seat { width: 160px; min-height: 92px; }
  .waiting-avatar { width: 58px; height: 58px; }
  .lobby-wait-info { padding: 20px; }
  .lobby-wait-info h3 { color: #e9ba54; font-size: 23px; text-align: center; text-transform: uppercase; }
  .lobby-wait-actions { position: absolute; left: 20px; right: 20px; bottom: 14px; min-height: 66px; align-items: center; }
  .lobby-wait-actions button { min-height: 55px; font-size: 16px; text-transform: uppercase; }

  .lobby-open-rooms .lobby-rooms-heading { align-items: center; }
  .lobby-open-rooms .lobby-rooms-heading .lobby-panel-close { order: 0; margin: 0 0 0 8px; }
  .lobby-open-rooms .lobby-room-filters { min-height: 58px; gap: 0; margin: 0 0 12px; }
  .lobby-open-rooms .lobby-room-filters button { min-width: 118px; min-height: 50px; border-radius: 0; font-size: 14px; }
  .lobby-open-rooms .lobby-room-filters button:first-child,
  .lobby-open-rooms .lobby-room-filters span + button { border-radius: 10px 0 0 10px; }
  .lobby-open-rooms .lobby-room-filters button:nth-child(4),
  .lobby-open-rooms .lobby-room-filters button:last-child { border-radius: 0 10px 10px 0; }
  .lobby-open-rooms .lobby-rooms-layout { height: calc(100% - 145px); grid-template-columns: minmax(650px, 1fr) 365px; gap: 16px; }
  .lobby-room-table { min-width: 0; display: flex; flex-direction: column; }
  .lobby-room-table > header { min-height: 48px; display: grid; grid-template-columns: 120px minmax(190px, 1fr) 160px 150px 145px; align-items: center; gap: 10px; border: 1px solid rgb(218 166 55 / 23%); border-radius: 12px 12px 0 0; padding: 8px 16px; color: #d9b870; font: 700 14px Georgia, serif; }
  .lobby-layer-open .lobby-room-list { max-height: none; grid-template-columns: 1fr; gap: 8px; padding-top: 8px; }
  .lobby-room-list .room-row { min-height: 88px; grid-template-columns: 105px minmax(210px, 1fr) 175px 125px 105px 22px; gap: 12px; border-color: #78561d; border-radius: 12px; padding: 12px 15px; }
  .room-row-code strong { font-size: 19px; }
  .room-row-copy strong { font-size: 15px; }
  .room-row-copy span, .room-row-code small, .room-row-rating small, .room-row-free small { font-size: 11px; }
  .room-row-rating strong, .room-row-free strong { font-size: 17px; }
  .room-row-players i { width: 42px; height: 42px; font-size: 13px; }
  .lobby-open-rooms .lobby-room-detail { min-height: 0; border-color: #805b1f; padding: 17px; }
  .lobby-open-rooms .lobby-room-detail > .eyebrow { display: block; color: #e8b84d; font: 700 17px Georgia, serif; text-align: center; }
  .lobby-open-rooms .preview-table.compact { width: 300px; margin: 28px auto 36px; }
  .lobby-open-rooms .lobby-room-detail h3 { font-size: 23px; }
  .lobby-open-rooms .lobby-room-detail > p { font-size: 13px; }
  .lobby-open-rooms .lobby-room-detail > button { min-height: 63px; font-size: 19px; text-transform: uppercase; }

  .lobby-friends-room .friends-room-tabs { min-height: 64px; gap: 10px; margin: 0 0 12px; }
  .lobby-friends-room .friends-room-tabs button { width: min(42%, 500px); min-height: 56px; border: 1px solid #74531e; border-radius: 10px; font-size: 17px; text-transform: uppercase; }
  .lobby-friends-room .friends-create-pane { height: calc(100% - 150px); grid-template-columns: 330px minmax(390px, 1fr) 355px; gap: 14px; }
  .lobby-friends-room .friends-room-settings,
  .lobby-friends-room .friends-table-stage,
  .lobby-friends-room .friends-room-share { min-height: 0; border-color: #77551e; padding: 17px; }
  .lobby-friends-room .friends-room-settings > .eyebrow { color: #e9b94e; font: 700 18px Georgia, serif; text-transform: uppercase; }
  .lobby-friends-room .friends-room-settings label { color: #d7bd86; font-size: 14px; }
  .lobby-friends-room .friends-room-settings select { min-height: 55px; font-size: 15px; }
  .lobby-friends-list { max-height: none; }
  .lobby-friends-list > p { font-size: 13px; }
  .lobby-friends-list article { min-height: 62px; }
  .friends-table-stage { display: flex; align-items: stretch; justify-content: flex-start; }
  .friends-seat-heading { min-height: 45px; display: flex; align-items: center; justify-content: space-between; color: #e9b94e; font: 700 18px Georgia, serif; text-transform: uppercase; }
  .friends-seat-list { display: grid; gap: 10px; }
  .friends-seat-list article { min-height: 92px; display: grid; grid-template-columns: 66px minmax(0, 1fr) auto; align-items: center; gap: 13px; border: 1px solid #674b1d; border-radius: 13px; padding: 10px 15px; background: rgb(7 23 17 / 80%); }
  .friends-seat-list article > i { width: 62px; height: 62px; display: grid; place-items: center; border: 2px solid #a57a28; border-radius: 50%; background: #121b18; color: #e7b84d; font: 700 28px Georgia, serif; font-style: normal; }
  .friends-seat-list article > strong { color: #d9d3c3; font: 700 18px Georgia, serif; }
  .friends-seat-list article > span { color: #91ce37; font-size: 15px; }
  .friends-room-share > .eyebrow { color: #e8b84d; font: 700 17px Georgia, serif; text-transform: uppercase; }
  .friends-room-share h3 { font-size: 23px; }
  .friends-room-share label { display: grid; gap: 6px; color: #8ec936; font-size: 14px; }
  .friends-room-share label strong { min-height: 55px; display: flex; align-items: center; overflow: hidden; border: 1px solid #65491b; border-radius: 10px; padding: 10px; color: #e5d4aa; font: 700 17px Georgia, serif; text-overflow: ellipsis; white-space: nowrap; }
  .friends-room-share p { border: 1px solid #694a1c; border-radius: 11px; padding: 15px; font-size: 14px; }
  .friends-room-share button { min-height: 70px; font-size: 20px; text-transform: uppercase; }

  .profile-view #profileStatsSection { align-content: start; gap: 12px; overflow: hidden; padding: 12px 16px; }
  .profile-stats-hero { min-height: 205px; display: grid; grid-template-columns: 470px minmax(0, 1fr); align-items: stretch; gap: 14px; }
  .profile-stats-identity { min-width: 0; display: grid; grid-template-columns: 190px minmax(0, 1fr); align-items: center; gap: 18px; }
  .profile-stats-identity > .profile-avatar-frame { position: relative; width: 174px; height: 174px; display: grid; place-items: center; }
  .profile-stats-identity > .profile-avatar-frame > i { position: relative; z-index: 1; width: 61%; height: 61%; display: grid; place-items: center; overflow: hidden; border: 1px solid rgb(255 222 132 / 36%); border-radius: 50%; background: radial-gradient(circle at 35% 25%, #f1cf75, #6f4217); color: #211707; font: 800 36px Georgia, serif; font-style: normal; }
  .profile-stats-identity > .profile-avatar-frame > i img { width: 100%; height: 100%; object-fit: cover; }
  .profile-stats-identity > div { min-width: 0; display: grid; gap: 10px; }
  .profile-stats-identity > div > strong { overflow: hidden; color: #f4ecd9; font: 700 31px Georgia, serif; text-overflow: ellipsis; white-space: nowrap; }
  .profile-stats-identity > div > span { color: #d9d4c8; font-size: 17px; }
  .profile-stats-identity > div b { color: #eabd51; font: 700 27px Georgia, serif; }
  .profile-stats-identity > div small { color: #9bd42e; font-size: 15px; }
  .profile-stats-hero > .profile-stats-pane { min-width: 0; }
  .profile-stats-hero #statsBox { height: 100%; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
  .profile-stats-hero #statsBox .profile-stat-card { min-height: 0; height: 100%; display: grid; align-content: center; gap: 8px; border-color: #815c21; }
  .profile-stats-hero #statsBox .profile-stat-card > span { font-size: 14px; }
  .profile-stats-hero #statsBox .profile-stat-card > strong { font-size: 39px; }
  .profile-stats-hero #statsBox .profile-stat-card > small { color: #9bd32c; font-size: 15px; }
  .profile-view #profileStatsSection .profile-stat-filters { min-height: 130px; align-items: center; padding: 14px 24px; }
  .profile-view #profileStatsSection .profile-stat-filters > div { min-height: 82px; }
  .profile-view #profileStatsSection .profile-stat-filters span { color: #d7c89f; font: 700 18px Georgia, serif; }
  .profile-view #profileStatsSection .profile-stat-filters button { min-height: 70px; font-size: 17px; text-transform: uppercase; }
  .profile-view #profileStatsSection .profile-metric-divider { font-size: 20px; }
  .profile-view #profileStatsSection .profile-stat-details-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
  .profile-view #profileStatsSection .profile-stat-details-grid .profile-stat-card { min-height: 145px; display: grid; align-content: center; gap: 9px; border-color: #78561e; }
  .profile-view #profileStatsSection .profile-stat-details-grid .profile-stat-card > span { font-size: 14px; }
  .profile-view #profileStatsSection .profile-stat-details-grid .profile-stat-card > strong { font-size: 35px; }
  .profile-stats-footnote { margin: 0; color: #a79d89; font-size: 14px; }

  /* Screens 12-24: reference-scale tournament, rating and club workspaces. */
  .tournament-workspace:not(.hidden),
  .rating-workspace:not(.hidden),
  .club-workspace:not(.hidden) {
    grid-template-columns: 258px minmax(0, 1fr);
    gap: 10px;
    margin: 10px 14px 10px;
    font-family: "Arial Narrow", "Roboto Condensed", "Segoe UI", sans-serif;
  }
  .tournament-workspace .workspace-section-rail,
  .rating-workspace .workspace-section-rail,
  .club-workspace .workspace-section-rail {
    gap: 0;
    border-radius: 18px;
    padding: 0;
    background: linear-gradient(180deg, #031510, #010d0b);
  }
  .tournament-workspace .workspace-section-rail button,
  .rating-workspace .workspace-section-rail button,
  .club-workspace .workspace-section-rail button {
    min-height: 77px;
    grid-template-columns: 55px minmax(0, 1fr);
    gap: 10px;
    border: 0;
    border-bottom: 1px solid rgb(210 159 52 / 15%);
    border-radius: 0;
    padding: 10px 19px;
    background: transparent;
  }
  .tournament-workspace .workspace-section-rail button > span,
  .rating-workspace .workspace-section-rail button > span,
  .club-workspace .workspace-section-rail button > span {
    width: 50px;
    height: 50px;
    border-radius: 0;
    color: #e7a832;
    font: 800 31px/1 "Segoe UI Symbol", sans-serif;
    text-shadow: 0 2px 4px #000;
  }
  .tournament-workspace .workspace-section-rail button > strong,
  .rating-workspace .workspace-section-rail button > strong,
  .club-workspace .workspace-section-rail button > strong {
    color: #efc66e;
    font: 700 18px/1.15 "Arial Narrow", "Segoe UI", sans-serif;
    text-transform: uppercase;
  }
  .tournament-workspace .workspace-section-rail button.selected,
  .rating-workspace .workspace-section-rail button.selected,
  .club-workspace .workspace-section-rail button.selected {
    border: 1px solid #d89d27;
    border-radius: 14px;
    background: linear-gradient(90deg, rgb(31 99 42 / 72%), rgb(8 30 18 / 82%));
  }
  .tournament-workspace .workspace-section-rail button:last-child,
  .rating-workspace .workspace-section-rail button:last-child,
  .club-workspace .workspace-section-rail button:last-child { margin-top: 0; }

  .tournament-workspace > .tournament-hub,
  .rating-workspace > .rating-hub,
  .club-workspace > .club-hub {
    border-color: #4e3b17;
    border-radius: 18px;
    padding: 10px 14px 14px;
    background: linear-gradient(145deg, #061a14, #020e0b);
  }
  .tournament-workspace .tournament-heading,
  .rating-workspace .rating-heading,
  .club-workspace .club-heading { display: none; }

  .tournament-workspace .tournament-filters,
  .rating-workspace .rating-filters,
  .club-workspace .club-navigation {
    display: grid;
    gap: 0;
    overflow: hidden;
    border: 1px solid #5f471a;
    border-radius: 13px;
    margin: 0 0 12px;
    background: #020d0b;
  }
  .tournament-workspace .tournament-filters { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .rating-workspace .rating-filters { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .club-workspace .club-navigation { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .tournament-workspace .tournament-filters button,
  .rating-workspace .rating-filters button,
  .club-workspace .club-navigation button {
    width: 100%;
    min-height: 58px;
    border: 0;
    border-right: 1px solid rgb(214 163 52 / 18%);
    border-bottom: 0;
    border-radius: 0;
    padding: 8px 10px;
    background: linear-gradient(180deg, #071612, #020d0b);
    color: #e8dec9;
    font: 700 16px/1 "Arial Narrow", "Segoe UI", sans-serif;
    text-transform: uppercase;
  }
  .tournament-workspace .tournament-filters button:last-child,
  .rating-workspace .rating-filters button:last-child,
  .club-workspace .club-navigation button:last-child { border-right: 0; }
  .tournament-workspace .tournament-filters button.active,
  .rating-workspace .rating-filters button.active,
  .club-workspace .club-navigation button.active {
    border-bottom: 0;
    background: linear-gradient(180deg, #126128, #063918);
    color: #fff5d5;
    box-shadow: inset 0 0 0 1px #b98525;
  }

  .tournament-workspace .tournament-summary { display: none; }
  .tournament-workspace .tournament-layout {
    grid-template-columns: minmax(610px, 1.45fr) minmax(390px, .75fr);
    gap: 14px;
  }
  .tournament-list-heading {
    min-height: 45px;
    grid-template-columns: minmax(0, 1fr) 135px 150px;
    align-items: center;
    padding: 8px 18px 8px 86px;
    color: #c4a969;
    font-size: 11px;
  }
  .tournament-workspace .tournament-row {
    min-height: 105px;
    grid-template-columns: 58px minmax(0, 1fr) 135px 150px;
    gap: 14px;
    padding: 13px 18px;
  }
  .tournament-workspace .tournament-row-icon { width: 55px; height: 55px; font-size: 27px; }
  .tournament-workspace .tournament-row-main > strong { margin-top: 7px; font-size: 18px; }
  .tournament-workspace .tournament-row-main > small { font-size: 12px; }
  .tournament-workspace .tournament-row-main > em { font-size: 13px; }
  .tournament-row-capacity > strong { font-size: 15px; }
  .tournament-row-capacity > small,
  .tournament-workspace .tournament-row-meta small,
  .tournament-workspace .tournament-row-meta span { font-size: 11px; }
  .tournament-workspace .tournament-detail-hero { min-height: 190px; grid-template-columns: 78px 1fr; padding: 24px; }
  .tournament-workspace .tournament-detail-hero > span { width: 72px; height: 72px; font-size: 38px; }
  .tournament-workspace .tournament-detail-hero h3 { font-size: 29px; }
  .tournament-workspace .tournament-detail-hero p { font-size: 15px; }
  .tournament-hero-economy small { font-size: 10px; }
  .tournament-hero-economy b { font-size: 14px; }
  .tournament-detail-tabs button { min-height: 49px; font-size: 13px; text-transform: uppercase; }
  .tournament-about-grid > div { min-height: 62px; padding: 11px; }
  .tournament-about-grid small { font-size: 10px; }
  .tournament-about-grid strong { font-size: 13px; }
  .tournament-detail-page > section h4 { font-size: 15px; }

  .rating-layout { grid-template-columns: minmax(0, 1fr) 370px; gap: 14px; }
  .rating-podium { min-height: 335px; gap: 10px; padding: 24px 22px 0; }
  .rating-podium-place { min-height: 252px; padding: 18px 12px 26px; }
  .rating-podium-place.place-1 { min-height: 310px; }
  .rating-podium-avatar { width: 94px; height: 94px; font-size: 30px; }
  .rating-podium-place.place-1 .rating-podium-avatar { width: 118px; height: 118px; }
  .rating-podium-number { top: 13px; left: 15px; font-size: 25px; }
  .rating-podium-place strong { font-size: 17px; }
  .rating-podium-place > span:not(.rating-podium-avatar):not(.rating-podium-number) { font-size: 22px; }
  .rating-podium-place small { font-size: 11px; }
  .rating-list-heading, .rating-row { grid-template-columns: minmax(0, 1fr) 95px 85px 110px; }
  .rating-list-heading { min-height: 42px; padding: 9px 16px; font-size: 10px; }
  .rating-row { min-height: 75px; padding: 10px 16px; }
  .rating-row > div { grid-template-columns: 34px 48px minmax(0, 1fr); gap: 10px; }
  .rating-avatar { width: 46px; height: 46px; font-size: 16px; }
  .rating-row > div > b, .rating-row > span { font-size: 14px; }
  .rating-row > div strong { font-size: 15px; }
  .rating-row > div small { font-size: 11px; }
  .rating-row > strong { font-size: 17px; }
  .rating-sidebar { gap: 12px; }
  .rating-sidebar > section { padding: 20px; }
  .rating-own-main { grid-template-columns: 58px 64px minmax(0, 1fr); gap: 12px; margin: 16px 0; }
  .rating-own-main > strong { font-size: 38px; }
  .rating-own-avatar { width: 62px; height: 62px; }
  .rating-own-main b { font-size: 18px; }
  .rating-own-main small { font-size: 12px; }
  .rating-own-stats b { font-size: 17px; }
  .rating-own-stats small { font-size: 10px; }
  .rating-season-card h3, .rating-rules-card h3 { font-size: 21px; }
  .rating-season-card p, .rating-rules-card p { font-size: 14px; }
  .rating-season-card > div { padding: 11px 0; font-size: 12px; }

  .club-workspace .club-profile-hero { min-height: 210px; grid-template-columns: 145px minmax(0, 1fr); padding: 24px; }
  .club-workspace .club-profile-emblem { width: 125px; height: 125px; font-size: 65px; }
  .club-workspace .club-profile-hero h3 { font-size: 36px; }
  .club-workspace .club-profile-hero p { font-size: 16px; }
  .club-overview-layout { grid-template-columns: minmax(0, 1fr) 370px; gap: 14px; }
  .club-workspace .club-metrics article { min-height: 78px; padding: 14px; }
  .club-workspace .club-metrics small { font-size: 10px; }
  .club-workspace .club-metrics strong { font-size: 23px; }
  .club-workspace .club-section { padding: 18px; }
  .club-workspace .club-section h3 { font-size: 23px; }
  .club-workspace .club-section .section-heading p { font-size: 13px; }
  .club-workspace .club-member-card { min-height: 72px; padding: 11px; }
  .club-workspace .club-member-avatar { width: 46px; height: 46px; }
  .club-workspace .club-member-card strong { font-size: 14px; }
  .club-workspace .club-member-card small,
  .club-workspace .club-member-card em { font-size: 11px; }
  .club-self-card { padding: 19px; }
  .club-self-card > b { font-size: 35px; }
  .club-self-card > div strong { font-size: 16px; }
  .club-self-card > div small, .club-self-card > small, .club-self-card p { font-size: 12px; }
  .club-overview-sidebar .club-war-banner { min-height: 225px; padding: 20px; }
  .club-members-toolbar input, .club-members-toolbar select { min-height: 49px; font-size: 14px; }
  .club-members-page .club-member-card .card-actions button { min-height: 39px; font-size: 11px; }
  .club-workspace .club-war-score { min-height: 310px; padding: 30px; }
  .club-war-score article > span { font-size: 66px; }
  .club-war-score article strong { font-size: 22px; }
  .club-war-score article b { font-size: 48px; }
  .club-own-war-state { min-height: 82px; padding: 15px 20px; font-size: 16px; }
  .club-war-leaders > div { min-height: 54px; align-items: center; padding: 10px; font-size: 14px; }
  .club-workspace .club-settings label,
  .club-workspace .club-settings h4 { font-size: 15px; }
  .club-workspace .club-settings input,
  .club-workspace .club-settings select { min-height: 50px; font-size: 15px; }
  .club-workspace .club-settings .club-permissions label { min-height: 72px; padding: 14px; }
}

@media (max-width: 900px) and (orientation: landscape) {
  body.home-view-active:not(.game-session-active) .app,
  body.panel-view-active:not(.admin-view-active):not(.moderation-view-active) .app { width: 100%; max-width: none; height: 100dvh; overflow: hidden; padding: 0; }
  body.home-view-active:not(.game-session-active) .topbar,
  body.panel-view-active:not(.admin-view-active):not(.moderation-view-active) .topbar { min-height: 64px; height: 64px; display: grid; grid-template-columns: 210px minmax(220px, 1fr) 220px; gap: 3px; padding: 0 6px; }
  .topbar-player-summary { min-width: 0; display: grid; grid-template-columns: 60px 1fr; align-items: center; }
  .topbar-player-summary .profile-trigger.polished-button { width: 60px !important; min-width: 60px !important; height: 62px !important; min-height: 62px !important; }
  .topbar-player-summary .profile-trigger-frame { width: 58px !important; height: 58px !important; flex-basis: 58px !important; }
  .topbar-player-copy { display: grid; gap: 2px; }
  .topbar-player-copy strong { color: #efbd54; font: 700 12px Georgia, serif; }
  .topbar-player-copy span { color: #d7ae5e; font-size: 9px; }
  .topbar-player-copy > i { width: 90px; height: 4px; background: #44341b; }
  .topbar-player-copy > i b { height: 100%; display: block; background: #ef8f23; }
  .topbar-wallet { display: none; }
  body.home-view-active:not(.game-session-active) .topbar .brand-lockup,
  body.panel-view-active:not(.admin-view-active):not(.moderation-view-active) .topbar .brand-lockup { min-width: 0; height: 62px; justify-content: center; }
  body.home-view-active:not(.game-session-active) .topbar .brand-emblem,
  body.panel-view-active:not(.admin-view-active):not(.moderation-view-active) .topbar .brand-emblem { width: 52px; height: 52px; flex-basis: 52px; margin: 0 -6px; }
  body.home-view-active:not(.game-session-active) .topbar .brand-copy strong,
  body.panel-view-active:not(.admin-view-active):not(.moderation-view-active) .topbar .brand-copy strong { display: flex; align-items: center; justify-content: center; font-size: clamp(17px, 3.1vw, 24px); }
  body.home-view-active:not(.game-session-active) .topbar .brand-copy small,
  body.panel-view-active:not(.admin-view-active):not(.moderation-view-active) .topbar .brand-copy small { display: none; }
  .topbar-quick-actions { display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px; }
  .topbar-quick-actions > button.polished-button { position: relative; min-width: 0; min-height: 51px; display: grid; place-items: center; border: 0; padding: 0; background: transparent; box-shadow: none; }
  .topbar-quick-actions > button > span { font-size: 22px; }
  .topbar-quick-actions > button > strong { display: none; }
  .topbar-quick-actions > button > b { position: absolute; right: 1px; top: 0; min-width: 14px; height: 14px; display: grid; place-items: center; border-radius: 50%; background: #b71818; color: #fff; font-size: 8px; }
  body.home-view-active:not(.game-session-active) .main-menu-toggle,
  body.panel-view-active:not(.admin-view-active):not(.moderation-view-active) .main-menu-toggle { display: none !important; }
  body.home-view-active:not(.game-session-active) #home { height: calc(100dvh - 64px); overflow: hidden; margin: 0; padding: 0; }
  body.home-view-active:not(.game-session-active) #home .lobby-dashboard { height: 100%; display: grid; grid-template-columns: 132px minmax(0, 1fr) 205px !important; grid-template-rows: 1fr; gap: 5px; padding: 5px; }
  #home:not(.game-active) .lobby-side-rail { grid-column: 1; grid-row: 1; min-height: 0; height: 100%; order: initial; padding: 3px; }
  .lobby-side-rail .lobby-player-heading, .lobby-side-rail .lobby-progress-list button { min-height: 38px; grid-template-columns: 27px 1fr; padding: 3px 5px; }
  .lobby-side-rail .lobby-feature-icon { font-size: 18px; }
  .lobby-side-rail strong { font-size: 8px !important; }
  #lobbyRewardsBtn, #lobbyCatalogBtn { display: none; }
  .lobby-tournament-promo { min-height: 105px; margin-top: auto; padding: 7px; }
  .lobby-tournament-promo > span, .lobby-tournament-promo > small { font-size: 6px; }
  .lobby-tournament-promo > strong { font-size: 10px; }
  .lobby-tournament-promo button { min-height: 28px; font-size: 7px; }
  #home:not(.game-active) .lobby-command-center { grid-column: 2; grid-row: 1; min-height: 0; height: 100%; order: initial; padding: 7px; }
  .lobby-welcome { min-height: 29px; margin-bottom: 4px; }
  .lobby-welcome h2 { font-size: 12px; text-transform: uppercase; }
  .lobby-welcome p { margin: 2px 0; font-size: 7px; }
  .lobby-primary-actions { grid-template-columns: repeat(2, 1fr); gap: 5px; }
  .lobby-action-card { min-height: 132px; grid-template-columns: 1fr 42%; padding: 7px; }
  .lobby-action-card h3 { font-size: 12px; }
  .lobby-action-card p { font-size: 7px; }
  .lobby-action-card > button { min-height: 29px; padding: 3px 8px; font-size: 8px; }
  .mini-table { height: 49px; }
  .floating-card { width: 24px; height: 34px; font-size: 9px; }
  .lobby-friends-banner { min-height: 47px; grid-template-columns: 62px 1fr; margin-top: 5px; padding: 4px 7px; }
  .friends-stack i { width: 25px; height: 25px; font-size: 7px; }
  .lobby-friends-banner strong { font-size: 10px; }
  .lobby-friends-banner small { font-size: 6px; }
  .lobby-friends-banner > b { display: none; }
  .lobby-recent-section { margin-top: 5px; }
  .lobby-recent-section h3 { font-size: 10px; }
  .lobby-recent-section .eyebrow { display: none; }
  #home:not(.game-active) .lobby-right-rail { grid-column: 3; grid-row: 1; min-height: 0; height: 100%; order: initial; display: flex !important; gap: 4px; }
  .lobby-summary-card { min-height: 105px; padding: 6px; }
  .lobby-summary-card > header { font-size: 8px; }
  .lobby-stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); margin-top: 4px; }
  .lobby-stat-grid > div { min-height: 38px; display: grid; place-content: center; text-align: center; }
  .lobby-stat-grid strong { font-size: 12px; }
  .lobby-stat-grid span { font-size: 6px; }
  .lobby-vip-card { min-height: 120px; padding: 7px; }
  .lobby-vip-card > span, .lobby-vip-card > strong { font-size: 8px; }
  .lobby-vip-card ul { margin: 3px 0; padding-left: 12px; font-size: 6px; }
  .lobby-vip-card button { min-height: 24px; font-size: 7px; }
  .lobby-daily-card { min-height: 55px; grid-template-columns: 26px 1fr; padding: 5px; }
  .daily-gift { width: 24px; height: 24px; }
  .lobby-daily-card strong { font-size: 7px; }
  .lobby-daily-card small { font-size: 6px; }
  .lobby-daily-card button { grid-column: 1 / -1; min-height: 23px; font-size: 7px; }
  .lobby-right-rail > .lobby-quick-button { display: none; }
  #home.lobby-layer-active::before { display: none; }
  #home.lobby-layer-active .lobby-command-center, #home.lobby-layer-active .lobby-right-rail { display: none !important; }
  #home:not(.game-active) .lobby-panel.lobby-layer-open { position: relative; inset: auto; z-index: 2; grid-column: 2 / 4; grid-row: 1; width: 100%; height: 100%; max-height: none; overflow-y: auto; border-radius: 12px; padding: 7px; }
  .lobby-panel-heading { min-height: 38px; margin-bottom: 3px; }
  .lobby-panel-heading h2 { font-size: 13px; }
  .lobby-panel-heading > div > p { font-size: 7px; }
  .lobby-panel-close { width: 42px; min-width: 42px; height: 34px; font-size: 15px; }
  .lobby-setup-layout { grid-template-columns: minmax(330px, 1fr) 235px; gap: 6px; }
  .lobby-option-stack { gap: 3px; }
  .lobby-option-stack fieldset { padding: 3px 5px; }
  .lobby-option-stack legend > b { font-size: 10px; }
  .lobby-option-stack legend > span { font-size: 8px; }
  .lobby-option-stack legend small { display: none; }
  .lobby-choice-grid { gap: 3px; margin-top: 2px; }
  .lobby-choice-grid button { min-height: 34px; padding: 3px 5px; }
  .lobby-choice-grid button strong { font-size: 8px; }
  .lobby-choice-grid button small { font-size: 6px; }
  .lobby-joker-options { display: none; }
  .lobby-appearance-option { min-height: 32px; display: grid; grid-template-columns: 22px 1fr 15px; align-items: center; padding: 3px; font-size: 7px; }
  .lobby-table-preview { min-height: 0; padding: 6px; }
  .preview-table { width: 165px; margin: 15px auto; }
  .preview-summary > div { padding: 4px; }
  .preview-summary span, .preview-summary strong { font-size: 6px; }
  .lobby-table-preview > button { min-height: 32px; font-size: 9px; }
  .lobby-create-actions { display: none; }
  .lobby-wait-layout { min-height: 0; grid-template-columns: 1fr 210px; gap: 5px; }
  .lobby-wait-table { min-height: 260px; margin: 0; transform: none; }
  .lobby-wait-table::before { inset: 40px 11% 35px; border-width: 8px; }
  .lobby-players .waiting-seat { width: 96px; min-height: 48px; grid-template-columns: 30px 1fr; padding: 3px; }
  .waiting-avatar { width: 30px; height: 30px; }
  .lobby-wait-info { min-height: 0; padding: 7px; }
  .lobby-wait-info h3 { font-size: 10px; }
  .lobby-wait-actions { margin-top: 3px; padding-top: 3px; }
  .lobby-wait-actions button { min-height: 29px; font-size: 8px; }
}

@media (max-width: 900px) and (orientation: portrait) {
  body.home-view-active:not(.game-session-active) .topbar,
  body.panel-view-active:not(.admin-view-active):not(.moderation-view-active) .topbar {
    min-height: 86px;
    height: 86px;
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) 52px;
    align-items: center;
    gap: 2px;
    padding: 0 5px;
  }
  .topbar-player-summary { min-width: 0; display: block; }
  .topbar-player-copy, .topbar-wallet { display: none; }
  .topbar-player-summary .profile-trigger.polished-button { width: 70px !important; min-width: 70px !important; height: 82px !important; min-height: 82px !important; }
  .topbar-player-summary .profile-trigger-frame { width: 68px !important; height: 68px !important; flex-basis: 68px !important; }
  body.home-view-active:not(.game-session-active) .topbar .brand-lockup,
  body.panel-view-active:not(.admin-view-active):not(.moderation-view-active) .topbar .brand-lockup { min-width: 0; width: 100%; height: 84px; justify-content: center; padding: 0; }
  body.home-view-active:not(.game-session-active) .topbar .brand-copy,
  body.panel-view-active:not(.admin-view-active):not(.moderation-view-active) .topbar .brand-copy { width: 100%; padding: 0; }
  body.home-view-active:not(.game-session-active) .topbar .brand-copy strong,
  body.panel-view-active:not(.admin-view-active):not(.moderation-view-active) .topbar .brand-copy strong { display: flex; align-items: center; justify-content: center; font-size: clamp(16px, 5vw, 22px); }
  body.home-view-active:not(.game-session-active) .topbar .brand-emblem,
  body.panel-view-active:not(.admin-view-active):not(.moderation-view-active) .topbar .brand-emblem { width: 54px; height: 54px; flex: 0 0 54px; margin: 0 -6px; }
  body.home-view-active:not(.game-session-active) .topbar .brand-copy small,
  body.panel-view-active:not(.admin-view-active):not(.moderation-view-active) .topbar .brand-copy small { display: none; }
  body.home-view-active:not(.game-session-active) .topbar .tabs,
  body.panel-view-active:not(.admin-view-active):not(.moderation-view-active) .topbar .tabs { width: 52px; min-width: 52px; margin: 0; justify-content: center; }
  .topbar-quick-actions { display: none; }
  body.home-view-active:not(.game-session-active) .main-menu-toggle,
  body.panel-view-active:not(.admin-view-active):not(.moderation-view-active) .main-menu-toggle { display: inline-flex !important; width: 48px; min-width: 48px; }
}

@media (min-width: 721px) and (max-width: 900px) and (orientation: portrait) {
  body.home-view-active:not(.game-session-active) .topbar,
  body.panel-view-active:not(.admin-view-active):not(.moderation-view-active) .topbar { grid-template-columns: 108px minmax(0, 1fr) 56px; min-height: 108px; height: 108px; }
  .topbar-player-summary .profile-trigger.polished-button { width: 104px !important; min-width: 104px !important; height: 104px !important; min-height: 104px !important; }
  .topbar-player-summary .profile-trigger-frame { width: 102px !important; height: 102px !important; flex-basis: 102px !important; }
  body.home-view-active:not(.game-session-active) .topbar .brand-lockup,
  body.panel-view-active:not(.admin-view-active):not(.moderation-view-active) .topbar .brand-lockup { height: 104px; }
}

/* Club settings: full owner workspace and application dialog. */
.club-settings-workspace {
  display: grid;
  gap: 18px;
  color: #f5f1e8;
}
.club-settings-title,
.club-settings-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border: 1px solid color-mix(in srgb, var(--club-accent) 46%, #75633f);
  border-radius: 18px;
  padding: 22px 24px;
  background:
    radial-gradient(circle at 84% 20%, color-mix(in srgb, var(--club-accent) 28%, transparent), transparent 36%),
    linear-gradient(145deg, #211c28 0%, #11181a 58%, #17241f 100%);
  box-shadow: 0 18px 48px rgb(0 0 0 / 25%);
}
.club-settings-title span { color: #e7bd5c; font-size: 11px; font-weight: 900; letter-spacing: .17em; }
.club-settings-title h3 { margin: 4px 0; font: 700 clamp(26px, 3vw, 38px) Georgia, serif; }
.club-settings-title p, .club-settings-footer span { margin: 0; color: #aeb8b2; }
.club-settings-title button, .club-settings-footer button { min-width: 190px; }
.club-settings-sections { display: grid; gap: 14px; }
.club-setting-section {
  position: relative;
  overflow: hidden;
  border: 1px solid rgb(203 174 105 / 22%);
  border-radius: 16px;
  padding: 20px;
  background: linear-gradient(145deg, rgb(28 36 34 / 96%), rgb(18 24 24 / 98%));
  box-shadow: inset 0 1px rgb(255 255 255 / 3%);
}
.club-setting-section::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(var(--club-accent), #d9af51);
  opacity: .85;
}
.club-setting-section h4 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  color: #f5e3b0;
  font: 700 18px Georgia, serif;
}
.club-setting-section h4 b {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid color-mix(in srgb, var(--club-accent) 55%, #8c7847);
  border-radius: 50%;
  color: #f2cb6c;
  font: 800 12px system-ui, sans-serif;
}
.club-setting-grid { display: grid; grid-template-columns: 112px minmax(220px, 1.45fr) minmax(150px, .65fr); gap: 14px; }
.club-setting-grid.three-columns { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.club-setting-grid label,
.club-setting-summary label,
.club-officer-mode label,
.club-questions > span,
.club-admission-flags label,
.club-war-roster-settings label,
.club-transfer-grid label,
.club-disband-grid label {
  display: grid;
  align-content: start;
  gap: 7px;
  color: #aeb9b2;
  font-size: 12px;
  font-weight: 700;
}
.club-setting-grid .wide { grid-column: span 2; }
.club-setting-grid.appearance-grid .wide { grid-column: 1 / -1; }
.club-setting-grid.appearance-grid > label:nth-last-child(2) { grid-column: 1; }
.club-setting-grid.appearance-grid > label:last-child { grid-column: 2 / -1; }
.club-setting-section input:not([type="checkbox"]):not([type="radio"]),
.club-setting-section select,
.club-setting-section textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid #42524c;
  border-radius: 10px;
  padding: 10px 12px;
  background: #101917;
  color: #f1eee5;
  font: 600 14px system-ui, sans-serif;
  outline: none;
}
.club-setting-section textarea { min-height: 92px; resize: vertical; }
.club-setting-section input:focus,
.club-setting-section select:focus,
.club-setting-section textarea:focus { border-color: var(--club-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--club-accent) 15%, transparent); }
.club-setting-section input[type="color"] { padding: 5px; cursor: pointer; }
.club-setting-section input[type="checkbox"],
.club-setting-section input[type="radio"] { width: 18px; height: 18px; min-height: 0; margin: 0; accent-color: var(--club-accent); }
.club-invite-code {
  display: grid;
  gap: 7px;
  border: 1px solid rgb(210 178 96 / 22%);
  border-radius: 11px;
  padding: 11px;
  background: rgb(9 15 14 / 54%);
}
.club-invite-code > span { color: #aeb9b2; font-size: 12px; font-weight: 700; }
.club-invite-code > strong { color: #f2ca69; letter-spacing: .09em; }
.club-invite-code > div { display: flex; flex-wrap: wrap; gap: 7px; }
.club-invite-code button { min-height: 35px; padding: 6px 10px; font-size: 11px; }
.club-setting-summary { display: grid; grid-template-columns: repeat(2, minmax(110px, .6fr)) minmax(250px, 1.7fr) minmax(160px, .8fr); gap: 12px; align-items: stretch; }
.club-setting-summary > div {
  display: grid;
  place-content: center;
  gap: 4px;
  min-height: 74px;
  border: 1px solid #344740;
  border-radius: 11px;
  text-align: center;
  background: rgb(11 20 17 / 48%);
}
.club-setting-summary > div span { color: #99aaa2; font-size: 11px; }
.club-setting-summary > div strong { color: #f0c96a; font-size: 22px; }
.setting-switch,
.club-officer-mode > label:not(:last-child),
.club-war-roster-settings > label:not(:last-child) { display: flex !important; align-items: center; gap: 9px !important; }
.club-setting-summary .setting-switch { align-content: center; min-height: 74px; border: 1px solid #344740; border-radius: 11px; padding: 12px; background: rgb(11 20 17 / 48%); }
.club-officer-mode,
.club-war-roster-settings { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)) minmax(150px, .55fr); gap: 12px; margin-bottom: 14px; }
.club-officer-mode > label,
.club-war-roster-settings > label { min-height: 54px; border: 1px solid #344740; border-radius: 10px; padding: 11px; background: rgb(11 20 17 / 40%); }
.club-permissions,
.club-notification-grid,
.club-admission-flags { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.club-permissions label,
.club-notification-grid label,
.club-admission-flags > label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  border: 1px solid #344740;
  border-radius: 9px;
  padding: 10px;
  background: rgb(11 20 17 / 40%);
  color: #cdd6d0;
  font-size: 12px;
  font-weight: 650;
}
.club-admission-flags > label:last-child { display: grid; }
.club-questions { display: grid; gap: 9px; margin-bottom: 14px; }
.club-questions label { display: grid; grid-template-columns: 28px 1fr; align-items: center; gap: 8px; }
.club-questions label b { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; background: color-mix(in srgb, var(--club-accent) 26%, #17201d); color: #f4d27d; }
.club-settings-log { max-height: 320px; overflow: auto; border: 1px solid #32433d; border-radius: 10px; }
.club-settings-log > div { display: grid; grid-template-columns: minmax(0, 1fr) 150px 160px; gap: 10px; padding: 11px 13px; border-bottom: 1px solid #2b3934; }
.club-settings-log > div:last-child { border: 0; }
.club-settings-log span { color: #e6e8e3; }
.club-settings-log strong, .club-settings-log time { color: #99aaa2; font-size: 12px; }
.club-transfer-grid { display: grid; grid-template-columns: 1fr 1fr auto; align-items: end; gap: 12px; }
.club-transfer-grid button { min-height: 46px; }
.club-setting-section.danger-section { border-color: rgb(193 63 63 / 54%); background: linear-gradient(145deg, rgb(49 23 24 / 96%), rgb(25 19 20 / 98%)); }
.club-setting-section.danger-section::before { background: #d84747; }
.club-setting-section.danger-section h4 { color: #ffb0a6; }
.club-disband-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, .75fr) auto; align-items: end; gap: 14px; }
.club-disband-grid p { margin: 0; color: #c9aaa7; line-height: 1.55; }
.club-disband-grid button { min-height: 46px; }
.club-settings-footer { position: static; z-index: 4; padding: 14px 18px; background: rgb(16 24 22 / 95%); backdrop-filter: blur(12px); }
#clubContent[data-club-background="royal"] .club-profile-hero { background: radial-gradient(circle at 88% 16%, color-mix(in srgb, var(--club-accent) 40%, transparent), transparent 38%), linear-gradient(135deg, #27172d, #12231d); }
#clubContent[data-club-background="cards"] .club-profile-hero { background: linear-gradient(135deg, rgb(17 29 26 / 91%), rgb(45 20 35 / 94%)), repeating-linear-gradient(45deg, transparent 0 24px, color-mix(in srgb, var(--club-accent) 16%, transparent) 25px 27px); }
#clubContent[data-club-background="felt"] .club-profile-hero { background: radial-gradient(ellipse at center, #28664c, #10261e 76%); }
#clubContent[data-club-background="minimal"] .club-profile-hero { background: linear-gradient(145deg, #1b2522, #111917); }
#clubContent .club-profile-hero { border-color: color-mix(in srgb, var(--club-accent) 54%, #685b3c); }
.club-application-dialog { width: min(560px, calc(100vw - 24px)); border: 1px solid #8b7645; border-radius: 18px; padding: 0; background: linear-gradient(145deg, #202a27, #111816); color: #f3eee1; box-shadow: 0 28px 90px #000c; }
.club-application-dialog::backdrop { background: rgb(3 8 7 / 78%); backdrop-filter: blur(5px); }
.club-application-dialog form { display: grid; gap: 14px; padding: 22px; }
.club-application-dialog header span { color: #dcb95e; font-size: 11px; font-weight: 900; letter-spacing: .16em; }
.club-application-dialog header h3 { margin: 5px 0; font: 700 27px Georgia, serif; }
.club-application-dialog header p { margin: 0; color: #9eaea6; line-height: 1.5; }
.club-application-dialog label { display: grid; gap: 6px; color: #cad4ce; font-size: 12px; font-weight: 700; }
.club-application-dialog textarea { min-height: 76px; border: 1px solid #405049; border-radius: 10px; padding: 11px; resize: vertical; background: #0d1513; color: #fff; }
.club-application-dialog footer { display: flex; justify-content: flex-end; gap: 9px; }
@media (max-width: 780px) {
  .club-settings-title, .club-settings-footer { align-items: stretch; flex-direction: column; padding: 17px; }
  .club-settings-title button, .club-settings-footer button { width: 100%; min-width: 0; }
  .club-setting-section { padding: 16px 13px; }
  .club-setting-grid, .club-setting-grid.three-columns, .club-setting-summary, .club-officer-mode, .club-war-roster-settings, .club-transfer-grid, .club-disband-grid { grid-template-columns: 1fr; }
  .club-setting-grid .wide,
  .club-setting-grid.appearance-grid .wide,
  .club-setting-grid.appearance-grid > label:nth-last-child(2),
  .club-setting-grid.appearance-grid > label:last-child { grid-column: auto; }
  .club-permissions, .club-notification-grid, .club-admission-flags { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .club-settings-log > div { grid-template-columns: 1fr; gap: 3px; }
}
@media (max-width: 430px) {
  .club-permissions, .club-notification-grid, .club-admission-flags { grid-template-columns: 1fr; }
  .club-application-dialog form { padding: 17px; }
  .club-application-dialog footer { flex-direction: column-reverse; }
}

/* Joker-Fortune admin statistics. */
.admin-fortune-section { display: grid; gap: 16px; }
.admin-fortune-navigation { display: flex; gap: 7px; overflow-x: auto; padding: 4px 2px 9px; scrollbar-width: thin; }
.admin-fortune-navigation button { flex: 0 0 auto; border: 1px solid var(--border); background: rgb(17 24 32 / 72%); color: var(--muted); white-space: nowrap; }
.admin-fortune-navigation button.active { border-color: #d6a943; background: rgb(115 74 16 / 34%); color: #ffe38a; }
.admin-fortune-content { display: none; gap: 14px; }
.admin-fortune-content.active { display: grid; }
.admin-fortune-callout { display: flex; justify-content: space-between; gap: 14px; border: 1px solid rgb(214 169 67 / 32%); border-radius: 12px; padding: 12px 14px; background: rgb(73 45 11 / 20%); }
.admin-fortune-callout span { color: var(--muted); }
.admin-fortune-filters { display: grid; grid-template-columns: repeat(4, minmax(130px, 1fr)) auto; align-items: end; gap: 10px; }
.admin-fortune-filters label { display: grid; gap: 5px; color: var(--muted); font-size: .82rem; }
.admin-fortune-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); gap: 10px; }
.admin-fortune-metrics article { display: grid; gap: 5px; min-height: 86px; border: 1px solid var(--border); border-radius: 12px; padding: 13px; background: linear-gradient(145deg, rgb(31 39 49 / 82%), rgb(13 18 24 / 86%)); }
.admin-fortune-metrics small { color: var(--muted); }
.admin-fortune-metrics strong { color: #ffe28a; font-size: 1.42rem; }
.admin-fortune-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.admin-fortune-details article { border: 1px solid var(--border); border-radius: 12px; padding: 14px; }
.admin-fortune-details h3 { margin: 0 0 10px; }
.admin-fortune-bars { display: grid; grid-template-columns: repeat(auto-fit, minmax(74px, 1fr)); gap: 7px; }
.admin-fortune-bars div { display: grid; place-items: center; gap: 4px; border-radius: 9px; padding: 10px 6px; background: rgb(117 75 18 / 23%); }
.admin-fortune-bars span { color: var(--muted); font-size: .8rem; }
.admin-fortune-bars b { color: #ffe28a; font-size: 1.12rem; }
.fortune-chat-settings-form { display: grid; gap: 14px; }
.fortune-flags-form { display: grid; gap: 14px; }
.fortune-flags-form > label:not(.setting-toggle) { display: grid; gap: 5px; color: var(--muted); font-size: .82rem; }
.fortune-flags-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; }
.fortune-flags-grid .setting-toggle { min-height: 92px; align-items: center; border: 1px solid var(--border); border-radius: 12px; padding: 13px; background: rgb(255 255 255 / 2%); }
.fortune-flags-grid .setting-toggle small { display: block; margin-top: 5px; color: var(--muted); font-weight: 400; line-height: 1.35; }
.fortune-chat-settings-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; }
.fortune-chat-settings-grid > label:not(.setting-toggle) { display: grid; gap: 5px; color: var(--muted); font-size: .82rem; }
.fortune-chat-wide { grid-column: 1 / -1; }
.fortune-chat-visibility { display: flex; flex-wrap: wrap; gap: 10px 22px; border: 1px solid var(--border); border-radius: 10px; padding: 11px 13px; }
.fortune-chat-visibility legend { padding: 0 6px; color: var(--muted); font-size: .82rem; }
.fortune-chat-visibility label { display: flex; align-items: center; gap: 7px; }
.fortune-chat-visibility input[type="checkbox"] { width: 18px; height: 18px; min-height: 0; margin: 0; padding: 0; accent-color: #cf38ba; }
.fortune-chat-preview-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.fortune-chat-preview-grid article { border: 1px solid rgb(214 169 67 / 32%); border-radius: 11px; padding: 13px; background: linear-gradient(135deg, rgb(91 53 10 / 23%), rgb(57 13 68 / 25%)); }
.fortune-chat-preview-grid small { color: #dfbb64; font-weight: 800; text-transform: uppercase; }
.fortune-chat-preview-grid p { margin: 7px 0 0; color: #e8e0cf; line-height: 1.55; white-space: pre-wrap; }
@media (max-width: 850px) {
  .admin-fortune-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-fortune-details { grid-template-columns: 1fr; }
  .admin-fortune-callout { flex-direction: column; }
  .fortune-chat-settings-grid, .fortune-chat-preview-grid, .fortune-flags-grid { grid-template-columns: 1fr; }
}
[data-theme="club"] {
  --page: #0d1713;
  --surface: #14251d;
  --surface-strong: #102019;
  --border: #365648;
  --border-soft: #263e34;
  --text: #f2f5ed;
  --muted: #a8b9ad;
  --accent: #e4bd57;
  --accent-text: #181306;
  --felt: #174f38;
}
[data-theme="burgundy"] {
  --page: #190f12;
  --surface: #28171c;
  --surface-strong: #211216;
  --border: #62404a;
  --border-soft: #412b32;
  --text: #f7f1ee;
  --muted: #c1a9ae;
  --accent: #d8b45f;
  --accent-text: #1d1608;
  --felt: #4b202a;
}
