/* ---------- 色板 ---------- */
:root {
  --bg: #f3f4f8;
  --surface: #ffffff;
  --surface-2: #f7f8fb;
  --text: #121521;
  --text-2: #4d5466;
  --text-3: #8b92a3;
  --line: #e6e8ef;
  --line-2: #d8dbe5;
  --brand: #5b5bf0;
  --brand-2: #8b5cf6;
  --brand-soft: #eeeefe;
  --on-brand: #ffffff;
  --ok: #109463;
  --ok-soft: #e5f6ee;
  --danger: #dc3f3f;
  --danger-soft: #fdeded;
  --warn: #c76a00;
  --warn-soft: #fff3e0;
  --k-hour: #0f9b9b;
  --k-month: #3a76f0;
  --k-year: #8a55f0;
  --k-forever: #d98a00;
  --shadow-sm: 0 1px 2px rgba(18, 21, 33, .05);
  --shadow: 0 1px 2px rgba(18, 21, 33, .04), 0 6px 20px rgba(18, 21, 33, .06);
  --shadow-lg: 0 2px 6px rgba(18, 21, 33, .05), 0 18px 48px rgba(18, 21, 33, .10);
  --r: 16px;
  --r-sm: 10px;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1117;
    --surface: #181b23;
    --surface-2: #1e222c;
    --text: #eceef4;
    --text-2: #b3b9c7;
    --text-3: #7c8496;
    --line: #272b36;
    --line-2: #343946;
    --brand: #7b7bff;
    --brand-2: #a37cff;
    --brand-soft: #23244a;
    --ok: #3fcf91;
    --ok-soft: #12301f;
    --danger: #ff6b6b;
    --danger-soft: #3a1c1f;
    --warn: #ffad3d;
    --warn-soft: #382712;
    --k-hour: #2cc7c7;
    --k-month: #6b9bff;
    --k-year: #ad86ff;
    --k-forever: #ffb52e;
    --shadow-sm: none;
    --shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 8px 24px rgba(0, 0, 0, .25);
    --shadow-lg: 0 18px 48px rgba(0, 0, 0, .45);
    color-scheme: dark;
  }
}

/* ---------- 基础 ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--text);
  font: 15px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
a { color: var(--brand); text-decoration: none; }
h1 { font-size: 1.5rem; line-height: 1.25; margin: 0; letter-spacing: -.01em; }
h2 { font-size: 1.05rem; margin: 0 0 1rem; display: flex; align-items: center; gap: .5rem; }
p { margin: 0; }
em { font-style: normal; color: var(--text-3); font-weight: 400; }
code { font-family: var(--mono); }
.muted { color: var(--text-3); }
.sub { color: var(--text-3); font-size: .92rem; margin-top: .3rem; }
.warn-text { color: var(--warn) !important; }
.ic { width: 20px; height: 20px; flex: none; }
.ic.xl { width: 40px; height: 40px; stroke-width: 1.4; }
[hidden] { display: none !important; }

.page { max-width: 1040px; margin: 0 auto; padding: 1.75rem 20px 4rem; }

/* ---------- 顶栏（电脑） ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top, 0px);
}
.topbar-in { max-width: 1040px; margin: 0 auto; padding: .65rem 20px; display: flex; align-items: center; gap: 1.5rem; }
.brand { display: flex; align-items: center; gap: .6rem; color: var(--text); font-weight: 700; font-size: 1.02rem; }
.brand-mark {
  width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2)); box-shadow: 0 4px 12px color-mix(in srgb, var(--brand) 35%, transparent);
}
.brand-mark .ic { width: 18px; height: 18px; stroke-width: 2; }
.brand-mark.lg { width: 56px; height: 56px; border-radius: 17px; }
.brand-mark.lg .ic { width: 28px; height: 28px; }
.brand-mark.muted { background: var(--surface-2); color: var(--text-3); box-shadow: none; border: 1px solid var(--line); }
.topnav { display: flex; gap: .25rem; }
.topnav a {
  display: flex; align-items: center; gap: .45rem; padding: .45rem .85rem; border-radius: 10px;
  color: var(--text-2); font-weight: 500; transition: background .15s, color .15s;
}
.topnav a .ic { width: 18px; height: 18px; }
.topnav a:hover { background: var(--surface); color: var(--text); }
.topnav a.on { background: var(--surface); color: var(--brand); box-shadow: var(--shadow-sm); }
.me-chip {
  margin-left: auto; display: flex; align-items: center; gap: .55rem; padding: .3rem .75rem .3rem .3rem;
  border-radius: 999px; color: var(--text); border: 1px solid transparent;
}
.me-chip:hover, .me-chip.on { background: var(--surface); border-color: var(--line); }
.me-name { font-weight: 500; max-width: 10em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; font-weight: 700; font-size: .85rem;
}
.avatar.xl { width: 60px; height: 60px; font-size: 1.5rem; }
.tag {
  display: inline-flex; align-items: center; font-size: .72rem; font-weight: 600; padding: .1rem .5rem; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand); vertical-align: middle;
}
.tag.gray { background: var(--surface-2); color: var(--text-3); border: 1px solid var(--line); }

/* ---------- 底部导航（手机） ---------- */
.tabbar { display: none; }

