:root {
  --bg: #ffffff;
  --panel: #ffffff;
  --panel-2: #fafafb;
  --well: #fbfbfc;
  --line: #e5e6ea;
  --line-soft: #eff0f3;
  --text: #17181c;
  --muted: #6b7078;
  --faint: #9aa0a8;
  --accent: #fe6c6e;
  --accent-ink: #d8383c;
  --accent-dim: rgba(254, 108, 110, 0.13);
  --ok: #23a55a;
  --warn: #d98324;
  --bad: #d8383c;
  --bad-dim: rgba(216, 56, 60, 0.1);
  --hover: rgba(23, 24, 28, 0.035);
  --scroll: #d3d5da;
  --r-s: 8px;
  --r-m: 11px;
  --r-l: 14px;
  --s1: 6px;
  --s2: 10px;
  --s3: 14px;
  --s4: 18px;
  --shadow: 0 18px 44px rgba(23, 24, 28, 0.16);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  overscroll-behavior: none;
}

body {
  overflow: hidden;
  -webkit-text-size-adjust: 100%;
}

#stage {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: #fff;
  touch-action: none;
}

#screen {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: 0 0;
  image-rendering: auto;
  background: #fff;
}

#nekoiframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
  z-index: 5;
}

#empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--faint);
  font-size: 14px;
  padding: 24px;
  text-align: center;
  pointer-events: none;
}

#kbd, #scratch {
  position: fixed;
  left: -9999px;
  top: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
}

#scrim {
  position: fixed;
  inset: 0;
  z-index: 35;
  background: rgba(23, 24, 28, 0.34);
}

#dock {
  position: fixed;
  top: max(12px, env(safe-area-inset-top));
  left: 12px;
  display: flex;
  gap: 8px;
  z-index: 30;
  touch-action: none;
}

#dock.hidden { display: none; }

#dock button {
  width: 46px;
  height: 46px;
  min-height: 46px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-m);
  background: rgba(255, 255, 255, 0.96);
  color: var(--text);
  box-shadow: 0 3px 12px rgba(23, 24, 28, 0.14);
  cursor: pointer;
}

#dock button:hover { background: #fff; border-color: #d5d7dc; }

#burger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
}

#burger span {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
}

#kbdfloat { font-size: 19px; line-height: 1; }

#menu {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 352px;
  max-width: 90vw;
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border-right: 1px solid var(--line);
  box-shadow: var(--shadow);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--scroll) transparent;
  z-index: 40;
  transform: translateX(0);
  transition: transform 0.18s cubic-bezier(0.32, 0.72, 0, 1);
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(20px + env(safe-area-inset-bottom));
}

#menu::-webkit-scrollbar { width: 10px; }
#menu::-webkit-scrollbar-thumb {
  background: var(--scroll);
  border: 3px solid var(--panel);
  border-radius: 999px;
}

#menu.collapsed {
  transform: translateX(-102%);
  pointer-events: none;
}

#menu header {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s2);
  padding: max(12px, env(safe-area-inset-top)) var(--s3) 12px;
  background: var(--panel);
  border-bottom: 1px solid var(--line-soft);
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.mark {
  width: 24px;
  height: 24px;
  flex: none;
  border-radius: 7px;
  background: url("/static/geopelia.jpg") center / cover no-repeat, var(--accent);
  box-shadow: 0 0 0 1px rgba(23, 24, 28, 0.1) inset;
}


.wordmark {
  font-size: 15px;
  font-weight: 640;
  letter-spacing: 0.01em;
}

#collapse {
  width: 38px;
  height: 38px;
  min-height: 38px;
  flex: none;
  padding: 0;
  font-size: 20px;
  line-height: 1;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
}

#collapse:hover {
  color: var(--text);
  background: var(--panel-2);
  border-color: var(--line);
}

.who {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s2);
  padding: var(--s3) var(--s3) 2px;
}

#signout { flex: none; }

.ident {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

#who {
  font-size: 15px;
  font-weight: 620;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.role {
  flex: none;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-ink);
  background: var(--accent-dim);
  border-radius: 999px;
  padding: 2px 7px;
}

.status {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--muted);
  padding: 0 var(--s3) var(--s2);
}

#latency { color: var(--faint); font-variant-numeric: tabular-nums; }

