/* AWA look: the same paper, maroon and gold as awabihari.com. One file for the member area, the panel and the camera page. */
@font-face { font-family: Archivo; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/ui/fonts/archivo-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Archivo; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/ui/fonts/archivo-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Noto Sans Devanagari'; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/ui/fonts/noto-sans-devanagari.woff2) format('woff2');
  unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+25CC, U+A830-A839, U+A8E0-A8FF; }

:root {
  --ink: #23201c; --ink-75: rgba(35,32,28,.75); --ink-60: rgba(35,32,28,.6); --line: rgba(35,32,28,.14); --line-2: rgba(35,32,28,.18);
  --page: #ebe7df; --paper: #faf7f0; --card: #fff; --cream: #fffdf8; --sand: #f6f1e7; --bar: #f3eee3;
  --maroon: #7e1013; --maroon-2: #9c1418; --maroon-tint: #f6e7e3; --field-line: #9c14182e;
  --green: #2f6b3a; --green-tint: #e6efe0; --green-dark: #1f4d2a;
  --blue: #1e3a70; --blue-tint: #e3eaf7;
  --gold: #8a6320; --gold-tint: #f5ead0; --gold-bright: #e9c87f; --gold-line: #b98a3d55;
  --error: #b3261e; --idle: #5f584d;
  --shadow: 0 8px 20px -16px rgba(35,32,28,.5);
  --ease: cubic-bezier(.2,.7,.2,1);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--page); color: var(--ink); font-family: Archivo, 'Noto Sans Devanagari', system-ui, sans-serif; font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--maroon); text-underline-offset: 2px; }
