:root {
  --brand: #0B7A4B; --brand-2: #0f9d58; --ink: #0e1a14; --muted: #5f7268;
  --bg: #f5f7f6; --card: #ffffff; --line: #e4eae7; --danger: #c0392b; --radius: 16px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg); color: var(--ink); overscroll-behavior-y: contain;
}
.app { max-width: 480px; margin: 0 auto; min-height: 100dvh; display: flex; flex-direction: column; background: var(--bg); }
.topbar {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px calc(14px + env(safe-area-inset-top)); background: var(--brand); color: #fff;
  padding-top: calc(14px + env(safe-area-inset-top));
}
.brand { font-weight: 800; letter-spacing: .3px; font-size: 18px; }
.who { font-size: 13px; opacity: .95; }
.view { flex: 1; padding: 18px; padding-bottom: 96px; }
.tabs {
  position: sticky; bottom: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px;
  background: #fff; border-top: 1px solid var(--line); padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
}
.tab { border: 0; background: transparent; padding: 10px; border-radius: 12px; font-weight: 600; color: var(--muted); font-size: 14px; }
.tab.active { color: var(--brand); background: #eaf6ef; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 14px; }
h1 { font-size: 22px; margin: 4px 0 14px; }
h2 { font-size: 16px; margin: 0 0 12px; }
p.sub { color: var(--muted); margin: 0 0 16px; font-size: 14px; }
label { display: block; font-size: 13px; color: var(--muted); margin: 12px 0 6px; font-weight: 600; }
input, select {
  width: 100%; padding: 13px 14px; border: 1px solid var(--line); border-radius: 12px; font-size: 16px;
  background: #fff; color: var(--ink);
}
input:focus, select:focus { outline: 2px solid var(--brand-2); border-color: var(--brand-2); }
.btn {
  width: 100%; padding: 15px; border: 0; border-radius: 14px; background: var(--brand); color: #fff;
  font-size: 16px; font-weight: 700; margin-top: 16px; cursor: pointer;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; }
.btn.secondary { background: #eaf6ef; color: var(--brand); }
.btn.ghost { background: transparent; color: var(--brand); border: 1px solid var(--line); }
.row { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 15px; }
.row:last-child { border-bottom: 0; }
.row .k { color: var(--muted); }
.row .v { font-weight: 700; text-align: right; }
.big { font-size: 30px; font-weight: 800; letter-spacing: -.5px; }
.pill { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.pill.instant { background: #e7f7ee; color: #0b7a4b; }
.pill.sequential { background: #fff3e0; color: #b26a00; }
.pill.ok { background: #e7f7ee; color: #0b7a4b; }
.pill.pending { background: #eef1f0; color: #5f7268; }
.pill.fail { background: #fdecea; color: #c0392b; }
.muted { color: var(--muted); font-size: 13px; }
.hidden { display: none !important; }
.loading { text-align: center; color: var(--muted); padding: 40px; }
.list-item { display: flex; justify-content: space-between; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.list-item:last-child { border-bottom: 0; }
.toast {
  position: fixed; left: 50%; bottom: 100px; transform: translateX(-50%); background: #0e1a14; color: #fff;
  padding: 12px 18px; border-radius: 12px; font-size: 14px; z-index: 20; max-width: 90%; text-align: center;
}
.linkbox { background: #f0f7f3; border: 1px dashed var(--brand); border-radius: 12px; padding: 12px; word-break: break-all; font-size: 13px; margin-top: 10px; }
.center { text-align: center; }
.spinner { width: 34px; height: 34px; border: 3px solid var(--line); border-top-color: var(--brand); border-radius: 50%; animation: spin 1s linear infinite; margin: 20px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.hero { text-align: center; padding: 30px 0 10px; }
.hero .mark { font-size: 46px; }
@media (prefers-color-scheme: dark) {
  :root { --bg: #0d1512; --card: #14201a; --ink: #e8f0ec; --muted: #8ba398; --line: #223029; }
  input, select { background: #0f1a15; color: var(--ink); }
  .tabs { background: #14201a; }
  .tab.active { background: #16402d; }
  .pill.pending { background: #223029; color: #8ba398; }
}