.dot {
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: #c9cbd1;
  display: inline-block;
}

.dot.on { background: var(--ok); box-shadow: 0 0 0 3px rgba(35, 165, 90, 0.14); }
.dot.warn { background: var(--warn); box-shadow: 0 0 0 3px rgba(217, 131, 36, 0.16); }
.dot.off { background: var(--bad); box-shadow: 0 0 0 3px rgba(216, 56, 60, 0.13); }
.dot.dead { background: #9b5de5; box-shadow: 0 0 0 3px rgba(155, 93, 229, 0.18); }

.totp {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: 10px;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--accent-dim);
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  user-select: none;
}
.totp.stale { opacity: 0.4; cursor: default; }
.totpcode {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 600;
  letter-spacing: 0.06em;
}
.totpleft { font-size: 0.72em; opacity: 0.6; }

.cred {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-right: 8px;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--hover);
  cursor: pointer;
  user-select: none;
  max-width: 260px;
}
.credtag {
  font-size: 0.66em;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.5;
}
.credtext {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#totpfloat {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
}
.totptag { font-size: 0.7em; letter-spacing: 0.09em; opacity: 0.55; }

#menu section {
  padding: var(--s3) var(--s3) var(--s4);
  border-top: 1px solid var(--line-soft);
  scroll-margin-top: 62px;
}

.pane.session {
  border-top: 0;
  padding-top: 0;
  padding-bottom: var(--s3);
}

.sessionline {
  font-size: 13px;
  line-height: 1.4;
  color: var(--muted);
  word-break: break-word;
  padding: var(--s2) 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-m);
  background: var(--well);
}

.panehead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: var(--s2);
}

.panehead h2 {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
}

.count {
  font-size: 11px;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}

input, select, textarea, button {
  font: inherit;
  color: inherit;
}

input[type="text"], input[type="search"], textarea, select {
  width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: var(--r-m);
  background: var(--well);
  outline: none;
}

input::placeholder, textarea::placeholder { color: var(--faint); }

textarea { min-height: 62px; resize: vertical; }

input:focus, textarea:focus, select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

select {
  appearance: none;
  padding-right: 30px;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 16px) 19px, calc(100% - 11px) 19px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

input[type="checkbox"] {
  appearance: none;
  flex: none;
  position: relative;
  width: 42px;
  height: 24px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--well);
  cursor: pointer;
  transition: background 0.14s, border-color 0.14s;
}

input[type="checkbox"]::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #b7bbc2;
  transition: transform 0.14s, background 0.14s;
}

input[type="checkbox"]:checked {
  background: var(--accent-ink);
  border-color: var(--accent-ink);
}

input[type="checkbox"]:checked::after {
  transform: translateX(18px);
  background: #fff;
}

input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

button {
  min-height: 42px;
  padding: 8px 14px;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: var(--r-m);
  background: var(--panel-2);
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}

button:hover { background: #f3f4f6; border-color: #d7d9de; }
button:active { background: #eaebee; }
button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

button.wide {
  width: 100%;
  margin-top: var(--s2);
}

button.primary {
  background: var(--accent-ink);
  border-color: var(--accent-ink);
  color: #fff;
  font-weight: 600;
}

button.primary:hover { background: #c22f33; border-color: #c22f33; }

button.danger {
  color: var(--bad);
  border-color: rgba(216, 56, 60, 0.32);
  background: transparent;
}

button.danger:hover { background: var(--bad-dim); border-color: var(--bad); }

button.mini {
  min-height: 30px;
  padding: 3px 10px;
  font-size: 12px;
  border-radius: var(--r-s);
  color: var(--muted);
}

button.mini:hover { color: var(--text); }

.plus {
  display: inline-block;
  margin-right: 7px;
  font-size: 17px;
  line-height: 1;
  color: var(--muted);
  vertical-align: -1px;
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s2);
  margin-top: var(--s2);
  font-size: 13px;
  color: var(--muted);
}

.row select, .row button { width: auto; min-width: 124px; }

.well {
  margin-top: var(--s2);
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-l);
  background: var(--panel-2);
}

.list {
  border: 1px solid var(--line);
  border-radius: var(--r-l);
  overflow: hidden;
  background: var(--well);
}

.list input[type="search"] {
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  border-radius: 0;
  background: transparent;
  min-height: 44px;
}

.list input[type="search"]:focus {
  box-shadow: none;
  border-bottom-color: var(--accent);
  background: rgba(254, 108, 110, 0.05);
}

.accounts {
  display: flex;
  flex-direction: column;
  max-height: 186px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--scroll) transparent;
}

