/* Hard day mode: same colors, turned down. Softer glow, rounder, slower. */

body.calm::before { opacity: 0.45; filter: saturate(0.7); }
.hardday { max-width: 760px; }
.hd-hello { display: grid; gap: 10px; }
.hd-hello h1 { font-size: clamp(1.9rem, 6.5vw, 2.6rem); line-height: 1.15; }
.hardday .lede { color: var(--muted); font-size: 1.08rem; max-width: 52ch; }

/* Tiles */
.hd-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: 12px; }
.hd-tile {
  appearance: none; border: 0; cursor: pointer; font: inherit; color: var(--ink); text-align: left;
  display: grid; grid-template-columns: 44px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 12px; align-items: center;
  padding: 16px; border-radius: var(--r-lg);
  background: linear-gradient(150deg, rgba(155, 93, 229, 0.16), rgba(61, 169, 252, 0.08)), var(--surface);
  transition: transform .2s ease, box-shadow .2s ease;
}
.hd-tile:hover { transform: translateY(-2px); }
.hd-tile[aria-expanded="true"] { box-shadow: 0 0 0 2px var(--lav), 0 0 24px rgba(155, 93, 229, 0.25); }
.ht-ic {
  grid-row: 1 / 3; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  font-size: 1.2rem; background: rgba(255, 255, 255, 0.07); color: #FFB3D6;
}
.ht-t { font-weight: 800; font-size: 1.02rem; }
.ht-s { font-size: 0.84rem; color: var(--muted); }

/* Sections */
.hd-sec { display: grid; gap: 14px; scroll-margin-top: 120px; animation: hd-in .35s ease; }
@keyframes hd-in { from { opacity: 0; transform: translateY(6px); } }
.hd-sec-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.hd-sec-head h2 { font-size: 1.45rem; }
.hd-sec h3 { font-size: 1.05rem; margin-top: 6px; }
.hd-center { text-align: center; }
.hd-center-row { justify-content: center; align-items: center; gap: 16px; }

