/* "My tools" (S14). Cards reuse .ft-card (app.css) and the glowing buttons (buttons3d.css). */
.tool-rows { margin-top: var(--s2); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s4); display: grid; gap: var(--s3); box-shadow: var(--shadow-sm); }
.card + .card, .card + section, section + .card { margin-top: var(--s4); }
.card h2 { font-size: var(--fs-md); margin: 0; }

/* tracker */
.trk-big { font-family: var(--f-display); font-size: var(--fs-xl); color: var(--primary); margin: 0; }
:lang(am) .trk-big { font-family: var(--f-ethi-display); }
.trk-tri { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.trk-tri-bar { height: 12px; border-radius: 6px; background: var(--line); overflow: hidden; }
.trk-tri-bar i { display: block; height: 100%; background: rgb(var(--g-rose, 232 120 150)); }
.trk-due { margin: 0; font-size: var(--fs-md); }
.trk-tl ol { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s3); }
.trk-tl li { display: grid; grid-template-columns: 18px 1fr; gap: var(--s3); align-items: center; }
.trk-tl li::before { content: ""; width: 16px; height: 16px; border-radius: 50%; background: var(--line-2); }
.trk-tl li.is-done::before { background: rgb(var(--g-sage, 95 185 130)); }
.trk-tl li.is-now { font-weight: 700; }
.trk-tl li.is-now::before { background: rgb(var(--g-rose, 232 120 150)); box-shadow: 0 0 0 5px rgb(var(--g-rose, 232 120 150) / .25); }

/* kick counter */
.kick-alert { align-items: flex-start; }
.kick-alert a { display: inline-block; margin-top: 4px; font-weight: 700; }
.kick-card { justify-items: center; text-align: center; }
.kick-btn { width: min(62vw, 200px); aspect-ratio: 1; border-radius: 50%; border: 0; cursor: pointer; color: #fff; font: 700 3.4rem/1 var(--f-display);
  background: radial-gradient(circle at 35% 30%, #F3A9BC, #C9637F 60%, #9E4560); box-shadow: 0 6px 0 #7E3550, 0 0 40px 8px rgb(var(--g-rose, 232 120 150) / .5);
  transition: transform .08s var(--ease), box-shadow .08s var(--ease); -webkit-tap-highlight-color: transparent; }
.kick-btn:active { transform: translateY(5px); box-shadow: 0 1px 0 #7E3550, 0 0 50px 12px rgb(var(--g-rose, 232 120 150) / .6); }
.kick-btn:focus-visible { outline: 3px solid var(--gold); outline-offset: 6px; }

/* shared list pieces */
.tl-list { list-style: none; margin: 0; padding: 0; }
.tl-list > li { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding: var(--s2) 0; border-bottom: 1px solid var(--line); min-height: 52px; }
.tl-list > li:last-child { border-bottom: 0; }
.tl-check { display: flex; align-items: center; gap: var(--s3); background: none; border: 0; padding: 6px 0; font: inherit; color: inherit; text-align: start; cursor: pointer; flex: 1 1 auto; min-height: 44px; }
.tl-check[aria-pressed="true"] span:last-child { text-decoration: line-through; color: var(--ink-2); }
.tl-box { flex: none; width: 26px; height: 26px; border-radius: 8px; border: 2px solid var(--primary); display: grid; place-items: center; font-weight: 700; font-size: .9rem; }
.tl-box.is-done { background: rgb(var(--g-sage, 95 185 130)); border-color: rgb(var(--g-sage, 95 185 130)); color: #fff; }
.tl-add { display: flex; gap: var(--s2); flex-wrap: wrap; }
.tl-add .input { flex: 1 1 160px; min-width: 0; }
.tl-add .sh-amt { flex: 0 1 110px; }
.tl-bar { height: 10px; border-radius: 5px; background: var(--line); overflow: hidden; }
.tl-bar i { display: block; height: 100%; background: rgb(var(--g-sage, 95 185 130)); }
.tl-head { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); }
.tl-cats { flex-wrap: wrap; }

/* appointments */
.ap-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s4); }
.ap-item { display: grid; grid-template-columns: auto 1fr; gap: var(--s3); align-items: start; }
.ap-date { min-width: 64px; text-align: center; border-radius: var(--r-md); background: var(--lav); padding: 8px 6px; color: var(--primary); display: grid; gap: 2px; }
.ap-date strong { font-size: var(--fs-sm); line-height: 1.25; }
.ap-body { display: grid; gap: var(--s2); min-width: 0; }
.ap-body p { margin: 0; }
.ap-qs { list-style: none; margin: 0; padding: 0; }

