/* Roda Rasa — colours taken from the logo */
:root {
  --cream: #FBF8F2;
  --paper: #FFFFFF;
  --ink: #4D423B;
  --ink-soft: #8A7E74;
  --line: #EDE6DA;
  --coral: #EE806F;
  --leaf: #91BD60;
  --shadow: 0 2px 10px rgba(77, 66, 59, .08);
  --bar: rgba(251, 248, 242, .94);
  --me: #FFE3DD;
  --day: rgba(255,255,255,.75);
  --outer: #EFE9DF;
  --doodle: url("assets/doodle-dark.png");
  --grad: linear-gradient(180deg, #FBF8F2 0%, #FDEDE6 55%, #EEF5E4 100%);

  --happy: #C6E694;     --happy-d: #7FAE45;     --happy-l: #EEF7DF;
  --surprised: #9AC8F4; --surprised-d: #4F8FD0; --surprised-l: #E4F0FC;
  --peaceful: #FEE57D;  --peaceful-d: #D4A91E;  --peaceful-l: #FFF6D2;
  --sad: #D3AFEA;       --sad-d: #9A6FBF;       --sad-l: #F2E7F9;
  --angry: #FBA193;     --angry-d: #DD6552;     --angry-l: #FEE6E1;
  --fear: #FDC969;      --fear-d: #DC951F;      --fear-l: #FEF0D3;

  --font: "Nunito", "Quicksand", ui-rounded, "SF Pro Rounded", "Arial Rounded MT Bold", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--outer); }
body { font-family: var(--font); color: var(--ink); font-size: 16px; line-height: 1.45; overscroll-behavior: none; }
button { font-family: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
input, textarea { font-family: inherit; color: var(--ink); }
.hidden { display: none !important; }
b { font-weight: 800; }

#app {
  position: relative; height: 100dvh; max-width: 560px; margin: 0 auto; overflow: hidden; overflow: clip;
  display: flex; flex-direction: column;
  background: var(--doodle) 0 0 / 220px repeat, var(--cream);
  box-shadow: 0 0 40px rgba(0,0,0,.06);
}

/* ---------------- splash */
.splash {
  position: absolute; inset: 0; z-index: 90; background: var(--cream);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  transition: opacity .5s ease;
}
.splash-logo { width: min(62vw, 260px); animation: pop 1s ease both; }
.splash-credit { font-size: 13px; color: var(--ink-soft); animation: fade 1s .5s ease both; }
.splash.out { opacity: 0; pointer-events: none; }
@keyframes pop { from { transform: scale(.85) rotate(-25deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------------- lock */
.lock {
  position: absolute; inset: 0; z-index: 80; background: var(--cream);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 24px;
}
.lock-avatar { width: 84px; }
.lock-title { font-weight: 800; font-size: 19px; }
.lock-dots { display: flex; gap: 14px; }
.lock-dots i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--ink-soft); }
.lock-dots i.on { background: var(--ink); border-color: var(--ink); }
.lock-dots.shake { animation: shake .4s; }
@keyframes shake { 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }
.lock-msg { min-height: 20px; color: var(--angry-d); font-size: 14px; }
.keypad { display: grid; grid-template-columns: repeat(3, 72px); gap: 14px; }
.keypad button {
  width: 72px; height: 72px; border-radius: 50%; background: var(--paper); box-shadow: var(--shadow);
  font-size: 26px; font-weight: 700;
}
.keypad button:active { background: var(--line); }
.keypad .blank { visibility: hidden; }
.link-btn { color: var(--ink-soft); font-size: 14px; text-decoration: underline; padding: 8px; }

/* ---------------- top bar */
.topbar {
  display: flex; align-items: center; gap: 10px; padding: calc(10px + var(--safe-top)) 12px 10px 14px;
  background: var(--bar); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); z-index: 5;
}
.top-avatar { width: 42px; height: 42px; }
.top-text { flex: 1; min-width: 0; }
.top-name { font-weight: 800; font-size: 18px; letter-spacing: .2px; }
.top-status { font-size: 13px; color: var(--ink-soft); }
.icon-btn { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; }
.icon-btn:active { background: var(--line); }
.icon-btn svg { width: 24px; height: 24px; fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------------- chat */
.chat { flex: 1; overflow-y: auto; padding: 14px 12px 8px; display: flex; flex-direction: column; gap: 6px; scroll-behavior: smooth; }
.day { align-self: center; font-size: 12px; color: var(--ink-soft); background: var(--day); padding: 3px 10px; border-radius: 10px; margin: 8px 0 4px; }
.row { display: flex; align-items: flex-end; gap: 8px; max-width: 100%; animation: rise .25s ease both; }
@keyframes rise { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
.row.bot { align-self: flex-start; }
.row.me { align-self: flex-end; flex-direction: row-reverse; }
.row .av { width: 30px; height: 30px; flex: none; }
.row .av.ghost { visibility: hidden; }
.bubble {
  max-width: min(78vw, 400px); padding: 10px 14px; border-radius: 18px; white-space: pre-wrap; word-wrap: break-word;
  box-shadow: var(--shadow);
}
.bot .bubble { background: var(--paper); border-bottom-left-radius: 6px; }
.me .bubble { background: var(--me); border-bottom-right-radius: 6px; }
.me .bubble.f-Happy { background: var(--happy-l); } .me .bubble.f-Surprised { background: var(--surprised-l); }
.me .bubble.f-Peaceful { background: var(--peaceful-l); } .me .bubble.f-Sad { background: var(--sad-l); }
.me .bubble.f-Angry { background: var(--angry-l); } .me .bubble.f-Fear { background: var(--fear-l); }
.me .face-tag { width: 30px; height: 30px; flex: none; }
.bubble.card { padding: 6px; background: var(--paper); }
.bubble.card img { display: block; width: min(74vw, 380px); border-radius: 12px; }
.bubble.card .cap { padding: 8px 8px 4px; }
.typing { display: inline-flex; gap: 4px; padding: 14px 16px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-soft); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; } .typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 60%, 100% { opacity: .25; transform: none; } 30% { opacity: 1; transform: translateY(-3px); } }

