﻿:root {
  --bg: #f6f7f8;
  --bg-2: #eef0f2;
  --panel: #ffffff;
  --line: rgba(20, 28, 36, 0.08);
  --text: #1c2430;
  --muted: #7a8494;
  --accent: #3d4a5c;
  --accent-soft: #e8ebef;
  --danger: #b54a42;
  --ok: #2f6b52;
  --shadow: 0 10px 30px rgba(28, 36, 48, 0.05);
  --radius: 16px;
  --font-ui: "Outfit", "Manrope", "Segoe UI", sans-serif;
  --font-brand: "Outfit", "Space Grotesk", sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  color: var(--text);
  font-family: var(--font-ui);
  background:
    radial-gradient(900px 420px at 8% -8%, rgba(180, 190, 205, 0.28), transparent 55%),
    radial-gradient(700px 380px at 92% 0%, rgba(210, 216, 224, 0.35), transparent 50%),
    linear-gradient(180deg, #fbfbfc 0%, var(--bg) 55%, #f3f5f7 100%);
  background-attachment: fixed;
  min-height: 100vh;
  overflow-x: hidden;
}

.noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  z-index: 0;
}

.orb {
  pointer-events: none;
  position: fixed;
  border-radius: 50%;
  filter: blur(60px);
  z-index: 0;
  animation: drift 16s ease-in-out infinite alternate;
}
.orb-a {
  width: 260px; height: 260px;
  left: -70px; top: 140px;
  background: rgba(170, 180, 195, 0.18);
}
.orb-b {
  width: 300px; height: 300px;
  right: -90px; top: -30px;
  background: rgba(200, 206, 214, 0.22);
  animation-delay: -5s;
}
@keyframes drift {
  from { transform: translateY(0) scale(1); }
  to { transform: translateY(20px) scale(1.04); }
}

.top, .stage { position: relative; z-index: 1; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.top {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 14px clamp(16px, 3vw, 36px);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px) saturate(1.1);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 1px 0 rgba(255,255,255,0.7) inset;
  animation: dropIn 0.45s cubic-bezier(.2,.8,.2,1) both;
}
@keyframes dropIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: none; }
}

.top-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 28px;
  width: 100%;
  position: relative;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  min-width: 0;
  flex: 0 0 auto;
}
.brand-mark {
  width: 36px; height: 36px;
  border-radius: 11px;
  background: linear-gradient(145deg, #1f2732, #4a5668);
  box-shadow: 0 0 0 1px rgba(28, 36, 48, 0.06), 0 6px 14px rgba(28, 36, 48, 0.08);
  position: relative;
  flex-shrink: 0;
}
.brand-mark::after {
  content: "";
  position: absolute;
  inset: 9px;
  border: 2px solid #ffffff;
  border-radius: 5px;
  border-right-color: transparent;
  transform: rotate(45deg);
}
.brand-text h1 {
  margin: 0;
  font-family: var(--font-brand);
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1;
  color: #121820;
  text-transform: uppercase;
}
.brand-text p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.02em;
}

.bench-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  padding: 3px;
  border-radius: 10px;
  background: #eef0f3;
  border: 1px solid rgba(28, 36, 48, 0.06);
  flex-shrink: 0;
}
.bench-pill {
  position: absolute;
  top: 3px;
  left: 3px;
  height: 28px;
  width: calc(50% - 3px);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(28, 36, 48, 0.08);
  transition: transform .38s cubic-bezier(.2,.8,.2,1);
  pointer-events: none;
  z-index: 0;
}
body.is-hatch .bench-pill {
  transform: translateX(100%);
}
.bench-tab {
  position: relative;
  z-index: 1;
  appearance: none;
  border: 0;
  background: transparent;
  color: #5a6575;
  height: 28px;
  min-width: 52px;
  padding: 0 12px;
  border-radius: 8px;
  cursor: pointer;
  font: 700 0.76rem/1 var(--font-ui);
  transition: color .22s ease;
}
.bench-tab:hover { color: #2a3340; }
.bench-tab.is-on {
  color: #151b24;
}

.bench-ops-only,
.bench-hatch-only {
  transition: none;
}
/* 椤舵爮宸ュ叿鍖猴細鍒囨崲鏃朵笉鍗犲弻浠藉搴?*/
.top-inner > .bench-ops-only,
.top-inner > .bench-hatch-only {
  margin-left: auto;
}
body.is-hatch .bench-ops-only {
  pointer-events: none;
  position: absolute;
  right: 0;
  top: 50%;
  margin-top: -22px;
  visibility: hidden;
}
body:not(.is-hatch) .bench-hatch-only {
  pointer-events: none;
  position: absolute;
  right: 0;
  top: 50%;
  margin-top: -22px;
  visibility: hidden;
}
body.is-hatch .bench-hatch-only {
  display: grid;
  visibility: visible;
  position: relative;
  right: auto;
  top: auto;
  margin-top: 0;
}
body.is-hatch .hatch-top-tools.bench-hatch-only {
  display: flex;
}
body:not(.is-hatch) .bench-ops-only {
  position: relative;
  visibility: visible;
}

.hatch-top-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  margin-left: auto;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 720px;
}
.hatch-search-bar {
  position: relative;
  display: grid;
  gap: 0;
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
  margin-left: 0;
  max-width: none;
}
.hatch-search-shell #hatch-search-btn {
  height: 44px;
  min-width: 72px;
  border: 0;
  border-radius: 0;
  padding: 0 16px;
  cursor: pointer;
  font: 700 0.88rem/1 var(--font-ui);
  color: #fff;
  background: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.hatch-search-shell #hatch-search-btn:hover { background: #2f3948; }
