/* Get Less Angry — app experience. Calm 95%, bold 5%. */
:root {
  --cream: #fbf7f1; --cream-2: #f3ece2; --ink: #1c1917; --ink-2: #57534e; --ink-3: #a8a29e; --line: rgba(28,25,23,.1);
  --ember: #c2410c; --ember-soft: #fde7d9; --indigo: #3730a3; --indigo-soft: #e4e2fb; --sage: #3f6b5a; --sage-soft: #e3efe8; --gold: #b7791f; --gold-soft: #fbf0d6;
  --r: 22px; --r-sm: 14px; --shadow: 0 18px 50px rgba(28,25,23,.12); --safe-b: env(safe-area-inset-bottom, 0px);
  --ff-display: "Fraunces", Georgia, serif; --ff-body: "Inter", system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--ff-body); color: var(--ink); background: var(--cream); line-height: 1.45; -webkit-font-smoothing: antialiased; overscroll-behavior-y: none; }
button, input { font: inherit; }
.app { max-width: 560px; margin: 0 auto; min-height: 100dvh; display: flex; flex-direction: column; position: relative; }
.bar { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px 8px; }
.brand { font-family: var(--ff-display); font-weight: 600; font-size: 1.05rem; letter-spacing: -.02em; text-decoration: none; color: var(--ink); }
.brand span { color: var(--ink-3); }
.bar-actions { display: flex; gap: 8px; }
.icon-btn { border: 1px solid var(--line); background: #fff; border-radius: 999px; width: 38px; height: 38px; display: grid; place-items: center; color: var(--ink-2); cursor: pointer; }
.icon-btn svg { width: 18px; height: 18px; }
.screen { display: none; flex: 1; flex-direction: column; padding: 8px 20px calc(28px + var(--safe-b)); animation: rise .38s ease both; }
.screen.is-active { display: flex; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.eyebrow { font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); font-weight: 600; margin: 0 0 10px; }
h1, h2, h3 { font-family: var(--ff-display); font-weight: 600; letter-spacing: -.025em; line-height: 1.08; margin: 0 0 12px; }
h1 { font-size: clamp(2rem, 8vw, 2.6rem); } h2 { font-size: clamp(1.55rem, 6vw, 1.95rem); } h3 { font-size: 1.2rem; }
p { margin: 0 0 12px; color: var(--ink-2); }
.lead { font-size: 1.08rem; color: var(--ink); }
.grow { flex: 1; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 999px; padding: 16px 22px; font-weight: 600; font-size: 1rem; cursor: pointer; text-decoration: none; transition: transform .12s ease, background .2s ease; width: 100%; }
.btn:active { transform: scale(.985); }
.btn-primary { background: var(--ink); color: #fff; }
.btn-ember { background: var(--ember); color: #fff; }
.btn-indigo { background: var(--indigo); color: #fff; }
.btn-gold { background: var(--gold); color: #fff; }
.btn-ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn-text { background: transparent; color: var(--ink-2); padding: 10px; font-weight: 500; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.note { font-size: .82rem; color: var(--ink-3); text-align: center; margin-top: 8px; }
.privacy-pill { display: inline-flex; align-items: center; gap: 6px; background: var(--sage-soft); color: var(--sage); border-radius: 999px; padding: 6px 12px; font-size: .78rem; font-weight: 600; margin-bottom: 14px; }
.privacy-pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--sage); }
/* welcome */
.welcome-art { position: relative; height: 210px; margin: 6px 0 18px; border-radius: var(--r); background: radial-gradient(circle at 30% 30%, #fff 0%, var(--cream-2) 60%, #ebe2d3 100%); overflow: hidden; }
.orb { position: absolute; border-radius: 50%; filter: blur(2px); opacity: .9; animation: drift 9s ease-in-out infinite alternate; }
.orb-a { width: 140px; height: 140px; left: 12%; top: 18%; background: radial-gradient(circle, #f6a77b 0%, var(--ember) 70%); }
.orb-b { width: 110px; height: 110px; right: 14%; top: 34%; background: radial-gradient(circle, #a9a3f0 0%, var(--indigo) 75%); animation-delay: -4s; }
.orb-c { width: 80px; height: 80px; left: 46%; bottom: 10%; background: radial-gradient(circle, #9fd1b8 0%, var(--sage) 75%); animation-delay: -7s; }
@keyframes drift { from { transform: translate(0,0) scale(1); } to { transform: translate(14px,-10px) scale(1.08); } }
.welcome-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 4px 0 18px; }
.welcome-steps div { background: #fff; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px 10px; font-size: .82rem; color: var(--ink-2); }
.welcome-steps strong { display: block; color: var(--ink); font-size: .9rem; margin-bottom: 2px; }
/* profile */
.progress { height: 4px; background: var(--line); border-radius: 4px; overflow: hidden; margin: 4px 0 20px; }
.progress i { display: block; height: 100%; background: var(--ink); width: 0; transition: width .3s ease; }
.options { display: flex; flex-direction: column; gap: 10px; margin: 6px 0 16px; }
.opt { display: flex; align-items: center; justify-content: space-between; text-align: left; width: 100%; background: #fff; border: 1.5px solid var(--line); border-radius: var(--r-sm); padding: 16px 18px; font-size: 1rem; font-weight: 500; color: var(--ink); cursor: pointer; transition: border-color .15s ease, background .15s ease; }
.opt::after { content: ""; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--ink-3); flex: 0 0 auto; }
.opt.is-on { border-color: var(--ink); background: #fffdf9; }
.opt.is-on::after { background: var(--ink); border-color: var(--ink); box-shadow: inset 0 0 0 4px #fff; }
/* multi-select: square box with a tick, so "pick several" reads correctly */
.opt.is-multi::after { border-radius: 6px; }
.opt.is-multi.is-on::after { box-shadow: none; background: var(--ink); border-color: var(--ink); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 13l4 4L19 7'/%3E%3C/svg%3E"); background-size: 14px; background-repeat: no-repeat; background-position: center; }
/* choose */
.mode-cards { display: flex; flex-direction: column; gap: 12px; margin: 6px 0 14px; }
.mode { display: flex; gap: 14px; align-items: center; text-align: left; background: #fff; border: 1.5px solid var(--line); border-radius: var(--r); padding: 18px; cursor: pointer; width: 100%; transition: transform .12s ease; }
.mode:active { transform: scale(.985); }
.mode-icon { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; font-size: 1.5rem; flex: 0 0 auto; }
.mode-shout .mode-icon { background: var(--ember-soft); } .mode-shake .mode-icon { background: var(--indigo-soft); } .mode-breathe .mode-icon { background: var(--sage-soft); }
.mode strong { display: block; font-size: 1.05rem; margin-bottom: 2px; color: var(--ink); }
.mode small { color: var(--ink-2); font-size: .86rem; }
/* capture */
.screen.capture.is-active { display: flex; flex-direction: column; align-items: center; text-align: center; }
.ring-wrap { position: relative; width: 250px; height: 250px; margin: 14px auto 18px; }
.ring-wrap svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-track { fill: none; stroke: var(--line); stroke-width: 10; }
.ring-fill { fill: none; stroke-width: 10; stroke-linecap: round; stroke-dasharray: 660; stroke-dashoffset: 660; transition: stroke-dashoffset .15s linear; }
.shout .ring-fill { stroke: var(--ember); } .shake .ring-fill { stroke: var(--indigo); } .breathe .ring-fill { stroke: var(--sage); }
.ring-core { position: absolute; inset: 24px; border-radius: 50%; display: grid; place-items: center; background: #fff; box-shadow: inset 0 0 0 1px var(--line); transition: transform .08s ease; }
.shout .ring-core { background: radial-gradient(circle, #fff 30%, var(--ember-soft) 100%); }
.shake .ring-core { background: radial-gradient(circle, #fff 30%, var(--indigo-soft) 100%); }
.breathe .ring-core { background: radial-gradient(circle, #fff 30%, var(--sage-soft) 100%); }
.ring-core strong { font-family: var(--ff-display); font-size: 3rem; font-weight: 600; letter-spacing: -.03em; line-height: 1; }
.ring-core small { display: block; color: var(--ink-2); font-size: .82rem; margin-top: 6px; }
.live-hint { min-height: 48px; font-size: 1.05rem; color: var(--ink); font-weight: 500; }
.meter { width: 100%; height: 56px; display: flex; align-items: flex-end; gap: 3px; margin: 8px 0 16px; }
.meter i { flex: 1; background: var(--ink-3); border-radius: 3px; height: 6%; transition: height .1s linear; opacity: .8; }
.shout .meter i { background: var(--ember); } .shake .meter i { background: var(--indigo); } .breathe .meter i { background: var(--sage); }
/* reset ritual */
.ritual-step { font-family: var(--ff-display); font-size: clamp(1.7rem, 7vw, 2.2rem); font-weight: 600; letter-spacing: -.02em; text-align: center; min-height: 3.2em; display: grid; place-items: center; margin: 6px 0; transition: opacity .3s ease; }
.breath-orb { width: 170px; height: 170px; margin: 8px auto 12px; border-radius: 50%; background: radial-gradient(circle, #fff 0%, var(--sage-soft) 60%, #cfe3d8 100%); box-shadow: 0 0 0 12px rgba(63,107,90,.08); transform: scale(.7); transition: transform 4s ease-in-out; }
.breath-orb.in { transform: scale(1.05); } .breath-orb.hold { transform: scale(1.05); transition-duration: 2s; } .breath-orb.out { transform: scale(.7); transition-duration: 8s; }
/* signature */
.sig-card { background: #fff; border-radius: var(--r); padding: 22px; box-shadow: var(--shadow); border: 1px solid var(--line); position: relative; overflow: hidden; }
.sig-card::before { content: ""; position: absolute; inset: -40% -20% auto; height: 70%; background: radial-gradient(circle, var(--ember-soft), transparent 70%); opacity: .8; pointer-events: none; }
.sig-card[data-sig="pressure"]::before { background: radial-gradient(circle, var(--gold-soft), transparent 70%); }
.sig-card[data-sig="wildfire"]::before { background: radial-gradient(circle, #ffd9c2, transparent 70%); }
.sig-card[data-sig="icefront"]::before { background: radial-gradient(circle, #dbeafe, transparent 70%); }
.sig-card[data-sig="tidal"]::before { background: radial-gradient(circle, #d7f1ea, transparent 70%); }
.sig-emoji { font-size: 2.4rem; line-height: 1; margin-bottom: 8px; position: relative; }
.sig-name { font-family: var(--ff-display); font-size: 2rem; font-weight: 600; letter-spacing: -.03em; margin: 0 0 4px; position: relative; }
.sig-shape { color: var(--ink-2); margin: 0 0 12px; position: relative; }
.sig-truth { font-size: 1.02rem; color: var(--ink); position: relative; }
.sig-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0 4px; position: relative; }
.sig-stats div { background: var(--cream); border-radius: 12px; padding: 10px; text-align: center; }
.sig-stats strong { display: block; font-family: var(--ff-display); font-size: 1.3rem; }
.sig-stats small { color: var(--ink-2); font-size: .74rem; }
.calm-save-row { display: flex; gap: 8px; margin-top: 14px; }
.calm-save-row .btn { padding: 12px 10px; font-size: .92rem; }
/* plan */
.plan-head { background: var(--ink); color: #fff; border-radius: var(--r); padding: 22px; margin-bottom: 14px; }
.plan-head .eyebrow { color: rgba(255,255,255,.7); }
.plan-head h2 { color: #fff; }
.plan-head p { color: rgba(255,255,255,.78); margin: 0; }
.day { background: #fff; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 16px; margin-bottom: 10px; position: relative; }
.day-k { font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; }
.day h3 { margin: 4px 0 8px; }
.day p { margin: 0 0 8px; }
.day .script { background: var(--cream); border-left: 3px solid var(--ink); padding: 10px 12px; border-radius: 8px; font-family: var(--ff-display); font-size: 1.02rem; color: var(--ink); }
.day.is-locked { overflow: hidden; }
.day.is-locked .day-body { filter: blur(6px); pointer-events: none; user-select: none; }
.day.is-locked::after { content: "Unlocks with your plan"; position: absolute; inset: auto 12px 12px auto; background: var(--gold-soft); color: var(--gold); font-size: .74rem; font-weight: 700; padding: 6px 10px; border-radius: 999px; }
.offer { background: linear-gradient(160deg, #fff 0%, var(--gold-soft) 100%); border: 1px solid #ecd9a8; border-radius: var(--r); padding: 22px; margin: 14px 0; box-shadow: var(--shadow); }
.offer .eyebrow { color: var(--gold); }
.offer-price { display: flex; align-items: baseline; gap: 10px; margin: 8px 0 6px; }
.offer-price strong { font-family: var(--ff-display); font-size: 2.6rem; letter-spacing: -.03em; line-height: 1; }
.offer-price s { color: var(--ink-3); font-size: 1.1rem; }
.offer-price small { color: var(--ink-2); }
.offer ul { margin: 8px 0 14px; padding-left: 18px; color: var(--ink-2); }
.offer li { margin-bottom: 4px; }
.window { display: flex; align-items: center; gap: 10px; font-size: .86rem; color: var(--ink-2); margin-bottom: 12px; }
.window b { font-variant-numeric: tabular-nums; color: var(--ink); }
.guarantee { font-size: .8rem; color: var(--ink-2); text-align: center; margin-top: 10px; }
/* home */
.home-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 6px 0 14px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 14px; }
.stat strong { display: block; font-family: var(--ff-display); font-size: 1.9rem; letter-spacing: -.03em; line-height: 1.05; }
.stat small { color: var(--ink-2); font-size: .8rem; }
.saves { list-style: none; margin: 0 0 14px; padding: 0; }
.saves li { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 8px; font-size: .92rem; display: flex; justify-content: space-between; gap: 10px; }
.saves li span { color: var(--ink-3); font-size: .8rem; white-space: nowrap; }
.empty { text-align: center; color: var(--ink-3); padding: 20px; border: 1px dashed var(--line); border-radius: var(--r-sm); margin-bottom: 14px; }
/* sheet */
.sheet-backdrop { position: fixed; inset: 0; background: rgba(28,25,23,.45); display: none; z-index: 40; }
.sheet { visibility: hidden; position: fixed; left: 0; right: 0; bottom: 0; max-width: 560px; margin: 0 auto; background: var(--cream); border-radius: 24px 24px 0 0; padding: 18px 22px calc(28px + var(--safe-b)); z-index: 41; transform: translateY(105%); transition: transform .3s ease; max-height: 86dvh; overflow: auto; }
.sheet.is-open { transform: none; visibility: visible; }
.sheet-backdrop.is-open { display: block; }
.sheet h3 { margin-top: 8px; }
.sheet ul { padding-left: 18px; color: var(--ink-2); }
.toast { position: fixed; left: 50%; bottom: calc(24px + var(--safe-b)); transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 999px; font-size: .9rem; opacity: 0; transition: all .25s ease; z-index: 50; pointer-events: none; white-space: nowrap; }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.share-canvas { display: none; }
@media (min-width: 640px) { .app { padding-top: 12px; } .screen { padding-left: 28px; padding-right: 28px; } }
@media (prefers-reduced-motion: reduce) { .orb, .screen { animation: none; } }
