* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body { background: #faf6ef; font-family: 'DM Sans', sans-serif; color: #113939; display: flex; justify-content: center; }
#app { width: 100%; max-width: 430px; height: 100dvh; display: flex; flex-direction: column; position: relative; overflow: hidden; }
.screen { flex: 1; overflow-y: auto; padding: 24px 20px 16px; display: none; }
.screen.active { display: block; }
.date { font-size: 13px; color: #8a8474; }
h1 { font-family: 'Rozha One', serif; font-size: 26px; color: #164a4a; font-weight: 400; margin: 6px 0 18px; }
.card-white { background: #ffffff; border: 1px solid #ece5d8; border-radius: 18px; padding: 18px 16px; margin-bottom: 14px; }
.badge { display: inline-block; background: #e8c86a; color: #164a4a; font-size: 12px; padding: 4px 12px; border-radius: 12px; }
.prompt-q { font-family: 'Rozha One', serif; font-size: 20px; color: #164a4a; line-height: 1.45; margin: 12px 0 14px; font-weight: 400; }
textarea { width: 100%; border: 1px solid #ece5d8; border-radius: 12px; padding: 12px; font-size: 15px; font-family: 'DM Sans', sans-serif; color: #113939; resize: none; min-height: 70px; background: #fffdf9; }
textarea::placeholder { color: #b3ac9b; }
textarea:focus { outline: none; border-color: #c85a6a; }
.btn { border: none; border-radius: 12px; padding: 13px 16px; font-size: 15px; font-family: 'DM Sans', sans-serif; cursor: pointer; }
.btn-coral { background: #c85a6a; color: #faf6ef; }
.btn-soft { background: #ffffff; color: #164a4a; border: 1px solid #ece5d8; }
.blush { background: #fdf1ee; border-radius: 18px; padding: 16px; margin-bottom: 14px; }
.blush-label { font-size: 12px; color: #c85a6a; margin-bottom: 6px; }
.big-card { background: #ffffff; border: 1px solid #ece5d8; border-radius: 22px; min-height: 320px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 32px 24px; margin: 16px 0; cursor: pointer; }
.big-card .accent-bar { width: 36px; height: 3px; background: #c85a6a; border-radius: 2px; margin-bottom: 22px; }
.big-card .card-text { font-family: 'Rozha One', serif; font-size: 23px; color: #164a4a; line-height: 1.5; font-weight: 400; }
.big-card .brand { font-size: 13px; color: #b3ac9b; margin-top: 24px; }
.deck-toggle { display: flex; gap: 8px; margin-top: 14px; }
.deck-pill { flex: 1; text-align: center; padding: 9px; border-radius: 12px; font-size: 14px; border: 1px solid #ece5d8; background: #ffffff; color: #164a4a; cursor: pointer; }
.deck-pill.on { background: #164a4a; color: #faf6ef; border-color: #164a4a; }
.row-btns { display: flex; gap: 10px; }
.row-btns .btn { flex: 1; }
.shelf-item { background: #ffffff; border: 1px solid #ece5d8; border-radius: 16px; padding: 15px 16px; margin-bottom: 10px; position: relative; }
.shelf-item.stress { background: #fdf1ee; border-color: #fdf1ee; }
.shelf-item .when { font-size: 12px; color: #b3ac9b; margin-top: 6px; }
.shelf-item .unsave { position: absolute; top: 12px; right: 12px; background: none; border: none; color: #b3ac9b; font-size: 16px; cursor: pointer; }
.settings-row { background: #ffffff; border: 1px solid #ece5d8; border-radius: 16px; padding: 15px 16px; margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center; }
.toggle { width: 44px; height: 24px; border-radius: 12px; background: #d8d2c4; position: relative; cursor: pointer; transition: background 0.2s; flex-shrink: 0; }
.toggle.on { background: #c85a6a; }
.toggle::after { content: ''; width: 20px; height: 20px; border-radius: 50%; background: #faf6ef; position: absolute; top: 2px; left: 2px; transition: left 0.2s; }
.toggle.on::after { left: 22px; }
.sub { font-size: 12px; color: #8a8474; margin-top: 3px; }
nav { display: flex; border-top: 1px solid #ece5d8; background: #faf6ef; padding: 10px 0 max(10px, env(safe-area-inset-bottom)); }
nav button { flex: 1; background: none; border: none; color: #164a4a; font-size: 11px; font-family: 'DM Sans', sans-serif; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 3px; }
nav button svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
nav button.on { color: #c85a6a; }
.float-joy { position: absolute; bottom: 120px; pointer-events: none; animation: floatUp 1.8s ease-out forwards; font-size: 18px; }
@keyframes floatUp { 0% { transform: translateY(0) scale(0.6); opacity: 0; } 15% { opacity: 1; } 100% { transform: translateY(-240px) scale(1.15); opacity: 0; } }
.float-spark { position: absolute; pointer-events: none; animation: sparkUp 1.1s ease-out forwards; }
@keyframes sparkUp { 0% { transform: translateY(0) scale(0.5); opacity: 0; } 20% { opacity: 1; } 100% { transform: translateY(-90px) scale(1); opacity: 0; } }
.card-pop { animation: cardPop 0.45s ease-out; }
@keyframes cardPop { 0% { transform: scale(0.96); opacity: 0.4; } 100% { transform: scale(1); opacity: 1; } }
#toast { position: absolute; top: 60px; left: 0; right: 0; display: flex; justify-content: center; pointer-events: none; z-index: 10; }
#toast span { background: #164a4a; color: #faf6ef; font-size: 13px; padding: 7px 16px; border-radius: 16px; animation: toastIn 2s ease-out forwards; }
@keyframes toastIn { 0% { transform: translateY(8px); opacity: 0; } 12% { transform: translateY(0); opacity: 1; } 80% { opacity: 1; } 100% { opacity: 0; } }
.disclaimer { font-size: 13px; line-height: 1.55; color: #113939; }
.tagline { text-align: center; font-size: 12px; color: #b3ac9b; margin: 16px 0 4px; }
.tap-hint { font-size: 12px; color: #b3ac9b; text-align: center; }
.empty-shelf { text-align: center; color: #8a8474; font-size: 14px; line-height: 1.6; padding: 40px 20px; }

/* Stress-deck intro. Shown once before the first stress card, per the
   locked decision that the non-therapy disclaimer ships in settings AND
   in the deck intro. Copy is the verbatim intro line from the stress-cards
   content bank, not new writing. */
.deck-intro p { font-size: 13px; line-height: 1.6; color: #113939; margin-bottom: 14px; }
.deck-intro .btn { width: 100%; }