.hatch-search-shell #hatch-search-btn:disabled { opacity: 0.65; cursor: wait; }

.hatch-suggest {
  position: absolute;
  top: calc(100% + 6px);
  left: 0; right: 0;
  z-index: 30;
  background: #fff;
  border: 1px solid rgba(28, 36, 48, 0.1);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(28, 36, 48, 0.12);
  max-height: 280px;
  overflow: auto;
  padding: 6px;
}
.hatch-suggest[hidden] { display: none !important; }
.hatch-sug {
  appearance: none;
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  font: 600 0.88rem/1.3 var(--font-ui);
  color: var(--text);
}
.hatch-sug:hover, .hatch-sug.is-on {
  background: #f3f5f7;
}
.hatch-sug small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 500;
}

.hatch-add-btn {
  height: 44px;
  min-width: 104px;
  border: 1px solid rgba(28, 36, 48, 0.12);
  border-radius: 12px;
  padding: 0 16px;
  cursor: pointer;
  font: 700 0.88rem/1 var(--font-ui);
  color: #1c2430;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(28, 36, 48, 0.04);
}
.hatch-add-btn:hover {
  border-color: rgba(61, 74, 92, 0.35);
  background: #f7f8fa;
}
.hatch-add-btn:disabled { opacity: 0.65; cursor: wait; }
.hatch-add-btn.loading .btn-spin { display: inline-block; }
.hatch-add-btn .btn-spin { display: none; }

.hatch-games {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 12px;
  margin: 0 0 18px;
}
.hatch-games[hidden] { display: none !important; }
.hatch-game {
  appearance: none;
  border: 1px solid rgba(28, 36, 48, 0.08);
  border-radius: 14px;
  background: var(--panel);
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  text-align: left;
  box-shadow: 0 6px 18px rgba(28, 36, 48, 0.04);
  transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease;
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 0;
}
.hatch-game:hover {
  transform: translateY(-2px);
  border-color: rgba(61, 74, 92, 0.28);
  box-shadow: 0 10px 24px rgba(28, 36, 48, 0.08);
}
.hatch-game-cover {
  aspect-ratio: 16 / 10;
  background: #e8ebef;
  overflow: hidden;
  position: relative;
}
.hatch-game-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hatch-game-cover .no-img {
  display: grid;
  place-items: center;
  height: 100%;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
}
.hatch-game-body {
  padding: 10px 10px 12px;
  display: grid;
  gap: 6px;
}
.hatch-game-body strong {
  font-size: 0.82rem;
  line-height: 1.35;
  font-weight: 700;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hatch-game-meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}
.hatch-game-meta span {
  font-size: 0.66rem;
  font-weight: 700;
  color: var(--muted);
  background: #eef0f3;
  border-radius: 999px;
  padding: 2px 7px;
}
.hatch-game-meta .hot {
  color: #9a6b16;
  background: rgba(180, 120, 20, 0.12);
}

.bench-stage {
  position: relative;
  overflow: hidden;
}
.bench-track {
  position: relative;
  width: 100%;
}
.bench-pane {
  width: 100%;
  min-width: 0;
}
#ops-bench {
  position: relative;
  z-index: 1;
}
#hatch-bench {
  display: none;
}
body.is-hatch #ops-bench {
  display: none;
}
body.is-hatch #hatch-bench {
  display: block;
  position: relative;
  z-index: 1;
}
.bench-pane.is-enter {
  animation: benchEnter .32s cubic-bezier(.2,.9,.2,1) both;
}
@keyframes benchEnter {
  from { transform: translateY(36px); }
  to { transform: translateY(0); }
}


