/* STARFALL ONLINE v3.17 — the way in: login · character select · character creation.
   Glass cards over the starfield, gold for the one main action, the game's own sprites as the artwork. */

.pt-screen { justify-content: flex-start; gap: 14px; padding: clamp(10px, 2.6vh, 30px) 16px 22px; scrollbar-width: thin; }
.pt-screen::before {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: -1;
  background:
    radial-gradient(ellipse 70% 50% at 50% -5%, rgba(124, 92, 255, .30), transparent 65%),
    radial-gradient(ellipse 55% 40% at 88% 105%, rgba(251, 191, 36, .13), transparent 62%),
    radial-gradient(ellipse 55% 45% at 8% 100%, rgba(56, 189, 248, .12), transparent 62%);
}
.pt-screen > * { flex: none; }

/* ------------------------------------------------------------ shared pieces */
.pt-card {
  position: relative; padding: 20px; border-radius: 18px; border: 1px solid rgba(253, 230, 138, .22);
  background: linear-gradient(180deg, rgba(34, 27, 74, .93), rgba(15, 12, 38, .95));
  box-shadow: 0 18px 60px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .09);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.pt-card::before {   /* a hairline of gold → violet → blue round the card */
  content: ''; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(135deg, rgba(253, 230, 138, .85), rgba(124, 92, 255, .25) 38%, rgba(56, 189, 248, .4) 72%, rgba(253, 230, 138, .5));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
}
.pt-card-title { font: 700 20px/1.3 'Kanit', sans-serif; color: #fde68a; text-align: center; margin-bottom: 12px; text-shadow: 0 2px 0 rgba(0, 0, 0, .45); }
.pt-sec { font: 600 14px/1.3 'Kanit', sans-serif; color: #fde68a; margin: 10px 0 6px; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.pt-sec:first-child { margin-top: 0; }
.pt-sec small { font: 400 11.5px 'Sarabun', sans-serif; color: #a5b4fc; }

.pt-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer;
  font: 600 15px/1.2 'Kanit', 'Sarabun', sans-serif; color: #f5f3ff; padding: 10px 16px; border-radius: 12px;
  border: 1px solid rgba(165, 180, 252, .42); background: linear-gradient(180deg, rgba(88, 73, 184, .95), rgba(52, 43, 124, .97));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 4px 14px rgba(0, 0, 0, .35); transition: transform .08s, filter .15s, box-shadow .15s;
}
.pt-btn:hover { filter: brightness(1.13); }
.pt-btn:active { transform: translateY(1px); }
.pt-btn:focus-visible, .pt-pick:focus-visible, .pt-screen .class-card:focus-visible, .pt-screen .swatch:focus-visible, .pt-screen .chip:focus-visible { outline: 2px solid #fde68a; outline-offset: 2px; }
.pt-btn-gold { color: #3b2204; border-color: #fde68a; background: linear-gradient(180deg, #fff3b0, #fbbf24 46%, #d97706); text-shadow: 0 1px 0 rgba(255, 255, 255, .45); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .75), 0 6px 22px rgba(251, 191, 36, .38); }
.pt-btn-ghost { background: rgba(255, 255, 255, .07); box-shadow: none; }
.pt-btn-ghost.on { background: rgba(253, 230, 138, .22); border-color: #fde68a; color: #fde68a; }
.pt-btn-danger { background: linear-gradient(180deg, #c2410c, #7f1d1d); border-color: #fca5a5; }
.pt-btn-sm { padding: 6px 12px; font-size: 13px; border-radius: 10px; }
.pt-btn-xl { padding: 13px 28px; font-size: 18px; border-radius: 14px; }
.pt-btn-google { background: #fff; color: #1f2937; border-color: #e5e7eb; }
.pt-btn-facebook { background: #1877f2; color: #fff; border-color: #3b8cf6; }
.pt-btn-guest { grid-column: 1 / -1; justify-content: flex-start; text-align: left; padding: 9px 14px; background: linear-gradient(180deg, rgba(16, 185, 129, .95), rgba(4, 108, 78, .97)); border-color: #6ee7b7; }
.pt-btn-guest small { display: block; font: 400 11.5px 'Sarabun', sans-serif; opacity: .9; }
.pt-guest-ico { font-size: 22px; }

.pt-field { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; padding: 0 12px; border-radius: 12px; background: rgba(6, 4, 20, .72); border: 1px solid rgba(165, 180, 252, .3); transition: border-color .15s, box-shadow .15s; }
.pt-field:focus-within { border-color: #fde68a; box-shadow: 0 0 0 3px rgba(251, 191, 36, .18); }
.pt-field > span { opacity: .8; }
.pt-field input, .pt-name-row input { flex: 1; min-width: 0; padding: 12px 0 !important; font: 15px 'Sarabun', sans-serif; color: #fff; background: transparent !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; outline: 0; }
.pt-field input::placeholder, .pt-name-row input::placeholder { color: #8b86b5; }
.pt-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 7px; vertical-align: 0; background: #ef4444; box-shadow: 0 0 8px #ef4444; }
.pt-dot.on { background: #34d399; box-shadow: 0 0 8px #34d399; animation: ptPulse 2s ease-in-out infinite; }
@keyframes ptPulse { 50% { opacity: .45; } }

/* ------------------------------------------------------------ login */
.pt-login { width: min(1120px, 100%); margin: auto 0; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(320px, 400px); gap: clamp(16px, 4vw, 60px); align-items: center; }
.pt-hero { display: grid; gap: 12px; justify-items: center; min-width: 0; }
.pt-hero .logo-main { font-size: clamp(30px, 5.4vw, 62px); }
.pt-stage { position: relative; width: min(520px, 100%); }
.pt-stage::before { content: ''; position: absolute; left: 4%; right: 4%; bottom: 6%; height: 34%; border-radius: 50%; background: radial-gradient(ellipse, rgba(253, 230, 138, .34), rgba(124, 92, 255, .2) 45%, transparent 70%); filter: blur(6px); }
.pt-stage canvas { position: relative; display: block; width: 100%; height: auto; image-rendering: pixelated; }
.pt-feats { display: flex; flex-wrap: wrap; gap: 7px; justify-content: center; }
.pt-feats span { padding: 5px 11px; border-radius: 999px; font: 500 12.5px 'Kanit', sans-serif; color: #e0e7ff; background: rgba(30, 24, 66, .78); border: 1px solid rgba(165, 180, 252, .3); }
.pt-side { display: grid; gap: 10px; min-width: 0; }
.pt-screen .auth-card { width: auto; }
.pt-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin-bottom: 12px; border-radius: 13px; background: rgba(0, 0, 0, .34); }
.pt-tabs .tab { border: 0; border-radius: 10px; padding: 9px 6px; background: transparent; color: #c7d2fe; font: 600 14px 'Kanit', sans-serif; box-shadow: none; text-shadow: none; }
.pt-tabs .tab:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.pt-tabs .tab.active { background: linear-gradient(180deg, #7663ee, #4c3fa0); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 3px 10px rgba(0, 0, 0, .35); }
#auth-form .pt-btn { width: 100%; margin-top: 2px; padding: 12px; font-size: 16.5px; }
.pt-or { display: flex; align-items: center; gap: 10px; margin: 14px 0 10px; color: #a5b4fc; font-size: 12.5px; }
.pt-or::before, .pt-or::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, rgba(165, 180, 252, .45), transparent); }
.pt-social { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pt-social.no-social { grid-template-columns: 1fr; }
.pt-status { margin-top: 12px; padding: 7px 10px; border-radius: 999px; background: rgba(0, 0, 0, .28); font-size: 12px; color: #c7d2fe; text-align: center; line-height: 1.5; }
.pt-status code { color: #fde68a; }
.pt-side .install-prompt { display: grid; justify-items: center; gap: 4px; }
.pt-news { width: min(1120px, 100%); padding: 14px 18px; }
.pt-screen .footer-note { color: #8b86b5; font-size: 12px; text-align: center; }

/* ------------------------------------------------------------ character select */
.pt-select { width: min(1100px, 100%); margin: auto 0; display: grid; gap: 14px; justify-items: center; }
.pt-topbar { width: 100%; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; }
.pt-acc { justify-self: start; display: flex; align-items: center; gap: 10px; padding: 6px 10px 6px 12px; border-radius: 14px; background: rgba(24, 18, 56, .82); border: 1px solid rgba(165, 180, 252, .3); max-width: 100%; }
.pt-acc-ico { font-size: 20px; }
.pt-acc-name { font: 600 15px 'Kanit', sans-serif; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.pt-acc-sub { font-size: 11.5px; color: #a5b4fc; }
.pt-top-actions { justify-self: end; display: flex; gap: 8px; }
.pt-guest-note { width: min(760px, 100%); padding: 8px 14px; border-radius: 12px; font-size: 13px; line-height: 1.55; color: #fde68a; background: rgba(120, 83, 12, .3); border: 1px solid rgba(251, 191, 36, .45); text-align: center; }
.pt-slots { gap: 18px; padding: 8px 0; }
.pt-slots .char-slot {
  position: relative; width: 218px; min-height: 318px; padding: 14px 12px 16px; gap: 3px; overflow: hidden; --c: #8b7ff0;
  border-radius: 18px; border: 1px solid rgba(165, 180, 252, .32); cursor: pointer;
  background: linear-gradient(180deg, color-mix(in srgb, var(--c) 22%, #1a1440), #100d28 78%);
  box-shadow: 0 14px 40px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .08); transition: transform .15s, box-shadow .15s, border-color .15s;
}
.pt-slots .char-slot:hover { transform: translateY(-4px); border-color: #c7d2fe; }
.pt-slots .char-slot.sel { transform: translateY(-8px); border-color: #fde68a; box-shadow: 0 0 0 2px rgba(253, 230, 138, .55), 0 20px 50px rgba(251, 191, 36, .28); }
.pt-slots .char-slot.empty { opacity: .82; justify-content: center; border-style: dashed; background: rgba(20, 16, 48, .6); }
.cs-ped { position: relative; margin-top: 4px; }
.cs-ped::before { content: ''; position: absolute; left: 12%; right: 12%; bottom: 8px; height: 26px; border-radius: 50%; background: radial-gradient(ellipse, color-mix(in srgb, var(--c) 75%, #fff) 0%, color-mix(in srgb, var(--c) 45%, transparent) 45%, transparent 72%); opacity: .55; }
.cs-ped canvas { position: relative; display: block; image-rendering: pixelated; }
.cs-lv { position: absolute; top: 10px; right: 10px; padding: 2px 9px; border-radius: 999px; font: 700 12px 'Kanit', sans-serif; color: #3b2204; background: linear-gradient(180deg, #fff3b0, #fbbf24); }
.pt-slots .cs-name { font-size: 18px; color: #fff; }
.pt-slots .cs-sub { color: #c7d2fe; font-size: 13px; }
.pt-slots .cs-map, .pt-slots .cs-guild { font-size: 12px; }
.pt-slots .cs-plus { font-size: 52px; color: #a5b4fc; }
.pt-select-actions { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 14px; width: min(760px, 100%); }
.pt-select-actions > :first-child { justify-self: start; }
.pt-select-actions > :last-child { justify-self: end; }

/* account window */
#modal .acc-modal { width: min(440px, 94vw); text-align: left; border-radius: 18px; box-shadow: 0 18px 60px rgba(0, 0, 0, .6); }
.acc-id { margin-bottom: 10px; color: #c7d2fe; }
.acc-tag { padding: 1px 8px; border-radius: 999px; font-size: 11px; background: rgba(16, 185, 129, .3); color: #a7f3d0; border: 1px solid #34d399; }
.acc-box { padding: 12px; margin-bottom: 10px; border-radius: 14px; background: rgba(0, 0, 0, .25); border: 1px solid rgba(165, 180, 252, .25); }
.acc-box .pt-btn { width: 100%; }
.acc-h { font: 600 14px 'Kanit', sans-serif; color: #fde68a; margin-bottom: 8px; }
.acc-h small { display: block; font: 400 11.5px 'Sarabun', sans-serif; color: #a5b4fc; }
.acc-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px; margin-bottom: 8px; border-radius: 12px; background: rgba(0, 0, 0, .25); border: 1px solid rgba(165, 180, 252, .22); }
.acc-row.ok { border-color: rgba(52, 211, 153, .5); }
.acc-row em { font-style: normal; color: #6ee7b7; font-size: 13px; }

/* ------------------------------------------------------------ character creation */
.pt-create { width: min(1240px, 100%); margin: auto 0; display: grid; gap: 10px; }
.pt-create-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; }
.pt-create-head > :first-child { justify-self: start; }
.pt-create-step { justify-self: end; color: #a5b4fc; font-size: 12.5px; }
.pt-create-wrap { display: grid; grid-template-columns: 270px minmax(0, 1fr) minmax(340px, 430px); gap: 14px; max-width: none; align-items: stretch; }
.pt-screen .create-form { width: auto; }
.pt-stage-card { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px; background: radial-gradient(circle at 50% 36%, rgba(124, 92, 255, .42), rgba(18, 14, 44, .96) 68%) !important; }
.pt-class-badge span { display: inline-block; padding: 3px 14px; border-radius: 999px; font: 600 14px 'Kanit', sans-serif; color: #fff; background: color-mix(in srgb, var(--c) 45%, #1a1440); border: 1px solid var(--c); }
.pt-pedestal { position: relative; }
.pt-pedestal::before { content: ''; position: absolute; left: 6%; right: 6%; bottom: 16px; height: 46px; border-radius: 50%; background: radial-gradient(ellipse, rgba(253, 230, 138, .5), rgba(124, 92, 255, .28) 50%, transparent 72%); }
.pt-pedestal canvas { position: relative; display: block; image-rendering: pixelated; }
.pt-rot { margin-top: 0; }
.pt-gender { justify-content: center; }
.pt-screen .chip { border-radius: 999px; padding: 6px 14px; border: 1px solid rgba(165, 180, 252, .35); background: rgba(12, 9, 32, .7); color: #e0e7ff; box-shadow: none; font: 500 13px 'Kanit', sans-serif; }
.pt-screen .chip.active { background: linear-gradient(180deg, #fff3b0, #fbbf24); color: #3b2204; border-color: #fde68a; font-weight: 700; }
.pt-screen .tier-preview { width: 100%; margin-top: 2px; }
.pt-screen .tier-preview .chip { padding: 3px 8px; font-size: 11.5px; }

.pt-classes { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.pt-screen .class-card {
  display: grid; grid-template-columns: 38px 1fr auto; grid-template-rows: auto; align-items: center; gap: 10px; text-align: left; cursor: pointer;
  padding: 9px 12px; border-radius: 13px; border: 1px solid rgba(165, 180, 252, .28); color: #fff; font: inherit;
  background: linear-gradient(100deg, color-mix(in srgb, var(--c) 16%, #151033), #120e2c 70%); box-shadow: none; transition: transform .1s, border-color .15s, box-shadow .15s;
}
.pt-screen .class-card:hover { border-color: color-mix(in srgb, var(--c) 70%, #fff); transform: translateY(-1px); }
.pt-screen .class-card.active { border-color: var(--c); box-shadow: 0 0 0 1px var(--c), 0 0 22px color-mix(in srgb, var(--c) 45%, transparent); background: linear-gradient(100deg, color-mix(in srgb, var(--c) 34%, #151033), #120e2c 85%); }
.pt-screen .cc-ico { font-size: 26px; grid-row: auto; text-align: center; }
.pt-screen .cc-name { font: 600 15px 'Kanit', sans-serif; }
.pt-screen .cc-name small { display: block; margin: 0; font: 400 11px 'Sarabun', sans-serif; color: #a5b4fc; }
.cc-role { padding: 2px 8px; border-radius: 999px; font-size: 11px; color: #e0e7ff; background: rgba(255, 255, 255, .08); white-space: nowrap; }
.pt-class-info { margin-top: 12px; padding: 12px 14px; border-radius: 14px; background: rgba(0, 0, 0, .26); border: 1px solid rgba(165, 180, 252, .22); }
.pt-class-info p { margin: 8px 0; color: #dbe1ff; line-height: 1.6; font-size: 13.5px; }
.ci-head { display: flex; gap: 10px; align-items: center; }
.ci-ico { width: 46px; height: 46px; display: grid; place-items: center; font-size: 26px; border-radius: 13px; background: color-mix(in srgb, var(--c) 30%, #151033); border: 1px solid var(--c); }
.ci-head b { font: 700 18px 'Kanit', sans-serif; color: #fff; }
.ci-head small { color: #a5b4fc; }
.ci-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 3px; }
.ci-tags span { padding: 1px 8px; border-radius: 999px; font-size: 11px; background: rgba(255, 255, 255, .08); color: #e0e7ff; }
.ci-skills { display: flex; flex-wrap: wrap; gap: 6px; }
.ci-skills img { width: 38px; height: 38px; border-radius: 9px; box-shadow: 0 2px 6px rgba(0, 0, 0, .4); }

.pt-hairs { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.pt-outfits { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.pt-pick { display: grid; justify-items: center; gap: 2px; padding: 4px 2px 5px; cursor: pointer; border-radius: 11px; border: 1px solid rgba(165, 180, 252, .25); background: rgba(10, 8, 28, .6); color: #c7d2fe; font: 500 10.5px/1.2 'Sarabun', sans-serif; transition: border-color .12s, transform .1s; }
.pt-pick canvas { image-rendering: pixelated; max-width: 100%; height: auto; }
.pt-pick span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.pt-pick:hover { border-color: #c7d2fe; transform: translateY(-1px); }
.pt-pick.active { border-color: #fde68a; background: rgba(253, 230, 138, .14); color: #fde68a; box-shadow: 0 0 0 1px #fde68a; }
.pt-two { display: grid; grid-template-columns: 1.55fr 1fr; gap: 12px; margin-top: 8px; }
.pt-two .pt-sec { margin-top: 0; }
.pt-screen .swatch { width: 27px; height: 27px; padding: 0; border: 2px solid rgba(255, 255, 255, .25); box-shadow: none; }
.pt-screen .swatch.active { border-color: #fff; box-shadow: 0 0 0 2px #fbbf24; }
.pt-name-row { display: flex; align-items: center; gap: 8px; padding: 0 6px 0 12px; margin-bottom: 12px; border-radius: 12px; background: rgba(6, 4, 20, .72); border: 1px solid rgba(165, 180, 252, .3); }
.pt-name-row:focus-within { border-color: #fde68a; box-shadow: 0 0 0 3px rgba(251, 191, 36, .18); }
.pt-look-card > .pt-btn-xl { width: 100%; }

/* ------------------------------------------------------------ narrower screens */
@media (max-width: 1080px) {
  .pt-create-wrap { grid-template-columns: 250px minmax(0, 1fr); }
  .pt-look-card { grid-column: 1 / -1; }
  .pt-outfits { grid-template-columns: repeat(7, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .pt-login { grid-template-columns: 1fr; gap: 14px; }
  .pt-side { width: min(420px, 100%); justify-self: center; }
  .pt-stage { width: min(400px, 92%); }
  .pt-hero .logo-emblem { width: 64px; height: 64px; }
  .pt-topbar { grid-template-columns: 1fr; justify-items: center; }
  .pt-acc, .pt-top-actions { justify-self: center; }
  .pt-select-actions { grid-template-columns: 1fr; justify-items: center; }
  .pt-select-actions > * { justify-self: center !important; }
  .pt-select-actions #btn-enter { order: -1; width: 100%; }
  .pt-create-head { grid-template-columns: auto 1fr; }
  .pt-create-step { display: none; }
  .pt-create-wrap { grid-template-columns: 1fr; }
  .pt-hairs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .pt-outfits { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 860px) and (orientation: landscape) {
  .pt-login { grid-template-columns: minmax(0, 1fr) minmax(300px, 380px); align-items: start; }
  .pt-hero .logo-main { font-size: 30px; }
  .pt-hero .logo-emblem { width: 48px; height: 48px; }
  .pt-feats { display: none; }
  .pt-create-wrap { grid-template-columns: 220px minmax(0, 1fr); }
  .pt-look-card { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
  .pt-card { padding: 14px; border-radius: 16px; }
  .pt-classes { grid-template-columns: 1fr; }
  .pt-slots .char-slot { width: min(218px, 44vw); min-height: 280px; }
  .pt-two { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .pt-dot.on { animation: none; } .pt-btn, .pt-pick, .pt-slots .char-slot { transition: none; } }

/* fixes after the first look */
.pt-screen .pt-field { display: flex; margin: 0 0 10px; color: inherit; font-size: inherit; }
.pt-screen .pt-field input { display: block; width: auto; margin: 0; }
.pt-stage { width: min(680px, 100%); }
.pt-screen .swatch { width: 24px; height: 24px; }
.pt-screen .swatch-row { gap: 5px; }
.pt-outfit span { white-space: normal; line-height: 1.15; min-height: 23px; display: flex; align-items: center; text-align: center; font-size: 10px; }
#auth-form .pt-field { flex-direction: row; align-items: center; gap: 8px; margin-bottom: 10px; color: inherit; font-size: inherit; }

/* ============================================================ v3.17 payments (js/pay.js) */
.pay-mode { display: flex; gap: 10px; align-items: center; margin: 8px 0 10px; padding: 9px 12px; border-radius: 10px; border: 1px solid rgba(250, 204, 21, .45); background: linear-gradient(90deg, rgba(250, 204, 21, .14), rgba(250, 204, 21, .03)); }
.pay-mode > span { font-size: 24px; line-height: 1; }
.pay-mode b { display: block; color: #fde68a; font-size: 13.5px; }
.pay-mode small { display: block; color: var(--dim, #9fb0a6); font-size: 11.5px; line-height: 1.45; }
.pay-mode.stripe, .pay-mode.manual { border-color: rgba(74, 222, 128, .5); background: linear-gradient(90deg, rgba(74, 222, 128, .15), rgba(74, 222, 128, .03)); }
.pay-mode.stripe b, .pay-mode.manual b { color: #86efac; }
.pay-mode.off { border-color: rgba(148, 163, 184, .4); background: rgba(148, 163, 184, .08); }
.pay-mode.off b { color: #cbd5e1; }
.pack-buy-btn small { font-weight: 600; opacity: .8; }
.pay-st { display: inline-block; margin-left: 5px; padding: 1px 7px; border-radius: 99px; font-size: 10.5px; font-weight: 800; vertical-align: 1px; border: 1px solid transparent; }
.pay-st.wait { color: #fde68a; background: rgba(250, 204, 21, .14); border-color: rgba(250, 204, 21, .4); }
.pay-st.rev { color: #7dd3fc; background: rgba(56, 189, 248, .14); border-color: rgba(56, 189, 248, .4); }
.pay-st.ok { color: #86efac; background: rgba(74, 222, 128, .14); border-color: rgba(74, 222, 128, .4); }
.pay-st.bad { color: #fca5a5; background: rgba(248, 113, 113, .14); border-color: rgba(248, 113, 113, .4); }
.pay-st.off { color: #cbd5e1; background: rgba(148, 163, 184, .12); border-color: rgba(148, 163, 184, .3); }
.pay-st.test { color: #e9d5ff; background: rgba(168, 85, 247, .16); border-color: rgba(168, 85, 247, .4); }
.pay-st.live { color: #fff; background: rgba(34, 197, 94, .35); border-color: rgba(74, 222, 128, .6); }
.pay-orders { display: grid; gap: 5px; margin-bottom: 8px; }
.pay-order { display: flex; gap: 8px; align-items: center; justify-content: space-between; padding: 7px 10px; border-radius: 8px; background: rgba(0, 0, 0, .22); border: 1px solid rgba(255, 255, 255, .07); }
.pay-order .po-main small { display: block; color: var(--dim, #9fb0a6); font-size: 11px; margin-top: 1px; }
.pay-order .po-act { display: flex; gap: 5px; flex-shrink: 0; }
.pay-card { width: min(430px, 94vw); text-align: left; }
.pay-test-tag { display: inline-block; margin-bottom: 9px; padding: 3px 10px; border-radius: 99px; font-size: 11.5px; font-weight: 800; color: #e9d5ff; background: rgba(168, 85, 247, .2); border: 1px dashed rgba(192, 132, 252, .7); }
.pay-test-tag.live { color: #bbf7d0; background: rgba(34, 197, 94, .18); border: 1px solid rgba(74, 222, 128, .55); }
.pay-sum { display: flex; gap: 11px; align-items: center; padding: 10px 12px; border-radius: 11px; background: linear-gradient(135deg, rgba(250, 204, 21, .13), rgba(0, 0, 0, .25)); border: 1px solid rgba(250, 204, 21, .3); }
.pay-sum .pay-ico { font-size: 30px; }
.pay-sum > div:nth-child(2) { flex: 1; min-width: 0; }
.pay-sum small { display: block; color: var(--dim, #9fb0a6); font-size: 11.5px; }
.pay-sum code, .pay-line b, .sys-url code, .sys-note code { font-family: ui-monospace, Consolas, monospace; }
.pay-sum code { color: #fde68a; font-weight: 800; }
.pay-amt { text-align: right; font-size: 21px; font-weight: 900; color: #fde68a; }
.pay-amt small { color: #7dd3fc; font-weight: 700; }
.pay-p { margin: 10px 0; font-size: 12.5px; line-height: 1.55; color: #d6e2da; }
.pay-lines { display: grid; gap: 4px; margin: 10px 0; }
.pay-line { display: flex; gap: 8px; align-items: center; padding: 6px 9px; border-radius: 7px; background: rgba(0, 0, 0, .25); font-size: 12.5px; }
.pay-line > span { width: 96px; flex-shrink: 0; color: var(--dim, #9fb0a6); }
.pay-line b { flex: 1; word-break: break-all; color: #fff; }
.pay-card input { width: 100%; margin-bottom: 4px; }
.pay-card a.btn { text-decoration: none; display: inline-flex; align-items: center; }
.pet-pix { width: 56px; height: 56px; image-rendering: pixelated; }
.pet-big-icon .pet-pix { width: 54px; height: 54px; display: block; }
.gic-icon.pet { background: radial-gradient(circle, rgba(125, 211, 252, .32), transparent 70%); width: 64px; height: 64px; }
.gic-icon.pet img { width: 60px; height: 60px; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .6)); }

/* ============================================================ v3.17 GM: sign-in & payment settings */
.sys-door { margin-bottom: 8px; }
.sys-body { max-height: min(68vh, 640px); overflow-y: auto; padding-right: 4px; }
.sys-stats { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.sys-stats > span { padding: 4px 10px; border-radius: 99px; font-size: 11.5px; background: rgba(0, 0, 0, .28); border: 1px solid rgba(255, 255, 255, .09); color: var(--dim, #9fb0a6); }
.sys-stats b { color: #fff; }
.sys-stats .warn { border-color: rgba(56, 189, 248, .6); color: #7dd3fc; }
.sys-sec { margin-bottom: 9px; padding: 10px 12px; border-radius: 11px; background: rgba(0, 0, 0, .2); border: 1px solid rgba(255, 255, 255, .08); }
.sys-sec.pay { border-color: rgba(250, 204, 21, .3); }
.sys-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 7px; font-weight: 800; font-size: 13.5px; color: #fde68a; }
.sys-h2 { margin: 2px 0 6px; font-weight: 800; font-size: 12.5px; color: #e5efe8; }
.sys-h2 small { font-weight: 600; color: var(--dim, #9fb0a6); }
.sys-ok { font-size: 11px; font-weight: 700; color: #94a3b8; }
.sys-ok.on { color: #86efac; }
.sys-sec input[type="text"], .sys-sec input[type="password"], .sys-sec select, .sys-filter input, .sys-filter select { width: 100%; min-width: 0; }
.sys-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 6px 0; }
.sys-note { margin-top: 5px; font-size: 11.5px; line-height: 1.5; color: var(--dim, #9fb0a6); }
.sys-note code { color: #c7d2fe; word-break: break-all; }
.sys-sw { display: flex; gap: 8px; align-items: center; font-size: 12.5px; cursor: pointer; }
.sys-sw input { width: 17px; height: 17px; accent-color: #facc15; }
.sys-url { display: flex; gap: 8px; align-items: center; margin-top: 5px; padding: 5px 8px; border-radius: 7px; background: rgba(0, 0, 0, .3); font-size: 11.5px; }
.sys-url > span { flex-shrink: 0; color: var(--dim, #9fb0a6); }
.sys-url code { flex: 1; min-width: 0; color: #a5f3fc; word-break: break-all; }
.sys-mode span { padding: 8px 4px; }
.sys-mode input:checked + span { background: linear-gradient(#b9891a, #7a560c); }
.sys-row { display: flex; gap: 10px; align-items: center; margin: 8px 0; font-size: 12.5px; }
.sys-row > span { flex-shrink: 0; color: var(--dim, #9fb0a6); }
.sys-sub { margin-top: 8px; padding-top: 8px; border-top: 1px dashed rgba(255, 255, 255, .12); }
.sys-filter { display: flex; gap: 6px; align-items: center; margin: 8px 0; }
.sys-filter select { width: 150px; flex-shrink: 0; }
.sys-filter .small { flex-shrink: 0; }
.sys-orders { display: grid; gap: 5px; }
.sys-order { display: grid; grid-template-columns: 150px 1fr auto; gap: 8px; align-items: center; padding: 7px 10px; border-radius: 8px; background: rgba(0, 0, 0, .22); border: 1px solid rgba(255, 255, 255, .07); font-size: 12.5px; }
.sys-order.review { border-color: rgba(56, 189, 248, .55); background: rgba(56, 189, 248, .07); }
.sys-order .so-b small { display: block; color: var(--dim, #9fb0a6); font-size: 11px; }
.sys-order .so-c { display: flex; gap: 5px; }
@media (max-width: 640px) {
  .sys-grid { grid-template-columns: 1fr; }
  .sys-order { grid-template-columns: 1fr; }
  .sys-url { flex-wrap: wrap; }
  .pay-order { flex-direction: column; align-items: flex-start; }
}

/* ============================================================ v3.17 skill book (panel: skills) */
.sb-head { position: relative; display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 14px; overflow: hidden;
  background: radial-gradient(130% 180% at 0% 0%, color-mix(in srgb, var(--c) 38%, transparent), transparent 62%), linear-gradient(135deg, #211b4d, #120f2c);
  border: 1px solid color-mix(in srgb, var(--c) 55%, #3b3470); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08); }
.sb-head::after { content: ''; position: absolute; right: -30px; top: -50px; width: 190px; height: 190px; border-radius: 50%; pointer-events: none; background: radial-gradient(circle, rgba(251, 191, 36, .16), transparent 68%); }
.sb-emblem { flex: none; width: 58px; height: 58px; border-radius: 16px; display: grid; place-items: center; font-size: 31px;
  background: linear-gradient(145deg, color-mix(in srgb, var(--c) 70%, #fff 6%), color-mix(in srgb, var(--c) 45%, #000)); border: 2px solid rgba(255, 255, 255, .28); box-shadow: 0 6px 16px rgba(0, 0, 0, .45), 0 0 18px color-mix(in srgb, var(--c) 45%, transparent); }
.sb-title { flex: 1; min-width: 0; }
.sb-title b { font-size: 18px; color: #fff; letter-spacing: .02em; }
.sb-title small { display: block; margin-top: 2px; font-size: 12px; color: #c9c5e8; line-height: 1.4; }
.sb-job { display: inline-block; margin-left: 8px; padding: 1px 9px; border-radius: 99px; font-size: 11.5px; font-weight: 800; color: #fff; background: color-mix(in srgb, var(--j) 55%, #1a1638); border: 1px solid color-mix(in srgb, var(--j) 80%, #fff); vertical-align: 2px; }
.sb-prog { position: relative; z-index: 1; display: flex; gap: 10px; align-items: center; flex: none; }
.sb-ring { --p: 0; position: relative; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(#fbbf24 calc(var(--p) * 1%), rgba(255, 255, 255, .13) 0); box-shadow: 0 0 12px rgba(251, 191, 36, .25); }
.sb-ring::before { content: ''; position: absolute; inset: 5px; border-radius: 50%; background: #17133a; }
.sb-ring span { position: relative; font-size: 11.5px; color: #c9c5e8; }
.sb-ring b { font-size: 18px; color: #fde68a; }
.sb-next { width: 150px; }
.sb-next small { display: block; font-size: 11px; color: #a8a3cf; }
.sb-next b { display: block; font-size: 13px; color: #fde68a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-next .bar { margin-top: 4px; }

.sb-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 318px; gap: 12px; margin-top: 10px; align-items: start; }
.sb-list { display: grid; gap: 10px; }
.sb-group { padding: 9px 10px 10px; border-radius: 12px; background: rgba(10, 8, 30, .5); border: 1px solid rgba(139, 127, 214, .22); }
.sb-gh { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.sb-gh small { font-size: 11px; color: #9a95c4; }
.sb-gh::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, rgba(139, 127, 214, .45), transparent); }
.sb-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(82px, 1fr)); gap: 8px; }
.sb-tile { font: inherit; color: inherit; cursor: pointer; display: grid; justify-items: center; gap: 5px; padding: 8px 4px 7px; border-radius: 12px; text-align: center;
  background: linear-gradient(180deg, color-mix(in srgb, var(--c) 13%, #1a1640), #131030); border: 1px solid rgba(139, 127, 214, .28); transition: transform .12s, border-color .12s, box-shadow .12s; }
.sb-tile:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--c) 70%, #fff); }
.sb-tile.sel { border-color: #fde68a; box-shadow: 0 0 0 1px #fbbf24, 0 0 16px color-mix(in srgb, var(--c) 55%, transparent); background: linear-gradient(180deg, color-mix(in srgb, var(--c) 30%, #1a1640), #17133a); }
.sb-ico { position: relative; width: 56px; height: 56px; }
.sb-ico img { width: 56px; height: 56px; border-radius: 12px; display: block; box-shadow: 0 3px 9px rgba(0, 0, 0, .5); }
.sb-key { position: absolute; left: -5px; top: -5px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 6px; display: grid; place-items: center; font-style: normal; font-size: 11px; font-weight: 900; color: #1c1917; background: linear-gradient(#fef3c7, #fbbf24); box-shadow: 0 1px 3px rgba(0, 0, 0, .6); }
.sb-lock { position: absolute; left: 50%; bottom: -4px; transform: translateX(-50%); white-space: nowrap; padding: 1px 6px; border-radius: 99px; font-style: normal; font-size: 10px; font-weight: 800; color: #fecaca; background: rgba(20, 8, 16, .92); border: 1px solid rgba(248, 113, 113, .55); }
.sb-tile.locked .sb-ico img { filter: grayscale(.75) brightness(.62); }
.sb-tile.locked .sb-name { color: #8e89b5; }
.sb-name { font-size: 11.5px; font-weight: 700; line-height: 1.25; color: #ebe9fb; min-height: 2.5em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sb-tile.tier3 { border-color: rgba(251, 191, 36, .6); }
.sb-tile.tier3 .sb-ico img { box-shadow: 0 0 0 2px #fbbf24, 0 0 14px rgba(251, 191, 36, .55); }
.sb-tile.tier2 .sb-ico img { box-shadow: 0 0 0 2px #a5b4fc, 0 0 10px rgba(129, 140, 248, .45); }

.sb-detail { position: sticky; top: 0; overflow: hidden; padding: 13px; border-radius: 14px; border: 1px solid color-mix(in srgb, var(--c) 55%, #3b3470);
  background: radial-gradient(140% 90% at 50% 0%, color-mix(in srgb, var(--c) 26%, transparent), transparent 70%), linear-gradient(180deg, #1b173f, #110e29); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07), 0 8px 22px rgba(0, 0, 0, .35); }
.sb-detail.tier3 { border-color: rgba(251, 191, 36, .8); box-shadow: inset 0 0 22px rgba(251, 191, 36, .1), 0 0 16px rgba(251, 191, 36, .18); }
.sb-detail.tier3::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(105deg, transparent 38%, rgba(255, 247, 204, .16) 50%, transparent 62%); background-size: 260% 100%; animation: skShine 3.4s linear infinite; }
.sb-dtop { display: flex; gap: 12px; align-items: center; }
.sb-big { flex: none; width: 84px; height: 84px; border-radius: 18px; display: grid; place-items: center; background: radial-gradient(circle, color-mix(in srgb, var(--c) 55%, transparent), transparent 72%); }
.sb-big img { width: 72px; height: 72px; border-radius: 15px; box-shadow: 0 0 0 2px rgba(255, 255, 255, .22), 0 6px 18px rgba(0, 0, 0, .55), 0 0 22px color-mix(in srgb, var(--c) 60%, transparent); }
.sb-detail.locked .sb-big img { filter: grayscale(.5) brightness(.8); }
.sb-dhead { min-width: 0; }
.sb-dname { font-size: 17px; font-weight: 900; color: color-mix(in srgb, var(--c) 55%, #fff); text-shadow: 0 1px 0 rgba(0, 0, 0, .6); line-height: 1.2; }
.sb-dtags { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; margin-top: 5px; }
.sb-kind { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 99px; color: #dbeafe; background: rgba(59, 130, 246, .2); border: 1px solid rgba(96, 165, 250, .45); }
.sb-state { margin-top: 5px; font-size: 12px; font-weight: 700; }
.sb-ok { color: #86efac; }
.sb-no { color: #fca5a5; }
.sb-lvbar { margin-top: 9px; }
.sb-desc { margin-top: 10px; padding: 9px 10px; border-radius: 10px; font-size: 13px; line-height: 1.55; color: #ecebfa; background: rgba(0, 0, 0, .28); border-left: 3px solid var(--c); }
.sb-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 9px; }
.sb-facts > div { padding: 6px 7px; border-radius: 9px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .08); }
.sb-facts small { display: block; font-size: 10.5px; color: #a8a3cf; }
.sb-facts b { font-size: 12.5px; color: #fff; }
.sb-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9px; }
.sb-tags span { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 99px; color: #fde68a; background: rgba(251, 191, 36, .12); border: 1px solid rgba(251, 191, 36, .35); }
.sb-act { display: flex; gap: 7px; margin-top: 12px; }
.sb-act .btn { flex: 1; font-size: 12.5px; padding: 8px 6px; border-radius: 9px; line-height: 1.2; white-space: nowrap; }
.sb-act .skill-fx { color: #1c1917; }
@media (prefers-reduced-motion: reduce) { .sb-detail.tier3::after { animation: none; } .sb-tile { transition: none; } }
@media (max-width: 760px) {
  .sb-wrap { grid-template-columns: 1fr; }
  .sb-detail { order: -1; padding: 10px; position: relative; }
  .sb-big { width: 64px; height: 64px; }
  .sb-big img { width: 56px; height: 56px; }
  .sb-head { flex-wrap: wrap; padding: 10px; }
  .sb-emblem { width: 46px; height: 46px; font-size: 25px; border-radius: 13px; }
  .sb-title small { display: none; }
  .sb-prog { width: 100%; }
  .sb-ring { width: 44px; height: 44px; }
  .sb-ring b { font-size: 15px; }
  .sb-next { flex: 1; width: auto; }
  .sb-tiles { grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 6px; }
}
/* phone landscape: short screens keep both panes side by side with a slimmer detail page */
@media (max-height: 480px) and (min-width: 600px) {
  .sb-wrap { grid-template-columns: minmax(0, 1fr) 270px; }
  .sb-detail { order: 0; position: relative; padding: 8px 10px; }
  .sb-wrap { margin-top: 0; }
  .sb-head { display: none; }
  .sb-emblem { width: 34px; height: 34px; font-size: 19px; border-radius: 10px; }
  .sb-ring { width: 36px; height: 36px; }
  .sb-ring::before { inset: 4px; }
  .sb-ring b { font-size: 13px; }
  .sb-next .bar { display: none; }
  .sb-big { width: 50px; height: 50px; }
  .sb-big img { width: 44px; height: 44px; }
  .sb-desc { margin-top: 6px; padding: 6px 8px; }
  .sb-act { margin-top: 8px; }
  .sb-prog { width: auto; }
  .sb-facts { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================ v3.17 portal on phones: all three slots and the enter button on one screen */
@media (max-width: 560px) {
  .pt-select { gap: 10px; }
  .pt-screen .screen-title { font-size: 23px; }
  .pt-slots { gap: 7px; flex-wrap: nowrap; width: 100%; align-items: stretch; padding: 6px 0 2px; }
  .pt-slots .char-slot { flex: 1 1 0; width: auto; min-width: 0; max-width: 150px; min-height: 204px; padding: 26px 5px 10px; border-radius: 14px; }
  .pt-slots .char-slot.sel { transform: translateY(-4px); }
  .pt-slots .cs-ped canvas { width: 100%; max-width: 92px; height: auto; margin: 0 auto; }
  .cs-lv { top: 6px; right: 6px; padding: 1px 7px; font-size: 11px; }
  .pt-slots .cs-name { font-size: 13.5px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .pt-slots .cs-sub { font-size: 11px; text-align: center; }
  .pt-slots .cs-map, .pt-slots .cs-guild { font-size: 10px; text-align: center; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .pt-slots .cs-plus { font-size: 30px; }
  .pt-top-actions { flex-wrap: wrap; justify-content: center; }
  .pt-guest-note { font-size: 12px; padding: 7px 10px; }
  /* creation: a smaller stage and two columns of classes keep the form short */
  .pt-stage-card { gap: 6px; padding: 10px; }
  .pt-pedestal canvas { width: 157px; height: 210px; }
  .pt-classes { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .pt-screen .class-card { grid-template-columns: 28px 1fr; gap: 7px; padding: 7px 8px; }
  .pt-screen .cc-ico { font-size: 21px; }
  .pt-screen .cc-name { font-size: 13.5px; }
  .cc-role { display: none; }
  .pt-two { grid-template-columns: 1fr; }
}
/* phone landscape */
@media (max-height: 480px) and (orientation: landscape) {
  .pt-select { gap: 8px; }
  .pt-topbar { grid-template-columns: 1fr auto 1fr; justify-items: stretch; }
  .pt-topbar .pt-acc { justify-self: start; }
  .pt-topbar .pt-top-actions { justify-self: end; }
  .pt-screen .screen-title { font-size: 21px; }
  .pt-top-actions .pt-btn { padding: 5px 9px; font-size: 12px; }
  .pt-slots { flex-wrap: nowrap; gap: 10px; padding: 4px 0 0; }
  .pt-slots .char-slot { width: 168px; min-height: 0; height: 196px; padding: 8px 8px 8px; }
  .pt-slots .cs-ped canvas { width: 86px; height: auto; }
  .pt-slots .cs-name { font-size: 15px; }
  .pt-slots .cs-map, .pt-slots .cs-guild { display: none; }
  .pt-select-actions { grid-template-columns: 1fr auto 1fr; gap: 10px; }
  .pt-select-actions > :first-child { justify-self: start !important; }
  .pt-select-actions > :last-child { justify-self: end !important; }
  .pt-select-actions #btn-enter { order: 0; width: auto; padding-top: 8px; padding-bottom: 8px; }
  .pt-guest-note { font-size: 11.5px; padding: 4px 10px; }
  .pt-pedestal canvas { width: 134px; height: 180px; }
  .pt-stage-card { gap: 5px; padding: 8px; }
}

/* ============================================================ v3.17.1 GM control centre (js/gm.js) */
#menubar button[hidden], body.ui #hud #menubar button.hidden, #gm-menu-btn.hidden { display: none !important; }
.panel-body.gm2-body { padding: 0; overflow: hidden; }
.gm2 { display: grid; grid-template-columns: 196px minmax(0, 1fr); height: min(calc(100dvh - 205px), 740px); }
.gm2-nav { display: flex; flex-direction: column; gap: 2px; padding: 10px 8px; overflow-y: auto; background: linear-gradient(180deg, #171233, #0f0c24); border-right: 1px solid rgba(139, 127, 214, .28); }
.gm2-g { margin: 7px 8px 2px; font-size: 10.5px; font-weight: 800; letter-spacing: .06em; color: #8b86b5; }
.gm2-g:first-child { margin-top: 0; }
.gm2-item { font: inherit; display: flex; align-items: center; gap: 8px; padding: 6px 10px; border: 1px solid transparent; border-radius: 10px; background: none; color: #d6d2f0; cursor: pointer; text-align: left; font-size: 13px; font-weight: 600; }
.gm2-item i { font-style: normal; width: 20px; text-align: center; font-size: 15px; }
.gm2-item span { flex: 1; }
.gm2-item:hover { background: rgba(124, 92, 255, .16); color: #fff; }
.gm2-item.on { background: linear-gradient(90deg, rgba(251, 191, 36, .22), rgba(251, 191, 36, .05)); border-color: rgba(251, 191, 36, .55); color: #fde68a; }
.gm2-badge { min-width: 19px; padding: 0 5px; border-radius: 99px; text-align: center; font-size: 11px; font-weight: 900; color: #fff; background: #ef4444; box-shadow: 0 0 8px rgba(239, 68, 68, .6); }
.gm2-main { overflow-y: auto; padding: 0 14px 14px; }
.gm2-top { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 -14px 12px; padding: 10px 14px; background: linear-gradient(180deg, #1c1740 70%, rgba(28, 23, 64, .92)); border-bottom: 1px solid rgba(139, 127, 214, .28); }
.gm2-title b { display: block; font-size: 17px; color: #fff; }
.gm2-title small { display: block; font-size: 12px; color: #a8a3cf; }
.gm2-pills { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.gm2-pill { padding: 3px 10px; border-radius: 99px; font-size: 11.5px; font-weight: 700; white-space: nowrap; color: #cbd5e1; background: rgba(148, 163, 184, .12); border: 1px solid rgba(148, 163, 184, .3); }
.gm2-pill.on { color: #86efac; background: rgba(74, 222, 128, .12); border-color: rgba(74, 222, 128, .4); }
.gm2-pill.test { color: #fde68a; background: rgba(250, 204, 21, .12); border-color: rgba(250, 204, 21, .4); }
.gm2-pill.live { color: #fff; background: rgba(34, 197, 94, .3); border-color: rgba(74, 222, 128, .6); }
.gm2-page .adm-head, .gm2-page .adm-tabs { display: none; }
.gm2-sec { margin-bottom: 12px; padding: 11px 12px; border-radius: 12px; background: rgba(0, 0, 0, .2); border: 1px solid rgba(255, 255, 255, .08); }
.gm2-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; font-size: 13.5px; font-weight: 800; color: #fde68a; }
.gm2-link { font: inherit; font-size: 12px; font-weight: 700; padding: 0; border: 0; background: none; color: #a5b4fc; cursor: pointer; text-decoration: underline; }
.gm2-todo { display: flex; gap: 10px; align-items: center; padding: 9px 11px; margin-bottom: 6px; border-radius: 10px; background: rgba(148, 163, 184, .08); border: 1px solid rgba(148, 163, 184, .25); border-left-width: 4px; }
.gm2-todo:last-child { margin-bottom: 0; }
.gm2-todo > i { font-style: normal; font-size: 22px; }
.gm2-todo > div { flex: 1; min-width: 0; }
.gm2-todo b { display: block; font-size: 13.5px; color: #fff; }
.gm2-todo small { display: block; font-size: 12px; line-height: 1.45; color: #b9b5d8; }
.gm2-todo.warn { background: rgba(251, 191, 36, .1); border-color: rgba(251, 191, 36, .55); }
.gm2-todo.ok { background: rgba(74, 222, 128, .08); border-color: rgba(74, 222, 128, .45); }
.gm2-todo .btn { flex-shrink: 0; white-space: nowrap; }
.gm2-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.gm2-card { padding: 9px 11px; border-radius: 12px; background: linear-gradient(160deg, rgba(124, 92, 255, .14), rgba(0, 0, 0, .25)); border: 1px solid rgba(139, 127, 214, .28); }
.gm2-card i { font-style: normal; font-size: 16px; }
.gm2-card b { display: block; font-size: 19px; color: #fff; line-height: 1.2; }
.gm2-card small { font-size: 11.5px; color: #a8a3cf; }
.gm2-card.ok { border-color: rgba(74, 222, 128, .5); }
.gm2-card.ok b { color: #86efac; }
.gm2-quick { display: flex; gap: 6px; margin-bottom: 6px; }
.gm2-quick input { flex: 1; min-width: 0; }
.gm2-acts, .gm2-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.gm2-row { margin-top: 7px; }
.gm2-row input, .gm2-row select { min-width: 0; flex: 1 1 120px; max-width: 260px; }
.gm2-row input[type="number"] { flex: 0 0 auto; }
.gm2-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.gm2-2col .gm2-sec { margin-bottom: 0; }
.gm2-ev, .gm2-tool { margin-bottom: 9px; padding: 11px 12px; border-radius: 12px; background: rgba(0, 0, 0, .2); border: 1px solid rgba(255, 255, 255, .08); }
.gm2-ev { display: flex; gap: 12px; }
.gm2-ev > i { font-style: normal; font-size: 28px; }
.gm2-ev > div { flex: 1; min-width: 0; }
.gm2-ev b, .gm2-tool-h b { font-size: 13.5px; color: #fff; }
.gm2-ev small { display: block; font-size: 12px; line-height: 1.45; color: #b9b5d8; }
.gm2-tools { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.gm2-tool { margin-bottom: 0; }
.gm2-tool-h { display: flex; align-items: baseline; gap: 7px; }
.gm2-tool-h i { font-style: normal; }
.gm2-tool-h small { font-size: 11.5px; color: #a8a3cf; }
.gm2-note { margin-bottom: 10px; padding: 8px 11px; border-radius: 10px; font-size: 12.5px; color: #dbeafe; background: rgba(59, 130, 246, .12); border: 1px solid rgba(96, 165, 250, .4); }
.gm2-cheat { margin-top: 10px; padding: 8px 11px; border-radius: 10px; background: rgba(0, 0, 0, .25); font-size: 12.5px; }
.gm2-cheat summary { cursor: pointer; color: #a5b4fc; font-weight: 700; }
.gm2-cheat pre { margin: 8px 0 0; white-space: pre-wrap; font: 12px/1.7 ui-monospace, Consolas, monospace; color: #e2e8f0; }
/* settings pages (js/pay.js) inside the control centre */
.gm2-page .sys-body { max-height: none; }
.sys-f { display: grid; gap: 3px; font-size: 12px; color: #c9c5e8; font-weight: 700; }
.sys-f input { width: 100%; font-weight: 400; }
.sys-f small { font-weight: 400; font-size: 11.5px; line-height: 1.45; color: var(--dim, #9fb0a6); }
.sys-steps { margin: 2px 0 8px; padding-left: 20px; font-size: 12.5px; line-height: 1.6; color: #d6d2f0; }
.sys-steps li { margin-bottom: 3px; }
.sys-steps .sys-url { margin: 4px 0 2px; }
.sys-alert { margin-top: 7px; padding: 7px 10px; border-radius: 8px; font-size: 12px; line-height: 1.45; color: #fde68a; background: rgba(251, 191, 36, .1); border: 1px solid rgba(251, 191, 36, .45); }
.sys-save { position: sticky; bottom: -14px; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 -14px -14px; padding: 10px 14px; background: linear-gradient(0deg, #161236 75%, rgba(22, 18, 54, .9)); border-top: 1px solid rgba(139, 127, 214, .28); }
.sys-now { display: grid; gap: 1px; margin-bottom: 10px; padding: 11px 14px; border-radius: 12px; border: 1px solid rgba(148, 163, 184, .35); border-left-width: 5px; background: rgba(148, 163, 184, .08); }
.sys-now small { font-size: 11px; font-weight: 800; letter-spacing: .05em; color: #a8a3cf; }
.sys-now b { font-size: 17px; color: #fff; }
.sys-now span { font-size: 12.5px; color: #cfcbe8; }
.sys-now.test { border-color: rgba(250, 204, 21, .6); background: rgba(250, 204, 21, .09); }
.sys-now.test b { color: #fde68a; }
.sys-now.live { border-color: rgba(74, 222, 128, .65); background: rgba(74, 222, 128, .1); }
.sys-now.live b { color: #86efac; }
.sys-now.bad { border-color: rgba(248, 113, 113, .7); background: rgba(248, 113, 113, .1); }
.sys-now.bad b { color: #fca5a5; }
.sys-picks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.sys-pick { display: grid; gap: 2px; padding: 10px 11px; border-radius: 11px; cursor: pointer; background: rgba(255, 255, 255, .04); border: 2px solid rgba(139, 127, 214, .28); }
.sys-pick input, .sys-chan-h input { position: absolute; opacity: 0; pointer-events: none; }
.sys-pick b { font-size: 14px; color: #e5e2fb; }
.sys-pick small { font-size: 11.5px; line-height: 1.4; color: #a8a3cf; }
.sys-pick.on { border-color: #fbbf24; background: rgba(251, 191, 36, .13); box-shadow: 0 0 12px rgba(251, 191, 36, .18); }
.sys-pick.on b { color: #fde68a; }
.sys-chan { margin-top: 8px; padding: 10px 11px; border-radius: 11px; border: 2px solid rgba(139, 127, 214, .25); background: rgba(255, 255, 255, .03); }
.sys-chan.on { border-color: #fbbf24; background: rgba(251, 191, 36, .07); }
.sys-chan-h { display: grid; gap: 2px; cursor: pointer; padding-left: 26px; position: relative; }
.sys-chan-h::before { content: ''; position: absolute; left: 2px; top: 3px; width: 14px; height: 14px; border-radius: 50%; border: 2px solid #8b86b5; }
.sys-chan.on .sys-chan-h::before { border-color: #fbbf24; background: radial-gradient(circle, #fbbf24 45%, transparent 50%); }
.sys-chan-h b { font-size: 14px; color: #fff; }
.sys-chan-h small { font-size: 11.5px; line-height: 1.45; color: #a8a3cf; }
.sys-keytag { margin: 8px 0 2px; }
.sys-keytag .pay-st { margin-left: 0; }
.gm2-page .sys-grid { align-items: start; }
/* player pages of js/ui3.js: a little more air and clearer group headers */
.gm2-page .adm-split { grid-template-columns: 280px 1fr; gap: 12px; }
.gm2-page .adm-list { max-height: none; }
.gm2-page .adm-insp { max-height: none; overflow: visible; padding-right: 0; }
.gm2-page .adm-insp details { border-radius: 10px; overflow: hidden; }
.gm2-page .adm-insp summary { padding: 8px 10px; font-size: 13.5px; }
.gm2-page .adm-row { border-radius: 8px; }
.gm2-page .adm-log, .gm2-page .adm-table { max-height: none; }
@media (max-width: 820px), (max-height: 480px) {
  .panel-body.gm2-body { overflow-y: auto; }
  .gm2 { grid-template-columns: 1fr; height: auto; }
  .gm2-nav { flex-direction: row; align-items: center; gap: 4px; padding: 6px; overflow-x: auto; overflow-y: hidden; border-right: 0; border-bottom: 1px solid rgba(139, 127, 214, .28); position: sticky; top: 0; z-index: 4; }
  .gm2-g { display: none; }
  .gm2-item { flex: 0 0 auto; padding: 6px 10px; white-space: nowrap; border-radius: 99px; background: rgba(255, 255, 255, .05); }
  .gm2-main { overflow: visible; padding: 0 9px 10px; }
  .gm2-top { position: static; margin: 0 -9px 9px; padding: 8px 9px; }
  .gm2-title small { display: none; }
  .gm2-title b { white-space: nowrap; font-size: 15.5px; }
  .gm2-top { flex-wrap: wrap; row-gap: 6px; }
  .gm2-pill { font-size: 11px; padding: 2px 8px; }
  .gm2-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gm2-2col, .gm2-tools, .sys-picks { grid-template-columns: 1fr; }
  .gm2-2col .gm2-sec { margin-bottom: 9px; }
  .gm2-todo { flex-wrap: wrap; }
  .gm2-page .adm-split { grid-template-columns: 1fr; }
  .gm2-page .adm-list { max-height: 34vh; overflow-y: auto; }
  .sys-save { bottom: -10px; margin: 0 -9px -10px; padding: 8px 9px; }
}
/* short screens (phone landscape): the control centre may use the whole height */
@media (max-height: 480px) {
  #panels .panel[data-name="gm"] { top: 4px !important; max-height: calc(100dvh - 8px) !important; }
  .gm2-top { padding-top: 5px; padding-bottom: 5px; margin-bottom: 7px; }
}
@media (max-height: 480px) and (min-width: 700px) { .sys-picks { grid-template-columns: repeat(3, 1fr); } .gm2-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); } .gm2-2col, .gm2-tools { grid-template-columns: 1fr 1fr; } }