.sesscontrols { margin-top: var(--s2); }

.sesshead { margin-top: var(--s3); }

.livelist .account { cursor: pointer; }

.livelist .account.active { cursor: default; }

.account .byline {
  font-size: 11px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.accounts .hint { margin: 0; padding: 16px 13px; }

.account {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--s2);
  width: 100%;
  min-height: 58px;
  padding: 9px 8px 9px 15px;
  text-align: left;
  border-top: 1px solid var(--line-soft);
  cursor: pointer;
  user-select: none;
}

.accounts .account:first-child { border-top: 0; }

.account::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: transparent;
}

.account:hover { background: var(--hover); }
.account:active { background: rgba(23, 24, 28, 0.06); }
.account:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

.account.active { background: var(--accent-dim); }
.account.active::before { background: var(--accent); }

.account .main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.account .name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 560;
  color: var(--text);
}

.account .dots {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: none;
}

.account .del {
  flex: none;
  width: 38px;
  min-height: 38px;
  padding: 0;
  border: 0;
  border-radius: var(--r-s);
  background: transparent;
  color: #b3b6bd;
  font-size: 19px;
  line-height: 1;
}

.account .del:hover { background: var(--bad-dim); color: var(--bad); }

.badge {
  align-self: flex-start;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  letter-spacing: 0.02em;
  border-radius: 5px;
  padding: 1px 6px;
  color: var(--muted);
  background: #f1f2f4;
}

.tagfield { margin-top: 8px; }

.fold {
  margin-top: var(--s2);
  border: 1px solid var(--line);
  border-radius: var(--r-l);
  background: var(--panel-2);
  overflow: hidden;
}

.fold[open] { border-color: #d7d9de; }

.fold > summary {
  display: flex;
  align-items: center;
  min-height: 46px;
  padding: 11px 12px;
  list-style: none;
  cursor: pointer;
  user-select: none;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
}

.fold > summary::-webkit-details-marker { display: none; }

.fold > summary:hover { color: var(--muted); background: var(--hover); }

.fold > summary::after {
  content: "+";
  margin-left: auto;
  font-size: 14px;
  letter-spacing: 0;
}

.fold[open] > summary::after { content: "\2212"; }

.foldbody {
  padding: 12px;
  border-top: 1px solid var(--line-soft);
}

.foldbody > .hint:first-child { margin-top: 0; }

.foldbody #usearch { margin-bottom: 2px; }

.tags {
  display: flex;
  flex-direction: column;
  max-height: 200px;
  margin-top: var(--s2);
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-m);
  background: var(--well);
  scrollbar-width: thin;
  scrollbar-color: var(--scroll) transparent;
}

.tags .hint { margin: 0; padding: 14px 12px; }

.tagrow {
  display: flex;
  align-items: center;
  gap: var(--s2);
  min-height: 48px;
  padding: 8px 6px 8px 12px;
  border-top: 1px solid var(--line-soft);
}

.tags .tagrow:first-child { border-top: 0; }

.tagrow:hover { background: var(--hover); }

.tagrow .main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tname {
  font-size: 13px;
  font-weight: 560;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.turl {
  font-size: 11px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tagrow .del {
  flex: none;
  width: 34px;
  min-height: 34px;
  padding: 0;
  border: 0;
  border-radius: var(--r-s);
  background: transparent;
  color: #b3b6bd;
  font-size: 18px;
  line-height: 1;
}

.tagrow .del:hover { background: var(--bad-dim); color: var(--bad); }

.tagform {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: var(--s3);
}

.tagform button.wide { margin-top: 2px; }

.domains {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: var(--s2) 0 2px;
}

.domains button {
  min-height: 28px;
  padding: 3px 11px;
  font-size: 12px;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
}

.domains button.on {
  color: var(--accent-ink);
  border-color: var(--accent);
  background: var(--accent-dim);
}

#advanced {
  border-top: 1px solid var(--line-soft);
}

#advanced > summary {
  list-style: none;
  cursor: pointer;
  padding: var(--s3);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
}