.hatch-prices {
  margin-bottom: 14px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(28, 36, 48, 0.08);
  background: #fff;
  box-shadow: var(--shadow);
}
.hatch-prices[hidden] { display: none !important; }
.hatch-prices h3 {
  margin: 0 0 10px;
  font-family: var(--font-brand);
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}
.hatch-sku {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid rgba(28, 36, 48, 0.06);
}
.hatch-sku > div:first-child { flex: 1; min-width: 0; }
.hatch-sku:first-of-type { border-top: 0; padding-top: 0; }
.hatch-sku .sku-name { font-weight: 700; font-size: 0.9rem; }
.hatch-sku .sku-meta { color: var(--muted); font-size: 0.75rem; margin-top: 2px; }
.hatch-sku .sku-price {
  font-family: var(--font-brand);
  font-weight: 800;
  font-size: 1.05rem;
  color: #151b24;
  white-space: nowrap;
}
.hatch-sku .sku-buy {
  appearance: none;
  border: 0;
  height: 32px;
  padding: 0 12px;
  border-radius: 8px;
  cursor: pointer;
  font: 700 0.78rem/1 var(--font-ui);
  color: #fff;
  background: var(--accent);
  flex-shrink: 0;
}
.hatch-sku .sku-buy:hover { background: #2f3948; }
.hatch-sku .sku-buy:disabled { opacity: 0.6; cursor: wait; }
.order-body {
  margin: 12px 0 4px;
  display: grid;
  gap: 8px;
  font-size: 0.88rem;
}
.order-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}
.order-row span { color: var(--muted); }
.order-row strong {
  font-family: var(--font-brand);
  font-size: 1.05rem;
}
.pay-ways {
  display: flex;
  gap: 8px;
  margin: 14px 0 4px;
}
.pay-way {
  appearance: none;
  flex: 1;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(28, 36, 48, 0.12);
  background: #fff;
  cursor: pointer;
  font: 600 0.82rem/1 var(--font-ui);
  color: #6b7380;
  transition: border-color .15s, color .15s, background .15s, box-shadow .15s;
}
.pay-way:hover {
  border-color: rgba(28, 36, 48, 0.22);
  color: #3d4654;
}
.pay-way.is-on {
  background: rgba(28, 36, 48, 0.04);
  border-color: rgba(28, 36, 48, 0.55);
  color: #151b24;
  box-shadow: inset 0 0 0 1px rgba(28, 36, 48, 0.08);
}
.pay-qr-wrap {
  margin: 12px 0 4px;
  display: grid;
  justify-items: center;
  gap: 8px;
}
.pay-qr {
  width: 180px;
  height: 180px;
  border-radius: 12px;
  border: 1px solid rgba(28, 36, 48, 0.08);
  background: #fff;
  object-fit: contain;
}
.pay-tip {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}
.pay-status {
  margin: 0;
  font-weight: 700;
  font-size: 0.88rem;
  color: #151b24;
}
.pay-status.is-ok { color: var(--ok); }
.pay-status.is-err { color: var(--danger); }
.order-panel { width: min(360px, 100%); }

.hatch-sid-field {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
}
.hatch-sid-field input {
  height: 40px;
  border-radius: 10px;
  border: 1px solid rgba(28, 36, 48, 0.12);
  padding: 0 12px;
  font: 600 0.92rem/1 var(--font-ui);
  outline: none;
}
.hatch-sid-field input:focus {
  border-color: rgba(61, 74, 92, 0.35);
  box-shadow: 0 0 0 4px rgba(61, 74, 92, 0.07);
}
.hatch-cost-line {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  text-align: center;
}
.hatch-chip {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  background: rgba(47, 107, 82, 0.1);
  color: #2f6b52;
}
.hatch-chip.cost {
  background: #eef0f3;
  color: #5a6575;
}
.card.is-selected,
.account.is-selected {
  outline: 2px solid rgba(61, 74, 92, 0.35);
  outline-offset: 0;
  box-shadow: 0 0 0 4px rgba(61, 74, 92, 0.06), var(--shadow);
}