/* ---------- 按钮与表单 ---------- */
.btn {
  -webkit-appearance: none; appearance: none; font: inherit; font-weight: 600; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  min-height: 42px; padding: .5rem 1.1rem; border-radius: 12px;
  background: var(--surface); color: var(--text); border: 1px solid var(--line-2);
  transition: transform .08s, background .15s, border-color .15s, box-shadow .15s; text-decoration: none; white-space: nowrap;
}
.btn:hover { border-color: var(--text-3); }
.btn:active { transform: scale(.98); }
.btn .ic { width: 18px; height: 18px; }
.btn.primary {
  background: linear-gradient(135deg, var(--brand), color-mix(in srgb, var(--brand) 70%, var(--brand-2)));
  color: var(--on-brand); border-color: transparent; box-shadow: 0 6px 16px color-mix(in srgb, var(--brand) 30%, transparent);
}
.btn.primary:hover { filter: brightness(1.06); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--surface-2); }
.btn.danger { color: var(--danger); }
.btn.ghost.danger:hover { background: var(--danger-soft); }
.btn.armed { background: var(--danger) !important; color: #fff !important; border-color: transparent !important; }
.btn.block { display: flex; width: 100%; }
.btn.lg { min-height: 50px; font-size: 1.02rem; border-radius: 14px; }
.btn.sm { min-height: 34px; padding: .3rem .8rem; border-radius: 10px; font-size: .88rem; }
.btn:disabled { opacity: .6; cursor: default; }

.form { display: flex; flex-direction: column; gap: 1rem; }
.field { display: flex; flex-direction: column; gap: .4rem; }
.field > span { font-size: .88rem; font-weight: 600; color: var(--text-2); }
.field > span em { font-size: .82rem; margin-left: .3rem; }
input, select, textarea {
  font: inherit; font-size: 16px; color: var(--text); background: var(--surface);
  border: 1px solid var(--line-2); border-radius: 12px; padding: .7rem .9rem; width: 100%; min-height: 46px;
  transition: border-color .15s, box-shadow .15s; -webkit-appearance: none; appearance: none;
}
select {
  padding-right: 2.4rem; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238b92a3' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .8rem center; background-size: 18px;
}
textarea { font-family: var(--mono); font-size: 15px; resize: vertical; min-height: 140px; line-height: 1.6; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 16%, transparent);
}
input::placeholder, textarea::placeholder { color: var(--text-3); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.seg label { position: relative; cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span {
  display: flex; flex-direction: column; gap: .15rem; padding: .75rem .9rem; border-radius: 12px; height: 100%;
  border: 1px solid var(--line-2); background: var(--surface); font-weight: 600; transition: border-color .15s, background .15s;
}
.seg em { font-size: .8rem; }
.seg input:checked + span { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 1px var(--brand) inset; }

/* ---------- 提示 ---------- */
.toasts { display: flex; flex-direction: column; gap: .5rem; margin-bottom: 1.2rem; }
.toast {
  display: flex; align-items: center; gap: .6rem; padding: .75rem 1rem; border-radius: 12px; font-weight: 500;
  animation: drop .25s ease-out; transition: opacity .4s, transform .4s;
}
.toast.ok { background: var(--ok-soft); color: var(--ok); }
.toast.error { background: var(--danger-soft); color: var(--danger); }
.toast.fade { opacity: 0; transform: translateY(-4px); }
@keyframes drop { from { opacity: 0; transform: translateY(-6px); } }
.notice {
  display: flex; gap: .7rem; padding: 1rem; border-radius: 12px; background: var(--warn-soft); color: var(--warn); font-size: .92rem;
}
.notice .ic { margin-top: .1rem; }

/* ---------- 登录页 ---------- */
.auth-page { background:
  radial-gradient(900px 500px at 15% -10%, color-mix(in srgb, var(--brand) 18%, transparent), transparent 60%),
  radial-gradient(700px 500px at 100% 110%, color-mix(in srgb, var(--brand-2) 16%, transparent), transparent 60%),
  var(--bg); }
.auth-page .page { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; padding-block: 2rem; }
.auth {
  width: 100%; max-width: 400px; margin: 0 auto; background: var(--surface); border: 1px solid var(--line);
  border-radius: 24px; padding: 2.2rem 1.8rem 1.8rem; box-shadow: var(--shadow-lg);
}
.auth-brand { text-align: center; margin-bottom: 1.8rem; }
.auth-brand .brand-mark { margin: 0 auto 1rem; }
.auth-brand p { color: var(--text-3); margin-top: .4rem; font-size: .92rem; }
.auth-foot { color: var(--text-3); font-size: .82rem; text-align: center; margin-top: 1.2rem; }
.auth .btn.primary { margin-top: .4rem; }

/* ---------- 首页 ---------- */
.hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.6rem; }
.eyebrow { color: var(--text-3); font-weight: 500; margin-bottom: .3rem; }
.hero h1 { font-size: 1.75rem; }
.stats { display: flex; gap: .7rem; }
.stat {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: .7rem 1.1rem; min-width: 104px;
  box-shadow: var(--shadow-sm);
}
.stat b { display: block; font-size: 1.5rem; line-height: 1.15; font-variant-numeric: tabular-nums; }
.stat span { color: var(--text-3); font-size: .82rem; }
.games { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; }
.game {
  --g1: var(--brand); --g2: var(--brand-2);
  position: relative; overflow: hidden; display: flex; align-items: center; gap: 1rem; padding: 1.3rem 1.2rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px; color: var(--text);
  box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s, border-color .15s;
}
.game::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(420px 160px at 0% 0%, color-mix(in srgb, var(--g1) 14%, transparent), transparent 70%);
}
.game:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--g1) 40%, var(--line)); }
.game.off { opacity: .72; }
.game-mark {
  position: relative; width: 58px; height: 58px; border-radius: 17px; flex: none; display: grid; place-items: center;
  font-size: 1.6rem; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--g1), var(--g2));
  box-shadow: 0 8px 18px color-mix(in srgb, var(--g1) 35%, transparent);
}
.game-info { position: relative; display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.game-name { font-size: 1.12rem; font-weight: 700; }
.game-sub { color: var(--text-3); font-size: .9rem; }
.game-sub b { color: var(--text); font-variant-numeric: tabular-nums; }
.game-go { position: relative; margin-left: auto; color: var(--text-3); }
.g-another-eden { --g1: #5b5bf0; --g2: #22b8cf; }
.g-octopath-cotc { --g1: #e0782b; --g2: #c2410c; }

/* ---------- 游戏页 ---------- */
.back { display: inline-flex; align-items: center; gap: .2rem; color: var(--text-3); font-weight: 500; margin-bottom: 1rem; margin-left: -.3rem; }
.back:hover { color: var(--text); }
.back .ic { width: 18px; height: 18px; }
.game-head { --g1: var(--brand); --g2: var(--brand-2); display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.game-head .game-mark { width: 52px; height: 52px; font-size: 1.4rem; border-radius: 15px; }
.claim .buyer { max-width: 460px; margin-bottom: 1.2rem; }
.kinds { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.kind {
  --k: var(--brand);
  font: inherit; color: var(--text); text-align: left; cursor: pointer; position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: .2rem; padding: 1.15rem 1.15rem 1rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow);
  transition: transform .12s, box-shadow .15s, border-color .15s;
}
.kind::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--k); }
.kind::after {
  content: ""; position: absolute; right: -40px; top: -40px; width: 140px; height: 140px; border-radius: 50%;
  background: color-mix(in srgb, var(--k) 10%, transparent); pointer-events: none;
}
.kind:hover:not(:disabled) { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--k) 45%, var(--line)); }
.kind:active:not(:disabled) { transform: scale(.98); }
.kind:disabled { cursor: not-allowed; box-shadow: none; }
.kind:disabled > * { opacity: .5; }
.kind:disabled .badge { opacity: 1; }
.kind-top { display: flex; align-items: center; gap: .5rem; position: relative; z-index: 1; }
.kind-name { font-size: 1.15rem; font-weight: 700; }
.kind-descr { color: var(--text-3); font-size: .85rem; position: relative; z-index: 1; }
.kind-stock { margin-top: .9rem; color: var(--text-3); font-size: .88rem; position: relative; z-index: 1; }
.kind-stock b { font-size: 2.1rem; line-height: 1; color: var(--text); font-weight: 750; font-variant-numeric: tabular-nums; margin-right: .15rem; }
.kind-cta {
  position: relative; z-index: 1; margin-top: .9rem; display: flex; align-items: center; justify-content: center; gap: .2rem;
  padding: .6rem; border-radius: 11px; font-weight: 650; color: var(--k); background: color-mix(in srgb, var(--k) 11%, transparent);
}
.kind-cta .ic { width: 16px; height: 16px; }
.kind:hover:not(:disabled) .kind-cta { background: var(--k); color: #fff; }
.badge {
  font-size: .72rem; font-weight: 700; padding: .12rem .5rem; border-radius: 999px; background: var(--surface-2);
  color: var(--text-3); border: 1px solid var(--line); margin-left: auto;
}
.badge.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.k-hour { --k: var(--k-hour); }
.k-month { --k: var(--k-month); }
.k-year { --k: var(--k-year); }
.k-forever { --k: var(--k-forever); }

/* ---------- 领取结果 ---------- */
.ticket {
  --k: var(--brand);
  max-width: 560px; margin: 0 auto; background: var(--surface); border: 1px solid var(--line); border-radius: 24px;
  padding: 1.6rem; box-shadow: var(--shadow-lg); position: relative; overflow: hidden; animation: pop .3s ease-out;
}
.ticket::before { content: ""; position: absolute; inset: 0 0 auto; height: 5px; background: linear-gradient(90deg, var(--k), color-mix(in srgb, var(--k) 40%, var(--brand-2))); }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.985); } }
.ticket-head { display: flex; align-items: center; gap: .8rem; margin-bottom: 1.3rem; }
.ok-dot { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--ok-soft); color: var(--ok); flex: none; }
.ok-dot .ic { stroke-width: 2.6; }
.ticket-title { font-size: 1.15rem; font-weight: 700; }
.ticket-sub { color: var(--text-3); font-size: .9rem; }
.code {
  display: block; width: 100%; font: 700 clamp(1.25rem, 5.4vw, 1.8rem)/1.3 var(--mono); letter-spacing: .06em; text-align: center;
  color: var(--text); word-break: break-all; padding: 1.2rem .8rem; margin-bottom: .9rem; cursor: pointer;
  background: var(--surface-2); border: 1.5px dashed var(--line-2); border-radius: 16px; user-select: all; -webkit-user-select: all;
  transition: background .2s, border-color .2s;
}
.code:hover { border-color: var(--k); }
.code.flash { background: var(--ok-soft); border-color: var(--ok); }
#copy.done { background: var(--ok); box-shadow: 0 6px 16px color-mix(in srgb, var(--ok) 30%, transparent); }
.meta { margin: 1.3rem 0 0; display: grid; gap: .1rem; }
.meta > div { display: flex; justify-content: space-between; gap: 1rem; padding: .55rem 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.meta > div:last-child { border-bottom: 0; }
.meta dt { color: var(--text-3); flex: none; }
.meta dd { margin: 0; text-align: right; font-weight: 500; word-break: break-all; }
.actions { display: grid; margin-top: 1rem; }
.actions form, .actions .btn { width: 100%; }
.actions form .btn { width: 100%; }

/* ---------- 列表（记录、库存明细） ---------- */
.page-head { margin-bottom: 1.3rem; }
.page-head h1 { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.filters { display: flex; gap: .7rem; margin-bottom: 1rem; flex-wrap: wrap; }
.filters select { width: auto; flex: 0 0 200px; }
.search { position: relative; flex: 1 1 240px; display: block; }
.search .ic { position: absolute; left: .85rem; top: 50%; transform: translateY(-50%); color: var(--text-3); width: 18px; height: 18px; }
.search input { padding-left: 2.5rem; }
.rlist { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); overflow: hidden; }
.rrow { display: flex; align-items: center; gap: .9rem; padding: .85rem 1.1rem; border-bottom: 1px solid var(--line); }
.rrow:last-child { border-bottom: 0; }
.rrow:hover { background: var(--surface-2); }
.rmain { flex: 1; min-width: 0; }
.rcode { font-size: .98rem; font-weight: 600; letter-spacing: .02em; word-break: break-all; }
.rsub { display: flex; flex-wrap: wrap; gap: .15rem .9rem; color: var(--text-3); font-size: .84rem; margin-top: .15rem; }
.rnote { color: var(--text-2); }
.ract { flex: none; }
.idx { width: 2rem; color: var(--text-3); font-size: .85rem; text-align: right; font-variant-numeric: tabular-nums; flex: none; }
.pill {
  --k: var(--brand); flex: none; display: inline-flex; align-items: center; font-size: .8rem; font-weight: 700;
  padding: .22rem .65rem; border-radius: 999px; color: var(--k); background: color-mix(in srgb, var(--k) 12%, transparent);
  min-width: 4.4em; justify-content: center;
}
.pill.lg { font-size: 1rem; padding: .3rem .9rem; }

/* ---------- 库存 ---------- */
.stock-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 1.6rem; }
.stock-card {
  --k: var(--brand); display: flex; flex-direction: column; gap: .5rem; padding: 1.1rem; color: var(--text);
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow);
  transition: transform .15s, border-color .15s;
}
.stock-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--k) 45%, var(--line)); }
.stock-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .35rem .5rem; font-size: .82rem; }
.stock-top > * { white-space: nowrap; }
.stock-num { color: var(--text-3); font-size: .9rem; }
.stock-num b { font-size: 2rem; color: inherit; font-weight: 750; font-variant-numeric: tabular-nums; margin-right: .2rem; }
.stock-num:not(.warn-text) b { color: var(--text); }
.stock-card .muted { font-size: .85rem; }
.panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 1.4rem; box-shadow: var(--shadow);
  margin-bottom: 1.2rem;
}
.panel .form { max-width: 620px; }
.panel .form > .btn { align-self: flex-start; min-width: 140px; }
.panel h2 .ic { color: var(--brand); }

