:root {
  color-scheme: light;
  background: #f3f6fa;
  color: #152538;
  font-family: system-ui, "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
  --muted: #526173;
  --line: #dce4ed;
  --blue: #1552ad;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
main { max-width: 56rem; margin: 0 auto; padding: clamp(1rem, 5vw, 3.4rem) clamp(1rem, 4vw, 2rem); }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(1.5rem, 4vw, 2.15rem); line-height: 1.25; letter-spacing: -.035em; }
h2 { margin: 0 0 .75rem; font-size: 1.12rem; }
h3 { font-size: 1.1rem; }
section + section { margin-top: 1.8rem; }
.page-header, .account { display: flex; align-items: center; gap: .75rem 1rem; flex-wrap: wrap; }
.page-header { justify-content: space-between; }
.account { font-size: .9rem; color: var(--muted); }
.feedback { min-height: 1.55rem; margin: .8rem 0 1.1rem; color: var(--muted); font-size: .9rem; }
.feedback[data-error="true"] { color: #a12a20; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem; }
.card { background: #fff; border: 1px solid var(--line); border-radius: .95rem; padding: 1.1rem 1.2rem; }
.resource { display: flex; justify-content: space-between; align-items: center; gap: .75rem; }
.resource-status { margin-top: .25rem; font-size: .92rem; color: var(--muted); }
.resource-status[data-mine="true"] { color: #167051; }
.hint { margin-top: .65rem; color: var(--muted); font-size: .88rem; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid #548be2; outline-offset: 3px; }
.plain { padding: .45rem .65rem; background: white; color: var(--blue); border: 1px solid var(--line); border-radius: .5rem; }
.toggle { position: relative; width: 3.65rem; height: 2.75rem; flex: none; padding: 0; border: 0; background: transparent; }
.toggle::before { content: ""; position: absolute; inset: .42rem 0; border-radius: 2rem; background: #69788b; }
.toggle span { position: absolute; top: .66rem; left: .25rem; width: 1.43rem; height: 1.43rem; background: #fff; border-radius: 50%; transition: transform .16s ease; }
.toggle[aria-checked="true"]::before { background: #16805f; }
.toggle[data-other="true"]::before { background: #725521; }
.toggle[aria-checked="true"] span { transform: translateX(1.72rem); }
.toggle:disabled:not([data-other="true"]) { opacity: .65; }
.note label, .login > label, legend { display: block; font-weight: 650; }
.note label { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; flex-wrap: wrap; margin-bottom: .5rem; }
.note label span { color: var(--muted); font-size: .85rem; font-weight: 400; }
textarea, #key { width: 100%; padding: .65rem .75rem; border: 1px solid #becbd9; border-radius: .55rem; background: #fff; color: inherit; }
textarea { display: block; resize: vertical; min-height: 6.5rem; }
textarea[readonly] { background: #f5f7fa; }
.login { max-width: 27rem; display: grid; gap: .65rem; }
fieldset { margin: 0; padding: 0; border: 0; }
.choice { display: inline-flex; align-items: center; gap: .35rem; padding: .55rem 1rem .55rem 0; cursor: pointer; }
.choice input { accent-color: var(--blue); }
.primary { min-height: 2.75rem; margin-top: .2rem; color: white; background: var(--blue); border: 0; border-radius: .55rem; }
.primary:disabled { opacity: .65; }
@media (max-width: 38rem) { .grid { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .toggle span { transition: none; } }