.hatch-pick-tip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(47, 107, 82, 0.08), rgba(61, 74, 92, 0.06));
  border: 1px solid rgba(47, 107, 82, 0.18);
  color: #2f6b52;
  font-size: 0.86rem;
  font-weight: 650;
}
.hatch-pick-tip[hidden] { display: none; }

.account.is-pick {
  position: relative;
  border-color: transparent;
  background:
    linear-gradient(var(--panel), var(--panel)) padding-box,
    linear-gradient(120deg, #2f6b52, #6b8cae, #2f6b52, #8aa07a) border-box;
  border: 2px solid transparent;
  background-size: 100% 100%, 220% 220%;
  animation: pickBorder 1.6s linear infinite, rise .35s cubic-bezier(.2,.8,.2,1) both;
  cursor: pointer;
  box-shadow: 0 0 0 3px rgba(47, 107, 82, 0.08), 0 8px 22px rgba(28, 36, 48, 0.06);
}
.accounts.is-silent .account.is-pick {
  animation: pickBorder 1.6s linear infinite;
}
@keyframes pickBorder {
  0% { background-position: 0 0, 0% 50%; }
  100% { background-position: 0 0, 100% 50%; }
}
.account.is-pick .pick-badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  color: #2f6b52;
  background: rgba(47, 107, 82, 0.12);
}
.hatch-cool {
  margin-top: 2px;
  font-size: 0.72rem;
  line-height: 1.35;
  color: #9a6b16;
}
.hatch-quote {
  margin-top: 2px;
  font-size: 0.78rem;
  line-height: 1.35;
  color: #2f6b52;
}
.hatch-quote strong {
  font-family: var(--font-brand);
  font-weight: 800;
  font-size: 0.95rem;
  color: #151b24;
}
.hatch-quote.is-err {
  color: var(--danger);
}

.hatch-orders {
  display: grid;
  gap: 8px;
  margin-top: 4px;
}
.hatch-order {
  padding: 8px 10px;
  border-radius: 10px;
  background: #f5f6f8;
  border: 1px solid rgba(28, 36, 48, 0.06);
}
.hatch-order-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: baseline;
  margin-bottom: 4px;
}
.hatch-order-top strong {
  font-size: 0.82rem;
  font-weight: 700;
}
.hatch-order-meta {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.35;
}
.hatch-order-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.order-st {
  font-size: 0.68rem;
  font-weight: 700;
  white-space: nowrap;
}
.order-st.is-wait { color: #9a6b16; }
.order-st.is-ok { color: #2f6b52; }
.order-st.is-err { color: var(--danger); }
.order-st.is-mute { color: var(--muted); }

.add-bar {
  display: grid;
  gap: 6px;
  margin-left: auto;
  flex: 0 1 560px;
  width: min(100%, 560px);
}
.add-shell {
  display: flex;
  align-items: stretch;
  gap: 0;
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(28, 36, 48, 0.1);
  background: #fff;
  box-shadow: 0 1px 2px rgba(28, 36, 48, 0.04);
  overflow: hidden;
  transition: border-color .2s, box-shadow .2s;
}
.add-shell:focus-within {
  border-color: rgba(61, 74, 92, 0.35);
  box-shadow: 0 0 0 4px rgba(61, 74, 92, 0.07);
}
.add-split {
  width: 1px;
  margin: 10px 0;
  background: rgba(28, 36, 48, 0.08);
  flex-shrink: 0;
}
.field {
  display: grid;
  margin: 0;
}
.field.grow { flex: 1; min-width: 0; }
.field input {
  width: 100%;
  height: 44px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text);
  padding: 0 14px;
  font: 500 0.92rem/1 var(--font-ui);
  outline: none;
}
.field input::placeholder { color: #a3abb8; }

#submit-btn {
  height: 44px;
  min-width: 78px;
  border: 0;
  border-radius: 0;
  padding: 0 16px;
  cursor: pointer;
  font: 700 0.88rem/1 var(--font-ui);
  color: #fff;
  background: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background .15s ease, opacity .15s;
  flex-shrink: 0;
}
#submit-btn:hover:not(:disabled) { background: #2f3948; }
#submit-btn:disabled { opacity: 0.65; cursor: wait; }
.btn-spin {
  width: 12px; height: 12px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.3);
  border-top-color: #fff;
  display: none;
  animation: spin .7s linear infinite;
}
#submit-btn.loading .btn-spin { display: inline-block; }
#submit-btn.loading .btn-label { opacity: 0.85; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 860px) {
  .top-inner {
    flex-wrap: wrap;
    gap: 12px;
  }
  .add-bar {
    flex: 1 1 100%;
    margin-left: 0;
    width: 100%;
  }
  .brand-text p { display: none; }
}

