/* The apps' tab bar (hub-tabs.js), the Feed (hub-feed.js), and search and notifications
   at the top (hub-header.js). Sizes follow the Astrocade app's: a 62px bar, 48px on the Feed. */
:root {
  --pop-bottom: calc(16px + env(safe-area-inset-bottom, 0px));   /* (a box on the page never reaches the screen's bottom edge) */
  --tabs-h: 62px; --tabs-gap: 12px; --tabs-space: calc(var(--tabs-h) + var(--tabs-gap) * 2);
  --tabs-slim: 48px; --feed-row: 54px; --feed-bottom: calc(var(--tabs-slim) + var(--tabs-gap) + var(--feed-row));
  --ui-font: Roboto, "Segoe UI", system-ui, -apple-system, sans-serif;
  --hub-top: var(--discord-top, 0px);   /* (the status bar's height on Android: MainActivity.insetHub) */
}
/* (iOS gives its own, and leaves --discord-top alone so game artwork stays full-bleed;
   an app from before 1.9.18 gives none, and this page's env() is the same height) */
html.iosHub {
  --hub-top: var(--ios-safe-top, env(safe-area-inset-top, 0px));
  --home-account-top: calc(var(--hub-top) + 8px);
  --home-account-right: calc(var(--ios-safe-right, env(safe-area-inset-right, 0px)) + 8px);
}
html.iosHub.androidHub body {
  padding: max(14px, var(--hub-top)) max(16px, var(--ios-safe-right, env(safe-area-inset-right, 0px)))
           max(18px, var(--ios-safe-bottom, env(safe-area-inset-bottom, 0px))) max(16px, var(--ios-safe-left, env(safe-area-inset-left, 0px)));
}
html.iosHub .game-loading-back { top: calc(var(--hub-top) + 12px); }

