.signin {
  min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px;
}
.signin__card { width: min(420px, 100%); padding: 32px 24px; display: grid; gap: 16px; }
.signin__card h1 { font-size: 1.5rem; margin-top: 8px; }
.signin__actions { display: grid; gap: 8px; margin-top: 8px; }
.signin__error {
  padding: 10px 12px; border-radius: var(--r); font-size: 0.875rem;
  background: var(--danger-bg); color: var(--danger); border: 1px solid color-mix(in srgb, var(--danger) 30%, transparent);
}
.locked__icon {
  width: 44px; height: 44px; display: grid; place-items: center; margin-top: 8px;
  border-radius: 50%; background: var(--text); color: #000;
}
.locked__icon svg, .ico, .icon-btn svg, .event__icon svg {
  fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}
.locked__icon svg { width: 20px; height: 20px; }
.ico { width: 15px; height: 15px; }

.link {
  padding: 0; border: 0; background: none; color: var(--text-2); font: inherit;
  text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 3px; cursor: pointer;
  transition: color var(--ease);
}
.link:hover { color: var(--text); text-decoration-color: currentColor; }

.badge { white-space: nowrap; }
.badge--green { color: #3fd27a; background: #04170c; border-color: #0d3a1f; }
.badge--red { color: var(--danger); background: var(--danger-bg); border-color: color-mix(in srgb, var(--danger) 30%, transparent); }
.badge--off { color: var(--text-3); border-color: var(--border); background: none; }

.avatar, .initial {
  width: 32px; height: 32px; flex: none; display: grid; place-items: center; overflow: hidden;
  border-radius: 50%; background: var(--surface-2); border: 1px solid var(--border); font-size: 0.875rem; font-weight: 600;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.initial { position: relative; overflow: visible; }
.initial.is-on::after {
  content: ""; position: absolute; right: -1px; bottom: -1px; width: 9px; height: 9px;
  border-radius: 50%; background: #3fd27a; box-shadow: 0 0 0 2px var(--bg-2);
}
.loading { min-height: 100dvh; display: grid; place-items: center; margin: 0; font-size: 0.875rem; }

.icon-btn {
  width: 32px; height: 32px; flex: none; display: grid; place-items: center; padding: 0;
  border: 0; border-radius: var(--r-sm); background: none; color: var(--text-3); cursor: pointer;
  transition: background var(--ease), color var(--ease);
}
.icon-btn:hover { background: rgba(255, 255, 255, 0.06); color: var(--text); }
.icon-btn svg { width: 18px; height: 18px; }

/* shell */
.shell { min-height: 100dvh; }
.sidebar { display: none; }
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  height: 56px; padding: 0 16px;
  background: rgba(0, 0, 0, 0.72); backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
}
.main {
  width: min(1080px, 100%); margin: 0 auto;
  padding: 24px 16px calc(96px + env(safe-area-inset-bottom));
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-content: start;
}
.bottombar {
  position: fixed; inset: auto 0 0; z-index: 10;
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  background: rgba(0, 0, 0, 0.9); backdrop-filter: blur(18px);
  border-top: 1px solid var(--border);
}
.bottombar a {
  display: grid; justify-items: center; gap: 2px; min-height: 48px; padding-top: 6px;
  color: var(--text-3); font-size: 0.6875rem; font-weight: 500; text-decoration: none;
}
.bottombar a[aria-current="page"] { color: var(--text); }
.bottombar svg, .nav__item svg {
  width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
}
.desk { display: none; }

@media (min-width: 900px) {
  .shell { display: grid; grid-template-columns: 232px 1fr; }
  .topbar, .bottombar { display: none; }
  .desk { display: inline-flex; }
  .sidebar {
    position: sticky; top: 0; height: 100dvh;
    display: flex; flex-direction: column; gap: 24px; padding: 20px 12px;
    border-right: 1px solid var(--border); background: var(--bg-2);
  }
  .sidebar > .logo { padding: 0 8px; }
  .main { padding: 28px 40px 64px; }
}

.nav { display: grid; gap: 2px; }
.nav__gap { height: 14px; }
.nav__item {
  display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 8px;
  border-radius: var(--r-sm); color: var(--text-2); font-size: 0.875rem; text-decoration: none;
  transition: background var(--ease), color var(--ease);
}
.nav__item:hover { background: rgba(255, 255, 255, 0.05); color: var(--text); }
.nav__item[aria-current="page"] { background: rgba(255, 255, 255, 0.07); color: var(--text); }
.nav__count {
  margin-left: auto; min-width: 20px; padding: 0 6px; border-radius: 999px; text-align: center;
  background: #04170c; color: #3fd27a; font-size: 0.6875rem; font-weight: 600; line-height: 18px;
}
.sidebar__user {
  margin-top: auto; display: flex; align-items: center; gap: 10px;
  padding: 12px 0 0 8px; border-top: 1px solid var(--border);
}
.sidebar__name { display: grid; min-width: 0; flex: 1; font-size: 0.875rem; }
.sidebar__name > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.pagehead { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; min-height: 40px; }
.pagehead h1 { font-size: clamp(1.5rem, 1.2rem + 1vw, 1.875rem); }
.pagehead__tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
[data-view="key"] .pagehead .dd, [data-view="purchases"] .pagehead .dd { display: none; }

/* dropdown */
.dd { position: relative; min-width: 0; }
.dd__btn {
  width: 100%; min-height: 36px; padding: 0 34px 0 12px; display: flex; align-items: center;
  border: 1px solid var(--border); border-radius: var(--r); background: var(--bg-2); color: var(--text);
  font: 500 0.8125rem var(--sans); text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer;
  transition: border-color var(--ease), background var(--ease);
}
.dd__btn::after {
  content: ""; position: absolute; right: 13px; top: 50%; width: 6px; height: 6px; margin-top: -4px;
  border-right: 1.5px solid var(--text-3); border-bottom: 1.5px solid var(--text-3); rotate: 45deg;
  transition: rotate 150ms var(--ease-out), margin 150ms var(--ease-out);
}
.dd__btn[aria-expanded="true"] { border-color: var(--border-strong); background: var(--surface); }
.dd__btn[aria-expanded="true"]::after { rotate: 225deg; margin-top: -1px; }
.dd__btn:hover { border-color: var(--border-strong); }
.dd__list {
  position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; min-width: 100%; max-height: 280px; overflow-y: auto;
  margin: 0; padding: 4px; list-style: none;
  border: 1px solid var(--border-strong); border-radius: var(--r); background: #0c0c0c;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6);
  transform-origin: top; animation: dd-in 140ms var(--ease-out);
}
.pagehead .dd__list { left: auto; right: 0; }
@keyframes dd-in { from { opacity: 0; transform: translateY(-4px) scale(0.98); } }
.dd__list li {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px 8px 28px; position: relative;
  border-radius: var(--r-sm); color: var(--text-2); font-size: 0.8125rem; white-space: nowrap; cursor: pointer;
}
.dd__list li:hover, .dd__list li:focus { background: rgba(255, 255, 255, 0.06); color: var(--text); outline: none; }
.dd__list li[aria-selected="true"] { color: var(--text); }
.dd__list li[aria-selected="true"]::before {
  content: ""; position: absolute; left: 11px; top: 50%; width: 8px; height: 4px; margin-top: -4px;
  border-left: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; rotate: -45deg;
}
@media (pointer: coarse) { .dd__btn { min-height: 44px; font-size: 0.875rem; } .dd__list li { padding-block: 12px; } }

.search { position: relative; display: flex; align-items: center; min-width: 0; }
.search input {
  width: 100%; min-height: 36px; padding: 0 12px 0 34px;
  border: 1px solid var(--border); border-radius: var(--r); background: var(--bg-2); color: var(--text);
  font: 500 0.8125rem var(--sans); transition: border-color var(--ease);
}
.search input::placeholder { color: var(--text-3); }
.search input:hover { border-color: var(--border-strong); }
.search input:focus-visible { outline-offset: 0; border-color: transparent; }
.search svg {
  position: absolute; left: 11px; width: 16px; height: 16px; pointer-events: none;
  fill: none; stroke: var(--text-3); stroke-width: 1.8; stroke-linecap: round;
}
@media (pointer: coarse) { .search input { min-height: 44px; font-size: 1rem; } }

.page { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-content: start; }

.banner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px;
  padding: 12px 12px 12px 16px; border-radius: var(--r-lg); font-size: 0.875rem;
  background: #1a1300; border: 1px solid #3d2c00;
}
.banner strong { color: #ffb224; font-weight: 600; }
.banner--red { background: var(--danger-bg); border-color: color-mix(in srgb, var(--danger) 30%, transparent); }
.banner--red strong { color: var(--danger); }

/* overview */
.stats { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.stat {
  position: relative; overflow: hidden; padding: 16px 18px 18px; display: grid; gap: 6px; min-width: 0;
  border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--card);
}
.stat dt { color: var(--text-3); font-size: 0.8125rem; }
.stat dd {
  margin: 0; font-size: 1.75rem; font-weight: 600; letter-spacing: -0.03em; font-variant-numeric: tabular-nums;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.stat__of { color: var(--text-3); font-size: 0.9375rem; font-weight: 500; letter-spacing: 0; }
@media (min-width: 720px) { .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
@media (min-width: 820px) {
  .split { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); align-items: start; }
  .split--even { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
}

.card { padding: 16px; display: grid; gap: 14px; min-width: 0; }
.card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 24px; }
.card__head h2 { font-size: 1rem; }
.card__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.card__empty { padding: 4px 0; }

.rows { list-style: none; margin: 0 -16px; padding: 0; }
.row { display: flex; align-items: center; gap: 12px; padding: 10px 16px; min-height: 56px; }
.row + .row { border-top: 1px solid var(--border); }
.rows:empty { display: none; }
.row__who { display: grid; min-width: 0; flex: 1; }
.row__who > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row__num { font-size: 0.875rem; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rows--plain .row { min-height: 52px; }
.dot { width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--text-3); }
.status { font-size: 0.8125rem; font-weight: 500; color: var(--text-3); }
[data-status="working"] .dot { background: #3fd27a; box-shadow: 0 0 0 3px #04170c; }
[data-status="working"] .status { color: #3fd27a; }
[data-status="updating"] .dot { background: #ffb224; box-shadow: 0 0 0 3px #1a1300; }
[data-status="updating"] .status { color: #ffb224; }
[data-status="down"] .dot { background: var(--danger); box-shadow: 0 0 0 3px var(--danger-bg); }
[data-status="down"] .status { color: var(--danger); }

.changelog { display: grid; gap: 14px; }
.changelog__entry { display: grid; gap: 6px; }
.changelog__entry + .changelog__entry { padding-top: 14px; border-top: 1px solid var(--border); }
.changelog ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 0.875rem; }
.changelog li { display: flex; align-items: baseline; gap: 10px; }
.tag {
  flex: none; width: 64px; padding: 1px 0; border-radius: 999px; text-align: center;
  font-size: 0.6875rem; font-weight: 600; line-height: 16px;
  color: var(--text-2); background: rgba(255, 255, 255, 0.06);
}
.tag[data-kind="+"] { color: #3fd27a; background: #04170c; }
.tag[data-kind="-"] { color: var(--text-3); background: none; border: 1px solid var(--border); }

.code {
  display: block; min-width: 0; overflow-x: auto; scrollbar-width: none; white-space: nowrap;
  padding: 9px 12px; border: 1px solid var(--border); border-radius: var(--r);
  background: var(--bg); color: var(--text-2); font-size: 0.8125rem; line-height: 20px;
}

/* accounts */
.accounts { display: grid; gap: 16px; }
.account { overflow: hidden; }
.account__head { display: flex; align-items: center; gap: 12px; padding: 16px; }
.account__head .initial { width: 36px; height: 36px; }
.account__who { display: grid; min-width: 0; flex: 1; }
.account__who > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account > .facts { padding: 0 16px 16px; }
.account > .game__stats { padding: 14px 16px 16px; border-top: 1px solid var(--border); grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
@media (min-width: 640px) { .account > .game__stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.account__foot { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--border); }

.facts { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.facts dt, .game__stats dt { color: var(--text-3); font-size: 0.75rem; }
.facts dd, .game__stats dd { margin: 0; font-size: 0.875rem; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
@media (min-width: 640px) { .facts { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.game__stats { margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px 16px; }
.game__stats:empty { display: none; }

/* inventory */
#invBody { display: grid; gap: 16px; }
.invhead { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.invhead > .dd { width: min(240px, 100%); }
.tabs { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--border); border-radius: var(--r); background: var(--bg-2); }
.tab {
  display: inline-flex; align-items: center; gap: 8px; min-height: 30px; padding: 0 12px;
  border: 0; border-radius: var(--r-sm); background: none; color: var(--text-2);
  font: 500 0.8125rem var(--sans); cursor: pointer; transition: background var(--ease), color var(--ease);
}
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { background: rgba(255, 255, 255, 0.09); color: var(--text); }
.tab__count { color: var(--text-3); font-variant-numeric: tabular-nums; }
@media (pointer: coarse) { .tab { min-height: 38px; } }

.toolbar { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.toolbar .search { grid-column: 1 / -1; }
.toolbar:has(.dd[hidden]) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.toolbar--short { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 720px) {
  .toolbar { grid-template-columns: minmax(0, 1fr) repeat(3, minmax(130px, 170px)); }
  .toolbar:has(.dd[hidden]) { grid-template-columns: minmax(0, 1fr) repeat(2, minmax(130px, 170px)); }
  .toolbar .search { grid-column: auto; }
  .toolbar--short { grid-template-columns: repeat(2, minmax(150px, 200px)); }
}

.income {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 32px;
  padding: 4px 2px 18px; border-bottom: 1px solid var(--border);
}
.income__label { color: var(--text-3); font-size: 0.875rem; }
.income__value {
  font-size: clamp(2.5rem, 1.8rem + 2.6vw, 3.75rem); line-height: 1; font-weight: 600;
  letter-spacing: -0.045em; font-variant-numeric: tabular-nums;
}
.income__meta { margin: 0; display: flex; flex-wrap: wrap; gap: 8px 28px; }
.income__meta dt { color: var(--text-3); font-size: 0.75rem; }
.income__meta dd { margin: 0; font-size: 0.875rem; font-weight: 500; font-variant-numeric: tabular-nums; }

.slots { display: grid; gap: 10px; }
.slots__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.slots__head h2 { font-size: 1rem; }

.inv { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.inv--slots {
  grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(128px, 1fr);
  overflow-x: auto; scrollbar-width: none; scroll-snap-type: x mandatory;
}
.inv--slots .item { scroll-snap-align: start; }
#invGrid .item__rate { color: var(--text-2); }
.inv--slots .item:not(.item--empty) { border-color: #0d3a1f; background: linear-gradient(rgba(63, 210, 122, 0.06), transparent 60%), var(--bg-2); }
.item {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: 2px; padding: 10px 12px 12px; min-width: 0;
  border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--card);
}
.item--empty {
  place-items: center; min-height: 120px; border-style: dashed; background: none;
  color: var(--text-3); font-size: 0.8125rem;
}
.item__img {
  aspect-ratio: 1; margin: 0 -2px 8px; display: grid; place-items: center; overflow: hidden;
  border-radius: var(--r); background: radial-gradient(circle at 50% 62%, rgba(255, 255, 255, 0.07), transparent 68%);
  color: var(--text-3); font-size: 1.75rem; font-weight: 600;
}
.item__img img { width: 86%; height: 86%; object-fit: contain; }
.item__muts { position: absolute; top: 9px; left: 9px; right: 34px; display: flex; flex-wrap: wrap; gap: 4px; }
.mut {
  padding: 0 7px; border-radius: 999px; background: rgba(0, 0, 0, 0.75); border: 1px solid var(--border-strong);
  font-size: 0.6875rem; font-weight: 600; line-height: 18px; color: var(--text);
}
.mut[data-mut="Golden"] { color: #f5c542; border-color: #4a3a0c; }
.mut[data-mut="Rainbow"] { color: #ff9ad5; border-color: #4a1f3a; }
.mut[data-mut="Frozen"] { color: #8fd3ff; border-color: #163a52; }
.mut[data-mut="Shiny"] { color: #fff2b3; border-color: #4a4420; }
.item__fav { position: absolute; top: 10px; right: 10px; color: #f5c542; }
.item__fav svg { width: 16px; height: 16px; fill: currentColor; stroke: none; }
.item__name { font-size: 0.875rem; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item__sub { display: flex; justify-content: space-between; gap: 8px; color: var(--text-3); font-size: 0.75rem; }
.item__kg { font-variant-numeric: tabular-nums; }
.item__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 6px; margin-top: 8px; min-height: 22px; }
.item__rate { font-size: 1rem; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.item__state {
  padding: 0 7px; border-radius: 999px; font-size: 0.6875rem; font-weight: 600; line-height: 18px; white-space: nowrap;
  color: var(--text-2); background: rgba(255, 255, 255, 0.06);
}
.item__state[data-state="ready"] { color: #3fd27a; background: #04170c; }
.item__state[data-state="incubating"] { color: #ffb224; background: #1a1300; }
[data-rarity="Uncommon"] { color: #7fd67f; }
[data-rarity="Rare"] { color: #5aa9ff; }
[data-rarity="Epic"] { color: #b78cff; }
[data-rarity="Legendary"] { color: #ffb224; }
[data-rarity="Mythic"] { color: #ff6b9a; }

/* leaderboard */
.boards { display: grid; gap: 24px; }
.board { display: grid; gap: 10px; }
.board__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; }
.board__head h2 { font-size: 1rem; }
.board__best { color: var(--text-2); font-size: 0.875rem; }
.lb { list-style: none; margin: 0; padding: 0; overflow: hidden; }
.lb__row {
  display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; align-items: center; gap: 12px;
  min-height: 48px; padding: 0 16px; font-size: 0.875rem;
}
.lb__row + .lb__row, .lb__gap + .lb__row { border-top: 1px solid var(--border); }
.lb__row--head { min-height: 38px; color: var(--text-3); font-size: 0.75rem; }
.lb__row--head span:last-child { text-align: right; }
.lb__rank { color: var(--text-3); font-variant-numeric: tabular-nums; }
.lb__row[data-rank="1"] .lb__rank, .lb__row[data-rank="2"] .lb__rank, .lb__row[data-rank="3"] .lb__rank {
  width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%;
  color: #000; font-weight: 700; font-size: 0.8125rem;
}
.lb__row[data-rank="1"] .lb__rank { background: #f5c542; }
.lb__row[data-rank="2"] .lb__rank { background: #c9ced6; }
.lb__row[data-rank="3"] .lb__rank { background: #d08b4f; }
.lb__name { display: flex; align-items: center; gap: 8px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb__steals { font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.lb__row.is-you { background: rgba(255, 255, 255, 0.05); }
.lb__row.is-supporter .lb__name { color: #e8c36a; }
.lb__sup { padding: 0 7px; border: 1px solid rgba(232, 195, 106, 0.35); border-radius: 999px; background: rgba(232, 195, 106, 0.1); color: #e8c36a; font-size: 0.6875rem; font-weight: 600; line-height: 16px; }
.lb__you { padding: 0 7px; border-radius: 999px; background: var(--text); color: #000; font-size: 0.6875rem; font-weight: 600; line-height: 18px; }
.lb__gap { padding: 10px 16px 6px; border-top: 1px solid var(--border); color: var(--text-3); font-size: 0.75rem; }

/* activity */
.activity { display: grid; gap: 20px; }
.activity__day { display: grid; gap: 8px; }
.activity__label { font-size: 0.8125rem; font-weight: 500; color: var(--text-3); }
.event { display: flex; align-items: center; gap: 12px; padding: 12px 16px; }
.event + .event { border-top: 1px solid var(--border); }
.event__icon {
  width: 32px; height: 32px; flex: none; display: grid; place-items: center;
  border-radius: 50%; background: var(--surface-2); color: var(--text-2);
}
.event__icon svg { width: 16px; height: 16px; }
.event__icon[data-type="steal"] { background: #04170c; color: #3fd27a; }
.event__icon[data-type="hatch"] { background: #1a1300; color: #ffb224; }
.event__body { display: grid; min-width: 0; flex: 1; font-size: 0.875rem; }
.event__body p { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.event__body strong { font-weight: 500; }
.event time { white-space: nowrap; font-variant-numeric: tabular-nums; }

/* key */
.keybox { display: flex; flex-wrap: wrap; gap: 8px; }
.keybox .code { flex: 1 1 140px; padding-block: 7px; }
.meter { height: 4px; border-radius: 4px; background: rgba(255, 255, 255, 0.07); overflow: hidden; }
.meter span { display: block; height: 100%; border-radius: inherit; background: #3fd27a; }
.meter[data-low="true"] span { background: #ffb224; }

/* purchases */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 0.875rem; white-space: nowrap; }
.table th { padding: 12px 16px; text-align: left; color: var(--text-3); font-size: 0.75rem; font-weight: 500; border-bottom: 1px solid var(--border); }
.table td { padding: 14px 16px; font-variant-numeric: tabular-nums; }
.table tr + tr td { border-top: 1px solid var(--border); }
.table .num { text-align: right; }
.table .mono { font-family: var(--mono); font-size: 0.8125rem; color: var(--text-2); }

.empty { padding: 32px 24px; display: grid; justify-items: start; gap: 8px; }
.empty h2 { font-size: 1rem; }
.empty .btn { margin-top: 8px; }

.settings__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding: 16px; }
.settings__row + .settings__row { border-top: 1px solid var(--border); }

/* dialogs */
.dialog { width: min(420px, calc(100% - 32px)); max-height: calc(100dvh - 32px); overflow-y: auto; padding: 24px; color: var(--text); display: grid; gap: 12px; }
.dialog:not([open]) { display: none; }
.dialog::backdrop { background: rgba(0, 0, 0, 0.72); }
.dialog[open] { animation: dialog-in 180ms var(--ease-out); }
@keyframes dialog-in { from { opacity: 0; transform: translateY(8px) scale(0.98); } }
.dialog__actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.dialog__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: -6px -8px 0 0; }
.buyer { display: grid; gap: 10px; }
.field { display: grid; gap: 6px; font-size: 0.8125rem; color: var(--text-3); }
.field input {
  width: 100%; min-height: 36px; padding: 0 12px;
  border: 1px solid var(--border); border-radius: var(--r); background: var(--bg-2); color: var(--text);
  font: 500 0.8125rem var(--sans); transition: border-color var(--ease);
}
.field input::placeholder { color: var(--text-3); }
.field input:hover { border-color: var(--border-strong); }
.field input:focus-visible { outline-offset: 0; border-color: transparent; }
@media (pointer: coarse) { .field input { min-height: 44px; font-size: 1rem; } }
.summary { display: grid; gap: 14px; padding: 16px; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--bg); }
.kv { margin: 0; display: grid; gap: 10px; }
.kv > div { display: flex; justify-content: space-between; gap: 16px; font-size: 0.875rem; }
.kv dt { color: var(--text-3); }
.kv dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.summary__total { padding-top: 10px; border-top: 1px solid var(--border); }
.summary__total dd { font-size: 1.125rem; font-weight: 600; }
.buy { display: grid; gap: 12px; }
.buy[hidden] { display: none; }
.plan-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.plan-opt { display: grid; gap: 2px; justify-items: start; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--r); background: transparent; color: var(--text); text-align: left; cursor: pointer; transition: border-color var(--ease), background-color var(--ease); }
.plan-opt b { font-weight: 600; }
.plan-opt span { color: var(--text-2); font-size: 0.875rem; font-variant-numeric: tabular-nums; }
.plan-opt[aria-checked="true"] { border-color: var(--text); background: rgba(255, 255, 255, 0.04); }
.plan-opt:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) { .plan-opt:not([aria-checked="true"]):hover { border-color: var(--border-strong); } }
.btn--discord { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; background: #5865f2; border-color: #5865f2; color: #fff; font-size: 0.9375rem; }
.btn--discord svg { width: 20px; height: 20px; fill: currentColor; flex: none; }
@media (hover: hover) and (pointer: fine) { .btn--discord:hover { background: #4752c4; border-color: #4752c4; color: #fff; } }
.notice { padding: 10px 12px; border-radius: var(--r); font-size: 0.875rem; color: #ffb224; background: rgba(255, 178, 36, 0.08); border: 1px solid rgba(255, 178, 36, 0.3); }
.locked__icon.is-ok { background: #3fd27a; }
.paidkey { display: grid; gap: 6px; }
.paidkey__row { display: flex; gap: 8px; }
.paidkey code { flex: 1; min-width: 0; min-height: 44px; padding: 0 12px; display: flex; align-items: center; border: 1px solid var(--border-strong); border-radius: var(--r); background: var(--bg); font-family: var(--mono); font-size: 0.875rem; overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
.paidkey .btn { min-height: 44px; }
.qr { justify-self: center; width: min(260px, 100%); aspect-ratio: 1; padding: 14px; border-radius: var(--r-lg); background: #fff; }
.qr svg { display: block; width: 100%; height: 100%; }
.qr-meta { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.qr-amount { font-size: 1.5rem; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.timer { font-family: var(--mono); color: var(--text-2); font-variant-numeric: tabular-nums; }
.timer.is-low { color: #ffb224; }

.initial img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.account__note { margin: 0; padding: 0 16px 14px; font-size: 0.75rem; }
[data-priv] { cursor: pointer; border-radius: 4px; }
[data-priv]:hover { text-decoration: underline dotted; text-underline-offset: 3px; }
[data-priv]:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.lb__name > [data-priv] { min-width: 0; overflow: hidden; text-overflow: ellipsis; }

/* Remote: satu kartu per section game, baris nama kiri + kontrol kanan */
.rc { display: grid; gap: 12px; margin-top: 16px; }
.rc__col { display: grid; gap: 12px; align-content: start; }
@media (min-width: 900px) { .rc { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; } }
#rcTabs { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
#rcTabs::-webkit-scrollbar { display: none; }
#rcTabs .tab { flex-shrink: 0; }
.rc__sec { padding: 0 16px; }
.rc__sec > summary {
  display: flex; align-items: center; gap: 10px; min-height: 48px; cursor: pointer; list-style: none;
  font-size: 0.875rem; font-weight: 600; user-select: none;
}
.rc__sec > summary::-webkit-details-marker { display: none; }
.rc__sec > summary::after {
  content: ""; width: 7px; height: 7px; margin: 0 2px 3px 0; flex-shrink: 0;
  border: solid var(--text-3); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); transition: transform var(--ease);
}
.rc__sec[open] > summary::after { transform: rotate(-135deg); margin-bottom: -3px; }
.rc__sec > summary:hover::after { border-color: var(--text); }
.rc__sec[open] { padding-bottom: 6px; }
.rc__on { margin-left: auto; font-size: 0.75rem; font-weight: 500; color: #3fd27a; }
.rc__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; border-top: 1px solid var(--border); font-size: 0.875rem; }
@media (max-width: 560px) {
  .rc__row--wide { flex-direction: column; align-items: stretch; gap: 8px; padding: 10px 0; }
  .rc__row--wide .rc__field, .rc__row--wide .rc__slider { width: 100%; }
  .rc__row--wide .rc__multi > div { left: 0; right: 0; width: auto; }
}
.rc__row > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.rc__field {
  width: min(200px, 50vw); min-height: 34px; padding: 0 10px; flex-shrink: 0;
  border: 1px solid var(--border); border-radius: var(--r); background: var(--bg-2); color: var(--text);
  font: 500 0.8125rem var(--sans); transition: border-color var(--ease);
}
.rc__field:hover { border-color: var(--border-strong); }
.rc__slider { display: flex; align-items: center; gap: 10px; width: min(220px, 50vw); flex-shrink: 0; }
.rc__slider input { flex: 1; min-width: 0; accent-color: var(--text); }
.rc__slider output { min-width: 4ch; text-align: right; font-variant-numeric: tabular-nums; color: var(--text-2); font-size: 0.8125rem; }
.rc__multi { position: relative; flex-shrink: 0; }
.rc__multi summary { display: flex; align-items: center; cursor: pointer; list-style: none; }
.rc__multi summary::-webkit-details-marker { display: none; }
.rc__multi > div {
  position: absolute; right: 0; z-index: 5; margin-top: 4px; width: min(240px, 70vw); max-height: 240px; overflow: auto; padding: 4px;
  border: 1px solid var(--border-strong); border-radius: var(--r); background: var(--surface);
}
.rc__find {
  position: sticky; top: -4px; z-index: 1; width: 100%; min-height: 34px; margin-bottom: 4px; padding: 0 10px;
  border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--bg-2); color: var(--text); font: 500 0.8125rem var(--sans);
}
.rc__multi label[hidden] { display: none; }
.rc__multi label { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: var(--r-sm); font-size: 0.8125rem; cursor: pointer; }
.rc__multi label:hover { background: var(--surface-2); }
.switch {
  appearance: none; position: relative; flex-shrink: 0; width: 36px; height: 20px; margin: 0; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--border-strong); cursor: pointer; transition: background var(--ease);
}
.switch::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--text-2); transition: transform var(--ease), background var(--ease);
}
.switch:checked { background: #3fd27a; border-color: #3fd27a; }
.switch:checked::after { transform: translateX(16px); background: #000; }
@media (pointer: coarse) { .rc__field { min-height: 44px; font-size: 1rem; } }