#advanced > summary:hover { color: var(--muted); }
#advanced > summary::-webkit-details-marker { display: none; }

#advanced > summary::after {
  content: "+";
  float: right;
  font-size: 14px;
  letter-spacing: 0;
}

#advanced[open] > summary::after { content: "\2212"; }

#advanced section:first-of-type { border-top: 0; padding-top: 0; }

.roster {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
  margin-top: var(--s2);
}

.user {
  border: 1px solid var(--line);
  border-radius: var(--r-l);
  background: var(--panel-2);
  overflow: hidden;
}

.user[open] { border-color: #d7d9de; }

.uhead {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 11px 34px 11px 12px;
  min-height: 52px;
  position: relative;
  list-style: none;
  cursor: pointer;
  user-select: none;
}

.uhead::-webkit-details-marker { display: none; }

.uhead::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 50%;
  width: 7px;
  height: 7px;
  margin-top: -5px;
  border-right: 1.5px solid var(--faint);
  border-bottom: 1.5px solid var(--faint);
  transform: rotate(45deg);
  transition: transform 0.15s;
}

.user[open] > .uhead::after {
  transform: rotate(-135deg);
  margin-top: -2px;
}

.uhead:hover { background: var(--hover); }

.uname {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.uhead .badge { align-self: center; flex: none; }

.badge.accent { color: var(--accent-ink); background: var(--accent-dim); }
.badge.access { color: var(--muted); background: transparent; padding: 0; }

.ubody {
  padding: 0 12px 12px;
  border-top: 1px solid var(--line-soft);
}

.ucontrols .owned { margin: 10px 0 0; }
.ucontrols .row:first-of-type { margin-top: 8px; }

.ubuttons { margin-top: var(--s2); }

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

button.danger:disabled { background: transparent; }

.uaccess {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
}

.owned {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
  word-break: break-word;
  margin-bottom: 8px;
}

.grants {
  display: flex;
  flex-direction: column;
  max-height: 240px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-m);
  background: var(--well);
  scrollbar-width: thin;
  scrollbar-color: var(--scroll) transparent;
}

.grant {
  display: flex;
  align-items: center;
  gap: var(--s2);
  padding: 8px 10px;
  min-height: 46px;
  border-top: 1px solid var(--line-soft);
  cursor: pointer;
}

.grant:first-child { border-top: 0; }
.grant:hover { background: var(--hover); }

.grant .main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.gname {
  font-size: 13px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gowner {
  font-size: 11px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.uaccess .hint { margin-top: 0; }

.ucreate input[type="text"] { margin-bottom: 2px; }

.roster:first-child { margin-top: 0; }

.daemon {
  margin-top: var(--s4);
  padding-top: var(--s3);
  border-top: 1px solid var(--line-soft);
}

.tokenbox {
  border: 1px solid rgba(217, 131, 36, 0.38);
  background: rgba(217, 131, 36, 0.08);
  border-radius: var(--r-l);
  padding: 11px 12px;
  margin-bottom: var(--s3);
}

.tokenhead {
  font-size: 12px;
  color: var(--warn);
  margin-bottom: 7px;
}

.tokenbox code {
  display: block;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  word-break: break-all;
  padding: 9px 10px;
  border-radius: var(--r-s);
  background: var(--well);
  border: 1px solid var(--line);
  color: var(--text);
}

.warnline {
  margin: 9px 0;
  font-size: 12px;
  color: #96650f;
}

.hint {
  margin: var(--s2) 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--faint);
}

.nav {
  display: flex;
  gap: 8px;
}

.nav button { flex: 1; }

.hidden { display: none !important; }

.overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--bg);
}

#login {
  background:
    linear-gradient(rgba(255, 255, 255, 0.58), rgba(255, 255, 255, 0.58)),
    url("/static/login.png") center / cover no-repeat,
    var(--bg);
}

#loginform {
  position: relative;
  width: 100%;
  max-width: 340px;
  display: flex;
  flex-direction: column;
  gap: var(--s2);
  padding: 26px 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 26px 64px rgba(23, 24, 28, 0.22), 0 2px 8px rgba(23, 24, 28, 0.06);
}

#loginform h1 {
  margin: 0;
  font-size: 21px;
  font-weight: 640;
  letter-spacing: 0.01em;
}