.hub-tabs {
  position: fixed; z-index: 1050; left: 16px; right: 16px; bottom: var(--tabs-gap);
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: center;
  height: var(--tabs-h); max-width: 520px; margin: 0 auto; padding: 0 3px; box-sizing: border-box;
  border: 1px solid rgba(255, 255, 255, .13); border-radius: 999px;
  /* (no backdrop blur: it sits over live game canvases, README-BEFORE-MAKING-A-GAME's WebView rule) */
  background: rgba(22, 20, 31, .86); box-shadow: 0 8px 26px rgba(0, 0, 0, .4);
  font-family: var(--ui-font);
  transition: transform .22s ease, opacity .22s ease, height .2s ease;
}
.hub-tabs.is-hidden { transform: translateY(calc(100% + var(--tabs-gap) + 8px)); opacity: 0; pointer-events: none; }
.hub-tab {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  height: calc(var(--tabs-h) - 6px); margin: 0 1px; padding: 0; border: 0; border-radius: 999px; background: none;
  color: #fff; font: 500 12.5px/1 var(--ui-font); letter-spacing: .1px; cursor: pointer;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
  -webkit-font-smoothing: antialiased;
}
.hub-tab-icon { display: grid; place-items: center; width: 24px; height: 24px; }
.hub-tab-icon svg { display: block; }
.hub-tab.is-active { background: rgba(255, 255, 255, .15); }
.hub-tab:focus-visible { outline: 2px solid #8fb8ff; outline-offset: -2px; }
/* the Feed's slim bar: icons only, its own tab a white "next" pill */
html.feed-open .hub-tabs { height: var(--tabs-slim); }
html.feed-open .hub-tab { height: calc(var(--tabs-slim) - 8px); }
html.feed-open .hub-tab-label { display: none; }
html.feed-open .hub-tab.is-active { background: #fff; color: #111; margin: 0 6px; }

/* The hub's page under the bar: the header's Shop and profile pill move into the bar */
html.hubTabs #storeEntry, html.hubTabs #who { display: none !important; }
html.hubTabs main { padding-bottom: var(--tabs-space); }
html.hubTabs .games-pull { bottom: var(--tabs-space); }
/* the profile menu: under the top row's buttons, as the bell's */
html.hubTabs .profile-panel {
  position: fixed; top: calc(var(--hub-top) + 62px); left: 16px; right: 16px; bottom: auto;
  width: auto; max-width: 520px; margin: 0 auto; max-height: calc(100dvh - var(--hub-top) - 62px - var(--pop-bottom)); overflow-y: auto;
}

/* (a wide screen: under the capsule, as the page's other menus) */
@media (min-width: 761px) {
  html.hubTabs .profile-panel { top: 74px; bottom: auto; left: auto; right: max(16px, calc((100vw - 1180px) / 2)); width: 360px; margin: 0; max-height: calc(100dvh - 90px); }
}

/* ---- search and notifications, top right */
html.hubTabs header > .head-right { row-gap: 8px; }
.hub-head-icons { display: flex; gap: 2px; grid-column: 1 / -1; grid-row: 1; justify-self: end; }
.hub-icon-btn {
  position: relative; display: grid; place-items: center; width: 44px; height: 44px; padding: 0;
  border: 0; border-radius: 50%; background: none; color: #fff; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.hub-icon-btn:active { background: rgba(255, 255, 255, .1); }
.hub-icon-btn:focus-visible { outline: 2px solid #8fb8ff; outline-offset: -2px; }
.hub-bell-count {
  position: absolute; top: 6px; right: 5px; min-width: 17px; height: 17px; padding: 0 4px; box-sizing: border-box;
  border-radius: 999px; background: #ff4d6a; color: #fff; font: 700 11px/17px var(--ui-font); text-align: center;
  box-shadow: 0 0 0 2px var(--bg, #1e1f22);
}
.hub-bell-count[hidden] { display: none; }
.hub-search {
  position: fixed; inset: 0; z-index: 1045; overflow-y: auto; padding: calc(var(--hub-top) + 10px) 16px var(--tabs-space); box-sizing: border-box;
  background: var(--bg, #1e1f22); color: #fff; font-family: var(--ui-font);
}
.hub-search[hidden] { display: none; }
.hub-search-bar { display: flex; align-items: center; gap: 6px; margin: 0 0 12px -8px; }
.hub-search-field {
  display: flex; flex: 1; align-items: center; gap: 8px; height: 44px; padding: 0 4px 0 14px;
  border-radius: 999px; background: rgba(255, 255, 255, .1); color: rgba(255, 255, 255, .7);
}
.hub-search-field input {
  flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; outline: none; background: none;
  color: #fff; font: 500 16px var(--ui-font);
}
.hub-search-field input::-webkit-search-cancel-button { display: none; }
.hub-search-field .hub-icon-btn { width: 36px; height: 36px; }
.hub-search-field .hub-icon-btn[hidden] { display: none; }
.hub-search-heading { margin: 4px 0 10px; font: 700 18px var(--ui-font); color: var(--muted); }
.hub-search-results { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.hub-search-results .portrait-card { width: auto; min-width: 0; margin: 0; }
@supports not (aspect-ratio: 1) { .hub-search-results .portrait-card { height: 46vw; } }
.hub-search-empty { margin: 40px 0; color: var(--muted, #a6abb3); text-align: center; font-size: 15px; }
.hub-search-empty:empty { display: none; }
.hub-notes {
  position: fixed; z-index: 1046; top: calc(var(--hub-top) + 64px); right: 12px; width: min(330px, calc(100vw - 24px));
  max-height: calc(100dvh - var(--hub-top) - 64px - var(--pop-bottom)); overflow-y: auto; overscroll-behavior: contain; padding: 12px 8px 8px; box-sizing: border-box;
  border: 1px solid var(--line, #3f4147); border-radius: 18px; background: var(--panel, #2b2d31);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .45); color: #fff; font-family: var(--ui-font);
}
.hub-notes[hidden] { display: none; }
.hub-notes-head h2 { margin: 0; font: 700 16px var(--ui-font); color: var(--muted); }
.hub-notes-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 8px 8px; }
.hub-notes-clear { padding: 6px 8px; border: 0; border-radius: 8px; background: none; color: var(--muted, #a6abb3); font: 700 13px var(--ui-font); white-space: nowrap; cursor: pointer; }
.hub-notes-clear:hover, .hub-notes-clear:active { background: rgba(255, 255, 255, .08); color: #fff; }
.hub-note {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px; border: 0; border-radius: 12px;
  background: none; color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.hub-note:active { background: rgba(255, 255, 255, .08); }
/* (new since the bell last opened: a tint and a dot) */
.hub-note.is-new { position: relative; background: rgba(120, 150, 255, .12); }
.hub-note.is-new::after { content: ""; position: absolute; top: 50%; right: 12px; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%; background: #5b9dff; }
.hub-note.is-new .hub-note-copy { padding-right: 18px; }
.hub-note-art {
  display: grid; place-items: center; flex: none; width: 44px; height: 44px; overflow: hidden;
  border-radius: 12px; background: rgba(255, 255, 255, .08); font-size: 22px;
}
.hub-note-art img { width: 100%; height: 100%; object-fit: cover; }
.hub-note-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hub-note-copy b { font-size: 15px; font-weight: 700; }
.hub-note-copy small { overflow: hidden; color: var(--muted, #a6abb3); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.hub-notes-empty { margin: 8px 8px 12px; color: var(--muted, #a6abb3); font-size: 14px; }
.hub-invite-quest {
  margin: 4px 0 12px; padding: 14px; border: 1px solid rgba(255,255,255,.4); border-radius: 16px;
  background: linear-gradient(rgba(20,24,70,.55), rgba(20,24,70,.55)), var(--brand-gradient, linear-gradient(100deg, #3ee6f2, #559bff 52%, #c78aff)); color: #fff;
  box-shadow: inset 0 1px rgba(255,255,255,.35), 0 4px 18px rgba(85,155,255,.14);
}
.hub-invite-quest[hidden] { display: none; }
.hub-invite-quest-top { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.hub-invite-quest-badge { display: grid; place-items: center; flex: none; width: 32px; height: 34px; border-radius: 10px; transform: rotate(-7deg); background: rgba(255,255,255,.15); color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.35); }
.hub-invite-quest h3 { flex: 1; min-width: 0; margin: 0; color: #fff; font-size: 17px; font-weight: 700; line-height: 1.15; letter-spacing: -.3px; text-transform: none; }
.hub-invite-quest-count { flex: none; color: #fff; font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hub-invite-quest-meter { height: 5px; overflow: hidden; border-radius: 6px; background: rgba(255,255,255,.22); }
.hub-invite-quest-fill { display: block; height: 100%; border-radius: inherit; background: #fff; }
.hub-invite-quest-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; }
.hub-invite-quest-reward { flex: 1; min-width: 0; color: #fff; }
.hub-invite-quest-reward b { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.hub-invite-quest-reward svg { flex: none; }
.hub-invite-quest-share { display: flex; align-items: center; justify-content: center; gap: 6px; max-width: 55%; min-height: 44px; padding: 8px 12px; border: 1px solid rgba(255,255,255,.5); border-radius: 11px; background: #fff; color: #3151a1; font: 700 13px var(--ui-font); cursor: pointer; }
.hub-invite-quest-share > span:first-child { display: flex; }
.hub-invite-quest-share:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.hub-invite-quest-share:hover { background: #e7eeff; }
.hub-invite-quest-share:active { background: #d7e2ff; transform: translateY(1px); }
.hub-invite-quest-share:disabled { cursor: wait; opacity: .7; }
.hub-invite-quest-share[data-state="copied"] { background: #d2fff0; border-color: #d2fff0; color: #1b6253; }

/* ---- the Feed */
.hub-feed { position: fixed; inset: 0; z-index: 1040; background: #0b0a10; color: #fff; font-family: var(--ui-font); }
.hub-feed[hidden] { display: none; }
body.playing .hub-feed { visibility: hidden; }
/* a game opened from Search's results plays on top of them; leaving it comes back to them */
body.playing .hub-search { visibility: hidden; }
.feed-pages {
  height: 100%; overflow-y: auto; overscroll-behavior: contain;
  scroll-snap-type: y mandatory; scrollbar-width: none;
}
.feed-pages::-webkit-scrollbar { display: none; }
.feed-page { position: relative; height: 100%; overflow: hidden; scroll-snap-align: start; scroll-snap-stop: always; }
/* the game's window, rounded, above its row and the bar */
.feed-stage {
  position: absolute; left: 0; right: 0; top: var(--hub-top); bottom: var(--feed-bottom); overflow: hidden;
  border-radius: 20px; background: #17161f; isolation: isolate;
}
/* (until its game is live: its art, blurred, filling the window) */
.feed-stage::before {
  content: ""; position: absolute; inset: -40px; background: var(--feed-backdrop) center / cover no-repeat;
  filter: blur(22px) saturate(1.2); opacity: .55;
}
.feed-live { position: absolute; inset: 0; pointer-events: none; }
.feed-frame {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: transparent;
  opacity: 0; transition: opacity .5s ease;
}
.feed-page.is-live .feed-frame { opacity: 1; }
.feed-shade {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(8, 8, 12, .3) 0%, rgba(8, 8, 12, .2) 50%, rgba(8, 8, 12, .55) 100%);
}
/* the cover and Play: 58% of the width, a little below the middle */
.feed-card {
  position: absolute; left: 50%; top: 28%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 11px; width: min(58vw, 270px);
}
.feed-art {
  position: relative; display: block; width: 100%; height: calc(min(58vw, 270px) * 1.485); overflow: hidden;
  border-radius: 16px; background: rgba(255, 255, 255, .08); box-shadow: 0 14px 34px rgba(0, 0, 0, .5);
}
/* (the cover always takes its place, so a lazy image still loads; the title shows until it has) */
.feed-cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .25s ease; cursor: pointer; }
.feed-card.has-cover .feed-cover { opacity: 1; }
.feed-cover-title {
  position: absolute; inset: 0; display: grid; place-items: center; padding: 16px;
  font: 800 24px var(--ui-font); text-align: center; pointer-events: none;
}
.feed-card.has-cover .feed-cover-title { display: none; }
.feed-play {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 45px;
  border: 0; border-radius: 999px; background: #fff; color: #111; font: 700 21px/1 var(--ui-font);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .35); cursor: pointer; touch-action: manipulation;
  -webkit-font-smoothing: antialiased;
}
.feed-play:active { transform: scale(.97); }
/* her dive into it (index.html's Play): the cover takes her in */
.feed-art.is-swallowing { animation: feed-gulp .42s ease; }
@keyframes feed-gulp { 0%, 40% { transform: none; } 70% { transform: scale(1.05); } 100% { transform: none; } }
.home-companion-layer.is-diving .home-companion canvas { animation: companion-dive .4s cubic-bezier(.5, 0, .85, .45) forwards; transform-origin: 50% 78%; }
@keyframes companion-dive {
  0% { transform: none; opacity: 1; }
  35% { transform: translateY(-34px) scale(1.06); opacity: 1; }
  100% { transform: translateY(90px) scale(.15); opacity: 0; }
}
.hub-feed .home-companion-layer { z-index: 5; }
/* the game's row, as a video's, between its window and the bar */
.feed-meta {
  position: absolute; left: 16px; right: 8px; bottom: calc(var(--tabs-slim) + var(--tabs-gap));
  display: flex; align-items: center; justify-content: space-between; gap: 10px; height: var(--feed-row);
}
.feed-about {
  display: flex; align-items: center; gap: 10px; min-width: 0; padding: 0; border: 0; background: none;
  color: #fff; font: inherit; text-align: left; cursor: pointer;
}
.feed-badge {
  position: relative; display: grid; place-items: center; flex: none; width: 34px; height: 34px; overflow: hidden;
  border-radius: 50%; background: #3a3650; font: 800 15px var(--ui-font);
}
.feed-badge::before { content: attr(data-letter); }
.feed-badge img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.feed-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 700 16px var(--ui-font); -webkit-font-smoothing: antialiased; }
.feed-actions { display: flex; flex: none; align-items: center; gap: 2px; }
.feed-stat { display: flex; align-items: center; gap: 5px; margin-right: 6px; font: 500 14px var(--ui-font); }
.feed-action {
  display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%;
  background: none; color: #fff; cursor: pointer;
}
.feed-action:active { background: rgba(255, 255, 255, .12); }
/* a game from the Feed plays in its window: its row and the slim bar stay under it */
body.feed-play #game {
  top: var(--hub-top); height: calc(100% - var(--hub-top) - var(--feed-bottom)); border-radius: 20px; z-index: 1041;
}
body.playing.feed-play .hub-feed { visibility: visible; }
/* (and its pages hold still under it: the row stays the game's; the Feed tab's ↓ moves on) */
body.playing.feed-play .feed-pages { overflow: hidden; touch-action: none; }
.referral-sign-in { position: fixed; z-index: 300; bottom: calc(80px + env(safe-area-inset-bottom, 0px)); left: 16px; right: 16px; max-width: 460px; margin: 0 auto; display: flex; align-items: center; gap: 12px; padding: 14px 12px 14px 16px; border-radius: 18px; background: #fff1bb; color: #604919; box-shadow: 0 4px 24px #0003; font: 600 13px/18px system-ui, sans-serif; }
.referral-sign-in a { flex: none; color: #604919; font-weight: 800; }
.referral-sign-in button { flex: none; width: 36px; height: 44px; border: 0; background: none; color: inherit; font-size: 24px; cursor: pointer; }
.feed-toast {
  position: fixed; z-index: 1060; left: 50%; bottom: calc(var(--feed-bottom) + 20px); transform: translateX(-50%);
  width: max-content; max-width: calc(100vw - 32px); box-sizing: border-box; text-align: center;
  padding: 9px 16px; border-radius: 999px; background: rgba(20, 20, 26, .92); color: #fff; font: 600 14px var(--ui-font);
  pointer-events: none;
}
html.hub-typing .hub-tabs { display: none; }

/* ---- the Show All rows and their page (hub-header.js showList) */
html.hubTabs .mobile-catalog .category-all {
  flex: none; padding: 6px 2px; border: 0; background: none; color: #c4c8d0;
  font: 600 14px var(--ui-font); cursor: pointer; -webkit-tap-highlight-color: transparent;
}
html.hubTabs .mobile-catalog .category-all:active { color: #fff; }
@media (hover: hover) {
  html.hubTabs .mobile-catalog .category-all:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
}
.hub-list-title { display: none; margin: 0; font: 700 20px var(--ui-font); }
.hub-search.is-list .hub-search-field { display: none; }
.hub-search.is-list .hub-list-title { display: block; }
/* the rows run off the right edge, as Astrocade's do (a swipe, no arrows) */
html.hubTabs .mobile-catalog .rail-viewport { margin-right: -16px; }
html.hubTabs .mobile-catalog .game-rail { padding-right: 16px; }
/* (phones swipe; the website and Discord keep their arrows for a mouse) */
html.androidHub.hubTabs .mobile-catalog .rail-arrows { display: none; }

html.hubTabs main > header { position: relative; }
html.hubTabs main > header > .brand {
  position: absolute; left: 0; right: calc(var(--capsule-w, 192px) + 10px); top: 0; height: 50px; min-height: 0; pointer-events: none;
  grid-area: auto;   /* (a grid area would be what top: 0 meant, the wallet's row) */
}
/* (what the capsule beside it leaves, on a narrow phone: --capsule-w, as wide as its buttons make it, index.html) */
html.hubTabs .brand-wordmark { width: min(138px, 100%); pointer-events: auto; }

/* ---- Home: a taller room preview, with the games still visible below */
@media (pointer: coarse) {
  html.hubTabs.homeReveal .app-home-slot { height: min(clamp(200px, 25vh, 240px), max(130px, calc(100dvh - 230px))); }
}

/* ---- the Feed's first-visit hint */
.feed-hint {
  position: absolute; z-index: 6; left: 50%; bottom: calc(var(--feed-bottom) + 18px); transform: translateX(-50%);
  display: flex; align-items: center; gap: 6px; padding: 9px 16px 9px 12px; border-radius: 999px;
  background: rgba(15, 14, 22, .82); color: #fff; font: 600 14px var(--ui-font); white-space: nowrap; pointer-events: none;
  animation: feed-hint-in .3s ease;
}
.feed-hint[hidden] { display: none; }
.feed-hint svg { animation: feed-hint-up 1.1s ease-in-out infinite; }
@keyframes feed-hint-in { from { opacity: 0; transform: translate(-50%, 8px); } }
@keyframes feed-hint-up { 0%, 100% { transform: none; } 50% { transform: translateY(-4px); } }
/* (the pages lift twice, a peek at the next game) */
.feed-pages.is-hinting > .feed-page { animation: feed-peek 2.4s ease-in-out .6s 1; }
@keyframes feed-peek {
  0%, 100% { transform: none; } 20% { transform: translateY(-72px); } 40% { transform: none; }
  60% { transform: translateY(-40px); } 80% { transform: none; }
}
@media (prefers-reduced-motion: reduce) { .feed-pages.is-hinting > .feed-page, .feed-hint svg { animation: none; } }

/* ---- Trending's row icon: a flame */

/* ---- Today in one line: its cards side by side, short, no heading or buttons */
html.hubTabs .today-strip { margin-bottom: 14px; }
html.hubTabs .today-strip-title { display: none; }
html.hubTabs .today-pair { --today-gap: 8px; }
html.hubTabs .today-pair > :is(.today-otomates, .today-spins, .today-game) { height: 58px; min-height: 0; aspect-ratio: auto; border-radius: 12px; }
html.hubTabs .today-pair :is(.today-otomates, .today-spins) .copy { width: 72%; padding: 0 10px; gap: 1px; }
html.hubTabs .today-pair :is(.today-otomates, .today-spins) b { font-size: 14px; line-height: 1.15; }
html.hubTabs .today-pair .today-spins small { margin-top: 0; font-size: 11.5px; }
html.hubTabs .today-pair :is(.today-otomates, .today-spins) .go { display: none; }

/* ---- Profile (hub-profile.js): her face as the tab's icon, and its page */
.hub-face { position: relative; display: inline-block; flex: none; overflow: hidden; border-radius: 50%; background: #3a3650; }
.hub-face img { position: absolute; max-width: none; }
.hub-tab-icon.has-picture { width: 26px; height: 26px; }
.hub-tab-icon.has-picture .hub-face { width: 26px !important; height: 26px !important; box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .55); }
.hub-tab.is-active .hub-tab-icon.has-picture .hub-face { box-shadow: 0 0 0 2px #fff; }
html.feed-open .hub-tab.is-active .hub-tab-icon.has-picture .hub-face { box-shadow: 0 0 0 2px #111; }
.hub-profile {
  position: fixed; inset: 0; z-index: 1044; overflow-y: auto; overscroll-behavior: contain;
  padding-bottom: var(--tabs-space); box-sizing: border-box; background: var(--bg, #1e1f22); color: #fff; font-family: var(--ui-font);
}
.hub-profile[hidden] { display: none; }
/* (a sheet or Settings up: the page behind stays put) */
.hub-profile.is-held, html.profile-open .hub-profile { overflow: hidden; }
/* (the phone's clock stays readable over what scrolls under it) */
html.profile-page::after { content: ""; position: fixed; z-index: 1045; left: 0; right: 0; top: 0; height: var(--hub-top); background: linear-gradient(rgba(30, 31, 34, .92) 55%, transparent); pointer-events: none; }
.profile-hero {
  position: relative; height: calc(var(--hub-top) + 330px); overflow: hidden;
  background: #2b2d31 46% 30% / auto 108% no-repeat;
}
.profile-hero.is-plain { background-position: 50% 0; background-size: contain; }
.profile-hero::after { content: ""; position: absolute; inset: 48% 0 0; background: linear-gradient(transparent, rgba(30, 31, 34, .82) 58%, var(--bg, #1e1f22)); pointer-events: none; }
.profile-gear {
  position: absolute; z-index: 2; top: calc(var(--hub-top) + 8px); right: 16px; display: grid; place-items: center;
  width: 42px; height: 42px; padding: 0; border: 1.5px solid rgba(255, 255, 255, .28); border-radius: 50%; background: rgba(15, 16, 19, .62); color: #fff; cursor: pointer;
}
.profile-top { position: absolute; z-index: 1; left: 16px; right: 16px; bottom: 4px; }
.profile-main-tag {
  display: inline-block; height: 28px; margin-bottom: 8px; padding: 0 12px; border-radius: 14px; background: linear-gradient(135deg, #ffd76a, #ffb020);
  color: #3a2500; font: 800 14px/28px "Baloo 2", var(--ui-font);
}
.profile-main-tag[hidden] { display: none; }
.profile-name { min-width: 0; margin: 0; overflow: hidden; font: 800 28px/1.05 "Baloo 2", var(--ui-font); text-overflow: ellipsis; white-space: nowrap; }
.profile-name-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.profile-meta { display: flex; align-items: center; gap: 8px; min-height: 30px; margin-top: 6px; }
.profile-level { flex: none; font: 700 14px "Baloo 2", var(--ui-font); }
.profile-level-bar { flex: 1; height: 7px; overflow: hidden; border-radius: 4px; background: rgba(255, 255, 255, .22); }
.profile-level-bar[hidden] { display: none; }
.profile-level-bar i { display: block; height: 100%; background: var(--brand-gradient, linear-gradient(100deg, #3ee6f2, #559bff 52%, #c78aff)); }
.profile-friends, .profile-add {
  display: flex; flex: none; align-items: center; gap: 6px; height: 30px; padding: 0 11px; border: 1px solid rgba(255, 255, 255, .18); border-radius: 15px;
  background: rgba(0, 0, 0, .5); color: #fff; font: 700 14px "Baloo 2", var(--ui-font); white-space: nowrap; cursor: pointer;
}
.profile-friends { margin-left: auto; }
.profile-friends[hidden], .profile-add[hidden] { display: none; }
/* (beside the name; a long name leaves it its icon: hub-profile.js fitName) */
.profile-add svg { flex: none; }
.profile-name-row.is-long .profile-add span { display: none; }
.profile-buttons { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 10px; margin: 12px 16px 0; }
.profile-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 46px; padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, .16); border-radius: 999px; background: rgba(255, 255, 255, .08);
  color: #fff; font: 800 16px "Baloo 2", var(--ui-font); cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.profile-btn[hidden] { display: none; }
.profile-btn:disabled { opacity: .5; }
/* (the one to press: the brand's gradient) */
.profile-btn.is-main { border: 0; background: var(--brand-gradient, linear-gradient(100deg, #3ee6f2, #559bff 52%, #c78aff)); color: #07131f; }
.profile-btn:active { transform: scale(.97); }
/* (Over other apps: the page's one gradient, so its words and switch go dark on it) */
.hub-profile > .profile-companion {
  margin: 12px 16px 0; padding: 9px 12px; border: 0; border-radius: 18px; color: #07131f;
  background: var(--brand-gradient, linear-gradient(100deg, #3ee6f2, #559bff 52%, #c78aff));
}
.hub-profile > .profile-companion .profile-companion-words b { font: 700 15.5px/1.15 "Baloo 2", var(--ui-font); color: #07131f; }
.hub-profile > .profile-companion .profile-companion-words small { font-size: 12.5px; color: rgba(7, 19, 31, .75); }
.hub-profile > .profile-companion .profile-companion-face { box-shadow: 0 0 0 2px #fff; }
.hub-profile > .profile-companion .profile-switch { background: rgba(7, 19, 31, .28); }
.hub-profile > .profile-companion .profile-switch:checked { background: #07131f; }
.hub-profile > .profile-companion .profile-switch:focus-visible { outline-color: #07131f; }
.hub-profile > .profile-companion .profile-companion-away { border-top-color: rgba(7, 19, 31, .2); font-size: 12.5px; color: #07131f; }
.hub-profile > .profile-companion .profile-companion-away > button { background: #07131f; color: #fff; }
/* iPhone's her-window options, folded under Over other apps while it's on (app-host popoutTricks): the same
   card, its gradient carried on below, as Android's one card (Tod 2026-11-25) */
.hub-profile > .profile-companion[data-options="1"] { border-radius: 18px 18px 0 0; }
.hub-profile > .profile-popout { margin: 0 16px; padding: 0 12px; border-radius: 0 0 18px 18px; color: #07131f;
  background: var(--brand-gradient, linear-gradient(100deg, #3ee6f2, #559bff 52%, #c78aff)); }
.hub-profile > .profile-popout[open] { padding-bottom: 12px; }
.hub-profile > .profile-popout[hidden] { display: none; }
.profile-popout > summary { display: flex; align-items: center; justify-content: space-between; min-height: 42px; list-style: none;
  border-top: 1px solid rgba(7, 19, 31, .18); font: 700 14.5px var(--ui-font); color: #07131f; cursor: pointer;
  -webkit-tap-highlight-color: transparent; }
.profile-popout > summary::-webkit-details-marker { display: none; }
.profile-popout > summary::after { content: ""; width: 8px; height: 8px; margin-right: 6px; border: solid #07131f; border-width: 0 2px 2px 0;
  transform: translateY(-2px) rotate(45deg); transition: transform .15s; }
.profile-popout[open] > summary::after { transform: translateY(2px) rotate(-135deg); }
.profile-popout .popout-trick, .profile-popout .popout-timer { border-top: 1px solid rgba(7, 19, 31, .18); }
.popout-trick { display: flex; align-items: center; gap: 12px; min-height: 54px; cursor: pointer; }
.popout-trick span { flex: 1; display: flex; flex-direction: column; gap: 2px; text-align: left; }
.popout-trick b, .popout-timer b { font: 700 15px var(--ui-font); color: #07131f; }
.popout-trick small, .popout-timer small { font-size: 12.5px; color: rgba(7, 19, 31, .75); }
.profile-popout .profile-switch { background: rgba(7, 19, 31, .28); }
.profile-popout .profile-switch:checked { background: #07131f; }
.profile-popout .profile-switch:focus-visible { outline-color: #07131f; }
.profile-popout-note { margin: 0; padding-top: 10px; border-top: 1px solid rgba(7, 19, 31, .18); font-size: 12.5px; color: rgba(7, 19, 31, .75); }
.popout-timer { display: flex; flex-direction: column; gap: 9px; padding: 12px 0; }
.popout-timer > span { display: flex; flex-direction: column; gap: 2px; }
.popout-timer-picks { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
.popout-timer button { min-height: 38px; padding: 0 8px; border: 0; border-radius: 12px; background: rgba(255, 255, 255, .55); color: #07131f;
  font: 700 14px var(--ui-font); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.popout-timer button:active { transform: scale(.96); }
.popout-timer-custom { display: flex; gap: 7px; }
.popout-timer-custom[hidden] { display: none; }
.popout-timer-custom input { flex: 1; min-width: 0; min-height: 38px; padding: 0 12px; border: 0; border-radius: 12px;
  background: rgba(255, 255, 255, .85); color: #07131f; font: 16px var(--ui-font); box-sizing: border-box; }
.popout-timer-custom button { flex: none; padding: 0 18px; background: #07131f; color: #fff; }
.popout-timer-status { color: #07131f !important; font-weight: 600; }
.popout-timer-status:empty { display: none; }
.popout-timer button.popout-timer-stop { width: 100%; background: #07131f; color: #fff; font-variant-numeric: tabular-nums; }
.popout-timer-stop[hidden] { display: none; }
/* (Android's How active and Size in the same Options, app-host overlayOptions: built like the timer's rows) */
.popout-pick { display: flex; flex-direction: column; gap: 9px; padding: 12px 0 0; border-top: 1px solid rgba(7, 19, 31, .18); }
.popout-pick > span { display: flex; flex-direction: column; gap: 2px; }
.popout-pick b { font: 700 15px var(--ui-font); color: #07131f; }
.popout-pick small { font-size: 12.5px; color: rgba(7, 19, 31, .75); }
.popout-pick-choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; padding-bottom: 12px; }
.popout-pick-choices button { min-height: 38px; padding: 0 8px; border: 0; border-radius: 12px; background: rgba(255, 255, 255, .55); color: #07131f;
  font: 700 14px var(--ui-font); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.popout-pick-choices button[aria-pressed="true"] { background: #07131f; color: #fff; }
.popout-pick-choices button:active { transform: scale(.96); }
.popout-size { display: flex; align-items: center; gap: 10px; min-height: 38px; }
.popout-size small { color: #07131f !important; font-weight: 600; }
.popout-size input { flex: 1; min-width: 0; margin: 0; accent-color: #07131f; }
/* (on a computer, Get the app goes dark too) */
.hub-profile > .profile-companion .profile-desktop-go { padding: 8px 16px; background: #07131f; color: #fff; }
.hub-profile > .profile-companion .profile-desktop-go:hover { background: #22303f; }
.hub-profile > .profile-companion .profile-desktop-go:focus-visible { outline-color: #07131f; }
.profile-guest:empty { display: none; }
.profile-guest { margin: 12px 16px 0; }
.profile-guest .hub-guest-menu { margin: 0; }
.profile-section { margin: 22px 16px 0; }
.profile-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 9px; }
.profile-heading h3 { display: flex; align-items: center; gap: 9px; margin: 0; font: 800 20.5px/1 "Baloo 2", var(--ui-font); }
.profile-heading h3.is-house svg { color: #3ee6a8; }
.profile-heading h3.is-people svg { color: #b48cff; }
.profile-heading h3.is-clock svg { color: #6fb2ff; }
.profile-heading h3.is-heart svg { color: #ff5a6e; fill: currentColor; }
.profile-count, .profile-all { padding: 6px 2px; border: 0; background: none; color: #c4c8d0; font: 500 14px var(--ui-font); }
.profile-all { cursor: pointer; }
/* who lives with them, four places; everyone else in a row, as the Shop's cards */
.profile-home { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.profile-home .profile-mate-art { height: 120px; border-radius: 16px; }
.profile-mates { display: flex; gap: 10px; overflow-x: auto; margin-right: -16px; padding-right: 16px; scrollbar-width: none; }
.profile-mates::-webkit-scrollbar { display: none; }
.profile-mates .profile-mate { flex: 0 0 136px; }
.profile-mates .profile-mate-art { height: 176px; border-radius: 17px; }
.profile-mate { position: relative; display: block; min-width: 0; padding: 0; border: 0; background: none; color: #fff; text-align: left; cursor: pointer; }
.profile-mate-art { position: relative; display: block; width: 100%; overflow: hidden; background: #2b2d31; }
.profile-mate-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 12%; }
.profile-mate-art.is-plain img { left: 4%; top: 4%; width: 92%; height: 96%; object-fit: contain; object-position: 50% 100%; }
.profile-mate-art::after { content: ""; position: absolute; inset: 55% 0 0; background: linear-gradient(transparent, rgba(16, 17, 20, .92)); pointer-events: none; }
.profile-mate-art b { position: absolute; z-index: 1; left: 9px; right: 7px; bottom: 6px; overflow: hidden; font: 700 14.5px "Baloo 2", var(--ui-font); text-overflow: ellipsis; white-space: nowrap; }
.profile-mate-art em {
  position: absolute; z-index: 1; left: 0; top: 0; height: 23px; padding: 0 10px; border-radius: 0 0 11px 0; background: #4b4e56;
  color: #e6e8ec; font: 800 12.5px/23px "Baloo 2", var(--ui-font); font-style: normal;
}
.profile-mate-art em.is-main { left: 6px; top: 6px; height: 20px; padding: 0 7px; border-radius: 10px; background: linear-gradient(135deg, #ffd76a, #ffb020); color: #3a2500; font-size: 11.5px; line-height: 20px; }
.profile-mate-art em.is-rare { background: #2f7bff; color: #fff; }
.profile-mate-art em.is-epic { background: #7e3fe0; color: #fff; }
.profile-mate-art em.is-legendary { background: linear-gradient(135deg, #ffd76a, #ffb020); color: #3a2500; }
.profile-empty-place {
  display: flex; flex-direction: column; align-items: center; justify-content: center; height: 120px; padding: 0; border: 2px dashed #4a4d55; border-radius: 16px; background: none;
  color: #8a8f99; font: 600 12.5px/1.15 "Baloo 2", var(--ui-font); cursor: pointer;
}
.profile-empty-place i { font: 500 28px/1 "Baloo 2", var(--ui-font); font-style: normal; }
.profile-played { display: flex; gap: 8px; overflow-x: auto; margin-right: -16px; padding-right: 16px; scrollbar-width: none; }
.profile-played::-webkit-scrollbar { display: none; }
.profile-played .portrait-card { flex: 0 0 clamp(113px, 34vw, 157px); }
.profile-empty { margin: 4px 0 0; color: #a6abb3; font-size: 14px; }
.profile-empty[hidden] { display: none; }
/* the hub's sheets (a purchase) come up over the Profile page and the Feed */
html.hubTabs .daily-overlay { z-index: 1047; }
html.hubTabs .buy-overlay { z-index: 1049; }
/* Your Otomates lives on the Profile page now, not in its menu */
html.hubTabs .profile-panel > a.profile-otomates { display: none; }
.hub-profile h3, .hub-search-heading, .hub-notes-head h2 { text-transform: none; letter-spacing: 0; }

/* ---- hearts: the Feed row's */
.feed-heart { display: flex; gap: 4px; width: auto; min-width: 40px; padding: 0 8px; border-radius: 999px; font: 500 14px var(--ui-font); }
.feed-heart[hidden] { display: none; }
.feed-heart b { font-weight: 500; }
.feed-heart b:empty { display: none; }
.feed-heart.is-on { color: #ff4d6a; }
.feed-heart.is-on svg { fill: currentColor; }
.feed-heart.is-on b { color: #fff; }
.feed-heart.is-pop svg { animation: heart-pop .3s ease; }
@keyframes heart-pop { 50% { transform: scale(1.3); } }
.profile-section[hidden] { display: none; }

/* ---- Profile's sheets: Share room, your name */
/* (iOS keeps the page full height under its keyboard: the sheet rides on top of it, and nothing has to scroll into view) */
.profile-sheet { position: fixed; inset: 0; z-index: 1056; display: flex; align-items: flex-end; padding-bottom: max(0px, var(--ios-keyboard-inset, 0px) - var(--keyboard-pan, 0px)); box-sizing: border-box; background: rgba(5, 5, 9, 0); transition: background .2s ease; touch-action: none; }
.profile-sheet[hidden] { display: none; }
.profile-sheet.is-up { background: rgba(5, 5, 9, .6); }
.profile-sheet-panel {
  width: 100%; max-height: 86dvh; overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y; padding: 10px 16px max(20px, calc(env(safe-area-inset-bottom) + 6px)); box-sizing: border-box;
  border-radius: 24px 24px 0 0; background: #24252b; color: #fff; font-family: var(--ui-font);
  transform: translateY(100%); transition: transform .22s cubic-bezier(.2, .8, .2, 1);
}
.profile-sheet.is-up .profile-sheet-panel { transform: none; }
.profile-sheet-grip { display: block; width: 40px; height: 5px; margin: 0 auto 12px; border-radius: 9px; background: rgba(255, 255, 255, .25); }
.profile-sheet-title { margin: 0; font: 700 20px var(--ui-font); text-transform: none; letter-spacing: 0; }
.profile-sheet-sub { margin: 4px 0 14px; color: #b9bdc6; font-size: 14px; line-height: 1.35; }
.profile-share-picture {
  position: relative; display: grid; place-items: end start; height: 170px; padding: 12px; box-sizing: border-box; overflow: hidden;
  border-radius: 18px; background: var(--brand-gradient, linear-gradient(100deg, #3ee6f2, #559bff 52%, #c78aff)) center / cover no-repeat;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1);
}
.profile-share-picture .hub-face { border: 3px solid #fff; box-shadow: 0 4px 12px rgba(0, 0, 0, .35); }
/* (no blank circle over the room's picture while her face loads, or if it can't) */
.profile-share-picture .hub-face:not(.is-ready) { display: none; }
.profile-share-link {
  margin: 12px 0; padding: 12px 14px; overflow: hidden; border-radius: 12px; background: rgba(255, 255, 255, .06);
  color: #e6e8ec; font: 500 15px var(--ui-font); text-overflow: ellipsis; white-space: nowrap;
}
.profile-share-buttons { display: grid; gap: 10px; }

/* ---- Settings from the Profile page: the menu alone over a dimmed page (not the hub's header behind it) */
html.profile-page main > header > :not(.head-right),
html.profile-page main > header > .head-right > :not(.profile-menu) { visibility: hidden; }
html.profile-page .profile-panel { box-shadow: 0 0 0 100vmax rgba(5, 5, 9, .6), 0 16px 40px rgba(0, 0, 0, .45); }

/* ---- Create (hub-studio.js): dress one up, or one from a photo; what she'll do */
.hub-studio {
  position: fixed; inset: 0; z-index: 1044; overflow-y: auto; overscroll-behavior: contain;
  padding: calc(var(--hub-top) + 12px) 16px var(--tabs-space); box-sizing: border-box;
  background: var(--bg, #1e1f22); color: #fff; font-family: var(--ui-font);
}
.hub-studio[hidden] { display: none; }
.hub-studio h3 { margin: 0; color: #fff; font: 700 17px var(--ui-font); text-transform: none; letter-spacing: 0; }
.hub-studio p { margin: 2px 0 0; color: #b9bdc6; font-size: 13.5px; line-height: 1.35; }
.studio-title { margin: 0 0 12px; font: 700 20px var(--ui-font); text-align: center; }
.studio-card {
  display: block; width: 100%; margin: 0 0 12px; padding: 14px; box-sizing: border-box; border: 0; border-radius: 20px;
  background: rgba(255, 255, 255, .05); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); color: #fff; text-align: left; font: inherit;
}
.studio-card-head { display: flex; align-items: center; gap: 12px; }
.studio-card-icon { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 14px; background: rgba(255, 255, 255, .1); }
.studio-card-icon.is-grad { background: var(--brand-gradient, linear-gradient(100deg, #3ee6f2, #559bff 52%, #c78aff)); }
.studio-photo { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.studio-photo > div { flex: 1; min-width: 0; }
.studio-photo:active { transform: scale(.98); }
.studio-go { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 50%; background: rgba(255, 255, 255, .1); }
.studio-pick { display: flex; gap: 10px; overflow-x: auto; margin: 14px -14px 0; padding: 0 14px 2px; scrollbar-width: none; }
.studio-pick::-webkit-scrollbar { display: none; }
.studio-pick-one { display: flex; flex-direction: column; gap: 6px; flex: 0 0 104px; padding: 0; border: 0; background: none; color: #fff; text-align: left; cursor: pointer; }
.studio-pick-art {
  position: relative; display: block; width: 104px; height: 130px; overflow: hidden; border-radius: 14px;
  background: linear-gradient(160deg, #4a3f7a, #2a2b3a); box-shadow: 0 6px 16px rgba(0, 0, 0, .35);
}
.studio-pick-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.studio-pick-art.is-plain img { object-fit: contain; object-position: 50% 100%; }
.studio-pick-one b { overflow: hidden; font: 600 13.5px var(--ui-font); text-overflow: ellipsis; white-space: nowrap; }
.studio-pick-one:active .studio-pick-art { transform: scale(.97); }
.studio-moves { margin-top: 18px; }
.studio-moves-title { margin-bottom: 10px !important; }
.studio-move-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.studio-move { display: flex; flex-direction: column; align-items: center; gap: 4px; margin: 0; padding: 8px 4px 8px; border-radius: 16px; background: rgba(255, 255, 255, .05); }
.studio-move canvas { width: 96px; height: 110px; }
.studio-move figcaption { color: #e6e8ec; font: 600 13px var(--ui-font); }

/* ---- tab feel: each tab's page fades in */
.hub-feed:not([hidden]), .hub-profile:not([hidden]), .hub-studio:not([hidden]), .hub-search:not([hidden]) { animation: tab-in .18s ease-out; }
@keyframes tab-in { from { opacity: 0; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) { .hub-feed, .hub-profile, .hub-studio, .hub-search { animation: none !important; } }
.hub-studio h3, .hub-profile h3, .profile-sheet-title { color: #fff; }

/* the Shop put away between visits (index.html resumeShop): kept, not shown */
iframe.is-parked { display: none !important; }

/* ---- Dress up (hub-dressup.js) */
.hub-dressup {
  position: fixed; inset: 0; z-index: 1046; overflow-y: auto; overscroll-behavior: contain;
  padding: calc(var(--hub-top) + 6px) 16px calc(var(--tabs-space) + 8px); box-sizing: border-box;
  background: var(--bg, #1e1f22); color: #fff; font-family: var(--ui-font); animation: tab-in .18s ease-out;
}
.hub-dressup[hidden] { display: none; }
.dressup-top { display: flex; align-items: center; gap: 6px; height: 48px; }
.dressup-back { display: grid; place-items: center; width: 40px; height: 40px; margin-left: -8px; padding: 0; border: 0; border-radius: 50%; background: none; color: #fff; }
.dressup-title { flex: 1; min-width: 0; margin: 0; overflow: hidden; font: 700 19px var(--ui-font); text-overflow: ellipsis; white-space: nowrap; }
.dressup-left { flex: none; color: #b9bdc6; font: 500 13px var(--ui-font); }
.dressup-stage {
  position: relative; display: grid; place-items: center; height: min(46vh, 380px); margin-top: 4px; overflow: hidden;
  border-radius: 24px; background: radial-gradient(90% 70% at 50% 85%, rgba(199, 138, 255, .25), transparent 70%),
    linear-gradient(180deg, #2c2d3a, #23242c); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08);
}
.dressup-picture { max-width: 86%; max-height: 92%; object-fit: contain; filter: drop-shadow(0 12px 18px rgba(0, 0, 0, .35)); }
.dressup-busy {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  background: rgba(20, 20, 28, .55); font: 600 15px var(--ui-font);
}
.dressup-busy[hidden] { display: none; }
.dressup-busy i { width: 34px; height: 34px; border: 3px solid rgba(255, 255, 255, .25); border-top-color: #fff; border-radius: 50%; animation: dressup-spin .8s linear infinite; }
@keyframes dressup-spin { to { transform: rotate(360deg); } }
.dressup-tools { position: absolute; left: 10px; right: 10px; top: 10px; display: flex; justify-content: space-between; }
.dressup-tool {
  display: flex; align-items: center; gap: 5px; height: 34px; padding: 0 12px; border: 0; border-radius: 999px;
  background: rgba(15, 14, 22, .6); color: #fff; font: 600 13px var(--ui-font);
}
.dressup-tool:disabled { opacity: .35; }
.dressup-history { display: flex; gap: 8px; overflow-x: auto; margin: 10px -16px 0; padding: 2px 16px; scrollbar-width: none; }
.dressup-history::-webkit-scrollbar { display: none; }
.dressup-thumb {
  position: relative; flex: 0 0 56px; height: 64px; padding: 0; border: 0; border-radius: 12px; overflow: hidden;
  background: #2b2d36; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1);
}
.dressup-thumb img { width: 100%; height: 100%; object-fit: contain; }
.dressup-thumb.is-on { box-shadow: 0 0 0 2px #fff; }
.dressup-thumb em { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, .55); color: #fff; font: 600 10px var(--ui-font); font-style: normal; text-align: center; }
.dressup-parts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 14px; padding: 4px; border-radius: 999px; background: rgba(255, 255, 255, .06); }
.dressup-part { height: 36px; border: 0; border-radius: 999px; background: none; color: #c4c8d0; font: 600 14px var(--ui-font); }
.dressup-part.is-on { background: #fff; color: #111; }
.dressup-form { display: flex; gap: 8px; margin-top: 10px; }
.dressup-field {
  flex: 1; min-width: 0; height: 46px; padding: 0 14px; border: 1px solid rgba(255, 255, 255, .14); border-radius: 14px;
  background: rgba(255, 255, 255, .06); color: #fff; font: 500 16px var(--ui-font); outline: none;
}
.dressup-field:focus { border-color: #8fb8ff; }
.dressup-dice { flex: none; display: grid; place-items: center; width: 46px; height: 46px; border: 0; border-radius: 14px; background: rgba(255, 255, 255, .08); color: #fff; }
.dressup-generate {
  flex: none; display: flex; align-items: center; gap: 6px; height: 46px; padding: 0 14px; border: 0; border-radius: 14px;
  background: var(--brand-gradient, linear-gradient(100deg, #3ee6f2, #559bff 52%, #c78aff)); color: #fff; font: 700 15px var(--ui-font);
}
.dressup-generate:disabled { opacity: .5; }
.dressup-message { min-height: 18px; margin: 8px 2px 0; color: #ffb4b4; font-size: 13.5px; }
.dressup-keep { margin-top: 6px; }
.dressup-keep-btn {
  width: 100%; height: 50px; border: 0; border-radius: 999px; background: #fff; color: #111; font: 700 17px var(--ui-font);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .3);
}
.dressup-keep-btn:disabled { opacity: .4; }
.dressup-keep-note { margin: 8px 0 0; color: #a6abb3; font-size: 12.5px; text-align: center; }
html.hub-typing .hub-dressup { padding-bottom: 16px; }

/* the spotlight on the part being changed (hub-dressup.js place) */
.dressup-picture { cursor: pointer; }
.dressup-focus {
  position: absolute; z-index: 1; border-radius: 50%; pointer-events: none;
  box-shadow: 0 0 0 9999px rgba(12, 12, 18, .42), 0 0 0 2px rgba(255, 255, 255, .95), 0 0 22px 6px rgba(199, 138, 255, .75);
  transition: left .28s cubic-bezier(.2, .8, .2, 1), top .28s cubic-bezier(.2, .8, .2, 1), width .28s ease, height .28s ease;
  animation: focus-glow 1.8s ease-in-out infinite;
}
.dressup-focus[hidden] { display: none; }
@keyframes focus-glow {
  50% { box-shadow: 0 0 0 9999px rgba(12, 12, 18, .42), 0 0 0 2px #fff, 0 0 30px 10px rgba(85, 155, 255, .8); }
}
.dressup-focus-label {
  position: absolute; top: 50%; padding: 5px 11px; border-radius: 999px; transform: translateY(-50%);
  background: #fff; color: #111; font: 700 13px var(--ui-font); white-space: nowrap; box-shadow: 0 4px 12px rgba(0, 0, 0, .3);
}
/* (its name off to one side, on a short line to the ring) */
.dressup-focus[data-side="left"] .dressup-focus-label { right: calc(100% + 26px); }
.dressup-focus[data-side="right"] .dressup-focus-label { left: calc(100% + 26px); }
.dressup-focus-label::after { content: ""; position: absolute; top: 50%; width: 24px; border-top: 2px solid #fff; }
.dressup-focus[data-side="left"] .dressup-focus-label::after { left: 100%; }
.dressup-focus[data-side="right"] .dressup-focus-label::after { right: 100%; }
@media (prefers-reduced-motion: reduce) { .dressup-focus { animation: none; transition: none; } }
.dressup-tools, .dressup-busy { z-index: 2; }


/* ---- the rows' covers, as Netflix's: three whole and a third of the fourth in view
   (the rail starts 18px in, 8px between covers) */
html.hubTabs .mobile-catalog .game-rail > .portrait-card { flex: 0 0 min(calc((100vw - 42px) * .3), 172px); }
/* (the Top 10, bigger: two and a third covers) */
html.hubTabs .mobile-catalog .portrait-plays { bottom: 6px; left: 6px; padding: 3px 6px; font-size: 10px; }

/* ---- the header: the logo on the left; the Shop, bell, Search and Profile in one floating
   capsule on the right (hub-tabs.js, hub-header.js); Bits, Crystals and the level on a row
   under them. The capsule stays within reach as the catalog scrolls, aligned with the page
   on wide screens and below the host's safe area on phones. No bar along the bottom. */
:root { --tabs-space: 16px; }
html.hubTabs main > header > .hub-tabs.in-header {
  position: fixed; z-index: 5; left: auto; bottom: auto;
  top: calc(max(14px, env(safe-area-inset-top, 0px), var(--hub-top)) + 2px);
  right: max(16px, env(safe-area-inset-right, 0px), calc((100% - 1180px) / 2));
  display: flex; gap: 0; width: auto; height: 50px; max-width: none; margin: 0; padding: 0 3px;
  background: rgba(22, 20, 31, .96);   /* keep the controls legible over the scrolling covers */
  transform: none; opacity: 1;
}
.hub-tabs.in-header .hub-head-icons { display: contents; }
.hub-tabs.in-header .hub-tab, .hub-tabs.in-header .hub-icon-btn {
  width: 46px; height: 42px; margin: 2px 0; padding: 0; border: 0; border-radius: 999px; background: none; color: #fff;
}
.hub-tabs.in-header .hub-tab:active, .hub-tabs.in-header .hub-icon-btn:active,
.hub-tabs.in-header .hub-tab.is-active { background: rgba(255, 255, 255, .15); }
.hub-tabs.in-header .hub-tab, .hub-tabs.in-header .hub-icon-btn { transition: background-color 120ms ease; }
.hub-tabs.in-header .hub-tab svg, .hub-tabs.in-header .hub-icon-btn svg, .hub-tabs.in-header .hub-tab-icon { transition: transform 120ms ease; }
@media (hover: hover) {
  .hub-tabs.in-header .hub-tab:hover, .hub-tabs.in-header .hub-icon-btn:hover { background: rgba(255, 255, 255, .12); }
  .hub-tabs.in-header .hub-tab:hover svg, .hub-tabs.in-header .hub-icon-btn:hover svg,
  .hub-tabs.in-header .hub-tab:hover .hub-tab-icon { transform: scale(1.1); }
}
.hub-tabs.in-header .hub-btn-shop { color: #f5c451; }
.hub-tabs.in-header .hub-btn-shop svg { width: 26px; height: 26px; }
.hub-tabs.in-header .hub-tab-label { display: none; }
.hub-tabs.in-header .hub-tab-icon.has-picture { width: 28px; height: 28px; }
.hub-tabs.in-header .hub-tab-icon.has-picture .hub-face { width: 28px !important; height: 28px !important; }
.hub-tabs.in-header .hub-bell-count { top: 3px; right: 4px; }
/* (the page's own Back and gear: the games' round buttons, shared/game-menu.js) */
.profile-back, .profile-gear, .hub-search .hub-btn-back {
  width: 46px; height: 46px; margin: 0; padding: 0; box-sizing: border-box;
  border: 1.5px solid rgba(255, 255, 255, .3); border-radius: 50%;
  background: rgba(10, 18, 28, .78); color: #fff; box-shadow: 0 6px 18px rgba(0, 6, 14, .35);
  transition: transform .12s ease;
}
.profile-back:active, .profile-gear:active, .hub-search .hub-btn-back:active { transform: scale(.9); background: rgba(10, 18, 28, .78); }
/* Home's room open full screen: it has its own top row (mute, Visitors, who lives here) where the
   capsule is, so the capsule fades with the logo and wallet and comes back with the games. */
html.hubTabs.homeReveal main > header > .hub-tabs.in-header { pointer-events: auto; }
html.hubTabs.homeReveal:not(.catalog-open) main > header > .hub-tabs.in-header { opacity: 0; transform: translateY(-16px); pointer-events: none; }
body.roomExpanded main > header .hub-tabs,
html.hubTabs main > header > .hub-tabs.in-header.is-hidden { visibility: hidden; }
/* the Profile page's way back */
.profile-back {
  position: absolute; z-index: 2; top: calc(var(--hub-top) + 8px); left: 16px; display: grid; place-items: center; cursor: pointer;
}

/* ---- Bits, Crystals and the level on the room's top corners, so the header is one row. They fade
   with the logo as the room opens (home-reveal.css); its own buttons take the corners then. */
html.hubTabs main > header { display: block; min-height: 50px; padding-top: 50px; }
html.hubTabs main > header > .head-right { position: static; display: block; width: 0; height: 0; margin: 0; padding: 0; }
html.hubTabs main > header > .head-right > .profile-menu { position: static; width: 0; }
html.hubTabs main > header .hub-wallet { position: absolute; z-index: 4; top: var(--room-corner); right: var(--wallet-right); margin: 0; gap: 5px; }
html.hubTabs main > header { --room-corner: 69px; --wallet-right: 9px; }
/* (the room's zoom buttons are in that corner on a mouse, until Home opens first) */
@media (hover: hover) {
  html.hubTabs:not(.androidHub):not(.homeReveal) main > header { --wallet-right: 48px; }
}
/* (Today beside the room on a wide screen: the room's corner, not the page's: .today's width and its gap) */
html.hubTabs.today-beside main > header .hub-wallet { right: calc(clamp(250px, 27%, 300px) + 14px + var(--wallet-right)); }
html.hubTabs main > header .hub-cur {
  gap: 4px; min-height: 32px; padding: 2px 8px 2px 4px; border-radius: 11px; font-size: 14px;
  background: rgba(18, 17, 26, .84); border-color: rgba(255, 255, 255, .1);
}
html.hubTabs main > header .hub-cur.bits::before { width: 24px; height: 24px; }
html.hubTabs main > header .hub-cur .gem { width: 20px; height: 24px; }
html.hubTabs main > header > .hub-status {
  position: absolute; z-index: 4; top: var(--room-corner); left: 9px; height: 32px; padding: 0 10px; box-sizing: border-box;
  border-radius: 11px; background: rgba(18, 17, 26, .84);
}
html.hubTabs main > header .hub-level { flex: none; width: 96px; }
/* (the card layout: the room in it is played where it is, its own Bits, Crystals and level in those corners, beside its
   buttons, once it's there: index.html, oto-room-status) */
html.hubTabs.room-own-row:not(.homeReveal) main > header .hub-wallet,
html.hubTabs.room-own-row:not(.homeReveal) main > header > .hub-status { visibility: hidden; }
html.hubTabs main > header .hub-level em { display: none; }

/* Android's catalog keeps its status-bar ground. iOS lets the room and covers
   reach the display edge while the fixed menu controls respect --hub-top. */
html.androidHub:not(.iosHub).hubTabs.catalog-open body:not(.playing):not(.launching)::before {
  content: ""; position: fixed; z-index: 11; top: 0; left: 0; right: 0; height: var(--hub-top); background: var(--bg, #1e1f22); pointer-events: none;
}

/* ---- the website, signed out: Sign in where Profile is, and no bell with nothing to ring */
html.hub-signed-out .hub-btn-bell, html.hub-signed-out .hub-tab[data-tab="profile"] { display: none; }
.hub-tabs > .web-login { flex: none; display: inline-flex; align-items: center; height: 36px; margin: 0 3px; padding: 0 14px; border-radius: 18px; font-size: 14px; }
.hub-tabs > .web-login[hidden] { display: none; }

/* ---- Meet Otomates on two lines, clear of her face */
html.hubTabs .today-otomates b { display: block; width: min-content; font-size: 16px; line-height: 1.1; }

/* ---- her ask before Android's own prompt (hub-notify-ask.js), and Settings' Notifications row */
.hub-notify-ask {
  position: fixed; z-index: 1200; inset: 0; display: flex; align-items: flex-end; justify-content: center;
  padding: 16px 16px calc(24px + env(safe-area-inset-bottom, 0px)); box-sizing: border-box; background: rgba(8, 8, 14, .55); font-family: var(--ui-font);
}
.hub-notify-card {
  display: flex; flex-direction: column; align-items: center; gap: 10px; width: min(380px, 100%); padding: 20px 18px 14px; box-sizing: border-box;
  border: 1px solid rgba(255, 255, 255, .13); border-radius: 24px; background: #23232d; color: #fff; text-align: center; box-shadow: 0 12px 32px rgba(0, 0, 0, .45);
}
.hub-notify-card h2 { margin: 0; font: 800 21px/1.2 "Baloo 2", var(--ui-font); }
.hub-notify-card p { margin: 0 0 6px; color: var(--muted, #a6abb3); font-size: 15px; line-height: 1.35; }
.hub-notify-card button { width: 100%; min-height: 46px; border: 0; border-radius: 999px; font: 700 16px var(--ui-font); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.hub-notify-yes { background: linear-gradient(90deg, #3ee6f2, #559bff 48%, #c78aff); color: #10131c; }
.hub-notify-later { background: none; color: var(--muted, #a6abb3); }
.profile-notify {
  display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 10px; border: 0; border-radius: 10px; box-sizing: border-box;
  background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.profile-notify:active { background: rgba(255, 255, 255, .08); }
.profile-notify-state { color: var(--muted, #a6abb3); }

/* ---- Profile's name sheet */
.profile-name-input {
  display: block; box-sizing: border-box; width: 100%; height: 50px; padding: 0 14px; border: 1.5px solid #4f97ff; border-radius: 15px; outline: 0;
  background: #17181b; color: #fff; font: 600 17px var(--ui-font);
}
.profile-name-count { display: block; margin: 6px 2px 0; color: #a6abb3; font: 400 13px var(--ui-font); text-align: right; }
.profile-name-note { min-height: 20px; margin: 4px 2px 12px; color: #ff8a8a; font: 500 14px/1.3 var(--ui-font); }

/* ---- Profile on a wide screen: as wide as Home, her art a card with its buttons on it, and nothing
   to slide (a mouse can't): everyone they own and their games wrap. */
@media (min-width: 761px) {
  .hub-profile { padding-left: max(16px, calc((100vw - 1180px) / 2)); padding-right: max(16px, calc((100vw - 1180px) / 2)); }
  /* (Search and Show All on a wide screen: the page as wide as Home's, covers about the rows' size, as many
     across as fit, not three filling the window) */
  .hub-search { padding-left: max(16px, calc((100vw - 1180px) / 2)); padding-right: max(16px, calc((100vw - 1180px) / 2)); }
  .hub-search-results { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
  .profile-hero { height: min(420px, calc(100vh - 150px)); margin-top: calc(var(--discord-top, 0px) + 16px); border-radius: 24px; background-position: 50% 30%; background-size: cover; }
  .profile-hero::after { inset: 68% 0 0; background: linear-gradient(transparent, rgba(16, 17, 20, .86)); }
  .profile-name, .profile-level { text-shadow: 0 1px 4px rgba(0, 0, 0, .75); }
  .profile-hero.is-plain { background-position: 50% 0; background-size: contain; }
  .profile-back { top: 12px; left: 12px; }
  .profile-gear { top: 12px; right: 12px; }
  .profile-top { left: 20px; right: 430px; bottom: 14px; }
  .profile-buttons { position: relative; z-index: 2; grid-auto-columns: 190px; justify-content: end; margin: -60px 20px 0; pointer-events: none; }
  .profile-buttons .profile-btn { pointer-events: auto; }
  .profile-buttons .profile-btn { background: rgba(15, 16, 19, .84); }
  .hub-profile > .profile-companion, .hub-profile > .profile-popout, .profile-guest { margin-left: 0; margin-right: 0; }
  /* (the buttons above end 16px up inside the picture: the card keeps a gap under it) */
  .hub-profile > .profile-companion { margin-top: 30px; }
  .profile-guest { margin-top: 28px; }
  .profile-section { margin-left: 0; margin-right: 0; margin-top: 28px; }
  .profile-home { grid-template-columns: repeat(4, minmax(0, 200px)); gap: 12px; }
  .profile-home .profile-mate-art, .profile-empty-place { height: 240px; }
  .profile-mates, .profile-played { flex-wrap: wrap; overflow: visible; margin-right: 0; padding-right: 0; }
  .profile-mates { gap: 12px; }
  .profile-mates .profile-mate { flex: 0 0 170px; }
  .profile-mates .profile-mate-art { height: 220px; }
  .profile-played { gap: 12px; }
  .profile-played .portrait-card { flex: 0 0 170px; }
  /* (its sheets: a card in the middle) */
  .profile-sheet { align-items: center; justify-content: center; }
  .profile-sheet-panel { width: 440px; max-width: 100%; border-radius: 22px; }
}


/* ---- Delete account (hub-delete-account.js): Profile's sheet; what goes, then type DELETE */
.profile-sheet.hub-delete { z-index: 1062; }
.delete-gone { list-style: none; margin: 0 0 14px; padding: 8px 12px; border-radius: 16px; background: rgba(255, 255, 255, .05); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); }
.delete-gone li { display: flex; align-items: center; gap: 10px; padding: 6px 0; color: #e6e8ec; font: 500 15px/1.3 var(--ui-font); }
.delete-gone i { flex: none; width: 22px; font-style: normal; text-align: center; }
.hub-delete .profile-btn + .profile-btn { margin-top: 10px; }
/* (the way on is the quiet one: an outline, in Sign out's red) */
.profile-btn.delete-onward { background: transparent; border-color: #5a3a3d; color: #f0a3a3; }
.delete-word { letter-spacing: 1px; text-transform: none; }
.delete-hint { margin: 6px 2px 12px; color: #a6abb3; font: 400 13px var(--ui-font); }
.profile-btn.delete-go { border: 0; background: #e5484d; color: #fff; }
.profile-btn.delete-go:disabled { opacity: .4; }
.delete-note { min-height: 0; margin: 8px 2px 0; }
.delete-note:empty { display: none; }
.delete-cancel { display: block; width: 100%; height: 42px; margin-top: 6px; border: 0; background: none; color: #a6abb3; font: 700 15px var(--ui-font); cursor: pointer; }
