:root {
  --ink: #30242d;
  --muted: #6f4858;
  --rose: #ed1c2e;
  --rose-dark: #a80f2a;
  --blush: #f8c2d5;
  --powder: #ffe5ee;
  --cream: #fff4f8;
  --gold: #cf1830;
  --mint: #f6d4e1;
  --white: #fff9fb;
  --line: rgba(168, 15, 42, .16);
  --shadow: 0 16px 40px rgba(96, 27, 50, .15);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; }
html { background: #f8c2d5; }
body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at 92% -8%, rgba(243,166,194,.74), transparent 38%),
    radial-gradient(circle at 0% 30%, rgba(237,28,46,.09), transparent 31%),
    linear-gradient(180deg, #fff4f8 0%, #fbd7e4 52%, #f3a6c2 100%);
  font: 15px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
.app-shell { width: min(100%, 560px); min-height: 100vh; margin: 0 auto; padding: 0 18px calc(96px + var(--safe-bottom)); }
.demo-banner { margin: 0 -18px; padding: 8px 16px; text-align: center; color: #fff; background: #a80f2a; font-size: 11px; font-weight: 800; letter-spacing: .08em; }
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 21px 2px 17px; }
h1 { margin: 1px 0 0; font-family: Georgia, serif; font-size: 27px; letter-spacing: .04em; }
h2 { margin: 4px 0 9px; font: 700 28px/1.12 Georgia, serif; }
h3 { margin: 0; font-size: 18px; }
p { margin: 0; }
.eyebrow { margin: 0; color: var(--rose-dark); font-size: 10.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.eyebrow.light { color: rgba(255,255,255,.9); }
.avatar, .profile-avatar { display: grid; place-items: center; width: 45px; height: 45px; border: 1px solid rgba(255,255,255,.8); border-radius: 50%; color: #fff; background: linear-gradient(145deg, #ed1c2e, #a80f2a); box-shadow: 0 8px 20px rgba(168,15,42,.27); font: 700 19px Georgia, serif; }
.avatar { cursor: pointer; }
.loading-card, .error-card { margin-top: 18vh; padding: 34px 24px; text-align: center; border: 1px solid var(--line); border-radius: 26px; background: rgba(255,249,251,.9); box-shadow: var(--shadow); }
.loader { width: 38px; height: 38px; margin: 0 auto 16px; border: 3px solid var(--blush); border-top-color: var(--rose); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.error-icon { display: grid; place-items: center; width: 44px; height: 44px; margin: 0 auto 13px; color: #fff; background: var(--rose); border-radius: 50%; font-weight: 800; }
.error-card p { margin: 10px 0 20px; color: var(--muted); }
.view { display: none; animation: rise .24s ease-out; }
.view.active { display: block; }
@keyframes rise { from { opacity: .35; transform: translateY(8px); } }
.hero-card, .profile-hero { position: relative; overflow: hidden; display: flex; min-height: 198px; padding: 25px; color: #fff; border-radius: 29px; background: linear-gradient(135deg, #a80f2a 0%, #cf1830 52%, #ed1c2e 100%); box-shadow: 0 20px 46px rgba(168,15,42,.3); }
.hero-card::before, .profile-hero::before { content: ""; position: absolute; width: 190px; height: 190px; right: -68px; top: -86px; border: 1px solid rgba(255,255,255,.2); border-radius: 50%; }
.hero-copy { position: relative; z-index: 1; width: 74%; align-self: center; }
.hero-copy p:last-child { color: rgba(255,255,255,.94); }
.hero-orb { position: absolute; right: -8px; bottom: 23px; display: grid; place-items: center; width: 100px; height: 100px; color: rgba(255,255,255,.82); border: 1px solid rgba(255,255,255,.35); border-radius: 50%; background: rgba(255,255,255,.09); font: 700 18px Georgia, serif; letter-spacing: .08em; }
.summary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 14px 0 22px; }
.summary-card { display: flex; align-items: center; gap: 12px; min-height: 82px; padding: 15px; text-align: left; border: 1px solid rgba(255,255,255,.84); border-radius: 21px; background: rgba(255,249,251,.92); box-shadow: 0 10px 26px rgba(96,27,50,.11); cursor: pointer; }
.summary-card b, .summary-card small { display: block; }
.summary-card b { font-size: 17px; }
.summary-card small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.summary-icon { display: grid; place-items: center; flex: 0 0 38px; height: 38px; border-radius: 13px; font: 700 17px Georgia, serif; }
.summary-icon.gold { color: #a80f2a; background: #f8c2d5; }
.summary-icon.rose { color: #cf1830; background: #ffe5ee; }
.section-card { padding: 21px; border: 1px solid rgba(255,255,255,.84); border-radius: 24px; background: rgba(255,249,251,.92); box-shadow: var(--shadow); }
.section-heading { display: flex; align-items: center; gap: 12px; }
.section-symbol { display: grid; place-items: center; width: 42px; height: 42px; color: var(--rose-dark); background: var(--blush); border-radius: 14px; }
.weekly-copy { margin-top: 16px; color: #59404b; white-space: pre-line; }
.section-title-row { display: flex; align-items: center; justify-content: space-between; margin: 25px 2px 12px; }
.pill { padding: 5px 10px; color: var(--rose-dark); border-radius: 999px; background: var(--blush); font-size: 11px; font-weight: 700; }
.quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.quick-card { min-height: 130px; padding: 17px; text-align: left; border: 1px solid rgba(255,255,255,.7); border-radius: 23px; color: var(--ink); cursor: pointer; box-shadow: 0 12px 30px rgba(96,27,50,.12); }
.quick-card span, .quick-card b, .quick-card small { display: block; }
.quick-card span { margin-bottom: 18px; font-size: 25px; }
.quick-card b { font-size: 15px; }
.quick-card small { margin-top: 4px; color: var(--muted); font-size: 12px; }
.quick-card.blush { background: #f3a6c2; }
.quick-card.mint { background: #f8c2d5; }
.quick-card.cream { background: #ffe5ee; }
.quick-card.pearl { background: #fff4f8; }
.page-heading { padding: 10px 3px 21px; }
.page-heading p:last-child { max-width: 370px; color: var(--muted); }
.balance-card { padding: 23px; color: #fff; border-radius: 25px; background: linear-gradient(135deg, #a80f2a, #ed1c2e); box-shadow: 0 18px 38px rgba(168,15,42,.27); }
.balance-card > span { color: rgba(255,255,255,.76); font-size: 12px; }
.balance-card strong { display: block; margin: 5px 0; font: 700 38px Georgia, serif; }
.balance-card strong small { font: 600 14px/1 sans-serif; }
.balance-card p { color: rgba(255,255,255,.75); font-size: 12px; }
.catalog-list, .practice-list, .activity-list { display: grid; gap: 11px; }
.catalog-item, .practice-card, .activity-item { border: 1px solid rgba(255,255,255,.84); border-radius: 21px; background: rgba(255,249,251,.93); box-shadow: 0 10px 27px rgba(96,27,50,.1); }
.catalog-item { display: grid; grid-template-columns: 48px 1fr auto; align-items: center; gap: 12px; padding: 14px; }
.catalog-icon { display: grid; place-items: center; width: 48px; height: 48px; color: var(--rose-dark); background: var(--powder); border-radius: 16px; font-size: 21px; }
.catalog-copy b, .catalog-copy small { display: block; }
.catalog-copy small { margin-top: 4px; color: var(--muted); }
.redeem-button { padding: 10px 12px; color: #fff; border: 0; border-radius: 14px; background: var(--rose-dark); font-size: 12px; font-weight: 800; cursor: pointer; }
.redeem-button:disabled { color: #9b9292; background: #e6dfdd; cursor: not-allowed; }
.practice-card { overflow: hidden; }
.practice-card button { display: flex; justify-content: space-between; width: 100%; padding: 19px; text-align: left; border: 0; color: var(--ink); background: transparent; cursor: pointer; }
.practice-card button span:first-child { font-weight: 750; }
.practice-card .practice-text { display: none; padding: 0 19px 20px; color: var(--muted); }
.practice-card.open .practice-text { display: block; }
.practice-card.open .chevron { transform: rotate(45deg); }
.chevron { transition: transform .2s; }
.soft-note { display: flex; gap: 13px; margin-top: 17px; padding: 18px; color: #5e3446; border-radius: 20px; background: var(--blush); }
.form-card { display: grid; gap: 17px; padding: 20px; border: 1px solid rgba(255,255,255,.76); border-radius: 25px; background: rgba(255,249,251,.93); box-shadow: var(--shadow); }
.form-card label { color: #5e3c4b; font-size: 12px; font-weight: 700; }
input, textarea { width: 100%; margin-top: 7px; padding: 13px 14px; color: var(--ink); border: 1px solid var(--line); border-radius: 14px; outline: none; background: #fff9fb; resize: vertical; }
input:focus, textarea:focus { border-color: var(--rose); box-shadow: 0 0 0 3px rgba(237,28,46,.16); }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 15px; cursor: pointer; }
.switch-row span b, .switch-row span small { display: block; }
.switch-row span small { margin-top: 3px; color: var(--muted); font-weight: 400; }
.switch-row input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-row i { position: relative; flex: 0 0 46px; height: 27px; border-radius: 30px; background: #ded6d4; transition: .2s; }
.switch-row i::after { content: ""; position: absolute; width: 21px; height: 21px; left: 3px; top: 3px; border-radius: 50%; background: #fff; box-shadow: 0 2px 7px rgba(0,0,0,.14); transition: .2s; }
.switch-row input:checked + i { background: var(--rose); }
.switch-row input:checked + i::after { transform: translateX(19px); }
.primary-button, .secondary-button { min-height: 48px; padding: 12px 17px; border-radius: 15px; font-weight: 800; cursor: pointer; }
.primary-button { color: #fff; border: 0; background: linear-gradient(135deg, var(--rose-dark), #cf1830); box-shadow: 0 10px 24px rgba(168,15,42,.27); }
.secondary-button { color: var(--ink); border: 1px solid var(--line); background: #ffe5ee; }
.primary-button:disabled { opacity: .55; cursor: progress; }
.success-card { padding: 35px 23px; text-align: center; border-radius: 25px; background: var(--mint); }
.success-card span { display: grid; place-items: center; width: 46px; height: 46px; margin: 0 auto 12px; color: #fff; border-radius: 50%; background: var(--rose-dark); font-weight: 800; }
.profile-hero { min-height: 154px; align-items: center; gap: 18px; }
.profile-hero .profile-avatar { position: relative; z-index: 1; flex: 0 0 58px; width: 58px; height: 58px; background: rgba(255,255,255,.16); }
.profile-hero > div:last-child { position: relative; z-index: 1; }
.profile-hero h2 { margin: 2px 0 4px; font-size: 23px; }
.profile-hero p:last-child { color: rgba(255,255,255,.72); font-size: 12px; }
.profile-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 13px; }
.profile-stats article { padding: 17px; border: 1px solid rgba(255,255,255,.78); border-radius: 19px; background: rgba(255,249,251,.9); }
.profile-stats span, .profile-stats b { display: block; }
.profile-stats span { color: var(--muted); font-size: 11px; }
.profile-stats b { margin-top: 4px; font-size: 17px; }
.activity-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px; }
.activity-item div b, .activity-item div small { display: block; }
.activity-item small { margin-top: 3px; color: var(--muted); }
.activity-amount { white-space: nowrap; font-weight: 800; }
.activity-amount.plus { color: #4f8877; }
.activity-amount.minus { color: var(--rose-dark); }
.empty-state { padding: 24px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: 19px; }
.bottom-nav { position: fixed; z-index: 20; left: 50%; bottom: 0; display: grid; grid-template-columns: repeat(5, 1fr); width: min(100%, 560px); padding: 8px 12px calc(8px + var(--safe-bottom)); border-top: 1px solid rgba(168,15,42,.18); background: rgba(255,249,251,.98); box-shadow: 0 -12px 30px rgba(96,27,50,.13); backdrop-filter: blur(18px); transform: translateX(-50%); }
.bottom-nav button { padding: 4px 0; color: #775364; border: 0; background: transparent; cursor: pointer; }
.bottom-nav span, .bottom-nav small { display: block; }
.bottom-nav span { display: grid; place-items: center; width: 32px; height: 27px; margin: 0 auto; border-radius: 10px; font-size: 20px; line-height: 1; }
.bottom-nav small { margin-top: 4px; font-size: 11px; font-weight: 800; }
.bottom-nav button.active { color: var(--rose-dark); }
.bottom-nav button.active span { background: #f8c2d5; }
.toast { position: fixed; z-index: 50; left: 50%; bottom: calc(88px + var(--safe-bottom)); width: calc(100% - 36px); max-width: 510px; padding: 13px 16px; text-align: center; color: #fff; border-radius: 15px; background: rgba(57,48,48,.92); box-shadow: var(--shadow); transform: translateX(-50%); }
.confirm-dialog { width: min(calc(100% - 36px), 440px); padding: 25px; text-align: center; border: 0; border-radius: 25px; color: var(--ink); background: var(--white); box-shadow: 0 30px 90px rgba(55,36,36,.3); }
.confirm-dialog::backdrop { background: rgba(50,38,38,.48); backdrop-filter: blur(3px); }
.dialog-symbol { display: grid; place-items: center; width: 50px; height: 50px; margin: 0 auto 13px; color: #fff; border-radius: 50%; background: linear-gradient(145deg, var(--rose), var(--gold)); font: 700 18px Georgia,serif; }
.confirm-dialog p { margin: 8px 0 20px; color: var(--muted); }
.dialog-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
[hidden] { display: none !important; }
@media (min-width: 560px) { body { padding: 24px 0; } .app-shell { min-height: calc(100vh - 48px); border: 1px solid rgba(255,255,255,.74); border-radius: 30px; background: rgba(255,244,248,.68); box-shadow: 0 30px 90px rgba(96,27,50,.2); } .bottom-nav { bottom: 24px; border-radius: 0 0 30px 30px; } }
@media (max-width: 360px) { .app-shell { padding-left: 13px; padding-right: 13px; } .hero-card { padding: 21px; } .hero-copy { width: 80%; } .quick-grid { gap: 9px; } .catalog-item { grid-template-columns: 42px 1fr; } .redeem-button { grid-column: 1/-1; } }