a:hover { color: var(--maroon-2); }
:focus-visible { outline: 2px solid var(--maroon); outline-offset: 2px; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
@keyframes awa-in { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes awa-up { from { transform: translateY(100%); } to { transform: none; } }
@keyframes awa-spin { to { transform: rotate(360deg); } }
@keyframes awa-pulse { 50% { opacity: .35; } }
@keyframes awa-shine { from { background-position: 200% 0, 0 0; } to { background-position: -200% 0, 0 0; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* the phone column */
.app { position: relative; max-width: 480px; min-height: 100vh; min-height: 100dvh; margin: 0 auto; background: var(--paper); box-shadow: 0 0 0 1px var(--line), 0 30px 80px -40px rgba(35,32,28,.45); display: flex; flex-direction: column; }
.app.wide { max-width: 760px; }
.top { position: sticky; top: 0; z-index: 6; display: flex; align-items: center; gap: 10px; height: calc(60px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 12px 0 16px; border-bottom: 1px solid var(--gold-line); box-shadow: 0 1px 0 #fff inset;
  background-image: linear-gradient(100deg, transparent 30%, #e9c87f33 48%, #e9c87f55 50%, #e9c87f33 52%, transparent 70%), linear-gradient(180deg, #fffdf8, #f6f1e7); background-size: 200% 100%, 100% 100%; animation: awa-shine 8s linear infinite; }
.top img.logo { width: 44px; height: 32px; object-fit: contain; flex: none; }
.top .who { flex: 1; min-width: 0; line-height: 1.2; }
.top .who b { display: block; font-size: 14px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top .who span { display: block; font-size: 12px; font-weight: 700; letter-spacing: .02em; color: var(--gold); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.iconbtn { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; flex: none; border-radius: 999px; border: 0; background: transparent; color: var(--maroon); cursor: pointer; }
.iconbtn:hover { background: var(--maroon-tint); }
.iconbtn.ring { border: 1px solid var(--line-2); background: #fff; color: var(--ink); }
.langbtn { height: 34px; min-width: 44px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line-2); background: #fff; font-size: 13px; font-weight: 800; cursor: pointer; }
.main { flex: 1; padding: 16px 16px calc(96px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 14px; }
.main.nonav { padding-bottom: calc(28px + env(safe-area-inset-bottom)); }
.main > * { animation: awa-in .45s var(--ease) both; }
.main > *:nth-child(2) { animation-delay: 50ms; } .main > *:nth-child(3) { animation-delay: 100ms; } .main > *:nth-child(4) { animation-delay: 150ms; }
.tile { background-image: url(/ui/icons/brand-tile.png); background-size: 150px; }

/* type */
.h1 { font-size: 22px; font-weight: 800; letter-spacing: -.015em; line-height: 1.2; }
.h2 { font-size: 16px; font-weight: 800; line-height: 1.25; }
.eyebrow { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); }
.sub { font-size: 13px; color: var(--ink-75); }
.tiny { font-size: 12px; color: var(--ink-60); }
.num { font-variant-numeric: tabular-nums; }
.big { font-size: 34px; font-weight: 800; letter-spacing: -.02em; line-height: 1; font-variant-numeric: tabular-nums; }
.bold { font-weight: 800; }
.center { text-align: center; }
.maroon { color: var(--maroon); } .green { color: var(--green); } .gold { color: var(--gold); } .errc { color: var(--error); }

/* layout helpers */
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack.tight { gap: 6px; }
.rowx { display: flex; align-items: center; gap: 10px; }
.rowx.top0 { align-items: flex-start; }
.rowx.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.spread { justify-content: space-between; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid2 > * { min-width: 0; } /* a field in a narrow column shrinks with it instead of running out of the sheet */
.clip1 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* card */
.card { border-radius: 14px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); padding: 16px; }
.card.flat { box-shadow: none; }
.card.tint-maroon { background: var(--maroon-tint); border-color: #7e101326; }
.card.tint-green { background: var(--green-tint); border-color: #2f6b3a26; }
.card.tint-blue { background: var(--blue-tint); border-color: #1e3a7026; }
.card.tint-gold { background: var(--gold-tint); border-color: #8a632033; }
.prewrap { white-space: pre-wrap; overflow-wrap: anywhere; }
.card.dark { background: var(--green-dark); color: #fffdf8; border-color: transparent; }
.card.dark .sub, .card.dark .tiny { color: rgba(255,253,248,.78); }
.card.dark .eyebrow { color: var(--gold-bright); }
.sep { height: 1px; background: var(--line); border: 0; margin: 2px 0; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 18px; border: 0; border-radius: 12px; background: var(--maroon); color: #fffdf8; font-weight: 700; font-size: 15px; cursor: pointer; text-decoration: none; transition: background .15s, transform .1s; white-space: nowrap; }
.btn:hover { background: var(--maroon-2); color: #fffdf8; }
.btn:active { transform: scale(.98); }
.btn.block { display: flex; width: 100%; }
.btn.ghost { background: #fff; color: var(--ink); border: 1px solid var(--line-2); }
.btn.ghost:hover { background: var(--sand); color: var(--ink); }
.btn.soft { background: var(--maroon-tint); color: var(--maroon); }
.btn.soft:hover { background: #f0d9d3; color: var(--maroon); }
.btn.green { background: var(--green); } .btn.green:hover { background: var(--green-dark); }
.btn.small { height: 38px; padding: 0 14px; font-size: 13px; border-radius: 10px; }
.btn:disabled, .btn[aria-disabled=true] { background: var(--sand); color: var(--ink-60); border: 1px solid var(--line); cursor: default; transform: none; }
.linkbtn { border: 0; background: transparent; padding: 6px 2px; font-weight: 700; font-size: 13px; color: var(--maroon); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.spin { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid currentColor; border-right-color: transparent; animation: awa-spin .7s linear infinite; flex: none; }

/* fields */
.field { display: block; }
.field > .lab { display: block; font-size: 12px; font-weight: 700; margin-bottom: 6px; }
.box { display: flex; align-items: center; height: 50px; border: 1px solid var(--field-line); border-radius: 14px; background: #fff; overflow: hidden; }
.box:focus-within { border-color: var(--maroon); box-shadow: 0 0 0 3px #7e101314; }
.box .pre { padding: 0 0 0 14px; font-size: 16px; color: var(--ink-75); }
.box input, .box select { flex: 1; min-width: 0; height: 100%; padding: 0 14px; border: 0; background: transparent; font-size: 16px; outline: none; font-variant-numeric: tabular-nums; }
.box .pre + input { padding-left: 10px; }
.box select { appearance: none; padding-right: 34px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%237e1013' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center; }
.box .eye { width: 46px; height: 100%; border: 0; background: transparent; color: var(--ink-60); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.hint { display: block; margin-top: 6px; font-size: 12px; color: var(--ink-60); }
.err { display: block; margin-top: 6px; font-size: 12px; font-weight: 600; color: var(--maroon-2); }
.seg { display: flex; padding: 4px; border-radius: 14px; background: var(--bar); border: 1px solid var(--line); }
.seg button { flex: 1; height: 38px; border: 0; border-radius: 10px; background: transparent; font-weight: 700; font-size: 14px; color: var(--idle); cursor: pointer; }
.seg button[aria-selected=true] { background: #fff; color: var(--maroon); box-shadow: 0 1px 3px rgba(35,32,28,.16); }

/* pills, dots */
.pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 800; background: var(--sand); color: var(--idle); white-space: nowrap; }
.pill.maroon { background: var(--maroon-tint); color: var(--maroon); }
.pill.green { background: var(--green-tint); color: var(--green); }
.pill.blue { background: var(--blue-tint); color: var(--blue); }
.pill.gold { background: var(--gold-tint); color: var(--gold); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #b0a898; flex: none; }
.dot.on { background: #2f9d4d; box-shadow: 0 0 0 3px #2f9d4d2e; }
.dot.rec { background: #d92d20; animation: awa-pulse 1s ease-in-out infinite; }

/* bottom bar */
.nav { position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; z-index: 8; width: 100%; max-width: 480px; display: flex; align-items: stretch; padding: 0 4px env(safe-area-inset-bottom); background: var(--bar); border-top: 1px solid var(--line); }
.app.wide .nav { max-width: 760px; }
.nav button { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 7px 2px 5px; border: 0; background: transparent; color: var(--idle); cursor: pointer; font-size: 11px; font-weight: 700; transition: color .2s; position: relative; }
.nav button .pillbg { display: flex; align-items: center; justify-content: center; width: 54px; height: 30px; border-radius: 15px; transition: background .2s; }
.nav button[aria-current=page] { color: var(--maroon); }
.nav button[aria-current=page] .pillbg { background: var(--maroon-tint); }
.nav .count { position: absolute; top: 4px; left: calc(50% + 10px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--maroon); color: #fff; font-size: 11px; font-weight: 800; line-height: 18px; }

/* lists */
.list { display: flex; flex-direction: column; }
.item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.item:first-child { border-top: 0; padding-top: 2px; }
.item:last-child { padding-bottom: 2px; }
.item .amt { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.item .amt.plus { color: var(--green); } .item .amt.minus { color: var(--maroon); }
.badge-ico { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 12px; flex: none; background: var(--maroon-tint); color: var(--maroon); }
.badge-ico.green { background: var(--green-tint); color: var(--green); } .badge-ico.blue { background: var(--blue-tint); color: var(--blue); } .badge-ico.gold { background: var(--gold-tint); color: var(--gold); }
.empty { padding: 26px 16px; text-align: center; color: var(--ink-60); font-size: 14px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 14px; }
.kv dt { color: var(--ink-60); } .kv dd { margin: 0; font-weight: 700; text-align: right; overflow-wrap: anywhere; }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 22px; font-weight: 700; letter-spacing: .12em; padding: 10px 14px; border-radius: 12px; background: var(--sand); border: 1px dashed var(--gold); text-align: center; overflow-wrap: anywhere; user-select: all; }
.code.small { font-size: 13px; letter-spacing: 0; }

/* messages */
.toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 40; width: min(440px, calc(100% - 32px)); display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { padding: 12px 14px; border-radius: 12px; background: var(--ink); color: #fffdf8; font-size: 14px; font-weight: 600; box-shadow: 0 12px 30px -12px rgba(35,32,28,.7); animation: awa-in .25s var(--ease) both; }
.toast.bad { background: var(--error); } .toast.good { background: var(--green-dark); }
.note { display: flex; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--gold-tint); color: #5c4212; font-size: 13px; line-height: 1.45; }
.note.bad { background: #fbe9e7; color: #8c1d18; } .note.good { background: var(--green-tint); color: var(--green-dark); } .note.blue { background: var(--blue-tint); color: var(--blue); }
.note svg { flex: none; margin-top: 1px; }
/* panel: a new project from a planning sheet (upload bar, file box, the seven steps) */
progress { display: block; width: 100%; height: 8px; border: 0; border-radius: 4px; background: var(--sand); accent-color: var(--maroon); }
progress::-webkit-progress-bar { background: var(--sand); border-radius: 4px; }
progress::-webkit-progress-value { background: var(--maroon); border-radius: 4px; }
progress::-moz-progress-bar { background: var(--maroon); border-radius: 4px; }
.box input[type=file] { height: auto; padding: 12px 14px; font-size: 14px; }
.box:has(input[type=file]) { height: auto; min-height: 50px; }
.steps { display: grid; gap: 8px; font-size: 14px; }
.steps > div { display: flex; align-items: center; gap: 10px; }
.steps .done { color: var(--green-dark); } .steps .now { font-weight: 800; } .steps .wait { color: var(--ink-60); }
.steps .spin { width: 16px; height: 16px; } .steps .dot { margin: 0 4px; }
.scrim { position: fixed; inset: 0; z-index: 24; background: rgba(35,32,28,.35); backdrop-filter: blur(2px); animation: awa-in .2s ease-out both; }
.sheet { position: fixed; left: 50%; bottom: 0; z-index: 25; width: 100%; max-width: 480px; max-height: 92dvh; overflow: auto; transform: translateX(-50%); padding: 10px 20px calc(20px + env(safe-area-inset-bottom)); border-radius: 22px 22px 0 0; background: var(--cream); box-shadow: 0 -20px 50px -20px rgba(35,32,28,.5); }
.sheet::before { content: ''; display: block; width: 40px; height: 4px; border-radius: 999px; background: rgba(35,32,28,.2); margin: 0 auto 12px; }
.sheet > .stack { animation: awa-in .28s var(--ease) both; }

/* the player */
.screen { position: relative; border-radius: 14px; overflow: hidden; background: #14110e; aspect-ratio: 16 / 9; box-shadow: var(--shadow); }
.screen video, .screen img.live { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #14110e; }
.screen .tag { position: absolute; top: 10px; left: 10px; display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 999px; background: rgba(20,17,14,.72); color: #fffdf8; font-size: 11px; font-weight: 800; letter-spacing: .06em; }
.screen .tag.live { background: #b3261e; }
.screen .left { position: absolute; top: 10px; right: 10px; height: 24px; padding: 0 9px; border-radius: 999px; background: rgba(20,17,14,.72); color: var(--gold-bright); font-size: 12px; font-weight: 800; line-height: 24px; font-variant-numeric: tabular-nums; }
.screen .stamp { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 10px 7px; background: linear-gradient(180deg, transparent, rgba(20,17,14,.78)); color: #fffdf8; font-size: 11px; font-weight: 700; letter-spacing: .02em; display: flex; justify-content: space-between; gap: 8px; font-variant-numeric: tabular-nums; pointer-events: none; }
.screen .wait { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 16px; text-align: center; color: #fffdf8; font-size: 14px; font-weight: 600; background: rgba(20,17,14,.55); }
.screen .wait .spin { width: 26px; height: 26px; color: var(--gold-bright); }

/* camera rows */
.camrow { display: flex; align-items: center; gap: 12px; }
.thumb { width: 96px; aspect-ratio: 16 / 9; border-radius: 10px; object-fit: cover; background: #14110e; flex: none; border: 1px solid var(--line); }

/* footer mark */
.foot { margin-top: auto; padding: 22px 0 6px; text-align: center; }
.foot a.mark { text-decoration: none; display: inline-block; padding: 8px 4px; }
.foot .mark { font-size: 12px; font-weight: 800; letter-spacing: .22em; text-transform: uppercase; background: linear-gradient(90deg, #2f6b3a, #8a6320 50%, #1e3a70); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

@media (min-width: 520px) { .app { margin: 0 auto; } .screen .stamp { font-size: 12px; } }

/* a list row that is also a button (godown: a material opens its ledger) */
button.item { width: 100%; background: transparent; border-width: 1px 0 0; border-style: solid; border-color: var(--line); text-align: left; cursor: pointer; font: inherit; color: inherit; }
button.item:first-child { border-top-width: 0; }
button.item > svg { color: var(--ink-60); flex: none; }
.sheet .card.flat { padding: 12px; background: var(--card); }

/* a card that is also a button */
button.card { width: 100%; text-align: left; cursor: pointer; font: inherit; color: inherit; }
button.card.dark { color: #fffdf8; }