.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 0 6px 38px; animation: rise .25s ease both; }
.chip {
  background: var(--paper); border: 1.5px solid var(--line); padding: 9px 14px; border-radius: 20px; font-size: 15px;
  font-weight: 700; display: inline-flex; align-items: center; gap: 8px; box-shadow: var(--shadow); text-align: left;
}
.chip:active { transform: scale(.97); }
.chip img { width: 24px; height: 24px; }
.chip.primary { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.chip.f-Happy { border-color: var(--happy); } .chip.f-Surprised { border-color: var(--surprised); }
.chip.f-Peaceful { border-color: var(--peaceful); } .chip.f-Sad { border-color: var(--sad); }
.chip.f-Angry { border-color: var(--angry); } .chip.f-Fear { border-color: var(--fear); }
.chips.stack { flex-direction: column; align-items: flex-start; }

/* ---------------- composer */
.composer {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px calc(8px + var(--safe-bottom));
  background: var(--bar); border-top: 1px solid var(--line);
}
.wheel-btn { width: 46px; height: 46px; flex: none; border-radius: 50%; background: var(--paper); box-shadow: var(--shadow); display: grid; place-items: center; }
.wheel-btn svg { width: 36px; height: 36px; transition: transform .6s ease; }
.wheel-btn:active svg { transform: rotate(60deg); }
.wheel-btn.pulse { animation: pulse 2s ease infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(238, 128, 111, .45); } 50% { box-shadow: 0 0 0 9px rgba(238, 128, 111, 0); } }
#input {
  flex: 1; min-width: 0; height: 46px; border-radius: 23px; border: 1.5px solid var(--line); background: var(--paper);
  padding: 0 16px; font-size: 16px; outline: none;
}
#input:focus { border-color: var(--coral); }
.send-btn { width: 46px; height: 46px; flex: none; border-radius: 50%; background: var(--coral); display: grid; place-items: center; }
.send-btn svg { width: 22px; height: 22px; fill: #fff; }
.send-btn:disabled { opacity: .4; }

/* ---------------- wheel sheet */
.sheet-back { position: absolute; inset: 0; background: rgba(77, 66, 59, .35); z-index: 20; animation: fade .2s; }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 21; background: var(--cream);
  border-radius: 26px 26px 0 0; padding: 8px 18px calc(18px + var(--safe-bottom)); box-shadow: 0 -6px 30px rgba(0,0,0,.12);
  animation: up .28s cubic-bezier(.2, .9, .3, 1.1); max-height: 88%; overflow-y: auto;
}
@keyframes up { from { transform: translateY(100%); } to { transform: none; } }
.sheet-grip { width: 44px; height: 5px; border-radius: 3px; background: var(--line); margin: 4px auto 10px; }
.sheet h2 { margin: 0; text-align: center; font-size: 22px; }
.sheet .hint { text-align: center; color: var(--ink-soft); font-size: 14px; margin: 2px 0 8px; }
.wheel-svg { display: block; width: min(86vw, 360px); margin: 0 auto; }
.wheel-svg .slice { cursor: pointer; transition: transform .2s ease; transform-origin: 50% 50%; }
.wheel-svg .slice:active { transform: scale(.97); }
.wheel-svg text { font-family: var(--font); font-weight: 800; fill: var(--ink); pointer-events: none; }
.words-head { display: flex; align-items: center; gap: 12px; margin: 4px 0 12px; }
.words-head img { width: 64px; height: 64px; animation: pop .4s ease both; }
.words-head .t { font-size: 22px; font-weight: 800; }
.words-head .s { font-size: 14px; color: var(--ink-soft); }
.words { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.word {
  padding: 14px 10px; border-radius: 16px; font-weight: 800; font-size: 16px; background: var(--paper);
  border: 2px solid var(--line); box-shadow: var(--shadow);
}
.word:active { transform: scale(.97); }
.sheet-back-btn { margin: 14px auto 0; display: block; color: var(--ink-soft); font-weight: 700; padding: 8px 16px; }

/* ---------------- drawer */
.drawer-back { position: absolute; inset: 0; background: rgba(77, 66, 59, .35); z-index: 30; animation: fade .2s; }
.drawer {
  position: absolute; top: 0; bottom: 0; right: 0; width: min(82%, 320px); z-index: 31; background: var(--cream);
  transform: translateX(105%); transition: transform .28s ease; display: flex; flex-direction: column;
  padding-top: var(--safe-top); box-shadow: -6px 0 30px rgba(0,0,0,.12);
}
.drawer.open { transform: none; }
.drawer-head { padding: 22px 22px 10px; text-align: center; }
.drawer-head img { width: 130px; }
#drawerItems { flex: 1; overflow-y: auto; padding: 6px 10px; }
.menu-item { display: block; width: 100%; text-align: left; padding: 14px 14px; border-radius: 14px; font-size: 17px; font-weight: 700; }
.menu-item:active { background: var(--line); }
.drawer-foot { padding: 14px 20px calc(18px + var(--safe-bottom)); font-size: 13px; color: var(--ink-soft); border-top: 1px solid var(--line); }
.drawer-foot button { color: var(--ink); font-weight: 700; font-size: 13px; padding: 4px 0; text-decoration: underline; text-decoration-color: var(--line); }

/* ---------------- pages */
.page { position: absolute; inset: 0; z-index: 40; background: var(--cream); display: flex; flex-direction: column; animation: slide .25s ease; }
@keyframes slide { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }
.page-bar { display: flex; align-items: center; gap: 6px; padding: calc(10px + var(--safe-top)) 10px 10px; border-bottom: 1px solid var(--line); }
.page-title { font-weight: 800; font-size: 19px; }
.page-body { flex: 1; overflow-y: auto; padding: 16px 16px calc(28px + var(--safe-bottom)); }
.page.calm { background: #C9EEF2 url("assets/calm-bg.jpg") center / cover no-repeat; }
.page.calm .page-bar { border-color: transparent; }

.card-box { background: var(--paper); border-radius: 20px; padding: 16px; box-shadow: var(--shadow); margin-bottom: 14px; }
.section-label { font-size: 13px; font-weight: 800; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .6px; margin: 18px 4px 8px; }
.empty { text-align: center; padding: 40px 20px; color: var(--ink-soft); white-space: pre-wrap; }
.empty img { width: 150px; display: block; margin: 0 auto 14px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 18px; border-radius: 16px;
  font-weight: 800; font-size: 16px; background: var(--paper); border: 1.5px solid var(--line); box-shadow: var(--shadow);
}
.btn.primary { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.btn.danger { color: var(--angry-d); }
.btn.block { display: flex; width: 100%; margin-bottom: 10px; }
.btn:active { transform: scale(.98); }
.field { display: block; width: 100%; height: 48px; border-radius: 14px; border: 1.5px solid var(--line); padding: 0 14px; font-size: 16px; background: var(--cream); margin: 6px 0 10px; outline: none; }
.field:focus { border-color: var(--coral); }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.muted { color: var(--ink-soft); font-size: 14px; }

/* history */
.h-day { font-weight: 800; margin: 18px 4px 8px; }
.h-item { display: flex; gap: 12px; background: var(--paper); border-radius: 16px; padding: 12px; box-shadow: var(--shadow); margin-bottom: 8px; border-left: 6px solid var(--line); }
.h-item img { width: 40px; height: 40px; flex: none; }
.h-item .t { font-weight: 800; }
.h-item .n { font-size: 14px; color: var(--ink-soft); white-space: pre-wrap; }

/* week */
.week-bars { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; align-items: end; height: 150px; margin: 6px 0 4px; }
.week-col { display: flex; flex-direction: column-reverse; gap: 3px; height: 100%; }
.week-col i { display: block; height: 18px; border-radius: 6px; }
.week-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; text-align: center; font-size: 12px; color: var(--ink-soft); font-weight: 700; }
.week-days .today { color: var(--ink); }
.stat { display: flex; align-items: center; gap: 12px; padding: 8px 0; }
.stat img { width: 44px; height: 44px; }

/* note to self */
.note-img { width: 100%; border-radius: 18px; box-shadow: var(--shadow); display: block; margin-bottom: 14px; }

/* sos */
.sos-head { text-align: center; padding: 6px 0 14px; }
.sos-head .t { font-size: 22px; font-weight: 800; }
.sos-line {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; background: var(--paper);
  border-radius: 20px; padding: 16px; box-shadow: var(--shadow); margin-bottom: 12px; text-decoration: none; color: inherit;
}
.sos-line .e { font-size: 30px; }
.sos-line .n { font-size: 26px; font-weight: 900; margin-left: auto; color: var(--coral); }
.sos-line .l { font-weight: 800; font-size: 17px; }
.sos-line .d { font-size: 13px; color: var(--ink-soft); }

/* calm */
.calm-tabs { display: flex; gap: 8px; justify-content: center; margin-bottom: 10px; }
.calm-tabs button { padding: 10px 16px; border-radius: 20px; background: rgba(255,255,255,.55); font-weight: 800; }
.calm-tabs button.on { background: var(--paper); box-shadow: var(--shadow); }
.breath-stage { height: 340px; display: grid; place-items: center; position: relative; }
.breath-ring {
  width: 120px; height: 120px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, #fff, rgba(255,255,255,.55));
  box-shadow: 0 0 0 10px rgba(255,255,255,.35), 0 0 60px rgba(255,255,255,.7);
  transition: transform 4s ease-in-out;
}
.breath-ring img { width: 70px; }
.breath-text { text-align: center; font-size: 22px; font-weight: 800; white-space: pre-wrap; min-height: 70px; }
.breath-sub { text-align: center; color: var(--ink-soft); font-weight: 700; margin-top: 4px; }
.ground-card { background: rgba(255,255,255,.85); border-radius: 24px; padding: 24px; text-align: center; box-shadow: var(--shadow); margin: 20px 0; }
.ground-card .big { font-size: 64px; font-weight: 900; line-height: 1; }
.ground-card .em { font-size: 40px; margin: 8px 0; }
.ground-card .tx { font-size: 18px; white-space: pre-wrap; }
.ground-dots { display: flex; justify-content: center; gap: 8px; margin: 10px 0; }
.ground-dots i { width: 10px; height: 10px; border-radius: 50%; background: rgba(77,66,59,.2); }
.ground-dots i.on { background: var(--ink); }
.center { text-align: center; }

/* about / meet erwan */
.about-logo { width: 180px; display: block; margin: 6px auto 10px; }
.dev-card { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; }
.dev-card .arrow { margin-left: auto; font-size: 20px; color: var(--ink-soft); }
.dev-hero { text-align: center; padding: 6px 0 4px; }
.dev-hero .nm { font-size: 24px; font-weight: 900; }
.dev-hero .rl { color: var(--coral); font-weight: 800; font-size: 14px; letter-spacing: .3px; }
.dev-hero .in { margin: 10px 4px 14px; }
.dev-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 18px; }
.dev-actions a { text-decoration: none; color: inherit; padding: 12px 6px; font-size: 14px; }
.faq { background: var(--paper); border-radius: 16px; box-shadow: var(--shadow); margin-bottom: 8px; overflow: hidden; }
.faq summary { list-style: none; padding: 15px 16px; font-weight: 800; display: flex; align-items: center; gap: 10px; cursor: pointer; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; margin-left: auto; font-size: 22px; color: var(--coral); transition: transform .2s; }
.faq[open] summary::after { transform: rotate(45deg); }
.faq .a { padding: 0 16px 16px; white-space: pre-wrap; color: var(--ink); }

/* toast */
.toast {
  position: absolute; left: 50%; bottom: 90px; transform: translateX(-50%) translateY(20px); opacity: 0; z-index: 95;
  background: var(--ink); color: var(--cream); padding: 10px 18px; border-radius: 20px; font-weight: 700; font-size: 14px;
  transition: all .25s ease; pointer-events: none; max-width: 86%; text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%); }

