:root {
  --bg: #f7f7f5; --surface: #fff;
  --text: #1a1a1a; --text-2: #4a4a4a; --text-3: #6e6e6e;
  --line: #0000001a; --line-strong: #00000030; --fill: #0000000f; --track: #00000017; --link: #0b63c4;
  --on-accent: #fff; --accent: #1a1a1a; --error: #b93b3c; --success: #3f8544; --warning: #a8701c; --blue: #0a74d6;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI Variable Display", "Segoe UI", Helvetica, Arial, sans-serif;
  --serif: ui-serif, "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --gap: 16px; --pad: 20px; --radius: 12px; --control: 36px; --edge: 32px;
  color-scheme: light;
}
:root:lang(zh) {
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI Variable Display", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans CJK SC", "Noto Sans SC", "Source Han Sans SC", "WenQuanYi Micro Hei", sans-serif;
  --serif: ui-serif, "Iowan Old Style", "Songti SC", "STSong", "Noto Serif CJK SC", "Noto Serif SC", "Source Han Serif SC", SimSun, serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121212; --surface: #222;
    --text: #ececec; --text-2: #c4c4c4; --text-3: #a3a3a3;
    --line: #ffffff21; --line-strong: #ffffff38; --fill: #ffffff14; --track: #ffffff29; --link: #74b6ff;
    --on-accent: #161616; --accent: #ececec; --error: #f0706f; --success: #6cbf70; --warning: #e0ad5a; --blue: #4aa8ff;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
    --bg: #121212; --surface: #222;
    --text: #ececec; --text-2: #c4c4c4; --text-3: #a3a3a3;
    --line: #ffffff21; --line-strong: #ffffff38; --fill: #ffffff14; --track: #ffffff29; --link: #74b6ff;
    --on-accent: #161616; --accent: #ececec; --error: #f0706f; --success: #6cbf70; --warning: #e0ad5a; --blue: #4aa8ff;
    color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; }
html { scrollbar-gutter: stable; }
body { background: var(--bg); color: var(--text); font: 14px/20px var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
h1 { font: 400 28px/34px var(--serif); margin: 0; }
h2 { font-size: 15px; line-height: 20px; font-weight: 600; color: var(--text); margin: 0; }
p { margin: 0; }
code, .mono { font-family: var(--mono); font-size: 12px; }
.sub { color: var(--text-2); margin-top: 4px; }
.muted { color: var(--text-3); font-size: 13px; line-height: 18px; }
.error { color: var(--error); font-size: 13px; line-height: 18px; }
.error:empty { display: none; }

button, a.button { font: inherit; font-size: 14px; color: var(--text); display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: var(--control); padding: 0 16px;
  border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); cursor: pointer; white-space: nowrap; text-decoration: none; }
button:hover, a.button:hover { background: var(--fill); }
button.primary { background: var(--accent); color: var(--on-accent); border-color: transparent; }
button.primary:hover { background: var(--accent); opacity: .88; }
button.danger { color: var(--error); }
button.primary.danger { background: var(--error); color: #fff; }
button.link { height: auto; min-height: 20px; padding: 0; border: 0; border-radius: 0; background: none; color: var(--link); font-weight: 500; }
button.link:hover { background: none; text-decoration: underline; text-underline-offset: 3px; }
button.link.danger { color: var(--error); }
button:disabled { opacity: .45; cursor: default; }
input, select, textarea { font: inherit; color: var(--text); height: var(--control); padding: 0 10px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--surface); outline: 0; min-width: 0; }
textarea { height: auto; padding: 8px 10px; font-family: var(--mono); font-size: 12px; line-height: 18px; }
textarea.key { width: 100%; resize: none; }
input:focus, select:focus, textarea:focus { border-color: var(--text-3); }
label { display: grid; gap: 6px; font-size: 13px; line-height: 18px; color: var(--text-2); }
label .hint { color: var(--text-3); }

