:root {
  color-scheme: light;
  --page: #f4f6f2;
  --paper: #fff;
  --ink: #182921;
  --muted: #51665c;
  --line: #dce5de;
  --deep: #112b27;
  --green: #0d5948;
  --quiet: #e9f2ed;
  --warning: #7f4410;
  --error: #9a3425;
  --radius: 14px;
  font-family: Inter, "Microsoft YaHei UI", "PingFang SC", "Noto Sans CJK SC", sans-serif;
  font-size: 15px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; color: var(--ink); background: var(--page); }
a { color: var(--green); }
button, input, select, textarea { color: inherit; font: inherit; }
a, button, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { opacity: .52; cursor: default; }
button, .button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 40px; border: 1px solid var(--green); border-radius: 8px;
  padding: 8px 14px; background: var(--green); color: white; font-weight: 630;
  text-decoration: none; white-space: nowrap;
}
button:hover:not(:disabled), .button:hover { filter: brightness(.91); }
button.quiet, .button.quiet { background: white; color: var(--green); border-color: var(--line); }
button.danger { background: #fff6f2; border-color: #f3d4cc; color: var(--error); }
button.compact { min-height: 31px; font-size: 13px; padding: 4px 10px; }
:focus-visible { outline: 3px solid #159477; outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(27px, 4vw, 41px); letter-spacing: -.035em; line-height: 1.2; }
h2 { font-size: 20px; letter-spacing: -.02em; }
h3 { font-size: 15px; }
p { line-height: 1.65; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.topbar {
  background: var(--deep); color: white; min-height: 65px; display: flex;
  justify-content: space-between; align-items: center; gap: 16px; padding: 10px max(24px, calc((100% - 1328px) / 2));
}
.brand { color: white; font-size: 18px; display: inline-flex; align-items: center; gap: 12px; text-decoration: none; white-space: nowrap; }
.mark { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; color: var(--deep); background: #d1e88c; font-weight: 800; }
.header-actions { display: flex; gap: 9px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.header-actions button, .header-actions .button { background: transparent; color: white; border-color: #56706a; }
.header-account { color: #c7d6d0; overflow-wrap: anywhere; font-size: 13px; }
.frame { max-width: 1376px; padding: 0 24px 60px; margin: auto; }
#mode:empty { display: none; }
.mode {
  background: #f8edcf; color: #6b481c; padding: 9px 14px; border-radius: 8px;
  margin: 16px 0 0; line-height: 1.35; font-size: 13px; font-weight: 650;
}
main { margin-top: 27px; }
.heading { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.intro { color: var(--muted); margin-top: 8px; }
.portal { max-width: 960px; margin-inline: auto; }
.hero {
  display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap;
  color: #f4fbf6; padding: clamp(22px, 5vw, 38px); border-radius: 18px;
  background: var(--deep);
}
.hero .intro { color: #b5cdc3; max-width: 480px; }
.hero .quiet { border-color: #8cb2a1; background: transparent; color: white; }
.section { margin-top: 16px; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.panel-title { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 15px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr)); gap: 12px; }
.services { margin-top: 16px; }
.service { min-height: 140px; display: flex; flex-direction: column; justify-content: space-between; gap: 13px; }
.service a, .service button { align-self: flex-start; }
.badge { display: inline-block; width: fit-content; color: #2b5448; background: var(--quiet); padding: 4px 8px; font-size: 12px; border-radius: 5px; font-weight: 680; }
.badge.warn { color: var(--warning); background: #fff1d6; }
.badge.off { color: #5b6760; background: #eff2ee; }
.inline { display: flex; align-items: end; gap: 8px; flex-wrap: wrap; }
.inline > input, .inline > label { flex: 1 1 160px; }
.inline > label.select { flex: 0 1 164px; }
.inline > .grow { flex-grow: 1; }
.stack { display: grid; gap: 10px; }
.stack > button { justify-self: start; }
label { display: grid; gap: 6px; color: var(--muted); font-size: 13px; font-weight: 650; }
input, select, textarea {
  background: #fcfdfa; width: 100%; min-width: 0; min-height: 40px;
  padding: 8px 10px; border: 1px solid #cddbd0; border-radius: 8px; color: var(--ink);
}
textarea { resize: vertical; min-height: 85px; }
.preview { margin-top: 11px; background: var(--quiet); padding: 12px; border-radius: 9px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.tabs { display: flex; gap: 6px; padding: 6px; background: #e9efe9; border-radius: 10px; margin: 19px 0 13px; overflow-x: auto; }
.tabs button { background: transparent; color: var(--muted); border-color: transparent; }
.tabs button.active { color: var(--deep); background: white; border-color: var(--line); }
.stat { padding: 16px; display: grid; gap: 7px; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.stat strong { font-size: 25px; font-variant-numeric: tabular-nums; line-height: 1; }
.stat span { font-size: 13px; color: var(--muted); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; white-space: nowrap; font-size: 13px; }
thead { background: #f2f5ef; color: var(--muted); }
th, td { padding: 10px 12px; border-bottom: 1px solid #e6ece5; }
td:last-child { width: 1%; }
tr:last-child td { border-bottom: 0; }
code { overflow-wrap: anywhere; font-family: "IBM Plex Mono", Consolas, monospace; font-size: .89em; }
.wide { white-space: normal; min-width: 170px; }
.actions { display: flex; gap: 6px; flex-wrap: wrap; }
.empty { color: var(--muted); padding: 20px 2px 2px; }
article.item { display: grid; gap: 8px; padding: 13px 0; border-bottom: 1px solid var(--line); }
article.item:last-child { border-bottom: 0; padding-bottom: 3px; }
.media-panel video, .media-panel audio { width: 100%; }
.media-panel video { background: var(--deep); border-radius: 9px; max-height: 340px; }
.auth-layout { grid-template-columns: repeat(auto-fit, minmax(min(310px, 100%), 1fr)); }
.auth-tabs { margin-top: 0; }
.error { color: var(--error); }
.result { background: var(--quiet); border-radius: 8px; padding: 10px 13px; white-space: pre-wrap; overflow-wrap: anywhere; }
.price { font-variant-numeric: tabular-nums; }
.list-note { color: var(--muted); font-size: 13px; margin-top: 8px; }
#toast { position: fixed; z-index: 2; inset: auto 20px 20px auto; max-width: min(420px, 90vw); background: var(--deep); color: #fff; padding: 12px 18px; border-radius: 9px; box-shadow: 0 7px 28px #193a3452; }
#toast.failure { background: #812f24; }
dialog { border: 1px solid var(--line); border-radius: 12px; color: var(--ink); padding: 20px; width: min(640px, calc(100% - 28px)); }
dialog::backdrop { background: #10262395; }
dialog header { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 12px; }
@media (max-width: 620px) {
  .topbar { padding: 9px 13px; }
  .frame { padding-inline: 12px; }
  .header-actions { gap: 5px; }
  .header-account { max-width: 115px; }
  .panel { padding: 13px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