.hd-seg { display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--surface-2); }
.hd-seg button {
  flex: 1; appearance: none; border: 0; background: transparent; font: inherit; font-weight: 800; font-size: 0.86rem;
  padding: 8px 6px; border-radius: 999px; color: var(--ink); cursor: pointer;
}
.hd-seg button[aria-pressed="true"] { background: var(--lav); color: #fff; }

/* Breathing circle */
.breath-stage { display: grid; place-items: center; height: min(62vw, 300px); }
.breath-ring {
  --s: 0.55;
  width: min(56vw, 270px); aspect-ratio: 1; border-radius: 50%;
  display: grid; place-items: center; transform: scale(var(--s));
  background: radial-gradient(circle at 35% 30%, #FFD0E6, #FF7BBE 35%, #9B5DE5 75%, #4b3a9e);
  box-shadow: 0 0 0 14px rgba(155, 93, 229, 0.10), 0 0 0 30px rgba(61, 169, 252, 0.06), 0 0 60px rgba(255, 79, 163, 0.35);
}
.breath-ring:not(.on) { transition: transform 1s ease; }
.breath-ring[data-phase="hold"] { box-shadow: 0 0 0 14px rgba(61, 169, 252, 0.14), 0 0 0 30px rgba(61, 169, 252, 0.08), 0 0 60px rgba(61, 169, 252, 0.35); }
.breath-word { font-family: var(--font-display); font-weight: 600; font-size: 1.5rem; color: #fff; text-align: center; transform: scale(calc(1 / var(--s))); text-shadow: 0 1px 8px rgba(40, 0, 60, 0.4); }

/* Grounding */
.ground-dots { display: flex; gap: 8px; }
.ground-dots span { width: 34px; height: 6px; border-radius: 3px; background: var(--surface-2); }
.ground-dots .done { background: var(--lav); }
.ground-dots .now { background: linear-gradient(90deg, var(--secondary), var(--primary)); }
.ground-n { font-family: var(--font-display); font-weight: 600; font-size: 3.6rem; line-height: 1; color: #FFB3D6; }
.ground-ask { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.35rem, 5vw, 1.7rem); line-height: 1.25; }

/* Good things */
.good-label { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.good-card { display: grid; gap: 8px; justify-items: start; padding: 16px 18px; border-radius: var(--r-md); background: var(--surface-2); }
.jar-q { margin: 0; font-family: var(--font-display); font-size: 1.25rem; line-height: 1.4; white-space: pre-wrap; overflow-wrap: anywhere; }
.good-facts { display: grid; gap: 8px; }
.good-facts:empty { display: none; }
.fact-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.fact { display: grid; gap: 2px; padding: 12px 14px; border-radius: var(--r-sm); background: linear-gradient(150deg, rgba(255, 79, 163, 0.14), rgba(61, 169, 252, 0.10)); }
.fact-n { font-family: var(--font-display); font-weight: 600; font-size: 1.35rem; color: var(--deep); }
.fact-t { font-size: 0.85rem; color: var(--muted); overflow-wrap: anywhere; }
.good-words { display: grid; gap: 10px; }
.affirm {
  margin: 0; padding: 18px 20px; border-radius: var(--r-md); border-left: 4px solid var(--lav);
  background: var(--surface-2); font-family: var(--font-display); font-size: 1.3rem; line-height: 1.4;
}
.affirm.fresh { animation: hd-in .5s ease; }
.own-words summary, .add-person summary { cursor: pointer; font-weight: 800; color: var(--link); padding: 4px 0; }
.own-words[open], .add-person[open] { display: grid; gap: 10px; }
.words-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.words-list li { display: flex; align-items: center; gap: 8px; justify-content: space-between; background: var(--surface-2); border-radius: var(--r-sm); padding: 6px 6px 6px 14px; }
.words-list span { overflow-wrap: anywhere; }
#words-form .input { flex: 1; min-width: 0; }

/* Reach out */
.people, .msgs, .lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.person, .line { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 12px 14px; border-radius: var(--r-sm); background: var(--surface-2); }
.person-name { font-size: 1.05rem; overflow-wrap: anywhere; }
.person .icon-btn.armed { width: auto; padding: 0 10px; font-size: 0.8rem; }
.line-info { display: grid; gap: 2px; min-width: 0; flex: 1 1 200px; }
.person-form { display: grid; gap: 10px; }
.person-form .btn { justify-self: start; }
.msg { display: flex; align-items: center; gap: 8px; }
.msg-text {
  flex: 1; appearance: none; text-align: left; font: inherit; font-size: 0.95rem; color: var(--ink); cursor: pointer;
  padding: 10px 14px; border-radius: var(--r-sm); border: 2px solid transparent; background: var(--surface-2);
}
.msg.is-on .msg-text { border-color: var(--lav); }
.inline-region { max-width: 280px; }

/* Gentle care */
.care-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.care-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r-sm); background: var(--surface-2); cursor: pointer; transition: background .2s ease; }
.care-item input { width: 22px; height: 22px; flex: none; accent-color: var(--lav); }
.care-item.done { background: linear-gradient(120deg, rgba(155, 93, 229, 0.25), rgba(61, 169, 252, 0.12)); }
.care-item.done span { color: var(--muted); }
.care-done { font-weight: 800; color: #FFB3D6; }

/* Write it out */
.write-text { font-size: 1.05rem; line-height: 1.6; transition: opacity 1.5s ease, filter 1.5s ease, transform 1.5s ease; }
.write-text.letting-go { opacity: 0; filter: blur(8px); transform: translateY(-14px) scale(0.98); }

/* Danger line, always at the bottom */
.hd-danger {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 14px 16px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); font-size: 0.92rem;
}
.hd-danger p { flex: 1 1 260px; color: var(--muted); }
.hd-danger strong { color: var(--ink); }

@media (prefers-reduced-motion: reduce) {
  .hd-sec, .affirm.fresh { animation: none; }
  .write-text { transition: none; }
}