#app { display: flex; min-height: 100vh; }
#app > header { width: 232px; flex-shrink: 0; padding: 20px 16px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; }
header .brand { display: flex; align-items: center; gap: 10px; height: 32px; padding: 0 10px; margin-bottom: 16px; font-weight: 600; font-size: 15px; }
header .brand img { width: 22px; height: 22px; }
header nav { display: flex; flex-direction: column; gap: 2px; }
header nav a { display: flex; align-items: center; min-height: 36px; padding: 0 10px; border-radius: 8px; text-decoration: none; color: var(--text-2); }
header nav a:hover { background: var(--fill); color: var(--text); }
header nav a[aria-current] { background: var(--line); color: var(--text); font-weight: 600; }
header .foot { margin-top: auto; display: grid; gap: 8px; padding: 16px 10px 0; border-top: 1px solid var(--line); justify-items: start; }
header .me { display: flex; align-items: center; gap: 10px; min-width: 0; max-width: 100%; min-height: 36px; text-decoration: none; color: var(--text-3); }
header .me:hover { color: var(--text); }
header .who { font-size: 13px; line-height: 18px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar { flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--line-strong); color: var(--text); font-size: 11px; font-weight: 600; letter-spacing: .04em; }
header .me[aria-current] .avatar { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--text); }
.head-acts select { border-radius: 999px; height: var(--control); padding: 0 14px; }
main { flex: 1; min-width: 0; padding: 40px var(--edge) 64px; display: flex; flex-direction: column; gap: var(--gap); }
main > * { width: 100%; max-width: 860px; margin-left: auto; margin-right: auto; }

.head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 8px; }
.head-text { min-width: 0; flex: 1; }
.sub button.link { margin-left: 8px; }
.head .back { display: inline-flex; align-items: center; margin-bottom: 8px; font-size: 13px; color: var(--text-2); text-decoration: none; }
.head .back:hover { color: var(--text); }
.head-acts { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--pad); display: grid; gap: 12px; min-width: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 20px; }
.card-acts { display: flex; gap: 20px; align-items: center; }
.list { list-style: none; margin: 0; padding: 0; }
.list > li { display: flex; align-items: center; justify-content: space-between; gap: 8px 24px; padding: 14px 0; border-top: 1px solid var(--line); position: relative; }
.list > li:first-child { border-top: 0; padding-top: 0; }
.list > li:last-child { padding-bottom: 0; }
.card-head + .list > li:first-child { padding-top: 2px; }
.row-main { min-width: 0; flex: 1; display: grid; gap: 2px; overflow-wrap: anywhere; }
.row-main > button, .row-main > a.button { justify-self: start; margin-top: 8px; }
.row-main .title { font-weight: 600; text-decoration: none; display: flex; align-items: center; gap: 8px; }
.row-main .state { font-size: 13px; color: var(--text-2); }
.row-main .title.state { font-size: inherit; color: var(--text); }
.row-main .label { font-size: 12px; line-height: 16px; color: var(--text-3); font-weight: 500; }
.go { color: var(--text-3); font-size: 18px; margin-left: auto; font-weight: 400; }
.row-main a.title::after { content: ""; position: absolute; inset: 0; }
.row-main a.title:hover { text-decoration: underline; text-underline-offset: 3px; }
.row-acts { display: flex; align-items: center; gap: 20px; flex-shrink: 0; position: relative; }
.empty { color: var(--text-3); padding: 8px 0; }
.badge { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 999px; background: var(--line-strong); color: var(--text); font-size: 12px; font-weight: 500; }
.value { font-variant-numeric: tabular-nums; font-weight: 500; }
.state { display: inline-flex; align-items: baseline; gap: 8px; }
.state { align-items: center; }
.state::before { content: ""; flex-shrink: 0; width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); }
.state.ok::before { background: var(--success); } .state.warn::before { background: var(--warning); } .state.bad::before { background: var(--error); }
.notice { padding: 12px 16px; border-radius: var(--radius); border: 1px solid var(--line-strong); background: var(--surface); border-left-width: 4px; }
.notice.warn { border-left-color: var(--warning); } .notice.bad { border-left-color: var(--error); }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; }

