body.home { --home-maxw: 1280px; --home-border: var(--t-bd); --home-gap: 32px; --home-radius: 10px; --home-radius-sm: 7px; --home-btn-bg: var(--t-bg2); --home-btn-bg-hover: var(--t-bg3); }
html body.home { background-color: var(--t-bg) !important; }
html body.home::before, html body.home::after { display: none !important; }
.home-masthead { min-height: 78px; display: flex; align-items: center; gap: 48px; padding: 0 max(28px, calc((100vw - 1280px) / 2)); border-bottom: 1px solid var(--t-bd); }
.home-wordmark { display: flex; align-items: center; gap: 9px; color: var(--t-fg); font-size: 21px; font-weight: 750; letter-spacing: -.06em; white-space: nowrap; }
.home-wordmark > span:last-child { color: var(--t-fg2); margin-left: -9px; }
.home-masthead-links { display: flex; align-self: stretch; align-items: stretch; gap: 28px; flex: 1; }
.home-masthead-links a { display: flex; align-items: center; font-size: 13px; color: var(--t-fg2); border-bottom: 2px solid transparent; }
.home-masthead-links a[aria-current] { border-color: var(--t-ac); color: var(--t-fg); }
.home-account-link { font-size: 12px; color: var(--t-fg); white-space: nowrap; display: inline-flex; align-items: center; gap: 24px; }
body.home #mainpage { width: min(1280px, calc(100% - 64px)); max-width: 1280px; margin: auto; padding: 0 0 70px !important; }
body.home #mainpage .hud-topbar { display: grid; grid-template-columns: 1fr minmax(260px, 360px); align-items: end; justify-items: stretch; gap: 18px 30px; padding: 48px 0 30px; margin: 0; text-align: left; border: 0 !important; background: none !important; border-radius: 0 !important; box-shadow: none !important; backdrop-filter: none !important; }
body.home .hud-logo-area { display: flex; flex-direction: row; align-items: start; gap: 0; grid-row: 1 / 3; }
body.home .hud-logo-mark { display: none; }
body.home .hud-kicker { display: block; margin: 0 0 16px; color: var(--t-ac); font-size: 10px; font-weight: 650; letter-spacing: .2em; }
body.home .hud-brand { font-size: clamp(32px, 4.2vw, 58px); font-weight: 750; line-height: 1.06; letter-spacing: -.055em; max-width: 680px; }
body.home .home-greeting { margin-top: 17px; font-size: 13px; color: var(--t-fg2); }
body.home .hud-system-status { justify-content: end; gap: 12px; grid-column: 2; grid-row: 1; }
body.home #greeting-clock { font-size: 14px; }
body.home #home-games-day { font-size: 10px; letter-spacing: .03em; }
body.home .status-user-view { display: none; }
body.home .hud-search-area { grid-column: 2; grid-row: 2; max-width: none; }
body.home .home-search-box { min-height: 50px; border-radius: 8px; }
body.home #home-search { font-size: 13px; border: 0 !important; background: none !important; padding: 12px 0; }
body.home #home-search:focus-visible { outline-offset: 8px; }
body.home .hero-links { grid-column: 1 / -1; justify-content: start; border-top: 1px solid var(--t-bd); padding-top: 16px; margin-top: 12px; }
body.home .hud-primary-nav { display: none; }
body.home .home-access-rail { justify-content: start; gap: 14px; }
body.home #mainpage .home-access-rail .home-access-link { padding: 6px 10px; font-size: 11px; }
body.home .home-access-copy b { font-size: 11px; }
body.home .home-access-copy small { font-size: 10px; }
.home-features { display: grid; grid-template-columns: 1.2fr 1fr; gap: 20px; }
.dayboard-location { margin-left: 12px; color: var(--t-fg2); font-size: 11px; font-weight: 400; letter-spacing: 0; }
.home-feature { position: relative; display: flex; flex-direction: column; justify-content: space-between; min-height: 294px; padding: 30px; border-radius: 12px; overflow: hidden; transition: transform .18s ease; text-decoration: none; }
.home-feature:hover { transform: translateY(-3px); }
/* Feature cards: static purple base blended toward the live accent so they
   follow adaptive theming without losing their identity. */