/* ayat */
.ayat { direction: ltr; }
.ayat .ar { font-family: "Noto Naskh Arabic", "Amiri", "Scheherazade New", "Traditional Arabic", "Geeza Pro", serif;
  direction: rtl; text-align: right; font-size: 25px; line-height: 2; color: #3E3530; margin: 2px 0 8px; }
.ayat .en { font-style: italic; }
.ayat .ref { margin-top: 6px; font-size: 13px; font-weight: 800; color: var(--leaf); }
.bubble.ayat { border-left: 4px solid var(--leaf); }
.ayat-card { background: var(--paper); border-radius: 22px; padding: 22px 20px; box-shadow: var(--shadow); margin-bottom: 14px; }
.ayat-card .ar { font-size: 30px; line-height: 2.1; }
.cat-tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 10px; margin-bottom: 4px; }
.cat-tabs button { flex: none; padding: 9px 14px; border-radius: 18px; background: var(--paper); border: 1.5px solid var(--line); font-weight: 800; font-size: 14px; }
.cat-tabs button.on { background: var(--ink); color: var(--cream); border-color: var(--ink); }

/* dzikir */
.dz-chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 10px; margin: 0 -16px 6px; padding-left: 16px; padding-right: 16px; }
.dz-chips button { flex: none; padding: 9px 14px; border-radius: 18px; background: var(--paper); border: 1.5px solid var(--line); font-weight: 800; font-size: 14px; }
.dz-chips button.on { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.dz-card { text-align: center; padding: 14px 10px 6px; }
.dz-card .ar { font-family: "Noto Naskh Arabic", "Amiri", "Scheherazade New", "Geeza Pro", serif; direction: rtl; font-size: 30px; line-height: 1.9; }
.dz-card .ru { font-weight: 800; margin-top: 2px; }
.dz-card .mn { color: var(--ink-soft); font-size: 14px; margin-top: 4px; }
.dz-tap {
  position: relative; display: block; width: min(68vw, 270px); height: min(68vw, 270px); margin: 14px auto 6px;
  border-radius: 50%; background: var(--paper); box-shadow: 0 6px 24px rgba(77,66,59,.12);
  touch-action: manipulation; user-select: none; -webkit-user-select: none;
}
.dz-tap:active { transform: scale(.985); }
.dz-tap svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.dz-tap .num { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.dz-tap .n { font-size: 64px; font-weight: 900; line-height: 1; }
.dz-tap .t { color: var(--ink-soft); font-weight: 700; margin-top: 6px; }
.dz-tap.done { box-shadow: 0 0 0 8px rgba(145,189,96,.25), 0 6px 24px rgba(77,66,59,.12); }
.dz-status { text-align: center; min-height: 24px; font-weight: 800; color: var(--leaf); }
.dz-sub { text-align: center; color: var(--ink-soft); font-size: 14px; }
.dz-controls { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 12px 0; }
.dz-controls .btn { padding: 10px 14px; font-size: 15px; }
.dz-controls .btn.on { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.dz-custom { display: flex; gap: 8px; justify-content: center; margin-bottom: 10px; }
.dz-custom input { width: 110px; height: 44px; border-radius: 14px; border: 1.5px solid var(--line); padding: 0 12px; font-size: 16px; text-align: center; }
.dz-today { text-align: center; color: var(--ink-soft); font-weight: 700; margin-top: 4px; }
.seg { display: inline-flex; background: var(--line); border-radius: 14px; padding: 3px; gap: 3px; }
.seg button { padding: 8px 12px; border-radius: 11px; font-weight: 800; font-size: 14px; }
.seg button.on { background: var(--paper); box-shadow: var(--shadow); }


/* ================= v1.2 ================= */
/* ---- themes (html[data-theme]) */
html[data-theme="night"] {
  --cream: #1F1B19; --paper: #2B2522; --ink: #F2EAE0; --ink-soft: #B3A79A; --line: #3E3631;
  --shadow: 0 2px 10px rgba(0,0,0,.35); --bar: rgba(31,27,25,.94); --me: #4A302B; --day: rgba(43,37,34,.85); --outer: #141110;
  --doodle: url("assets/doodle-light.png");
  --grad: linear-gradient(180deg, #1F1B19 0%, #2A1F26 55%, #1C2422 100%);
  --happy-l: #34412A; --surprised-l: #263649; --peaceful-l: #403822; --sad-l: #3A2E45; --angry-l: #47302B; --fear-l: #45371F;
  color-scheme: dark;
}
html[data-theme="sage"] {
  --cream: #F1F5EC; --ink: #3E4A3A; --ink-soft: #7C8A76; --line: #DCE6D3; --bar: rgba(241,245,236,.94); --me: #E1EFD2; --outer: #E3EBDA;
  --grad: linear-gradient(180deg, #F1F5EC 0%, #E6F1DA 60%, #F8F2E2 100%);
}
html[data-theme="sky"] {
  --cream: #EEF5FB; --ink: #36475A; --ink-soft: #7489A0; --line: #D6E3F0; --bar: rgba(238,245,251,.94); --me: #DCEBFA; --outer: #DFEAF5;
  --grad: linear-gradient(180deg, #EEF5FB 0%, #E2EEFB 55%, #F4ECFA 100%);
}
html[data-theme="rose"] {
  --cream: #FCF1F3; --ink: #5A3E48; --ink-soft: #9A7C86; --line: #F1DCE2; --bar: rgba(252,241,243,.94); --me: #F9DCE5; --outer: #F3E2E7;
  --grad: linear-gradient(180deg, #FCF1F3 0%, #FBE3EA 55%, #FFF3E6 100%);
}
html[data-bg="plain"] #app { background: var(--cream); }
html[data-bg="gradient"] #app { background: var(--grad); }
/* the calm page keeps its daylight picture, so keep it light in every theme */
.page.calm { --cream: #FBF8F2; --paper: #FFFFFF; --ink: #4D423B; --ink-soft: #8A7E74; --line: #EDE6DA; color: var(--ink); }
html[data-theme="night"] .day, html[data-theme="night"] .typing i { opacity: .9; }
html[data-theme="night"] .wheel-svg text, html[data-theme="night"] .note-img { filter: none; }
html[data-theme="night"] .dz-tap svg circle:first-child { stroke: #3E3631; }

.look-themes { display: flex; gap: 6px; justify-content: space-between; }
.look-themes button { display: flex; flex-direction: column; align-items: center; gap: 6px; font-weight: 800; font-size: 13px; width: 54px; }
.look-themes .sw { width: 44px; height: 44px; border-radius: 50%; border: 3px solid var(--line); box-shadow: var(--shadow); position: relative; overflow: hidden; }
.look-themes .sw i { position: absolute; right: -4px; bottom: -4px; width: 24px; height: 24px; border-radius: 50%; }
.look-themes button.on .sw { border-color: var(--coral); }
.look-bg { margin-top: 16px; flex-direction: column; align-items: stretch; gap: 8px; }
.look-bg .seg { display: flex; } .look-bg .seg button { flex: 1; }

/* ---- reaction pop on your bubble */
.bubble { position: relative; }
.react {
  position: absolute; left: -10px; bottom: -10px; font-size: 15px; line-height: 1; padding: 4px 5px; border-radius: 14px;
  background: var(--paper); box-shadow: var(--shadow); border: 1.5px solid var(--line);
}
.react.pop { animation: reactPop .5s cubic-bezier(.3,1.6,.5,1) both; }
@keyframes reactPop { 0% { transform: scale(0) rotate(-20deg); } 70% { transform: scale(1.25) rotate(6deg); } 100% { transform: scale(1); } }
.row.me { margin-bottom: 4px; }

/* ---- coloured names */
.pp { display: inline-block; padding: 0 7px; border-radius: 10px; font-weight: 800; line-height: 1.45; cursor: pointer; }
.pp.big { font-size: 22px; padding: 4px 16px; border-radius: 16px; }
.p-card { text-align: center; padding: 8px 6px 14px; }
.p-card .p-cat { font-weight: 800; margin: 12px 0 4px; }
.p-btns { display: flex; gap: 10px; justify-content: center; margin-top: 16px; flex-wrap: wrap; }
.p-row { display: flex; align-items: center; gap: 10px; width: 100%; background: var(--paper); border-radius: 16px; padding: 12px 14px; box-shadow: var(--shadow); margin-bottom: 8px; text-align: left; }
.p-row .muted { flex: 1; font-size: 14px; }
.p-row .chev { color: var(--ink-soft); font-size: 22px; }
.insight { line-height: 1.5; border-left: 5px solid var(--coral); }
.lbl { display: block; font-weight: 800; font-size: 14px; margin-top: 4px; }
.cat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0 16px; }
.cat-grid button { padding: 10px; border-radius: 14px; border: 2px solid var(--line); background: var(--paper); font-weight: 800; text-align: left; }
.cat-grid button small { display: block; font-weight: 700; color: var(--ink-soft); font-size: 12px; }
.cat-grid button.on { border-color: var(--c); background: var(--l); color: #3E3530; }
.cat-grid button.on small { color: #6b5f57; }

/* ---- Kisah */
.bubble.kisah { border-left: 4px solid #B9A2E0; white-space: normal; }
.bubble.kisah .k-text, .kisah-card .k-text { white-space: pre-wrap; }
.kisah-intro { margin-bottom: 8px; }
.k-title { font-weight: 800; font-size: 17px; margin-bottom: 6px; }
.k-text { line-height: 1.55; }
.k-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }
.k-foot .ref { font-size: 13px; color: var(--ink-soft); font-weight: 700; }
.lang-tg { flex: none; padding: 4px 10px; border-radius: 10px; border: 1.5px solid var(--line); font-weight: 800; font-size: 12px; background: var(--cream); }
.kisah-card { background: var(--paper); border-radius: 22px; padding: 22px 20px; box-shadow: var(--shadow); margin-bottom: 14px; }
.kisah-card .k-title { font-size: 20px; }
.cat-tabs button img { width: 20px; height: 20px; vertical-align: -5px; margin-right: 5px; }

/* ---- Advanced settings */
details.adv { margin-top: 18px; }
details.adv > summary { list-style: none; cursor: pointer; background: var(--paper); border-radius: 18px; padding: 14px 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; font-weight: 800; position: relative; }
details.adv > summary::-webkit-details-marker { display: none; }
details.adv > summary::after { content: "›"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%); font-size: 24px; color: var(--ink-soft); transition: transform .2s; }
details.adv[open] > summary::after { transform: translateY(-50%) rotate(90deg); }
details.adv > summary small { color: var(--ink-soft); font-weight: 700; font-size: 13px; }
.tog { font-weight: 700; gap: 12px; margin-top: 12px; }
.tog input[type=checkbox] { width: 22px; height: 22px; flex: none; }
.tog input[type=range] { width: 46%; accent-color: var(--coral); }
.voice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; margin-bottom: 8px; }
.voice-grid button { padding: 10px 6px; border-radius: 14px; border: 2px solid var(--line); background: var(--cream); font-weight: 800; font-size: 14px; }
.voice-grid button.on { border-color: var(--coral); background: var(--paper); box-shadow: var(--shadow); }
.small { font-size: 13px; }
.del-box { border: 2px solid var(--angry); margin-top: 4px; }
.del-warn { white-space: pre-wrap; font-weight: 700; margin-bottom: 8px; }
.danger-fill { background: var(--angry-d); color: #fff; border-color: var(--angry-d); }
.danger-fill:disabled { opacity: .4; }
.wheel-svg text { fill: #4D423B; font-weight: 800; }

/* v1.2.1 — Malay ayat translation */
.ayat .ms + .en2 { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); font-size: .92em; color: var(--ink-soft); }
.card-box .hint { color: var(--ink-soft); font-size: 12.5px; line-height: 1.4; }
.seg.wrap { display: flex; flex-wrap: wrap; }
.seg.wrap button { flex: 1 1 40%; }

/* v1.4 — vent mode + mode bar */
.mode-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; background: var(--paper); border-top: 1px solid var(--line); font-weight: 700; font-size: 14px; color: var(--ink-soft); }
.mode-bar.hidden { display: none; }
.mode-bar button { flex: none; padding: 8px 14px; border-radius: 999px; font-weight: 800; font-size: 14px; background: var(--cream); border: 1.5px solid var(--line); color: var(--ink); }
.mode-bar.vent { color: var(--ink); }
.mode-bar.vent button { background: #2F9C76; border-color: #2F9C76; color: #fff; }
.row.letgo { animation: none; transition: opacity .9s ease, transform .9s ease, filter .9s ease; opacity: 0; transform: translateY(-18px) scale(.96); filter: blur(3px); }
.slash-pop { max-height: 40vh; overflow-y: auto; background: var(--paper); border-top: 1px solid var(--line); padding: 4px 8px; }
.slash-pop button { display: flex; width: 100%; gap: 10px; align-items: baseline; padding: 9px 8px; border-radius: 10px; text-align: left; color: var(--ink); }
.slash-pop button:active { background: var(--cream); }
.slash-pop b { min-width: 74px; }
.slash-pop span { color: var(--ink-soft); font-size: 14px; }

/* v1.6 — in-app guide */
.g-intro { background: var(--paper); border-radius: 18px; padding: 14px 16px; margin-bottom: 12px; box-shadow: var(--shadow); }
.g-intro .small { margin-top: 8px; font-size: 13px; }
details.g-sec { background: var(--paper); border-radius: 18px; margin-bottom: 10px; box-shadow: var(--shadow); overflow: hidden; scroll-margin-top: 8px; }
details.g-sec summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 14px 16px; font-weight: 800; font-size: 17px; cursor: pointer; }
details.g-sec summary::-webkit-details-marker { display: none; }
details.g-sec summary::after { content: "›"; margin-left: auto; font-size: 22px; color: var(--ink-soft); transition: transform .2s; }
details.g-sec[open] summary::after { transform: rotate(90deg); }
.g-ic { width: 34px; height: 34px; border-radius: 50%; background: var(--cream); display: grid; place-items: center; font-size: 18px; flex: none; }
.g-body { padding: 0 16px 16px; }
.g-imgs { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 2px 10px; }
.g-imgs figure { margin: 0; flex: none; width: 168px; scroll-snap-align: start; }
.g-imgs img { width: 168px; height: auto; aspect-ratio: 390 / 844; border-radius: 16px; border: 1px solid var(--line); background: var(--cream); display: block; box-shadow: 0 4px 14px rgba(77,66,59,.12); }
.g-imgs figcaption { font-size: 12.5px; color: var(--ink-soft); margin-top: 6px; line-height: 1.3; }
.g-steps { margin: 6px 0 0; padding-left: 22px; }
.g-steps li { margin: 6px 0; line-height: 1.45; }
.g-steps li::marker { color: #EE806F; font-weight: 800; }
.g-tip { margin-top: 10px; background: var(--cream); border-radius: 12px; padding: 10px 12px; font-size: 14px; }
.g-foot { text-align: center; color: var(--ink-soft); font-size: 12.5px; padding: 16px 0 24px; }

.g-steps { font-size: 15px; }
.g-zoom { position: absolute; inset: 0; z-index: 60; background: rgba(77,66,59,.82); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 18px; animation: fade .2s; }
.g-zoom img { max-width: 100%; max-height: 80%; border-radius: 20px; box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.g-zoom div { color: #fff; font-weight: 700; text-align: center; font-size: 14px; }
.g-zoom button { position: absolute; top: calc(14px + var(--safe-top, 0px)); right: 14px; width: 40px; height: 40px; border-radius: 50%; background: #fff; color: var(--ink); font-size: 18px; font-weight: 800; }

/* v1.7 — solat & uzur */
.sol-head .sol-next { font-size: 19px; font-weight: 800; margin-top: 4px; }
.sol-list { padding: 6px 14px; }
.sol-row { display: flex; align-items: center; gap: 10px; padding: 11px 2px; border-bottom: 1px solid var(--line); font-size: 17px; }
.sol-row:last-child { border-bottom: 0; }
.sol-row span { flex: 1; font-weight: 700; }
.sol-row b { font-variant-numeric: tabular-nums; }
.sol-row.minor { font-size: 14px; color: var(--ink-soft); }
.sol-row.minor span { font-weight: 600; }
.sol-row.next { background: var(--me); margin: 0 -14px; padding: 11px 16px; border-radius: 12px; border-bottom-color: transparent; }
.sol-tick { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--line); background: var(--paper); color: #fff; font-weight: 900; flex: none; display: grid; place-items: center; }
.sol-tick.on { background: #2F9C76; border-color: #2F9C76; }
.sol-tick.ghost { border: 0; background: none; }
.uz .uz-state { font-weight: 800; font-size: 17px; margin-bottom: 10px; }
.uz-stats { margin: 12px 0 6px; }
.uz-stats div { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.uz-stats span { flex: 1; color: var(--ink-soft); }
.uz-stats .link-btn { font-size: 13px; padding: 2px 6px; }

/* v1.8 — grouped menu & settings */
.menu-h { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); padding: 14px 14px 4px; }
.menu-h:first-child { padding-top: 4px; }
.menu-h.line { padding: 0; margin: 10px 14px; border-top: 1px solid var(--line); }
.menu-item { padding: 11px 14px; }
details.s-grp { background: var(--paper); border-radius: 18px; margin-bottom: 10px; box-shadow: var(--shadow); }
details.s-grp > summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 14px 16px; cursor: pointer; }
details.s-grp > summary::-webkit-details-marker { display: none; }
details.s-grp > summary::after { content: "›"; margin-left: auto; font-size: 22px; color: var(--ink-soft); transition: transform .2s; }
details.s-grp[open] > summary::after { transform: rotate(90deg); }
details.s-grp > summary b { display: block; font-size: 17px; }
details.s-grp > summary small { display: block; color: var(--ink-soft); font-size: 13px; font-weight: 600; margin-top: 1px; }
.s-grp-body { padding: 0 12px 12px; }
.s-grp-body .card-box { box-shadow: none; border: 1px solid var(--line); }
.s-grp-body .section-label:first-child { margin-top: 2px; }

/* v1.9 app icons */
.ic { width: 32px; height: 32px; border-radius: 11px; display: inline-grid; place-items: center; flex: none; }
.ic svg { width: 19px; height: 19px; }
.menu-item { display: flex; align-items: center; gap: 13px; }
details.s-grp > summary .ic { width: 36px; height: 36px; border-radius: 12px; }
details.s-grp > summary .ic svg { width: 21px; height: 21px; }

/* v1.9 E-ink theme: paper, ink, no colour, no motion */
html[data-theme="ink"] {
  --cream: #F2F1EC; --paper: #FAFAF7; --ink: #111111; --ink-soft: #4A4A4A; --line: #BDBDB8;
  --shadow: none; --bar: #F2F1EC; --me: #E4E4DF; --day: #F2F1EC; --outer: #E6E5E0;
  --doodle: none; --grad: #F2F1EC;
  --font: "Literata", "Iowan Old Style", Georgia, "Noto Serif", serif;
  --happy: #DADAD5; --happy-d: #111; --happy-l: #EDEDE8; --surprised: #DADAD5; --surprised-d: #111; --surprised-l: #EDEDE8;
  --peaceful: #DADAD5; --peaceful-d: #111; --peaceful-l: #EDEDE8; --sad: #DADAD5; --sad-d: #111; --sad-l: #EDEDE8;
  --angry: #DADAD5; --angry-d: #111; --angry-l: #EDEDE8; --fear: #DADAD5; --fear-d: #111; --fear-l: #EDEDE8;
  --coral: #111; --leaf: #111;
}
html[data-theme="ink"] *, html[data-theme="ink"] *::before, html[data-theme="ink"] *::after { animation: none !important; transition: none !important; box-shadow: none !important; text-shadow: none !important; }
html[data-theme="ink"] body { background: var(--cream); color: var(--ink); -webkit-font-smoothing: antialiased; }
html[data-theme="ink"] img, html[data-theme="ink"] svg, html[data-theme="ink"] .wheel-svg { filter: grayscale(1) contrast(1.15); }
html[data-theme="ink"] .bubble, html[data-theme="ink"] .card-box, html[data-theme="ink"] details.s-grp, html[data-theme="ink"] .chip, html[data-theme="ink"] .btn { border: 1px solid #111; border-radius: 6px; }
html[data-theme="ink"] .row.me .bubble { background: var(--paper); }
html[data-theme="ink"] .btn.primary { background: #111; color: #FAFAF7; }
html[data-theme="ink"] .ic { background: transparent !important; color: #111 !important; border: 1px solid #111; border-radius: 6px; }
html[data-theme="ink"] .bubble { font-size: 17px; line-height: 1.55; }
html[data-theme="ink"] .bubble, html[data-theme="ink"] .chip, html[data-theme="ink"] .btn, html[data-theme="ink"] .menu-item, html[data-theme="ink"] .page { filter: grayscale(1); }

/* E-ink wheel + page turns */
html[data-theme="ink"] .ink-wheel { filter: none; }
html[data-theme="ink"] .word { background: #fff !important; border-color: #111 !important; color: #111; }
.paged { display: flex; flex-direction: column; }
.pg-vp { height: min(58vh, 560px); overflow: hidden; cursor: pointer; -webkit-user-select: none; user-select: none; }
.pg-flow { height: 100%; column-fill: auto; }
.pg-flow > * { break-inside: auto; }
html[data-theme="ink"] .kisah-card .k-text { font-size: 19px; line-height: 1.65; text-align: justify; hyphens: auto; }
html[data-theme="ink"] .kisah-card .k-title { font-size: 23px; }
.pg-bar { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; font-weight: 700; color: var(--ink-soft); }
.pg-bar:empty { display: none; }
.pg-btn { width: 44px; height: 36px; border: 1px solid #111; border-radius: 6px; background: var(--paper); font-size: 22px; line-height: 1; }
.pg-btn:disabled { opacity: .3; }
.ink-flash { position: fixed; inset: 0; background: #000; z-index: 9999; pointer-events: none; }
.ink-flash.w { background: #fff; }
html[data-theme="ink"] .ink-wheel image, html[data-theme="ink"] #miniWheel image { filter: grayscale(1) contrast(1.1); }
.look-themes { flex-wrap: wrap; justify-content: flex-start; row-gap: 12px; }

/* ---------------- tablets (v1.9): menu becomes a sidebar, chat keeps a comfortable reading width */
.menu-item.on { background: var(--paper); box-shadow: var(--shadow); }
@media (min-width: 760px) {
  #app { max-width: none; display: grid; grid-template-columns: 280px minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto auto auto; }
  #app > .topbar, #app > .chat, #app > .slash-pop, #app > .mode-bar, #app > .composer { grid-column: 2; }
  .drawer { position: relative; grid-column: 1; grid-row: 1 / -1; transform: none; width: auto; box-shadow: none; border-right: 1px solid var(--line); transition: none; z-index: 2; }
  .drawer-back, #menuBtn { display: none !important; }
  .drawer-head img { width: 110px; }
  .chat { padding-inline: max(16px, calc((100% - 760px) / 2)); }
  .composer, .mode-bar, .slash-pop { padding-inline: max(12px, calc((100% - 760px) / 2)); }
  .bubble { max-width: min(520px, 55vw); }
  .page { left: 280px; }
  .page-body { width: 100%; max-width: 720px; margin-inline: auto; }
  .sheet { left: calc(280px + max(0px, (100% - 280px - 620px) / 2)); right: max(0px, calc((100% - 280px - 620px) / 2)); }
  .sheet-back { left: 280px; }
}
/* wide landscape: pages open beside the chat instead of over it */
@media (min-width: 1180px) and (orientation: landscape) {
  .page { left: auto; right: 0; width: 460px; border-left: 1px solid var(--line); box-shadow: -10px 0 30px rgba(0,0,0,.06); animation: none; }
  #app:has(.page:not(.hidden)) > .chat, #app:has(.page:not(.hidden)) > .composer,
  #app:has(.page:not(.hidden)) > .mode-bar, #app:has(.page:not(.hidden)) > .slash-pop, #app:has(.page:not(.hidden)) > .topbar { margin-right: 460px; }
  .page.calm { left: 280px; width: auto; }
  #app:has(.page:not(.hidden)) > .chat { padding-inline: 18px; }
  #app:has(.page:not(.hidden)) > .composer, #app:has(.page:not(.hidden)) > .mode-bar, #app:has(.page:not(.hidden)) > .slash-pop { padding-inline: 12px; }
}

/* tablet ASCII scenes */
.bubble.ascii{font-family:ui-monospace,"SF Mono",Menlo,Consolas,"Courier New",monospace;white-space:pre;font-size:13px;line-height:1.25;max-width:none!important;overflow-x:auto;background:var(--paper,#fff)}
@media (max-width:759px){.bubble.ascii{font-size:10px}}

/* Note to Self page */
.note-fams{margin:0 0 12px;flex-wrap:wrap}
.note-acts{display:grid;grid-template-columns:1fr auto;gap:10px;margin-bottom:10px}
.note-acts .btn.on{background:var(--accent-soft,#FDE3E3)}
.note-own{margin-top:12px}.note-own summary{font-weight:700;cursor:pointer}
.note-own .field{margin:10px 0}
.note-fav{padding:8px 2px;border-bottom:1px solid rgba(0,0,0,.06)}
.note-fav .link{background:none;border:0;text-align:left;font:inherit;color:inherit;padding:4px 0;flex:1;cursor:pointer}
.note-fav .x{background:none;border:0;color:#A39A8A;font-size:16px;padding:4px 8px;cursor:pointer}

/* story series */
.ser-entry{margin-bottom:12px}
.ser-card{display:flex;flex-direction:column;gap:4px;width:100%;text-align:left;background:var(--card,#fff);border:0;border-radius:16px;padding:14px 16px;margin:0 0 10px;box-shadow:var(--shadow);font:inherit;color:inherit;cursor:pointer}
.ser-card.locked{opacity:.6;cursor:default;box-shadow:none;border:1px dashed rgba(0,0,0,.15)}
.ser-kind{font-size:12px;font-weight:700;letter-spacing:.04em;color:#A39A8A;text-transform:uppercase}
.ser-t{font-weight:800;font-size:17px}
.ser-bar{height:6px;border-radius:6px;background:rgba(0,0,0,.07);overflow:hidden}.ser-bar i{display:block;height:100%;background:var(--accent,#EE806F)}
.ser-p{font-size:13px;color:#8A8076}
.ser-read .ser-meta{font-size:12px;color:#A39A8A;font-weight:700}
.ser-h{margin:4px 0 8px;font-size:19px}
.ser-prev{color:#8A8076;font-size:14px;margin:0 0 10px}
.ser-text{line-height:1.65}
.ser-take{margin:12px 0 4px}.ser-q{font-weight:700;margin:6px 0 10px}
.ser-tags span{display:inline-block;font-size:12px;background:rgba(0,0,0,.05);border-radius:999px;padding:2px 9px;margin:2px 4px 0 0}
.ser-acts{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:10px}
.ser-lesson{display:flex;gap:10px;margin:10px 0}.ser-ic{flex:none}.ser-key{font-size:12px;margin-top:12px}

/* v2.0 tokens */
.tok { display: flex; gap: 14px; align-items: center; width: 100%; text-align: left; background: var(--card, #fff); border-radius: 18px; padding: 14px; margin-bottom: 10px; box-shadow: var(--shadow); font: inherit; color: inherit; }
.tok-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.tok-t { font-weight: 800; font-size: 16px; }
.tok-s { font-size: 12.5px; color: var(--ink-soft); }
.tok-bar { height: 6px; border-radius: 6px; background: rgba(0,0,0,.07); overflow: hidden; margin-top: 4px; }
.tok-bar i { display: block; height: 100%; background: currentColor; border-radius: 6px; }
.coin { width: 58px; height: 58px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 900; font-size: 17px; }
.coin .in { width: 46px; height: 46px; border-radius: 50%; border: 2px dashed currentColor; display: grid; place-items: center; line-height: 1; text-align: center; }
.coin small { display: block; font-size: 7.5px; font-weight: 800; letter-spacing: .04em; margin-top: 2px; text-transform: uppercase; }
.coin.big { width: 124px; height: 124px; font-size: 40px; margin: 0 auto; }
.coin.big .in { width: 100px; height: 100px; border-width: 3px; }
.coin.big small { font-size: 11px; }
.coin.c1, .tok-bar.c1 { background: #FDE2C4; color: #B5651D; } .coin.c2, .tok-bar.c2 { background: #DCEBFB; color: #2F6DB5; }
.coin.c3, .tok-bar.c3 { background: #DDF2D3; color: #3D8B2F; } .coin.c4, .tok-bar.c4 { background: #EFE2F7; color: #7A4BA0; }
.coin.c5, .tok-bar.c5 { background: #FBDCDC; color: #B5413E; } .coin.c6, .tok-bar.c6 { background: #F6EEC6; color: #8E7414; }
.tok-bar.c1, .tok-bar.c2, .tok-bar.c3, .tok-bar.c4, .tok-bar.c5, .tok-bar.c6 { background: rgba(0,0,0,.07); }
.tok-big { text-align: center; margin: 6px 0 14px; }
.tok-hd { font-weight: 900; font-size: 22px; margin-top: 12px; }
.tok-meta { font-size: 13.5px; margin-top: 4px; }
.tok-ms { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.tok-ms .got { padding: 5px 10px; border-radius: 999px; background: var(--line); font-size: 13px; font-weight: 700; }
.tok-two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.tok-seg { display: flex; width: 100%; } .tok-seg button { flex: 1; }
.tok-hint { font-size: 13px; margin: 8px 0 10px; }
.tok-l { display: block; font-weight: 700; font-size: 13px; margin: 10px 0 4px; }
.tok-radio { display: flex; flex-direction: column; gap: 6px; }
.tok-radio button { text-align: left; padding: 11px 14px; border-radius: 14px; background: var(--line); font-weight: 700; font-size: 14px; border: 2px solid transparent; }
.tok-radio button.on { border-color: var(--accent, #EE806F); background: var(--paper); }
#tSave { margin-top: 16px; }
html[data-theme="night"] .coin { filter: brightness(.85); }
html[data-theme="ink"] .coin, html[data-theme="ink"] .tok-bar { background: #fff !important; color: #111 !important; border: 2px solid #111; }
html[data-theme="ink"] .tok-bar i { background: #111; }
html[data-theme="ink"] .tok, html[data-theme="ink"] .tok-radio button { border: 1px solid #111; border-radius: 6px; }
html[data-theme="ink"] .tok-radio button.on { border-width: 3px; }

/* v2.0.1 Zikir hari ini */
.zh-today { background: var(--card, #fff); border-radius: 18px; padding: 14px 16px; margin: 0 0 12px; box-shadow: var(--shadow); text-align: left; }
.zh-lbl { font-size: 12px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-soft); }
.zh-today .zh-r { font-weight: 800; font-size: 17px; margin: 3px 0; }
.zh-w { font-size: 13.5px; color: var(--ink-soft); }
.zh-act { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.zh-act .btn { padding: 8px 16px; }
.zh-fri { margin-top: 10px; font-size: 13px; padding: 8px 10px; border-radius: 10px; background: var(--line); }
.zh-src { margin-top: 10px; font-size: 12.5px; color: var(--ink-soft); line-height: 1.45; }
.zh-intro { font-size: 13.5px; margin-bottom: 12px; }
.zh-row { display: flex; gap: 12px; width: 100%; text-align: left; background: var(--card, #fff); border-radius: 14px; padding: 12px 14px; margin-bottom: 8px; box-shadow: var(--shadow); font: inherit; color: inherit; align-items: flex-start; }
.zh-row.today { outline: 2px solid var(--coral, #EE806F); }
.zh-n { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--line); display: grid; place-items: center; font-size: 12px; font-weight: 800; }
.zh-b { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.zh-row .zh-r { font-weight: 800; font-size: 15px; }
.zh-s { font-size: 11.5px; font-weight: 700; color: var(--ink-soft); }
html[data-theme="ink"] .zh-today, html[data-theme="ink"] .zh-row { border: 1px solid #111; border-radius: 6px; }
html[data-theme="ink"] .zh-row.today { outline: 3px solid #111; }

/* v2.0.1 loved (bot bubbles) */
.row.bot .bubble { position: relative; }
.love { position: absolute; right: -8px; bottom: -10px; font-size: 14px; line-height: 1; padding: 4px 5px; border-radius: 14px; background: var(--paper); box-shadow: var(--shadow); border: 1.5px solid var(--line); }
.love.pop { animation: pop .35s ease; }
.ayat-card, .kisah-card { position: relative; }
.love-btn { position: absolute; top: 8px; right: 8px; width: 36px; height: 36px; border-radius: 50%; background: var(--paper); box-shadow: var(--shadow); font-size: 18px; line-height: 1; z-index: 2; }
.love-btn.on { background: #FDE7EA; }
html[data-theme="ink"] .love, html[data-theme="ink"] .love-btn { border: 1px solid #111; filter: grayscale(1); }

/* v2.0.2 achievements */
.ach-grp { margin-bottom: 18px; }
.ach-gh { display: flex; justify-content: space-between; align-items: baseline; font-weight: 800; font-size: 15px; margin: 4px 2px 8px; }
.ach-gh span { font-size: 12px; font-weight: 700; color: var(--ink-soft); }
.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.ach { background: var(--card, #fff); border-radius: 16px; padding: 12px 8px; text-align: center; box-shadow: var(--shadow); display: flex; flex-direction: column; align-items: center; gap: 3px; }
.ach-c { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 4px; }
.ach-c svg { width: 28px; height: 28px; }
.ach b { font-size: 13px; line-height: 1.2; }
.ach small { font-size: 11px; color: var(--ink-soft); line-height: 1.25; }
.ach i { font-size: 10.5px; color: var(--ink-soft); font-style: normal; font-weight: 700; margin-top: 2px; }
.ach.off { box-shadow: none; border: 1.5px dashed var(--line); background: transparent; }
.ach.off .ach-c { background: var(--line); color: var(--ink-soft); opacity: .7; }
.ach.off b { color: var(--ink-soft); }
html[data-theme="ink"] .ach.on { border: 1.5px solid #111; border-radius: 6px; }
html[data-theme="ink"] .ach.on .ach-c { background: #fff !important; color: #111 !important; border: 2px solid #111; }

/* v2.1 prayer tracker */
.sol-track { padding: 14px 12px; }
.sg { display: grid; grid-template-columns: 22px repeat(7, 1fr); gap: 4px; }
.sg-col { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 4px 0 6px; border-radius: 12px; }
.sg-col.today { background: var(--line); }
.sg-lbl span { height: 22px; display: grid; place-items: center; font-size: 11px; font-weight: 800; color: var(--ink-soft); }
.sg-lbl span:first-child { height: 18px; }
.sg-d { height: 18px; font-size: 11.5px; font-weight: 800; color: var(--ink-soft); position: relative; }
.sg-d i { position: absolute; left: 100%; top: -3px; font-size: 8.5px; font-style: normal; color: #2F9C76; margin-left: 1px; }
.sg-dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); background: var(--paper); padding: 0; }
.sg-dot.on { background: #2F9C76; border-color: #2F9C76; }
.sg-dot.on.jum { box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px #2F9C76; }
.sg-dot.fut { border-style: dashed; opacity: .5; }
.sg-dot.uz { background: #F7DDE6; border-color: #F7DDE6; }
.sg-hint { margin: 10px 2px 4px; }
.sg-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(70px, 1fr)); gap: 8px; margin-top: 10px; text-align: center; }
.sg-stats b { display: block; font-size: 20px; font-weight: 900; }
.sg-stats span { font-size: 11px; color: var(--ink-soft); font-weight: 700; }
html[data-theme="ink"] .sg-dot.on { background: #111; border-color: #111; }
html[data-theme="ink"] .sg-dot.uz { background: repeating-linear-gradient(45deg, #fff 0 3px, #111 3px 4px); border-color: #111; }

/* v2.1 Rasa Run */
.rr-game { position: relative; border-radius: 18px; overflow: hidden; background: var(--paper); box-shadow: var(--shadow); touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.rr-game canvas { display: block; }
.rr-hud { position: absolute; top: 10px; right: 14px; left: 14px; display: flex; justify-content: flex-end; gap: 14px; font: 800 16px ui-monospace, Menlo, monospace; color: var(--ink); pointer-events: none; z-index: 2; letter-spacing: .06em; }
.rr-hi { color: var(--ink-soft); } .rr-hi b { color: var(--ink-soft); }
.rr-start, .rr-over { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; padding: 16px; background: rgba(251,248,242,.86); z-index: 3; }
.rr-start.hidden, .rr-over.hidden { display: none; }
.rr-t { font-weight: 900; font-size: 22px; }
.rr-s { font-size: 13.5px; color: var(--ink-soft); max-width: 300px; }
.rr-big { font: 900 44px ui-monospace, Menlo, monospace; line-height: 1; }
.rr-ini { display: flex; gap: 8px; }
.rr-ini input { width: 110px; text-align: center; font: 900 24px ui-monospace, Menlo, monospace; letter-spacing: .3em; text-transform: uppercase; border: 2px solid var(--line); border-radius: 12px; padding: 6px; background: #fff; color: var(--ink); }
.rr-row { display: flex; gap: 8px; margin-top: 4px; }
.rr-board { padding: 6px 14px; }
.rr-b { display: grid; grid-template-columns: 26px 1fr auto 60px; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.rr-b:last-child { border-bottom: 0; }
.rr-b span { font-weight: 800; color: var(--ink-soft); } .rr-b b { font: 900 17px ui-monospace, Menlo, monospace; letter-spacing: .12em; }
.rr-b i { font: 800 16px ui-monospace, Menlo, monospace; font-style: normal; } .rr-b small { color: var(--ink-soft); text-align: right; font-size: 11.5px; }
.rr-b.me { background: #FFF6D2; border-radius: 10px; padding-left: 6px; }
html[data-theme="night"] .rr-start, html[data-theme="night"] .rr-over { background: rgba(30,27,25,.86); }
html[data-theme="ink"] .rr-game { border: 2px solid #111; box-shadow: none; }
html[data-theme="ink"] .rr-start, html[data-theme="ink"] .rr-over { background: rgba(255,255,255,.94); }

/* v2.1 chores */
.ic-in { width: 20px; height: 20px; vertical-align: -4px; }
.ch-kids, .ch-for { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; flex-wrap: wrap; }
.ch-kid { display: flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; border-radius: 999px; background: var(--card, #fff); box-shadow: var(--shadow); font-weight: 800; font-size: 15px; border: 2px solid transparent; color: var(--ink); }
.ch-kid.on { border-color: var(--kc); background: color-mix(in srgb, var(--kc) 22%, #fff); }
.ch-av { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--kc, #ddd); color: #fff; font-weight: 900; flex: none; }
.ch-pts { margin: 6px 0 4px; border-radius: 20px; padding: 16px; text-align: center; background: color-mix(in srgb, var(--kc) 28%, #fff); }
.ch-pts b { display: block; font-size: 44px; font-weight: 900; line-height: 1; }
.ch-pts span { font-size: 13px; font-weight: 800; color: var(--ink-soft); }
.ch-item, .ch-rew, .ch-ap { display: flex; align-items: center; gap: 12px; background: var(--card, #fff); border-radius: 16px; padding: 12px 14px; margin-bottom: 8px; box-shadow: var(--shadow); }
.ch-ap { flex-direction: column; align-items: stretch; }
.ch-ic { width: 38px; height: 38px; border-radius: 12px; background: var(--line); display: grid; place-items: center; flex: none; color: var(--ink); }
.ch-ic.sm { width: 28px; height: 28px; border-radius: 9px; }
.ch-b { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ch-b b { font-size: 15px; } .ch-b small { font-size: 12.5px; color: var(--ink-soft); }
.ch-done { padding: 8px 16px; }
.ch-tag { font-size: 12.5px; font-weight: 800; padding: 5px 10px; border-radius: 999px; background: var(--line); color: var(--ink-soft); white-space: nowrap; }
.ch-tag.wait { background: #FFF1CF; color: #9A6D00; } .ch-tag.ok { background: #DDF2D3; color: #2F7D2A; }
.ch-item.done { opacity: .75; }
.ch-bar { height: 7px; border-radius: 7px; background: var(--line); overflow: hidden; margin-top: 4px; }
.ch-bar i { display: block; height: 100%; border-radius: 7px; }
.ch-parent { margin-top: 18px; }
.ch-badge { display: inline-grid; place-items: center; min-width: 22px; height: 22px; border-radius: 11px; background: #E7685A; color: #fff; font-size: 12px; font-weight: 900; margin-left: 6px; padding: 0 6px; }
.ch-pin { text-align: center; display: flex; flex-direction: column; gap: 10px; }
.ch-pin-t { font-weight: 900; font-size: 18px; }
.ch-pin input { text-align: center; font-size: 26px; letter-spacing: .5em; padding: 10px; border-radius: 14px; border: 2px solid var(--line); background: #fff; color: var(--ink); }
.ch-err { color: #D3483A; font-weight: 700; min-height: 18px; font-size: 13px; }
.ch-ph { display: flex; justify-content: space-between; align-items: center; background: #FFF1CF; border-radius: 14px; padding: 10px 14px; font-weight: 800; }
.ch-thumb { max-width: 100%; max-height: 220px; border-radius: 12px; margin-top: 8px; object-fit: cover; }
.ch-yn { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.ch-li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.ch-li b { flex: 1; } .ch-li small { color: var(--ink-soft); font-weight: 700; }
.ch-add { display: flex; gap: 8px; margin-top: 10px; } .ch-add .field { flex: 1; margin: 0; } .ch-add .ch-n { max-width: 80px; flex: none; }
.ch-hist { padding: 6px 14px; }
.ch-h { display: grid; grid-template-columns: 52px 1fr auto; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.ch-h:last-child { border-bottom: 0; } .ch-h span:first-child { color: var(--ink-soft); } .ch-h b.neg { color: #C8553D; }
.ch-seg { display: flex; } .ch-seg button { flex: 1; }
.ch-sheet { position: fixed; inset: 0; background: rgba(0,0,0,.35); display: flex; align-items: flex-end; z-index: 60; }
.ch-sheet-in { background: var(--paper); width: 100%; border-radius: 22px 22px 0 0; padding: 20px 18px calc(18px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 10px; text-align: center; }
html[data-theme="ink"] .ch-kid.on, html[data-theme="ink"] .ch-pts { background: #fff; border: 2px solid #111; }
html[data-theme="ink"] .ch-av { background: #111 !important; }
html[data-theme="ink"] .ch-item, html[data-theme="ink"] .ch-rew, html[data-theme="ink"] .ch-ap { border: 1px solid #111; border-radius: 6px; box-shadow: none; }

/* v2.2 "What is this?" */
.page-bar { position: relative; }
.about-btn { margin-left: auto; }
.about-btn svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.about-btn.pulse::after { content: ""; position: absolute; width: 9px; height: 9px; border-radius: 50%; background: #E7685A; transform: translate(12px, -12px); }
.about-sheet { position: fixed; inset: 0; background: rgba(0,0,0,.35); display: flex; align-items: flex-end; z-index: 70; animation: fadein .2s ease; }
.about-in { background: var(--paper); width: 100%; max-height: 86vh; overflow-y: auto; border-radius: 22px 22px 0 0; padding: 10px 20px calc(18px + env(safe-area-inset-bottom)); color: var(--ink); }
.about-grab { width: 42px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 12px; }
.about-h { font-size: 20px; margin-bottom: 6px; }
.about-why { font-size: 15px; line-height: 1.5; }
.about-sub { margin: 14px 0 6px; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); }
.about-in ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; line-height: 1.45; }
.about-tip { margin: 14px 0 4px; padding: 10px 12px; border-radius: 12px; background: var(--line); font-size: 13.5px; line-height: 1.45; }
.about-in .btn { margin-top: 14px; }
.week-key { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 12px; font-size: 12px; color: var(--ink-soft); font-weight: 700; }
.week-key span { display: inline-flex; align-items: center; gap: 5px; }
.week-key i { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }
@media (min-width: 760px) { .about-sheet { align-items: center; justify-content: center; } .about-in { max-width: 560px; border-radius: 22px; } }
html[data-theme="ink"] .about-in { border-top: 2px solid #111; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
.about-btn { position: relative; }
.about-btn.pulse::after { top: 6px; right: 6px; transform: none; }

/* v2.3 games tabs + snake */
.g-tabs { display: flex; margin-bottom: 12px; } .g-tabs button { flex: 1; }
.sn-game { display: flex; justify-content: center; background: #E4F3D7; }
.sn-game canvas { touch-action: none; }
.sn-pad { display: grid; grid-template-columns: repeat(3, 64px); grid-template-rows: 54px 54px; gap: 8px; justify-content: center; margin: 14px 0 6px; user-select: none; -webkit-user-select: none; }
.sn-pad button { border-radius: 16px; background: var(--card, #fff); box-shadow: var(--shadow); font-size: 20px; color: var(--ink); touch-action: manipulation; }
.sn-pad button:active { transform: scale(.94); background: var(--line); }
.sn-pad [data-d="up"] { grid-column: 2; grid-row: 1; }
.sn-pad [data-d="left"] { grid-column: 1; grid-row: 2; } .sn-pad [data-d="down"] { grid-column: 2; grid-row: 2; } .sn-pad [data-d="right"] { grid-column: 3; grid-row: 2; }
html[data-theme="ink"] .sn-pad button { border: 2px solid #111; box-shadow: none; }

/* v2.3.1 jump button */
.rr-jump { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 76px; margin: 14px 0 4px; border-radius: 22px; background: var(--card, #fff); box-shadow: var(--shadow); font-size: 24px; font-weight: 900; color: var(--ink); touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.rr-jump span { font-size: 19px; letter-spacing: .04em; }
.rr-jump.on { transform: scale(.97); background: var(--line); }
html[data-theme="ink"] .rr-jump { border: 2px solid #111; box-shadow: none; }

/* v2.3.2 snake retro look */
.sn-look { display: flex; max-width: 300px; margin: 12px auto 0; } .sn-look button { flex: 1; }
.sn-game.retro { background: #A9D90C; }
.sn-game.retro .rr-hud { display: none; }
.sn-game.retro .rr-hud { color: #16200A; font-family: "Courier New", ui-monospace, monospace; font-weight: 900; }
.sn-game.retro .rr-hi, .sn-game.retro .rr-hi b { color: #16200A; opacity: .75; }
.sn-game.retro .rr-start, .sn-game.retro .rr-over { background: rgba(169,217,12,.93); color: #16200A; font-family: "Courier New", ui-monospace, monospace; }
.sn-game.retro .rr-start .rr-s, .sn-game.retro .rr-over .rr-s { color: #16200A; }
.sn-game.retro .btn { background: #16200A; color: #A9D90C; border-radius: 4px; box-shadow: none; }
.sn-game.retro .btn:not(.primary) { background: transparent; color: #16200A; border: 2px solid #16200A; }
.sn-game.retro .rr-ini input { background: #A9D90C; color: #16200A; border-color: #16200A; border-radius: 4px; }

/* v2.3.3 Roda Run retro (dino style) */
.rr-game.retro { background: #F7F7F7; }
.rr-game.retro .rr-hud { display: none; }
.rr-game.retro .rr-start, .rr-game.retro .rr-over { background: rgba(247,247,247,.9); color: #535353; font-family: "Courier New", ui-monospace, monospace; }
.rr-game.retro .rr-s { color: #757575; }
.rr-game.retro .rr-t { text-transform: uppercase; letter-spacing: .12em; }
.rr-game.retro .btn { background: #535353; color: #F7F7F7; border-radius: 4px; box-shadow: none; }
.rr-game.retro .btn:not(.primary) { background: transparent; color: #535353; border: 2px solid #535353; }
.rr-game.retro .rr-ini input { background: #fff; color: #535353; border-color: #535353; border-radius: 4px; }
#rrLook { margin-top: 12px; }

/* v2.4 web: PIN pad, welcome, vault cover, update note */
.pinpad { position: fixed; inset: 0; z-index: 200; background: var(--paper, #FBF8F2); display: flex; align-items: center; justify-content: center; padding: 20px; color: var(--ink); }
.pinpad-in { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; max-width: 340px; }
.pinpad-sub { font-size: 13.5px; color: var(--ink-soft); max-width: 300px; line-height: 1.45; }
.pinpad-sub:empty { display: none; }
.pinpad-dots { min-height: 18px; }
.pinpad-extra { display: flex; flex-direction: column; gap: 6px; align-items: center; }
.pinpad-keys button { font-family: inherit; }
html.vault-cover #app, html.vault-cover .pinpad, html.vault-cover .about-sheet { visibility: hidden; }
html.vault-cover body { background: var(--paper, #FBF8F2); }
html.web .web-hide { display: none !important; }
.wel { position: fixed; inset: 0; z-index: 190; background: var(--paper, #FBF8F2); overflow-y: auto; color: var(--ink); }
.wel-in { max-width: 480px; margin: 0 auto; padding: calc(28px + env(safe-area-inset-top)) 22px calc(28px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 14px; text-align: center; }
.wel-logo { width: 110px; margin: 0 auto; }
.wel h1 { margin: 0; font-size: 28px; font-weight: 900; }
.wel-lead { margin: 0; font-size: 16px; line-height: 1.5; color: var(--ink-soft); }
.wel-cards { display: grid; gap: 10px; text-align: left; }
.wel-card { display: grid; grid-template-columns: 40px 1fr; grid-template-rows: auto auto; column-gap: 12px; background: var(--card, #fff); border-radius: 16px; padding: 12px 14px; box-shadow: var(--shadow); }
.wel-card span { grid-row: 1 / 3; width: 40px; height: 40px; border-radius: 12px; background: var(--line); display: grid; place-items: center; }
.wel-card span svg { width: 22px; height: 22px; }
.wel-card b { font-size: 15px; } .wel-card small { font-size: 13px; color: var(--ink-soft); }
.wel-priv { background: #EAF5E4; border-radius: 14px; padding: 12px 14px; font-size: 14px; line-height: 1.45; text-align: left; }
.wel-note { font-size: 13px; color: var(--ink-soft); line-height: 1.45; }
.wel-credit { font-size: 12.5px; color: var(--ink-soft); line-height: 1.6; margin-top: 4px; }
.upd { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(96px + env(safe-area-inset-bottom)); z-index: 80; background: var(--ink); color: var(--paper); border-radius: 999px; padding: 11px 18px; font-weight: 800; font-size: 14px; box-shadow: 0 6px 20px rgba(0,0,0,.2); }
.sos-country { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; font-size: 13.5px; font-weight: 700; color: var(--ink-soft); }
.sos-country .field { width: auto; max-width: 55%; margin: 0; }
html[data-theme="ink"] .wel-card, html[data-theme="ink"] .wel-priv { border: 1px solid #111; box-shadow: none; background: #fff; }