/* ---------- 我的 / 账号 ---------- */
.profile { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.4rem; }
.row-link {
  display: flex; align-items: center; gap: .9rem; padding: 1rem 1.2rem; margin-bottom: 1.2rem; color: var(--text);
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow);
}
.row-link > .ic:first-child { color: var(--brand); }
.row-link span { display: flex; flex-direction: column; font-weight: 600; flex: 1; }
.row-link em { font-size: .85rem; }
.row-link > .ic:last-child { color: var(--text-3); }
.ulist { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); margin-bottom: 1.4rem; }
.urow { display: flex; align-items: flex-start; gap: .9rem; padding: .95rem 1.1rem; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.urow:last-child { border-bottom: 0; }
.urow.disabled .avatar { filter: grayscale(1); opacity: .5; }
.urow > .avatar { margin-top: .1rem; }
.umain { flex: 1; min-width: 0; }
.uname { font-weight: 650; display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.umenu { flex: none; }
.umenu summary { list-style: none; }
.umenu summary::-webkit-details-marker { display: none; }
.umenu[open] { flex-basis: 100%; order: 3; }
.umenu[open] summary { display: none; }
.umenu-body { display: flex; flex-direction: column; gap: .7rem; padding: .9rem; margin-top: .3rem; background: var(--surface-2); border-radius: 14px; border: 1px solid var(--line); }
.inline-form { display: flex; gap: .6rem; }
.inline-form input { min-height: 38px; padding: .45rem .8rem; }
.btn-row { display: flex; gap: .5rem; flex-wrap: wrap; }

/* ---------- 空状态 / 错误 ---------- */
.empty {
  display: flex; flex-direction: column; align-items: center; gap: .8rem; text-align: center; color: var(--text-3);
  padding: 3rem 1.5rem; background: var(--surface); border: 1px dashed var(--line-2); border-radius: 20px;
}
.empty.big { border: 0; background: none; padding-top: 5rem; }
.err-code { font-size: 4rem; font-weight: 800; line-height: 1; color: var(--line-2); }

/* ---------- 平板 ---------- */
@media (max-width: 900px) {
  .kinds, .stock-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- 手机 ---------- */
@media (max-width: 640px) {
  body { font-size: 15px; }
  .page { padding: 1.1rem 16px calc(88px + env(safe-area-inset-bottom, 0px)); }
  .topbar-in { padding: .55rem 16px; }
  .topnav { display: none; }
  .me-chip .me-name { display: none; }
  .me-chip { padding: .2rem; }
  .tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    background: color-mix(in srgb, var(--surface) 88%, transparent);
    backdrop-filter: saturate(1.6) blur(16px); -webkit-backdrop-filter: saturate(1.6) blur(16px);
    border-top: 1px solid var(--line); padding: .35rem .5rem calc(.35rem + env(safe-area-inset-bottom, 0px));
  }
  .tabbar a {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: .1rem; padding: .3rem 0;
    color: var(--text-3); font-size: .7rem; font-weight: 600; border-radius: 12px;
  }
  .tabbar a .ic { width: 23px; height: 23px; }
  .tabbar a.on { color: var(--brand); }
  .tabbar a.on .ic { stroke-width: 2.1; }
  h1 { font-size: 1.32rem; }
  .hero { margin-bottom: 1.2rem; }
  .hero h1 { font-size: 1.45rem; }
  .stats { width: 100%; }
  .stat { flex: 1; }
  .games { grid-template-columns: 1fr; gap: .8rem; }
  .game { padding: 1.1rem 1rem; border-radius: 18px; }
  .game-mark { width: 52px; height: 52px; font-size: 1.4rem; }
  .claim .buyer { max-width: none; }
  .kinds { gap: .75rem; }
  .kind { padding: 1rem .9rem .85rem; border-radius: 16px; }
  .kind-stock b { font-size: 1.8rem; }
  .kind-cta { padding: .55rem; font-size: .92rem; }
  .ticket { padding: 1.3rem 1.1rem; border-radius: 20px; }
  .filters select { flex: 1 1 100%; }
  .search { flex-basis: 100%; }
  .rrow { padding: .8rem .9rem; gap: .7rem; align-items: flex-start; }
  .rrow .pill { margin-top: .1rem; min-width: 3.8em; font-size: .75rem; padding: .2rem .5rem; }
  .rcode { font-size: .92rem; }
  .stock-grid { gap: .75rem; }
  .stock-card { padding: .95rem; }
  .panel { padding: 1.15rem; border-radius: 18px; }
  .panel .form > .btn { align-self: stretch; }
  .two, .seg { grid-template-columns: 1fr; }
  .inline-form { flex-direction: column; }
  .auth { padding: 1.8rem 1.2rem 1.4rem; border-radius: 22px; }
}