.toast {
  position: fixed;
  top: 18px;
  left: 50%;
  z-index: 80;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(420px, calc(100vw - 32px));
  margin: 0;
  padding: 12px 10px 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 12px 32px rgba(28, 36, 48, 0.12);
  transform: translate(-50%, 0);
  pointer-events: auto;
}
.toast[hidden] { display: none !important; }
.toast.is-in {
  animation: toastSlideIn .38s cubic-bezier(.2,.85,.25,1) both;
}
.toast.is-out {
  animation: toastSlideOut .3s cubic-bezier(.4,0,.7,.2) both;
}
.toast.err { border-color: rgba(181, 74, 66, 0.25); color: var(--danger); }
.toast.ok { border-color: rgba(47, 107, 82, 0.22); color: var(--ok); }
.toast-text {
  flex: 1;
  min-width: 0;
  line-height: 1.35;
  word-break: break-word;
}
.toast-x {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  opacity: 0.55;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  cursor: pointer;
  font: 700 1.15rem/1 var(--font-ui);
  flex-shrink: 0;
}
.toast-x:hover {
  opacity: 1;
  background: rgba(28, 36, 48, 0.06);
}
@keyframes toastSlideIn {
  from { transform: translate(-50%, -120%); }
  to { transform: translate(-50%, 0); }
}
@keyframes toastSlideOut {
  from { transform: translate(-50%, 0); }
  to { transform: translate(-50%, -120%); }
}

.stage {
  padding: 20px clamp(16px, 3vw, 36px) 48px;
}
.stage-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 10px;
}

.game-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}
.game-tabs[hidden] { display: none !important; }
.gtab {
  appearance: none;
  border: 1px solid rgba(28, 36, 48, 0.1);
  background: #fff;
  color: #3a4554;
  border-radius: 999px;
  height: 30px;
  padding: 0 10px 0 12px;
  cursor: pointer;
  font: 600 0.78rem/1 var(--font-ui);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  transition: background .15s, border-color .15s, color .15s;
}
.gtab span {
  min-width: 16px;
  height: 16px;
  padding: 0 5px;
  border-radius: 999px;
  background: #eef0f3;
  color: #6a7484;
  font-size: 0.68rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.gtab:hover { border-color: rgba(61, 74, 92, 0.28); }
.gtab.is-on {
  background: #151b24;
  border-color: #151b24;
  color: #fff;
}
.gtab.is-on span {
  background: rgba(255,255,255,0.14);
  color: #fff;
}
.filter-empty {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 0.9rem;
  padding: 24px 4px;
}
.stage-head h2 {
  margin: 0;
  font-family: var(--font-brand);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #151b24;
}
.count {
  min-width: 22px;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
  background: var(--accent);
}

.empty {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 28px 0 0;
  max-width: 36ch;
}
.empty[hidden], .accounts:empty + .empty { display: block; }
.accounts:not(:empty) + .empty { display: none; }

.accounts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
  align-items: start;
}

.account {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: 0 6px 18px rgba(28, 36, 48, 0.04);
  padding: 12px;
  animation: rise .35s cubic-bezier(.2,.8,.2,1) both;
}
.account:nth-child(1) { animation-delay: .02s; }
.account:nth-child(2) { animation-delay: .05s; }
.account:nth-child(3) { animation-delay: .08s; }
.accounts.is-silent .account {
  animation: none !important;
}
@keyframes rise {
  from { transform: translateY(8px); }
  to { transform: none; }
}

