:root {
  --bg: #f6f7f9; --fg: #14171c; --muted: #5b6573; --card: #fff; --accent: #1f6feb; --ok: #1a7f37; --bad: #b42318;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0f1115; --fg: #e8ebf0; --muted: #9aa4b2; --card: #181b21; --accent: #4c8dff; --ok: #3fb950; --bad: #f97066; }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--fg); font: 16px/1.5 -apple-system, system-ui, "Segoe UI", sans-serif; }
.wrap { max-width: 640px; margin: 0 auto; padding: max(24px, env(safe-area-inset-top)) 16px 24px; }
h1 { font-size: 1.6rem; margin: 0 0 .25rem; }
.muted { color: var(--muted); }
.pill { display: inline-block; padding: .25rem .75rem; border-radius: 999px; background: var(--card); border: 1px solid color-mix(in srgb, var(--muted) 35%, transparent); font-size: .9rem; }
.pill.ok { color: var(--ok); }
.pill.bad { color: var(--bad); }
.foot { text-align: center; color: var(--muted); font-size: .8rem; padding: 16px 16px max(16px, env(safe-area-inset-bottom)); }
a { color: var(--accent); }
.doc h2 { font-size: 1.15rem; margin: 1.75rem 0 .25rem; color: var(--accent); }
.doc p, .doc li { color: var(--fg); }
.doc ul { padding-left: 1.25rem; }
.card { background: var(--card); border: 1px solid color-mix(in srgb, var(--muted) 30%, transparent); border-radius: 14px; padding: 16px; margin: 16px 0; }
#who { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
#who[hidden], #gbtn[hidden], .avatar[hidden] { display: none; }
.avatar { border-radius: 50%; width: 40px; height: 40px; }
.btn { margin-left: auto; padding: .5rem 1rem; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--muted) 45%, transparent); background: transparent; color: var(--fg); font: inherit; cursor: pointer; }
.btn:hover { border-color: var(--accent); }
.wrap.wide { max-width: 900px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 12px 0; }
.tabs button { padding: .45rem .9rem; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--muted) 40%, transparent); background: transparent; color: var(--fg); font: inherit; cursor: pointer; }
.tabs button.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 6px 0; }
.small { font-size: .8rem; }
.btn.solid { background: var(--accent); border-color: var(--accent); color: #fff; margin-left: 0; }
.btn.danger { color: var(--bad); margin-left: 0; }
.btn { margin-left: 0; }
#who .btn { margin-left: auto; }
.card.dim { opacity: .55; }
.secret { border-color: var(--accent); }
.secretval { display: block; word-break: break-all; padding: .6rem .75rem; margin: .5rem 0; border-radius: 8px; background: color-mix(in srgb, var(--accent) 12%, transparent); font-size: .9rem; user-select: all; }
.f { display: block; margin: 8px 0; }
.f span { display: block; font-size: .8rem; color: var(--muted); }
.f input { width: 100%; max-width: 360px; padding: .5rem .6rem; border-radius: 8px; border: 1px solid color-mix(in srgb, var(--muted) 45%, transparent); background: var(--bg); color: var(--fg); font: inherit; }
.limits { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 4px 12px; }
.limits .f input { max-width: none; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; margin: 12px 0; }
.stats .small { grid-column: 1 / -1; }
.stat { background: var(--card); border: 1px solid color-mix(in srgb, var(--muted) 30%, transparent); border-radius: 12px; padding: 10px 14px; }
.stat b { display: block; font-size: 1.6rem; }
.tablewrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: .45rem .6rem; border-bottom: 1px solid color-mix(in srgb, var(--muted) 25%, transparent); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: .8rem; }
.nowrap { white-space: nowrap; }
.tag { display: inline-block; padding: .05rem .5rem; border-radius: 999px; font-size: .75rem; border: 1px solid currentColor; }
.tag.done { color: var(--ok); } .tag.failed { color: var(--bad); } .tag.queued, .tag.working { color: var(--accent); }
.person { justify-content: space-between; }
h2 { font-size: 1.15rem; margin: 1.5rem 0 .5rem; }
.lbl { display: block; font-size: .85rem; font-weight: 650; margin: 0 0 6px; }
.urlrow { display: flex; gap: 8px; flex-wrap: wrap; }
.urlrow input { flex: 1 1 220px; min-width: 0; min-height: 46px; padding: .6rem .8rem; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--muted) 45%, transparent); background: var(--bg); color: var(--fg); font: inherit; font-size: 16px; }
.urlrow input:focus-visible, .btn:focus-visible, a.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.urlrow .btn { min-height: 46px; padding: .6rem 1.4rem; font-weight: 650; }
.btn:disabled, .urlrow input:disabled { opacity: .6; cursor: default; }
a.btn { display: inline-flex; align-items: center; text-decoration: none; min-height: 46px; padding: .6rem 1.4rem; font-weight: 650; }
.okline { color: var(--ok); } .badline { color: var(--bad); }
.small { font-size: .85rem; margin: 10px 0 0; }
.notice { margin-top: 14px; }
.err { color: var(--bad); margin: 10px 0 0; font-weight: 600; }
.track { height: 8px; border-radius: 999px; background: color-mix(in srgb, var(--muted) 25%, transparent); overflow: hidden; margin-top: 14px; }
.track i { display: block; height: 100%; width: 35%; border-radius: 999px; background: var(--accent); animation: slide 1.3s ease-in-out infinite; }
@keyframes slide { 0% { margin-left: -35%; } 100% { margin-left: 100%; } }
@media (prefers-reduced-motion: reduce) { .track i { animation: none; width: 100%; opacity: .5; } }
.progmsg { margin: 10px 0 0; }
.donetitle { font-size: 1.15rem; font-weight: 650; margin: 0; overflow-wrap: anywhere; }
#form[hidden], #prog[hidden], #done[hidden], #tool[hidden], #authMsg[hidden] { display: none; }
