.hub {
  --paper: #151516;
  --surface: #222325;
  --edge: #393a3d;
  --text: #f4f3ee;
  --quiet: #bdbebb;
  --accent: #f5bb70;
  min-height: 100dvh;
  color: var(--text);
  background: var(--paper);
}
.hub-header {
  min-height: 64px;
  padding: 10px clamp(16px, 3vw, 42px);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: clamp(10px, 2vw, 30px);
  background: #1b1c1d;
  border-bottom: 1px solid var(--edge);
}
.hub .wordmark { font-size: 25px; letter-spacing: -.065em; }
.hub .brand-suffix { color: var(--accent); }
.hub-account > div, .hub-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.hub-primary, .hub-secondary, .hub-white, .hub-glass {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 15px;
  border: 1px solid var(--edge);
  border-radius: 7px;
  font: 650 14px/1.3 "DM Sans", system-ui, sans-serif;
  text-decoration: none;
}
.hub-primary { background: var(--accent); color: #272018; border-color: var(--accent); }
.hub-secondary { background: #292a2c; color: var(--text); }
.hub-white { background: #f5bb70; color: #2b2115; border-color: transparent; }
.hub-glass { background: #303133; color: #f0f0ea; border-color: #595a5a; }
.hub a:hover { filter: brightness(1.09); }
.hub-layout { min-height: calc(100dvh - 65px); }
.hub-nav {
  min-width: 0;
  display: flex;
  align-items: center;
  align-self: stretch;
  gap: 3px;
  overflow-x: auto;
  scrollbar-width: thin;
}
.hub-account { margin-left: auto; flex: none; }
.hub-nav button {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: none; white-space: nowrap;
  min-height: 40px;
  padding: 8px 12px;
  font-size: 15px;
  color: var(--quiet);
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
}
.hub-nav i { width: 18px; text-align: center; }
.hub-nav [aria-current=page] { color: #f6cc95; background: #393735; border-color: #555049; }

.hub-main { margin: 0 auto; min-width: 0; width: 100%; max-width: 1240px; padding: 28px clamp(18px, 3.4vw, 50px) 60px; }
.hub-title, .section-head, .manage-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.hub-title { margin-bottom: 22px; }
.hub-title h1 { font: 750 clamp(33px, 3.5vw, 48px)/1.12 var(--display); letter-spacing: -.055em; }
.hub-title .hub-primary span { font-size: 19px; line-height: 1; }
.spotlight {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr);
  align-items: center;
  min-height: clamp(252px, 25vw, 326px);
  border: 1px solid #3a3b3c;
  border-radius: 12px;
  background: #222323;
}
.spotlight::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(100deg, #202121 24%, transparent 70%),
    repeating-linear-gradient(18deg, transparent 0 34px, #acafa41b 34px 35px),
    repeating-linear-gradient(109deg, transparent 0 34px, #acafa41b 34px 35px);
}
.spotlight-copy { padding: clamp(22px, 3.2vw, 42px); }
.spotlight-label { display: inline-flex; align-items: center; gap: 7px; color: #d8cfbf; font-size: 13px; font-weight: 650; }
.spotlight-label i { color: var(--accent); font-size: 12px; }
.spotlight h2 { color: #f7f6f0; font-size: clamp(38px, 4.6vw, 62px); margin: 10px 0 12px; letter-spacing: -.055em; }
.spotlight-copy p { color: #cbccc6; max-width: 36ch; line-height: 1.55; font-size: 15px; margin-bottom: 21px; }
.spotlight-map { justify-self: center; width: 97%; height: clamp(226px, 24vw, 314px); object-fit: contain; padding: 4px 12px 4px 0; }
.section-head { margin: 25px 0 12px; }
.section-head h2, .hub-form h2, #lesson-content h2 { font-size: 25px; }
.game-search { display: flex; align-items: center; color: var(--quiet); gap: 7px; padding: 0 10px; border: 1px solid var(--edge); background: #1b1c1d; border-radius: 7px; }
.game-search input[type=search] { min-height: 36px; width: min(155px, 24vw); border: 0; background: transparent; padding: 5px; font-size: 14px; }
.hub-tabs { display: flex; align-items: center; gap: 6px; margin-bottom: 15px; }
.hub-tabs button { border-radius: 20px; padding: 6px 12px; font-size: 13px; background: transparent; color: var(--quiet); border: 1px solid var(--edge); }
.hub-tabs [aria-pressed=true] { background: #e6e4de; color: #23272b; border-color: transparent; }
.catalog-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(300px,100%),1fr)); gap: 14px; }
.catalog-card { position: relative; display: block; overflow: hidden; border: 1px solid var(--edge); border-radius: 9px; background: var(--surface); color: var(--text); text-decoration: none; }
.catalog-art { height: 100px; overflow: hidden; background: #303133; }
.catalog-art img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 75%; }
.catalog-details { padding: 11px 32px 13px 13px; }
.catalog-details strong, .catalog-details small { display: block; overflow-wrap: anywhere; }
.catalog-details small, .manage-title small, .hub-intro, .hub-empty, #profile-counts, #prefs-status { color: var(--quiet); font-size: 14px; }
.card-arrow { position: absolute; right: 12px; bottom: 18px; color: var(--accent); }
.generated-cover { display: grid; place-items: center; color: #fff; background-color: hsl(var(--cover-hue) 26% 29%); background-image: linear-gradient(35deg, transparent 52%,#ffffff19 52%,#ffffff19 68%,transparent 68%); }
.generated-cover span { font: 800 44px/.95 var(--display); }
.hub-intro { margin-bottom: 22px; max-width: 65ch; }
.hub-empty { grid-column: 1/-1; margin: 10px 0; }
.manage-list { display: grid; gap: 10px; justify-items: stretch; }
.manage-list > button { justify-self: start; }
.manage-row, .hub-form, .tutorial-layout { background: var(--surface); border: 1px solid var(--edge); border-radius: 10px; }
.manage-row { padding: 15px 18px; flex-wrap: wrap; }
.manage-title { min-width: 0; }
.manage-title h2 { font-size: 20px; margin-bottom: 4px; overflow-wrap: anywhere; }
.hub-form { max-width: 600px; padding: clamp(18px,3vw,29px); }
.hub-form input, .hub-form textarea, .hub-form select { background-color: var(--paper); }
.hub-form > button, .hub-form .hub-actions { margin-top: 14px; }
.hub-form p[role=status]:not(:empty) { margin-top: 12px; font-size: 14px; }
.hub-form .grid-choice { display: flex; align-items: center; gap: 9px; min-height: 44px; }
.grid-choice input { accent-color: var(--accent); width: 18px; height: 18px; }
.profile-identity { display: flex; gap: 13px; align-items: center; margin-bottom: 22px; }
#avatar-letter { display: grid; place-items:center; width: 52px; height:52px; background: #49433b; color: #f7d4a2; border-radius: 12px; font: 700 27px/1 var(--display); }
.tutorial-layout { display: grid; grid-template-columns: minmax(145px, .7fr) minmax(0, 1.7fr); }
#lessons { display: flex; flex-direction: column; gap: 4px; padding: 12px; border-right: 1px solid var(--edge); }
.lesson-select { min-height: 42px; padding: 8px 12px; text-align:left; background: transparent; border-color: transparent; color:var(--quiet); }
.lesson-select[aria-pressed=true] { background:#40403e; color:#eee9e3; }
#lesson-content { padding:clamp(18px,3vw,32px); }
.lesson-step { color: var(--accent); font-size:13px; }
#lesson-content h2 { margin: 9px 0; }
#lesson-content p { margin: 12px 0 22px; line-height:1.65; color:#d0d0ca; }
#hub-error { color:#ffc2b8; margin: 8px 0 16px; }
.account-dialog { width:min(410px,calc(100% - 24px)); max-height:calc(100dvh - 90px); overflow:auto; inset: 65px 14px auto auto; margin:0; padding:0; border:1px solid #515254; border-radius:12px; background:#2b2c2d; color:#f7f7ef; box-shadow:0 18px 60px #0009; }
.account-dialog::backdrop { background:#16171899; }
.account-dialog .account-card { border:0; border-radius:0; background:transparent; padding:24px; }
.account-dialog .account-card h2 { font-size:28px; }
.account-dialog .auth-tabs { padding-right:24px; }
.close-dialog { position:absolute; right:10px; top:10px; width:34px; height:34px; font-size:23px; background:transparent; border:0; }
.account-dialog .button-primary { background:#f5bb70; color:#272018; }
@media (max-width:1100px) {
  .hub-header { flex-wrap: wrap; gap: 6px 14px; }
  .hub-nav { order: 3; flex: 0 0 100%; }
}
@media (max-width:850px) {

  .hub-nav button { gap:8px; padding:8px; }
}
@media (max-width:650px) {
  .hub-header { min-height:58px; padding:8px 12px; }
  .hub-layout { min-height:0; }
  .hub-nav { gap:3px; }
  .hub-nav button { flex:none; min-height:38px; font-size:14px; }
  .nav-rule { display:none; }
  .hub-main { padding:19px 14px 40px; }
  .hub-title { margin-bottom:14px; }
  .hub .wordmark { font-size:21px; }
  .hub .builder-mark { width:30px; height:30px; }
  .hub-account button { min-height:38px; padding:6px 10px; font-size:13px; }
  #account-name { display:block; max-width:28vw; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .spotlight-copy p { font-size:13px; margin-bottom:13px; }
  .spotlight-copy .hub-actions { gap:5px; }
  .spotlight-copy .hub-actions > * { padding:7px 10px; min-height:37px; font-size:13px; }
  .catalog-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; }
  .catalog-art { height:80px; }
  .section-head h2 { font-size:22px; }
  .game-search input[type=search] { width:102px; }
  .tutorial-layout { display:block; }
  #lessons { flex-direction:row; overflow:auto; border-right:0; border-bottom:1px solid var(--edge); }
  .lesson-select { flex:none; }
  .account-dialog { inset:60px 10px auto auto; }
}

button.catalog-card { padding: 0; text-align: left; font: inherit; }
.blank-cover {
  display: grid;
  place-items: center;
  color: #e1c392;
  background-color: #353632;
  background-image: linear-gradient(#b9b9a72e 1px,transparent 1px), linear-gradient(90deg,#b9b9a72e 1px,transparent 1px);
  background-size: 16px 16px;
}
.blank-cover span { border: 2px dashed #bcac8f; width: 44px; text-align: center; font-size: 27px; }
.guide-all { color: var(--accent); background: transparent; border: none; padding: 8px 0; }
.guide-links { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.guide-links button { display: flex; align-items: center; gap: 12px; padding: 15px; text-align: left; font-size: 15px; color: var(--text); border-color: var(--edge); background: var(--surface); }
.guide-links i { color: var(--accent); }
.guide-links button:nth-child(2) i { color: var(--accent); }
.guide-links button:nth-child(3) i { color: var(--accent); }
.guide-links span { margin-left: auto; color: var(--quiet); }
@media (max-width:800px) { .guide-links { grid-template-columns:1fr; gap:6px; } .guide-links button { padding:10px 12px; } }

.hub .brand-suffix, .studio-brand .brand-suffix { color: #b7b7b1; font-weight: 550; }
.hub .hub-title { margin-bottom: 18px; }
.hub-title h1 { font-size: clamp(32px, 3.4vw, 46px); }
.hub .catalog-card { display: grid; grid-template-columns: min(38%, 165px) 1fr; align-items: center; }
.catalog-art { height: 98px; }
.catalog-details { padding-inline: 16px 26px; }
.catalog-details strong { font-size: 18px; line-height: 1.3; margin-bottom: 4px; }
.card-arrow { bottom: auto; top: 50%; transform: translateY(-50%); }
.blank-cover span { transform: skewY(-10deg); border-radius: 4px; background: #42423b; box-shadow: 3px 4px #252626; }
.guide-links button { border-radius: 7px; }
@media (max-width: 650px) {
  .spotlight { display: flex; flex-direction: column-reverse; align-items: stretch; }
  .spotlight-map { width: 100%; height: clamp(155px, 42vw, 205px); padding: 8px 14px 0; }
  .spotlight-copy { padding: 8px 20px 19px; }
  .spotlight h2 { margin: 5px 0 6px; }
  .spotlight-copy p { max-width: 42ch; margin-bottom: 12px; }
  .hub .catalog-card { display: block; }
  .catalog-art { height: 80px; }
  .catalog-details { padding: 10px 18px 12px 10px; }
  .catalog-details strong { font-size: 16px; }
  .catalog-details small { font-size: 12px; }
  .card-arrow { top: auto; bottom: 12px; right: 8px; transform: none; }
}