.account.is-skel {
  pointer-events: none;
  border-style: dashed;
  border-color: rgba(28, 36, 48, 0.1);
  background: #f7f8fa;
  box-shadow: none;
}
.account.is-skel .account-top {
  align-items: center;
}
.skel-bar {
  display: block;
  height: 12px;
  border-radius: 6px;
  background: linear-gradient(90deg, #e6e9ee 0%, #f2f4f7 45%, #e6e9ee 90%);
  background-size: 200% 100%;
  animation: skelShimmer 1.2s ease-in-out infinite;
}
.skel-title {
  width: 118px;
  height: 1em;
  margin: 0.1em 0;
  font-size: 0.98rem;
}
.skel-chip {
  width: 42px;
  height: 22px;
  border-radius: 999px;
}
.skel-chip.short { width: 36px; }
.skel-step {
  font-size: 0.68rem;
  font-weight: 650;
  color: var(--muted);
  letter-spacing: 0.02em;
  line-height: 1;
  white-space: nowrap;
}
.account.is-skel-on {
  border-color: rgba(61, 74, 92, 0.22);
  background: #fff;
}
.account.is-skel-on .skel-step { color: #5a6575; }
@keyframes skelShimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

.account-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: start;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(28, 36, 48, 0.06);
}
.account-id {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.account-id strong {
  font-family: var(--font-brand);
  font-size: 0.98rem;
  letter-spacing: -0.02em;
  overflow: hidden;
  text-overflow: ellipsis;
}
.account-id span {
  color: var(--muted);
  font-size: 0.72rem;
}
.remove {
  border: 1px solid rgba(181, 74, 66, 0.2);
  background: #fff;
  color: var(--danger);
  border-radius: 8px;
  height: 28px;
  padding: 0 8px;
  cursor: pointer;
  font: 700 0.85rem/1 var(--font-ui);
}
.remove:hover { background: rgba(181, 74, 66, 0.06); }
.remove.tiny { min-width: 28px; padding: 0; }

.games-block + .games-block { margin-top: 10px; }
.games-label {
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.account-actions {
  display: flex;
  gap: 4px;
  flex-wrap: nowrap;
  justify-content: flex-end;
  align-items: center;
  flex-shrink: 0;
}
.auto-switch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 28px;
  padding: 0 7px;
  border-radius: 8px;
  border: 1px solid rgba(28, 36, 48, 0.1);
  background: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.auto-switch input { accent-color: #3d4a5c; width: 12px; height: 12px; }
.busy-chip {
  appearance: none;
  border: 1px solid transparent;
  height: 28px;
  padding: 0 9px;
  border-radius: 8px;
  cursor: pointer;
  font: 700 0.72rem/1 var(--font-ui);
  letter-spacing: 0.02em;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background .15s, border-color .15s, color .15s;
}
.busy-chip.is-free {
  color: #2f6b52;
  background: rgba(47, 107, 82, 0.1);
  border-color: rgba(47, 107, 82, 0.18);
}
.busy-chip.is-free:hover {
  background: rgba(47, 107, 82, 0.16);
}
.busy-chip.is-busy {
  color: #b54a42;
  background: rgba(181, 74, 66, 0.1);
  border-color: rgba(181, 74, 66, 0.2);
}
.busy-chip.is-busy:hover {
  background: rgba(181, 74, 66, 0.16);
}
.account.is-busy-card {
  box-shadow: 0 0 0 1px rgba(181, 74, 66, 0.12), var(--shadow);
}

.busy-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(20, 26, 34, 0.4);
  display: grid;
  place-items: center;
  padding: 20px;
  backdrop-filter: blur(4px);
}
.busy-modal[hidden] { display: none !important; }
.busy-panel {
  width: min(320px, 100%);
  background: #fff;
  border-radius: 18px;
  border: 1px solid rgba(28, 36, 48, 0.08);
  box-shadow: 0 24px 60px rgba(20, 26, 34, 0.2);
  padding: 18px;
  animation: rise .3s cubic-bezier(.2,.8,.2,1);
}
.busy-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.busy-head h3 {
  margin: 0;
  font-family: var(--font-brand);
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}
.busy-sub {
  margin: 8px 0 14px;
  color: var(--muted);
  font-size: 0.84rem;
}
.hour-wheel-wrap {
  position: relative;
  height: 168px;
  border-radius: 14px;
  background: #f3f5f7;
  border: 1px solid rgba(28, 36, 48, 0.06);
  overflow: hidden;
}
.hour-wheel {
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  padding: 0;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}
.hour-wheel::-webkit-scrollbar { display: none; }
.hour-pad { height: 56px; }
.hour-item {
  position: relative;
  z-index: 3;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  scroll-snap-align: unset;
  font-family: var(--font-brand);
  font-size: 1.55rem;
  font-weight: 800;
  color: #9aa3b0;
  transition: color .15s, transform .15s;
  cursor: pointer;
  user-select: none;
}
.hour-item small {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  opacity: 0.8;
}
.hour-item.is-on {
  color: #151b24;
  transform: scale(1.06);
}
.hour-mark {
  position: absolute;
  left: 10px;
  right: 10px;
  top: 50%;
  height: 56px;
  margin-top: -28px;
  border-radius: 10px;
  border: 1px solid rgba(28, 36, 48, 0.1);
  background: rgba(255,255,255,0.72);
  pointer-events: none;
  z-index: 1;
}
.hour-fade {
  position: absolute;
  left: 0; right: 0;
  height: 48px;
  z-index: 2;
  pointer-events: none;
}
.hour-fade-t {
  top: 0;
  background: linear-gradient(#f3f5f7, rgba(243,245,247,0));
}
.hour-fade-b {
  bottom: 0;
  background: linear-gradient(rgba(243,245,247,0), #f3f5f7);
}
.busy-actions {
  margin-top: 14px;
  display: flex;
  gap: 8px;
}
.busy-actions .ghost-btn.busy-cancel,
.busy-actions .primary-btn {
  flex: 1;
  height: 42px;
  border-radius: 12px;
  font: 700 0.88rem/1 var(--font-ui);
}
.busy-actions .ghost-btn.busy-cancel {
  border: 1.5px solid rgba(28, 36, 48, 0.28);
  background: #eef0f3;
  color: #151b24;
  font-weight: 800;
  box-shadow: 0 1px 0 rgba(28, 36, 48, 0.04);
}
.busy-actions .ghost-btn.busy-cancel:hover {
  background: #e4e7ec;
  border-color: rgba(28, 36, 48, 0.4);
}
.busy-actions .primary-btn {
  border: 0;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
}
.busy-actions .primary-btn:hover { background: #2f3948; }
.order-panel .busy-actions .ghost-btn.busy-cancel,
.order-panel .busy-actions .primary-btn {
  border: 0;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  box-shadow: none;
  cursor: pointer;
}
.order-panel .busy-actions .ghost-btn.busy-cancel:hover,
.order-panel .busy-actions .primary-btn:hover {
  background: #2f3948;
  border-color: transparent;
}
.busy-modal.is-clear .primary-btn {
  background: #b54a42;
}
.busy-modal.is-clear .primary-btn:hover { background: #9a3d37; }
.confirm-panel .busy-sub {
  margin: 12px 0 4px;
  min-height: 1.2em;
}
.confirm-panel.is-danger #confirm-yes {
  background: #b54a42;
}
.confirm-panel.is-danger #confirm-yes:hover { background: #9a3d37; }
.ghost-btn, .primary-btn {
  border-radius: 8px;
  height: 28px;
  padding: 0 10px;
  cursor: pointer;
  font: 600 0.72rem/1 var(--font-ui);
  white-space: nowrap;
}
.ghost-btn.tiny, .primary-btn.tiny {
  height: 26px;
  padding: 0 8px;
  font-size: 0.7rem;
}
.ghost-btn {
  border: 1px solid rgba(28, 36, 48, 0.12);
  background: #fff;
  color: var(--text);
}
.ghost-btn:hover { background: var(--accent-soft); }
.ghost-btn:disabled { opacity: 0.6; cursor: wait; }
.primary-btn {
  border: 0;
  background: var(--accent);
  color: #fff;
}
.primary-btn:hover { background: #2f3948; }
.primary-btn:disabled { opacity: 0.65; cursor: wait; }

.game-list {
  display: grid;
  gap: 6px;
}
.mini {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 9px;
  border-radius: 10px;
  border: 1px solid rgba(28, 36, 48, 0.06);
  background: #f7f8fa;
}
.mini.rent { align-items: stretch; }
.mini.empty {
  color: var(--muted);
  font-size: 0.78rem;
  justify-content: center;
}
.mini-main { min-width: 0; flex: 1; }
.mini-name {
  font-weight: 700;
  font-size: 0.84rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mini-sub {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.72rem;
}
.mini-sub b {
  color: #2a3340;
  font-weight: 700;
}
.creds {
  margin-top: 6px;
  display: grid;
  gap: 4px;
}
.cred {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 6px;
  align-items: center;
  font-size: 0.72rem;
}
.cred-k { color: var(--muted); }
.cred-v {
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 0.74rem;
  color: #1c2430;
  background: #fff;
  border: 1px solid rgba(28, 36, 48, 0.08);
  border-radius: 6px;
  padding: 3px 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.copy-btn {
  border: 0;
  background: transparent;
  color: #3d4a5c;
  font: 700 0.68rem/1 var(--font-ui);
  cursor: pointer;
  padding: 2px 0;
}
.copy-btn:hover { text-decoration: underline; }
.guard-box {
  margin-top: 6px;
  padding: 6px 8px;
  border-radius: 8px;
  background: #151b24;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.74rem;
}
.guard-box[hidden] { display: none !important; }
.guard-box strong {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 1rem;
  letter-spacing: 0.12em;
  color: #b8f26e;
}
.guard-box .copy-btn { color: #c9d2dc; }
.mini-actions {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-shrink: 0;
  justify-content: center;
}

.expire {
  margin-top: 6px;
  padding: 5px 8px;
  border-radius: 8px;
  background: #eef6f1;
  border: 1px solid rgba(47, 107, 82, 0.12);
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.expire strong {
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #1f5a40;
}
.expire span {
  font-size: 0.68rem;
  color: var(--muted);
}
.expire.warn {
  background: #fff7e8;
  border-color: rgba(180, 120, 20, 0.18);
}
.expire.warn strong { color: #8a5a10; }
.expire.dead {
  background: #fff1ef;
  border-color: rgba(181, 74, 66, 0.18);
}
.expire.dead strong { color: var(--danger); }

.cabinet {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(20, 26, 34, 0.35);
  display: grid;
  place-items: center;
  padding: 20px;
  backdrop-filter: blur(4px);
}
.cabinet[hidden] { display: none !important; }
.cabinet-panel {
  width: min(820px, 100%);
  max-height: min(84vh, 760px);
  overflow: auto;
  background: #fff;
  border-radius: 20px;
  border: 1px solid rgba(28, 36, 48, 0.08);
  box-shadow: 0 30px 80px rgba(20, 26, 34, 0.18);
  padding: 20px;
  animation: rise .35s cubic-bezier(.2,.8,.2,1);
}
.cabinet-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
  margin-bottom: 14px;
}
.cabinet-head h3 {
  margin: 0;
  font-family: var(--font-brand);
  font-size: 1.35rem;
  letter-spacing: -0.03em;
}
.cabinet-sub {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}
.cabinet-current {
  padding: 12px 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, #f4f6f8, #eef1f4);
  border: 1px solid rgba(28, 36, 48, 0.06);
  margin-bottom: 14px;
  font-size: 0.95rem;
}
.cabinet-current strong {
  font-family: var(--font-brand);
  font-size: 1.1rem;
}
.cabinet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}
.cabinet-empty {
  color: var(--muted);
  padding: 24px 8px;
  text-align: center;
}
.slot {
  appearance: none;
  text-align: left;
  border: 1px solid rgba(28, 36, 48, 0.1);
  background: #fafbfc;
  border-radius: 14px;
  padding: 14px 12px;
  min-height: 88px;
  cursor: pointer;
  display: grid;
  align-content: space-between;
  gap: 10px;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.slot:hover:not(:disabled) {
  transform: translateY(-2px);
  border-color: rgba(61, 74, 92, 0.35);
  box-shadow: 0 10px 24px rgba(28, 36, 48, 0.08);
}
.slot:disabled { cursor: default; opacity: 0.92; }
.slot-name {
  font-weight: 700;
  font-size: 0.92rem;
  word-break: break-all;
}
.slot-badge {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.slot.is-free .slot-badge { color: var(--ok); }
.slot.is-busy .slot-badge { color: #a06a20; }
.slot.is-current {
  background: #151b24;
  border-color: #151b24;
  color: #fff;
  box-shadow: 0 12px 28px rgba(21, 27, 36, 0.2);
}
.slot.is-current .slot-badge { color: #b8f26e; }

@media (max-width: 860px) {
  .accounts { grid-template-columns: 1fr; }
}

/* access gate */
body.is-locked .top,
body.is-locked .bench-stage,
body.is-locked .toast {
  visibility: hidden;
  pointer-events: none;
}
.access-gate {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  background:
    radial-gradient(700px 360px at 20% 10%, rgba(180, 190, 205, 0.35), transparent 60%),
    linear-gradient(180deg, #f4f5f7, #e9ebef 100%);
  padding: 24px;
}
.access-gate[hidden] { display: none !important; }
.access-card {
  width: min(400px, 100%);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 28px 24px 22px;
  display: grid;
  gap: 14px;
}
.access-card h2 {
  margin: 0;
  font-family: var(--font-brand);
  font-size: 22px;
  letter-spacing: 0.02em;
}
.access-tip {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
.access-card .field input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 15px;
  letter-spacing: 0.08em;
  font-family: ui-monospace, Consolas, monospace;
}
.access-card .field input.access-mask {
  -webkit-text-security: disc;
  text-security: disc;
}
.access-card button {
  border: 0;
  border-radius: 12px;
  padding: 12px 16px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}
.access-card button:disabled { opacity: 0.6; cursor: wait; }
.access-err {
  margin: 0;
  color: var(--danger);
  font-size: 13px;
}

