:root {
  color-scheme: light;
  --brand: #ff7a00;
  --ink: #282017;
  --muted: #756458;
  --paper: #fffaf5;
  --line: #e8ded4;
  --orange-ink: #914100;
  --wash: #fff0df;
  --error: #a92525;
  --success: #246541;
  font-family:
    -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft Yahei",
    sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: default;
  opacity: 0.5;
}
button,
input,
select {
  min-height: 44px;
}
button {
  border: 0;
  border-radius: 10px;
  background: var(--wash);
  padding: 10px 16px;
  color: var(--orange-ink);
  font-weight: 600;
}
button:hover {
  background: #ffe1bc;
}
button.primary {
  background: var(--ink);
  color: white;
}
button.primary:hover {
  background: #4c3520;
}
button.danger {
  color: var(--error);
  background: #ffeded;
}
a {
  color: var(--orange-ink);
  text-underline-offset: 4px;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid var(--orange-ink);
  outline-offset: 3px;
}
::selection {
  background: #ffd5ae;
  color: var(--ink);
}
input {
  caret-color: var(--orange-ink);
}
input::placeholder {
  color: var(--muted);
}
.shell {
  max-width: 880px;
  margin: auto;
}
.brandbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--brand);
  padding: calc(18px + env(safe-area-inset-top)) 28px 18px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: var(--ink);
  font-size: 27px;
  letter-spacing: -0.03em;
}
.brandbar > span {
  font-weight: 700;
  letter-spacing: -0.03em;
}
.brand img {
  width: 36px;
  height: 36px;
}
main {
  padding: 32px 28px 0;
  min-height: 65vh;
}
h1 {
  text-wrap: balance;
  font-size: 32px;
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin: 0 0 12px;
  font-weight: 700;
}
h2 {
  font-size: 21px;
  margin: 0 0 12px;
  letter-spacing: -0.02em;
}
h3 {
  font-size: 17px;
  margin: 0;
}
p {
  line-height: 1.65;
  margin: 8px 0 16px;
}
p,
.muted,
small {
  color: var(--muted);
}
small {
  font-size: 12px;
  line-height: 1.5;
}
.intro {
  max-width: 50ch;
  margin-bottom: 24px;
}
.statusline {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  flex-wrap: wrap;
  padding: 10px 0;
}
.dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
}
.dot.warn {
  background: var(--orange-ink);
}
.notice {
  background: var(--wash);
  color: var(--orange-ink);
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.7;
}
.notice a {
  color: inherit;
}
.tabs {
  display: flex;
  gap: 5px;
  border-bottom: 1px solid var(--line);
  margin: 26px 0;
}
.tabs button {
  border-radius: 0;
  background: none;
  color: var(--muted);
  flex: 1;
  padding: 13px 4px;
  white-space: nowrap;
  font-size: 14px;
}
.tabs button[aria-current="page"] {
  color: var(--ink);
  box-shadow: inset 0 -3px var(--brand);
}
.sectionhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}
.count {
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  font-size: 14px;
}
.section {
  margin: 26px 0 32px;
}
.empty {
  padding: 28px 0 32px;
  max-width: 52ch;
}
.empty h2 {
  font-size: 24px;
}
.empty p {
  margin-bottom: 24px;
}
.member {
  border-bottom: 1px solid var(--line);
  padding: 20px 0;
}
.member:first-child {
  border-top: 1px solid var(--line);
}
.memberhead {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
.identity {
  min-width: 0;
  display: flex;
  gap: 12px;
  align-items: center;
}
.avatar {
  background: var(--wash);
  color: var(--orange-ink);
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  font-size: 20px;
  flex: none;
}
.identity h3 {
  overflow-wrap: anywhere;
}
.memberhead button {
  font-size: 13px;
  flex: none;
}
.switches {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 24px;
  margin: 20px 0 4px;
  padding-left: 56px;
}
.toggle {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 14px;
  color: var(--ink);
}
input[type="checkbox"] {
  appearance: none;
  width: 40px;
  min-width: 40px;
  height: 24px;
  min-height: 24px;
  border-radius: 20px;
  background: #b3a79b;
  position: relative;
  margin: 0;
  cursor: pointer;
}
input[type="checkbox"]:before {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  border-radius: 50%;
  background: white;
  transition: transform 0.16s ease-out;
}
input[type="checkbox"]:checked {
  background: var(--orange-ink);
}
input[type="checkbox"]:checked:before {
  transform: translateX(16px);
}
input[type="checkbox"]:disabled {
  opacity: 0.35;
  cursor: default;
}
.threshold {
  margin: 18px 0 0 56px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}
.threshold input {
  width: 110px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 16px 0;
}
input:not([type="checkbox"]),
select {
  border: 1px solid #b8a99b;
  border-radius: 8px;
  background: white;
  padding: 10px 12px;
  color: var(--ink);
  min-width: 0;
  max-width: 100%;
}
.row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.row input {
  flex: 1;
}
.search {
  width: 100%;
  margin-bottom: 8px;
}
.directory-list .member {
  padding: 18px 0;
}
.directory-list small {
  display: block;
  margin-top: 4px;
}
.fact {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.fact span:last-child {
  text-align: right;
  overflow-wrap: anywhere;
}
.fact strong {
  font-variant-numeric: tabular-nums;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}
.formlabel {
  display: block;
  margin: 20px 0 8px;
  font-size: 14px;
}
.times {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.times label {
  display: flex;
  gap: 6px;
  align-items: center;
}
.keep-row {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
}
.keep-row input {
  flex: none;
}
.error {
  color: var(--error);
}
.success {
  color: var(--success);
}
footer {
  padding: 48px 28px calc(28px + env(safe-area-inset-bottom));
  font-size: 12px;
  color: var(--muted);
  line-height: 1.8;
}
footer span {
  font-weight: 600;
}
#feedback {
  position: fixed;
  bottom: calc(20px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  width: min(90vw, 520px);
  padding: 14px 20px;
  background: var(--ink);
  color: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 30px #28201726;
  line-height: 1.5;
  z-index: 10;
}
.loading {
  padding: 50px 0;
  color: var(--muted);
}
.device-id {
  font-size: 12px;
  overflow-wrap: anywhere;
}
.install-guide {
  padding-left: 20px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}
.divider {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 28px 0;
}
@media (min-width: 700px) {
  .brandbar {
    border-radius: 0 0 16px 16px;
  }
  main {
    padding: 40px 48px 0;
  }
  .tabs {
    gap: 24px;
  }
  .switches {
    max-width: 500px;
  }
  footer {
    padding-left: 48px;
  }
  h1 {
    font-size: 38px;
  }
}
@media (max-width: 380px) {
  main {
    padding-left: 18px;
    padding-right: 18px;
  }
  .brandbar {
    padding-left: 18px;
    padding-right: 18px;
  }
  .switches {
    padding-left: 0;
    gap: 16px;
  }
  .threshold {
    margin-left: 0;
  }
  .memberhead {
    gap: 6px;
  }
  .tabs button {
    font-size: 13px;
  }
  h1 {
    font-size: 29px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
