:root {
  --bg: #f5f6f4; --card: #ffffff; --ink: #1b1f1d; --muted: #5d6762; --line: #dfe3e0; --brand: #0b5a44; --brand-ink: #ffffff;
  --soft: #e7f1ee; --warn: #9a5b00; --warn-bg: #fff4e0; --bad: #a3261b; --bad-bg: #fdecea; --good: #1d6b33; --dot: #0f5c4d; --dot-off: #c9d1cd;
  --wm: rgba(0, 0, 0, 0.03); --head: #07402f; --gold: #f5b800;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121615; --card: #1b201e; --ink: #e8ecea; --muted: #9aa5a0; --line: #2c3431; --brand: #3fb59a; --brand-ink: #0b1210;
    --soft: #20302b; --warn: #f0b45a; --warn-bg: #3a2c14; --bad: #ff8a7d; --bad-bg: #3a1b17; --good: #6fd08a; --dot: #3fb59a; --dot-off: #3a4441;
    --wm: rgba(255, 255, 255, 0.028); --head: #07402f; --gold: #f5b800;
  }
}
:root[data-theme="dark"] {
  --bg: #121615; --card: #1b201e; --ink: #e8ecea; --muted: #9aa5a0; --line: #2c3431; --brand: #3fb59a; --brand-ink: #0b1210;
  --soft: #20302b; --warn: #f0b45a; --warn-bg: #3a2c14; --bad: #ff8a7d; --bad-bg: #3a1b17; --good: #6fd08a; --dot: #3fb59a; --dot-off: #3a4441;
  --wm: rgba(255, 255, 255, 0.028); --head: #07402f; --gold: #f5b800;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
body { padding-bottom: 140px; -webkit-user-select: none; user-select: none; overflow-x: hidden; }
input, textarea, select { -webkit-user-select: text; user-select: text; font: inherit; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; width: 100%; min-height: 44px; }
button { font: inherit; cursor: pointer; border-radius: 10px; min-height: 44px; padding: 8px 14px; border: 1px solid var(--line); background: var(--card); color: var(--ink); }
button.primary, .btn-primary { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); font-weight: 600; }
a { color: var(--brand); }
main { max-width: 760px; margin: 0 auto; padding: 12px 16px; }
.pad { padding: 16px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
h1 { font-size: 22px; margin: 6px 0 4px; }
h2 { font-size: 17px; margin: 18px 0 8px; }
header#top { position: sticky; top: 0; z-index: 5; display: flex; gap: 8px; align-items: center; padding: 6px 12px; background: var(--head); color: #fff; min-height: 52px; }
header#top a, header#top button { color: #fff; text-decoration: none; }
header .brand { display: flex; align-items: center; gap: 8px; font-weight: 800; letter-spacing: 1.5px; font-size: 17px; }
header .brand img { border-radius: 8px; }
header .byprabha { opacity: .9; height: 22px; width: auto; }
header .grow { flex: 1; }
@media (max-width: 360px) { header .byprabha { display: none; } }
.toplink { background: transparent; border: 0; min-height: 36px; padding: 4px 6px; font-size: 14px; }
nav#nav { position: fixed; bottom: 0; left: 0; right: 0; z-index: 6; display: grid; grid-template-columns: repeat(4, 1fr); background: var(--card); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
nav#nav a { text-align: center; padding: 12px 4px; min-height: 56px; font-size: 13px; text-decoration: none; color: var(--muted); display: flex; align-items: center; justify-content: center; }
nav#nav a.on { color: var(--brand); font-weight: 700; box-shadow: inset 0 3px 0 var(--brand); }
#askbtn { position: fixed; right: 16px; bottom: 74px; z-index: 7; border-radius: 28px; background: var(--brand); color: var(--brand-ink); border: 0; font-weight: 700; padding: 12px 18px; box-shadow: 0 4px 14px rgba(0,0,0,.25); }
#sheet { position: fixed; inset: 0; z-index: 9; background: rgba(0,0,0,.4); display: flex; align-items: flex-end; justify-content: center; }
#sheet[hidden] { display: none; }
.sheet-card { background: var(--bg); width: 100%; max-width: 760px; max-height: 88vh; overflow-y: auto; border-radius: 16px 16px 0 0; padding: 14px 16px 24px; }
.sheet-head { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.sheet-head b { flex: 1; font-size: 18px; }
#askform, .row-form { display: flex; gap: 8px; }
#askform input { flex: 1; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.chip { border: 1px solid var(--line); background: var(--card); border-radius: 20px; padding: 6px 12px; min-height: 36px; font-size: 14px; color: var(--ink); }
.chip.on { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin: 10px 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat b { display: block; font-size: 22px; }
.stat span { font-size: 13px; color: var(--muted); }
.list { display: flex; flex-direction: column; gap: 8px; margin: 8px 0; }
.prow { display: block; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; text-decoration: none; color: var(--ink); min-height: 56px; }
.prow .r1 { display: flex; gap: 8px; align-items: baseline; justify-content: space-between; }
.prow .r1 b { overflow: hidden; text-overflow: ellipsis; }
.prow .r2 { font-size: 13px; color: var(--muted); }
.code { font: 600 13px ui-monospace, Menlo, monospace; letter-spacing: 1px; background: var(--soft); color: var(--brand); border-radius: 6px; padding: 1px 6px; }
.dots { white-space: nowrap; letter-spacing: 1px; font-size: 13px; }
.dots i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--dot-off); margin-left: 2px; }
.dots i.on { background: var(--dot); }
.tag { font-size: 12px; border-radius: 6px; padding: 1px 6px; background: var(--soft); color: var(--brand); white-space: nowrap; }
.tag.warn { background: var(--warn-bg); color: var(--warn); }
.tag.bad { background: var(--bad-bg); color: var(--bad); }
.err { background: var(--bad-bg); color: var(--bad); border-radius: 10px; padding: 10px 12px; margin: 10px 0; }
.ok { background: var(--soft); color: var(--good); border-radius: 10px; padding: 10px 12px; margin: 10px 0; }
.filters { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.filters label { font-size: 13px; color: var(--muted); display: flex; flex-direction: column; gap: 4px; }
.filters .full { grid-column: 1 / -1; }
.pager { display: flex; gap: 8px; align-items: center; justify-content: space-between; margin: 10px 0; }
.phone { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 8px 0; border-top: 1px solid var(--line); }
.phone:first-child { border-top: 0; }
.phone .num { -webkit-user-select: text; user-select: text; font: 600 17px ui-monospace, Menlo, monospace; }
.callbtn { background: var(--brand); color: var(--brand-ink); border-radius: 10px; padding: 10px 16px; text-decoration: none; font-weight: 700; min-height: 44px; display: inline-flex; align-items: center; }
.hist { list-style: none; padding: 0; margin: 0; }
.hist li { display: grid; grid-template-columns: 92px 1fr; gap: 8px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; }
.hist li .when { color: var(--muted); font-size: 12px; }
.hist .k-bill b { color: var(--good); }
.kv { display: grid; grid-template-columns: 110px 1fr; gap: 4px 10px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.answer { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin: 10px 0; }
.answer .q { font-weight: 600; margin-bottom: 4px; }
.answer .f { font-size: 12px; color: var(--muted); margin-top: 6px; }
.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.seg label { display: inline-flex; gap: 6px; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; background: var(--card); min-height: 44px; color: var(--ink); font-size: 14px; }
.seg input { width: auto; min-height: 0; }
.login { max-width: 380px; margin: 8vh auto; }
.login form { display: flex; flex-direction: column; gap: 10px; }
#wm { position: fixed; inset: 0; z-index: 8; pointer-events: none; overflow: hidden; }
#wm span { position: absolute; white-space: nowrap; color: var(--wm); font: 600 15px system-ui, sans-serif; transform: rotate(-24deg); }
@media (min-width: 700px) { .grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; } }
@media print { body * { display: none !important; } body::after { content: "Printing is switched off in My Contacts."; display: block; padding: 40px; } }
#viewbar { position: sticky; top: 52px; z-index: 5; background: var(--warn-bg); color: var(--warn); padding: 6px 16px; font-size: 14px; }
#viewbar select { width: auto; min-height: 36px; padding: 4px 8px; margin-left: 6px; }

#wm span { font-size: 13px; }
.hello h1 { margin-bottom: 0; }
.hello .line { margin: 2px 0 4px; color: var(--brand); font-style: italic; }
.bigbtn { display: flex; flex-direction: column; gap: 2px; background: var(--head); color: #fff; text-decoration: none; border-radius: 14px; padding: 14px 16px; font-size: 19px; font-weight: 800; margin: 10px 0; border-left: 6px solid var(--gold); }
.bigbtn span { font-size: 13px; font-weight: 400; opacity: .85; }
.stats .stat { text-decoration: none; color: var(--ink); border-radius: 10px; padding: 6px; display: block; }
a.stat:active { background: var(--soft); }
.rchip { font-size: 11px; border: 1px solid var(--line); border-radius: 10px; padding: 0 6px; margin-left: 4px; color: var(--muted); white-space: nowrap; }
.prow .r2 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prow .r1 b { white-space: nowrap; }
.callcard { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px; margin: 10px 0; }
.callcard .r1 { display: flex; justify-content: space-between; gap: 8px; font-size: 19px; }
.callcard .why { margin: 6px 0; font-size: 16px; }
.callbig { display: block; text-align: center; background: var(--brand); color: var(--brand-ink); font-size: 22px; font-weight: 800; padding: 18px; border-radius: 14px; text-decoration: none; margin: 14px 0; }
.tri { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 8px; }
.tri button { min-height: 54px; font-weight: 700; }
.stack { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.kinds .chip.on, .seg .chip.on { background: var(--brand); color: var(--brand-ink); }
.phbtns { display: flex; gap: 6px; align-items: center; }
.wrongph .num { text-decoration: line-through; color: var(--muted); }
details.addc { margin-top: 8px; } details.addc summary { cursor: pointer; color: var(--brand); padding: 6px 0; min-height: 36px; }
.login-brand { display: flex; gap: 12px; align-items: center; }
.login-brand img { border-radius: 14px; }
.login-brand h1 { letter-spacing: 2px; margin: 0; }
.login-prabha { display: block; margin: 16px auto 0; height: 48px; width: auto; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .login-prabha { background: #fff; border-radius: 8px; padding: 4px; } }