#loginform .sub {
  margin: -4px 0 4px;
  font-size: 13px;
  color: var(--muted);
}

#loginform input { min-height: 46px; }
#loginform button { min-height: 46px; }

#loginmsg {
  margin: 0;
  min-height: 18px;
  font-size: 13px;
  color: var(--bad);
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--r-l);
  padding: 14px 20px;
  background: var(--panel);
  color: var(--muted);
}

#toast {
  position: fixed;
  left: 50%;
  bottom: calc(26px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  background: rgba(23, 24, 28, 0.95);
  border: 1px solid rgba(23, 24, 28, 0.95);
  color: #fff;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 13px;
  z-index: 70;
  max-width: 90vw;
  text-align: center;
  box-shadow: 0 8px 24px rgba(23, 24, 28, 0.25);
}

@media (max-width: 420px) {
  #menu { width: 100%; max-width: 100%; }
  #scrim { display: none !important; }
}
#dock #totpfloat {
  display: flex;
  align-items: stretch;
  gap: 10px;
  padding: 8px;
  margin-right: 8px;
  background: #ffffff;
  border: 1px solid rgba(20, 22, 28, 0.12);
  border-radius: 14px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.14);
  box-sizing: border-box;
}
#dock #totpfloat .credline,
#dock #totpfloat .totpcell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 3px;
  width: auto;
  height: auto;
  min-height: 0;
  padding: 7px 12px;
  border: 1px solid rgba(20, 22, 28, 0.12);
  border-radius: 10px;
  background: rgba(20, 22, 28, 0.03);
  box-shadow: none;
  cursor: pointer;
  font: inherit;
  color: inherit;
  box-sizing: border-box;
}
#dock #totpfloat .credline:hover,
#dock #totpfloat .totpcell:hover {
  background: var(--accent-dim, rgba(60,90,200,0.12));
  border-color: rgba(60, 90, 200, 0.35);
}
#dock #totpfloat .cell-email { width: 210px; }
#dock #totpfloat .totpcell { justify-content: flex-start; }
#dock #totpfloat .credlabel {
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.5;
  font-weight: 700;
}
#dock #totpfloat .credvalue {
  display: block;
  width: 100%;
  max-width: 100%;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.95rem;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#dock #totpfloat .credvalue.masked { letter-spacing: 0.22em; }
#dock #totpfloat .totp {
  display: inline-flex;
  align-items: baseline;
  margin: 0;
  padding: 0;
  background: none;
  gap: 8px;
}
#dock #totpfloat .totpcode { font-size: 1.3rem; font-weight: 700; letter-spacing: 0.08em; }
#dock #totpfloat .totpleft { font-size: 0.78rem; opacity: 0.6; }
#dock #donefloat {
  width: auto;
  height: auto;
  min-height: 0;
  padding: 0 26px;
  border: 0;
  border-radius: 14px;
  background: var(--ok, #23a55a);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(35, 165, 90, 0.34);
}
#dock #donefloat:hover { filter: brightness(1.06); background: var(--ok, #23a55a); }
#rotoverlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(16, 18, 24, 0.55);
  backdrop-filter: blur(2px);
  z-index: 40;
}
#rotoverlay.hidden { display: none; }
.rotcard {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 30px 40px;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
  min-width: 260px;
}
.rotspin {
  width: 34px;
  height: 34px;
  border: 3px solid rgba(20, 22, 28, 0.14);
  border-top-color: var(--accent, #3a5ac8);
  border-radius: 50%;
  animation: rotspin 0.8s linear infinite;
}
@keyframes rotspin { to { transform: rotate(360deg); } }
.rottext {
  font-size: 1.02rem;
  font-weight: 600;
  color: #14161c;
  text-align: center;
  font-variant-numeric: tabular-nums;
}


#enrolllist {
  width: 100%;
  min-height: 120px;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  line-height: 1.5;
}

#enrollreport {
  margin-top: 8px;
  max-height: 220px;
  overflow-y: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  line-height: 1.6;
}

#enrollreport .enrollhead {
  font-weight: 600;
  margin-bottom: 4px;
}

#enrollreport .enrollok {
  color: #7ddc8a;
}

#enrollreport .enrollskip {
  opacity: 0.65;
}

#enrollreport .enrollbad {
  color: #ff8d8d;
}


.grant .dots {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: 10px;
  flex: none;
}
