/* Player-facing shell. Staff tools keep their existing control-panel layout. */
body.player-portal {
  --portal-ink: #eef0ed;
  --portal-muted: #a4adaf;
  --portal-line: rgba(225, 235, 232, .13);
  --portal-glass: rgba(18, 25, 28, .76);
  --portal-amber: #e2b985;
  --portal-cyan: #9fc6d0;
  color: var(--portal-ink);
  background:
    radial-gradient(ellipse at 50% -30%, rgba(53, 83, 94, .26), transparent 52%),
    #0a0e10;
}

body.player-portal .app { display: block; min-height: 100vh; }
body.player-portal .sidebar { display: none; }
body.player-portal .main { min-width: 0; margin-left: 0; }
body.player-portal .breadcrumb { display: none; }

.shop-intro>div{max-width:720px}
.shop-intro>div>p{margin:10px 0 0;color:var(--portal-muted);line-height:1.65}
.capsule-shop-panel,.capsule-history-panel{display:grid;gap:16px;margin-top:16px}
.capsule-shop-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}
.capsule-shop-heading h3{margin:5px 0 0;font-size:18px}
.capsule-character-select{display:grid;max-width:460px;gap:7px;color:var(--portal-muted);font-size:13px}
.capsule-character-select select{min-height:44px;padding:10px 12px;border:1px solid var(--portal-line);border-radius:8px;background:#111719;color:var(--portal-ink);font:inherit}
.capsule-shop-panel>.shop-notice{margin:0;padding:12px 14px;border:1px solid var(--portal-line);border-radius:8px;color:var(--portal-muted);line-height:1.5}
.capsule-shop-panel>.capsule-shop-disabled{border-color:rgba(235,153,117,.35);color:#efb39b}
.capsule-offers{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px}
.capsule-offer-card{display:flex;min-height:112px;flex-direction:column;justify-content:space-between;gap:14px;padding:16px;border:1px solid var(--portal-line);border-radius:10px;background:rgba(18,25,28,.8)}
.capsule-offer-copy h4{margin:0;color:var(--portal-ink);font-size:16px}
.capsule-offer-copy p{margin:7px 0 0;color:var(--portal-muted);font-size:13px}
.capsule-buy-button{width:100%;min-height:42px}
.capsule-test-admin-panel{display:grid;gap:16px}
.capsule-test-access-form{display:grid;grid-template-columns:minmax(220px,1fr) auto;align-items:end;gap:12px}
.capsule-test-access-form label{display:grid;gap:6px;color:var(--portal-muted,var(--muted));font-size:12px}
.capsule-test-access-form input{min-height:40px;padding:9px 11px;border:1px solid var(--portal-line,var(--border));border-radius:7px;background:#111719;color:var(--portal-ink,var(--text));font:inherit}
.capsule-test-access-form .form-message{grid-column:1/-1;margin:0}
.capsule-test-access-list-panel{padding-top:12px;border-top:1px solid var(--portal-line,var(--border))}
.capsule-test-access-list-panel>.panel-header h3{margin:0;font-size:15px}
.capsule-test-access-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 0;border-top:1px solid var(--portal-line,var(--border))}
.capsule-test-access-copy{display:grid;gap:5px;min-width:0}
.capsule-test-access-copy strong{color:var(--portal-ink,var(--text))}
.capsule-test-access-copy small{color:var(--portal-muted,var(--muted))}
.capsule-checkout{padding:15px;border:1px solid rgba(226,185,133,.4);border-radius:9px;background:rgba(226,185,133,.07)}
.capsule-checkout-copy{display:flex;flex-wrap:wrap;align-items:center;gap:10px 16px}
.capsule-checkout-copy strong{color:var(--portal-ink)}
.capsule-checkout-copy p{flex:1 1 100%;margin:0;color:var(--portal-muted)}
.capsule-checkout-copy small{color:var(--portal-muted);overflow-wrap:anywhere}
.capsule-order-row{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:15px 0;border-top:1px solid var(--portal-line)}
.capsule-order-copy{display:flex;min-width:0;flex-wrap:wrap;align-items:center;gap:8px 12px}
.capsule-order-copy strong{color:var(--portal-ink)}
.capsule-order-copy small,.capsule-order-copy p{flex-basis:100%;margin:0;color:var(--portal-muted);line-height:1.5}
.capsule-order-copy .button{flex:0 0 auto}
@media(max-width:600px){.capsule-order-row{align-items:flex-start;flex-direction:column}.capsule-order-row>.button{width:100%}.capsule-offers{grid-template-columns:1fr 1fr;gap:8px}.capsule-offer-card{padding:12px}.capsule-offer-copy h4{font-size:14px}.capsule-test-access-form{grid-template-columns:1fr}.capsule-test-access-form .button{width:100%}.capsule-test-access-row{align-items:flex-start;flex-direction:column}.capsule-test-access-row .button{width:100%}}

body.player-portal .topbar {
  position: sticky;
  z-index: 30;
  top: 0;
  display: grid;
  grid-template-columns: minmax(155px, 205px) minmax(0, 1fr) auto;
  gap: 20px;
  height: 76px;
  padding: 0 clamp(20px, 5vw, 72px);
  border-bottom: 1px solid rgba(223, 233, 232, .12);
  background: rgba(10, 15, 18, .82);
  box-shadow: 0 10px 32px rgba(0, 0, 0, .18);
  -webkit-backdrop-filter: blur(18px) saturate(130%);
  backdrop-filter: blur(18px) saturate(130%);
}

.portal-brand {
  display: none;
  align-items: center;
  justify-self: start;
  gap: 10px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--portal-ink);
  text-align: left;
  cursor: pointer;
}

.portal-brand img { display: block; width: auto; max-width: 195px; height: 50px; object-fit: contain; filter: drop-shadow(0 2px 8px rgba(0, 0, 0, .45)); }
.portal-brand span { font-size: 14px; font-weight: 650; letter-spacing: .13em; }
.portal-brand b { color: var(--portal-amber); }
.portal-brand small { display: block; margin-top: 4px; color: #899699; font-size: 8px; letter-spacing: .2em; }

.portal-nav { display: none; align-items: center; justify-content: center; gap: 4px; min-width: 0; }
body.player-portal .portal-brand { display: inline-flex; }
body.player-portal .portal-nav { display: flex; }
.portal-nav .nav {
  width: auto;
  min-height: 40px;
  margin: 0;
  padding: 8px 12px;
  border: 1px solid transparent;
  border-radius: 5px;
  color: #aab3b4;
  font-size: 12px;
  font-weight: 550;
  white-space: nowrap;
}
.portal-nav .nav:hover { border-color: rgba(226, 236, 232, .13); background: rgba(222, 235, 231, .06); color: #fff; }
.portal-nav .nav.active { border-color: rgba(226, 185, 133, .25); background: rgba(226, 185, 133, .09); color: #f3d4ad; }
.portal-nav .nav span { display: none; }

body.player-portal .top-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; min-width: max-content; }
body.player-portal .top-actions .button { min-height: 40px; padding: 8px 14px; border-radius: 5px; font-size: 12px; }
body.player-portal #register-button { border-color: #e5c79f; background: #d9b58a; color: #211a13; }
body.player-portal #register-button:hover { border-color: #f0d1aa; background: #f0d1aa; }
body.player-portal #auth-button { border-color: rgba(230, 240, 237, .18); color: #e3e9e7; }
body.player-portal .signed-in-id { max-width: 130px; overflow: hidden; color: #c0c9c7; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
body.player-portal .avatar { width: 40px; height: 40px; border: 1px solid rgba(226, 185, 133, .48); border-radius: 50%; background: rgba(224, 186, 140, .12); color: #f1d8b8; }
.portal-menu-toggle { display: none; }

body.player-portal #content { max-width: 1240px; padding: 0 clamp(18px, 5vw, 64px) 72px; }
body.player-portal .page-heading { margin: 22px 0 18px; }
body.player-portal .page-heading h1 { color: #edf1ef; }
body.player-portal .page-heading p { color: var(--portal-muted); }
body.player-portal[data-page="overview"] .page-heading { display: none; }
body.player-portal .refresh { border-color: var(--portal-line); color: #c2ccca; }

.portal-hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: clamp(390px, 42vw, 520px);
  margin: 24px 0 26px;
  padding: clamp(34px, 5.5vw, 68px);
  overflow: hidden;
  border: 1px solid rgba(224, 236, 233, .16);
  border-radius: 8px;
  background: #101719;
  box-shadow: 0 28px 70px rgba(0, 0, 0, .28), inset 0 1px rgba(255, 255, 255, .08);
}
.portal-hero::before {
  position: absolute;
  z-index: 1;
  inset: 0;
  background: linear-gradient(90deg, #0b1114 0%, rgba(11, 17, 20, .97) 25%, rgba(11, 17, 20, .76) 46%, rgba(11, 17, 20, .14) 100%), linear-gradient(0deg, rgba(7, 11, 13, .46), transparent 52%);
  content: "";
  pointer-events: none;
}
.hero-visual { position: absolute; z-index: 0; inset: 0 0 0 auto; width: 79%; overflow: hidden; }
.hero-visual img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 58% center;
  opacity: .88;
  transform: translate3d(var(--parallax-x, 0px), var(--parallax-y, 0px), 0) scale(1.035);
  transition: transform 360ms cubic-bezier(.2, .7, .2, 1);
  will-change: transform;
}
.hero-copy { position: relative; z-index: 2; max-width: 570px; }
.hero-kicker, .eyebrow { color: #dfbc92; font-size: 10px; font-weight: 700; letter-spacing: .2em; }
.hero-kicker { display: inline-flex; align-items: center; gap: 10px; }
.hero-kicker::before { width: 24px; height: 1px; background: #dbad77; content: ""; }
.hero-copy h1 { margin: 20px 0 16px; color: #f4f3ed; font-size: clamp(38px, 5.2vw, 66px); font-weight: 640; line-height: .98; letter-spacing: -.055em; }
.hero-copy h1 span { color: #dfbc92; }
.hero-copy p { max-width: 440px; margin: 0; color: #c4cdcb; font-size: 15px; line-height: 1.7; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 27px; }
.hero-actions .button { min-height: 46px; padding: 11px 18px; border-radius: 5px; font-size: 12px; }
body.player-portal .hero-actions .button.primary { border-color: #d9b58a; background: #d9b58a; color: #1a1b19; }
body.player-portal .hero-actions .button.primary:hover { border-color: #f0d1aa; background: #f0d1aa; }
body.player-portal .hero-actions .button.outline { border-color: rgba(236, 242, 239, .28); background: rgba(16, 23, 26, .28); color: #f1f2ed; }
.hero-coordinate { position: absolute; z-index: 2; right: 22px; bottom: 18px; color: rgba(232, 238, 235, .7); font-size: 9px; letter-spacing: .17em; text-shadow: 0 2px 8px #000; }

.faction-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0 0 32px; }
.faction-card {
  position: relative;
  min-height: 172px;
  overflow: hidden;
  border: 1px solid rgba(222, 235, 231, .14);
  border-radius: 6px;
  background: #141b1e;
  box-shadow: inset 0 1px rgba(255, 255, 255, .05);
}
.faction-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 34%; opacity: .7; transition: transform 450ms ease, opacity 450ms ease; }
.faction-card::after { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(7, 11, 13, .96), rgba(7, 11, 13, .05) 78%); content: ""; }
.faction-card:hover img { opacity: .86; transform: scale(1.045); }
.faction-copy { position: absolute; z-index: 1; right: 16px; bottom: 14px; left: 16px; }
.faction-copy small { display: block; margin-bottom: 4px; color: #d8b48b; font-size: 9px; letter-spacing: .17em; }
.faction-copy strong { color: #f0f1ec; font-size: 16px; letter-spacing: .02em; }
.faction-copy p { margin: 4px 0 0; color: #b8c0be; font-size: 11px; }

body.player-portal .account-panel,
body.player-portal .quick-panel,
body.player-portal .ranking-panel,
body.player-portal .download-card {
  border-color: var(--portal-line);
  border-radius: 7px;
  background: var(--portal-glass);
  box-shadow: inset 0 1px rgba(255, 255, 255, .045), 0 16px 40px rgba(0, 0, 0, .12);
  -webkit-backdrop-filter: blur(12px) saturate(115%);
  backdrop-filter: blur(12px) saturate(115%);
}
body.player-portal .account-panel .panel-header h2,
body.player-portal .quick-panel .panel-header h2 { color: #e9eeeb; font-size: 13px; }
body.player-portal .panel-header .pill { border-color: rgba(226, 185, 133, .2); background: rgba(226, 185, 133, .07); color: #d9bd9b; }
body.player-portal .lower-grid { gap: 14px; margin-bottom: 28px; }
body.player-portal .footer .footer-player { display: inline; color: #879493; }
body.player-portal .footer .footer-build { display: none; }
body.player-portal .account-info dt { color: #99a5a5; }
body.player-portal .account-info dd { color: #eff2ef; }
body.player-portal .quick-link { border-color: rgba(225, 236, 232, .1); color: #e3e9e6; }
body.player-portal .quick-link:hover { border-color: rgba(224, 185, 137, .35); background: rgba(226, 185, 133, .055); }
body.player-portal .quick-link small { color: #98a5a5; }

body.player-portal .panel { border-color: var(--portal-line); border-radius: 7px; background: rgba(19, 26, 29, .84); }
body.player-portal .panel-header h2 { color: #e8eeeb; }
body.player-portal .subtle, body.player-portal .field-help { color: #a6b0af; }
body.player-portal input, body.player-portal textarea, body.player-portal select { border-color: rgba(222, 235, 231, .17); border-radius: 5px; background: rgba(8, 13, 16, .72); color: #edf1ee; }
body.player-portal input:focus, body.player-portal textarea:focus, body.player-portal select:focus { border-color: rgba(220, 184, 139, .72); outline: 2px solid rgba(220, 184, 139, .2); }
body.player-portal :focus-visible { outline: 2px solid #e4bf93; outline-offset: 3px; }
body.player-portal table th { color: #abb6b4; }
body.player-portal table td { color: #e1e8e5; }
body.player-portal .ranking-heading { position: relative; min-height: 62px; overflow: hidden; }
body.player-portal .ranking-heading::after { position: absolute; top: -40px; right: 0; width: 210px; height: 150px; background: linear-gradient(90deg, #131a1d 0%, transparent 68%), url('/assets/rf-online-10/accretia-bellato-cora.webp') center 44% / cover no-repeat; opacity: .38; content: ""; pointer-events: none; }
body.player-portal .ranking-heading > * { position: relative; z-index: 1; }
body.player-portal #download .download-card { position: relative; isolation: isolate; min-height: 390px; overflow: hidden; padding: clamp(26px, 5vw, 52px); }
body.player-portal #download .download-card::before { position: absolute; z-index: -1; inset: 0; background: linear-gradient(90deg, rgba(12, 18, 20, .98), rgba(12, 18, 20, .82) 48%, rgba(12, 18, 20, .22)), url('/assets/rf-online-10/accretia-launcher.webp') 78% center / cover no-repeat; content: ""; }
body.player-portal #download .download-logo { border-color: rgba(227, 190, 147, .38); background: rgba(214, 174, 128, .12); color: #e8c69c; }
body.player-portal #download .download-card h2 { color: #f1f2ed; font-size: clamp(28px, 4vw, 42px); letter-spacing: -.03em; }
body.player-portal #download .download-card .field-help { max-width: 360px; }

body.player-portal #auth-dialog { border: 1px solid rgba(223, 237, 235, .2); border-radius: 8px; background: rgba(17, 25, 29, .86); box-shadow: 0 32px 100px rgba(0, 0, 0, .56), inset 0 1px rgba(255, 255, 255, .07); -webkit-backdrop-filter: blur(22px) saturate(125%); backdrop-filter: blur(22px) saturate(125%); }
body.player-portal #auth-dialog::backdrop { background: rgba(3, 8, 10, .72); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
body.player-portal .auth-art { background-image: linear-gradient(0deg, rgba(7, 11, 13, .9), rgba(7, 11, 13, .03) 70%), url('/assets/rf-online-10/cora-force-mage.webp'); background-position: center 34%; }
body.player-portal .auth-content { background: rgba(17, 25, 29, .78); }
body.player-portal .auth-content input { background: rgba(4, 10, 13, .62); }

@media (max-width: 900px) {
  body.player-portal .topbar { grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; height: 68px; padding: 0 20px; }
  .portal-nav { justify-content: flex-end; }
  .portal-nav .nav { padding-right: 9px; padding-left: 9px; font-size: 11px; }
  body.player-portal #content { padding-right: 22px; padding-left: 22px; }
  .portal-hero { min-height: 420px; }
  .hero-visual { width: 84%; }
}

@media (max-width: 700px) {
  body.player-portal .topbar { grid-template-columns: minmax(100px, 1fr) auto auto; gap: 8px; height: 64px; padding: 0 14px; }
  .portal-brand { gap: 7px; }
  .portal-brand img { width: auto; max-width: 150px; height: 38px; }
  .portal-brand span { font-size: 12px; }
  .portal-brand small { font-size: 7px; }
  .portal-menu-toggle { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--portal-line); border-radius: 5px; background: rgba(255,255,255,.04); color: #edf0ee; cursor: pointer; }
  .portal-menu-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
  body.player-portal .portal-nav { position: absolute; top: calc(100% + 8px); right: 14px; left: 14px; display: none; align-items: stretch; padding: 8px; border: 1px solid rgba(225, 237, 233, .17); border-radius: 7px; background: rgba(15, 22, 25, .96); box-shadow: 0 20px 50px rgba(0,0,0,.42); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
  body.player-portal .topbar.menu-open .portal-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .portal-nav .nav { justify-content: flex-start; min-height: 42px; text-align: left; }
  body.player-portal .top-actions { gap: 6px; }
  body.player-portal .top-actions .button { min-height: 38px; padding: 7px 10px; font-size: 11px; }
  body.player-portal .signed-in-id { display: none; }
  body.player-portal .avatar { width: 38px; height: 38px; }
  body.player-portal #content { padding: 0 14px 54px; }
  .portal-hero { min-height: 480px; align-items: flex-end; margin: 14px 0 16px; padding: 28px 22px; border-radius: 6px; }
  .portal-hero::before { background: linear-gradient(0deg, #0b1114 2%, rgba(11,17,20,.95) 24%, rgba(11,17,20,.58) 57%, rgba(11,17,20,.15) 100%); }
  .hero-visual { width: 100%; height: 76%; }
  .hero-visual img { object-position: 55% center; }
  .hero-copy h1 { margin: 15px 0 12px; font-size: clamp(38px, 11vw, 52px); }
  .hero-copy p { max-width: 380px; font-size: 13px; }
  .hero-actions { margin-top: 20px; }
  .hero-actions .button { min-height: 44px; }
  .hero-coordinate { right: 12px; top: 12px; bottom: auto; font-size: 8px; }
  .faction-strip { gap: 8px; margin-bottom: 22px; }
  .faction-card { min-height: 128px; }
  .faction-card img { object-position: 52% center; }
  .faction-copy { right: 9px; bottom: 9px; left: 9px; }
  .faction-copy small { font-size: 7px; }
  .faction-copy strong { font-size: 12px; }
  .faction-copy p { display: none; }
  body.player-portal .lower-grid { grid-template-columns: 1fr; gap: 10px; }
  body.player-portal .page-heading { margin: 16px 0 14px; }
  body.player-portal #download .download-card { min-height: 360px; }
}

@media (max-width: 390px) {
  body.player-portal .topbar { padding-right: 10px; padding-left: 10px; }
  body.player-portal .top-actions .button { padding-right: 8px; padding-left: 8px; }
  .faction-strip { grid-template-columns: 1fr; }
  .faction-card { min-height: 145px; }
}

@media (prefers-reduced-motion: reduce) {
  body.player-portal *, body.player-portal *::before, body.player-portal *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .hero-visual img { transform: none !important; will-change: auto; }
}

@media (prefers-reduced-transparency: reduce) {
  body.player-portal .topbar, body.player-portal .panel, body.player-portal #auth-dialog, body.player-portal .auth-content { background: #12191c; -webkit-backdrop-filter: none; backdrop-filter: none; }
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  body.player-portal .topbar, body.player-portal .panel, body.player-portal #auth-dialog, body.player-portal .auth-content { background: #12191c; }
}

/* Cash Shop: keep the unavailable state clear and the purchase path discoverable. */
.shop-intro { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding: 24px; border: 1px solid var(--portal-line); border-radius: 7px; background: #151a1c; }
.shop-intro h2 { margin: 8px 0 9px; color: var(--portal-ink); font-size: clamp(26px, 3.5vw, 36px); font-weight: 600; letter-spacing: -1px; }
.shop-intro p, .shop-panel p { margin: 0; color: var(--portal-muted); font-size: 13px; line-height: 1.65; }
.shop-intro .pill { margin-top: 2px; }
.shop-tabs { display: flex; gap: 22px; margin: 20px 0 0; overflow-x: auto; border-bottom: 1px solid var(--portal-line); }
.shop-tabs button { flex: 0 0 auto; min-height: 44px; padding: 0 2px 11px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--portal-muted); font: inherit; font-size: 13px; cursor: pointer; }
.shop-tabs button[aria-selected="true"] { border-bottom-color: var(--portal-amber); color: var(--portal-ink); }
.shop-panel { min-height: 245px; padding: 24px; border: 1px solid var(--portal-line); border-top: 0; border-radius: 0 0 7px 7px; background: rgba(18, 23, 25, .82); }
.shop-panel h3 { margin: 7px 0 6px; color: var(--portal-ink); font-size: 20px; font-weight: 600; }
.shop-notice { display: flex; flex-direction: column; gap: 5px; margin-top: 30px; padding: 15px 0 0; border-top: 1px solid var(--portal-line); }
.shop-notice strong { color: #dec3a3; font-size: 13px; font-weight: 600; }
.shop-notice span, .shop-empty { color: var(--portal-muted); font-size: 12px; line-height: 1.65; }
.shop-history-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 20px; }
.shop-history-heading h3 { margin-top: 7px; }
#shop-history-content { min-height: 100px; padding-top: 14px; border-top: 1px solid var(--portal-line); }
#shop-history-content .button { margin-top: 10px; }
@media (max-width: 600px) {
  .shop-intro { flex-direction: column; gap: 14px; padding: 19px 17px; }
  .shop-intro h2 { font-size: 27px; }
  .shop-intro p, .shop-panel p { font-size: 12px; }
  .shop-tabs { gap: 18px; margin-top: 14px; }
  .shop-tabs button { min-height: 46px; }
  .shop-panel { min-height: 220px; padding: 19px 17px; }
  .shop-history-heading { flex-direction: column; }
}

.download-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
#apk-changelog-dialog { width: min(620px, calc(100% - 32px)); max-height: calc(100dvh - 48px); overflow: auto; padding: 20px; border: 1px solid #3b3d3c; border-radius: 8px; background: #14191c; color: #f1f2ed; }
#apk-changelog-dialog::backdrop { background: rgba(3, 8, 10, .72); }
#apk-changelog-dialog h3 { margin: 18px 0 6px; color: #d9b58a; font-size: 15px; }
#apk-changelog-dialog ul { margin: 0; padding-left: 20px; line-height: 1.5; font-size: 13px; }

/* Compact Stitch-inspired layout for the live Gold Point shop. */
body.player-portal #shop {
  display: grid;
  gap: 14px;
  color: var(--portal-ink);
}

body.player-portal #shop .shop-intro {
  min-height: 0;
  align-items: center;
  padding: 18px 20px;
  border: 1px solid var(--portal-line);
  border-radius: 9px;
  background: #12181b;
}

body.player-portal #shop .shop-intro h2 {
  margin: 6px 0 5px;
  font-size: clamp(24px, 2.5vw, 30px);
  line-height: 1.2;
  letter-spacing: -.035em;
}

body.player-portal #shop .shop-intro p {
  max-width: 680px;
  font-size: 13px;
  line-height: 1.5;
}

body.player-portal #shop .shop-intro .pill {
  flex: 0 0 auto;
  margin: 0;
}

body.player-portal #shop .shop-panel {
  min-height: 0;
  padding: 18px 20px;
  border: 1px solid var(--portal-line);
  border-radius: 9px;
  background: #101619;
}

body.player-portal #shop .capsule-shop-panel {
  grid-template-columns: minmax(230px, 320px) minmax(0, 1fr);
  grid-template-areas:
    "heading heading"
    "character message"
    "offers offers"
    "checkout checkout";
  align-items: end;
  gap: 14px;
  margin-top: 0;
}

body.player-portal #shop .capsule-shop-heading { grid-area: heading; padding-bottom: 10px; border-bottom: 1px solid var(--portal-line); }
body.player-portal #shop .capsule-shop-heading h3 { margin: 0; font-size: 18px; }
body.player-portal #shop .capsule-character-select { grid-area: character; max-width: none; gap: 6px; font-size: 12px; }
body.player-portal #shop .capsule-character-select select {
  min-height: 44px;
  border-color: rgba(225, 235, 232, .19);
  border-radius: 7px;
  background: #0b1012;
}
body.player-portal #shop .capsule-character-select select:focus-visible { outline-color: var(--portal-amber); }

body.player-portal #shop .capsule-shop-panel > .shop-notice {
  grid-area: message;
  display: flex;
  min-height: 44px;
  align-items: center;
  margin: 0;
  padding: 10px 12px;
  border-color: var(--portal-line);
  border-radius: 7px;
  background: rgba(255, 255, 255, .025);
  font-size: 12px;
}

body.player-portal #shop .capsule-shop-panel > .capsule-shop-disabled {
  border-color: rgba(235, 153, 117, .35);
  background: rgba(235, 153, 117, .045);
}

body.player-portal #shop .capsule-offers {
  grid-area: offers;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

body.player-portal #shop .capsule-offer-card {
  min-width: 0;
  min-height: 126px;
  gap: 12px;
  padding: 14px;
  border-color: rgba(225, 235, 232, .13);
  border-radius: 8px;
  background: #141a1d;
  transition: border-color .16s ease, background-color .16s ease;
}

body.player-portal #shop .capsule-offer-card:hover,
body.player-portal #shop .capsule-offer-card:focus-within {
  border-color: rgba(226, 185, 133, .62);
  background: #171d20;
}

body.player-portal #shop .capsule-offer-copy h4 {
  color: var(--portal-ink);
  font-size: 17px;
  line-height: 1.25;
  letter-spacing: -.025em;
}

body.player-portal #shop .capsule-offer-copy p { margin-top: 5px; font-size: 12px; line-height: 1.4; }
body.player-portal #shop .capsule-buy-button { min-height: 40px; border-radius: 6px; }
body.player-portal #shop .capsule-buy-button:focus-visible { outline-color: var(--portal-amber); }
body.player-portal #shop .capsule-buy-button:disabled { opacity: .48; box-shadow: none; cursor: not-allowed; }

body.player-portal #shop .capsule-checkout {
  grid-area: checkout;
  padding: 13px 14px;
  border-color: rgba(226, 185, 133, .35);
  border-radius: 7px;
  background: rgba(226, 185, 133, .045);
}

body.player-portal #shop .capsule-checkout-copy { gap: 8px 14px; }
body.player-portal #shop .capsule-checkout-copy .button { min-height: 40px; }
body.player-portal #shop .capsule-checkout-copy a:focus-visible,
body.player-portal #shop .capsule-order-copy a:focus-visible { outline-color: var(--portal-amber); }

body.player-portal #shop .capsule-history-panel { gap: 12px; margin-top: 0; }
body.player-portal #shop .capsule-order-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 12px 0;
}
body.player-portal #shop .capsule-order-copy {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px 12px;
}
body.player-portal #shop .capsule-order-copy > p { grid-column: 1 / -1; font-size: 12px; }
body.player-portal #shop .capsule-order-copy > a.button { grid-column: 1 / -1; justify-self: start; }
body.player-portal #shop .capsule-order-row > .button { min-height: 38px; }

@media (max-width: 980px) {
  body.player-portal #shop .capsule-offers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  body.player-portal #shop { gap: 11px; }
  body.player-portal #shop .shop-intro { align-items: flex-start; gap: 9px; padding: 15px 16px; }
  body.player-portal #shop .shop-intro h2 { margin-top: 5px; font-size: 25px; }
  body.player-portal #shop .shop-intro p { font-size: 12px; }
  body.player-portal #shop .shop-intro .pill { align-self: flex-start; }
  body.player-portal #shop .shop-panel { padding: 15px 16px; }
  body.player-portal #shop .capsule-shop-panel {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "heading" "character" "message" "offers" "checkout";
    gap: 12px;
  }
  body.player-portal #shop .capsule-shop-heading { gap: 8px; }
  body.player-portal #shop .capsule-shop-heading h3 { font-size: 17px; }
  body.player-portal #shop .capsule-shop-heading .button { min-height: 38px; }
  body.player-portal #shop .capsule-offers { grid-template-columns: 1fr; gap: 8px; }
  body.player-portal #shop .capsule-offer-card { min-height: 0; gap: 10px; padding: 12px; }
  body.player-portal #shop .capsule-offer-copy h4 { font-size: 16px; }
  body.player-portal #shop .capsule-buy-button { min-height: 44px; }
  body.player-portal #shop .capsule-order-row { grid-template-columns: minmax(0, 1fr); }
  body.player-portal #shop .capsule-order-copy { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; }
  body.player-portal #shop .capsule-order-copy > strong,
  body.player-portal #shop .capsule-order-copy > small,
  body.player-portal #shop .capsule-order-copy > p,
  body.player-portal #shop .capsule-order-copy > a.button { grid-column: 1 / -1; }
  body.player-portal #shop .capsule-order-row > .button { width: 100%; min-height: 42px; }
}

@media (prefers-reduced-motion: reduce) {
  body.player-portal #shop .capsule-offer-card { transition: none; }
}
