/* aiyo! app (v023: welcome; v022: accounts, team screens, desktop layout). Opens from the home screen. Two looks: Night (default) and Paper. */

@font-face { font-family: "Gemunu"; src: url(../fonts/gemunu-sinhala-app.woff2) format("woff2"); font-weight: 200 800; font-display: swap;
  unicode-range: U+0964-0965, U+0D81-0DF4, U+1CF2, U+200C-200D, U+25CC, U+111E1-111F4; }
@font-face { font-family: "Gemunu"; src: url(../fonts/gemunu-libre-latin-wght-normal.woff2) format("woff2"); font-weight: 200 800; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Gemunu"; src: url(../fonts/gemunu-libre-latin-ext-wght-normal.woff2) format("woff2"); font-weight: 200 800; font-display: swap;
  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: "Anek"; src: url(../fonts/anek-latin-trim.woff2) format("woff2"); font-weight: 400 800; font-stretch: 100% 105%; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Anek"; src: url(../fonts/anek-latin-ext-trim.woff2) format("woff2"); font-weight: 400 800; font-stretch: 100% 105%; font-display: swap;
  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: "Anek Tamil"; src: url(../fonts/anek-tamil-app.woff2) format("woff2"); font-weight: 400 800; font-stretch: 80% 100%; font-display: swap;
  unicode-range: U+0964-0965, U+0B82-0BFA, U+200C-200D, U+20B9, U+25CC; }