dialog { border: 1px solid var(--line-strong); border-radius: 16px; background: var(--surface); color: var(--text); padding: 24px; width: min(460px, calc(100vw - 32px)); }
dialog::backdrop { background: #0008; }
dialog h2 { font: 400 22px/28px var(--serif); color: var(--text); margin-bottom: 8px; }
dialog .note { color: var(--text-2); margin-bottom: 16px; }
ul.note { margin-top: 0; padding-left: 18px; display: grid; gap: 4px; }
.switched { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); vertical-align: middle; }
dialog form { display: grid; gap: 14px; }
dialog form input, dialog form select { width: 100%; }
dialog .error { margin-top: -4px; }
.sheet-acts { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.steps { margin: 0 0 8px; padding-left: 20px; display: grid; gap: 12px; }
.copy { display: grid; gap: 6px; justify-items: start; margin-top: 8px; }

#sign-in { width: 100%; max-width: 360px; margin: 0 auto; padding: 18vh 16px 0; display: grid; gap: 14px; }
#sign-in .mark { width: 36px; height: 36px; margin: 0 auto 4px; display: block; }
#sign-in h1 { text-align: center; font-size: 32px; line-height: 40px; margin-bottom: 8px; }
#sign-in .for { text-align: center; margin: -12px 0 8px; }
#sign-in input { width: 100%; }
#sign-in button { width: 100%; margin-top: 4px; }
#sign-in .next, #sign-in .passkey { background: var(--accent); color: var(--on-accent); border-color: transparent; }
#sign-in.pick .next { background: var(--surface); color: var(--text); border-color: var(--line-strong); }
#sign-in .hint { background: none; border: 0; color: var(--text-2); height: auto; padding: 4px 0; white-space: normal; text-wrap: balance; text-align: center; }
#sign-in .providers { display: grid; gap: 8px; }
#sign-in .providers:empty { display: none; }

@media (max-width: 900px) {
  #app > header { width: 196px; padding: 16px 12px; }
  :root { --edge: 24px; }
}
@media (pointer: coarse) {
  :root { --control: 44px; }
  input, select { font-size: 16px; }
  button.link { min-height: 44px; }
  header nav a, .head .back, header .me { min-height: 44px; display: inline-flex; align-items: center; }
}
@media (max-width: 600px) {
  :root { --edge: 16px; --pad: 16px; }
  body { font-size: 15px; line-height: 22px; }
  #app { display: block; }
  #app > header { position: sticky; top: 0; z-index: 5; width: auto; height: auto; flex-direction: row; align-items: center; justify-content: space-between; gap: 8px; border-right: 0; border-bottom: 1px solid var(--line); background: var(--bg);
    padding: calc(8px + env(safe-area-inset-top, 0px)) max(var(--edge), env(safe-area-inset-right, 0px)) 8px max(var(--edge), env(safe-area-inset-left, 0px)); }
  header .brand { margin: 0; padding: 0; }
  header nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; flex-direction: row; gap: 0; background: var(--surface); border-top: 1px solid var(--line); padding: 0 env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px); }
  header nav a { flex: 1; justify-content: center; min-height: 56px; border-radius: 0; color: var(--text-3); font-size: 13px; padding: 0 4px; white-space: nowrap; }
  header nav a[aria-current] { background: none; color: var(--text); box-shadow: inset 0 2px 0 var(--text); }
  header .foot { margin: 0; border: 0; padding: 0; display: flex; }
  header .who { display: none; }
  main { padding: 24px max(var(--edge), env(safe-area-inset-right, 0px)) calc(96px + env(safe-area-inset-bottom, 0px)) max(var(--edge), env(safe-area-inset-left, 0px)); }
  h1 { font-size: 26px; line-height: 32px; }
  .head { display: grid; grid-template-columns: 1fr; gap: 16px; }
  .sub button.link { margin-left: 0; display: flex; }
  .head-acts { display: grid; grid-auto-flow: row; }
  .head-acts { width: 100%; } .head-acts > * { width: 100%; }
  .list > li { flex-direction: column; align-items: stretch; }
  .row-acts { justify-content: flex-start; flex-wrap: wrap; gap: 4px 24px; }
  dialog { position: fixed; inset: auto 0 0 0; margin: 0; width: 100%; max-width: none; max-height: 90vh; overflow-y: auto; border-radius: 16px 16px 0 0; border-width: 1px 0 0;
    padding: 24px 16px calc(16px + env(safe-area-inset-bottom, 0px)); }
  .sheet-acts { flex-direction: column-reverse; } .sheet-acts > button { width: 100%; }
}

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.tiles + h2, .group-title { margin-top: 12px; font-size: 13px; color: var(--text-2); font-weight: 600; }
.tile { display: grid; gap: 4px; align-content: start; min-width: 0; padding: 16px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); color: var(--text); text-decoration: none; overflow-wrap: anywhere; }
a.tile:hover { border-color: var(--line-strong); background: color-mix(in srgb, var(--fill) 50%, var(--surface)); }
.tile .label { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; line-height: 16px; color: var(--text-3); font-weight: 500; }
a.tile .label::after { content: "\203A"; font-size: 16px; line-height: 16px; }
.tile .title { font-weight: 600; }
.tile .code { margin: 6px 0 2px; font-family: var(--mono); font-size: 28px; line-height: 36px; font-weight: 600; letter-spacing: 3px; white-space: nowrap; }
.meter { height: 6px; border-radius: 3px; background: var(--fill); overflow: hidden; } .tile .meter { margin: 6px 0 2px; }
.meter > div { height: 100%; border-radius: 3px; background: var(--blue); } .meter > .warn { background: var(--warning); } .meter > .bad { background: var(--error); }
.tile.bad { border-color: color-mix(in srgb, var(--error) 50%, transparent); } .tile.warn { border-color: color-mix(in srgb, var(--warning) 50%, transparent); }
.seg { display: inline-flex; gap: 2px; padding: 2px; border-radius: 999px; border: 1px solid var(--line-strong); justify-self: start; }
.seg button { border: 0; background: none; height: calc(var(--control) - 6px); padding: 0 14px; }
.seg button[aria-pressed="true"] { background: var(--line); font-weight: 600; }
form.fields { display: grid; gap: 14px; max-width: 480px; }
form.fields input, form.fields select { width: 100%; }
form.fields > button { justify-self: start; }
.notice.ok { border-left-color: var(--success); }
@media (max-width: 600px) { .tiles { grid-template-columns: 1fr 1fr; gap: 8px; } .tile { padding: 12px; } form.fields > button { justify-self: stretch; } }
@media (pointer: coarse) { header .me { min-width: 44px; justify-content: center; } .seg button { height: 44px; } .copy button.link { min-width: 44px; } }
header nav a { gap: 10px; }
header .ico { display: inline-flex; width: 18px; height: 18px; flex-shrink: 0; color: var(--text-3); }
header nav a[aria-current] .ico { color: var(--text); }
.slim-toggle { display: flex; align-items: center; gap: 10px; justify-content: flex-start; width: 100%; min-height: 36px; height: auto; margin-top: auto; padding: 0 10px; border: 0; border-radius: 8px; background: none; color: var(--text-3); font-size: 13px; }
.slim-toggle:hover { background: var(--fill); color: var(--text); }
header .foot { margin-top: 8px; }
:root[data-nav="slim"] #app > header { width: 64px; padding-left: 10px; padding-right: 10px; }
:root[data-nav="slim"] header .label, :root[data-nav="slim"] header .who { display: none; }
:root[data-nav="slim"] header .brand { justify-content: center; padding: 0; }
:root[data-nav="slim"] header nav a, :root[data-nav="slim"] .slim-toggle { justify-content: center; padding: 0; }
:root[data-nav="slim"] header .foot { padding-left: 0; padding-right: 0; justify-items: center; }
:root[data-nav="slim"] .slim-toggle .ico { transform: scaleX(-1); }
@media (pointer: coarse) { .slim-toggle { min-height: 44px; } }
@media (max-width: 600px) { .slim-toggle, header nav .ico { display: none; } :root[data-nav="slim"] header .label { display: inline; } :root[data-nav="slim"] #app > header { width: auto; } }
@media (max-width: 600px) { header .foot { margin-top: 0; } }

dl.status { display: grid; grid-template-columns: max-content 1fr; gap: 12px 32px; margin: 0; }
dl.status dt { color: var(--text-2); } dl.status dd { margin: 0; }
@media (max-width: 600px) { dl.status { grid-template-columns: 1fr; gap: 2px; } dl.status dd { margin-bottom: 12px; } }
.scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 13px; line-height: 18px; }
th, td { text-align: left; padding: 10px 12px 10px 0; border-top: 1px solid var(--line); vertical-align: top; }
tr:first-child th, tr:first-child td { border-top: 0; }
th { font-weight: 500; font-size: 12px; color: var(--text-3); white-space: nowrap; }
td.nowrap { white-space: nowrap; }
table.prices th { white-space: normal; vertical-align: bottom; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td.wrap { overflow-wrap: anywhere; }
button.more { justify-self: start; }
td.actor { max-width: 220px; overflow-wrap: anywhere; }
label.check { display: inline-flex; flex-direction: row; align-items: center; gap: 8px; color: var(--text-2); }
label.check input { height: auto; width: auto; }
@media (pointer: coarse) { label.check { min-height: 44px; } label.check input { width: 20px; height: 20px; } }
@media (max-width: 600px) {
  table.stack, table.stack tr, table.stack td { display: block; }
  table.stack tr { padding: 12px 0; border-top: 1px solid var(--line); }
  table.stack tr:first-child, table.stack tr:nth-child(2) { border-top: 0; }
  table.stack td { padding: 1px 0; border: 0; }
  table.stack tr:first-child:not(.item) { display: none; }
}
.filters { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.filters select { max-width: 100%; }
.badge.bad { margin-left: 8px; background: color-mix(in srgb, var(--error) 16%, transparent); color: var(--error); }
@media (max-width: 600px) { .filters { display: grid; grid-template-columns: 1fr; } .filters select { width: 100%; } }
@media (max-width: 600px) { table.stack td:empty { display: none; } }
.tiles.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { .tiles.three { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tile > button { justify-self: start; margin-top: 8px; height: 32px; padding: 0 14px; font-size: 13px; }
@media (pointer: coarse) { .tile > button { height: 44px; } }
.copy button { height: 32px; padding: 0 14px; font-size: 13px; }
@media (pointer: coarse) { .copy button { height: 44px; } }
table.people th { padding-bottom: 10px; }
table.people td { vertical-align: middle; padding: 16px 12px 16px 0; border-top: 1px solid var(--line-strong); }
table.people tr:hover td { background: color-mix(in srgb, var(--fill) 60%, transparent); }
table.people td:first-child { padding-left: 8px; } table.people th:first-child { padding-left: 8px; }
table.people .who { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; }
table.people .title { font-weight: 600; font-size: 14px; }
table.people td.acts { text-align: right; white-space: nowrap; padding-right: 8px; }
span.admin { display: inline-flex; color: var(--blue); }
.badge.quiet { background: none; border: 1px solid var(--line-strong); color: var(--text-3); }
.given { display: inline-flex; align-items: center; gap: 2px; padding: 2px 2px 2px 12px; border-radius: 8px; background: color-mix(in srgb, var(--blue) 10%, transparent); }
.given .code { font: 600 14px/20px var(--mono); letter-spacing: .12em; user-select: all; white-space: nowrap; }
.expiry { font-size: 13px; line-height: 18px; color: var(--text-3); white-space: nowrap; }
.expiry.warn { color: var(--warning); font-weight: 500; } .expiry.bad { color: var(--error); font-weight: 500; }
@media (max-width: 600px) { table.people td { padding: 3px 0; border: 0; } table.people td:first-child { padding-left: 0; } table.people td.acts { text-align: left; padding-top: 6px; } table.people tr:hover td { background: none; } }
label.switch { position: relative; display: inline-flex; align-items: center; width: 36px; height: 20px; }
label.switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
label.switch span { position: relative; width: 36px; height: 20px; border-radius: 999px; background: var(--line-strong); transition: background .15s; }
label.switch span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px #0003; transition: transform .15s; }
label.switch input:checked + span { background: var(--success); }
label.switch input:checked + span::after { transform: translateX(16px); }
label.switch input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px; }
label.switch input:disabled { cursor: default; } label.switch input:disabled + span { opacity: .5; }
@media (pointer: coarse) { label.switch { height: 44px; width: 44px; } }
button.icon { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--text-3); transition: background .12s, color .12s, opacity .12s; }
button.icon:hover, button.icon:focus-visible { background: var(--fill); color: var(--text); }
button.icon.danger:hover, button.icon.danger:focus-visible { background: color-mix(in srgb, var(--error) 12%, transparent); color: var(--error); }
button.icon.done { color: var(--success); }
td.acts { display: table-cell; } td.acts button.icon + button.icon { margin-left: 4px; }
@media (pointer: coarse) { button.icon { width: 44px; height: 44px; } }
table.people { table-layout: fixed; }
table.people th:nth-child(2) { width: 64px; } table.people th:nth-child(3) { width: 200px; } table.people th:nth-child(4) { width: 136px; } table.people th:nth-child(5) { width: 170px; } table.people th:nth-child(6) { width: 76px; }
table.people .title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
@media (max-width: 600px) { table.people { table-layout: auto; } }
button.small { height: 28px; padding: 0 12px; font-size: 13px; }
@media (pointer: coarse) { button.small { height: 44px; } }
button.icon.danger { color: var(--error); }
input.name { font: inherit; font-weight: 600; color: var(--text); height: auto; padding: 2px 6px; margin-left: -7px; border: 1px solid transparent; border-radius: 6px; background: none; width: min(100%, 320px); }
input.name:hover { border-color: var(--line); } input.name:focus { border-color: var(--line-strong); background: var(--surface); }
a.address { text-decoration: none; } a.address:hover { text-decoration: underline; text-underline-offset: 3px; }
.who { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; }
.code-id { font: 600 13px/20px var(--mono); letter-spacing: .08em; padding: 2px 8px; border-radius: 6px; background: var(--fill); color: var(--text); }
input.name { font-weight: 500; margin-left: 0; width: min(100%, 260px); }
input.name::placeholder { color: var(--text-3); font-weight: 400; }
table.machines td { vertical-align: middle; padding: 12px 12px 12px 0; border-top: 1px solid var(--line-strong); }
table.machines tr:hover td { background: color-mix(in srgb, var(--fill) 60%, transparent); }
table.machines td.acts { text-align: right; white-space: nowrap; } table.machines td.acts > * + * { margin-left: 6px; }
table.machines td.acts button:not(.icon) { height: 28px; padding: 0 12px; font-size: 13px; }
table.machines a.address { color: var(--text-2); }
@media (pointer: coarse) { table.machines td.acts button:not(.icon) { height: 44px; } }
@media (max-width: 600px) { table.machines td { padding: 3px 0; border: 0; } table.machines td.acts { text-align: left; padding-top: 6px; } table.machines tr:hover td { background: none; } }
@media (pointer: coarse) { input.name { min-height: 44px; } table.machines a.address { display: inline-flex; align-items: center; min-height: 44px; } }
@media (min-width: 601px) { table.people, table.machines { min-width: 760px; } }
select.small { height: 32px; padding: 0 28px 0 10px; font-size: 13px; border-radius: 8px; width: auto; max-width: 100%; }
@media (pointer: coarse) { select.small { height: 44px; font-size: 15px; } }
@media (max-width: 600px) {
  .card.bare { background: none; border: 0; padding: 0; }
  table.people tr.item, table.machines tr.item { display: grid; align-items: center; gap: 10px 16px; padding: 12px 14px; margin-bottom: 8px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
  table.people td, table.machines td { padding: 0; border: 0; min-width: 0; }
  table.people .acts, table.machines .acts { grid-area: acts; justify-self: end; text-align: right; }
  table.machines .acts button.icon { margin: -10px -10px -10px 0; }
  table.machines tr.item { grid-template-columns: auto 1fr auto; grid-template-areas: "code name acts" "addr addr addr" "state state person" "used used used"; row-gap: 6px; }
  table.machines .c-code { grid-area: code; } table.machines .c-name { grid-area: name; } table.machines .c-addr { grid-area: addr; font-size: 13px; }
  table.machines .c-state { grid-area: state; } table.machines .c-person { grid-area: person; text-align: right; }
  table.machines .c-used { grid-area: used; display: flex; justify-content: space-between; font-size: 13px; } table.machines .c-used .lab { font-size: 13px; }
  table.machines .c-addr a.address { display: inline-flex; align-items: center; min-height: 44px; margin: -12px 0; }
  table.machines input.name { min-height: 44px; width: 100%; margin: -6px 0; }
}
@media (max-width: 600px) { .tiles, .tiles.three { grid-template-columns: 1fr; gap: 8px; } .tile { padding: 12px 14px; } }
button.pick { height: 32px; padding: 0 8px 0 10px; gap: 8px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); color: var(--text); font-size: 13px; font-weight: 500; max-width: 100%; transition: border-color .12s, background .12s, color .12s; }
button.pick:hover, button.pick:focus-visible { border-color: var(--text-3); }
button.pick .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
button.pick .ico { display: inline-flex; color: var(--text-3); flex-shrink: 0; }
button.pick.empty { color: var(--text-3); font-weight: 400; }
@media (pointer: coarse) { button.pick { height: 44px; font-size: 15px; } }
.lab { display: none; }
.used { white-space: nowrap; display: inline-grid; gap: 4px; justify-items: start; } .used.over { color: var(--error); } .used .meter { width: 120px; }
.sure .ask { font-weight: 600; font-size: 16px; line-height: 22px; margin-bottom: 6px; }
.sure .sheet-acts { margin-top: 16px; }
.passkey { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); white-space: nowrap; } .passkey .ico { display: inline-flex; color: var(--success); }
.sign { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.sign button.icon, .given button.icon { flex-shrink: 0; }
.until { display: inline-flex; align-items: center; gap: 2px; }
dialog.picker .for { margin: -6px 0 14px; }
label.find { position: relative; display: block; margin-bottom: 8px; }
label.find .ico { position: absolute; left: 12px; top: 50%; translate: 0 -50%; display: inline-flex; color: var(--text-3); pointer-events: none; }
label.find input[type="search"] { width: 100%; padding-left: 36px; }
ul.options { list-style: none; margin: 0; padding: 0; max-height: min(52vh, 420px); overflow-y: auto; display: grid; gap: 2px; }
ul.options button { width: 100%; height: auto; min-height: 48px; padding: 8px 10px; border: 0; border-radius: 8px; background: none; justify-content: flex-start; gap: 12px; text-align: left; }
ul.options button:hover, ul.options button:focus-visible { background: var(--fill); }
ul.options button[aria-selected="true"] { background: color-mix(in srgb, var(--blue) 10%, transparent); }
.opt-main { display: grid; min-width: 0; flex: 1; }
.opt-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.opt-sub { font: 12px/16px var(--mono); color: var(--text-3); letter-spacing: .06em; }
.opt-side { font-size: 13px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 45%; }
.ico.tick { display: inline-flex; color: var(--blue); }
@media (max-width: 600px) {
  table.people tr.item { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "who acts" "seat seat" "place place" "used used" "sign sign"; gap: 0; padding: 4px 16px; }
  table.people .c-who { grid-area: who; padding: 12px 0; } table.people .acts { grid-area: acts; align-self: center; margin-right: -14px; }
  table.people .c-seat { grid-area: seat; } table.people .c-place { grid-area: place; } table.people .c-used { grid-area: used; } table.people .c-sign { grid-area: sign; }
  table.people .c-seat, table.people .c-place, table.people .c-used, table.people .c-sign { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 16px; align-items: center; min-height: 56px; padding: 6px 0; border-top: 1px solid var(--line); }
  table.people :is(.c-seat, .c-place, .c-used, .c-sign) > :last-child { justify-self: end; } table.people .c-used .used { justify-items: end; }
  table.people .c-place:empty, table.people .c-used:empty, table.people .c-sign:empty { display: none; }
  .lab { display: block; font-size: 14px; color: var(--text-2); }
  table.people label.switch { justify-content: flex-end; }
  table.people td.acts { padding: 0; }
  table.people .acts button.icon { margin: -10px 0; }
  table.people button.pick { max-width: 100%; }
  .given { min-height: 44px; padding-left: 14px; }
  .sign { flex-wrap: wrap; justify-content: flex-end; gap: 6px 12px; } .sign > button.icon, .until button.icon { margin: -10px -14px -10px -6px; }
}
table.people .places { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
table.people .place { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 2px 0 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; max-width: 100%; }
table.people .place .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; } table.people .place .ico { display: inline-flex; color: var(--text-3); }
table.people .place button.icon { width: 28px; height: 28px; } table.people .places > button.icon { border: 1px solid var(--line); border-radius: 8px; width: 32px; height: 32px; }
table.people .place.shared { border-style: dashed; } table.people .place .until { color: var(--text-3); white-space: nowrap; }
@media (pointer: coarse) { table.people .place { height: 44px; } table.people .place button.icon, table.people .places > button.icon { width: 44px; height: 44px; } }