/* shower */
.sh-count { margin: 0; }
.sh-rsvp { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; align-items: center; }
.sh-rsvp .chip { min-height: 38px; padding: 0 10px; font-size: var(--fs-xs); }
@media (max-width: 520px) { .tl-list > li:has(.sh-rsvp) { flex-direction: column; align-items: flex-start; } .sh-rsvp { justify-content: flex-start; } }

/* calm corner */
.calm-breath { justify-items: center; text-align: center; }
/* web-92: breathing orb — a lit sphere that really grows on the breath in and shrinks on the breath out (3D look) */
.breath-stage { --dur: 4s; position: relative; width: min(82vw, 340px); aspect-ratio: 1; display: grid; place-items: center; }
.bo-wrap { position: absolute; inset: 0; display: grid; place-items: center; transform: scale(.55); transition: transform var(--dur) cubic-bezier(.45,.05,.35,1); }
.breath-stage[data-phase="in"] .bo-wrap, .breath-stage[data-phase="hold"] .bo-wrap { transform: scale(1); }
.breath-stage[data-phase="out"] .bo-wrap, .breath-stage[data-phase="idle"] .bo-wrap { transform: scale(.55); }
.bo-wrap > i { position: absolute; border-radius: 50%; display: block; }
.bo-glow { inset: -12%; background: radial-gradient(circle, rgb(165 139 224 / .55), transparent 68%); filter: blur(10px); }
.bo-sphere { inset: 12%; background: radial-gradient(circle at 34% 28%, #fff 0, #eadffc 14%, #b9a2ec 46%, #6c53a6 82%, #4a3578 100%);
  box-shadow: inset -22px -30px 56px rgb(40 20 90 / .55), inset 14px 14px 34px rgb(255 255 255 / .45), 0 34px 50px -18px rgb(70 40 140 / .55); }
.bo-shine { inset: 18% 46% 58% 20%; background: radial-gradient(ellipse, rgb(255 255 255 / .85), transparent 70%); transform: rotate(-28deg); filter: blur(2px); }
.bo-ring { inset: 2%; border: 2px solid rgb(205 187 245 / .8); transform: perspective(700px) rotateX(72deg); animation: bo-spin 9s linear infinite; box-shadow: 0 0 14px rgb(165 139 224 / .5); }
.bo-r2 { inset: -2%; transform: perspective(700px) rotateX(72deg) rotateZ(60deg); animation-duration: 13s; animation-direction: reverse; border-color: rgb(240 215 235 / .6); }
@keyframes bo-spin { from { transform: perspective(700px) rotateX(72deg) rotateZ(0); } to { transform: perspective(700px) rotateX(72deg) rotateZ(360deg); } }
.bo-text { position: relative; z-index: 2; display: grid; justify-items: center; gap: 0; color: #fff; text-shadow: 0 2px 12px rgb(40 20 90 / .75); pointer-events: none; }
.bo-text b { font: 700 var(--fs-xl)/1.2 var(--f-display); }
.bo-text span { font: 800 clamp(48px, 16vw, 76px)/1 var(--f-display); font-variant-numeric: tabular-nums; }
:lang(am) .bo-text b, :lang(am) .bo-text span { font-family: var(--f-ethi-display); }
.breath-left { margin: 0; color: var(--ink-2); font-size: var(--fs-md); }
.calm-live { margin: 0; color: var(--ink-2); }
.calm-quote { margin: 0; padding: var(--s5); border-radius: var(--r-lg); text-align: center; font: var(--fs-md)/1.7 var(--f-display); color: var(--primary);
  background: linear-gradient(135deg, color-mix(in srgb, var(--lav) 80%, var(--card)), color-mix(in srgb, #E8DDF8 70%, var(--card))); }
:lang(am) .calm-quote { font-family: var(--f-ethi-display); }
.calm-saved { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2); }
.calm-saved li { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); }
@media (prefers-reduced-motion: reduce) { .kick-btn, .bo-wrap { transition: none; } .bo-ring { animation: none; } }
@media print { .kick-btn, .breath-stage { display: none; } }

/* tools hub: big stacked bars, one per row (S15) */
.tool-rows { display: grid; gap: var(--s5); --glow: var(--g-rose, 232 120 150); padding: var(--s2) 4px; }
.tool-row { --deep: color-mix(in srgb, rgb(var(--glow)) 55%, #2A1420); display: flex; align-items: center; gap: var(--s4);
  min-height: 104px; padding: var(--s4) var(--s5); border-radius: 26px; color: #fff; text-decoration: none;
  background: linear-gradient(120deg, color-mix(in srgb, rgb(var(--glow)) 62%, #2A1420), var(--deep));
  border: 1.5px solid rgb(var(--blue-light) / .75);
  box-shadow: 0 5px 0 color-mix(in srgb, rgb(var(--glow)) 35%, #1A0C12), 0 0 26px 4px rgb(var(--blue-light) / .55), inset 0 1px 0 rgb(255 255 255 / .25);
  transition: transform .12s var(--ease), box-shadow .12s var(--ease); -webkit-tap-highlight-color: transparent; }
.tool-row:hover { transform: translateY(-2px); }
.tool-row:hover { box-shadow: 0 5px 0 color-mix(in srgb, rgb(var(--glow)) 35%, #1A0C12), 0 0 34px 7px rgb(var(--blue-light) / .7), inset 0 1px 0 rgb(255 255 255 / .25); }
.tool-row:active { transform: translateY(4px); box-shadow: 0 1px 0 color-mix(in srgb, rgb(var(--glow)) 35%, #1A0C12), 0 0 38px 8px rgb(var(--blue-light) / .75); }
.tool-row:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.tool-row-icon { flex: none; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: rgb(255 255 255 / .2); }
.tool-row-icon .icon { width: 30px; height: 30px; }
.tool-row-text { display: grid; gap: 4px; min-width: 0; flex: 1; }
.tool-row-text strong { font-size: var(--fs-lg); line-height: 1.25; }
.tool-row-text small { font-size: var(--fs-base); line-height: 1.4; opacity: .95; }
.tool-row-go { flex: none; display: grid; place-items: center; }
.tool-row-go .icon { width: 28px; height: 28px; }
@media (max-width: 400px) { .tool-row { padding: var(--s4); gap: var(--s3); } .tool-row-icon { width: 54px; height: 54px; } .tool-row-text strong { font-size: var(--fs-md); } }
@media (prefers-reduced-motion: reduce) { .tool-row, .tool-row:hover, .tool-row:active { transition: none; transform: none; } }

/* S24: calming sounds — three glowing buttons, a timer and volume */
.sound-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: var(--s4); margin: var(--s4) 0; }
.sound-btn { width: 100%; text-align: left; font: inherit; cursor: pointer; }
.sound-btn[aria-pressed="true"] { outline: 3px solid rgb(var(--blue-light, 70 150 255)); outline-offset: 3px; }
.sound-btn[aria-pressed="true"] .ft-icon { animation: sound-pulse 2.4s ease-in-out infinite; }
@keyframes sound-pulse { 50% { transform: scale(1.08); } }
@media (prefers-reduced-motion: reduce) { .sound-btn[aria-pressed="true"] .ft-icon { animation: none; } }
.sound-timer { border: 0; margin: 0 0 var(--s3); padding: 0; }
.sound-vol { display: grid; gap: var(--s2); max-width: 420px; }
.sound-vol input { width: 100%; accent-color: rgb(var(--blue-light, 70 150 255)); }
.sound-status { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: center; margin-top: var(--s3); }
.sound-status p { margin: 0; font-weight: 600; min-height: 1.5em; }
.sound-grid .sound-btn { flex-direction: row; align-items: center; min-height: 84px; padding: var(--s3) var(--s4); }

/* S25: baby shower invitation card */
.sh-themes { border: 0; margin: 0 0 var(--s3); padding: 0; }
.sh-card { margin: var(--s4) auto; max-width: 420px; }
.sh-card-img { display: block; width: 100%; height: auto; aspect-ratio: 1080 / 1350; border-radius: var(--r-md); background: var(--sunk);
  box-shadow: 0 0 0 2px rgb(var(--blue-light, 70 150 255) / .6), 0 0 26px 4px rgb(var(--blue-light, 70 150 255) / .35); }
.sh-card-acts { justify-content: center; }

/* web-100: one clean layout for the six tools — existing colours, icons and tokens only */
.tool-head { margin-bottom: var(--s2); }
.tool-switch { --glow: var(--g-rose, 232 120 150); width: 100%; max-width: 100%; min-width: 0; contain: inline-size; display: flex; gap: var(--s2); overflow-x: auto; padding: 4px 2px var(--s3); margin: 0 0 var(--s2); scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.tool-switch::-webkit-scrollbar { display: none; }
.tool-chip { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 6px 14px; border-radius: 99px; text-decoration: none; font-weight: 600; font-size: var(--fs-sm);
  color: color-mix(in srgb, rgb(var(--glow)) 70%, #2A1420); background: color-mix(in srgb, rgb(var(--glow)) 14%, var(--card)); border: 1.5px solid color-mix(in srgb, rgb(var(--glow)) 45%, transparent); }
.tool-chip[aria-current="page"] { color: #fff; background: linear-gradient(120deg, color-mix(in srgb, rgb(var(--glow)) 62%, #2A1420), color-mix(in srgb, rgb(var(--glow)) 55%, #2A1420)); border-color: transparent; }
.tool-chip:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.tool-saved { margin: 0 0 var(--s3); min-height: 1.4em; font-size: var(--fs-sm); font-weight: 600; color: var(--ok); }
.tool-saved:empty { min-height: 0; margin: 0; }
.tool-main-btn { width: 100%; justify-content: center; min-height: 52px; margin-bottom: var(--s4); }
details.card > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: var(--s3); min-height: 44px; }
details.card > summary::-webkit-details-marker { display: none; }
details.card > summary h2 { margin: 0; }
details.card > summary::after { content: "⌄"; font-size: 1.4rem; line-height: 1; color: var(--ink-2); transition: transform .2s; }
details.card[open] > summary::after { transform: rotate(180deg); }
details.card[open] > summary { margin-bottom: var(--s3); }
/* tracker: a progress ring with the week in the middle */
.trk-hero { display: flex; align-items: center; gap: var(--s4); margin-bottom: var(--s4); }
.trk-ring { --p: 0; flex: none; width: 116px; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--primary) calc(var(--p) * 1%), var(--sunk) 0); }
.trk-ring > div { width: 84%; aspect-ratio: 1; border-radius: 50%; background: var(--card); display: grid; place-content: center; text-align: center; }
.trk-ring b { font: 700 2.4rem/1 var(--f-display); color: var(--primary); }
.trk-ring small { font-size: var(--fs-sm); color: var(--ink-2); }
.trk-facts { min-width: 0; } .trk-facts p { margin: 0 0 4px; }
/* kick counter: a running clock above the big button */
.kick-card { text-align: center; }
.kick-timer { margin: 0; font: 700 2rem/1.2 var(--f-display); color: var(--primary); }
.kick-alert { font-size: var(--fs-sm); }
/* appointments: the next one first */
.ap-next { border-left: 5px solid var(--gold); }
.ap-next .eyebrow { margin: 0 0 var(--s2); }
.ap-next-row { display: flex; align-items: center; gap: var(--s4); }
.ap-next-date { flex: none; min-width: 84px; padding: var(--s3); border-radius: var(--r-md, 14px); background: var(--sunk); text-align: center; display: grid; gap: 2px; }
.ap-next-when { margin: 0 0 4px; font-weight: 700; color: var(--primary); }
.ap-next p { margin: 0; }
/* baby shower: the countdown on top */
.sh-hero .sh-count { margin: 0; font-size: var(--fs-md); text-align: center; }
/* checklist: all lists at a glance; categories in one swipeable row */
.tl-all { display: grid; gap: 6px; margin: 0 0 var(--s3); font-weight: 600; }
.tl-cats { flex-wrap: nowrap !important; max-width: 100%; min-width: 0; contain: inline-size; overflow-x: auto; scrollbar-width: none; } .tl-cats::-webkit-scrollbar { display: none; }
.tl-cats button { flex: none; white-space: nowrap; }
.tl-list [data-item-del] { opacity: .55; } .tl-list [data-item-del]:hover, .tl-list [data-item-del]:focus-visible { opacity: 1; }
@media (max-width: 360px) { .trk-ring { width: 96px; } .trk-ring b { font-size: 2rem; } .ap-next-date { min-width: 70px; } }
/* every block under a tool head stays inside the phone's width (long words wrap instead of widening the page) */
.tool-head ~ .card, .tool-head ~ section, .tool-head ~ details { min-width: 0; max-width: 100%; overflow-wrap: anywhere; box-sizing: border-box; }
.tool-head ~ .card *, .tool-head ~ section * { min-width: 0; }
