.subpage { min-height: 100vh; background: #0b0d0f; }
.subpage .site-header { position: sticky; }
.subpage .brand { flex: 0 0 auto; }
.subpage nav a[aria-current="page"] { color: var(--gold); }
.portal-main { width: min(calc(100% - 40px), var(--max)); margin: 0 auto; padding: 72px 0 110px; }
.portal-hero { min-height: 520px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, .8fr); align-items: center; gap: 72px; border-bottom: 1px solid var(--line); }
.portal-hero-copy { max-width: 720px; }
.portal-hero h1 { margin-top: 18px; font-size: clamp(3rem, 6vw, 5.6rem); }
.portal-hero h1 em { color: var(--gold); font-style: normal; }
.portal-hero-lead { max-width: 680px; margin: 24px 0 0; color: #b9b6ae; font-size: 1.08rem; }
.portal-actions { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 12px; }
.portal-hero-visual { position: relative; min-height: 400px; padding: 22px; display: grid; place-items: center; border: 1px solid #3b3d40; background: radial-gradient(circle at 75% 15%, rgba(215,166,64,.14), transparent 36%), #0a0c0e; box-shadow: 0 28px 70px rgba(0,0,0,.3); }
.portal-hero-visual::before { content: "CURRENT APPLICATION"; position: absolute; top: 15px; left: 18px; color: var(--cyan); font-size: .65rem; font-weight: 850; letter-spacing: .14em; }
.portal-hero-visual img { max-width: 100%; max-height: 355px; width: auto; height: auto; object-fit: contain; }
.portal-index { margin: 34px 0 0; padding: 0 0 34px; display: flex; flex-wrap: wrap; gap: 10px; border-bottom: 1px solid var(--line); list-style: none; }
.portal-index a { padding: 9px 12px; color: #bbb7ae; border: 1px solid #343638; background: #111416; text-decoration: none; font-size: .78rem; }
.portal-index a:hover { color: white; border-color: var(--gold); }
.feature-category { padding: 92px 0 0; scroll-margin-top: 104px; }
.feature-category-heading { max-width: 790px; margin-bottom: 34px; }
.feature-category-heading h2 { font-size: clamp(2.35rem, 4.6vw, 4rem); letter-spacing: -.035em; }
.feature-category-heading > p:last-child { margin: 18px 0 0; color: var(--muted); }
.portal-feature-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.portal-feature-card { min-width: 0; display: grid; grid-template-rows: minmax(310px, auto) 1fr; border: 1px solid #303235; background: linear-gradient(145deg, #16191c, #0e1012); }
.portal-feature-card.wide { grid-column: 1 / -1; grid-template-columns: 1.25fr .75fr; grid-template-rows: auto; }
.portal-shot { min-height: 310px; padding: 20px; display: grid; place-items: center; border: 0; border-bottom: 1px solid #292c2e; background: #090b0d; cursor: zoom-in; }
.portal-feature-card.wide .portal-shot { border-right: 1px solid #292c2e; border-bottom: 0; }
.portal-shot img { max-width: 100%; max-height: 410px; width: auto; height: auto; object-fit: contain; }
.portal-feature-copy { padding: 28px 30px 32px; }
.portal-feature-copy > span { color: var(--cyan); font-size: .67rem; font-weight: 850; letter-spacing: .13em; }
.portal-feature-copy h3 { margin-top: 14px; color: #ead9b2; font-size: 1.55rem; line-height: 1.25; }
.portal-feature-copy p { margin: 13px 0 0; color: #9d9991; font-size: .91rem; }
.portal-feature-copy ul { margin: 18px 0 0; padding: 0; display: grid; gap: 8px; color: #b7b2a8; list-style: none; font-size: .83rem; }
.portal-feature-copy li::before { content: "✓"; margin-right: 9px; color: var(--gold); }
.portal-cta { margin-top: 94px; padding: 46px 50px; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 38px; border: 1px solid #514124; background: radial-gradient(circle at 100% 0, rgba(215,166,64,.12), transparent 42%), #111416; }
.portal-cta h2 { font-size: clamp(2rem, 4vw, 3.2rem); }
.portal-cta p { max-width: 690px; margin: 14px 0 0; color: var(--muted); }

.account-main { padding-top: 54px; }
.account-hero { min-height: 330px; grid-template-columns: 1fr; border-bottom: 0; }
.account-hero h1 { max-width: 850px; }
.account-layout { display: grid; grid-template-columns: minmax(280px, .68fr) minmax(0, 1.32fr); gap: 20px; align-items: start; }
.account-context, .account-portal-card { border: 1px solid #333537; background: linear-gradient(145deg, #15181b, #0d0f11); }
.account-context { padding: 34px; position: sticky; top: 112px; }
.account-context h2 { font-size: 2rem; }
.account-context > p { color: var(--muted); }
.account-benefits { margin: 28px 0 0; padding: 0; display: grid; gap: 15px; list-style: none; }
.account-benefits li { padding: 14px 0 14px 38px; position: relative; border-top: 1px solid #292c2e; color: #c5c0b6; font-size: .88rem; }
.account-benefits li::before { content: "✓"; position: absolute; left: 4px; top: 13px; color: var(--cyan); font-weight: 800; }
.account-context .support-note { margin-top: 28px; padding: 16px; color: #a9a59c; border: 1px solid #3c3427; background: rgba(215,166,64,.045); font-size: .8rem; }
.account-context .support-note a { color: var(--gold); }
.account-portal-card { min-width: 0; padding: 30px; }
.auth-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; padding-bottom: 22px; border-bottom: 1px solid #2c2f31; }
.auth-tab { min-height: 44px; padding: 10px; color: #aaa69e; border: 1px solid #333638; background: #0b0d0f; font: 750 .78rem/1 Inter, "Segoe UI", sans-serif; cursor: pointer; }
.auth-tab[aria-selected="true"] { color: #17120a; border-color: var(--gold); background: var(--gold); }
.auth-view { padding-top: 28px; }
.auth-view[hidden] { display: none; }
.auth-view h2 { font-size: 2rem; }
.auth-view > p { margin: 10px 0 24px; color: var(--muted); }
.portal-form { display: grid; gap: 17px; }
.portal-form label { display: grid; gap: 7px; color: #aaa69e; font-size: .8rem; }
.portal-form input { min-height: 48px; width: 100%; padding: 11px 13px; color: var(--text); border: 1px solid #3c3e40; border-radius: 2px; background: #0b0d0f; font: inherit; }
.portal-form input:focus { border-color: var(--cyan); outline: 0; box-shadow: 0 0 0 2px rgba(68,216,244,.12); }
.portal-form .form-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: end; }
.portal-form .form-row .button { min-width: 190px; }
.portal-form button:disabled { opacity: .55; cursor: wait; }
.account-message { min-height: 24px; margin: 20px 0 0; color: #d9c698; font-size: .85rem; }
.account-message.error { color: #ff817a; }
.portal-dashboard { display: grid; gap: 18px; }
.portal-dashboard[hidden], .portal-auth[hidden], .auth-view[hidden], [hidden] { display: none !important; }
.portal-summary { display: grid; grid-template-columns: 1.2fr 1fr; gap: 12px; }
.portal-summary article { min-width: 0; padding: 20px; border: 1px solid #303235; background: #090b0d; }
.portal-summary span { display: block; color: #77746d; font-size: .65rem; font-weight: 850; letter-spacing: .13em; }
.portal-summary strong { display: block; margin-top: 9px; overflow: hidden; color: #e8d7b1; font-size: 1.05rem; text-overflow: ellipsis; }
.portal-summary small { display: block; margin-top: 5px; color: #969189; }
.dashboard-actions { display: flex; justify-content: flex-end; gap: 10px; }
.dashboard-section { padding: 24px; border: 1px solid #303235; background: #090b0d; }
.dashboard-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.dashboard-heading h2 { font-size: 1.75rem; }
.dashboard-heading button { padding: 8px 12px; color: var(--cyan); border: 1px solid #343638; background: transparent; cursor: pointer; }
.portal-history { margin-top: 17px; display: grid; gap: 9px; }
.portal-history-empty { margin-top: 17px; padding: 20px; color: #77746d; border: 1px dashed #343638; text-align: center; }
.portal-history-item { padding: 14px 16px; display: grid; grid-template-columns: 1fr auto; gap: 10px; border: 1px solid #2b2e30; background: #121416; }
.portal-history-item strong, .portal-history-item span { display: block; }
.portal-history-item strong { color: #d9c698; }
.portal-history-item span, .portal-history-item time { color: #8f8b83; font-size: .78rem; }
.account-footer { margin-top: 76px; }

@media (max-width: 900px) {
  .portal-hero { grid-template-columns: 1fr; gap: 40px; padding-bottom: 64px; }
  .portal-hero-visual { order: -1; }
  .account-hero { display: block; min-height: 0; padding: 40px 0 54px; }
  .account-layout { grid-template-columns: 1fr; }
  .account-context { position: static; }
  .portal-feature-card.wide { grid-template-columns: 1fr; }
  .portal-feature-card.wide .portal-shot { border-right: 0; border-bottom: 1px solid #292c2e; }
  .portal-cta { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .portal-main { width: min(calc(100% - 28px), var(--max)); padding-top: 36px; }
  .portal-hero { min-height: 0; }
  .portal-hero-visual { min-height: 290px; padding: 18px; }
  .portal-hero-visual img { max-height: 255px; }
  .portal-feature-grid { grid-template-columns: 1fr; }
  .portal-feature-card.wide { grid-column: auto; }
  .portal-shot { min-height: 250px; padding: 14px; }
  .portal-feature-copy { padding: 22px; }
  .portal-cta { padding: 32px 24px; }
  .portal-cta .button { width: 100%; }
  .account-context, .account-portal-card { padding: 22px; }
  .auth-tabs { grid-template-columns: 1fr; }
  .portal-form .form-row { grid-template-columns: 1fr; }
  .portal-form .form-row .button { width: 100%; }
  .portal-summary { grid-template-columns: 1fr; }
  .dashboard-actions { display: grid; }
  .portal-history-item { grid-template-columns: 1fr; }
}

.portal-game-nav { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 24px; }
.portal-game-nav a { display: inline-flex; padding: 10px 16px; border: 1px solid var(--line); color: #d0cbc1; text-decoration: none; background: #141618; }
.portal-game-nav a:hover, .portal-game-nav a[aria-current="page"] { border-color: var(--gold); color: #f3ddb0; }
.portal-feature-card.feature-text { grid-template-rows: auto; }
.portal-feature-card.feature-text h3 { margin-top: 0; }
