* {
  box-sizing: border-box;
}
:root {
  --ink: #18332e;
  --muted: #63736d;
  --green: #154d40;
  --gold: #e7c78b;
  --line: #dbe3dc;
  --paper: #f5f6f1;
  font-family: Inter, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
body {
  margin: 0;
}
[hidden] {
  display: none !important;
}
button,
input,
select {
  font: inherit;
}
button,
select,
input[type="range"] {
  cursor: pointer;
}
button {
  transition:
    background 0.16s,
    box-shadow 0.16s;
}
button:disabled,
input:disabled,
select:disabled {
  opacity: 0.5;
  cursor: default;
}
:focus-visible {
  outline: 3px solid #bb933c;
  outline-offset: 3px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  letter-spacing: -0.045em;
}
h2,
h3 {
  letter-spacing: -0.026em;
}
label {
  font-weight: 600;
  font-size: 0.9rem;
}
input:not([type="range"]),
select {
  border: 1px solid #bac9c0;
  background: white;
  color: var(--ink);
  border-radius: 8px;
  padding: 12px 14px;
  min-height: 46px;
}
.primary,
.outline,
.lang,
.link {
  border: 0;
  font-weight: 650;
  line-height: 1.1;
}
.primary {
  background: var(--green);
  color: white;
  padding: 14px 21px;
  border-radius: 8px;
}
.primary:hover {
  background: #0e392f;
}
.outline,
.lang {
  border: 1px solid #c5d1c8;
  background: transparent;
  color: inherit;
  border-radius: 7px;
  padding: 10px 15px;
}
.outline:hover,
.lang:hover {
  background: #dce6dd;
}
.link {
  background: transparent;
  color: var(--green);
  padding: 7px 3px;
  font-size: 13px;
}
.link:hover {
  text-decoration: underline;
}
.wordmark {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 28px;
  font-weight: 750;
  letter-spacing: 0.075em;
}
.signal {
  height: 22px;
  display: flex;
  align-items: center;
  gap: 3px;
}
.signal i {
  display: block;
  width: 3px;
  height: 55%;
  background: var(--gold);
  border-radius: 3px;
}
.signal i:nth-child(2) {
  height: 100%;
}
.signal i:nth-child(3) {
  height: 74%;
}
.signal i:last-child {
  height: 38%;
}
.login {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.cover {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: #132e29;
  color: #faf8f1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(32px, 5vw, 80px);
}
.cover .wordmark {
  z-index: 2;
}
.cover-caption {
  z-index: 2;
  padding: 100px 0 12px;
}
.cover-caption p,
.overline {
  font-size: 11px;
  letter-spacing: 0.17em;
  font-weight: 700;
  color: #bca878;
}
.cover-caption h1 {
  font-size: clamp(40px, 5.2vw, 84px);
  line-height: 0.98;
  margin-top: 18px;
  max-width: 6em;
  font-weight: 580;
}
.record-art {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: linear-gradient(150deg, #14382f, #112c27 65%, #0f2522);
}
.record {
  position: absolute;
  width: clamp(350px, 57vw, 1000px);
  aspect-ratio: 1;
  border-radius: 50%;
  top: 12%;
  left: 27%;
  display: grid;
  place-items: center;
  background:
    repeating-radial-gradient(
      circle,
      transparent 0 3px,
      #ffffff13 4px,
      transparent 5px 8px
    ),
    conic-gradient(
      from 32deg,
      #121e1c,
      #577361 17%,
      #192e25 35%,
      #101e18 45%,
      #79917b 62%,
      #22362e 83%,
      #121e1c
    );
  box-shadow: -8px 15px 70px #091f1aa6;
}
.record .label {
  width: 29%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    #142a24 0 4%,
    #dec38e 4.5%,
    #b69e6d 75%,
    #756845 100%
  );
}
.signin {
  position: relative;
  display: grid;
  place-items: center;
  padding: 72px 38px;
  background: #f7f7f2;
}
.signin .lang {
  position: absolute;
  right: 7%;
  top: 6%;
}
.signin form {
  width: min(100%, 360px);
}
.signin h2 {
  font-size: 2.35rem;
  margin-bottom: 34px;
}
.signin label,
.signin input {
  display: block;
  width: 100%;
}
.signin input {
  margin: 8px 0 20px;
}
.signin .primary {
  width: 100%;
}
.credit {
  position: absolute;
  bottom: 6%;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.notice {
  line-height: 1.4;
  font-size: 0.9rem;
  color: #9c381f;
  margin: 8px 0 14px;
}
.notice.success {
  color: var(--green);
}
.notice:empty {
  display: none;
}
.mast {
  background: #17352e;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 17px max(5vw, 22px);
}
.mast .wordmark {
  font-size: 23px;
}
.identity,
.head-actions,
.sync,
.section-line,
.dialog-actions,
.volume-head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.identity > span {
  border-left: 1px solid #ffffff35;
  padding-left: 18px;
  margin-left: 5px;
  color: #d8e1d8;
  font-size: 0.85rem;
}
.mast button {
  border-color: #718077;
  color: #fff;
}
.mast button:hover {
  background: #345146;
}
.workspace {
  width: min(1180px, 91%);
  margin: 44px auto 62px;
}
.workspace-heading,
.section-line,
.volume-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.workspace-heading h1 {
  font-size: clamp(34px, 4vw, 56px);
  font-weight: 580;
  margin-top: 6px;
}
.overline {
  color: #756338;
}
.sync small,
.meta,
footer,
.caption {
  color: var(--muted);
  font-size: 0.8rem;
}
.totals {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 28px 0;
}
.stat,
.devices,
.details {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
}
.stat {
  padding: 18px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.stat strong {
  font-size: 30px;
  letter-spacing: -0.045em;
}
.stat span {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 600;
}
.panels {
  display: grid;
  grid-template-columns: minmax(255px, 0.85fr) minmax(360px, 1.45fr);
  gap: 18px;
  align-items: start;
}
.devices,
.details {
  padding: 24px;
}
.section-line h2,
.details h2 {
  font-size: 1.3rem;
}
.section-line {
  margin-bottom: 17px;
}
.dev-row {
  display: block;
  width: 100%;
  padding: 14px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: white;
  text-align: left;
  margin: 8px 0;
}
.dev-row.selected {
  border-color: #3d7060;
  background: #eef5ed;
  box-shadow: inset 3px 0 var(--green);
}
.dev-row:hover {
  background: #f2f6ef;
}
.rowtop {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.dev-row strong {
  font-size: 0.98rem;
}
.dev-row small {
  display: block;
  margin-top: 7px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ecefe9;
  color: #4f5b53;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
}
.badge:before {
  content: "";
  height: 6px;
  width: 6px;
  border-radius: 50%;
  background: #859187;
}
.badge.on {
  background: #dcefe1;
  color: #22533b;
}
.badge.on:before {
  background: #378850;
}
.fact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 24px;
  margin: 22px 0;
  padding: 18px 0;
  border-block: 1px solid var(--line);
}
.fact-grid dt {
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 5px;
}
.fact-grid dd {
  font-weight: 580;
  font-size: 0.94rem;
  margin: 0;
  overflow-wrap: anywhere;
}
.detail-heading {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
}
.form-control {
  display: grid;
  gap: 9px;
  margin: 16px 0;
}
.form-control select {
  max-width: 100%;
}
.lock-receipt {
  color: var(--green);
  font-weight: 600;
}
.lock-receipt.pending {
  color: #795006;
}
.volume-value {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--green);
}
input[type="range"] {
  width: 100%;
  accent-color: var(--green);
  min-height: 20px;
}
.detail-footer {
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 13px;
}
.caption {
  line-height: 1.6;
}
.empty {
  color: var(--muted);
  padding: 24px 0;
  line-height: 1.6;
}
.schedule {
  margin: 17px 0 0;
  font-size: 0.9rem;
  color: var(--muted);
}
.schedule summary {
  cursor: pointer;
  color: var(--green);
  font-weight: 600;
}
.schedule p {
  margin: 7px 0;
}
.desk footer {
  width: min(1180px, 91%);
  margin: 0 auto 28px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}
.desk footer span {
  padding: 0 6px;
}
dialog {
  padding: 25px;
  max-width: min(400px, 90vw);
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
}
dialog::backdrop {
  background: #19332dd0;
}
dialog p {
  margin: 15px 0;
  line-height: 1.5;
}
.dialog-actions {
  justify-content: flex-end;
}
.dialog-actions .primary {
  padding: 11px 16px;
}
.group-filter, .group-edit {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}
.group-filter { margin: 0 0 16px; }
.group-filter select, .group-edit label, .group-edit select, .group-actions { grid-column: 1 / -1; }
.group-filter select, .group-edit input, .group-edit select, .form-control input, .form-control select {
  width: 100%; min-width: 0;
}
.group-edit { padding: 17px 0; border-top: 1px solid var(--line); }
#editGroup input { grid-column: 1 / -1; }
#groupDialog { width: min(450px, 92vw); max-width: 92vw; }
.group-actions, .period-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.danger { color: #8e3f31; }
#confirmText { white-space: pre-line; overflow-wrap: anywhere; }
.detail-heading h2, .dev-row strong, .group-edit select { overflow-wrap: anywhere; min-width: 0; }
.schedule { margin: 18px 0; border-block: 1px solid var(--line); padding: 12px 0; }
.schedule summary { min-height: 32px; align-content: center; }
.toggle-line { display: flex; align-items: center; gap: 10px; margin: 10px 0 4px; color: var(--ink); }
.toggle-line input[type="checkbox"] { width: 20px; height: 20px; min-height: 20px; accent-color: var(--green); }
.period { min-width: 0; padding: 11px 12px 5px; margin: 11px 0; border: 1px solid var(--line); border-radius: 9px; }
.period legend, .time-field label { font-weight: 600; font-size: .8rem; color: var(--muted); }
.weekdays { display: flex; flex-wrap: wrap; gap: 5px; }
.day { padding: 7px 8px; min-width: 40px; min-height: 40px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); background: white; }
.day[aria-pressed="true"] { background: #e2eee3; color: var(--green); border-color: #719980; }
.period-times { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin-top: 12px; }
.time-field { display: grid; gap: 5px; }
.time-field input { min-width: 0; width: 100%; padding: 8px; }
.period-footer .link { margin-left: auto; min-height: 40px; }
#groupDialog .link, .group-filter .link { min-height: 40px; }
.schedule > .caption { display: block; }

@media (max-width: 720px) {
  .login {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(190px, 30vh) 1fr;
  }
  .cover {
    padding: 24px 7vw;
  }
  .cover .wordmark {
    font-size: 20px;
  }
  .cover-caption {
    padding: 0;
  }
  .cover-caption h1 {
    max-width: none;
    font-size: 37px;
    margin-top: 8px;
  }
  .record {
    width: 430px;
    top: -65%;
    left: 53%;
  }
  .signin {
    padding: 66px 7vw;
  }
  .signin .lang {
    top: 15px;
  }
  .signin h2 {
    font-size: 28px;
    margin-bottom: 20px;
  }
  .credit {
    bottom: 12px;
  }
  .workspace {
    width: 92%;
    margin: 25px auto 32px;
  }
  .workspace-heading {
    gap: 10px;
    align-items: flex-end;
  }
  .sync {
    flex-direction: column-reverse;
    align-items: flex-end;
    gap: 6px;
  }
  .mast {
    padding: 12px 4%;
  }
  .identity > span {
    display: none;
  }
  .head-actions {
    gap: 6px;
  }
  .mast button {
    padding: 9px 11px;
  }
  .totals {
    gap: 7px;
    margin: 20px 0;
  }
  .stat {
    padding: 12px;
    display: grid;
    gap: 3px;
  }
  .stat strong {
    font-size: 24px;
  }
  .stat span {
    font-size: 0.72rem;
  }
  .panels {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .devices,
  .details {
    padding: 17px;
  }
  .fact-grid {
    gap: 14px;
  }
  .details .detail-footer {
    flex-wrap: wrap;
  }
  .workspace-heading h1 {
    font-size: 34px;
  }
}
