:root {
  color-scheme: dark;
  --bg: #0c1417;
  --side: #0e181b;
  --panel: #111d20;
  --surface: #17262a;
  --border: #26383d;
  --text: #edf5f1;
  --muted: #a4b6b8;
  --accent: #d2ff82;
  --accent-ink: #17250f;
  --danger: #ffb4ab;
  --radius: 16px;
  font: 16px/1.45 Inter, "Microsoft YaHei UI", "PingFang SC", system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--text); background: var(--bg); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .6; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.22; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.error { color: var(--danger); }
.wrap { display: flex; flex-wrap: wrap; gap: .65rem; align-items: center; }
.brand {
  display: inline-flex; align-items: center; gap: .72rem; color: var(--text);
  font-weight: 850; font-size: 1.38rem; white-space: nowrap; letter-spacing: -.065em;
}
.brand-light { color: var(--muted); }
.brand-mark {
  display: inline-grid; place-items: center; width: 39px; height: 39px; flex: 0 0 auto;
}
.brand-mark.mini { width: 32px; height: 32px; }
.brand-mark > img { width: 100%; height: 100%; object-fit: contain; }
[data-icon] { display: inline-grid; align-items: center; justify-items: center; width: 1.2em; height: 1.2em; flex: 0 0 auto; }
[data-icon] > svg { width: 100%; height: 100%; }
.primary, .secondary, .account-button, .icon-button, .text-button, .danger {
  border: 1px solid transparent; border-radius: 10px; display: inline-flex; align-items: center;
  justify-content: center; gap: .48rem; min-height: 43px; padding: .55rem .9rem; font-size: .9rem;
  font-weight: 700; transition: background .18s, border-color .18s, color .18s;
}
.primary { background: var(--accent); color: var(--accent-ink); }
.primary:hover:enabled { background: #e6ffbc; }
.secondary, .account-button, .icon-button { color: var(--text); background: var(--surface); border-color: var(--border); }
.secondary:hover:enabled, .account-button:hover:enabled, .icon-button:hover:enabled { background: #20363a; }
.icon-button { width: 43px; padding: 0; flex: 0 0 auto; font-size: 1.05rem; }
.icon-button.transparent { background: transparent; border-color: transparent; color: var(--muted); }
.icon-button.transparent:hover { color: var(--text); background: var(--surface); }
.icon-button[aria-pressed="true"] { color: var(--accent); }
.text-button { color: var(--accent); padding-inline: 0; background: none; }
.text-button:hover { text-decoration: underline; }
.danger { color: var(--danger); background: #311e20; border-color: #56353a; }
.danger:hover:enabled { background: #4c282a; }
.wide { width: 100%; }
.cover {
  display: grid; place-items: center; position: relative; overflow: hidden; isolation: isolate;
  background: radial-gradient(ellipse at 78% 18%, var(--cover-glow,#50845b) 0%, transparent 77%), var(--cover-base,#20382e);
  color: #eaffd9; border-radius: 10px; aspect-ratio: 1; flex: 0 0 auto;
}
.cover > img { position: absolute; width: 100%; height: 100%; object-fit: cover; }
.cover > i { opacity: .75; }
.search {
  display: flex; align-items: center; gap: .75rem; min-width: 0;
  padding: .65rem .9rem; background: var(--panel); border: 1px solid var(--border); border-radius: 10px; color: var(--muted);
}
.search > input { color: var(--text); border: 0; background: transparent; width: 100%; min-width: 0; padding: 0; font-size: .9rem; }
.search > input:focus { outline: none; }
.search:focus-within { border-color: var(--accent); }
input:not([type="range"]):not([type="search"]), textarea, select {
  color: var(--text); background: #0e181b; border: 1px solid var(--border); border-radius: 9px;
  min-height: 42px; padding: .6rem .7rem; width: 100%;
}
input::placeholder, textarea::placeholder { color: #92a4a7; }
input[type="range"] {
  --fill: 0%;
  appearance: none; display: block; min-width: 0; height: 5px;
  cursor: pointer; border: 0; margin: 0; border-radius: 8px;
  background: linear-gradient(90deg, var(--accent) var(--fill), #35494c var(--fill));
}
input[type="range"]::-webkit-slider-thumb { appearance: none; width: 11px; height: 11px; border-radius: 50%; background: var(--accent); }
input[type="range"]::-moz-range-thumb { width: 11px; height: 11px; border-radius: 50%; border: 0; background: var(--accent); }
.sheet {
  width: min(440px, calc(100% - 2rem)); border: 1px solid var(--border); border-radius: 20px;
  background: var(--panel); color: var(--text); padding: 1.55rem; box-shadow: 0 25px 100px #0009;
}
dialog::backdrop { background: #05090bcc; backdrop-filter: blur(8px); }
.dialog-head { display: flex; align-items: center; gap: .7rem; justify-content: space-between; margin-bottom: 1.15rem; }
.dialog-head h2 { font-size: 1.34rem; margin-right: auto; }
form > label { display: grid; gap: .35rem; margin-bottom: .85rem; color: var(--muted); font-size: .9rem; font-weight: 650; }
.message { min-height: 1.4rem; font-size: .9rem; margin-bottom: .55rem; }
.choices { display: grid; gap: .65rem; }
.choices > button {
  padding: .85rem; display: flex; align-items: center; text-align: left; gap: .8rem;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 11px;
}
.choices > button:hover { border-color: var(--accent); }
.choices > button i { color: var(--accent); font-size: 1.22rem; }
.choices span { display: grid; gap: .12rem; }
.choices small { color: var(--muted); font-size: .86rem; }
.toast {
  position: fixed; z-index: 9; right: 1.1rem; bottom: 7rem; width: fit-content; max-width: calc(100% - 2.2rem);
  color: var(--text); padding: .8rem 1rem; background: #233439; border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 14px 55px #0006; font-size: .91rem;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