body.home { --feature-chat-bg: color-mix(in srgb, #6537ad 78%, var(--t-ac) 22%); --feature-games-bg: color-mix(in srgb, #43318b 78%, var(--t-ac) 22%); }
body.home .feature-chat { background: var(--feature-chat-bg); color: #faf7ff; }
body.home .feature-games { background: var(--feature-games-bg); color: #faf7ff; }
.feature-eyebrow { position: relative; z-index: 1; font-size: 10px; font-weight: 700; letter-spacing: .13em; }
body.home .home-feature h2 { position: relative; z-index: 1; margin: 25px 0; color: inherit; font-size: clamp(34px, 3.7vw, 50px); font-weight: 750; letter-spacing: -.055em; line-height: 1.04; }
.home-feature h2 em { font-family: Figtree, sans-serif; font-weight: 400; }
.feature-bottom { display: flex; align-items: center; justify-content: space-between; position: relative; z-index: 1; font-size: 11px; font-weight: 750; gap: 10px; }
.feature-bottom b { display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid currentColor; border-radius: 50%; font-size: 20px; font-weight: 400; }
.feature-chat-art { position: absolute; width: 210px; height: 170px; right: 16px; top: 70px; stroke: #e4ccff; stroke-width: 1.4; opacity: .75; transform: rotate(-8deg); }
.feature-chat-art rect { fill: var(--feature-chat-bg); }
.feature-game-art { position: absolute; right: 0; bottom: 72px; width: 174px; height: 174px; display: grid; place-items: center; background: conic-gradient(#7655b5 25%, transparent 0 50%, #7655b5 0 75%, transparent 0) 0 0 / 58px 58px; transform: rotate(12deg) translateX(30px); }
.feature-game-art span { font-family: Figtree, sans-serif; font-size: 122px; color: #eee0ff; line-height: 1; transform: rotate(-12deg); text-shadow: 3px 4px var(--feature-games-bg); }
body.home .home-dayboard { margin: 34px 0 0; border: 0; padding: 0; }
body.home .home-dayboard-sr { position: static; width: auto; height: auto; margin: 0 0 18px; font-size: 17px; font-weight: 600; letter-spacing: -.025em; }
body.home .home-dayboard-grid { grid-template-columns: .9fr 1fr 1.3fr; gap: 18px; align-items: stretch; }
body.home .home-dayboard-grid > .home-day-card { min-width: 0; padding: 22px; background: var(--t-bg2); border: 1px solid var(--t-bd); border-radius: 12px; }
body.home .home-card-head { min-height: 42px; margin-bottom: 22px; gap: 10px; }
body.home .home-card-head small { color: var(--t-fg2); font-size: 10px; }
body.home .home-card-head h3 { font-size: 17px; margin-top: 4px; }
body.home .home-weather-now strong { font-size: 60px; font-weight: 450; letter-spacing: -.07em; }
body.home .home-weather-now b { font-size: 12px; margin-top: 7px; }
body.home .home-weather-icon { width: 52px; height: 52px; color: #dbc28b; }
body.home .home-weather-metrics { justify-content: space-between; gap: 8px; margin-top: 26px; padding-top: 18px; }
body.home .home-weather-metrics small { font-size: 9px; }
body.home .home-weather-metrics b { font-size: 13px; margin-top: 6px; }
body.home .home-hourly-weather { gap: 19px; margin-top: 20px; }
body.home .home-day-card > footer { font-size: 10px; }
body.home .home-live-pill { font-size: 9px; }
body.home .home-live-pill i { animation: none; background: #8eb99b; }
body.home .home-calendar-days span { min-height: 28px; font-size: 11px; }
body.home .home-calendar-week span { font-size: 8px; }
body.home .home-calendar-days span.today { background: var(--t-ac); color: var(--t-bg); border-radius: 6px; }
body.home .home-calendar-agenda { margin-top: 18px; }
body.home .home-calendar-agenda > div { gap: 10px; flex-wrap: wrap; }
body.home .home-calendar-agenda > div small { font-size: 10px; }
body.home .home-calendar-agenda a { font-size: 10px; }
body.home .home-official-link { font-size: 9px; max-width: 78px; text-align: right; }
body.home .home-bell-hero { display: flex; flex-wrap: wrap; gap: 12px; }
body.home .home-bell-hero strong { display: block; margin-top: 10px; font-size: 19px; max-width: 260px; line-height: 1.2; letter-spacing: -.03em; }
body.home .home-bell-hero small { font-size: 11px; }
body.home .home-bell-cta { margin-top: 15px; font-size: 11px; }
body.home #mainpage .home-day-card button { min-height: 30px; }
body.home .home-periods li { padding-block: 9px; }
body.home .home-periods li strong { font-size: 11px; }
body.home .home-periods li small { font-size: 8px; }
body.home .home-periods li time { font-size: 10px; }
body.home .hud-workspace { grid-template-columns: minmax(0, 1fr) 290px; gap: 30px; margin-top: 38px; }
body.home .hud-pane-aside { padding: 24px; align-self: start; background: var(--t-bg2); border: 1px solid var(--t-bd); border-radius: 12px; }
body.home .command-deck-heading { display: flex; padding-bottom: 20px; border-bottom: 1px solid var(--t-bd); margin-bottom: 20px; }
body.home .command-deck-heading b { display: block; font-size: 16px; }
body.home .command-deck-heading small { display: block; font-size: 11px; color: var(--t-fg2); }
body.home .site-advert-banner { padding: 20px 0; border: 0; border-top: 1px solid var(--t-bd); border-bottom: 1px solid var(--t-bd); border-radius: 0; background: transparent; box-shadow: none; }
body.home .site-advert-banner h3 { font-size: 21px; }
body.home .site-advert-banner p { font-size: 12px; }
body.home .hub-action-rail { gap: 10px; margin-bottom: 24px; }
body.home .hub-action { padding: 14px !important; border-radius: 8px; }
body.home .hub-action .action-copy b { font-size: 12px; }
body.home .hub-action .action-copy small { font-size: 10px; }
body.home .home-links-panel { margin-top: 28px; }
body.home .home-links-panel > .panel-heading h3 { font-size: 26px; }
body.home .panel-heading .section-index { color: var(--t-ac); font-size: 9px; letter-spacing: .15em; }
body.home .category-group { border: 0 !important; border-top: 1px solid var(--t-bd) !important; padding: 22px 0; background: transparent !important; border-radius: 0 !important; box-shadow: none !important; }
body.home .category-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 18px; }
body.home .site-link { min-height: 47px; padding: 10px 0; border: 0; border-bottom: 1px solid var(--t-bd); border-radius: 0; background: none; font-size: 12px; }
body.home .site-link:hover { color: var(--t-ac); background: var(--t-bg2); }
body.home .site-link .icon { background: none; color: var(--t-fg2); }
body.home .site-link::before, body.home .site-link::after { display: none; }
body.home .category-desc { color: var(--t-fg2); font-size: 11px; }
body.home #_ab { background: var(--t-bg2) !important; color: var(--t-ac) !important; border: 1px solid var(--t-bd); box-shadow: none; }
@media (max-width: 1100px) {
  .home-masthead { gap: 28px; }
  body.home #mainpage { width: calc(100% - 48px); }
  body.home .home-dayboard-grid { grid-template-columns: 1fr 1fr; }
  body.home .home-bell-card { grid-column: 1 / -1; }
  body.home .home-periods { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; }
  body.home .hud-workspace { grid-template-columns: minmax(0, 1fr) 260px; gap: 24px; }
  .feature-chat-art { width: 155px; right: -10px; top: 90px; opacity: .45; }
  .feature-game-art { right: -30px; opacity: .65; }
  body.home .category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .home-masthead { padding: 16px 20px 0; flex-wrap: wrap; gap: 14px; }
  .home-wordmark { flex: 1; }
  .home-masthead-links { order: 2; flex-basis: 100%; gap: 28px; overflow-x: auto; }
  .home-masthead-links a { min-height: 42px; white-space: nowrap; font-size: 12px; }
  body.home #mainpage { width: calc(100% - 36px); }
  body.home #mainpage .hud-topbar { grid-template-columns: 1fr; padding: 30px 0 24px; gap: 20px; }
  body.home .hud-logo-area { grid-row: auto; }
  body.home .hud-system-status { grid-column: 1; grid-row: auto; justify-content: start; }
  body.home .hud-search-area { grid-column: 1; grid-row: auto; }
  body.home .hero-links { margin: 0; padding-top: 12px; }
  body.home .hud-brand { font-size: clamp(32px, 7.3vw, 52px); }
  .home-features { gap: 14px; grid-template-columns: 1fr; }
  .home-feature { min-height: 260px; padding: 26px; }
  body.home .home-feature h2 { font-size: 43px; }
  .feature-chat-art { width: 190px; right: 4px; top: 54px; opacity: .6; }
  .feature-game-art { right: 0; bottom: 60px; }
  body.home .home-dayboard-grid { grid-template-columns: 1fr; gap: 14px; }
  body.home .home-dayboard-grid > .home-day-card { padding: 22px; }
  body.home .home-bell-card { grid-column: auto; }
  body.home .hud-workspace { grid-template-columns: 1fr; }
  body.home .hud-pane-aside { max-width: none; }
  body.home .home-periods { display: block; }
}
@media (max-width: 380px) {
  .home-account-link { gap: 8px; font-size: 11px; }
  body.home .home-feature h2 { font-size: 38px; }
  .feature-chat-art { right: -40px; opacity: .35; }
  .feature-game-art { right: -35px; opacity: .5; }
  .feature-bottom { font-size: 10px; }
}

/* Staff controls stay distinct from regular game and account shortcuts. */
.staff-access-rail {
  position: fixed;
  left: 14px;
  top: 50%;
  z-index: 110;
  display: grid;
  gap: 8px;
  transform: translateY(-50%);
}
.staff-access-rail > div { display: none; }
.staff-access-button {
  width: 128px;
  min-height: 50px;
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  gap: 9px;
  padding: 7px 11px 7px 8px;
  color: #fff;
  text-decoration: none;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 14px;
  background: rgba(12,8,28,.88);
  box-shadow: 0 12px 34px rgba(0,0,0,.3), inset 0 1px rgba(255,255,255,.1);
  backdrop-filter: blur(18px);
  transition: transform .18s ease, border-color .18s ease;
}
.staff-access-button:hover { transform: translateX(4px); border-color: rgba(220,177,255,.62); }
.staff-access-button > span:first-child { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; font-size: 16px; }
.staff-access-button b { font-size: 11px; line-height: 1.15; }
.staff-access-button > .staff-access-copy { width: auto; height: auto; background: none; min-width: 0; }

/* Right-edge presence drawer: visible enough to discover, roomy when open. */
#member-side-rail {
  left: auto;
  right: 0;
  width: min(380px, 92vw);
  border: 1px solid color-mix(in srgb, var(--t-ac) 24%, var(--t-bd));
  border-right: 0;
  border-radius: 22px 0 0 22px;
  background:
    radial-gradient(circle at 90% 0, color-mix(in srgb, var(--t-ac) 16%, transparent), transparent 240px),
    color-mix(in srgb, var(--t-bg2) 96%, transparent);
  box-shadow: -22px 0 70px rgba(0,0,0,.24);
  transform: translateX(calc(100% - 52px));
  backdrop-filter: blur(24px) saturate(130%);
  overflow-x: hidden;
  overflow-y: auto;
}
#member-side-rail.is-open { transform: translateX(0); }
#member-side-rail-collapsed-handle {
  position: absolute;
  left: 0;
  top: 45%;
  width: 52px;
  min-height: 116px;
  padding: 12px 7px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border: 0;
  border-right: 1px solid var(--t-bd);
}
#member-side-rail.is-open #member-side-rail-collapsed-handle { opacity: 0; pointer-events: none; }
.members-rail-head { position: sticky; top: 0; z-index: 2; min-height: 76px; padding: 14px 18px; background: color-mix(in srgb, var(--t-bg2) 94%, transparent); backdrop-filter: blur(18px); }
.members-rail-heading strong { font-size: 17px; }
.members-rail-heading small { font-size: 12px; }
.members-rail-close {
  width: 34px; height: 34px; margin-left: auto; display: grid; place-items: center;
  padding: 0; border: 1px solid var(--t-bd); border-radius: 10px; color: var(--t-fg);
  background: var(--t-bg3); font-size: 21px; cursor: pointer;
}
#member-side-rail .side-section { padding: 12px 16px; }
#member-side-rail .side-list { gap: 7px; max-height: 320px; }
.member-presence-card, .friend-presence-card {
  min-height: 54px;
  padding: 8px;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: 13px;
  background: color-mix(in srgb, var(--t-bg3) 72%, transparent);
}
.member-presence-card:hover, .friend-presence-card:hover { border-color: color-mix(in srgb, var(--t-ac) 38%, var(--t-bd)); }
.member-presence-avatar, .friend-presence-avatar { width: 36px; height: 36px; border-radius: 11px; object-fit: cover; }
.member-presence-name, .friend-presence-name { font-size: 13px; font-weight: 700; }
.member-presence-status, .friend-presence-status { margin-top: 3px; font-size: 11px; }
.member-presence-card.is-online { box-shadow: inset 3px 0 color-mix(in srgb, var(--t-ac) 75%, #67e8f9); }
@media (min-width: 1101px) { body.members-rail-open #mainpage { padding-left: 0; max-width: var(--home-maxw); } }

/* Account perks use bright, game-like reward cards. */
.account-perks { margin: 18px 0; padding: 16px; overflow: hidden; border: 1px solid var(--t-bd); border-radius: 16px; background: var(--t-bg3); }
.account-perks-head span { color: var(--t-ac); font-size: 9px; font-weight: 800; letter-spacing: .16em; }
.account-perks-head h3 { margin: 4px 0 14px; font-size: 17px; letter-spacing: -.03em; }
.account-perk-grid { display: grid; gap: 8px; }
.account-perk {
  position: relative; min-height: 68px; display: grid; grid-template-columns: 42px 1fr; grid-template-rows: auto auto;
  align-items: center; column-gap: 10px; padding: 10px; overflow: hidden; color: var(--t-fg); text-decoration: none;
  border: 1px solid var(--t-bd); border-radius: 13px; background: color-mix(in srgb, var(--t-bg3) 88%, transparent);
  transition: transform .18s ease, filter .18s ease;
}
.account-perk:hover { transform: translateY(-2px) scale(1.01); filter: brightness(1.08); }
.account-perk > span { grid-row: 1 / 3; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: rgba(255,255,255,.16); font-size: 19px; }
.account-perk b { align-self: end; font-size: 13px; }
.account-perk small { align-self: start; color: var(--t-fg2); font-size: 10px; line-height: 1.3; }
/* Muted perk tiles: quiet surface, only the icon carries a hint of color. */
.perk-premium { background: color-mix(in srgb, var(--t-bg3) 88%, transparent); }
.perk-inventory { background: color-mix(in srgb, var(--t-bg3) 88%, transparent); }
.perk-achievement { background: color-mix(in srgb, var(--t-bg3) 88%, transparent); }
.perk-premium > span { background: color-mix(in srgb, #8b5cf6 20%, transparent); }
.perk-inventory > span { background: color-mix(in srgb, #3b82f6 20%, transparent); }
.perk-achievement > span { background: color-mix(in srgb, #f97316 20%, transparent); }
.home-masthead-links a,.home-account-link { font-size:14px; }
body.home #mainpage .hud-topbar { padding:28px 0 22px; }
body.home .hud-brand { font-size:36px; }
body.home .hero-links { display:none; }
body.home .home-features { grid-template-columns:1fr 1.2fr; gap:16px; }
body.home .feature-games { order:-1; background:linear-gradient(115deg,#482092,#7836bb); }
body.home .feature-chat { background:linear-gradient(115deg,#382066,#74315e); }
body.home .home-feature { min-height:210px; border:1px solid #ffffff26; border-radius:22px; padding:26px; box-shadow:inset 0 1px #ffffff20; }
body.home .home-feature h2 { font-size:38px; margin:18px 0; }
.feature-eyebrow,.feature-bottom { font-size:13px; }
body.home .home-actions { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; margin:18px 0; }
body.home .home-actions .hub-action { min-height:76px; background:var(--t-bg2)!important; border:1px solid var(--t-bd)!important; border-radius:14px; }
body.home .home-actions .hub-action .action-copy b { font-size:15px; }
body.home .home-actions .hub-action .action-copy small { font-size:12px; }
body.home .home-actions a[href='/encrypt/'],body.home .home-actions a[href='/matrix/'],body.home .home-actions a[href='/game-portal/'] { display:none; }
body.home .hud-pane-aside { border:0; background:transparent; padding:0; }
body.home .hud-workspace { grid-template-columns:minmax(0,1fr) 320px; gap:24px; }
body.home .command-deck-heading { margin-bottom:14px; }
body.home .account-perks { margin:18px 0; padding:20px; border-radius:22px; background:color-mix(in srgb, var(--t-ac) 4%, var(--t-bg2)); }
.account-perks-head span { font-size:12px; }
.account-perks-head h3 { font-size:23px; margin:6px 0 18px; }
.account-perk { min-height:86px; border-radius:15px; padding:12px; }
.account-perk b { font-size:16px; }
.account-perk small { font-size:12px; line-height:1.5; }
body.home .daily-login-card { padding:20px; }
body.home .daily-login-msg { font-size:14px; line-height:1.5; }
body.home .daily-login-claim-btn { min-height:44px; font-size:14px; }
.daily-login-card { border-radius: 16px !important; border-color: color-mix(in srgb, var(--t-ac) 44%, var(--t-bd)) !important; background: linear-gradient(145deg, color-mix(in srgb, var(--t-ac) 14%, var(--t-bg2)), var(--t-bg2)) !important; box-shadow: 0 16px 38px color-mix(in srgb, var(--t-ac) 11%, transparent) !important; }
.daily-login-claim-btn:not(:disabled) { background: linear-gradient(135deg,#8b5cf6,#db2777) !important; color:#fff !important; box-shadow:0 8px 24px rgba(139,92,246,.3) !important; }

@media (max-width: 1450px) {
  .staff-access-rail { left: 8px; }
  .staff-access-button { width: 54px; grid-template-columns: 1fr; padding: 8px; }
  .staff-access-button b { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
}
@media (max-width: 760px) {
  .staff-access-rail { position: static; margin: 12px 18px 0; display: flex; overflow-x: auto; transform: none; }
  .staff-access-button { width: auto; min-width: 118px; grid-template-columns: 30px 1fr; }
  .staff-access-button b { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
  #member-side-rail { width: min(380px, 96vw); border-radius: 18px 0 0 18px; }
}

/* Staff rail: compact icon buttons on desktop. It floats over the page edge,
   so it must never reserve layout space — the old #mainpage offset shoved the
   whole page right. Labels stay in the DOM (clipped) with title tooltips. */
body.home:has(.is-admin) .staff-access-rail { display:grid; }
@media(min-width:1101px) {
  body.home .staff-access-rail { width:54px; gap:8px; }
  body.home .staff-access-button { width:54px; min-height:50px; padding:8px; grid-template-columns:1fr; justify-items:center; }
  body.home .staff-access-button b { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); }
}
#member-side-rail { top:12px; bottom:12px; width:360px; max-width:calc(100vw - 16px); transform:translateX(calc(100% - 44px)); border-radius:20px 0 0 20px; overflow:hidden; padding-left:44px; }
#member-side-rail.is-open { overflow-y:auto; padding-left:0; }
#member-side-rail.is-collapsed > :not(#member-side-rail-collapsed-handle) { visibility:hidden; pointer-events:none; }
#member-side-rail-collapsed-handle { top:0; bottom:0; width:44px; min-height:0; padding:8px 4px; margin:0; border:0; }
#member-side-rail .collapsed-pfps { margin:12px 0 0; flex-direction:column; gap:5px; }
#member-side-rail .collapsed-pfp-img + .collapsed-pfp-img { margin-left:0; }
#member-side-rail .members-rail-close { min-width:36px; flex:0 0 36px; }
#member-side-rail .member-presence-avatar,#member-side-rail .friend-presence-avatar { width:30px; height:30px; flex:0 0 30px; display:grid; place-items:center; background:var(--t-bg3); }
#member-side-rail .member-presence-name,#member-side-rail .friend-presence-name { font-size:14px; }
#member-side-rail .member-presence-status,#member-side-rail .friend-presence-status { font-size:12px; }
#member-side-rail .side-title,#member-side-rail .side-title span { font-size:13px; font-weight:700; }
#member-side-rail .member-role { font-size:12px; }
#member-side-rail .side-section { flex-shrink:0; }
#member-side-rail .side-list { max-height:240px; }
#member-side-rail .friend-request-form input,#member-side-rail .friend-request-form button { min-height:40px; font-size:14px; }
@media(max-width:1100px) {
 body.home .staff-access-rail { position:static; width:auto; display:flex; transform:none; margin:16px 50px 0 24px; flex-wrap:wrap; }
 body.home .staff-access-button { width:auto; min-width:146px; }
 body.home #mainpage { width:calc(100% - 80px); margin-left:24px; }
 body.home .hud-workspace { grid-template-columns:1fr; }
 body.home .hud-pane-aside { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
 body.home .command-deck-heading { grid-column:1/-1; }
 body.home .account-perks { margin:0; }
}
@media(max-width:760px) {
 body.home .home-features { grid-template-columns:1fr; }
 body.home .home-actions { grid-template-columns:1fr 1fr; }
 body.home .hud-pane-aside { display:block; }
 body.home .account-perks { margin:16px 0; }
 body.home .staff-access-rail { margin:12px 48px 0 16px; gap:7px; }
 body.home .staff-access-button { min-width:0; width:auto; grid-template-columns:24px 1fr; padding:7px; gap:7px; }
 body.home .staff-access-button > span:first-child { width:24px;height:28px; }
 body.home .staff-access-button b { font-size:13px; }
 body.home #mainpage { width:calc(100% - 68px); margin-left:16px; }
 body.home .home-feature h2 { font-size:30px; }
 .home-masthead { padding-right:50px; }
}
@media(prefers-reduced-motion:reduce) { #member-side-rail,.staff-access-button,.account-perk { transition:none; } }

body.home .staff-access-rail {
  display: none;
  left: 12px;
  width: 62px;
  gap: 9px;
  padding: 7px;
  border: 1px solid color-mix(in srgb, var(--t-ac) 24%, var(--t-bd));
  border-radius: 20px;
  background: color-mix(in srgb, var(--t-bg2) 88%, transparent);
  box-shadow: 0 22px 58px rgba(0,0,0,.26), inset 0 1px rgba(255,255,255,.08);
  backdrop-filter: blur(22px) saturate(145%);
  transition: width .2s ease, box-shadow .2s ease;
}
body.home:is(.is-staff,.is-admin) .staff-access-rail { display: grid; }
body.home .staff-access-rail:hover,
body.home .staff-access-rail:focus-within { width: 224px; box-shadow: 0 26px 70px rgba(0,0,0,.34), inset 0 1px rgba(255,255,255,.1); }
body.home .staff-access-button {
  position: relative;
  width: 46px;
  min-height: 54px;
  grid-template-columns: 40px minmax(0,1fr);
  gap: 11px;
  padding: 7px 14px 7px 3px;
  overflow: hidden;
  border-color: transparent;
  border-radius: 14px;
  background: transparent;
  box-shadow: none;
  transition: width .2s ease, transform .18s ease, background .18s ease, border-color .18s ease;
}
body.home .staff-access-rail:hover .staff-access-button,
body.home .staff-access-rail:focus-within .staff-access-button { width: 208px; }
body.home .staff-access-button:hover { transform: translateX(2px); border-color: rgba(255,255,255,.13); background: rgba(255,255,255,.06); }
body.home .staff-access-button > span:first-child { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 13px; box-shadow: inset 0 1px rgba(255,255,255,.2), 0 8px 20px rgba(0,0,0,.18); }
body.home .staff-access-copy { display: flex; min-width: 130px; flex-direction: column; gap: 2px; }
body.home .staff-access-rail:not(:hover):not(:focus-within) .staff-access-copy { opacity: 0; visibility: hidden; transform: translateX(-5px); transition: opacity .08s ease, visibility 0s linear .08s; }
body.home .staff-access-rail:hover .staff-access-copy,
body.home .staff-access-rail:focus-within .staff-access-copy { opacity: 1; visibility: visible; transform: none; transition: opacity .14s ease .05s, transform .14s ease .05s; }
body.home .staff-access-copy b { position: static; width: auto; height: auto; overflow: visible; clip: auto; color: var(--t-fg); font: 800 13px/1.15 Outfit, sans-serif; white-space: nowrap; }
body.home .staff-access-copy small { color: var(--t-fg2); font-size: 10px; font-weight: 650; white-space: nowrap; }

/* Staff controls inherit the selected background colors instead of using a
   separate rainbow palette. */
body.home .staff-access-rail {
  border-color: color-mix(in srgb, var(--t-ac) 34%, var(--t-bd));
  background: color-mix(in srgb, var(--t-bg2) 92%, transparent);
  box-shadow: 0 18px 48px #0005, inset 0 1px #ffffff12;
}
body.home :is(.staff-owner,.staff-admin,.staff-moderator) > span:first-child {
  color: var(--t-fg);
  background: color-mix(in srgb, var(--t-ac) 18%, var(--t-bg3));
  border: 1px solid color-mix(in srgb, var(--t-ac) 34%, var(--t-bd));
  box-shadow: none;
}
body.home .staff-access-button:hover {
  border-color: color-mix(in srgb, var(--t-ac) 48%, var(--t-bd));
  background: color-mix(in srgb, var(--t-ac) 10%, transparent);
}

@media (min-width: 761px) and (max-width: 1500px) and (max-height: 820px) {
  body.home #mainpage { padding-top: 12px !important; padding-bottom: 32px !important; }
  body.home .hud-topbar { margin-bottom: 14px !important; padding: 12px !important; }
  body.home #greeting-email { font-size: clamp(30px, 4vw, 46px) !important; }
  body.home .hero-subtitle { margin-top: 5px !important; font-size: 14px !important; }
  body.home .hud-workspace { gap: 14px !important; }
  body.home .hud-hero-card { min-height: 190px !important; padding: 18px !important; }
  body.home .home-actions { gap: 8px !important; }
  body.home .hub-action { min-height: 84px !important; padding: 12px !important; }
  body.home .hud-pane-aside { gap: 10px !important; }
  body.home .hud-widget-card { padding: 12px !important; }
  body.home .account-perks { gap: 7px !important; }
  body.home .account-perk { min-height: 64px !important; padding: 10px !important; }
  body.home .category-group { padding: 13px !important; margin-bottom: 14px !important; }
  body.home .category-grid { grid-template-columns: repeat(auto-fill,minmax(125px,1fr)) !important; gap: 8px !important; }
  body.home a.site-link { min-height: 96px !important; aspect-ratio: auto !important; }
  body.home .hud-notifications-row { margin-bottom: 16px !important; }
}

@media (max-width: 1100px) {
  body.home:is(.is-staff,.is-admin) .staff-access-rail,
  body.home:is(.is-staff,.is-admin) .staff-access-rail:hover,
  body.home:is(.is-staff,.is-admin) .staff-access-rail:focus-within {
    position: static;
    width: auto;
    margin: 14px 52px 0 18px;
    padding: 7px;
    display: flex;
    overflow-x: auto;
    transform: none;
  }
  body.home .staff-access-button,
  body.home .staff-access-rail:hover .staff-access-button,
  body.home .staff-access-rail:focus-within .staff-access-button { width: 190px; min-width: 190px; }
  body.home .staff-access-rail .staff-access-copy { opacity: 1 !important; visibility: visible !important; transform: none !important; }
}

/* Final homepage density pass for Chromebook-sized screens. */
@media (min-width: 761px) and (max-width: 1500px) and (max-height: 900px) {
  body.home { --home-maxw: 1120px; }
  body.home .home-masthead { min-height: 58px; gap: 24px; padding-inline: max(24px,calc((100vw - 1120px)/2)); }
  body.home .home-masthead-links { gap: 20px; }
  body.home #mainpage { width: min(1120px,calc(100% - 80px)); max-width: 1120px; padding-bottom: 42px !important; }
  body.home #mainpage .hud-topbar { padding: 18px 0 16px !important; gap: 12px 22px; }
  body.home .hud-brand { font-size: 30px; }
  body.home .home-greeting { margin-top: 8px; }
  body.home .home-search-box { min-height: 44px; }
  body.home .home-feature { min-height: 172px; padding: 20px; border-radius: 18px; }
  body.home .home-feature h2 { margin: 12px 0; font-size: 31px; }
  body.home .feature-game-art { width: 132px; height: 132px; bottom: 38px; background-size: 44px 44px; }
  body.home .feature-game-art span { font-size: 88px; }
  body.home .feature-chat-art { width: 150px; height: 122px; top: 42px; }
  body.home .home-actions { margin: 12px 0; }
  body.home .home-actions .hub-action,
  body.home .hub-action { min-height: 66px !important; padding: 10px !important; }
  body.home .home-dayboard { margin-top: 22px; }
  body.home .home-dayboard-grid { gap: 12px; }
  body.home .home-dayboard-grid > .home-day-card { padding: 16px; }
  body.home .home-card-head { margin-bottom: 14px; }
  body.home .home-weather-now strong { font-size: 46px; }
  body.home .hud-workspace { margin-top: 24px; gap: 18px !important; }
}
@media (max-width: 560px) {
  body.home:is(.is-staff,.is-admin) .staff-access-rail,
  body.home:is(.is-staff,.is-admin) .staff-access-rail:hover,
  body.home:is(.is-staff,.is-admin) .staff-access-rail:focus-within { margin: 10px 48px 0 10px; border-radius: 16px; }
  body.home .staff-access-button,
  body.home .staff-access-rail:hover .staff-access-button,
  body.home .staff-access-rail:focus-within { width: 166px; min-width: 166px; grid-template-columns: 34px minmax(0,1fr); gap: 8px; }
  body.home .staff-access-button > span:first-child { width: 34px; height: 34px; }
}
