/* 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 auto; gap: 8px; }
  .pt-create-head .screen-title { font-size: 20px; text-align: center; margin: 0; }
  .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.tier4 { border-color: rgba(192, 132, 252, .75); background: radial-gradient(circle at 50% 20%, rgba(56, 189, 248, .15), rgba(192, 132, 252, .08) 60%, rgba(14, 11, 30, .6)); }
.sb-tile.tier4 .sb-ico img { box-shadow: 0 0 0 2px #c084fc, 0 0 16px rgba(192, 132, 252, .75), 0 0 25px rgba(56, 189, 248, .5); }
.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-detail.tier4 { border-color: rgba(192, 132, 252, .85); box-shadow: inset 0 0 26px rgba(192, 132, 252, .18), 0 0 22px rgba(56, 189, 248, .25); }
.sb-detail.tier4::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(105deg, transparent 38%, rgba(224, 231, 255, .25) 50%, transparent 62%); background-size: 260% 100%; animation: skShine 2.8s 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, .sb-detail.tier4::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; } }

/* ============================================================ v3.17.2 Stripe connection status (GM payment page) */
.sys-link { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: center; margin: 9px 0; padding: 9px 11px; border-radius: 10px; border: 1px solid rgba(148, 163, 184, .35); border-left-width: 4px; background: rgba(148, 163, 184, .08); }
.sys-link b { font-size: 13px; color: #e5e2fb; }
.sys-link span { grid-column: 1; font-size: 11.5px; line-height: 1.45; color: #b9b5d8; }
.sys-link .btn { grid-column: 2; grid-row: 1 / span 2; white-space: nowrap; }
.sys-link.ok { border-color: rgba(74, 222, 128, .6); background: rgba(74, 222, 128, .09); }
.sys-link.ok b { color: #86efac; }
.sys-link.warn { border-color: rgba(251, 191, 36, .6); background: rgba(251, 191, 36, .09); }
.sys-link.warn b { color: #fde68a; }
.sys-adv { margin-top: 9px; padding: 7px 10px; border-radius: 9px; background: rgba(0, 0, 0, .22); }
.sys-adv summary { cursor: pointer; font-size: 12px; font-weight: 700; color: #a5b4fc; }
.sys-adv[open] summary { margin-bottom: 7px; }
@media (max-width: 640px) { .sys-link { grid-template-columns: 1fr; } .sys-link .btn { grid-column: 1; grid-row: auto; justify-self: start; margin-top: 5px; } }

/* ============================================================ v3.19 upgrade hint (js/ui2.js): new gear that beats what is worn */
#up-hints { position: absolute; left: 50%; bottom: 132px; transform: translateX(-50%); z-index: 40; display: grid; gap: 6px; width: min(430px, 94vw); pointer-events: none; }
.up-card { pointer-events: auto; display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 13px; color: #fff;
  background: linear-gradient(100deg, rgba(34, 28, 78, .97), rgba(18, 14, 44, .97)); border: 1px solid rgba(74, 222, 128, .7);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .55), 0 0 14px rgba(74, 222, 128, .28); animation: upIn .28s ease-out; }
@keyframes upIn { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }
.up-ico { flex: none; width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; background: rgba(0, 0, 0, .35); border: 1px solid rgba(255, 255, 255, .16); cursor: help; }
.up-ico img { width: 34px; height: 34px; image-rendering: pixelated; }
.up-txt { flex: 1; min-width: 0; display: grid; line-height: 1.25; }
.up-txt small { font-size: 11px; font-weight: 700; color: #86efac; }
.up-txt b { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.up-gain { font-size: 11.5px; font-weight: 800; color: #fde68a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.up-gain i { font-style: normal; font-weight: 600; margin-left: 5px; }
.up-gain i.up { color: #86efac; }
.up-gain i.down { color: #fca5a5; }
.up-card .up-wear { flex: none; padding: 7px 12px; white-space: nowrap; }
.up-x { flex: none; width: 26px; height: 26px; border-radius: 50%; border: 0; cursor: pointer; font: 700 12px sans-serif; color: #cbd5e1; background: rgba(255, 255, 255, .1); }
.up-x:hover { background: rgba(248, 113, 113, .45); color: #fff; }
.set-row.set-up { align-items: center; }
.set-row.set-up input { width: 18px; height: 18px; flex: none; accent-color: #4ade80; }
body.ui-land #up-hints { bottom: auto; top: 54px; width: min(400px, 60vw); }
body.ui-port #up-hints { bottom: auto; top: 148px; }
@media (prefers-reduced-motion: reduce) { .up-card { animation: none; } }
.up-all { pointer-events: auto; display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 11px; font-size: 12px; color: #dcfce7; background: rgba(20, 60, 36, .94); border: 1px solid rgba(74, 222, 128, .6); }
.up-all span { flex: 1; min-width: 0; }
.up-all b { color: #fde68a; }
.tt-card { color: #f9a8d4; font-size: 12px; font-weight: 700; }

/* ============================================================ v3.20 job arts: skill book evolution, job cards, the evolution scene */
.tt-art { font-size: 11.5px; font-weight: 700; color: #fde68a; margin: 2px 0 1px; }
.sb-school { display: inline-block; margin-left: 6px; padding: 1px 9px; border-radius: 99px; font-size: 11.5px; font-weight: 800; color: #fff7cc; background: linear-gradient(90deg, color-mix(in srgb, var(--j) 40%, #1a1638), rgba(251, 191, 36, .22)); border: 1px solid rgba(251, 191, 36, .55); }
.sb-tile.art .sb-ico img { box-shadow: 0 0 0 1px color-mix(in srgb, var(--c) 70%, #fff), 0 0 12px color-mix(in srgb, var(--c) 60%, transparent); }
.sb-tile.art2 .sb-ico img { box-shadow: 0 0 0 2px #fff7cc, 0 0 16px color-mix(in srgb, var(--c) 75%, transparent); animation: artPulse 2.4s ease-in-out infinite; }
@keyframes artPulse { 50% { box-shadow: 0 0 0 2px #ffffff, 0 0 24px color-mix(in srgb, var(--c) 90%, transparent); } }
.sb-evo { display: flex; align-items: stretch; gap: 4px; margin-top: 10px; }
.sb-evo > i { align-self: center; font-style: normal; font-weight: 900; color: #fde68a; opacity: .8; }
.sb-evo-cell, .sb-evo-new { flex: 1; min-width: 0; display: grid; justify-items: center; gap: 2px; padding: 6px 3px; border-radius: 10px; text-align: center; background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .09); }
.sb-evo-cell small, .sb-evo-new small { font-size: 9.5px; color: #a8a3cf; white-space: nowrap; }
.sb-evo-cell img, .sb-evo-new img { width: 38px; height: 38px; border-radius: 9px; }
.sb-evo-cell b, .sb-evo-new b { font-size: 10.5px; line-height: 1.2; color: #ecebfa; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.4em; }
.sb-evo-cell em { font-style: normal; font-size: 10px; font-weight: 800; color: #86efac; }
.sb-evo-cell.cur { border-color: #fbbf24; background: linear-gradient(180deg, rgba(251, 191, 36, .18), rgba(251, 191, 36, .04)); box-shadow: 0 0 12px rgba(251, 191, 36, .22); }
.sb-evo-fx { font: inherit; font-size: 10px; font-weight: 800; cursor: pointer; padding: 2px 8px; border-radius: 99px; color: #1c1917; border: 0; background: linear-gradient(180deg, #fde68a, #f59e0b); white-space: nowrap; }
.sb-evo-fx:hover { filter: brightness(1.12); }
.sb-evo-next { margin-top: 6px; padding: 6px 9px; border-radius: 9px; font-size: 11.5px; color: #fef3c7; background: rgba(251, 191, 36, .1); border: 1px dashed rgba(251, 191, 36, .45); }
.sb-evo-paths { margin-top: 10px; display: grid; gap: 6px; }
.sb-evo-h { font-size: 11.5px; font-weight: 800; color: #fde68a; }
.sb-evo-path { display: flex; gap: 8px; align-items: center; padding: 6px 8px; border-radius: 10px; background: color-mix(in srgb, var(--j) 14%, rgba(10, 8, 30, .6)); border: 1px solid color-mix(in srgb, var(--j) 55%, transparent); }
.sb-evo-path img { flex: none; width: 40px; height: 40px; border-radius: 9px; }
.sb-evo-path > div { flex: 1; min-width: 0; }
.sb-evo-path b { font-size: 12.5px; color: #fff; }
.sb-evo-path small { font-size: 10.5px; color: #c9c5e8; }
.sb-evo-path .small { font-size: 11px; color: #ddd9f5; line-height: 1.35; }
.job-arts-h { margin-top: 4px; font-size: 12px; font-weight: 800; color: #fde68a; }
.job-arts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.job-arts span { display: grid; justify-items: center; gap: 2px; padding: 4px 2px; border-radius: 8px; background: rgba(0, 0, 0, .25); cursor: help; }
.job-arts img { width: 34px; height: 34px; border-radius: 8px; }
.job-arts small { font-size: 9.5px; line-height: 1.15; text-align: center; color: #ecebfa; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.3em; }
#art-evo { position: fixed; inset: 0; z-index: 400; display: none; place-items: center; padding: 12px; background: radial-gradient(circle at 50% 38%, color-mix(in srgb, var(--j, #fbbf24) 28%, rgba(4, 3, 14, .9)), rgba(4, 3, 14, .95) 70%); }
#art-evo.show { display: grid; animation: aeIn .45s ease-out; }
@keyframes aeIn { from { opacity: 0; } }
.ae-card { position: relative; overflow: hidden; width: min(760px, 100%); max-height: 96vh; overflow-y: auto; padding: 18px 18px 14px; border-radius: 20px; color: #fff; text-align: center;
  background: linear-gradient(180deg, color-mix(in srgb, var(--j) 22%, #17133a), #0d0a24 70%); border: 2px solid color-mix(in srgb, var(--j) 70%, #fde68a);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .08) inset, 0 20px 60px rgba(0, 0, 0, .7), 0 0 60px color-mix(in srgb, var(--j) 45%, transparent); animation: aeCard .6s cubic-bezier(.2, 1.3, .4, 1); }
@keyframes aeCard { from { transform: scale(.82) translateY(24px); opacity: 0; } }
.ae-rays { position: absolute; left: 50%; top: 70px; width: 900px; height: 900px; margin: -450px 0 0 -450px; pointer-events: none; opacity: .32;
  background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--j2) 70%, transparent) 0 6deg, transparent 6deg 18deg); -webkit-mask: radial-gradient(circle, #000 12%, transparent 62%); mask: radial-gradient(circle, #000 12%, transparent 62%); animation: aeSpin 26s linear infinite; }
@keyframes aeSpin { to { transform: rotate(360deg); } }
.ae-top { position: relative; display: inline-flex; align-items: center; gap: 14px; text-align: left; }
.ae-ico { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; font-size: 40px; background: radial-gradient(circle at 35% 30%, #ffffff55, color-mix(in srgb, var(--j) 70%, #1a1638) 60%); border: 2px solid #fde68a; box-shadow: 0 0 26px color-mix(in srgb, var(--j) 80%, transparent); animation: aeIco 2.2s ease-in-out infinite; }
@keyframes aeIco { 50% { transform: scale(1.07); box-shadow: 0 0 40px color-mix(in srgb, var(--j2) 90%, transparent); } }
.ae-top small { display: block; font-size: 12.5px; font-weight: 800; letter-spacing: .12em; color: #fde68a; }
.ae-top b { display: block; font-size: clamp(22px, 4.4vw, 34px); font-weight: 900; line-height: 1.15; background: linear-gradient(180deg, #ffffff, var(--j2)); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 2px 0 rgba(0, 0, 0, .55)); }
.ae-top em { font-style: normal; font-size: 13px; font-weight: 700; color: color-mix(in srgb, var(--j2) 70%, #fff); }
.ae-sign { position: relative; margin: 8px auto 12px; max-width: 560px; font-size: 12.5px; color: #ddd9f5; }
.ae-grid { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.ae-sk { display: grid; justify-items: center; gap: 2px; padding: 8px 4px 7px; border-radius: 12px; background: rgba(0, 0, 0, .34); border: 1px solid rgba(255, 255, 255, .1); animation: aeGlow .5s ease-out var(--d) both; }
@keyframes aeGlow { from { border-color: rgba(255, 255, 255, .1); box-shadow: none; } 50% { border-color: #fff; box-shadow: 0 0 26px var(--j2); } to { border-color: color-mix(in srgb, var(--j) 75%, #fde68a); box-shadow: 0 0 12px color-mix(in srgb, var(--j) 45%, transparent); } }
.ae-flip { position: relative; width: 60px; height: 60px; }
.ae-flip img { position: absolute; inset: 0; width: 60px; height: 60px; border-radius: 13px; }
.ae-old { animation: aeOut .45s ease-in var(--d) both; }
.ae-new { animation: aeNew .5s cubic-bezier(.2, 1.5, .4, 1) calc(var(--d) + .2s) both; }
@keyframes aeOut { to { transform: scale(.4) rotate(-25deg); opacity: 0; filter: grayscale(1); } }
@keyframes aeNew { from { transform: scale(1.7) rotate(18deg); opacity: 0; filter: brightness(3); } }
.ae-oldn { font-size: 10px; color: #9a95c4; text-decoration: line-through; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.ae-newn { font-size: 12.5px; line-height: 1.2; color: #fff7cc; min-height: 2.4em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; animation: aeIn .4s ease-out calc(var(--d) + .25s) both; }
.ae-sum { font-size: 10px; line-height: 1.3; color: #c9c5e8; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; animation: aeIn .4s ease-out calc(var(--d) + .35s) both; }
.ae-foot { position: sticky; bottom: -14px; z-index: 2; display: flex; justify-content: center; gap: 10px; margin-top: 10px; padding: 10px 0 6px; background: linear-gradient(180deg, transparent, #0d0a24 45%); }
.ae-foot .btn { min-width: 150px; }
@media (max-width: 620px) { .ae-grid { grid-template-columns: repeat(2, 1fr); } .ae-ico { width: 56px; height: 56px; font-size: 30px; } .ae-sum { -webkit-line-clamp: 2; } }
body.ui-land .ae-card { padding: 10px 12px; }
body.ui-land .ae-grid { grid-template-columns: repeat(4, 1fr); gap: 5px; }
body.ui-land .ae-flip, body.ui-land .ae-flip img { width: 40px; height: 40px; }
body.ui-land .ae-sum, body.ui-land .ae-sign { display: none; }
body.ui-land .ae-ico { width: 44px; height: 44px; font-size: 24px; }
@media (prefers-reduced-motion: reduce) { .ae-rays, .ae-ico, .sb-tile.art2 .sb-ico img { animation: none; } }

/* ===== v3.22 — city directory, quest waypoint arrow, capped codex totals ===== */
#mm-guide { margin-left: auto; }
#mm-guide + #mm-zoom { margin-left: 0; }

.cg-top { padding: 8px 10px; margin-bottom: 8px; border-radius: 10px; background: rgba(251, 191, 36, .1); border: 1px solid rgba(251, 191, 36, .28); font-size: 13px; line-height: 1.5; }
.cg-top b { color: #fde68a; }
.cg-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.cg-row { display: flex; align-items: center; gap: 8px; width: 100%; margin: 0 0 4px; padding: 6px 8px; text-align: left; cursor: pointer; color: inherit; font: inherit;
  border-radius: 9px; border: 1px solid rgba(255, 255, 255, .1); background: rgba(255, 255, 255, .045); }
.cg-row:hover, .cg-q:hover { background: rgba(255, 223, 145, .16); border-color: rgba(255, 223, 145, .45); }
.cg-ico { flex: 0 0 22px; font-size: 17px; text-align: center; }
.cg-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.cg-main b { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cg-main em { font-style: normal; font-size: 11px; opacity: .72; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cg-d { flex: 0 0 auto; font-size: 10.5px; opacity: .7; text-align: right; max-width: 92px; line-height: 1.2; }
.cg-quarters { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.cg-q { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 7px 5px; cursor: pointer; color: inherit; font: inherit; text-align: center;
  border-radius: 10px; border: 1px solid rgba(255, 255, 255, .1); background: rgba(255, 255, 255, .045); }
.cg-q > span { font-size: 20px; line-height: 1.1; }
.cg-q b { font-size: 11.5px; font-weight: 600; line-height: 1.25; }
.cg-q .cg-d { max-width: none; text-align: center; }
.cg-q.here { border-color: #fbbf24; background: rgba(251, 191, 36, .16); }
.cg-q.here i { font-style: normal; font-size: 10.5px; color: #fde68a; }
.cg-opt { display: flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 12.5px; opacity: .9; cursor: pointer; }
@media (max-width: 620px) {
  .cg-cols { grid-template-columns: 1fr; }
  .cg-quarters { grid-template-columns: repeat(2, 1fr); }
}

#way { position: fixed; left: 0; top: 0; width: 0; height: 0; z-index: 9; pointer-events: none; }
#way.hidden { display: none; }
#way button { position: absolute; left: 0; top: 0; margin: 0; cursor: pointer; pointer-events: auto; will-change: transform; -webkit-tap-highlight-color: transparent; }
#way .way-arrow { width: 30px; height: 30px; padding: 0; display: grid; place-items: center; border: 0; border-radius: 50%; font-size: 15px; line-height: 1; color: #1c1206;
  background: radial-gradient(circle at 35% 30%, #fff3c4, #fbbf24 60%, #d97706); box-shadow: 0 0 0 2px rgba(28, 18, 6, .75), 0 0 14px rgba(251, 191, 36, .75); animation: wayPulse 1.3s ease-in-out infinite; }
#way .way-text { display: flex; flex-direction: column; align-items: flex-start; padding: 3px 9px 4px; border-radius: 10px; background: rgba(12, 9, 26, .82); border: 1px solid rgba(251, 191, 36, .5);
  color: #fff; font: 600 12px 'Kanit', sans-serif; white-space: nowrap; line-height: 1.25; box-shadow: 0 3px 10px rgba(0, 0, 0, .45); }
#way .way-text b { font-weight: 600; color: #fde68a; }
#way .way-text small { font-size: 10.5px; font-weight: 400; opacity: .82; max-width: 190px; overflow: hidden; text-overflow: ellipsis; }
@keyframes wayPulse { 0%, 100% { box-shadow: 0 0 0 2px rgba(28, 18, 6, .75), 0 0 8px rgba(251, 191, 36, .5); } 50% { box-shadow: 0 0 0 2px rgba(28, 18, 6, .75), 0 0 18px rgba(251, 191, 36, .95); } }
body.ui-touch #way .way-text small { display: none; }
body.hud-hidden #way { display: none; }

.csb-grid.csb-caps { grid-template-columns: repeat(2, 1fr); gap: 5px 14px; }
.csb-row { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 1px 8px; }
.csb-row i { grid-column: 1 / -1; height: 4px; border-radius: 3px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.csb-row i span { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, #34d399, #4ade80); }
.csb-row small { grid-column: 1 / -1; font-size: 10.5px; opacity: .65; margin-top: -1px; }
.csb-row.capped b { color: #fbbf24; }
.csb-row.capped i span { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.csb-row.capped small { color: #fbbf24; opacity: .9; }
.csb-note { margin-top: 7px; font-size: 11px; opacity: .7; line-height: 1.45; }


/* ====== v3.28 PREMIUM PATCH NOTES (pn2) ====== */
.pn2-wrap { display: flex; flex-direction: column; gap: 10px; }
.pn2-entry { border-radius: 14px; border: 1px solid rgba(165,180,252,.25); overflow: hidden; background: rgba(8,6,26,.55); }
.pn2-entry.new { border-color: rgba(253,230,138,.5); box-shadow: 0 0 18px rgba(251,191,36,.15); }
.pn2-header { display: flex; align-items: center; gap: 8px; padding: 10px 14px; background: linear-gradient(135deg, rgba(34,27,74,.98), rgba(52,43,124,.9)); flex-wrap: wrap; }
.pn2-entry.new .pn2-header { background: linear-gradient(135deg, rgba(92,60,0,.98), rgba(120,83,12,.88)); }
.pn2-badge { padding: 2px 9px; border-radius: 999px; font: 700 10.5px 'Kanit',sans-serif; background: rgba(165,180,252,.2); color: #a5b4fc; border: 1px solid rgba(165,180,252,.35); white-space: nowrap; }
.pn2-badge-old { font-size: 10px; opacity: .7; }
.pn2-entry.new .pn2-badge { background: linear-gradient(180deg,#fff3b0,#fbbf24); color: #3b2204; border-color: #fde68a; box-shadow: 0 0 10px rgba(251,191,36,.4); }
.pn2-version { font: 700 13px 'Kanit',sans-serif; color: #a5b4fc; white-space: nowrap; }
.pn2-entry.new .pn2-version { color: #fde68a; }
.pn2-title { flex: 1; font: 600 12.5px/1.35 'Kanit',sans-serif; color: #e2e8f0; min-width: 120px; }
.pn2-entry.new .pn2-title { color: #fef3c7; }
.pn2-date { font: 400 11px 'Sarabun',sans-serif; color: #64748b; white-space: nowrap; }
.pn2-entry.new .pn2-date { color: #b45309; font-weight: 600; }
.pn2-body { padding: 10px 14px; display: flex; flex-direction: column; gap: 6px; }
.pn2-item { display: flex; align-items: flex-start; gap: 9px; }
.pn2-ico { font-size: 15px; line-height: 1.5; flex: none; width: 22px; text-align: center; }
.pn2-text { font: 400 12.5px/1.55 'Sarabun',sans-serif; color: #94a3b8; flex: 1; min-width: 0; }
.pn2-entry.new .pn2-text { color: #cbd5e1; }
/* news header on login card */
.pn2-news-header { display: flex; align-items: center; justify-content: space-between; padding: 0 0 10px; border-bottom: 1px solid rgba(253,230,138,.2); margin-bottom: 10px; gap: 8px; }
.pn2-news-brand { font: 700 12.5px 'Kanit',sans-serif; background: linear-gradient(90deg,#fde68a,#c084fc 50%,#38bdf8); -webkit-background-clip: text; -webkit-text-fill-color: transparent; letter-spacing: .6px; }
.pn2-news-ver { font: 700 11px 'Kanit',sans-serif; padding: 2px 8px; border-radius: 999px; background: linear-gradient(180deg,#fff3b0,#fbbf24); color: #3b2204; white-space: nowrap; }
.pn2-more-btn { display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 10px; padding: 8px 16px; border-radius: 11px; background: rgba(253,230,138,.08); border: 1px solid rgba(253,230,138,.3); color: #fde68a; font: 600 12.5px 'Kanit',sans-serif; cursor: pointer; width: 100%; transition: background .15s, box-shadow .15s; }
.pn2-more-btn:hover { background: rgba(253,230,138,.16); box-shadow: 0 0 12px rgba(251,191,36,.15); }
/* version badge */
.pt-version-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 14px; border-radius: 999px; background: linear-gradient(135deg,rgba(92,60,0,.92),rgba(120,83,12,.75)); border: 1px solid rgba(253,230,138,.5); font: 700 11.5px 'Kanit',sans-serif; color: #fde68a; box-shadow: 0 0 14px rgba(251,191,36,.2); animation: vbPulse 3s ease-in-out infinite; margin-top: 4px; }
@keyframes vbPulse { 0%,100% { box-shadow: 0 0 14px rgba(251,191,36,.2); } 50% { box-shadow: 0 0 26px rgba(251,191,36,.45); } }
/* boss teaser */
.pt-world-teaser { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; padding: 6px 0; }
.pt-boss-chip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; font: 600 11px 'Kanit',sans-serif; border: 1px solid; }
.bc-dot { width: 6px; height: 6px; border-radius: 50%; flex: none; }
/* news-scroll in modal */
.news-modal { max-width: min(640px, 94vw) !important; }
.news-scroll { max-height: 70vh; overflow-y: auto; padding-right: 4px; scrollbar-width: thin; }
/* >>> CREATE v3.33 */
/* creation screen: 16 hairstyles in two rows, a row of faces, a dice for a random look */
.pt-hairs { grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 5px; }
.pt-hairs .pt-pick { padding: 3px 1px 4px; font-size: 9.5px; }
.pt-faces { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.pt-face canvas { border-radius: 8px; background: radial-gradient(circle at 50% 60%, rgba(124, 92, 255, .35), rgba(10, 8, 28, .2)); }
.pt-sec .pt-dice { margin-left: auto; padding: 2px 10px; font-size: 12px; }
@media (max-width: 760px) { .pt-hairs { grid-template-columns: repeat(4, minmax(0, 1fr)); } .pt-hairs .pt-pick { font-size: 10.5px; } .pt-faces { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* <<< CREATE v3.33 */
/* >>> GM CENTRE v3.31 */
/* The GM control centre, restyled: midnight glass, gold line work, one look for every page (the rules above still give the layout). */
#panels .panel[data-name="gm"] { border-color: rgba(251, 191, 36, .55); box-shadow: 0 24px 70px rgba(0, 0, 0, .65), 0 0 0 1px rgba(251, 191, 36, .18), 0 0 46px rgba(124, 92, 255, .22); }
.gm2.gmx { grid-template-columns: 220px minmax(0, 1fr); background: radial-gradient(900px 420px at 88% -12%, rgba(124, 92, 255, .2), transparent 62%), radial-gradient(700px 380px at -8% 108%, rgba(251, 191, 36, .08), transparent 60%), linear-gradient(180deg, #100d2a, #090716); }
.gmx .gm2-nav { gap: 2px; padding: 0 9px 12px; background: linear-gradient(180deg, #18133d, #0c0a20 72%); border-right: 1px solid rgba(251, 191, 36, .22); scrollbar-width: thin; }
.gmx-crest { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 9px; margin: 0 -9px 4px; padding: 12px 12px 10px; background: linear-gradient(180deg, #211a52, rgba(24, 19, 61, .97)); border-bottom: 1px solid rgba(251, 191, 36, .28); }
.gmx-crest svg { width: 34px; height: 34px; flex: none; filter: drop-shadow(0 0 8px rgba(251, 191, 36, .55)); }
.gmx-crest b { display: block; font: 400 15px/1 'Lilita One', 'Kanit', sans-serif; letter-spacing: .1em; color: #fde68a; text-shadow: 0 2px 0 #3b2a05; }
.gmx-crest small { display: block; margin-top: 4px; max-width: 142px; font-size: 10.5px; color: #a8a3cf; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gmx .gm2-g { margin: 11px 8px 3px; font-size: 10px; letter-spacing: .16em; color: #7f79b0; }
.gmx .gm2-g:first-of-type { margin-top: 6px; }
.gmx .gm2-item { position: relative; padding: 6px 9px; border-radius: 10px; color: #cfcaf0; transition: background .15s, color .15s, transform .15s; }
.gmx .gm2-item i { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 8px; background: rgba(255, 255, 255, .06); font-size: 14px; }
.gmx .gm2-item:hover { background: rgba(124, 92, 255, .2); color: #fff; transform: translateX(2px); }
.gmx .gm2-item.on { background: linear-gradient(90deg, rgba(251, 191, 36, .26), rgba(251, 191, 36, .04)); border-color: rgba(251, 191, 36, .5); color: #fff3c4; box-shadow: inset 3px 0 0 #fbbf24; transform: none; }
.gmx .gm2-item.on i { background: linear-gradient(180deg, #fde68a, #f59e0b); box-shadow: 0 0 10px rgba(251, 191, 36, .5); }
.gmx .gm2-main { padding: 0 16px 16px; scrollbar-width: thin; scrollbar-color: rgba(251, 191, 36, .4) transparent; }
.gmx .gm2-top { margin: 0 -16px 14px; padding: 11px 16px; background: linear-gradient(180deg, rgba(21, 17, 54, .98) 70%, rgba(21, 17, 54, .88)); border-bottom: 1px solid rgba(251, 191, 36, .22); }
.gmx .gm2-title em { display: block; font-style: normal; font-size: 10px; font-weight: 800; letter-spacing: .16em; color: #fbbf24; }
.gmx .gm2-title b { font-size: 18px; letter-spacing: .01em; text-shadow: 0 2px 10px rgba(124, 92, 255, .6); }
.gmx .gm2-pill { padding: 4px 11px; font-size: 11.5px; backdrop-filter: blur(4px); }
.gmx #gm2-refresh { border-radius: 99px; }
/* sections and cards */
.gmx .gm2-sec, .gmx .gm2-ev, .gmx .gm2-tool { border-radius: 14px; background: linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .015)); border: 1px solid rgba(165, 155, 235, .2); box-shadow: 0 6px 18px rgba(0, 0, 0, .22), inset 0 1px 0 rgba(255, 255, 255, .05); }
.gmx .gm2-sec { padding: 13px 14px; margin-bottom: 14px; }
.gmx .gm2-h { margin-bottom: 10px; font-size: 13.5px; color: #fde68a; letter-spacing: .01em; }
.gmx .gm2-h::after { content: ''; flex: 1; height: 1px; margin-left: 10px; background: linear-gradient(90deg, rgba(251, 191, 36, .45), transparent); }
.gmx .gm2-h .gm2-link { order: 2; margin-left: 10px; }
.gmx .gm2-card { padding: 11px 12px; border-radius: 13px; background: linear-gradient(155deg, rgba(124, 92, 255, .18), rgba(0, 0, 0, .28)); border: 1px solid rgba(165, 155, 235, .26); }
.gmx .gm2-card b { font-size: 21px; font-family: 'Lilita One', 'Kanit', sans-serif; font-weight: 400; letter-spacing: .02em; }
.gmx .gm2-card.ok { border-color: rgba(251, 191, 36, .6); background: linear-gradient(155deg, rgba(251, 191, 36, .2), rgba(0, 0, 0, .28)); }
.gmx .gm2-card.ok b { color: #fde68a; }
.gmx .gm2-todo { border-radius: 12px; padding: 10px 12px; }
.gmx .gm2-note { border-radius: 12px; background: linear-gradient(90deg, rgba(59, 130, 246, .18), rgba(59, 130, 246, .06)); }
/* form controls: one look on every page of the centre */
.gmx .gm2-page input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]), .gmx .gm2-page select, .gmx .gm2-page textarea { background-color: rgba(7, 5, 20, .72); border: 1px solid rgba(165, 155, 235, .34); border-radius: 9px; color: #f4f2ff; }
.gmx .gm2-page input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):focus, .gmx .gm2-page select:focus, .gmx .gm2-page textarea:focus { outline: none; border-color: #fbbf24; box-shadow: 0 0 0 3px rgba(251, 191, 36, .18); }
.gmx .gm2-page input::placeholder, .gmx .gm2-page textarea::placeholder { color: #8f8ab8; }
.gmx .gm2-quick { gap: 8px; margin-bottom: 8px; }
.gmx .gm2-quick input { padding: 9px 12px; }
/* dashboard */
.gmx-hero { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; padding: 16px 18px; border-radius: 16px; border: 1px solid rgba(251, 191, 36, .45); background: radial-gradient(520px 200px at 0% 0%, rgba(251, 191, 36, .2), transparent 70%), radial-gradient(520px 240px at 100% 100%, rgba(124, 92, 255, .32), transparent 70%), linear-gradient(135deg, #251c5c, #120e30); box-shadow: 0 10px 30px rgba(0, 0, 0, .4), inset 0 1px 0 rgba(255, 255, 255, .1); }
.gmx-ring { --p: 0; flex: none; width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(#4ade80 calc(var(--p) * 1%), rgba(255, 255, 255, .1) 0); box-shadow: 0 0 22px rgba(74, 222, 128, .35); }
.gmx-ring > div { width: 78px; height: 78px; border-radius: 50%; display: grid; place-content: center; text-align: center; background: radial-gradient(circle at 50% 30%, #2a2166, #100c2b); }
.gmx-ring b { display: block; font: 400 28px/1 'Lilita One', 'Kanit', sans-serif; color: #86efac; }
.gmx-ring small { font-size: 10.5px; color: #b9b5d8; }
.gmx-hero-info { flex: 1; min-width: 0; }
.gmx-hero-t { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font: 400 21px/1.1 'Lilita One', 'Kanit', sans-serif; letter-spacing: .06em; color: #fde68a; text-shadow: 0 2px 0 #3b2a05; }
.gmx-hero-t span { font: 700 12px 'Kanit', sans-serif; letter-spacing: 0; padding: 2px 9px; border-radius: 99px; color: #1c1107; background: linear-gradient(180deg, #fde68a, #f59e0b); text-shadow: none; }
.gmx-hero-t em { font: 700 11.5px 'Kanit', sans-serif; font-style: normal; letter-spacing: 0; text-shadow: none; padding: 2px 9px; border-radius: 99px; }
.gmx-hero-t em.ok { color: #86efac; background: rgba(74, 222, 128, .14); border: 1px solid rgba(74, 222, 128, .45); }
.gmx-hero-t em.warn { color: #fde68a; background: rgba(251, 191, 36, .16); border: 1px solid rgba(251, 191, 36, .6); }
.gmx-hero-s { margin: 7px 0 9px; font-size: 12px; line-height: 1.5; color: #c9c5e8; }
.gmx-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.gmx-chip { padding: 3px 10px; border-radius: 99px; font-size: 11.5px; color: #cbd5e1; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .14); white-space: nowrap; }
.gmx-chip b { color: #fff; }
.gmx-chip.on { color: #fde68a; background: rgba(251, 191, 36, .16); border-color: rgba(251, 191, 36, .6); }
.gmx-chip.on b { color: #fde047; }
.gmx-chip.ev { color: #f5d0fe; background: rgba(192, 132, 252, .16); border-color: rgba(192, 132, 252, .5); }
.gmx-hero-act { display: flex; flex-direction: column; gap: 7px; flex: none; }
.gmx-hero-act .btn { white-space: nowrap; }
.gmx-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.gmx-kpi { --c: 165, 155, 235; font: inherit; text-align: left; display: flex; align-items: center; gap: 11px; padding: 11px 12px; border-radius: 14px; cursor: pointer; color: inherit; background: linear-gradient(150deg, rgba(var(--c), .2), rgba(0, 0, 0, .3)); border: 1px solid rgba(var(--c), .42); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06); transition: transform .15s, box-shadow .15s; }
.gmx-kpi:disabled { cursor: default; }
.gmx-kpi:not(:disabled):hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(var(--c), .25), inset 0 1px 0 rgba(255, 255, 255, .08); }
.gmx-kpi > i { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; font-style: normal; font-size: 19px; background: rgba(var(--c), .26); border: 1px solid rgba(var(--c), .5); }
.gmx-kpi > div { min-width: 0; }
.gmx-kpi b { display: block; font: 400 21px/1.1 'Lilita One', 'Kanit', sans-serif; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gmx-kpi small { display: block; font-size: 11.5px; color: #b9b5d8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gmx-kpi em { display: block; font-style: normal; font-size: 10.5px; color: rgb(var(--c)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gmx-kpi.violet { --c: 167, 139, 250; } .gmx-kpi.blue { --c: 96, 165, 250; } .gmx-kpi.teal { --c: 45, 212, 191; } .gmx-kpi.amber { --c: 251, 191, 36; }
.gmx-kpi.green { --c: 74, 222, 128; } .gmx-kpi.red { --c: 248, 113, 113; } .gmx-kpi.pink { --c: 244, 114, 182; } .gmx-kpi.slate { --c: 148, 163, 184; }
.gmx-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 4px; }
.gmx-tiles.five { grid-template-columns: repeat(5, minmax(0, 1fr)); margin-top: 0; }
.gmx-tile { font: inherit; text-align: left; display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; cursor: pointer; color: #e9e6ff; background: linear-gradient(160deg, rgba(124, 92, 255, .2), rgba(0, 0, 0, .28)); border: 1px solid rgba(165, 155, 235, .3); transition: transform .15s, border-color .15s, box-shadow .15s; }
.gmx-tile:hover { transform: translateY(-2px); border-color: rgba(251, 191, 36, .7); box-shadow: 0 8px 18px rgba(0, 0, 0, .35); }
.gmx-tile i { grid-row: span 2; font-style: normal; font-size: 22px; }
.gmx-tile b { font-size: 13px; color: #fff; }
.gmx-tile small { font-size: 11px; color: #b9b5d8; }
.gmx-tiles.five .gmx-tile { grid-template-columns: 1fr; }
.gmx-tile.gold { background: linear-gradient(160deg, rgba(251, 191, 36, .26), rgba(0, 0, 0, .28)); border-color: rgba(251, 191, 36, .6); }
.gmx-tile.gold b { color: #fde68a; }
.gmx-tile.red { background: linear-gradient(160deg, rgba(248, 113, 113, .24), rgba(0, 0, 0, .28)); border-color: rgba(248, 113, 113, .55); }
/* events */
.gmx-evgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.gmx .gm2-ev { --c: 165, 155, 235; margin-bottom: 0; padding: 13px 14px; gap: 13px; border-color: rgba(var(--c), .4); background: linear-gradient(150deg, rgba(var(--c), .16), rgba(0, 0, 0, .24)); }
.gmx .gm2-ev > i { flex: none; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 14px; font-size: 27px; background: rgba(var(--c), .24); border: 1px solid rgba(var(--c), .5); }
.gmx .gm2-ev b { font-size: 14.5px; }
.gmx .gm2-ev.gold { --c: 251, 191, 36; } .gmx .gm2-ev.violet { --c: 167, 139, 250; } .gmx .gm2-ev.red { --c: 248, 113, 113; } .gmx .gm2-ev.blue { --c: 96, 165, 250; } .gmx .gm2-ev.teal { --c: 45, 212, 191; } .gmx .gm2-ev.green { --c: 74, 222, 128; }
/* tools & balance */
.gmx-toolsec { display: flex; align-items: center; margin: 16px 0 8px; font-size: 13.5px; font-weight: 800; color: #fde68a; }
.gmx-toolsec::after { content: ''; flex: 1; height: 1px; margin-left: 10px; background: linear-gradient(90deg, rgba(251, 191, 36, .45), transparent); }
.gmx .gm2-tools { gap: 10px; }
.gmx .gm2-tool { padding: 12px 13px; }
.gmx .gm2-tool-h { flex-wrap: wrap; }
.gmx .gm2-tool-h i { width: 26px; height: 26px; display: inline-grid; place-items: center; border-radius: 8px; background: rgba(124, 92, 255, .24); align-self: center; }
.gmx-rate .gm2-row input[type="number"] { width: 96px; font-weight: 700; font-size: 14px; }
.gmx-picks { display: flex; gap: 4px; margin-left: auto; }
.gmx-savebar { position: sticky; bottom: -16px; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 0 -16px -16px; padding: 11px 16px; background: linear-gradient(180deg, rgba(21, 17, 54, .9), #151136); border-top: 1px solid rgba(251, 191, 36, .35); }
.gmx-savebar label { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; color: #fde68a; }
.gmx-savebar input[type="checkbox"] { width: 18px; height: 18px; }
.gmx-savebar > div { display: flex; gap: 8px; }
.gmx-savebar #rate-save { padding: 7px 20px; font-size: 14px; }
/* library */
.gmx-libbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.gmx-tabs { display: flex; gap: 6px; }
.gmx-tab { font: inherit; font-size: 13px; font-weight: 700; padding: 6px 13px; border-radius: 99px; cursor: pointer; color: #cfcaf0; background: rgba(255, 255, 255, .06); border: 1px solid rgba(165, 155, 235, .3); }
.gmx-tab em { font-style: normal; font-size: 11px; margin-left: 4px; padding: 0 6px; border-radius: 99px; background: rgba(0, 0, 0, .35); }
.gmx-tab.on { color: #1c1107; background: linear-gradient(180deg, #fde68a, #f59e0b); border-color: #fbbf24; }
.gmx-libbar input { flex: 0 1 240px; min-width: 150px; padding: 7px 11px; }
.gmx-lib { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.gmx-lib.mounts { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.gmx-lib-item { display: flex; flex-direction: column; gap: 3px; padding: 8px; border-radius: 13px; background: linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(0, 0, 0, .25)); border: 1px solid rgba(165, 155, 235, .24); min-width: 0; }
.gmx-lib-item:hover { border-color: rgba(251, 191, 36, .6); }
.gmx-lib-art { display: grid; place-items: center; border-radius: 9px; overflow: hidden; background: #0b0920; aspect-ratio: 1; }
.gmx-lib.mounts .gmx-lib-art { aspect-ratio: 16 / 10; }
.gmx-lib.cards .gmx-lib-art { aspect-ratio: 280 / 410; background: none; }
.gmx-lib-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gmx-lib.cards .gmx-lib-art img { object-fit: contain; }
.gmx-lib-item b { margin-top: 4px; font-size: 12.5px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gmx-lib-item code { font: 600 10.5px ui-monospace, Consolas, monospace; color: #a5b4fc; cursor: copy; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gmx-lib-item code:hover { color: #fde68a; }
.gmx-lib-item small { font-size: 11px; color: #b9b5d8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gmx-lib-item .btn { margin-top: 4px; }
@media (max-width: 820px), (max-height: 480px) {
  .gm2.gmx { grid-template-columns: 1fr; }
  .gmx .gm2-nav { padding: 6px; border-right: 0; border-bottom: 1px solid rgba(251, 191, 36, .25); }
  .gmx-crest { position: static; margin: 0 4px 0 0; padding: 0; background: none; border: 0; flex: none; }
  .gmx-crest svg { width: 28px; height: 28px; }
  .gmx-crest > div { display: none; }
  .gmx .gm2-item { padding: 5px 10px 5px 6px; border-radius: 99px; background: rgba(255, 255, 255, .05); transform: none !important; }
  .gmx .gm2-item.on { box-shadow: none; }
  .gmx .gm2-item i { width: 24px; height: 24px; border-radius: 50%; }
  .gmx .gm2-main { padding: 0 10px 12px; }
  .gmx .gm2-top { margin: 0 -10px 10px; padding: 8px 10px; }
  .gmx .gm2-title em { display: none; }
  .gmx-hero { flex-wrap: wrap; gap: 12px; padding: 12px; }
  .gmx-ring { width: 76px; height: 76px; }
  .gmx-ring > div { width: 62px; height: 62px; }
  .gmx-ring b { font-size: 22px; }
  .gmx-hero-info { flex: 1 1 200px; }
  .gmx-hero-t { font-size: 17px; }
  .gmx-hero-act { flex-direction: row; flex: 1 1 100%; }
  .gmx-hero-act .btn { flex: 1; }
  .gmx-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .gmx-tiles, .gmx-tiles.five { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gmx-evgrid { grid-template-columns: 1fr; }
  .gmx-picks { margin-left: 0; }
  .gmx-savebar { bottom: -12px; margin: 0 -10px -12px; padding: 9px 10px; }
  .gmx-lib { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); }
  .gmx-lib.mounts { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}
@media (max-height: 480px) and (min-width: 700px) { .gmx-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } .gmx-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } .gmx-tiles.five { grid-template-columns: repeat(5, minmax(0, 1fr)); } .gmx-evgrid { grid-template-columns: 1fr 1fr; } }
/* <<< GM CENTRE v3.31 */
/* GM dashboard v3.38: do new players come back? */
.gmx-rets { display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(4, minmax(0, 1fr)); gap: 10px; }
.gmx-ret-now { display: grid; align-content: center; gap: 2px; padding: 11px 13px; border-radius: 14px; border: 1px solid rgba(251, 191, 36, .45); background: linear-gradient(150deg, rgba(251, 191, 36, .16), rgba(0, 0, 0, .28)); }
.gmx-ret-now b { font: 400 27px/1 'Lilita One', 'Kanit', sans-serif; color: #fde68a; } .gmx-ret-now small { font-size: 11.5px; color: #d8d4f5; }
.gmx-ret-now span { margin-top: 5px; font-size: 11px; line-height: 1.5; color: #a8a3cf; } .gmx-ret-now u { text-decoration: none; font-weight: 700; color: #fff; }
.gmx-ret { --t: 165, 155, 235; font: inherit; text-align: left; display: grid; gap: 3px; padding: 10px 12px; border-radius: 14px; cursor: pointer; color: inherit; border: 1px solid rgba(var(--t), .4); background: linear-gradient(150deg, rgba(var(--t), .16), rgba(0, 0, 0, .28)); transition: transform .12s, filter .12s; }
.gmx-ret:hover { transform: translateY(-2px); filter: brightness(1.12); }
.gmx-ret.good { --t: 74, 222, 128; } .gmx-ret.mid { --t: 251, 191, 36; } .gmx-ret.low { --t: 248, 113, 113; }
.gmx-ret small { font-size: 11.5px; color: #d8d4f5; } .gmx-ret b { font: 400 25px/1 'Lilita One', 'Kanit', sans-serif; color: rgb(var(--t)); }
.gmx-ret i { display: block; height: 5px; border-radius: 5px; background: linear-gradient(90deg, rgb(var(--t)) calc(var(--p) * 1%), rgba(255, 255, 255, .1) 0); }
.gmx-ret em { font-style: normal; font-size: 10.5px; color: #9a95c4; }
.gmx-ret-tip { margin-top: 9px; font-size: 11px; line-height: 1.55; color: #9a95c4; }
.st-tbl td.st-open { font-style: italic; opacity: .7; } .st-tbl tr.st-sum td { font-weight: 700; color: #fde68a; border-top: 1px solid rgba(251, 191, 36, .4); }
@media (max-width: 820px), (max-height: 480px) { .gmx-rets { grid-template-columns: repeat(2, minmax(0, 1fr)); } .gmx-ret-now { grid-column: 1 / -1; } }
/* >>> GM PLAYERS v3.38 */
/* The player desk of the GM control centre (js/gm-players.js): the list on the left, the chosen character on the right.
   On a wide window both panes scroll by themselves inside the window; on a phone one pane shows at a time. */
.gm2-main[data-page="players"] { display: flex; flex-direction: column; overflow: hidden; padding-bottom: 0; }
.gm2-main[data-page="players"] .gm2-top { flex: none; margin-bottom: 12px; }
.gm2-page.pg-players { flex: 1 1 auto; min-height: 0; }
.gmp { display: grid; grid-template-columns: 322px minmax(0, 1fr); gap: 14px; height: 100%; min-height: 0; font-size: 13px; }
.gmp ::-webkit-scrollbar { width: 8px; } .gmp ::-webkit-scrollbar-thumb { background: rgba(251, 191, 36, .32); border-radius: 8px; }
/* buttons: the centre's own compact kind, not the game's chunky ones */
.gmp .btn { font: 600 12px/1.2 'Kanit', sans-serif; padding: 6px 11px; border-radius: 8px; border: 1px solid rgba(165, 155, 235, .42); background: linear-gradient(180deg, #37307a, #231d55); color: #f1eeff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12); text-shadow: none; white-space: nowrap; cursor: pointer; transition: filter .12s, transform .08s; }
.gmp .btn:hover { filter: brightness(1.18); } .gmp .btn:active { transform: translateY(1px); }
.gmp .btn:disabled { opacity: .4; cursor: default; filter: none; }
.gmp .btn.btn-gold { background: linear-gradient(180deg, #fde68a, #f59e0b); border-color: #fff3c4; color: #3a2204; }
.gmp .btn.btn-danger { background: linear-gradient(180deg, #dc2626, #7f1d1d); border-color: #fca5a5; color: #fff; }
.gmp .btn.btn-warn { background: linear-gradient(180deg, #d97706, #7c2d12); border-color: #fdba74; color: #fff; }
.gmp code { font: 11px/1 ui-monospace, Consolas, monospace; padding: 2px 5px; border-radius: 5px; background: rgba(0, 0, 0, .35); color: #c7d2fe; user-select: all; }
.gmp .dim { color: #9a95c4; } .gmp .gold { color: #fde68a; }
.gmp-live { color: #86efac; font-weight: 600; }
.gmp-b { display: inline-block; font: 700 9.5px/1.5 'Kanit', sans-serif; font-style: normal; padding: 0 6px; border-radius: 99px; background: rgba(255, 255, 255, .1); color: #d8d4f5; white-space: nowrap; }
.gmp-b.on, .gmp-b.ok { background: rgba(34, 197, 94, .22); color: #86efac; } .gmp-b.gm { background: rgba(59, 130, 246, .28); color: #bfdbfe; } .gmp-b.prem { background: rgba(251, 191, 36, .24); color: #fde68a; }
.gmp-b.ban, .gmp-b.bad { background: rgba(239, 68, 68, .3); color: #fecaca; } .gmp-b.mute, .gmp-b.warn { background: rgba(249, 115, 22, .28); color: #fed7aa; } .gmp-b.note { background: rgba(250, 204, 21, .18); } .gmp-b.guest { background: rgba(148, 163, 184, .25); color: #cbd5e1; }

/* ---- the list */
.gmp-list { display: flex; flex-direction: column; min-height: 0; border-radius: 14px; border: 1px solid rgba(165, 155, 235, .22); background: linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .012)); overflow: hidden; }
.gmp-search { position: relative; display: flex; align-items: center; margin: 10px 10px 8px; }
.gmp-search span { position: absolute; left: 11px; font-size: 13px; opacity: .8; pointer-events: none; }
.gmx .gm2-page .gmp .gmp-search input { width: 100%; padding: 9px 34px 9px 34px; border-radius: 99px; font-size: 13px; }
.gmp-search button { position: absolute; right: 7px; width: 22px; height: 22px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .14); color: #fff; font-size: 11px; cursor: pointer; }
.gmp-chips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; padding: 0 10px 9px; }
.gmp-chip { font: 600 11px/1 'Kanit', sans-serif; display: flex; align-items: center; justify-content: space-between; gap: 3px; padding: 5px 5px 5px 8px; white-space: nowrap; overflow: hidden; border-radius: 99px; border: 1px solid rgba(165, 155, 235, .28); background: rgba(255, 255, 255, .04); color: #cfcaf0; cursor: pointer; transition: background .12s, border-color .12s; }
.gmp-chip b { font-weight: 700; font-size: 10.5px; padding: 1px 6px; border-radius: 99px; background: rgba(0, 0, 0, .35); color: #fff; }
.gmp-chip:hover { background: rgba(124, 92, 255, .22); }
.gmp-chip.zero { opacity: .5; }
.gmp-chip.on { opacity: 1; border-color: #fbbf24; background: linear-gradient(180deg, rgba(251, 191, 36, .3), rgba(251, 191, 36, .1)); color: #fff3c4; }
.gmp-chip.on b { background: #fbbf24; color: #2a1a04; }
.gmp-chip.f-ban:not(.zero) b { background: #b91c1c; } .gmp-chip.f-mute:not(.zero) b { background: #c2410c; } .gmp-chip.f-online:not(.zero) b { background: #15803d; }
.gmp-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 12px; border-top: 1px solid rgba(165, 155, 235, .16); border-bottom: 1px solid rgba(165, 155, 235, .16); background: rgba(0, 0, 0, .2); font-size: 11.5px; color: #b3aedb; }
.gmp-bar b { color: #fde68a; }
.gmp-bar label { display: flex; align-items: center; gap: 6px; }
.gmx .gm2-page .gmp-bar select { padding: 4px 8px; font-size: 11.5px; border-radius: 8px; max-width: 168px; }
.gmp-rows { flex: 1 1 auto; min-height: 120px; overflow-y: auto; padding: 6px; }
.gmp-row { width: 100%; display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 9px; padding: 6px 8px; margin-bottom: 3px; border: 1px solid transparent; border-radius: 11px; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; transition: background .12s; }
.gmp-row:hover { background: rgba(124, 92, 255, .16); }
.gmp-row.sel { background: linear-gradient(90deg, rgba(251, 191, 36, .24), rgba(251, 191, 36, .05)); border-color: rgba(251, 191, 36, .55); box-shadow: inset 3px 0 0 #fbbf24; }
.gmp-row.banned .gmp-rn b { color: #fca5a5; text-decoration: line-through; text-decoration-color: rgba(252, 165, 165, .5); }
.gmp-ava { position: relative; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--c) 55%, #241d5c), #0d0a22 78%); box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--c) 70%, #fff), 0 0 0 3px rgba(4, 5, 14, .7); overflow: hidden; }
.gmp-ava canvas { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; opacity: 0; }
.gmp-ava.drawn canvas { opacity: 1; } .gmp-ava em { font-style: normal; font-size: 18px; } .gmp-ava.drawn em { display: none; }
.gmp-row.on .gmp-ava { box-shadow: 0 0 0 1.5px #4ade80, 0 0 0 3px rgba(4, 5, 14, .7), 0 0 10px rgba(74, 222, 128, .55); }
.gmp-rm { min-width: 0; display: grid; gap: 1px; }
.gmp-rn { display: flex; align-items: center; gap: 5px; min-width: 0; }
.gmp-rn b { font-size: 13.5px; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gmp-rn u { text-decoration: none; font-size: 11px; font-weight: 700; color: #fde68a; white-space: nowrap; }
.gmp-rm small { font-size: 11px; color: #9a95c4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gmp-rv { display: grid; gap: 3px; justify-items: end; font-size: 11px; color: #c9c5ea; white-space: nowrap; text-align: right; max-width: 112px; }
.gmp-rv > span { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 3px; }
.gmp-rv:empty, .gmp-rv > span:empty { display: none; }
.gmp-pager { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 7px 10px; border-top: 1px solid rgba(165, 155, 235, .16); font-size: 11.5px; color: #b3aedb; }
.gmp-empty { padding: 34px 16px; text-align: center; color: #9a95c4; line-height: 1.9; }

/* ---- the chosen character */
.gmp-detail { min-height: 0; overflow-y: auto; padding-right: 4px; padding-bottom: 14px; container: gmpd / inline-size; }
.gmp-detail.empty { display: grid; place-items: center; border-radius: 14px; border: 1px dashed rgba(165, 155, 235, .3); }
.gmp-hello { max-width: 330px; text-align: center; display: grid; gap: 8px; color: #b3aedb; line-height: 1.6; }
.gmp-hello b { font-size: 16px; color: #fde68a; }
.gmp-back { display: none; }
.gmp-head { position: relative; display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 4px 14px; padding: 12px 14px; border-radius: 16px; border: 1px solid rgba(251, 191, 36, .42);
  background: radial-gradient(420px 170px at 0% 0%, color-mix(in srgb, var(--c) 34%, transparent), transparent 70%), radial-gradient(420px 200px at 100% 100%, rgba(124, 92, 255, .26), transparent 70%), linear-gradient(135deg, #1c1650, #0f0c2a);
  box-shadow: 0 10px 26px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .08); }
.gmp-portrait { width: 96px; height: 112px; border-radius: 14px; overflow: hidden; display: grid; place-items: end center; background: radial-gradient(circle at 50% 28%, color-mix(in srgb, var(--c) 46%, #2a2166), #0b0920 80%); box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--c) 65%, #fde68a), 0 0 0 4px rgba(4, 5, 14, .6), 0 0 18px color-mix(in srgb, var(--c) 40%, transparent); }
.gmp-portrait canvas { width: 84px; height: 120px; image-rendering: pixelated; margin-bottom: -10px; }
.gmp-hm { min-width: 0; display: grid; gap: 3px; align-content: start; }
.gmp-hn { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.gmp-hn b { font: 400 22px/1.1 'Lilita One', 'Kanit', sans-serif; letter-spacing: .01em; color: #fff; text-shadow: 0 2px 0 rgba(0, 0, 0, .5); }
.gmp-hs { font-size: 12.5px; color: #e4e0ff; } .gmp-hs b { color: #fde68a; }
.gmp-flag { margin-top: 3px; padding: 4px 10px; border-radius: 9px; font-size: 12px; line-height: 1.45; }
.gmp-flag.bad { background: rgba(185, 28, 28, .38); border: 1px solid rgba(252, 165, 165, .55); color: #fee2e2; }
.gmp-flag.warn { background: rgba(194, 65, 12, .34); border: 1px solid rgba(253, 186, 116, .5); color: #ffedd5; }
.gmp-flag.note { background: rgba(250, 204, 21, .12); border: 1px solid rgba(250, 204, 21, .32); color: #fef9c3; }
.gmp-quickbar { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; margin-top: 8px; }
.gmp-quickbar .btn { padding: 7px 4px; overflow: hidden; text-overflow: ellipsis; }
.gmp-tabs { position: sticky; top: 0; z-index: 2; display: flex; gap: 4px; margin: 12px 0 12px; padding: 4px; border-radius: 12px; background: rgba(12, 9, 34, .96); border: 1px solid rgba(165, 155, 235, .22); overflow-x: auto; scrollbar-width: none; }
.gmp-tabs button { flex: 1 0 auto; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 7px 10px; border: 0; border-radius: 9px; background: transparent; color: #bdb8e0; font: 600 12.5px/1 'Kanit', sans-serif; white-space: nowrap; cursor: pointer; }
.gmp-tabs button i { font-style: normal; }
.gmp-tabs button:hover { background: rgba(124, 92, 255, .2); color: #fff; }
.gmp-tabs button.on { background: linear-gradient(180deg, #fde68a, #f59e0b); color: #33200a; box-shadow: 0 2px 10px rgba(251, 191, 36, .35); }
.gmp-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.gmp-stat { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 7px; align-items: center; padding: 8px 9px; border-radius: 12px; background: linear-gradient(155deg, rgba(124, 92, 255, .17), rgba(0, 0, 0, .28)); border: 1px solid rgba(165, 155, 235, .24); }
.gmp-stat span { grid-row: 1 / span 2; font-size: 16px; }
.gmp-stat b { font: 400 14.5px/1.15 'Lilita One', 'Kanit', sans-serif; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gmp-stat small { font-size: 10.5px; color: #a5a0cf; }
.gmp-stat.gold { border-color: rgba(251, 191, 36, .55); } .gmp-stat.gold b { color: #fde68a; font-size: 13.5px; }
.gmp-2 { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; align-items: start; }
@container gmpd (min-width: 600px) { .gmp-2, .gmp-state { grid-template-columns: repeat(2, minmax(0, 1fr)); } .gmp-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.gmp-box { margin-bottom: 12px; padding: 12px 13px; border-radius: 14px; border: 1px solid rgba(165, 155, 235, .2); background: linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .015)); box-shadow: 0 6px 18px rgba(0, 0, 0, .2), inset 0 1px 0 rgba(255, 255, 255, .05); }
.gmp-2 > .gmp-box { margin-bottom: 0; } .gmp-2 { margin-bottom: 12px; }
.gmp-box h4 { margin: 0 0 10px; padding-bottom: 7px; font: 700 13.5px/1.3 'Kanit', sans-serif; color: #fde68a; border-bottom: 1px solid transparent; border-image: linear-gradient(90deg, rgba(251, 191, 36, .45), transparent) 1; }
.gmp-box h4 small { margin-left: 8px; font-weight: 400; font-size: 11px; color: #9a95c4; }
.gmp-dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 5px 12px; margin: 0 0 10px; font-size: 12.5px; }
.gmp-dl dt { color: #9a95c4; white-space: nowrap; } .gmp-dl dd { margin: 0; color: #f1eeff; min-width: 0; overflow-wrap: anywhere; }
.gmp-days { display: grid; grid-template-columns: repeat(14, 1fr); gap: 3px; margin-bottom: 4px; }
.gmp-days i { height: 14px; border-radius: 4px; background: rgba(255, 255, 255, .08); }
.gmp-days i.on { background: linear-gradient(180deg, #86efac, #16a34a); box-shadow: 0 0 6px rgba(74, 222, 128, .45); }
.gmp-days i.pre { background: repeating-linear-gradient(135deg, rgba(255, 255, 255, .05) 0 3px, transparent 3px 6px); }
.gmp-sib { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin-top: 10px; }
.gmp-sib small { flex: 0 0 100%; }
.gmp-sibb { font: 600 11.5px/1 'Kanit', sans-serif; padding: 5px 9px; border-radius: 99px; border: 1px solid rgba(165, 155, 235, .3); background: rgba(255, 255, 255, .05); color: #e4e0ff; cursor: pointer; }
.gmp-sibb u { text-decoration: none; color: #fde68a; } .gmp-sibb.on { border-color: #fbbf24; background: rgba(251, 191, 36, .2); cursor: default; }
.gmx .gm2-page .gmp input, .gmx .gm2-page .gmp select, .gmx .gm2-page .gmp textarea { padding: 6px 9px; font: 12.5px/1.3 'Kanit', sans-serif; min-width: 0; }
.gmx .gm2-page .gmp textarea { width: 100%; resize: vertical; display: block; }
.gmp input.w-num { width: 104px; flex: 0 0 104px; }
.gmp-f { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 4px 10px; align-items: center; padding: 6px 0; border-top: 1px dashed rgba(165, 155, 235, .14); }
.gmp-f:first-of-type { border-top: 0; padding-top: 0; }
.gmp-f label { font-size: 12.5px; color: #d8d4f5; display: grid; gap: 1px; }
.gmp-f label em { font-style: normal; font-size: 11.5px; color: #fde68a; } .gmp-f label small { font-size: 10.5px; color: #8f8ab8; line-height: 1.35; }
.gmp-fc { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
.gmp-fc > input:not(.w-num), .gmp-fc > select { flex: 1 1 130px; }
.gmp-quick { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.gmp-note .gmp-fc, .gmp-mail .btn { margin-top: 7px; }
.gmp-mail { display: grid; grid-template-columns: minmax(0, 1fr) 150px; gap: 7px; } .gmp-mail textarea, .gmp-mail .btn { grid-column: 1 / -1; } .gmp-mail .btn { justify-self: start; margin-top: 0; }
.gmp-give { display: grid; grid-template-columns: minmax(0, 1fr) 132px 92px auto; gap: 7px; margin-bottom: 6px; }
.gmp-give input.w-num { width: auto; flex: none; }
.gmp-bag { max-height: 236px; overflow-y: auto; }
.gmp-bag .slot { cursor: pointer; } .gmp-bag .slot:hover { outline: 2px solid #f87171; }
.gmp-eq > div { display: grid; grid-template-columns: 74px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 4px 0; border-top: 1px dashed rgba(165, 155, 235, .14); font-size: 12.5px; }
.gmp-eq > div:first-child { border-top: 0; } .gmp-eq span { color: #9a95c4; } .gmp-eq b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; } .gmp-eq i { font-style: normal; font-weight: 400; }
.gmp-eq .btn { padding: 2px 7px; }
.gmp-state { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; margin-bottom: 12px; }
.gmp-state > div { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 10px 12px; border-radius: 12px; border: 1px solid rgba(74, 222, 128, .4); background: rgba(22, 101, 52, .2); }
.gmp-state > div.bad { border-color: rgba(252, 165, 165, .6); background: rgba(153, 27, 27, .32); } .gmp-state > div.warn { border-color: rgba(253, 186, 116, .55); background: rgba(154, 52, 18, .3); }
.gmp-state b { font-size: 13.5px; color: #fff; } .gmp-state span { flex: 1 1 140px; font-size: 12px; color: #d8d4f5; }
.gmp-warn { margin-bottom: 12px; padding: 10px 12px; border-radius: 12px; border: 1px solid rgba(96, 165, 250, .5); background: rgba(30, 64, 175, .26); color: #dbeafe; }
.gmp-log > div { display: grid; grid-template-columns: 104px 92px 84px minmax(0, 1fr); gap: 8px; align-items: baseline; padding: 5px 0; border-top: 1px dashed rgba(165, 155, 235, .14); font-size: 12px; }
.gmp-log > div:first-child { border-top: 0; }
.gmp-log time { color: #9a95c4; font-size: 11px; } .gmp-log b { color: #c7d2fe; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gmp-log i { font-style: normal; justify-self: start; padding: 0 7px; border-radius: 99px; background: rgba(124, 92, 255, .26); color: #e4e0ff; font-size: 11px; white-space: nowrap; }
.gmp-log .harsh i { background: rgba(220, 38, 38, .34); color: #fee2e2; } .gmp-log span { color: #e4e0ff; overflow-wrap: anywhere; }
.gmp-orders > div { display: grid; grid-template-columns: 112px minmax(0, 1.2fr) 70px 80px minmax(0, .8fr) 78px; gap: 8px; align-items: center; padding: 5px 0; border-top: 1px dashed rgba(165, 155, 235, .14); font-size: 12px; }
.gmp-orders .h { border-top: 0; color: #9a95c4; font-size: 11px; } .gmp-orders span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- narrower windows: one column inside the detail, then one pane at a time */
@media (max-width: 1180px) { .gmp { grid-template-columns: 290px minmax(0, 1fr); gap: 10px; } }
@media (max-width: 820px), (max-height: 480px) {
  .gm2-main[data-page="players"] { display: block; overflow: visible; padding-bottom: 10px; }
  .gmp { display: block; height: auto; }
  .gmp.pane-detail .gmp-list, .gmp.pane-list .gmp-detail { display: none; }
  .gmp-list { overflow: visible; } .gmp-rows { overflow: visible; min-height: 0; } .gmp-detail { overflow: visible; padding-right: 0; }
  .gmp-back { display: inline-flex; margin-bottom: 9px; padding: 7px 14px; border-radius: 99px; border: 1px solid rgba(251, 191, 36, .5); background: rgba(251, 191, 36, .14); color: #fde68a; font: 600 12.5px/1 'Kanit', sans-serif; cursor: pointer; }
  .gmp-head { grid-template-columns: 76px minmax(0, 1fr); padding: 10px 11px; } .gmp-portrait { width: 76px; height: 96px; } .gmp-portrait canvas { width: 70px; height: 100px; } .gmp-hn b { font-size: 18px; }
  .gmp-quickbar { grid-template-columns: repeat(3, minmax(0, 1fr)); } .gmp-quickbar .btn { padding: 9px 4px; }
  .gmp-tabs { position: static; } .gmp-tabs button { flex: 0 0 auto; padding: 8px 12px; }
  .gmp .btn { padding: 8px 12px; font-size: 12.5px; } .gmp-eq .btn { padding: 5px 10px; }
  .gmp-f { grid-template-columns: 1fr; } .gmp-give { grid-template-columns: 1fr 1fr; } .gmp-give > input:first-child, .gmp-give .btn { grid-column: 1 / -1; }
  .gmp-mail { grid-template-columns: 1fr; } .gmp-log > div { grid-template-columns: 96px 1fr; } .gmp-log span { grid-column: 1 / -1; }
  .gmp-orders > div { grid-template-columns: 1fr 1fr 1fr; } .gmp-orders .h { display: none; }
  .gmx .gm2-page .gmp input, .gmx .gm2-page .gmp select, .gmx .gm2-page .gmp textarea { font-size: 16px; padding: 8px 10px; }   /* 16 px: phones do not zoom the page when a field is tapped */
}
/* the GM window uses the height the screen has: the desk shows a list and a form side by side */
@media (min-width: 821px) and (min-height: 481px) { #panels .panel[data-name="gm"] { max-height: calc(100dvh - 88px); } .gm2.gmx { height: min(calc(100dvh - 150px), 880px); } }
/* <<< GM PLAYERS v3.38 */