/* ---------- looks ---------- */
:root, [data-theme="night"] {
  color-scheme: dark;
  --bg: #141012; --surface: #1f191b; --surface-2: #2a2224; --line: #2e2628; --line-2: #3a3133; --dash: #4a3f41;
  --text: #F3EBDD; --muted: #b9ac98; --faint: #8a7d6c;
  --accent: #FFAE2B; --accent-ink: #141012; --accent-text: #FFAE2B; --accent-glow: rgba(255, 174, 43, .32);
  --card: #F3EBDD; --card-ink: #141012; --card-tile: #e9dfcd; --card-muted: #5f5448; --card-line: #d9ccb4;
  --red: #ff7a7f; --red-bg: rgba(200, 51, 58, .16); --green: #3FB950; --green-bg: rgba(63, 185, 80, .14);
  --tab: #1b1617; --shadow: 0 10px 30px rgba(0, 0, 0, .35);
}
[data-theme="paper"] {
  color-scheme: light;
  --bg: #F6F0E4; --surface: #FFFFFF; --surface-2: #efe7d8; --line: #e8dfcf; --line-2: #ddd2bf; --dash: #c9bba3;
  --text: #141012; --muted: #5f5448; --faint: #7a6e60;
  --accent: #FFAE2B; --accent-ink: #141012; --accent-text: #8a5300; --accent-glow: rgba(199, 122, 0, .22);
  --card: #141012; --card-ink: #F3EBDD; --card-tile: #2a2224; --card-muted: #cdbfaa; --card-line: #3a3133;
  --red: #B0262D; --red-bg: #FDEBEC; --green: #1E7B35; --green-bg: #E3F2E6;
  --tab: #FFFFFF; --shadow: 0 10px 30px rgba(60, 40, 10, .12);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0; min-height: 100dvh; background: var(--bg); color: var(--text);
  font: 500 16px/1.45 "Anek", "Gemunu", "Anek Tamil", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-tap-highlight-color: transparent; overscroll-behavior-y: none;
}
html[lang="si"] body { font-family: "Anek", "Noto Sans Sinhala", "Iskoola Pota", "Gemunu", system-ui, sans-serif; }
html[lang="ta"] body { font-family: "Anek", "Anek Tamil", "Noto Sans Tamil", system-ui, sans-serif; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent-text); }
img { max-width: 100%; display: block; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
[tabindex="-1"]:focus { outline: none; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }
.h { font-family: "Gemunu", "Anek Tamil", system-ui, sans-serif; font-weight: 800; line-height: 1.02; letter-spacing: -.005em; margin: 0; }
html[lang="ta"] .h { font-family: "Anek Tamil", system-ui, sans-serif; font-stretch: 85%; line-height: 1.15; }
.muted { color: var(--muted); }
svg { flex: none; }

/* ---------- frame ---------- */
.app { max-width: 560px; margin: 0 auto; min-height: 100dvh; position: relative; }
.view {
  display: flex; flex-direction: column; gap: 20px;
  padding: calc(14px + env(safe-area-inset-top)) 18px calc(118px + env(safe-area-inset-bottom));
}
.view.no-tabs { padding-bottom: calc(112px + env(safe-area-inset-bottom)); }
.view.enter { animation: rise .26s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }

.top { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 48px; }
.word { font-family: "Gemunu", sans-serif; font-weight: 800; font-size: 34px; line-height: 1; letter-spacing: -.01em; }
.word b { color: var(--accent); }
.top-actions { display: flex; gap: 8px; }
.icon-btn {
  width: 44px; height: 44px; border-radius: 22px; border: 1px solid var(--line-2); background: var(--surface);
  color: var(--text); display: inline-flex; align-items: center; justify-content: center; padding: 0; text-decoration: none;
}
.icon-btn:active { transform: scale(.95); }
.bar { display: flex; align-items: center; gap: 10px; min-height: 48px; }
.bar-title { flex: 1; font-weight: 700; font-size: 16px; }
.bar-note { font-size: 14px; color: var(--muted); }
.page-title { font-size: 32px; }
.lede { margin: -10px 0 0; color: var(--muted); font-size: 15px; }

/* ---------- tab bar ---------- */
.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  background: var(--tab); border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.tabs-in { max-width: 560px; margin: 0 auto; height: 76px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: center; }
.tab {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 0;
  color: var(--muted); font-size: 11.5px; font-weight: 600; text-decoration: none; line-height: 1.1; text-align: center;
}
.tab[aria-current="page"] { color: var(--accent-text); font-weight: 800; }
.fab {
  justify-self: center; width: 64px; height: 64px; margin-top: -30px; border-radius: 32px; background: var(--accent);
  display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 24px var(--accent-glow); text-decoration: none;
  border: 4px solid var(--tab);
}
.fab:active { transform: scale(.95); }
.bang { width: 30px; height: 30px; }

/* ---------- cards ---------- */
.hero { background: var(--card); color: var(--card-ink); border-radius: 22px; padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.hero .h { font-size: 29px; }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tile {
  min-height: 76px; border-radius: 14px; border: 0; background: var(--card-tile); color: var(--card-ink);
  font-weight: 600; font-size: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 8px 4px;
  text-align: center; line-height: 1.1;
}
.tile.is-other { background: var(--accent); color: var(--accent-ink); font-weight: 700; }
.tile:active { transform: scale(.97); }

.sec { display: flex; flex-direction: column; gap: 10px; }
.sec-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.sec-head .h { font-size: 23px; }
.sec-head a, .linkish { font-size: 14px; font-weight: 700; color: var(--accent-text); text-decoration: none; background: none; border: 0; padding: 0 6px;
  min-height: 44px; min-width: 44px; display: inline-flex; align-items: center; justify-content: center; }  /* v024: big enough to tap */

.row {
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 14px 16px;
  display: flex; align-items: center; gap: 14px; color: var(--text); text-decoration: none; width: 100%; text-align: left;
}
.row-ico { width: 50px; height: 50px; border-radius: 14px; background: var(--surface-2); display: flex; align-items: center; justify-content: center; color: var(--accent-text); }
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.row-title { font-weight: 700; font-size: 16px; line-height: 1.25; }
.row-sub { font-size: 13px; color: var(--muted); }
.chev { color: var(--faint); }

.stamp {
  display: inline-block; padding: 5px 9px; border-radius: 9px; border: 2px solid currentColor; color: var(--accent-text);
  font: 800 13px/1 "Gemunu", sans-serif; letter-spacing: .05em; text-transform: uppercase; transform: rotate(-3deg); white-space: nowrap;
}
.stamp.is-green { color: var(--green); }
.stamp.is-red { color: var(--red); }
.stamp.on-card { color: #C8333A; }
.stamp.on-card.is-green { color: #1E7B35; }
[data-theme="paper"] .stamp.on-card { color: #ff8a8f; }
[data-theme="paper"] .stamp.on-card.is-green { color: #59d16b; }

.note { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; font-size: 14.5px; color: var(--muted); }
.note b { color: var(--text); }
.note.is-warn { border-color: var(--red); color: var(--text); background: var(--red-bg); }
.note.is-ok { border-color: var(--green); color: var(--text); background: var(--green-bg); }
.offline-pill { align-self: flex-start; font-size: 13px; font-weight: 700; padding: 6px 12px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line-2); color: var(--muted); }

/* ---------- buttons ---------- */
.btn {
  min-height: 54px; padding: 0 22px; border-radius: 28px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text);
  font-weight: 700; font-size: 16px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; text-align: center;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; font: 800 20px/1 "Gemunu", "Anek Tamil", sans-serif; }
html[lang="ta"] .btn-primary { font: 700 16px/1.1 "Anek Tamil", sans-serif; }
.btn-primary:disabled { opacity: .45; }
.btn-ink { background: var(--text); color: var(--bg); border-color: transparent; }
.btn-block { width: 100%; }
.btn:active:not(:disabled) { transform: scale(.98); }
.btn-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: linear-gradient(transparent, var(--bg) 26%);
  padding: 22px 18px calc(16px + env(safe-area-inset-bottom));
}
.dock-in { max-width: 524px; margin: 0 auto; display: flex; gap: 10px; }
.dock-in .btn-primary { flex: 1; }

/* ---------- report flow ---------- */
.progress { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-top: -8px; }
.progress i { height: 5px; border-radius: 3px; background: var(--line-2); }
.progress i.on { background: var(--accent); }
.q { font-size: 34px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.label { font-weight: 700; font-size: 15px; }
.label span { font-weight: 500; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 44px; padding: 0 16px; border-radius: 22px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text);
  font-weight: 600; font-size: 15px; display: inline-flex; align-items: center; gap: 8px;
}
.chip[aria-pressed="true"] { background: var(--accent); border-color: transparent; color: var(--accent-ink); font-weight: 700; }
.choice-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.choice {
  min-height: 84px; border-radius: 16px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; font-weight: 600; font-size: 14px; padding: 8px 4px; text-align: center;
}
.choice[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: transparent; font-weight: 800; }
.seg4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
html[lang="ta"] .seg4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.seg4 .chip { justify-content: center; padding: 0 6px; border-radius: 12px; font-size: 14px; text-align: center; line-height: 1.1; }
.input, .textarea, .select {
  width: 100%; border-radius: 16px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text);
  padding: 14px; font-size: 16px; outline: none;
}
.input { min-height: 54px; }
.textarea { resize: none; min-height: 132px; line-height: 1.45; }
.input:focus, .textarea:focus, .select:focus { border-color: var(--accent); }
.input::placeholder, .textarea::placeholder { color: var(--faint); }
.select { min-height: 54px; appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 22px) 24px, calc(100% - 16px) 24px; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 40px; }
.hint { font-size: 13.5px; color: var(--muted); margin: 0; }
.err { font-size: 14.5px; font-weight: 600; color: var(--red); margin: 0; }

.shots { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.shot { position: relative; width: 96px; height: 96px; border-radius: 16px; background: var(--surface-2); flex: none; overflow: hidden;
  display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 11px; text-align: center; padding: 6px; }
.shot img, .shot video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.shot-x { position: absolute; top: 5px; right: 5px; width: 30px; height: 30px; border-radius: 15px; border: 0; background: rgba(20, 16, 18, .78); color: #F3EBDD;
  display: flex; align-items: center; justify-content: center; padding: 0; }
.shot-add { border: 2px dashed var(--dash); background: transparent; color: var(--muted); flex-direction: column; gap: 4px; font-weight: 600; font-size: 12px; cursor: pointer; }
.voice { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.voice audio { width: 100%; height: 40px; }
.rec-dot { width: 12px; height: 12px; border-radius: 6px; background: var(--red); animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .3; } }
.check { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--line-2); background: var(--surface); font-weight: 600; }
.check input { width: 24px; height: 24px; accent-color: var(--accent); margin: 0; flex: none; }
.summary { background: var(--card); color: var(--card-ink); border-radius: 20px; padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.summary dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 15px; }
.summary dt { color: var(--card-muted); font-weight: 600; }
.summary dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.ts { min-height: 70px; }

.done { align-items: center; text-align: center; padding-top: calc(60px + env(safe-area-inset-top)); }
.done .stamp { font-size: 46px; padding: 10px 22px; border-width: 4px; border-radius: 16px; }
.done .h { font-size: 34px; }
.done .btn-col { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.ref { font: 800 30px/1 "Gemunu", sans-serif; letter-spacing: .12em; color: var(--accent-text); }

/* ---------- guides ---------- */
.search { display: flex; align-items: center; gap: 10px; min-height: 54px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line-2); padding: 0 14px; }
.search input { flex: 1; border: 0; background: transparent; outline: none; font-size: 16px; min-width: 0; padding: 14px 0; }
.search:focus-within { border-color: var(--accent); }
.hscroll { display: flex; gap: 8px; overflow-x: auto; margin: 0 -18px; padding: 0 18px 2px; scrollbar-width: none; }
.hscroll::-webkit-scrollbar, .shots::-webkit-scrollbar { display: none; }
.hscroll .chip { flex: none; }
.gcards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.gcard {
  background: var(--card); color: var(--card-ink); border-radius: 18px; padding: 14px; min-height: 150px; text-decoration: none;
  display: flex; flex-direction: column; justify-content: space-between; gap: 14px;
}
.gcard .stamp { align-self: flex-start; color: #6a3fb0; font-size: 12px; }
[data-theme="paper"] .gcard .stamp { color: #c3a6ff; }
.gcard b { font-size: 16px; line-height: 1.2; }
.gcard small { font-size: 12.5px; color: var(--card-muted); }
.glist { display: flex; flex-direction: column; gap: 8px; }
.grow { padding: 12px 14px; }
.code { width: 54px; min-height: 44px; border-radius: 12px; background: var(--surface-2); color: var(--accent-text); display: flex; align-items: center; justify-content: center;
  font: 800 11px/1.05 "Anek", sans-serif; text-align: center; padding: 4px; overflow-wrap: anywhere; letter-spacing: .02em; }
.badge { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: var(--surface-2); color: var(--muted); margin-left: 4px; vertical-align: 2px; }
.empty { text-align: center; padding: 30px 10px; color: var(--muted); display: flex; flex-direction: column; gap: 14px; align-items: center; }
.empty .h { font-size: 26px; color: var(--text); }
.empty p { margin: 0; max-width: 32ch; }

.gd-head { display: flex; flex-direction: column; gap: 10px; }
.gd-head .h { font-size: 32px; }
.gd-office { font-size: 14px; color: var(--muted); font-weight: 600; }
.gd-state { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--muted); }
.gd-state i { width: 10px; height: 10px; border-radius: 5px; background: var(--accent); margin-top: 6px; flex: none; }
.gd-state.is-hold i { background: var(--red); }
.box { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.box h2 { margin: 0; font-size: 18px; font-weight: 800; }
.box ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.box.is-warn { border-color: var(--red); }
.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; display: flex; flex-direction: column; gap: 14px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 34px 1fr; gap: 12px; }
.steps li::before { content: counter(s); width: 34px; height: 34px; border-radius: 17px; background: var(--accent); color: var(--accent-ink); font: 800 17px/34px "Gemunu", sans-serif; text-align: center; }
.steps p { margin: 4px 0 4px; }
.src { font-size: 13px; color: var(--accent-text); font-weight: 600; text-decoration: none; }
.srcs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.srcs a { font-weight: 600; }
.srcs small { display: block; color: var(--muted); font-size: 12.5px; }

/* ---------- mine ---------- */
.seg { display: inline-flex; gap: 6px; padding: 4px; border-radius: 24px; background: var(--surface); border: 1px solid var(--line); align-self: flex-start; }
.seg button { min-height: 40px; padding: 0 16px; border-radius: 20px; border: 0; background: transparent; color: var(--muted); font-weight: 700; font-size: 14px; }
.seg button[aria-pressed="true"] { background: var(--text); color: var(--bg); }
.track { background: var(--card); color: var(--card-ink); border-radius: 22px; padding: 18px; display: flex; flex-direction: column; gap: 16px; }
.track-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.track-top .h { font-size: 24px; }
.track-top small { color: var(--card-muted); font-size: 13px; display: block; margin-top: 4px; }
.tl { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.tl li { display: grid; grid-template-columns: 22px 1fr; gap: 12px; position: relative; padding-bottom: 14px; font-size: 15px; }
.tl li:last-child { padding-bottom: 0; }
.tl li::before { content: ""; width: 14px; height: 14px; border-radius: 7px; border: 2px solid var(--card-muted); margin-top: 4px; background: var(--card); z-index: 1; }
.tl li::after { content: ""; position: absolute; left: 7px; top: 18px; bottom: -2px; width: 2px; background: var(--card-line); }
.tl li:last-child::after { display: none; }
.tl li.on::before { background: #1E7B35; border-color: #1E7B35; }
.tl li.on::after { background: #1E7B35; }
[data-theme="paper"] .tl li.on::before { background: #3FB950; border-color: #3FB950; }
[data-theme="paper"] .tl li.on::after { background: #3FB950; }
.tl b { display: block; }
.tl small { color: var(--card-muted); font-size: 13px; }
.tl li:not(.on) b { font-weight: 600; color: var(--card-muted); }
.track .note { background: var(--card-tile); border-color: transparent; color: var(--card-ink); }
.track .btn { min-height: 48px; font-size: 15px; }
.track .btn-line { background: transparent; color: var(--card-ink); border-color: var(--card-ink); }
.pill { font-size: 12px; font-weight: 800; padding: 4px 9px; border-radius: 8px; white-space: nowrap; }
.pill.is-sent { background: var(--surface-2); color: var(--accent-text); }
.pill.is-fixed { background: var(--green-bg); color: var(--green); }

/* ---------- near me ---------- */
.map-card { position: relative; border-radius: 22px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); min-height: 210px;
  display: flex; align-items: center; justify-content: center; }
.map-card svg.isle { width: 46%; height: auto; color: var(--line-2); }
.map-card .pin { position: absolute; width: 18px; height: 18px; border-radius: 9px; background: var(--accent); box-shadow: 0 0 0 6px var(--accent-glow); }
.socials { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.socials a { min-height: 48px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text); text-decoration: none; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; }

/* ---------- profile ---------- */
.me-card { display: flex; gap: 14px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 16px; }
.avatar { width: 64px; height: 64px; border-radius: 32px; background: #141012 url(app-icon-192.png) center/cover; flex: none; border: 2px solid var(--line-2); }
.me-card .h { font-size: 24px; }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; }
.stat b { display: block; font: 800 28px/1 "Gemunu", sans-serif; }
.stat span { font-size: 13px; color: var(--muted); }
.group { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.group-title { font-size: 12.5px; font-weight: 800; letter-spacing: .07em; color: var(--muted); text-transform: uppercase; margin: 6px 4px -6px; }
.item { display: flex; align-items: center; gap: 14px; min-height: 58px; padding: 0 16px; color: var(--text); text-decoration: none; border: 0; background: transparent; width: 100%; text-align: left; font-size: 16px; font-weight: 600; }
.item + .item { border-top: 1px solid var(--line); }
.item .grow-1 { flex: 1; }
.item small { color: var(--muted); font-weight: 500; font-size: 13px; }
.item.is-danger { color: var(--red); }
.opts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding: 6px; }
.opts button { min-height: 48px; border-radius: 13px; border: 0; background: transparent; color: var(--text); font-weight: 700; font-size: 15px; }
.opts button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.ver { text-align: center; font-size: 12.5px; color: var(--faint); }

/* ---------- install page ---------- */
.inst { align-items: stretch; padding-top: calc(36px + env(safe-area-inset-top)); }
.inst-icon { width: 112px; height: 112px; border-radius: 26px; box-shadow: var(--shadow); align-self: center; border: 1px solid var(--line-2); }
.inst .h { font-size: 38px; text-align: center; }
.inst-lede { text-align: center; color: var(--muted); margin: -6px auto 0; max-width: 32ch; }
.how { list-style: none; margin: 0; padding: 0; counter-reset: s; display: flex; flex-direction: column; gap: 10px; }
.how li { counter-increment: s; display: flex; gap: 14px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; }
.how li::before { content: counter(s); width: 32px; height: 32px; border-radius: 16px; background: var(--accent); color: var(--accent-ink); font: 800 17px/32px "Gemunu", sans-serif; text-align: center; flex: none; }
.how svg { color: var(--accent-text); }
.perks { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.perks li { display: flex; gap: 10px; align-items: center; font-size: 15px; }
.perks svg { color: var(--green); }

/* ---------- sheet / toast ---------- */
.scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, .55); z-index: 40; display: flex; align-items: flex-end; justify-content: center; }
.sheet { width: 100%; max-width: 560px; background: var(--bg); border-radius: 24px 24px 0 0; padding: 22px 18px calc(18px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 14px; animation: up .22s ease-out; border-top: 1px solid var(--line-2); }
.sheet .h { font-size: 26px; }
.sheet p { margin: 0; color: var(--muted); }
@keyframes up { from { transform: translateY(30px); opacity: 0; } }
.toast { position: fixed; left: 50%; bottom: calc(100px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 50; background: var(--text); color: var(--bg);
  padding: 12px 18px; border-radius: 14px; font-weight: 700; font-size: 15px; box-shadow: var(--shadow); width: max-content; max-width: calc(100vw - 36px); animation: up .2s ease-out; }


/* ---------- v022: account, team, status pills ---------- */
.side-brand, .fab-label, .side-only { display: none; }
.home-cols, .home-cols .col, .pane-list, .pane-detail { display: flex; flex-direction: column; gap: 20px; }
.pane-list { gap: 12px; }
.row.is-sel { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.pill.is-off { background: var(--red-bg); color: var(--red); }
.signin-card { display: flex; flex-direction: column; gap: 16px; }
.signin-card .h { font-size: 32px; }
.code-input { font: 800 30px/1 "Gemunu", sans-serif; letter-spacing: .4em; text-align: center; }
.btn-google { background: #fff; color: #1f1f1f; border-color: #dadce0; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 14px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }
.tm-detail { gap: 14px; }
.tm-facts { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 15px; }
.tm-facts dt { color: var(--muted); font-weight: 600; }
.tm-facts dd { margin: 0; overflow-wrap: anywhere; }
.tm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.tm-media { display: block; width: 100%; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--surface-2); object-fit: cover; }
.tm-media img { width: 100%; height: 100%; object-fit: cover; }
.tm-hist { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }

/* ---------- v022: desktop layout (the same app, wider: sidebar instead of the bottom bar) ---------- */
@media (min-width: 900px) {
  .app { max-width: none; border: 0; }
  .app.has-side { padding-left: 252px; }
  .view { max-width: 1080px; margin: 0 auto; padding: 30px 40px 64px; gap: 24px; }
  .view.no-tabs { max-width: 640px; padding-bottom: 130px; }
  .view.signin { padding-top: 48px; }
  .tabs { top: 0; bottom: 0; right: auto; width: 252px; border-top: 0; border-right: 1px solid var(--line); padding: 0; overflow-y: auto; }
  .tabs-in { height: 100%; max-width: none; display: flex; flex-direction: column; align-items: stretch; gap: 4px; padding: 26px 16px 20px; }
  .side-brand { display: block; font: 800 40px/1 "Gemunu", sans-serif; color: var(--text); text-decoration: none; padding: 2px 12px 24px; }
  .side-brand b { color: var(--accent); }
  .tab { flex-direction: row; justify-content: flex-start; gap: 14px; padding: 12px 14px; border-radius: 14px; font-size: 16px; text-align: left; }
  .tab:hover { background: var(--surface); color: var(--text); }
  .tab[aria-current="page"] { background: var(--surface); }
  .fab { order: -1; justify-self: auto; width: auto; height: 54px; margin: 0 0 16px; border: 0; border-radius: 27px; gap: 10px; padding: 0 18px;
    color: var(--accent-ink); font: 800 19px/1 "Gemunu", "Anek Tamil", sans-serif; text-decoration: none; }
  .fab .bang { width: 24px; height: 24px; }
  .fab-label { display: inline; }
  .side-brand { order: -2; }
  .side-only { display: flex; }
  .side-me { margin-top: auto; }
  .side-me-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
  .has-side .top .word { visibility: hidden; }
  .page-title { font-size: 40px; }
  .home-cols { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 28px; align-items: start; }
  .hero .h { font-size: 36px; }
  .tile { min-height: 96px; font-size: 15px; }
  .gcards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .glist.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .split { display: grid; grid-template-columns: minmax(300px, 400px) minmax(0, 1fr); gap: 24px; align-items: start; }
  .pane-detail { position: sticky; top: 24px; max-height: calc(100vh - 48px); overflow-y: auto; }
  .row:hover { border-color: var(--line-2); }
  .dock-in { max-width: 604px; }
  .toast { bottom: 32px; }
  .map-card svg { max-height: 460px !important; width: 40% !important; }
  .q { font-size: 40px; }
}


/* ---------- v024: install suggestion on Home ---------- */
.inst-card { display: flex; gap: 14px; align-items: center; background: var(--surface); border: 1px solid var(--accent); border-radius: 18px; padding: 12px 8px 12px 14px; }
.inst-card img { width: 48px; height: 48px; border-radius: 12px; flex: none; }
.inst-card .row-main { flex: 1; }

/* ---------- v023: first-run welcome ---------- */
.welcome { min-height: 100dvh; padding-bottom: calc(24px + env(safe-area-inset-bottom)); gap: 18px; touch-action: pan-y; user-select: none; }
.w-top { display: flex; justify-content: space-between; align-items: center; min-height: 48px; }
.w-lang { padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; grid-template-columns: repeat(3, auto); }
.w-lang button { min-height: 38px; padding: 0 14px; font-size: 14px; }
.w-art { flex: 1; min-height: 210px; display: flex; align-items: center; justify-content: center; gap: 14px; position: relative; }
.w-art-1 .bang { width: 150px; height: 150px; padding: 22px; border-radius: 40px; background: var(--accent); box-shadow: 0 24px 60px var(--accent-glow); transform: rotate(-4deg); }
.w-art-2 { flex-direction: column; }
.w-art-2 .stamp { font-size: 40px; padding: 10px 22px; border-width: 4px; border-radius: 14px; }
.w-art-2 .stamp.is-green { transform: rotate(5deg); margin-left: 60px; }
.w-art-3 { gap: 10px; }
.w-card { width: 104px; height: 140px; border-radius: 18px; background: var(--card); color: var(--card-ink); padding: 12px; display: flex; flex-direction: column; justify-content: space-between; box-shadow: var(--shadow); }
.w-card:nth-child(1) { transform: rotate(-6deg) translateY(8px); } .w-card:nth-child(3) { transform: rotate(6deg) translateY(8px); }
.w-card .stamp { color: #6a3fb0; font-size: 12px; align-self: flex-start; }
[data-theme="paper"] .w-card .stamp { color: #c3a6ff; }
.w-card b { font-size: 17px; }
.w-art-4 .avatar { width: 150px; height: 150px; border-radius: 75px; border-width: 4px; box-shadow: 0 24px 60px var(--accent-glow); }
.w-text { display: flex; flex-direction: column; gap: 10px; text-align: center; }
.w-text .h { font-size: 36px; }
.w-text p { margin: 0 auto; color: var(--muted); font-size: 17px; max-width: 34ch; }
.w-word { font-size: 46px; }
.w-dots { display: flex; justify-content: center; gap: 8px; }
.w-dots i { width: 8px; height: 8px; border-radius: 4px; background: var(--line-2); transition: width .2s; }
.w-dots i.on { width: 26px; background: var(--accent); }
.w-actions { display: flex; flex-direction: column; gap: 10px; }
@media (min-width: 900px) { .welcome { min-height: auto; padding-top: 56px; } .w-art { min-height: 260px; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media (min-width: 700px) {
  .app { border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
}
