:root {
  --ink: #17382f;
  --ink-soft: #36564d;
  --paper: #f3efe5;
  --paper-light: #fbf9f3;
  --paper-deep: #e8e0d1;
  --terracotta: #c96542;
  --gold: #d39a36;
  --sage: #749282;
  --line: rgba(23, 56, 47, 0.14);
  --shadow: 0 22px 60px rgba(30, 54, 44, 0.1);
  --display: "Newsreader", Georgia, serif;
  --body: "DM Sans", "Segoe UI", sans-serif;
}

[hidden] { display: none !important; }

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at 6% 8%, rgba(201, 101, 66, 0.09), transparent 25rem),
    radial-gradient(circle at 88% 26%, rgba(116, 146, 130, 0.13), transparent 28rem),
    var(--paper);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  opacity: 0.18;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.18'/%3E%3C/svg%3E");
}

button,
input,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  color: white;
  background: var(--ink);
  border-radius: 0.25rem;
  transform: translateY(-140%);
}

.skip-link:focus {
  transform: translateY(0);
}

.ambient {
  position: fixed;
  z-index: -1;
  border: 1px solid rgba(23, 56, 47, 0.08);
  border-radius: 50%;
  pointer-events: none;
}

.ambient-one {
  width: 38rem;
  height: 38rem;
  top: -20rem;
  right: 12%;
}

.ambient-two {
  width: 18rem;
  height: 18rem;
  bottom: 8%;
  left: -9rem;
}

.site-header {
  position: relative;
  z-index: 10;
  width: min(1460px, calc(100% - 64px));
  height: 100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  width: max-content;
  align-items: center;
  gap: 0.75rem;
  color: inherit;
  text-decoration: none;
}

.brand:focus-visible,
.streak-pill:focus-visible {
  outline: 3px solid rgba(201, 101, 66, 0.4);
  outline-offset: 4px;
}

.brand-mark {
  position: relative;
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  color: var(--paper-light);
  background: var(--ink);
  border-radius: 50% 50% 48% 52% / 46% 52% 48% 54%;
  font-family: var(--display);
  font-size: 1.05rem;
  letter-spacing: -0.12em;
  transform: rotate(-4deg);
  box-shadow: 0 4px 0 rgba(201, 101, 66, 0.65);
}

.brand-mark span {
  color: #e9bc73;
}

.brand-copy {
  display: grid;
  line-height: 1.08;
}

.brand-copy strong {
  font-family: var(--display);
  font-size: 1.22rem;
  font-weight: 600;
}

.brand-copy small {
  margin-top: 0.18rem;
  color: var(--ink-soft);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.main-nav {
  height: 100%;
  display: flex;
  align-items: stretch;
  gap: 2.2rem;
}

.nav-link {
  position: relative;
  padding: 0;
  border: 0;
  color: rgba(23, 56, 47, 0.6);
  background: transparent;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
}

.nav-link::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  content: "";
  background: var(--terracotta);
  transform: scaleX(0);
  transition: transform 180ms ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--ink);
}

.nav-link.active::after {
  transform: scaleX(1);
}

.header-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 1rem;
}

.streak-pill {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.56rem 0.8rem;
  border: 1px solid var(--line);
  background: rgba(251, 249, 243, 0.55);
  border-radius: 99px;
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 0.72rem;
  transition:
    color 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    transform 180ms ease;
}

.streak-pill:hover {
  color: var(--ink);
  border-color: rgba(201, 101, 66, 0.38);
  background: rgba(251, 249, 243, 0.9);
  transform: translateY(-1px);
}

.streak-pill strong {
  color: var(--ink);
}

.flame-icon {
  margin-right: 0.12rem;
  color: var(--terracotta);
  font-size: 0.7rem;
  transform: rotate(45deg);
}

.avatar-button {
  width: 38px;
  height: 38px;
  border: 0;
  color: #fff;
  background: var(--ink);
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease;
}

.avatar-button:hover {
  box-shadow: 0 0 0 4px rgba(23, 56, 47, 0.12);
  transform: translateY(-2px);
}

main {
  width: min(1320px, calc(100% - 64px));
  margin: 0 auto;
  padding: 66px 0 90px;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(330px, 0.72fr);
  align-items: end;
  gap: clamp(3rem, 8vw, 9rem);
  margin-bottom: 45px;
}

.eyebrow,
.micro-label {
  margin: 0 0 0.8rem;
  color: var(--terracotta);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.micro-label {
  color: rgba(23, 56, 47, 0.55);
  letter-spacing: 0.13em;
}

.hero-copy h1,
.page-intro h1 {
  max-width: 800px;
  margin: 0;
  font-family: var(--display);
  font-size: clamp(3.2rem, 6vw, 6.4rem);
  font-weight: 500;
  line-height: 0.91;
  letter-spacing: -0.055em;
}

.hero-copy h1 em {
  color: var(--terracotta);
  font-weight: 500;
}

.hero-intro {
  max-width: 520px;
  margin: 1.5rem 0 0;
  color: var(--ink-soft);
  font-family: var(--display);
  font-size: 1.25rem;
  line-height: 1.45;
}

.level-card {
  position: relative;
  padding: 1.8rem;
  overflow: hidden;
  color: #f8f4ea;
  background: var(--ink);
  border-radius: 3px 3px 32px 3px;
  box-shadow: 0 18px 50px rgba(23, 56, 47, 0.19);
}

.level-card::after {
  position: absolute;
  width: 170px;
  height: 170px;
  right: -70px;
  bottom: -100px;
  content: "";
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  box-shadow:
    0 0 0 25px rgba(255, 255, 255, 0.025),
    0 0 0 50px rgba(255, 255, 255, 0.02);
}

.level-card .micro-label {
  color: rgba(255, 255, 255, 0.53);
}

.level-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.level-card h2 {
  margin: 0.1rem 0 0;
  font-family: var(--display);
  font-size: 2.4rem;
  font-weight: 500;
}

.level-card h2 small {
  display: block;
  margin-top: 0.12rem;
  color: #e7d8bf;
  font-family: var(--body);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.06em;
}

.level-emblem {
  position: relative;
  flex: 0 0 70px;
  width: 70px;
  height: 70px;
  display: grid;
  place-items: center;
}

.level-emblem svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.level-emblem circle {
  fill: none;
  stroke-width: 3;
}

.ring-track {
  stroke: rgba(255, 255, 255, 0.12);
}

.ring-progress {
  stroke: #e9bc73;
  stroke-dasharray: 270;
  stroke-dashoffset: 270;
  stroke-linecap: round;
  transition: stroke-dashoffset 700ms cubic-bezier(0.22, 1, 0.36, 1);
}

.level-emblem span {
  font-family: var(--display);
  font-size: 1.55rem;
}

.xp-copy {
  display: flex;
  justify-content: space-between;
  margin-top: 1.4rem;
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.66rem;
}

.xp-copy strong {
  color: white;
}

.xp-track {
  height: 3px;
  margin-top: 0.5rem;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 99px;
}

.xp-track span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--terracotta), #e9bc73);
  transition: width 700ms cubic-bezier(0.22, 1, 0.36, 1);
}

.next-unlock {
  display: flex;
  gap: 0.55rem;
  margin: 1rem 0 0;
  color: rgba(255, 255, 255, 0.57);
  font-size: 0.68rem;
}

.next-unlock span {
  color: #e9bc73;
}

.next-unlock strong {
  color: #e7d8bf;
  font-weight: 500;
}

.coach-card {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.6rem;
  padding: 1.35rem 1.55rem;
  margin-bottom: 64px;
  overflow: hidden;
  border: 1px solid rgba(201, 101, 66, 0.25);
  background: rgba(251, 249, 243, 0.66);
  box-shadow: 0 12px 40px rgba(76, 62, 43, 0.06);
}

.coach-card::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 3px;
  content: "";
  background: var(--terracotta);
}

.coach-seal {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(201, 101, 66, 0.42);
  border-radius: 50%;
  color: var(--terracotta);
  font-family: var(--display);
  font-size: 0.9rem;
}

.coach-copy .micro-label {
  margin-bottom: 0.25rem;
  color: var(--terracotta);
}

.coach-copy h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.25rem, 2vw, 1.65rem);
  font-weight: 500;
}

.coach-copy p:last-child {
  margin: 0.25rem 0 0;
  color: var(--ink-soft);
  font-size: 0.78rem;
}

.text-action {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0;
  border: 0;
  border-bottom: 1px solid rgba(23, 56, 47, 0.36);
  background: transparent;
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 700;
}

.text-action span {
  color: var(--terracotta);
  font-size: 1rem;
  transition: transform 180ms ease;
}

.text-action:hover span {
  transform: translate(2px, -2px);
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.65fr);
  align-items: start;
  gap: clamp(2rem, 5vw, 5rem);
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  margin-bottom: 1.35rem;
}

.section-heading .eyebrow {
  margin-bottom: 0.35rem;
}

.section-heading h2,
.reflection-card h2,
.weekly-card h2,
.focus-card h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 2rem;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.quest-summary {
  padding-bottom: 0.3rem;
  color: var(--ink-soft);
  font-size: 0.7rem;
}

.quest-summary strong {
  color: var(--terracotta);
}

.quest-list {
  display: grid;
  gap: 10px;
}

.quest-card {
  position: relative;
  min-height: 142px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.15rem;
  padding: 1.25rem 1.2rem;
  overflow: hidden;
  border: 1px solid rgba(23, 56, 47, 0.11);
  background: rgba(251, 249, 243, 0.75);
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease,
    opacity 180ms ease;
}

.quest-card::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 3px;
  content: "";
  background: var(--quest-color);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 180ms ease;
}

.quest-card:hover {
  border-color: rgba(23, 56, 47, 0.22);
  box-shadow: 0 14px 35px rgba(40, 59, 49, 0.07);
  transform: translateY(-2px);
}

.quest-card:hover::before {
  transform: scaleY(1);
}

.quest-card.complete {
  opacity: 0.57;
  background: rgba(232, 224, 209, 0.55);
}

.quest-card.complete h3,
.quest-card.complete .quest-body > p {
  text-decoration: line-through;
  text-decoration-color: rgba(23, 56, 47, 0.35);
}

.quest-icon {
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--quest-color) 42%, transparent);
  border-radius: 50%;
  color: var(--quest-color);
}

.quest-icon svg {
  width: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.quest-meta {
  display: flex;
  gap: 0.6rem;
  margin-bottom: 0.28rem;
  color: var(--quest-color);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.quest-meta span + span::before {
  margin-right: 0.6rem;
  content: "·";
  color: rgba(23, 56, 47, 0.35);
}

.quest-body h3 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.24rem;
  font-weight: 600;
}

.quest-body > p {
  max-width: 550px;
  margin: 0.35rem 0 0;
  color: var(--ink-soft);
  font-size: 0.76rem;
  line-height: 1.5;
}

.quest-reward {
  display: grid;
  justify-items: center;
  gap: 0.65rem;
}

.quest-reward > span {
  color: var(--terracotta);
  font-size: 0.65rem;
  font-weight: 700;
}

.complete-button {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(23, 56, 47, 0.26);
  background: transparent;
  border-radius: 50%;
  cursor: pointer;
  transition:
    background 160ms ease,
    color 160ms ease,
    border-color 160ms ease,
    transform 160ms ease;
}

.complete-button svg {
  width: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0;
}

.complete-button:hover {
  border-color: var(--ink);
  transform: scale(1.08);
}

.complete-button[aria-pressed="true"] {
  color: white;
  background: var(--ink);
  border-color: var(--ink);
}

.complete-button[aria-pressed="true"] svg {
  opacity: 1;
}

.add-quest-button {
  width: 100%;
  margin-top: 10px;
  padding: 0.95rem;
  border: 1px dashed rgba(23, 56, 47, 0.22);
  color: var(--ink-soft);
  background: transparent;
  cursor: pointer;
  font-size: 0.7rem;
  font-weight: 600;
  transition:
    background 160ms ease,
    border-color 160ms ease;
}

.add-quest-button:hover:not(:disabled) {
  border-color: var(--terracotta);
  background: rgba(251, 249, 243, 0.4);
}

.add-quest-button:disabled {
  cursor: default;
  opacity: 0.55;
}

.side-column {
  display: grid;
  gap: 22px;
}

.focus-card,
.weekly-card {
  padding: 1.6rem;
  border: 1px solid var(--line);
  background: rgba(251, 249, 243, 0.58);
}

.section-heading.compact {
  align-items: start;
  margin-bottom: 1.8rem;
}

.focus-card h2,
.weekly-card h2 {
  font-size: 1.55rem;
}

.icon-button {
  width: 27px;
  height: 27px;
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 50%;
  cursor: pointer;
  font-family: var(--display);
}

.capability-list {
  display: grid;
  gap: 1.25rem;
}

.capability-copy {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.45rem;
  font-size: 0.72rem;
}

.capability-copy span {
  display: flex;
  align-items: center;
  gap: 0.48rem;
}

.capability-copy i {
  width: 7px;
  height: 7px;
  background: var(--dot-color);
  border-radius: 50%;
}

.capability-copy strong {
  font-weight: 600;
}

.capability-track {
  height: 4px;
  overflow: hidden;
  background: rgba(23, 56, 47, 0.09);
}

.capability-track span {
  display: block;
  height: 100%;
  background: var(--bar-color);
  transition: width 700ms cubic-bezier(0.22, 1, 0.36, 1);
}

.weekly-card {
  color: #f7f2e7;
  background: var(--ink);
  border-color: var(--ink);
  border-radius: 2px 2px 26px 2px;
}

.week-top {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 1.5rem;
}

.weekly-card .eyebrow {
  color: #e9bc73;
}

.week-badge {
  padding: 0.35rem 0.6rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 99px;
  color: rgba(255, 255, 255, 0.64);
  font-size: 0.58rem;
  text-transform: uppercase;
}

.week-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.35rem;
}

.week-day {
  display: grid;
  justify-items: center;
  gap: 0.45rem;
  color: rgba(255, 255, 255, 0.38);
  font-size: 0.56rem;
  text-transform: uppercase;
}

.week-day i {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  font-size: 0.58rem;
  font-style: normal;
}

.week-day.today i {
  border-color: #e9bc73;
  color: #e9bc73;
}

.week-day.done i {
  color: var(--ink);
  background: #e9bc73;
  border-color: #e9bc73;
}

.week-day.future {
  opacity: 0.45;
}

.weekly-card > p {
  margin: 1.3rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.56);
  font-size: 0.68rem;
  line-height: 1.5;
}

.reflection-card {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  align-items: center;
  gap: 4rem;
  margin-top: 64px;
  padding: 2.5rem;
  border: 1px solid rgba(201, 101, 66, 0.22);
  background: rgba(251, 249, 243, 0.46);
}

.reflection-card h2 {
  font-size: 1.8rem;
}

.reflection-card > div > p:last-child {
  margin: 0.35rem 0 0;
  color: var(--ink-soft);
  font-size: 0.75rem;
}

.reflection-card form {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 1rem;
}

textarea,
input {
  width: 100%;
  padding: 0.85rem 0;
  border: 0;
  border-bottom: 1px solid rgba(23, 56, 47, 0.3);
  outline: 0;
  color: var(--ink);
  background: transparent;
}

textarea {
  min-height: 56px;
  resize: vertical;
  line-height: 1.45;
}

textarea:focus,
input:focus {
  border-color: var(--terracotta);
}

textarea::placeholder,
input::placeholder {
  color: rgba(23, 56, 47, 0.38);
}

.primary-button,
.secondary-button {
  padding: 0.82rem 1.15rem;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: white;
  cursor: pointer;
  font-size: 0.7rem;
  font-weight: 700;
  white-space: nowrap;
}

.primary-button span {
  display: inline-block;
  margin-left: 0.45rem;
  transition: transform 160ms ease;
}

.primary-button:hover span {
  transform: translateX(3px);
}

.secondary-button {
  color: var(--ink);
  background: transparent;
}

.secondary-view {
  min-height: 70vh;
}

.page-intro {
  max-width: 850px;
  margin: 20px 0 75px;
}

.page-intro h1 {
  font-size: clamp(3.2rem, 6vw, 5.8rem);
}

.page-intro > p:last-child {
  max-width: 560px;
  margin-top: 1.5rem;
  color: var(--ink-soft);
  font-family: var(--display);
  font-size: 1.25rem;
}

.journey-map {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  overflow: hidden;
  background: var(--line);
  border: 1px solid var(--line);
}

.journey-level {
  position: relative;
  min-height: 240px;
  padding: 1.6rem;
  background: var(--paper-light);
}

.journey-level.locked {
  color: rgba(23, 56, 47, 0.44);
  background: rgba(251, 249, 243, 0.45);
}

.journey-level.active {
  color: white;
  background: var(--ink);
}

.journey-node {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  margin-bottom: 2.8rem;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-family: var(--display);
}

.journey-level.active .journey-node {
  color: var(--ink);
  background: #e9bc73;
  border-color: #e9bc73;
}

.journey-copy p {
  margin: 0 0 0.4rem;
  color: var(--terracotta);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.journey-level.active .journey-copy p {
  color: #e9bc73;
}

.journey-copy h2 {
  margin: 0 0 0.6rem;
  font-family: var(--display);
  font-size: 1.6rem;
  font-weight: 500;
}

.journey-copy span {
  font-size: 0.68rem;
}

.insight-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.insight-stat,
.insight-journal {
  padding: 2rem;
  background: rgba(251, 249, 243, 0.68);
}

.insight-stat > strong {
  display: block;
  margin: 2rem 0 0.35rem;
  color: var(--terracotta);
  font-family: var(--display);
  font-size: 4.5rem;
  font-weight: 500;
  line-height: 1;
}

.insight-stat > strong.word-stat {
  font-size: 2.6rem;
}

.insight-stat > span {
  color: var(--ink-soft);
  font-size: 0.7rem;
}

.insight-journal {
  grid-column: 1 / -1;
  padding: 2.4rem;
}

.insight-journal h2 {
  margin: 0 0 1.8rem;
  font-family: var(--display);
  font-size: 2rem;
  font-weight: 500;
}

.evidence-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.6rem 2rem;
}

.evidence-list > div {
  display: flex;
  gap: 0.8rem;
  padding: 0.8rem 0;
  border-top: 1px solid var(--line);
}

.evidence-list > div > span {
  color: var(--terracotta);
}

.evidence-list p {
  display: grid;
  gap: 0.18rem;
  margin: 0;
}

.evidence-list strong {
  font-family: var(--display);
  font-weight: 600;
}

.evidence-list small {
  color: var(--ink-soft);
  font-size: 0.65rem;
}

.empty-evidence {
  color: var(--ink-soft);
  font-family: var(--display);
  font-size: 1.15rem;
}

dialog {
  max-width: none;
  padding: 0;
  border: 0;
  background: transparent;
}

dialog::backdrop {
  background: rgba(13, 30, 25, 0.62);
  backdrop-filter: blur(4px);
}

.dialog-shell {
  position: relative;
  width: min(540px, calc(100vw - 32px));
  padding: 2.6rem;
  background: var(--paper-light);
  box-shadow: var(--shadow);
}

.dialog-shell.small {
  width: min(480px, calc(100vw - 32px));
}

.dialog-shell h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 2.25rem;
  font-weight: 500;
}

.dialog-intro,
.dialog-shell.small > p:last-child {
  margin: 0.55rem 0 1.8rem;
  color: var(--ink-soft);
  font-size: 0.8rem;
  line-height: 1.6;
}

.dialog-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-family: var(--display);
  font-size: 1.6rem;
}

.dialog-shell > label {
  display: block;
  margin-top: 1.15rem;
  font-size: 0.7rem;
  font-weight: 700;
}

.dialog-shell fieldset {
  margin: 1.5rem 0 0;
  padding: 0;
  border: 0;
}

.dialog-shell legend {
  margin-bottom: 0.7rem;
  font-size: 0.7rem;
  font-weight: 700;
}

.focus-options {
  display: grid;
  gap: 0.5rem;
}

.focus-options label {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.75rem;
  border: 1px solid var(--line);
  cursor: pointer;
  font-size: 0.72rem;
}

.focus-options input {
  width: auto;
  accent-color: var(--terracotta);
}

.dialog-shell menu {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  margin: 1.8rem 0 0;
  padding: 0;
}

.reset-button {
  display: block;
  margin: 1.5rem auto 0;
  padding: 0;
  border: 0;
  color: rgba(128, 43, 23, 0.7);
  background: transparent;
  cursor: pointer;
  font-size: 0.62rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 50;
  min-width: 320px;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem 1.2rem;
  color: white;
  background: var(--ink);
  box-shadow: 0 18px 45px rgba(13, 30, 25, 0.25);
  transform: translateY(calc(100% + 50px));
  opacity: 0;
  transition:
    transform 320ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 200ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast-mark {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: var(--ink);
  background: #e9bc73;
  border-radius: 50%;
}

.toast > div {
  display: grid;
  gap: 0.18rem;
}

.toast strong {
  font-family: var(--display);
  font-weight: 600;
}

.toast span:last-child {
  color: rgba(255, 255, 255, 0.64);
  font-size: 0.65rem;
}

.level-up {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  pointer-events: none;
  background: rgba(15, 40, 33, 0.93);
  opacity: 0;
  visibility: hidden;
}

.level-up.show {
  animation: levelOverlay 4.1s ease both;
}

.level-up-content {
  display: grid;
  justify-items: center;
  color: white;
}

.level-up-content::before,
.level-up-content::after {
  position: absolute;
  width: 340px;
  height: 340px;
  content: "";
  border: 1px solid rgba(233, 188, 115, 0.28);
  border-radius: 50%;
  animation: levelRing 1.1s 0.35s ease-out both;
}

.level-up-content::after {
  width: 245px;
  height: 245px;
  animation-delay: 0.5s;
}

.level-up-content p {
  color: #e9bc73;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.35em;
}

.level-up-content > strong {
  font-family: var(--display);
  font-size: 9rem;
  font-weight: 500;
  line-height: 0.9;
}

.level-up-content h2 {
  margin: 1rem 0 0.3rem;
  font-family: var(--display);
  font-size: 2.4rem;
  font-weight: 500;
}

.level-up-content > span {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.75rem;
}

.reveal {
  animation: reveal 650ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.delay-1 {
  animation-delay: 80ms;
}

.delay-2 {
  animation-delay: 150ms;
}

.delay-3 {
  animation-delay: 220ms;
}

.delay-4 {
  animation-delay: 300ms;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

:focus-visible {
  outline: 3px solid rgba(201, 101, 66, 0.5);
  outline-offset: 3px;
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes levelOverlay {
  0%,
  100% {
    opacity: 0;
    visibility: hidden;
  }
  10%,
  82% {
    opacity: 1;
    visibility: visible;
  }
}

@keyframes levelRing {
  from {
    opacity: 0;
    transform: scale(0.7);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@media (max-width: 960px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .main-nav {
    position: fixed;
    right: 18px;
    bottom: 18px;
    left: 18px;
    z-index: 20;
    height: 58px;
    justify-content: space-around;
    gap: 0;
    padding: 0 1rem;
    background: rgba(23, 56, 47, 0.96);
    border-radius: 3px 3px 20px 3px;
    box-shadow: 0 18px 45px rgba(13, 30, 25, 0.28);
    backdrop-filter: blur(8px);
  }

  .nav-link {
    color: rgba(255, 255, 255, 0.58);
  }

  .nav-link:hover,
  .nav-link.active {
    color: white;
  }

  .nav-link::after {
    bottom: 0;
  }

  .hero-grid,
  .content-grid {
    grid-template-columns: 1fr;
    gap: 2.3rem;
  }

  .level-card {
    max-width: 520px;
  }

  .side-column {
    grid-template-columns: repeat(2, 1fr);
  }

  .journey-map {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .site-header,
  main {
    width: min(100% - 32px, 1320px);
  }

  .site-header {
    height: 82px;
  }

  .brand-copy small,
  .streak-pill span:last-child {
    display: none;
  }

  .streak-pill {
    padding: 0.5rem 0.65rem;
  }

  main {
    padding-top: 44px;
    padding-bottom: 110px;
  }

  .hero-copy h1 {
    font-size: clamp(3rem, 14vw, 4.8rem);
  }

  .hero-intro {
    font-size: 1.05rem;
  }

  .coach-card {
    grid-template-columns: auto 1fr;
    margin-bottom: 48px;
  }

  .coach-card .text-action {
    grid-column: 1 / -1;
    justify-self: start;
    margin-left: 66px;
  }

  .quest-card {
    min-height: 0;
    grid-template-columns: auto 1fr;
  }

  .quest-icon {
    align-self: start;
  }

  .quest-reward {
    grid-column: 2;
    grid-template-columns: 1fr auto;
    justify-items: start;
  }

  .side-column,
  .reflection-card {
    grid-template-columns: 1fr;
  }

  .reflection-card {
    gap: 1.5rem;
    padding: 1.5rem;
  }

  .reflection-card form {
    grid-template-columns: 1fr;
  }

  .reflection-card .primary-button {
    justify-self: start;
  }

  .journey-map,
  .insight-grid {
    grid-template-columns: 1fr;
  }

  .insight-journal {
    grid-column: 1;
  }

  .evidence-list {
    grid-template-columns: 1fr;
  }

  .toast {
    right: 16px;
    bottom: 90px;
    left: 16px;
    min-width: 0;
  }

  .dialog-shell {
    padding: 2rem 1.4rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}


/* Life admin extensions */
.nav-link > span {
  display: none;
}

.life-snapshot {
  display: grid;
  grid-template-columns: 1.15fr repeat(3, 1fr);
  gap: 1px;
  margin: -30px 0 64px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--line);
  box-shadow: 0 18px 55px rgba(30, 54, 44, 0.06);
}

.snapshot-heading,
.snapshot-card {
  min-height: 128px;
  padding: 1.35rem;
  background: rgba(251, 249, 243, 0.74);
}

.snapshot-heading {
  display: grid;
  align-content: center;
}

.snapshot-heading h2 {
  max-width: 230px;
  font-size: 1.45rem;
}

.snapshot-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.85rem;
  border: 0;
  text-align: left;
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease;
}

.snapshot-card:hover {
  color: white;
  background: var(--ink);
}

.snapshot-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  color: var(--terracotta);
  font-family: var(--display);
}

.snapshot-meds .snapshot-icon { color: var(--sage); }
.snapshot-books .snapshot-icon { color: var(--gold); }
.snapshot-card > span:nth-child(2) { display: grid; gap: 0.18rem; }
.snapshot-card strong { font-family: var(--display); font-size: 1rem; font-weight: 600; }
.snapshot-card small { color: var(--ink-soft); font-size: 0.62rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.snapshot-card:hover small { color: rgba(255, 255, 255, 0.58); }
.snapshot-card i { font-size: 0.9rem; font-style: normal; transition: transform 180ms ease; }
.snapshot-card:hover i { transform: translateX(4px); }

.life-page-intro { margin-bottom: 48px; }
.life-page-intro h1 em { color: var(--terracotta); font-weight: 500; }
.admin-panel {
  border: 1px solid var(--line);
  background: rgba(251, 249, 243, 0.78);
  box-shadow: 0 24px 70px rgba(30, 54, 44, 0.07);
}

.todo-layout,
.med-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.65fr);
  align-items: start;
  gap: 28px;
}

.todo-panel { padding: 1.5rem; }
.todo-date-bar { display: flex; align-items: center; justify-content: space-between; padding-bottom: 1.2rem; border-bottom: 1px solid var(--line); }
.todo-date-bar label { display: grid; justify-items: center; gap: 0.15rem; }
.todo-date-bar input { width: auto; padding: 0; border: 0; font-family: var(--display); font-size: 1.1rem; font-weight: 600; }
.date-step { width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 50%; background: transparent; cursor: pointer; }
.date-step:hover { color: white; background: var(--ink); }
.quick-add { display: grid; grid-template-columns: 1fr auto; gap: 0.8rem; margin: 1.35rem 0; }
.quick-add input { padding: 0.9rem 1rem; border: 1px solid var(--line); background: var(--paper-light); }
.todo-progress { display: grid; grid-template-columns: auto minmax(100px, 220px); justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 0.8rem; color: var(--ink-soft); font-size: 0.65rem; }
.todo-progress > div { height: 3px; background: rgba(23, 56, 47, 0.1); }
.todo-progress i { display: block; width: 0; height: 100%; background: var(--terracotta); transition: width 260ms ease; }
.todo-list { display: grid; }
.todo-upcoming-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .75rem 0 .35rem; border-top: 1px solid var(--line); color: var(--ink-soft); }
.todo-upcoming-heading > span { font-size: .58rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.todo-upcoming-heading button { padding: .35rem 0; border: 0; background: transparent; color: var(--terracotta); font: 700 .7rem/1.2 var(--body); cursor: pointer; text-align: right; }
.todo-upcoming-heading button:hover { color: var(--ink); }
.todo-upcoming-heading button:focus-visible { outline: 2px solid var(--terracotta); outline-offset: 3px; }
.todo-item { min-height: 64px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 0.9rem; border-top: 1px solid var(--line); }
.todo-item > span { font-family: var(--display); font-size: 1.12rem; }
.todo-item.done > span { color: rgba(23, 56, 47, 0.42); text-decoration: line-through; }
.todo-check { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid rgba(23, 56, 47, 0.3); border-radius: 50%; background: transparent; cursor: pointer; }
.todo-check svg { width: 15px; fill: none; stroke: currentColor; stroke-width: 2; opacity: 0; }
.todo-check[aria-pressed="true"] { color: white; border-color: var(--ink); background: var(--ink); }
.todo-check[aria-pressed="true"] svg { opacity: 1; }
.row-delete { width: 36px; height: 36px; border: 0; color: rgba(23, 56, 47, 0.36); background: transparent; cursor: pointer; font-size: 1.3rem; }
.row-delete:hover { color: var(--terracotta); }
.clear-completed { margin-top: 1rem; border: 0; background: transparent; cursor: pointer; }
.day-note { min-height: 300px; padding: 2rem; color: white; background: var(--ink); border-radius: 2px 2px 42px 2px; }
.day-note > span { color: #e9bc73; font-family: var(--display); font-size: 5rem; line-height: 0.8; }
.day-note p { margin: 1.5rem 0 2rem; font-family: var(--display); font-size: 1.65rem; line-height: 1.22; }
.day-note small { color: rgba(255,255,255,.48); font-size: .58rem; font-weight: 700; letter-spacing: .15em; }
.admin-empty { min-height: 220px; display: grid; place-items: center; align-content: center; gap: .45rem; color: var(--ink-soft); text-align: center; border: 1px dashed var(--line); background: rgba(251,249,243,.32); }
.admin-empty > span { width: 42px; height: 42px; display: grid; place-items: center; margin-bottom: .35rem; border: 1px solid var(--line); border-radius: 50%; color: var(--terracotta); }
.admin-empty h3 { margin: 0; color: var(--ink); font-family: var(--display); font-size: 1.35rem; }
.admin-empty p { max-width: 320px; margin: 0; font-size: .7rem; line-height: 1.5; }

.library-intro,
.meds-intro { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 3rem; max-width: none; }
.library-intro > div:first-child,
.meds-intro > div:first-child { max-width: 760px; }
.library-tally { display: grid; grid-template-columns: auto auto; align-items: baseline; gap: .1rem .7rem; padding: 1.25rem 1.5rem; border-left: 3px solid var(--terracotta); background: rgba(251,249,243,.58); }
.library-tally strong { color: var(--terracotta); font-family: var(--display); font-size: 2.4rem; font-weight: 500; line-height: 1; }
.library-tally span { color: var(--ink-soft); font-size: .65rem; }
.add-book-form { display: grid; grid-template-columns: 1.2fr 1fr 1fr .7fr auto; align-items: end; gap: 1rem; padding: 1.35rem; }
.form-heading h2 { margin: .2rem 0 0; font-family: var(--display); font-size: 1.45rem; font-weight: 500; }
.add-book-form label,
.med-form label { display: grid; gap: .3rem; font-size: .63rem; font-weight: 700; }
.add-book-form label > span,
.med-form label > span { color: var(--ink-soft); font-weight: 400; }
select { width: 100%; padding: .82rem .6rem; border: 0; border-bottom: 1px solid rgba(23,56,47,.3); outline: 0; color: var(--ink); background: transparent; font: inherit; }
.reading-history { margin-top: 18px; padding: 1.3rem 1.45rem 1.1rem; }
.reading-history-heading { display: flex; align-items: end; justify-content: space-between; gap: 1.5rem; }
.reading-history-heading h2 { margin: .18rem 0 0; font-family: var(--display); font-size: 1.45rem; font-weight: 500; }
.reading-history-heading > strong { display: grid; justify-items: end; color: var(--terracotta); font-family: var(--display); font-size: 2.25rem; font-weight: 500; line-height: .95; }
.reading-history-heading > strong span { margin-top: .35rem; color: var(--ink-soft); font-family: var(--body); font-size: .56rem; font-weight: 500; letter-spacing: .04em; }
.reading-chart-scroll { margin-top: 1.2rem; overflow-x: auto; padding-bottom: .2rem; }
.reading-month-chart { min-width: 620px; height: 170px; display: grid; grid-template-columns: repeat(12, minmax(34px, 1fr)); gap: .55rem; align-items: end; }
.reading-month-column { height: 100%; display: grid; grid-template-rows: 1.1rem 1fr auto; gap: .35rem; align-items: end; text-align: center; }
.reading-month-count { min-height: 1rem; color: var(--terracotta); font-size: .62rem; font-weight: 800; }
.reading-month-track { height: 100%; display: flex; align-items: end; justify-content: center; border-bottom: 1px solid var(--line); background: linear-gradient(to top, rgba(23,56,47,.025), transparent); }
.reading-month-track i { width: min(28px, 72%); min-height: 3px; display: block; background: var(--sage); border-radius: 3px 3px 0 0; }
.reading-month-column small { display: grid; gap: .1rem; color: var(--ink-soft); font-size: .55rem; text-transform: uppercase; }
.reading-month-column.current small { color: var(--ink); font-weight: 800; }
.reading-year { color: var(--ink-soft); font-size: .46rem; letter-spacing: .04em; }
.reading-history-note { margin: .85rem 0 0; color: var(--ink-soft); font-size: .62rem; }
.reading-history-empty { min-height: 92px; display: flex; align-items: center; justify-content: center; gap: .75rem; color: var(--ink-soft); text-align: center; }
.reading-history-empty span { color: var(--terracotta); font-family: var(--display); font-size: 1.4rem; }
.reading-history-empty p { margin: 0; }
.book-filters { display: flex; flex-wrap: wrap; gap: .5rem; margin: 18px 0 -6px; }
.book-filters button { min-height: 38px; padding: .55rem .85rem; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--ink-soft); font: inherit; font-size: .66rem; cursor: pointer; }
.book-filters button[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: var(--paper-light); }
.book-shelf { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; margin-top: 28px; }
.book-card { position: relative; min-height: 250px; display: grid; grid-template-columns: 62px 1fr auto; grid-template-rows: 1fr auto auto; gap: .8rem 1.2rem; padding: 1.5rem 1.7rem 1.4rem 0; overflow: hidden; border: 1px solid var(--line); background: rgba(251,249,243,.7); transition: transform 180ms ease, box-shadow 180ms ease; }
.book-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.book-spine { grid-row: 1 / -1; display: grid; place-items: center; color: #f7f2e7; background: var(--ink); box-shadow: inset -5px 0 rgba(255,255,255,.07); }
.book-spine span { font-family: var(--display); font-size: 1.3rem; transform: rotate(-90deg); }
.book-copy { align-self: center; }
.book-format { margin: 0 0 .45rem !important; color: var(--terracotta) !important; font-size: .58rem !important; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.book-copy h2 { margin: 0; font-family: var(--display); font-size: 1.65rem; font-weight: 600; }
.book-copy > p:last-child { margin: .3rem 0 0; color: var(--ink-soft); font-size: .68rem; }
.book-copy .book-date-summary,
.book-copy .book-reflection-summary { margin-top: .38rem; color: var(--ink-soft); font-size: .58rem; line-height: 1.45; }
.book-copy .book-reflection-summary { color: var(--terracotta); }
.book-status { align-self: center; color: var(--ink-soft); font-size: .58rem; }
.book-status select { min-width: 125px; }
.book-progress { grid-column: 2 / -1; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .7rem; color: var(--ink-soft); font-size: .58rem; }
.book-progress input { padding: 0; border: 0; accent-color: var(--terracotta); }
.book-progress output { color: var(--terracotta); font-weight: 700; }
.book-details { grid-column: 2 / -1; border-top: 1px solid var(--line); padding-top: .65rem; }
.book-details summary { min-height: 32px; color: var(--ink-soft); font-size: .62rem; font-weight: 700; cursor: pointer; }
.book-detail-grid,
.book-listening-fields,
.book-reflection { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; margin-top: .7rem; }
.book-details label { display: grid; gap: .25rem; color: var(--ink-soft); font-size: .58rem; font-weight: 700; }
.book-details input,
.book-details select { width: 100%; min-width: 0; padding: .55rem .2rem; border: 0; border-bottom: 1px solid rgba(23,56,47,.22); background: transparent; color: var(--ink); font: inherit; }
.book-listening-fields .text-action,
.book-reflection .text-action { grid-column: 1 / -1; justify-self: start; }
.book-reflection label:nth-child(2) { grid-column: span 1; }
.book-delete { position: absolute; top: .35rem; right: .35rem; }
.shelf-empty { grid-column: 1 / -1; }

.next-dose-orb { width: 190px; height: 190px; display: grid; place-items: center; align-content: center; gap: .4rem; padding: 1rem; color: white; text-align: center; background: var(--ink); border-radius: 50%; box-shadow: 0 0 0 12px rgba(23,56,47,.06), 0 0 0 13px rgba(23,56,47,.12); }
.next-dose-orb.due { background: var(--terracotta); box-shadow: 0 0 0 12px rgba(201,101,66,.07), 0 0 0 13px rgba(201,101,66,.16); }
.next-dose-orb > span { color: #e9bc73; font-size: .55rem; font-weight: 700; letter-spacing: .15em; }
.next-dose-orb strong { max-width: 145px; font-family: var(--display); font-size: 1.35rem; line-height: 1.05; }
.next-dose-orb small { max-width: 140px; color: rgba(255,255,255,.63); font-size: .6rem; }
.med-overview-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: -6px 0 24px; }
.med-overview-card { display: grid; gap: .18rem; min-height: 108px; align-content: center; padding: 1rem 1.15rem; border: 1px solid var(--line); background: rgba(251,249,243,.58); }
.med-overview-card > span { color: var(--ink-soft); font-size: .54rem; font-weight: 800; letter-spacing: .12em; }
.med-overview-card > strong { color: var(--sage); font-family: var(--display); font-size: 2rem; font-weight: 600; line-height: 1; }
.med-overview-card > small { color: var(--ink-soft); font-size: .6rem; line-height: 1.4; }
.med-layout { grid-template-columns: minmax(0,1.5fr) minmax(300px,.65fr); }
.med-list { display: grid; gap: 12px; }
.med-card { position: relative; min-height: 178px; display: grid; grid-template-columns: auto 1fr auto; grid-template-rows: 1fr auto; gap: 1rem 1.2rem; align-items: center; padding: 1.35rem; border: 1px solid var(--line); background: rgba(251,249,243,.74); }
.med-card.due { border-color: rgba(201,101,66,.34); box-shadow: inset 3px 0 var(--terracotta); }
.med-status-mark { width: 44px; height: 44px; display: grid; place-items: center; grid-row: 1 / -1; color: white; background: var(--sage); border-radius: 50%; font-family: var(--display); font-size: 1.2rem; }
.med-card.due .med-status-mark { background: var(--terracotta); }
.med-copy p { margin: 0 0 .25rem; color: var(--sage); font-size: .55rem; font-weight: 700; letter-spacing: .12em; }
.med-card.due .med-copy p { color: var(--terracotta); }
.med-copy h2 { margin: 0 0 .35rem; font-family: var(--display); font-size: 1.65rem; font-weight: 600; }
.med-copy strong { display: block; font-size: .72rem; }
.med-copy > span { color: var(--ink-soft); font-size: .62rem; }
.med-copy .med-note { display: block; max-width: 520px; margin-top: .55rem; color: rgba(23,56,47,.62); font-size: .6rem; line-height: 1.45; }
.med-schedule { display: grid; justify-items: end; gap: .3rem; padding-right: 2rem; color: var(--ink-soft); font-size: .65rem; }
.med-schedule small { color: rgba(23,56,47,.52); }
.med-log-actions { grid-column: 2; display: flex; flex-wrap: wrap; align-items: center; gap: .7rem; }
.med-log-actions .text-action { padding: .2rem 0; font-size: .58rem; }
.take-med { justify-self: start; }
.med-edit { position: absolute; top: .5rem; right: .7rem; padding: .42rem .65rem; font-size: .58rem; }
.med-correct-dose { grid-column: 2; justify-self: start; padding: .2rem 0; font-size: .56rem; }
.med-archive { position: absolute; right: .8rem; bottom: .7rem; padding: .2rem 0; color: var(--ink-soft); font-size: .56rem; }
.med-form { position: sticky; top: 24px; display: grid; gap: 1rem; padding: 1.5rem; }
.med-form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem; }
.med-form-status:empty { display: none; }
.schedule-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-hint { margin: -.2rem 0 0; color: var(--ink-soft); font-size: .6rem; line-height: 1.5; }
.weekly-schedule { display: grid; gap: 1rem; }
.weekly-schedule[hidden] { display: none; }
.cycle-schedule { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.cycle-schedule[hidden] { display: none; }
.weekly-schedule fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.weekly-schedule legend { margin-bottom: .55rem; color: var(--ink); font-size: .64rem; font-weight: 700; }
.weekday-picker { display: grid; grid-template-columns: repeat(7, 1fr); gap: .28rem; }
.weekday-picker label { position: relative; display: block; }
.weekday-picker input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.weekday-picker span { display: grid; min-height: 36px; place-items: center; padding: .35rem .1rem; border: 1px solid var(--line); color: var(--ink-soft); background: rgba(251,249,243,.7); font-size: .55rem; font-weight: 700; cursor: pointer; transition: 150ms ease; }
.weekday-picker input:checked + span { border-color: var(--ink); color: white; background: var(--ink); box-shadow: 0 4px 12px rgba(23,56,47,.16); }
.weekday-picker input:focus-visible + span { outline: 2px solid var(--terracotta); outline-offset: 2px; }
.med-empty { min-height: 320px; }
.med-notes-field textarea { resize: vertical; min-height: 64px; }
.med-reminder-toggle { grid-template-columns: auto 1fr !important; align-items: start; gap: .7rem !important; padding: .8rem; border: 1px solid var(--line); background: rgba(255,255,255,.24); cursor: pointer; }
.med-reminder-toggle input { width: auto; margin: .15rem 0 0; accent-color: var(--sage); }
.med-reminder-toggle > span { display: grid; gap: .18rem; color: var(--ink) !important; }
.med-reminder-toggle strong { font-size: .64rem; }
.med-reminder-toggle small { color: var(--ink-soft); font-size: .58rem; font-weight: 400; line-height: 1.4; }
.med-history-panel { display: grid; gap: 1rem; margin-top: 28px; padding: 1.35rem; }
.med-history-heading { display: flex; align-items: end; justify-content: space-between; gap: 1.5rem; }
.med-history-heading h2 { margin: .18rem 0 .25rem; font-family: var(--display); font-size: 1.45rem; font-weight: 600; }
.med-history-heading p { max-width: 680px; margin: 0; color: var(--ink-soft); font-size: .64rem; line-height: 1.5; }
.med-history-heading label { min-width: 150px; color: var(--ink-soft); font-size: .58rem; font-weight: 700; }
.med-history-list { display: grid; border-top: 1px solid var(--line); }
.med-history-entry { display: grid; grid-template-columns: minmax(160px,.8fr) minmax(220px,1.2fr) auto; align-items: center; gap: 1rem; padding: .85rem .15rem; border-bottom: 1px solid var(--line); }
.med-history-entry > div { display: grid; gap: .12rem; }
.med-history-entry > div:first-child span, .med-history-entry small { color: var(--ink-soft); font-size: .59rem; }
.med-history-entry > div > strong { font-size: .66rem; }
.med-history-entry .text-action { padding: .2rem 0; font-size: .57rem; }
.med-history-empty { min-height: 180px; border-bottom: 1px solid var(--line); }
.med-past-list { display: grid; gap: .55rem; }
.med-past-list:empty { display: none; }
.med-past-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding-top: .35rem; }
.med-past-heading > strong { color: var(--ink-soft); font-size: .61rem; }
.med-past-entry { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .75rem .85rem; border: 1px solid rgba(23,56,47,.12); background: rgba(255,255,255,.23); }
.med-past-entry > div:first-child { display: grid; gap: .18rem; }
.med-past-entry strong { font-size: .68rem; }
.med-past-entry small { color: var(--ink-soft); font-size: .58rem; }
.med-past-entry .secondary-button { padding: .48rem .65rem; font-size: .56rem; white-space: nowrap; }
.growth-insights-intro { margin-top: 100px; }

@media (max-width: 1120px) {
  .life-snapshot { grid-template-columns: 1fr 1fr; }
  .snapshot-heading { grid-row: span 2; }
  .add-book-form { grid-template-columns: 1fr 1fr; }
  .form-heading { grid-column: 1 / -1; }
  .add-book-form .primary-button { justify-self: start; }
}

@media (max-width: 960px) {
  .nav-link > span { display: inline; margin-right: .32rem; }
  .todo-layout,
  .med-layout { grid-template-columns: 1fr; }
  .day-note { min-height: 220px; }
  .med-form { position: static; }
  .book-shelf { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .main-nav { right: 10px; bottom: 10px; left: 10px; height: 68px; padding: 0 .25rem; border-radius: 14px 14px 24px 14px; }
  .nav-link { min-width: 0; flex: 1; display: grid; place-items: center; align-content: center; gap: .2rem; font-size: .54rem; line-height: 1; }
  .nav-link > span { display: block; margin: 0; font-family: var(--display); font-size: 1.05rem; }
  .nav-link::after { right: 20%; bottom: 7px; left: 20%; }
  .life-snapshot { grid-template-columns: 1fr; margin: -15px 0 46px; }
  .snapshot-heading { min-height: 110px; grid-row: auto; }
  .snapshot-card { min-height: 88px; padding: 1rem; }
  .life-page-intro { margin-top: 0; margin-bottom: 36px; }
  .life-page-intro h1 { font-size: clamp(2.8rem, 15vw, 4.2rem); }
  .todo-panel { padding: 1rem; }
  .quick-add { grid-template-columns: 1fr; }
  .quick-add .primary-button { justify-self: stretch; }
  .todo-progress { grid-template-columns: 1fr; }
  .todo-progress > div { width: 100%; }
  .day-note { min-height: 200px; padding: 1.5rem; }
  .library-intro,
  .meds-intro { grid-template-columns: 1fr; align-items: start; }
  .library-tally { justify-self: stretch; }
  .add-book-form { grid-template-columns: 1fr; padding: 1rem; }
  .form-heading { grid-column: auto; }
  .add-book-form .primary-button { width: 100%; }
  .reading-history { padding: 1rem; }
  .reading-history-heading { align-items: start; }
  .reading-chart-scroll { margin-right: -1rem; padding-right: 1rem; }
  .book-card { min-height: 280px; grid-template-columns: 48px 1fr; grid-template-rows: auto auto auto auto; padding: 1.25rem 1rem 1.15rem 0; }
  .book-spine { grid-row: 1 / -1; }
  .book-status { grid-column: 2; }
  .book-progress { grid-column: 2; }
  .book-details { grid-column: 2; }
  .book-detail-grid,
  .book-listening-fields,
  .book-reflection { grid-template-columns: 1fr; }
  .book-reflection label:nth-child(2) { grid-column: auto; }
  .next-dose-orb { width: 160px; height: 160px; justify-self: center; }
  .med-card { grid-template-columns: auto 1fr; grid-template-rows: auto auto auto; padding: 1.1rem; }
  .med-status-mark { grid-row: 1; align-self: start; }
  .med-schedule { grid-column: 2; justify-items: start; padding: 0; }
  .take-med { grid-column: 1 / -1; width: 100%; }
  .med-form { padding: 1.2rem; }
  .growth-insights-intro { margin-top: 72px; }
}
/* Due-aware life admin additions */
.quick-add > #todo-input { grid-column: 1 / -1; }
.todo-detail-fields { display: grid; grid-template-columns: repeat(4, minmax(130px, 1fr)); gap: .8rem; }
.todo-detail-fields label { display: grid; gap: .3rem; color: var(--ink-soft); font-size: .58rem; font-weight: 700; }
.todo-detail-fields label span { padding-left: .15rem; }
.todo-detail-fields label i { font-style: normal; font-weight: 400; }
.todo-detail-fields input,
.todo-detail-fields select { min-height: 43px; padding: .72rem .7rem; border: 1px solid var(--line); background: rgba(255,255,255,.32); }
.todo-add-button { align-self: end; }
.todo-item { position: relative; }
.todo-item::before { content: ""; position: absolute; top: 17px; bottom: 17px; left: -1.5rem; width: 3px; background: transparent; }
.todo-item.priority-high::before { background: var(--terracotta); }
.todo-item.overdue { background: linear-gradient(90deg, rgba(201,101,66,.055), transparent 70%); }
.todo-copy { min-width: 0; display: grid; gap: .3rem; padding: .75rem 0; }
.todo-copy > span { font-family: var(--display); font-size: 1.12rem; }
.todo-copy > small { overflow: hidden; color: var(--ink-soft); font-size: .64rem; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
.todo-item.done .todo-copy > span { color: rgba(23,56,47,.42); text-decoration: line-through; }
.todo-meta { display: flex; flex-wrap: wrap; gap: .4rem; }
.todo-meta b.category-work { color: #725294; background: rgba(114,82,148,.11); }
.todo-meta b.category-home { color: #9b6a2f; background: rgba(155,106,47,.12); }
.todo-meta b.category-health { color: #a34d60; background: rgba(163,77,96,.11); }
.todo-meta b.category-errands { color: #38747a; background: rgba(56,116,122,.1); }
.todo-filter { display: inline-flex; align-items: center; gap: .45rem; margin-left: auto; color: var(--ink-soft); font-size: .55rem; font-weight: 700; }
.todo-filter select { width: auto; min-height: 30px; padding: .28rem .35rem; border: 1px solid var(--line); background: rgba(255,255,255,.38); font-size: .56rem; }
.todo-meta b { padding: .18rem .42rem; color: var(--sage); background: rgba(68,125,106,.08); border-radius: 2px; font-size: .5rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.priority-high .todo-meta b:first-child,
.todo-meta b.is-overdue { color: var(--terracotta); background: rgba(201,101,66,.09); }
.priority-low .todo-meta b:first-child { color: var(--ink-soft); background: rgba(23,56,47,.05); }
.todo-aside { display: grid; gap: 18px; }
.reminder-card { position: relative; display: grid; gap: .85rem; padding: 1.5rem; overflow: hidden; border: 1px solid rgba(68,125,106,.2); background: rgba(224,233,223,.46); box-shadow: 0 18px 45px rgba(30,54,44,.06); }
.reminder-bell { position: absolute; top: -2.1rem; right: -1.4rem; color: rgba(68,125,106,.09); font-family: var(--display); font-size: 9rem; line-height: 1; }
.reminder-card h2 { max-width: 230px; margin: 0; font-family: var(--display); font-size: 1.65rem; font-weight: 600; line-height: 1.08; }
.reminder-card > p:not(.eyebrow) { margin: 0; color: var(--ink-soft); font-size: .68rem; line-height: 1.5; }
.reminder-card label { display: grid; gap: .3rem; font-size: .58rem; font-weight: 700; }
.reminder-card .secondary-button { justify-self: start; }
.reminder-card > small { color: var(--ink-soft); font-size: .54rem; line-height: 1.45; }
.dose-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.med-dose { display: inline-flex !important; width: fit-content; margin-bottom: .35rem; padding: .24rem .48rem; color: var(--ink) !important; background: rgba(211,154,54,.13); border-radius: 2px; font-size: .6rem !important; font-weight: 700; }

@media (max-width: 640px) {
  .todo-detail-fields { grid-template-columns: 1fr 1fr; }
  .todo-notes-field { grid-column: 1 / -1; }
  .todo-filter { width: 100%; justify-content: space-between; margin-left: 0; }
  .todo-add-button { width: 100%; }
  .todo-item::before { left: -1rem; }
  .reminder-card .secondary-button { width: 100%; }
  .dose-fields { grid-template-columns: 1fr 1fr; }
}
/* Body measurement tracker */
.snapshot-weight .snapshot-icon { color: var(--terracotta); }
.life-snapshot { grid-template-columns: 1.15fr repeat(4, 1fr); }
.weight-layout { display: grid; grid-template-columns: minmax(280px, .68fr) minmax(0, 1.55fr); align-items: start; gap: 28px; }
.weight-sidebar { display: grid; gap: 18px; min-width: 0; }
.weight-form, .body-profile-panel, .weight-import-panel { display: grid; gap: 1rem; padding: 1.5rem; }
.weight-form label, .body-profile-panel label, .weight-import-panel label { display: grid; gap: .38rem; color: var(--ink); font-size: .66rem; font-weight: 700; }
.weight-form label > span, .body-profile-panel label > span, .weight-import-panel label > span { color: var(--ink-soft); font-weight: 400; }
.weight-form input, .weight-form select, .weight-form textarea, .body-profile-panel input, .body-profile-panel select, .weight-import-panel input, .weight-import-panel select, .weight-import-panel textarea { width: 100%; border: 1px solid var(--line); background: rgba(255,255,255,.38); }
.weight-form input, .weight-form select, .body-profile-panel input, .body-profile-panel select, .weight-import-panel input, .weight-import-panel select { min-height: 45px; padding: .72rem .78rem; }
.weight-form textarea, .weight-import-panel textarea { resize: vertical; min-height: 78px; padding: .72rem .78rem; }
.waist-field { display: grid; min-width: 0; margin: 0; padding: 0; border: 0; gap: .38rem; }
.waist-field legend { padding: 0; color: var(--ink); font-size: .66rem; font-weight: 700; }
.waist-field legend span, .waist-field small { color: var(--ink-soft); font-weight: 400; }
.waist-field small { font-size: .58rem; line-height: 1.4; }
.measurement-input-row { display: grid; grid-template-columns: minmax(0, 1fr) 92px; gap: .5rem; }
.measurement-input-row select { cursor: pointer; }
.scale-composition-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); min-width: 0; margin: 0; padding: .9rem; border: 1px solid rgba(23,56,47,.1); gap: .8rem; background: rgba(255,255,255,.18); }
.scale-composition-fields legend { grid-column: 1 / -1; padding: 0 .25rem; color: var(--ink); font-size: .66rem; font-weight: 700; }
.scale-composition-fields legend span { color: var(--ink-soft); font-weight: 400; }
.weight-form-status { min-height: 1.2em; margin: -.35rem 0 0; color: var(--terracotta); font-size: .62rem; line-height: 1.45; }
.body-profile-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.body-profile-fields label:nth-child(4) { grid-column: 1 / -1; }
.body-profile-status, .weight-import-status { min-height: 1.2em; margin: 0; color: var(--terracotta); font-size: .62rem; line-height: 1.45; }
.weight-import-file-label { padding: .85rem; border: 1px dashed rgba(23,56,47,.24); background: rgba(255,255,255,.2); cursor: pointer; }
.weight-import-file-label input { min-height: 0; padding: .45rem 0 0; border: 0; background: transparent; font-size: .6rem; }
.weight-import-previews { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; }
.weight-import-photo { position: relative; min-width: 0; margin: 0; overflow: hidden; border: 1px solid var(--line); background: rgba(255,255,255,.48); }
.weight-import-photo img { width: 100%; aspect-ratio: 4 / 3; display: block; object-fit: cover; }
.weight-import-photo figcaption { display: grid; gap: .14rem; padding: .55rem .62rem; }
.weight-import-photo figcaption strong { overflow: hidden; font-size: .58rem; text-overflow: ellipsis; white-space: nowrap; }
.weight-import-photo figcaption span { color: var(--ink-soft); font-size: .53rem; line-height: 1.35; }
.weight-import-photo.reading { opacity: .72; }
.weight-import-photo.recognised { border-color: rgba(59,117,88,.45); box-shadow: inset 0 -3px var(--sage); }
.weight-import-photo.unread { border-color: rgba(201,101,66,.45); box-shadow: inset 0 -3px var(--terracotta); }
.weight-import-actions { display: flex; align-items: center; gap: .65rem; }
.weight-import-list { display: grid; max-height: 420px; overflow: auto; border-top: 1px solid var(--line); }
.weight-import-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .8fr); gap: .58rem; padding: .8rem 0; border-bottom: 1px solid var(--line); font-size: .62rem; }
.weight-import-row-heading { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.weight-import-row-heading > span { overflow: hidden; color: var(--sage); font-size: .57rem; text-overflow: ellipsis; white-space: nowrap; }
.weight-import-row-heading .text-action { padding: 0; font-size: .52rem; }
.weight-import-row label { gap: .2rem; font-size: .55rem; }
.weight-import-row input { min-height: 38px; padding: .5rem .55rem; }
.weight-import-composition { grid-column: 1 / -1; border: 1px solid rgba(23,56,47,.12); background: rgba(255,255,255,.24); }
.weight-import-composition summary { padding: .55rem .65rem; color: var(--ink-soft); cursor: pointer; font-size: .54rem; font-weight: 700; }
.weight-import-composition > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; padding: 0 .65rem .65rem; }
.weight-import-privacy { color: var(--ink-soft); font-size: .56rem; line-height: 1.5; }
@media (max-width: 620px) {
  .weight-import-previews { grid-template-columns: 1fr; }
  .weight-import-photo { display: grid; grid-template-columns: 108px minmax(0, 1fr); align-items: center; }
  .weight-import-photo img { aspect-ratio: 1; }
}
.weight-main { display: grid; gap: 24px; min-width: 0; }
.weight-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; border: 1px solid var(--line); background: var(--line); box-shadow: 0 18px 46px rgba(30,54,44,.055); }
.weight-primary-summary { grid-template-columns: repeat(4, 1fr); }
.weight-summary article { display: grid; gap: .35rem; min-height: 126px; align-content: center; padding: 1.1rem 1.2rem; background: rgba(251,249,243,.76); }
.weight-summary span, .weight-summary small { color: var(--ink-soft); font-size: .57rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.weight-summary strong { font-family: var(--display); font-size: clamp(1.45rem, 3vw, 2.15rem); font-weight: 500; line-height: 1; }
.weight-summary small { color: rgba(23,56,47,.58); font-size: .53rem; font-weight: 500; letter-spacing: .02em; text-transform: none; }
.composition-summary { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1px; border: 1px solid var(--line); background: var(--line); }
.composition-summary article { display: grid; gap: .38rem; min-width: 0; padding: .9rem; background: rgba(251,249,243,.62); }
.composition-summary span { color: var(--ink-soft); font-size: .51rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.composition-summary strong { overflow-wrap: anywhere; font-family: var(--display); font-size: 1.15rem; font-weight: 600; }
.body-projection-card { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding: 1.25rem 1.35rem; border: 1px solid rgba(68,125,106,.25); background: rgba(224,233,223,.28); }
.body-projection-card h2 { margin: .2rem 0 .35rem; font-family: var(--display); font-size: 1.35rem; font-weight: 600; }
.body-projection-card p:last-child { max-width: 650px; margin: 0; color: var(--ink-soft); font-size: .66rem; line-height: 1.5; }
.body-projection-card > span { flex: 0 0 auto; max-width: 210px; padding: .55rem .7rem; border: 1px solid rgba(68,125,106,.24); color: var(--sage); font-size: .56rem; font-weight: 700; line-height: 1.4; text-align: center; text-transform: uppercase; }
.weight-chart-card, .weight-history { border: 1px solid var(--line); background: rgba(251,249,243,.72); box-shadow: 0 24px 70px rgba(30,54,44,.065); }
.weight-chart-card { padding: 1.45rem; overflow: hidden; }
.weight-chart-heading { display: flex; align-items: start; justify-content: space-between; gap: 1rem; margin-bottom: 1.35rem; }
.weight-chart-heading h2 { margin: .25rem 0 0; font-family: var(--display); font-size: 1.75rem; font-weight: 600; }
.weight-chart-heading > small { color: var(--ink-soft); font-size: .56rem; }
.weight-range-controls { display: flex; flex-wrap: wrap; justify-content: end; gap: .3rem; }
.weight-range { min-height: 31px; padding: .32rem .52rem; border: 1px solid var(--line); border-radius: 999px; color: var(--ink-soft); background: transparent; cursor: pointer; font-size: .55rem; font-weight: 700; letter-spacing: .05em; }
.weight-range[aria-pressed="true"] { color: white; border-color: var(--ink); background: var(--ink); }
.weight-range:hover { border-color: var(--terracotta); color: var(--terracotta); }
.weight-chart { position: relative; min-height: 300px; border-top: 1px solid rgba(23,56,47,.08); border-bottom: 1px solid rgba(23,56,47,.08); }
.weight-chart svg { display: block; width: 100%; height: auto; min-height: 300px; overflow: visible; }
.weight-grid line { stroke: rgba(23,56,47,.12); stroke-dasharray: 2 5; }
.weight-grid text, .weight-axis text { fill: rgba(23,56,47,.57); font-family: var(--body); font-size: 10px; font-weight: 600; letter-spacing: .02em; }
.weight-axis-date { font-size: 9px !important; font-weight: 500 !important; }
.weight-area { fill: url(#weight-area); }
.weight-line { fill: none; stroke: var(--terracotta); stroke-linecap: round; stroke-linejoin: round; stroke-width: 3; }
.waist-line { fill: none; stroke: var(--sage); stroke-dasharray: 4 5; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2.5; }
.weight-point { fill: var(--paper-light); stroke: var(--terracotta); stroke-width: 3; cursor: pointer; }
.waist-point { fill: var(--paper-light); stroke: var(--sage); stroke-width: 2.5; cursor: pointer; }
.weight-point:focus, .waist-point:focus { outline: none; filter: drop-shadow(0 0 0.25rem rgba(201,101,66,.48)); }
.composition-line { fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2.5; }
.composition-bodyfat { stroke: var(--terracotta); }
.composition-water { stroke: #587c90; }
.composition-muscle { stroke: var(--sage); }
.composition-point { fill: var(--paper-light); stroke-width: 2.5; cursor: pointer; }
.composition-point:focus { outline: none; filter: drop-shadow(0 0 0.25rem rgba(23,56,47,.28)); }
.weight-legend { display: flex; flex-wrap: wrap; gap: 1rem; padding-top: .85rem; color: var(--ink-soft); font-size: .62rem; }
.weight-legend span { display: inline-flex; align-items: center; gap: .38rem; }
.weight-legend i { display: inline-block; width: 18px; height: 3px; background: var(--terracotta); }
.weight-legend .weight-legend-waist { background: repeating-linear-gradient(90deg, var(--sage) 0 5px, transparent 5px 8px); }
.composition-legend .composition-bodyfat { background: var(--terracotta); }
.composition-legend .composition-water { background: #587c90; }
.composition-legend .composition-muscle { background: var(--sage); }
.weight-chart-detail { min-height: 1.3em; margin: .85rem 0 0; color: var(--ink-soft); font-size: .66rem; line-height: 1.45; }
.weight-chart-empty { display: grid; min-height: 300px; place-content: center; gap: .55rem; text-align: center; color: var(--ink-soft); }
.weight-chart-empty span { color: var(--terracotta); font-family: var(--display); font-size: 3.2rem; line-height: 1; }
.weight-chart-empty p { margin: 0; font-size: .72rem; }
.weight-history { padding: 1.4rem; }
.weight-history-count { color: var(--ink-soft); font-size: .6rem; }
.weight-history-list { display: grid; margin-top: .7rem; }
.weight-history-entry { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 1rem; min-height: 66px; border-top: 1px solid var(--line); }
.weight-history-entry > div { display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem .8rem; padding: .72rem 0; }
.weight-history-entry time { width: 114px; color: var(--ink-soft); font-size: .62rem; }
.weight-history-entry strong { font-family: var(--display); font-size: 1.14rem; font-weight: 600; }
.weight-history-entry span { color: var(--sage); font-size: .66rem; font-weight: 700; }
.weight-history-entry small { flex-basis: 100%; overflow-wrap: anywhere; color: var(--ink-soft); font-size: .63rem; line-height: 1.4; }
.weight-history-empty { min-height: 180px; }

@media (max-width: 1120px) {
  .life-snapshot { grid-template-columns: 1.15fr repeat(2, 1fr); }
  .snapshot-heading { grid-row: span 2; }
  .weight-layout { grid-template-columns: 1fr; }
  .weight-form { grid-template-columns: repeat(2, 1fr); }
  .weight-form .form-heading, .weight-form > label[for="weight-note"], .weight-form .form-hint, .weight-form-status, .weight-form .primary-button { grid-column: 1 / -1; }
  .scale-composition-fields { grid-column: 1 / -1; }
  .weight-sidebar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .weight-form { grid-column: 1 / -1; }
  .weight-primary-summary { grid-template-columns: repeat(2, 1fr); }
  .composition-summary { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 640px) {
  .main-nav { gap: 0; }
  .nav-link { font-size: .48rem; }
  .nav-link > span { font-size: .95rem; }
  .weight-form { grid-template-columns: 1fr; padding: 1.15rem; }
  .weight-form .form-heading, .weight-form > label[for="weight-note"], .weight-form .form-hint, .weight-form-status, .weight-form .primary-button { grid-column: auto; }
  .weight-sidebar, .body-profile-fields, .scale-composition-fields { grid-template-columns: 1fr; }
  .scale-composition-fields { grid-column: auto; }
  .body-profile-fields label:nth-child(4) { grid-column: auto; }
  .weight-summary { grid-template-columns: 1fr; }
  .composition-summary { grid-template-columns: repeat(2, 1fr); }
  .weight-summary article { min-height: 94px; }
  .body-projection-card { display: grid; }
  .body-projection-card > span { max-width: none; }
  .weight-chart-card, .weight-history { padding: 1rem; }
  .weight-chart-heading { display: grid; }
  .weight-range-controls { justify-content: start; }
  .weight-chart, .weight-chart svg, .weight-chart-empty { min-height: 240px; }
  .weight-axis-date { font-size: 8px !important; }
  .weight-history-entry time { width: 100%; }
}

/* Finite-course medication setup */
.protocol-panel { display: grid; gap: .85rem; margin: 28px 0 0; padding: 1.35rem; border: 1px solid rgba(68,125,106,.24); background: rgba(224,233,223,.32); }
.protocol-disclosure > summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; cursor: pointer; list-style: none; }
.protocol-disclosure > summary::-webkit-details-marker { display: none; }
.protocol-disclosure > summary > span { display: grid; gap: .16rem; }
.protocol-disclosure > summary strong { font-family: var(--display); font-size: 1.25rem; font-weight: 600; }
.protocol-disclosure > summary small { color: var(--ink-soft); font-size: .6rem; text-align: right; }
.protocol-disclosure > summary::after { content: "+"; color: var(--sage); font-family: var(--display); font-size: 1.5rem; }
.protocol-disclosure[open] > summary::after { content: "−"; }
.protocol-content { display: grid; gap: .85rem; padding-top: 1rem; border-top: 1px solid rgba(23,56,47,.12); }
.protocol-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; }
.protocol-fields label, .course-fields label { display: grid; gap: .32rem; color: var(--ink); font-size: .62rem; font-weight: 700; }
.protocol-fields input, .course-fields input, .course-fields select, .cycle-schedule input { min-height: 42px; border: 1px solid var(--line); background: rgba(255,255,255,.42); }
.protocol-end, .course-end { margin: 0; color: var(--ink-soft); font-size: .66rem; }
.protocol-end { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .35rem 1rem; }
.protocol-end output, .course-end output { color: var(--sage); font-weight: 700; }
.protocol-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .38rem 1rem; margin: 0; padding: .85rem 0 .1rem; border-top: 1px solid rgba(23,56,47,.12); list-style: none; color: var(--ink-soft); font-size: .59rem; line-height: 1.4; }
.course-fields { display: grid; gap: .7rem; min-width: 0; margin: 0; padding: .9rem 0 0; border: 0; border-top: 1px solid var(--line); }
.course-fields legend { padding: 0; color: var(--ink); font-size: .64rem; font-weight: 700; }.course-fields legend span { color: var(--ink-soft); font-weight: 400; }
.med-card.upcoming { border-color: rgba(211,154,54,.32); }.med-card.complete { opacity: .72; }.med-card.upcoming .med-status-mark { background: var(--gold); }.med-card.complete .med-status-mark { background: var(--ink-soft); }
.med-card.just-taken { border-color: rgba(68,125,106,.42); background: rgba(224,233,223,.3); }
.med-logged { align-self: center; justify-self: end; color: var(--sage); font-size: .64rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.timing-fields, .dose-fields { display: grid; gap: .58rem; min-width: 0; margin: 0; padding: .9rem; border: 1px solid var(--line); background: rgba(255,255,255,.24); }
.timing-fields legend, .dose-fields legend { padding: 0 .25rem; color: var(--ink); font-size: .64rem; font-weight: 700; }
.timing-fields legend + .schedule-fields { margin-top: 0; }
.timing-fields p { margin: 0; color: var(--ink-soft); font-size: .61rem; line-height: 1.4; }
.dose-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dose-fields legend { grid-column: 1 / -1; }
.dose-fields label { display: grid; gap: .32rem; color: var(--ink); font-size: .62rem; font-weight: 700; }
.audiobook-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; padding: .8rem; border-left: 3px solid var(--gold); background: rgba(211,154,54,.08); }
.audiobook-fields label { display: grid; gap: .32rem; color: var(--ink); font-size: .62rem; font-weight: 700; }
.audiobook-fields p { grid-column: 1 / -1; margin: 0; color: var(--ink-soft); font-size: .62rem; }
.audiobook-position { color: var(--sage) !important; font-size: .66rem; font-weight: 700; }
.protocol-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem; }
.programme-list { display: grid; gap: .45rem; }
.programme-list:empty { display: none; }
.programme-entry { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; padding: .65rem .75rem; border: 1px solid rgba(23,56,47,.12); background: rgba(255,255,255,.24); }
.programme-entry span { color: var(--ink-soft); font-size: .62rem; }
.programme-entry strong { color: var(--ink); }
.programme-entry .text-action { padding: .2rem 0; font-size: .6rem; }
.programme-edit-warning { margin: 0; padding: .65rem .75rem; border-left: 3px solid var(--gold); background: rgba(211,154,54,.09); }
@media (max-width: 640px) { .protocol-fields, .protocol-summary, .cycle-schedule { grid-template-columns: 1fr; } .protocol-panel { padding: 1.1rem; } .protocol-disclosure > summary { align-items: flex-start; } .protocol-disclosure > summary small { display: none; } .course-fields .schedule-fields { grid-template-columns: 1fr; } .med-form-actions > button { width: 100%; } .med-overview-grid { grid-template-columns: 1fr 1fr 1fr; gap: 6px; } .med-overview-card { min-height: 88px; padding: .75rem; } .med-overview-card > strong { font-size: 1.6rem; } .med-overview-card > small { display: none; } .med-history-heading { display: grid; gap: .75rem; } .med-history-entry { grid-template-columns: 1fr; gap: .35rem; } .med-history-entry .text-action { justify-self: start; } .med-past-entry { align-items: flex-start; } }

/* Shared character and reward artwork */
.character-model { position: relative; width: 100%; aspect-ratio: 2 / 3; isolation: isolate; }
.character-stack { position: relative; width: 100%; height: 100%; }
.character-fallback, .character-layer { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.character-layer { visibility: hidden; }
.character-layer img { display: block; width: 100%; height: 100%; object-fit: contain; }
.character-model.base-ready .character-layer { visibility: visible; }
.character-model.base-ready .character-fallback { visibility: hidden; }
.character-model.has-set-aura .character-stack { filter: drop-shadow(0 0 7px var(--character-aura)); }
.character-art-notice { display: none; position: absolute; top: 100%; left: 0; right: 0; font-size: .65rem; line-height: 1.3; text-align: center; }
.character-model.art-missing .character-art-notice { display: block; }
.reward-art { position: relative; display: block; width: 100%; height: 100%; }
.reward-art > picture { position: absolute; inset: 0; display: block; }
.reward-art img { display: block; width: 100%; height: 100%; object-fit: contain; }
.reward-art-fallback { display: grid; width: 100%; height: 100%; place-items: center; }
.reward-art.art-ready .reward-art-fallback { visibility: hidden; }
.character-model picture[hidden], .reward-art picture[hidden] { display: none; }
.character-sheet .character-model { width: min(75%, 260px); }
.hero-crest { position: relative; display: block; width: 64px; height: 86px; }
.hero-crest > .reward-art { height: 64px; }
.hero-crest-marks { display: flex; justify-content: center; gap: 4px; margin-top: 4px; }
.hero-crest-marks i { display: grid; place-items: center; width: 18px; height: 18px; border: 1px solid currentColor; border-radius: 50%; background: #101827; }
.loot-open-coffer { position: absolute; left: 72px; bottom: 5px; width: 32px; height: 32px; z-index: 2; }
.loot-open-coffer:empty { display: none; }

/* The Wayfarer's Armory */
.armory-button { position: relative; width: 40px; height: 40px; display: grid; place-items: center; padding: 0; border: 1px solid rgba(23, 56, 47, .2); color: var(--ink); background: rgba(251, 249, 243, .72); border-radius: 50% 50% 46% 46%; cursor: pointer; transition: transform 180ms ease, border-color 180ms ease, background 180ms ease; }
.armory-button:hover { transform: translateY(-2px) rotate(-2deg); border-color: rgba(211, 154, 54, .65); background: #fffaf0; }
.armory-button:focus-visible { outline: 3px solid rgba(211, 154, 54, .35); outline-offset: 4px; }
.armory-button-shield { font-family: var(--display); font-size: 1.2rem; line-height: 1; }
.loot-badge { position: absolute; top: -6px; right: -7px; min-width: 20px; height: 20px; display: grid; place-items: center; padding: 0 5px; color: #fff9e9; background: #a44c2f; border: 2px solid var(--paper); border-radius: 99px; font-size: .58rem; font-weight: 800; }
.loot-badge[hidden] { display: none; }
.armory-button.has-loot { border-color: rgba(211, 154, 54, .7); box-shadow: 0 0 0 5px rgba(211, 154, 54, .1); animation: armoryCall 2.8s ease-in-out infinite; }

.armory-view { --armory-ink: #162d27; --armory-gold: #d6a84d; padding-bottom: 6rem; }
.armory-banner { position: relative; min-height: 360px; display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(260px, .7fr); align-items: end; gap: 4rem; margin-bottom: 24px; padding: clamp(2rem, 5vw, 4.8rem); overflow: hidden; color: #f8efd9; background: linear-gradient(135deg, rgba(12, 37, 31, .97), rgba(28, 58, 47, .95)), repeating-linear-gradient(45deg, transparent 0 14px, rgba(255,255,255,.02) 14px 15px); box-shadow: 0 28px 80px rgba(16, 42, 34, .16); }
.armory-banner::before { position: absolute; top: -170px; right: -90px; width: 430px; height: 430px; content: ""; border: 1px solid rgba(214, 168, 77, .24); border-radius: 50%; box-shadow: 0 0 0 46px rgba(214, 168, 77, .035), 0 0 0 92px rgba(214, 168, 77, .025); }
.armory-banner::after { position: absolute; right: 8%; bottom: -75px; width: 170px; height: 200px; content: "♜"; color: rgba(214, 168, 77, .08); font-family: var(--display); font-size: 12rem; line-height: 1; transform: rotate(-8deg); }
.armory-banner > * { position: relative; z-index: 1; }
.armory-banner .eyebrow { color: #d6a84d; }
.armory-banner h1 { max-width: 760px; margin: .5rem 0 1rem; font-family: var(--display); font-size: clamp(3.5rem, 7vw, 7rem); font-weight: 500; line-height: .82; letter-spacing: -.045em; }
.armory-banner h1 em { color: #e3bd72; font-weight: 500; }
.armory-banner p:not(.eyebrow) { max-width: 640px; margin: 0; color: rgba(248, 239, 217, .68); font-size: 1rem; line-height: 1.75; }
.drop-odds { justify-self: end; width: min(100%, 330px); display: grid; gap: 1px; border: 1px solid rgba(248, 239, 217, .14); background: rgba(248, 239, 217, .1); }
.drop-odds span { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .7rem; padding: .78rem .9rem; color: rgba(248, 239, 217, .72); background: rgba(10, 28, 23, .72); font-size: .65rem; text-transform: uppercase; letter-spacing: .08em; }
.drop-odds strong { color: #fff7e5; }
.rarity-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--rarity); box-shadow: 0 0 0 3px color-mix(in srgb, var(--rarity) 18%, transparent); }
.rarity-dot.common, .rarity-common { --rarity: #8f8776; }.rarity-dot.uncommon, .rarity-uncommon { --rarity: #5f8f68; }.rarity-dot.rare, .rarity-rare { --rarity: #4f78a8; }.rarity-dot.epic, .rarity-epic { --rarity: #8b5aa5; }.rarity-dot.legendary, .rarity-legendary { --rarity: #c57a28; }

.armory-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(360px, .92fr); gap: 24px; }
.character-scroll, .chest-room, .inventory-vault { border: 1px solid rgba(23, 56, 47, .16); box-shadow: 0 20px 60px rgba(23, 56, 47, .08); }
.character-scroll { position: relative; padding: clamp(1.4rem, 3vw, 2.5rem); overflow: hidden; background: linear-gradient(140deg, rgba(255, 253, 247, .92), rgba(232, 224, 209, .82)); }
.character-scroll::before, .character-scroll::after { position: absolute; width: 70px; height: 70px; content: ""; border-color: rgba(201, 101, 66, .25); pointer-events: none; }
.character-scroll::before { top: 14px; left: 14px; border-top: 1px solid; border-left: 1px solid; }.character-scroll::after { right: 14px; bottom: 14px; border-right: 1px solid; border-bottom: 1px solid; }
.character-heading, .inventory-heading { display: flex; justify-content: space-between; align-items: end; gap: 1rem; }
.character-heading h2, .inventory-heading h2, .chest-room h2 { margin: .25rem 0 0; font-family: var(--display); font-size: clamp(1.8rem, 3vw, 2.7rem); font-weight: 600; }
.gear-score { display: grid; justify-items: end; color: var(--ink-soft); font-size: .62rem; text-transform: uppercase; letter-spacing: .1em; }.gear-score strong { color: var(--terracotta); font-family: var(--display); font-size: 2rem; font-weight: 600; line-height: 1; }
.character-title { margin: .5rem 0 0; color: var(--ink-soft); font-size: .68rem; }
.character-sheet { position: relative; width: min(100%, 430px); aspect-ratio: 1; display: grid; place-items: center; margin: 1.4rem auto; isolation: isolate; border: 1px solid rgba(23, 56, 47, .13); border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.9) 0 25%, rgba(211,154,54,.08) 25% 26%, transparent 26% 45%, rgba(23,56,47,.07) 45% 45.5%, transparent 45.5%), repeating-conic-gradient(from 0deg, rgba(23,56,47,.035) 0 1deg, transparent 1deg 30deg); }
.character-sheet::before { position: absolute; inset: 7%; z-index: -1; content: ""; border: 1px dashed rgba(23, 56, 47, .13); border-radius: 50%; }.character-runes { position: absolute; top: 8%; color: rgba(201, 101, 66, .54); font-family: var(--display); font-size: .8rem; letter-spacing: .55em; }
.equipped-slots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; border: 1px solid var(--line); background: var(--line); }.equipped-slot { position: relative; min-width: 0; display: grid; gap: .15rem; padding: .8rem 2.2rem .8rem .9rem; background: rgba(251,249,243,.82); border-left: 3px solid var(--rarity, transparent); }
.equipped-slot > span { color: var(--ink-soft); font-size: .53rem; text-transform: uppercase; letter-spacing: .1em; }.equipped-slot strong { overflow: hidden; font-family: var(--display); font-size: .9rem; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }.equipped-slot.empty strong { color: rgba(23,56,47,.35); font-weight: 500; }.equipped-slot button { position: absolute; top: 50%; right: .75rem; width: 24px; height: 24px; padding: 0; border: 0; color: var(--ink-soft); background: rgba(23,56,47,.07); border-radius: 50%; cursor: pointer; transform: translateY(-50%); }

.chest-room { position: relative; min-height: 650px; display: grid; align-content: start; gap: 1.25rem; padding: clamp(1.5rem, 3vw, 2.6rem); overflow: hidden; color: #f8efd9; background: linear-gradient(160deg, #2c3129, #172b25 62%, #0e211c); }.chest-room::before { position: absolute; inset: 0; content: ""; pointer-events: none; background: radial-gradient(circle at 50% 46%, rgba(214,168,77,.16), transparent 34%), repeating-linear-gradient(90deg, transparent 0 49px, rgba(255,255,255,.018) 49px 50px); }.chest-room > * { position: relative; z-index: 1; }.chest-room .micro-label { color: #d6a84d; }.chest-room > div:nth-child(2) > p:last-child { max-width: 440px; color: rgba(248,239,217,.62); font-size: .72rem; line-height: 1.6; }
.coffer-count { position: absolute; top: 2rem; right: 2rem; display: grid; justify-items: end; }.coffer-count span { color: #e7be72; font-family: var(--display); font-size: 2.7rem; line-height: 1; }.coffer-count small { color: rgba(248,239,217,.48); font-size: .52rem; text-transform: uppercase; letter-spacing: .1em; }
.coffer-button { position: relative; min-height: 310px; display: grid; place-items: center; align-content: center; gap: .25rem; margin-top: .35rem; padding: 1rem; overflow: hidden; isolation: isolate; border: 1px solid rgba(214,168,77,.3); color: #fff3d7; background: radial-gradient(ellipse at 50% 53%, rgba(214,168,77,.15), transparent 42%), linear-gradient(160deg, rgba(11,31,26,.52), rgba(5,17,14,.72)); cursor: pointer; transition: border-color 180ms ease, background 180ms ease, transform 180ms ease; }.coffer-button::before { position: absolute; top: 48%; left: 50%; z-index: -1; width: 250px; height: 250px; content: ""; border: 1px solid rgba(231,190,114,.13); border-radius: 50%; box-shadow: 0 0 0 28px rgba(231,190,114,.025), 0 0 0 56px rgba(231,190,114,.018); transform: translate(-50%,-50%); }.coffer-button:hover:not(:disabled) { border-color: rgba(231,190,114,.76); background: radial-gradient(ellipse at 50% 53%, rgba(214,168,77,.22), transparent 46%), linear-gradient(160deg, rgba(11,31,26,.48), rgba(5,17,14,.7)); transform: translateY(-2px); }.coffer-button:disabled { cursor: not-allowed; opacity: .55; }
.coffer-visual { position: relative; width: min(88%, 240px); aspect-ratio: 1; display: grid; place-items: center; filter: drop-shadow(0 24px 18px rgba(0,0,0,.42)); transform-origin: 50% 72%; }.coffer-visual::before { position: absolute; right: 9%; bottom: 6%; left: 9%; z-index: -1; height: 20%; content: ""; background: rgba(0,0,0,.58); border-radius: 50%; filter: blur(12px); }.coffer-visual::after { position: absolute; inset: 16%; z-index: -2; content: ""; background: radial-gradient(circle, rgba(231,190,114,.22), transparent 67%); filter: blur(4px); }.coffer-visual img { width: 100%; height: 100%; display: block; object-fit: contain; transition: filter 220ms ease, transform 220ms ease; }.coffer-button:hover:not(:disabled) .coffer-visual img { filter: saturate(1.08) brightness(1.05); transform: translateY(-3px) scale(1.018); }
.coffer-action { display: grid; gap: .18rem; }.coffer-action strong { font-family: var(--display); font-size: 1.4rem; font-weight: 600; }.coffer-action small { color: rgba(248,239,217,.5); font-size: .62rem; }
.chest-room.opening .coffer-visual { animation: cofferShake .75s ease both; }.chest-room.opening .coffer-visual img { animation: cofferPrize .75s .08s cubic-bezier(.2,.8,.2,1) both; }.chest-room.opening::after { position: absolute; top: 42%; left: 50%; width: 30px; height: 30px; z-index: 0; content: ""; background: #ffe5a1; border-radius: 50%; box-shadow: 0 0 34px 20px rgba(255,207,105,.74), 0 0 100px 55px rgba(255,178,72,.34); animation: cofferFlare .8s ease both; }
.loot-reveal { position: relative; min-height: 116px; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 1rem; padding: .75rem 1rem .75rem .75rem; overflow: hidden; border: 1px solid rgba(248,239,217,.13); background: linear-gradient(110deg, color-mix(in srgb, var(--rarity, #d6a84d) 8%, transparent), rgba(7,20,17,.52) 38%); }.loot-reveal::after { position: absolute; top: -42px; right: -22px; width: 110px; height: 110px; content: ""; border: 1px solid color-mix(in srgb, var(--rarity, #d6a84d) 22%, transparent); border-radius: 50%; pointer-events: none; }.loot-reveal-glyph { position: relative; width: 88px; height: 92px; display: grid; place-items: center; overflow: hidden; color: var(--rarity, #d6a84d); border: 1px solid color-mix(in srgb, var(--rarity, #d6a84d) 56%, transparent); background: radial-gradient(circle, color-mix(in srgb, var(--rarity, #d6a84d) 20%, transparent), rgba(4,14,11,.54) 70%); font-family: var(--display); font-size: 1.8rem; }.loot-reveal-glyph.has-artwork { border-color: color-mix(in srgb, var(--rarity) 62%, rgba(255,255,255,.12)); box-shadow: inset 0 0 24px color-mix(in srgb, var(--rarity) 12%, transparent); }.loot-reveal-glyph img { width: 112%; height: 112%; display: block; object-fit: contain; filter: drop-shadow(0 8px 7px rgba(0,0,0,.36)); }.loot-reveal > div { min-width: 0; display: grid; gap: .16rem; }.loot-reveal small { color: var(--rarity, #d6a84d); font-size: .52rem; font-weight: 800; letter-spacing: .12em; }.loot-reveal strong { overflow: hidden; font-family: var(--display); font-size: 1.15rem; text-overflow: ellipsis; white-space: nowrap; }.loot-reveal span:last-child { color: rgba(248,239,217,.47); font-size: .6rem; }.chest-room.drop-landed .loot-reveal { animation: relicLand .8s cubic-bezier(.2,.9,.2,1) both; }

.inventory-vault { margin-top: 24px; padding: clamp(1.5rem, 3vw, 2.6rem); background: rgba(251,249,243,.74); }.inventory-heading { margin-bottom: 1.3rem; }.inventory-heading > span { color: var(--ink-soft); font-size: .62rem; text-transform: uppercase; letter-spacing: .1em; }.loot-inventory { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.loot-card { position: relative; min-height: 150px; display: grid; grid-template-columns: 92px minmax(0, 1fr); grid-template-rows: 1fr auto; align-items: center; gap: .55rem 1rem; padding: .8rem .9rem .8rem .8rem; overflow: hidden; border: 1px solid color-mix(in srgb, var(--rarity) 32%, var(--line)); background: radial-gradient(circle at 14% 50%, color-mix(in srgb, var(--rarity) 12%, transparent), transparent 31%), rgba(255,255,255,.58); transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease; }.loot-card::before { position: absolute; inset: 0 auto 0 0; width: 4px; content: ""; background: var(--rarity); }.loot-card::after { position: absolute; top: 8px; right: 8px; width: 20px; height: 20px; content: ""; border-top: 1px solid color-mix(in srgb, var(--rarity) 30%, transparent); border-right: 1px solid color-mix(in srgb, var(--rarity) 30%, transparent); pointer-events: none; }.loot-card:hover { border-color: color-mix(in srgb, var(--rarity) 58%, var(--line)); box-shadow: 0 12px 30px color-mix(in srgb, var(--rarity) 12%, transparent); transform: translateY(-2px); }.loot-glyph { position: relative; grid-row: 1 / 3; width: 92px; height: 118px; display: grid; place-items: center; overflow: hidden; color: var(--rarity); background: radial-gradient(circle, color-mix(in srgb, var(--rarity) 17%, white), rgba(251,249,243,.38) 72%); border: 1px solid color-mix(in srgb, var(--rarity) 34%, transparent); font-family: var(--display); font-size: 1.8rem; }.loot-glyph.has-artwork::after { position: absolute; inset: 7px; content: ""; border: 1px solid color-mix(in srgb, var(--rarity) 18%, transparent); pointer-events: none; }.loot-glyph img { width: 108%; height: 108%; display: block; object-fit: contain; filter: drop-shadow(0 8px 7px rgba(23,56,47,.2)); transition: transform 220ms ease; }.loot-card:hover .loot-glyph img { transform: scale(1.045) rotate(-1deg); }.loot-card > div { min-width: 0; align-self: end; }.loot-card small { color: var(--rarity); font-size: .5rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; }.loot-card h3 { margin: .28rem 0 0; font-family: var(--display); font-size: 1.05rem; font-weight: 600; line-height: 1.08; }.loot-card button { grid-column: 2; justify-self: start; padding: .5rem .68rem; border: 1px solid color-mix(in srgb, var(--rarity) 45%, transparent); color: var(--ink); background: transparent; cursor: pointer; font-size: .56rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }.loot-card button:hover:not(:disabled) { color: white; background: var(--rarity); }.loot-card button:disabled { border-color: transparent; color: var(--rarity); cursor: default; }
.loot-empty { grid-column: 1 / -1; min-height: 180px; display: grid; place-items: center; align-content: center; gap: .35rem; color: var(--ink-soft); border: 1px dashed var(--line); text-align: center; }.loot-empty > span { color: rgba(23,56,47,.24); font-family: var(--display); font-size: 3rem; }.loot-empty h3 { margin: 0; color: var(--ink); font-family: var(--display); font-size: 1.35rem; }.loot-empty p { margin: 0; font-size: .68rem; }
.level-up-coffer { position: relative; width: 76px; height: 56px; margin: 1.25rem 0 .65rem; filter: drop-shadow(0 12px 10px rgba(0,0,0,.28)); }.level-up-coffer::before, .level-up-coffer i { position: absolute; left: 0; width: 100%; content: ""; border: 2px solid #3b2817; background: linear-gradient(90deg, #714126, #c08643, #764326); }.level-up-coffer::before { bottom: 0; height: 35px; border-radius: 2px 2px 8px 8px; }.level-up-coffer i { top: 0; height: 27px; border-radius: 38px 38px 3px 3px; }.level-up-coffer b { position: absolute; top: 23px; left: 50%; z-index: 2; width: 18px; height: 20px; display: grid; place-items: center; color: #4d3217; background: #e4b75c; transform: translateX(-50%); font-size: .35rem; }.level-up-content .level-up-loot { color: #e9bc73; font-size: .68rem; font-weight: 700; letter-spacing: .04em; }

@keyframes armoryCall { 0%, 72%, 100% { transform: translateY(0); } 80% { transform: translateY(-3px) rotate(-3deg); } 88% { transform: translateY(0) rotate(2deg); } }
@keyframes cofferShake { 0%, 100% { transform: translateX(0) rotate(0); } 20% { transform: translateX(-5px) rotate(-2deg); } 40% { transform: translateX(5px) rotate(2deg); } 60% { transform: translateX(-3px) rotate(-1deg); } }
@keyframes cofferPrize { 0%, 42% { filter: brightness(1); transform: translateY(0) scale(1); } 68% { filter: brightness(1.75) saturate(1.15); transform: translateY(-9px) scale(1.035); } 100% { filter: brightness(1); transform: translateY(0) scale(1); } }
@keyframes cofferFlare { 0%, 35% { opacity: 0; transform: translate(-50%,-50%) scale(.2); } 70% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%,-50%) scale(2.8); } }
@keyframes relicLand { from { opacity: .2; transform: translateY(-18px) scale(.94); } to { opacity: 1; transform: translateY(0) scale(1); } }

@media (max-width: 1100px) { .armory-banner { grid-template-columns: 1fr; gap: 2rem; align-items: start; }.drop-odds { justify-self: start; width: 100%; grid-template-columns: repeat(5, 1fr); }.drop-odds span { grid-template-columns: auto 1fr; }.drop-odds strong { grid-column: 2; }.armory-grid { grid-template-columns: 1fr; }.chest-room { min-height: 0; }.loot-inventory { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .header-actions { gap: .5rem; }.armory-button { width: 36px; height: 36px; }.armory-banner { min-height: 0; margin: -20px -16px 18px; padding: 2rem 1.35rem 1.5rem; }.armory-banner h1 { font-size: clamp(3.2rem, 17vw, 5rem); }.drop-odds { grid-template-columns: 1fr 1fr; }.drop-odds span:last-child { grid-column: 1 / -1; }.character-scroll, .chest-room, .inventory-vault { margin-right: -8px; margin-left: -8px; }.character-sheet { width: 100%; }.equipped-slots, .loot-inventory { grid-template-columns: 1fr; }.coffer-count { top: 1.4rem; right: 1.4rem; }.coffer-button { min-height: 250px; }.loot-card { grid-template-columns: auto 1fr; }.loot-card button { grid-column: 2; justify-self: start; }.level-up-content > strong { font-size: 7rem; } }

/* Reminder safety, medication editing, and data-control refinements */
.med-reminder-health {
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: -24px 0 28px;
  padding: .85rem 1rem;
  border: 1px solid rgba(68, 125, 106, .2);
  border-left: 3px solid var(--sage);
  background: rgba(224, 233, 223, .42);
}
.med-reminder-health > div { display: grid; gap: .18rem; }
.med-reminder-health > span { width: 32px; height: 32px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; color: white; background: var(--sage); font-weight: 800; }
.med-reminder-health strong { font-family: var(--display); font-size: 1rem; font-weight: 600; }
.med-reminder-health small { color: var(--ink-soft); font-size: .66rem; line-height: 1.45; }
.med-reminder-health button { flex: 0 0 auto; }
.med-alert-copy { color: var(--sage) !important; font-size: .65rem !important; font-weight: 700; line-height: 1.35; }
.med-form [hidden] { display: none !important; }
.med-form-error {
  margin: 0;
  padding: .75rem .85rem;
  border-left: 3px solid var(--terracotta);
  color: #7f2f1d;
  background: rgba(201, 101, 66, .1);
  font-size: .68rem;
  line-height: 1.45;
}
.med-schedule-preview {
  display: grid;
  gap: .25rem;
  padding: .9rem 1rem;
  border: 1px solid rgba(68, 125, 106, .22);
  background: rgba(224, 233, 223, .34);
}
.med-schedule-preview h3 { margin: 0; font-family: var(--display); font-size: 1.1rem; font-weight: 600; }
.med-schedule-preview p { margin: 0; color: var(--ink-soft); font-size: .66rem; line-height: 1.5; }
.medication-editing > .meds-intro,
.medication-editing > .protocol-panel,
.medication-editing > .med-overview-grid,
.medication-editing > .med-history-panel,
.medication-editing .med-list { display: none; }
.medication-editing .med-reminder-health { margin-top: 0; }
.medication-editing .med-layout { grid-template-columns: minmax(0, 760px); justify-content: center; }
.med-form.is-editing {
  position: static;
  width: 100%;
  padding: clamp(1.35rem, 4vw, 2.4rem);
  border-top: 4px solid var(--terracotta);
  box-shadow: 0 30px 80px rgba(30, 54, 44, .11);
}
.reminder-sync-detail { min-height: 1.3em; margin: 0; color: var(--sage); font-size: .62rem; font-weight: 700; line-height: 1.45; }
.reminder-test { justify-self: start; padding: .35rem 0; }
.profile-data-tools { display: grid; gap: .55rem; margin-top: 1.5rem; padding: 1rem; border: 1px solid var(--line); background: rgba(224, 233, 223, .28); }
.profile-data-tools h3, .profile-data-tools p { margin: 0; }
.profile-data-tools h3 { font-family: var(--display); font-size: 1.05rem; font-weight: 600; }
.sync-panel { display: grid; gap: .55rem; }
.sync-panel[hidden] { display: none; }
.sync-panel > div { display: flex; flex-wrap: wrap; gap: .5rem; }
.sync-tools label { font-size: .7rem; font-weight: 700; }
.dialog-shell .sync-mode { margin: .25rem 0 0; }
.sync-mode .focus-options label { font-weight: 400; }
.sync-code { margin: 0; font-size: .95rem; }
.sync-code strong { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 1.35rem; letter-spacing: .12em; }
.sync-devices { display: grid; gap: .35rem; margin: 0; padding: 0; list-style: none; }
.sync-devices li { display: flex; justify-content: space-between; align-items: center; gap: .75rem; padding: .45rem 0; border-top: 1px solid var(--line); font-size: .78rem; font-weight: 700; }
.sync-devices li > span { flex: 1; min-width: 0; }
.sync-devices small { display: block; font-weight: 400; opacity: .75; }
.sync-devices .text-action { flex: none; width: auto; min-width: 0; margin: 0; padding: .3rem 0; }
.profile-data-tools p { color: var(--ink-soft); font-size: .64rem; line-height: 1.45; }
.profile-data-tools > div { display: flex; flex-wrap: wrap; gap: .55rem; }
#backup-status:empty { display: none; }
.toast { max-width: min(520px, calc(100vw - 32px)); }
.toast > div { min-width: 0; flex: 1; }
.toast-action { min-height: 36px; padding: .45rem .7rem; border: 1px solid rgba(255,255,255,.3); color: white; background: transparent; cursor: pointer; font: 800 .62rem/1 var(--body); text-transform: uppercase; letter-spacing: .06em; }
.toast-action:hover { color: var(--ink); background: #e9bc73; }
.toast-action[hidden] { display: none; }

.life-admin-view input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
.life-admin-view select,
.life-admin-view textarea,
.life-admin-view button { min-height: 44px; }
.life-admin-view .row-delete { width: 44px; height: 44px; }

@media (max-width: 640px) {
  main { padding-bottom: calc(118px + env(safe-area-inset-bottom)); }
  .main-nav { bottom: max(10px, env(safe-area-inset-bottom)); }
  .toast { bottom: calc(94px + env(safe-area-inset-bottom)); }
  .med-reminder-health { align-items: stretch; flex-direction: column; margin-top: -10px; }
  .med-reminder-health button { width: 100%; }
  .medication-editing .med-reminder-health { display: none; }
  .medication-editing .med-layout { margin: -14px -8px 0; }
  .med-form.is-editing { padding: 1.25rem; }
  .med-copy p { font-size: .62rem; }
  .med-copy > span, .med-schedule, .med-schedule small { font-size: .68rem; line-height: 1.4; }
  .weekday-picker span { min-height: 44px; }
  .profile-data-tools > div { display: grid; grid-template-columns: 1fr; }
  .profile-data-tools button { width: 100%; }
  .dialog-shell { max-height: calc(100dvh - 24px); overflow-y: auto; }
  .toast { align-items: flex-start; flex-wrap: wrap; }
  .toast-action { margin-left: 45px; }
}

/* Dose-first medication tracking */
#meds-view .meds-intro { padding-top: 18px; margin-bottom: 24px; gap: 24px; }
#meds-view .meds-intro h1 { font-size: clamp(2rem, 4vw, 3.6rem); }
#meds-view .next-dose-orb { width: 170px; height: 170px; min-width: 170px; }
.dose-agenda { margin: 24px 0 36px; padding: clamp(18px, 3vw, 32px); background: var(--paper, #faf8f1); border: 1px solid var(--line); border-top: 3px solid var(--sage); }
.dose-agenda-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 20px; }
.dose-agenda-heading h2, .med-schedules-title { font-family: var(--display); font-weight: 500; font-size: 1.6rem; margin: 4px 0 10px; }
.dose-agenda-heading p:last-child { font-size: 14px; color: var(--ink-soft); max-width: 620px; }
.dose-date-nav { display: flex; align-items: end; gap: 14px; }
.dose-date-nav label { display: grid; gap: 6px; font-size: 13px; }
.dose-date-nav input { padding: 10px; border: 1px solid var(--line); background: transparent; color: var(--ink); font-size: 16px; min-height: 44px; }
.dose-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 0; border-top: 1px solid var(--line); }
.dose-row > div:first-child { display: grid; gap: 6px; }
.dose-row time { font-size: 13px; color: var(--ink-soft); }
.dose-row strong { font-family: var(--display); font-size: 1.15rem; font-weight: 500; }
.dose-row span { font-size: 14px; }
.dose-row.taken, .dose-row.skipped { background: rgba(110, 145, 126, .06); }
.dose-actions { display: flex !important; flex-wrap: wrap; gap: 10px; align-items: center; }
.dose-actions button { min-height: 44px; padding: 10px 14px; font-size: 13px; }
.dose-state { font-weight: 700; color: var(--ink); }
.dose-upcoming-disclosure { margin-top: 12px; }
.dose-upcoming-disclosure summary { padding: 14px 0; cursor: pointer; font-size: 15px; font-weight: 700; }
.dose-empty { font-size: 15px; color: var(--ink-soft); padding: 18px 0; }
#meds-view .med-card { display: grid; grid-template-columns: 1fr; padding: 22px; min-height: 0; gap: 18px; }
#meds-view .med-card .med-copy { grid-column: auto; }
#meds-view .med-card .med-copy > span, #meds-view .med-card .med-copy small { font-size: 13px; }
#meds-view .med-history-entry small, #meds-view .med-history-entry > div:first-child span { font-size: 13px; }
#meds-view .med-history-entry > div > strong { font-size: 14px; }
.med-history-entry.is-void { opacity: .68; }
.med-history-entry details { font-size: 13px; }
.med-history-entry details p { margin: 8px 0; }
#meds-view.medication-editing .med-list { display: block; }
#meds-view.medication-editing .med-layout { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); align-items: start; }
#med-effective-label small, #med-extra-times-label small { display: block; font-size: 13px; line-height: 1.5; font-weight: 400; margin-top: 6px; }
#meds-view .med-form input, #meds-view .med-form select { min-height: 44px; font-size: 16px; }
.dose-amount-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 20px 0; }
#dose-correction-dialog { width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); overflow-y: auto; }
#dose-correction-dialog .dialog-shell { padding: clamp(20px, 4vw, 36px); }
#dose-correction-dialog label { display: grid; gap: 8px; font-size: 14px; }
#dose-correction-dialog label span { font-weight: 400; }
#dose-correction-dialog input, #dose-correction-dialog select { width: 100%; min-width: 0; min-height: 46px; font-size: 16px; padding: 10px; color: var(--ink); border: 1px solid var(--line); background: transparent; }
#dose-correction-copy { font-size: 15px; line-height: 1.6; }
#dose-editor-error { font-size: 14px; color: #9b3525; background: #fff0e8; padding: 12px; }
#meds-view button:focus-visible, #meds-view summary:focus-visible, #dose-correction-dialog button:focus-visible, #dose-correction-dialog input:focus-visible { outline: 3px solid var(--terracotta); outline-offset: 3px; }
@media(max-width: 760px) {
  .dose-agenda-heading, .dose-row { align-items: stretch; flex-direction: column; }
  .dose-row { gap: 14px; }
  .dose-date-nav { justify-content: space-between; }
  #meds-view.medication-editing .med-layout { grid-template-columns: 1fr; margin: 0; }
  #meds-view.medication-editing .med-form { grid-row: 1; }
  #meds-view .next-dose-orb { display: none; }
  .dose-actions { gap: 8px; }
  .dose-actions button { flex: 1 1 auto; }
  #meds-view .med-history-entry { grid-template-columns: 1fr; }
  #meds-view .med-past-entry { flex-wrap: wrap; }
}

/* Evidence-led daily growth */
.growth-context-card { margin-bottom: 32px; }
.growth-context-card .coach-copy h2 { max-width: 760px; }
.daily-practice-layout { gap: clamp(1.5rem, 3.5vw, 3.25rem); margin-bottom: 54px; }
.daily-move-section {
  min-width: 0;
  padding: clamp(1.25rem, 3vw, 2.1rem);
  border: 1px solid rgba(23, 56, 47, .14);
  background: rgba(251, 249, 243, .64);
  box-shadow: 0 20px 55px rgba(40, 59, 49, .055);
}
.daily-move-section > .section-heading { margin-bottom: 1.1rem; }
.daily-intention-form {
  display: grid;
  grid-template-columns: minmax(150px, .45fr) minmax(0, 1fr);
  align-items: end;
  gap: 1rem;
  margin-bottom: 12px;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(23, 56, 47, .1);
  background: rgba(224, 233, 223, .27);
}
.daily-intention-form > label { display: grid; gap: .22rem; font-size: .68rem; font-weight: 800; }
.daily-intention-form > label small { color: var(--ink-soft); font-size: .56rem; font-weight: 400; }
.daily-intention-form > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: .8rem; }
.daily-intention-form textarea {
  width: 100%;
  min-height: 42px;
  padding: .65rem 0 .45rem;
  resize: vertical;
  border: 0;
  border-bottom: 1px solid rgba(23, 56, 47, .28);
  outline: 0;
  background: transparent;
  line-height: 1.45;
}
.daily-intention-form textarea:focus { border-color: var(--terracotta); box-shadow: 0 2px 0 rgba(201, 101, 66, .22); }
.daily-move-card {
  position: relative;
  min-height: 260px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 1.35rem;
  padding: clamp(1.35rem, 3vw, 2.15rem);
  overflow: hidden;
  border: 1px solid rgba(23, 56, 47, .17);
  background: linear-gradient(115deg, rgba(255,255,255,.48), transparent 52%), rgba(251, 249, 243, .94);
  transition: border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}
.daily-move-card::before { position: absolute; inset: 0 auto 0 0; width: 4px; content: ""; background: var(--quest-color); }
.daily-move-card::after { position: absolute; right: -84px; bottom: -120px; width: 250px; height: 250px; content: ""; pointer-events: none; border: 1px solid rgba(23, 56, 47, .07); border-radius: 50%; }
.daily-move-card:hover { border-color: rgba(23, 56, 47, .3); box-shadow: 0 18px 42px rgba(40, 59, 49, .07); transform: translateY(-1px); }
.daily-move-card.complete { border-color: rgba(68, 125, 106, .42); background: linear-gradient(125deg, rgba(224, 233, 223, .62), rgba(251, 249, 243, .9)); }
.move-number { position: absolute; top: 1rem; right: 1.2rem; color: rgba(23, 56, 47, .08); font-family: var(--display); font-size: 4.4rem; line-height: 1; }
.daily-move-card .quest-icon { width: 58px; height: 58px; }
.daily-move-card .quest-body { position: relative; z-index: 1; }
.daily-move-card .quest-body h3 { max-width: 670px; font-size: clamp(1.65rem, 3vw, 2.5rem); line-height: 1.02; }
.daily-move-card .quest-body > p { max-width: 680px; font-size: .82rem; }
.move-why { max-width: 660px; display: grid; grid-template-columns: auto 1fr; gap: .6rem; margin-top: 1rem; padding-top: .85rem; border-top: 1px solid rgba(23, 56, 47, .1); color: var(--ink-soft); }
.move-why > span { color: var(--terracotta); }
.move-why p { display: grid; gap: .12rem; margin: 0; font-size: .66rem; line-height: 1.45; }
.move-why strong { color: var(--ink); font-size: .55rem; letter-spacing: .1em; text-transform: uppercase; }
.move-completion { position: relative; z-index: 1; display: grid; justify-items: center; gap: .55rem; }
.move-completion > span { color: var(--terracotta); font-size: .52rem; font-weight: 900; letter-spacing: .13em; }
.daily-move-card .complete-button { width: 48px; height: 48px; background: rgba(251, 249, 243, .68); }
.daily-move-card .complete-button:disabled { cursor: default; opacity: 1; }
.daily-move-card .complete-button[aria-pressed="true"] { color: white; background: var(--sage); border-color: var(--sage); }
.move-choice-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem; margin-top: 10px; }
.move-choice-actions .secondary-button { min-height: 42px; padding: .65rem .8rem; background: rgba(251, 249, 243, .42); }
.move-choice-actions .text-action { margin-left: auto; color: var(--ink-soft); }
.saved-outcome { display: grid; gap: .35rem; margin-top: 1.15rem; padding: .9rem 1rem; border-left: 3px solid var(--sage); background: rgba(255,255,255,.45); }
.saved-outcome > strong { font-family: var(--display); font-size: 1.05rem; }
.saved-outcome p { margin: 0; color: var(--ink-soft); font-size: .7rem; line-height: 1.5; }
.saved-outcome .text-action, .add-outcome-later { justify-self: start; font-size: .62rem; }
.growth-outcome-form { display: grid; gap: 1rem; margin-top: 12px; padding: clamp(1.25rem, 3vw, 2rem); color: #f7f2e7; background: var(--ink); border-radius: 2px 2px 24px 2px; }
.growth-outcome-form .eyebrow { color: #e9bc73; }
.outcome-heading h3 { margin: .25rem 0 0; font-family: var(--display); font-size: 1.8rem; font-weight: 500; }
.outcome-heading p:last-child { max-width: 620px; margin: .35rem 0 0; color: rgba(255,255,255,.62); font-size: .7rem; line-height: 1.5; }
.growth-outcome-form fieldset { margin: 0; padding: 0; border: 0; }
.growth-outcome-form legend, .growth-outcome-form > label:not(.evidence-check) { margin-bottom: .45rem; color: rgba(255,255,255,.76); font-size: .62rem; font-weight: 800; }
.growth-outcome-form > label span { color: rgba(255,255,255,.46); font-weight: 400; }
.outcome-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin-top: .55rem; }
.outcome-options label { min-height: 44px; display: flex; align-items: center; gap: .55rem; padding: .65rem .75rem; border: 1px solid rgba(255,255,255,.17); cursor: pointer; font-size: .66rem; }
.outcome-options label:has(input:checked) { color: var(--ink); background: #e9bc73; border-color: #e9bc73; }
.growth-outcome-form textarea { width: 100%; padding: .8rem; color: white; border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.06); resize: vertical; }
.growth-outcome-form textarea::placeholder { color: rgba(255,255,255,.34); }
.evidence-check { display: flex; align-items: center; gap: .65rem; color: rgba(255,255,255,.72); font-size: .66rem; }
.evidence-check input { width: 18px; height: 18px; accent-color: #e9bc73; }
.outcome-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .85rem; }
.growth-outcome-form .primary-button { color: var(--ink); background: #e9bc73; }
.growth-outcome-form .text-action { color: rgba(255,255,255,.68); border-color: rgba(255,255,255,.26); }
.rest-day-card { min-height: 220px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1.2rem; padding: 1.5rem; border: 1px dashed rgba(23,56,47,.24); background: rgba(224,233,223,.24); }
.rest-day-card > span { color: var(--sage); font-family: var(--display); font-size: 2.8rem; }
.rest-day-card h3 { margin: .2rem 0; font-family: var(--display); font-size: 1.8rem; font-weight: 500; }
.rest-day-card p:last-child { margin: 0; color: var(--ink-soft); font-size: .72rem; }
.week-day.rested i { color: var(--sage); border-style: dashed; }
.growth-plan-dialog label > span, .custom-move-dialog label > span { color: var(--ink-soft); font-weight: 400; }
.growth-plan-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.growth-plan-dialog menu, .custom-move-dialog menu { justify-content: space-between; }
.growth-first-intro { margin-top: 0; }
.journey-secondary-intro { margin-top: 92px; }
.weekly-review-card { display: grid; justify-items: start; background: rgba(224,233,223,.52); }
.weekly-review-card h2 { margin-bottom: .55rem; }
.weekly-review-card > p:not(.eyebrow) { max-width: 780px; margin: 0 0 1.2rem; color: var(--ink-soft); font-size: .75rem; line-height: 1.6; }
.evidence-journal { background: rgba(251,249,243,.82); }
.evidence-list em { margin-top: .2rem; color: var(--ink); font-size: .7rem; font-style: normal; line-height: 1.5; }
.journey-level.locked { color: rgba(23,56,47,.58); }
.daily-move-section button:focus-visible, .daily-move-section textarea:focus-visible,
.growth-plan-dialog button:focus-visible, .growth-plan-dialog input:focus-visible, .growth-plan-dialog select:focus-visible,
.custom-move-dialog button:focus-visible, .custom-move-dialog input:focus-visible, .custom-move-dialog select:focus-visible, .custom-move-dialog textarea:focus-visible { outline: 3px solid rgba(201,101,66,.42); outline-offset: 3px; }

@media (max-width: 960px) {
  .daily-practice-layout { grid-template-columns: 1fr; }
  .daily-practice-layout .side-column { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  #today-view .hero-grid { gap: 1.25rem; margin-bottom: 24px; }
  #today-view .hero-copy h1 { font-size: clamp(2.8rem, 14vw, 4rem); }
  #today-view .hero-intro { margin-top: 1rem; font-size: .92rem; }
  #today-view .level-card { min-height: 0; padding: 1.15rem; }
  #today-view .level-emblem { width: 64px; height: 64px; }
  #today-view .next-unlock { margin-top: .65rem; }
  .growth-context-card { grid-template-columns: auto 1fr; gap: .8rem; margin-bottom: 18px; padding: 1rem; }
  .growth-context-card .coach-seal { width: 42px; height: 42px; }
  .growth-context-card .text-action { grid-column: 1 / -1; justify-self: stretch; justify-content: space-between; margin: 0; padding-left: 0; }
  .daily-move-section { margin-right: -8px; margin-left: -8px; padding: 1rem; }
  .daily-move-section .section-heading { align-items: start; }
  .daily-move-section .section-heading h2 { font-size: 1.75rem; }
  .daily-intention-form { grid-template-columns: 1fr; padding: .9rem; }
  .daily-intention-form > div { grid-template-columns: 1fr; }
  .daily-intention-form .text-action { justify-self: start; }
  .daily-move-card { min-height: 0; grid-template-columns: auto 1fr; align-items: start; gap: .9rem; padding: 1.15rem 1rem 1.2rem; }
  .daily-move-card .quest-icon { width: 46px; height: 46px; }
  .daily-move-card .quest-body h3 { padding-right: 1.2rem; font-size: 1.55rem; }
  .daily-move-card .quest-body > p { font-size: .72rem; }
  .move-number { top: .75rem; right: .75rem; font-size: 3rem; }
  .move-completion { grid-column: 1 / -1; width: 100%; grid-template-columns: 1fr auto; justify-items: start; align-items: center; padding-top: .85rem; border-top: 1px solid rgba(23,56,47,.1); }
  .move-completion .complete-button { justify-self: end; }
  .move-choice-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .move-choice-actions .secondary-button { width: 100%; min-height: 46px; }
  .move-choice-actions .text-action { grid-column: 1 / -1; justify-self: start; margin-left: 0; }
  .outcome-options { grid-template-columns: 1fr; }
  .outcome-actions { align-items: stretch; flex-direction: column; }
  .outcome-actions .primary-button { width: 100%; }
  .outcome-actions .text-action { justify-content: center; }
  .rest-day-card { grid-template-columns: auto 1fr; }
  .rest-day-card .secondary-button { grid-column: 1 / -1; width: 100%; }
  .daily-practice-layout .side-column { grid-template-columns: 1fr; }
  .life-snapshot { grid-template-columns: 1fr; margin-top: 0; }
  .life-snapshot .snapshot-heading { min-height: 0; grid-row: auto; padding: 1.25rem; }
  .life-snapshot .snapshot-card { min-height: 76px; }
  .growth-plan-grid { grid-template-columns: 1fr; }
  .growth-plan-dialog .dialog-shell, .custom-move-dialog .dialog-shell { padding: 1.5rem; }
  .insight-grid { grid-template-columns: 1fr; }
  .insight-journal { grid-column: 1; padding: 1.35rem; }
  .evidence-list { grid-template-columns: 1fr; }
  .journey-secondary-intro { margin-top: 64px; }
}

#med-reminder-dialog { background:var(--paper-light); color:var(--ink); box-shadow:var(--shadow); width:min(520px,calc(100vw - 32px)); max-height:calc(100dvh - 32px); overflow:auto; padding:24px; }
#med-reminder-dialog .reminder-card { margin:16px 0; }

/* Monthly field notes: paper, forest ink, and a warm margin. */
.life-project { margin: 1.5rem 0 2rem; padding: clamp(20px, 3vw, 36px); background: var(--paper-light); border: 1px solid var(--line); border-left: 4px solid var(--terracotta); border-radius: 18px; }
.life-heading { display: flex; justify-content: space-between; gap: 20px; }
.life-project h2 { margin: 8px 0; font-family: var(--display); font-size: clamp(28px, 3vw, 40px); font-weight: 500; }
.life-project p { color: var(--ink-soft); line-height: 1.6; }
.life-emblem { font-size: 60px; color: var(--terracotta); }
.life-next { margin: 22px 0; padding: 16px 22px; background: var(--paper); border-radius: 10px; }
.life-next p { margin: 4px 0; }
.life-project details { border-top: 1px solid var(--line); padding: 16px 0 4px; margin-top: 12px; }
.life-project summary { cursor: pointer; font-weight: 600; min-height: 32px; }
.life-form { display: grid; gap: 16px; margin-top: 18px; max-width: 800px; }
.life-form label { display: grid; gap: 7px; font-size: 14px; font-weight: 500; }
.life-form input, .life-form textarea, .life-form select { box-sizing: border-box; width: 100%; min-width: 0; padding: 12px; color: var(--ink); background: white; border: 1px solid var(--line); border-radius: 8px; font: inherit; }
.life-form textarea { resize: vertical; }
.life-form button { justify-self: start; }
.life-form p { margin: 0; }
.life-form small { color: var(--ink-soft); }
.life-row { display: grid; grid-template-columns: 2fr 1fr; gap: 14px; }
.life-review-entry { border-bottom: 1px solid var(--line); padding: 16px 0; overflow-wrap: anywhere; }
.life-project h2, .life-next p { overflow-wrap: anywhere; }
@media (max-width: 600px) { .life-row { grid-template-columns: 1fr; } .life-emblem { display: none; } .life-project { padding: 20px; } }

/* ---------- Character sheet (levelling and rewards) ---------- */
.hero-sheet {
  --hero-ground: #0d111c; --hero-panel: #151b2b; --hero-panel-2: #1b2336; --hero-line: #2a3450; --hero-ink: #e7eaf3; --hero-muted: #8d98b5;
  --hero-xp: #f0c060; --hero-xp-deep: #b8862a; --hero-gold: #f5d27a; --hero-system: #74d4ff; --hero-good: #74c69d; --hero-danger: #ef8a6b;
  --hero-vit: #74c69d; --hero-int: #79aefc; --hero-cha: #e89ac7; --hero-amb: #ef8a6b; --hero-dis: #a998f5; --hero-spi: #5fd0c8;
  --hero-display: "Alegreya SC", "Palatino Linotype", Palatino, Georgia, serif;
  --hero-body: "Alegreya Sans", "Segoe UI", system-ui, sans-serif;
  --hero-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: dark;
  display: grid; gap: 18px; max-width: 620px; margin: 0 auto 3rem; padding: 20px 16px 28px;
  color: var(--hero-ink); font: 16px/1.45 var(--hero-body);
  background: radial-gradient(ellipse 120% 30% at 50% -6%, color-mix(in srgb, var(--hero-system) 12%, transparent), transparent 70%), var(--hero-ground);
  border-radius: 10px; box-shadow: 0 22px 60px rgba(13, 17, 28, 0.35);
}
.hero-sheet button { font: inherit; color: inherit; cursor: pointer; }
.hero-sheet button:focus-visible, .hero-sheet input:focus-visible, .hero-sheet select:focus-visible { outline: 2px solid var(--hero-system); outline-offset: 2px; }
.hero-window { background: var(--hero-panel); border: 1px solid var(--hero-line); border-radius: 6px; position: relative; min-width: 0; }
.hero-window::before, .hero-window::after { content: ""; position: absolute; width: 10px; height: 10px; border: 2px solid var(--hero-system); opacity: .55; pointer-events: none; }
.hero-window::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; border-top-left-radius: 6px; }
.hero-window::after { bottom: -1px; right: -1px; border-left: 0; border-top: 0; border-bottom-right-radius: 6px; }
.hero-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 14px 16px 0; flex-wrap: wrap; }
.hero-head h2 { margin: 0; font: 700 1.05rem/1.2 var(--hero-display); letter-spacing: .08em; color: var(--hero-ink); }
.hero-meta { color: var(--hero-muted); font-size: .85rem; }
.hero-min { min-width: 0; display: block; }

.hero-status { padding: 18px 16px 16px; display: grid; gap: 14px; }
.hero-ident { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; }
.hero-sigil { width: 64px; height: 64px; display: grid; place-items: center; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); background: linear-gradient(160deg, var(--hero-xp), var(--hero-xp-deep)); position: relative; }
.hero-sigil span { position: absolute; inset: 3px; display: grid; place-items: center; clip-path: inherit; background: var(--hero-panel-2); font: 800 1.9rem/1 var(--hero-display); color: var(--hero-xp); }
.hero-ident h2 { margin: 0; font: 800 1.6rem/1.1 var(--hero-display); letter-spacing: .03em; color: var(--hero-ink); overflow-wrap: anywhere; }
.hero-title { color: var(--hero-muted); font-size: .95rem; }
.hero-title b { color: var(--hero-xp); }
.hero-lvl { text-align: center; line-height: 1; }
.hero-lvl small { display: block; font: 700 .7rem var(--hero-mono); letter-spacing: .14em; color: var(--hero-muted); }
.hero-lvl strong { font: 800 2.6rem/1 var(--hero-display); color: var(--hero-xp); text-shadow: 0 0 18px color-mix(in srgb, var(--hero-xp) 40%, transparent); font-variant-numeric: tabular-nums; }
.hero-xpbar { display: grid; gap: 6px; }
.hero-row { display: flex; justify-content: space-between; font-size: .85rem; color: var(--hero-muted); gap: 8px; flex-wrap: wrap; }
.hero-row b { color: var(--hero-ink); font-weight: 500; font-family: var(--hero-mono); }
.hero-track { height: 14px; border-radius: 3px; background: var(--hero-ground); border: 1px solid var(--hero-line); overflow: hidden; }
.hero-track.small { height: 6px; margin-top: 6px; }
.hero-fill { height: 100%; border-radius: 2px; background: linear-gradient(90deg, var(--hero-xp-deep), var(--hero-xp)); box-shadow: 0 0 12px color-mix(in srgb, var(--hero-xp) 55%, transparent); transition: width .7s cubic-bezier(.2,.8,.2,1); }
.hero-chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.hero-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--hero-panel-2); border: 1px solid var(--hero-line); font-size: .85rem; color: var(--hero-muted); }
.hero-chip b { color: var(--hero-ink); font: 700 .8rem var(--hero-mono); }
.hero-chip.gold b { color: var(--hero-gold); }
.hero-chip.debuff { border-color: var(--hero-danger); color: var(--hero-danger); }
.hero-chip.debuff b { color: var(--hero-danger); }
.hero-coin { width: 14px; height: 14px; flex: none; }
.hero-week { display: inline-flex; gap: 3px; }
.hero-week i { width: 8px; height: 8px; border-radius: 2px; background: var(--hero-ground); border: 1px solid var(--hero-line); }
.hero-week i.on { background: var(--hero-good); border-color: var(--hero-good); }
.hero-week i.today { outline: 1px solid var(--hero-system); outline-offset: 1px; }

.hero-build { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 14px; padding: 12px 16px 16px; align-items: center; }
.hero-doll { width: 100%; max-width: 210px; justify-self: center; display: block; }
.hero-glow { filter: drop-shadow(0 0 6px var(--g)); }
.hero-slots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.hero-slot { aspect-ratio: 1; border: 1px solid var(--r, var(--hero-line)); border-radius: 4px; background: var(--hero-ground); display: grid; place-items: center; overflow: hidden; color: var(--r, var(--hero-muted)); font-size: 1.6rem; }
.hero-slot img { width: 100%; height: 100%; object-fit: cover; }
.hero-empty { font: 700 .62rem var(--hero-mono); color: var(--hero-muted); letter-spacing: .08em; text-align: center; }
.hero-gear { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: .82rem; color: var(--hero-muted); }
.hero-gear b { color: var(--hero-ink); font-family: var(--hero-mono); }
.hero-link { background: none; border: 0; color: var(--hero-system); text-decoration: underline; padding: 0; font-size: .85rem; }
.hero-link.danger { color: var(--hero-muted); font-size: .75rem; }

.hero-attrs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--hero-line); margin-top: 12px; border-top: 1px solid var(--hero-line); border-radius: 0 0 6px 6px; overflow: hidden; }
.hero-attr { background: var(--hero-panel); padding: 12px 12px 12px 14px; display: grid; gap: 2px; }
.hero-attr .abbr { font: 700 .72rem var(--hero-mono); letter-spacing: .14em; color: var(--c); }
.hero-attr .val { font: 800 1.7rem/1 var(--hero-display); }
.hero-attr .name { font-size: .78rem; color: var(--hero-muted); }
.hero-attr .hero-fill { background: var(--c); box-shadow: none; }

.hero-list { list-style: none; margin: 10px 0 0; padding: 0; }
.hero-empty-copy { margin: 10px 16px 0; color: var(--hero-muted); font-size: .9rem; }
.hero-vow, .hero-skill { border-top: 1px solid var(--hero-line); padding: 12px 16px; display: grid; gap: 10px; }
.hero-vow-top, .hero-skill-row, .hero-treat { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.hero-tile { width: 44px; height: 44px; border-radius: 6px; display: grid; place-items: center; color: var(--d); background: color-mix(in srgb, var(--d) 14%, var(--hero-ground)); border: 1px solid color-mix(in srgb, var(--d) 45%, transparent); }
.hero-tile svg { width: 24px; height: 24px; }
.hero-name { display: flex; align-items: center; gap: 6px; font-weight: 700; min-width: 0; }
.hero-name span:first-child { overflow-wrap: anywhere; }
.hero-star { background: none; border: 0; padding: 2px; color: var(--hero-muted); line-height: 0; }
.hero-star svg { width: 18px; height: 18px; }
.hero-star.on { color: var(--hero-xp); }
.hero-star.on svg path { fill: currentColor; }
.hero-skill-meta, .hero-skill-sub, .hero-stats, .hero-treat-meta { font-size: .78rem; color: var(--hero-muted); }
.hero-skill-meta b, .hero-stats b { color: var(--hero-ink); font-family: var(--hero-mono); }
.hero-skill .hero-fill { background: linear-gradient(90deg, color-mix(in srgb, var(--d) 60%, black), var(--d)); box-shadow: none; }
.hero-skill.gate .hero-fill { background: repeating-linear-gradient(135deg, var(--hero-xp) 0 6px, var(--hero-xp-deep) 6px 12px); }
.hero-skill-sub { margin-top: 3px; }
.hero-rusty { font: 700 .62rem var(--hero-mono); letter-spacing: .1em; color: var(--hero-danger); border: 1px solid var(--hero-danger); border-radius: 3px; padding: 0 4px; }
.hero-trial { border: 1px solid var(--hero-xp-deep); border-radius: 4px; padding: 10px 12px; display: grid; gap: 8px; background: color-mix(in srgb, var(--hero-xp) 6%, transparent); }
.hero-trial .k { font: 700 .66rem var(--hero-mono); letter-spacing: .16em; color: var(--hero-xp); display: grid; gap: 6px; }
.hero-trial .txt { font-weight: 500; }
.hero-next-trial { font-size: .78rem; color: var(--hero-muted); }
.hero-next-trial b { color: var(--hero-ink); font-weight: 500; }
.hero-logform { display: grid; gap: 8px; padding: 10px 12px; border-radius: 4px; background: var(--hero-panel-2); }
.hero-mins { display: flex; gap: 6px; flex-wrap: wrap; }
.hero-mins label { position: relative; }
.hero-mins input, .hero-icon-pick input { position: absolute; opacity: 0; pointer-events: none; }
.hero-mins span { display: inline-block; padding: 6px 10px; border: 1px solid var(--hero-line); border-radius: 4px; font: 700 .8rem var(--hero-mono); color: var(--hero-muted); }
.hero-mins input:checked + span { border-color: var(--hero-system); color: var(--hero-system); }
.hero-mins input:focus-visible + span, .hero-icon-pick input:focus-visible + span { outline: 2px solid var(--hero-system); }
.hero-check { display: flex; gap: 8px; align-items: center; font-size: .85rem; }
.hero-check input { width: 18px; height: 18px; accent-color: var(--hero-xp); }
.hero-preview { font: 700 .82rem var(--hero-mono); color: var(--hero-xp); }
.hero-class { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 14px; align-items: center; margin: 12px 16px 4px; padding: 12px; border-radius: 6px; background: var(--hero-panel-2); border: 1px solid var(--hero-line); }
.hero-class svg { width: 64px; height: 72px; }
.hero-class .hero-crest .reward-art-fallback svg { height: 64px; }
.hero-class .hero-crest-marks svg { width: 12px; height: 12px; }
.hero-tile > .reward-art { width: 40px; height: 40px; }
.hero-class h3 { margin: 0; font: 800 1.25rem/1.1 var(--hero-display); letter-spacing: .04em; color: var(--hero-ink); }
.hero-class p { margin: 2px 0 0; font-size: .85rem; color: var(--hero-muted); }
.hero-titles { color: var(--hero-xp); font-size: .82rem; margin-top: 4px; }

.hero-vow-days { text-align: right; line-height: 1; }
.hero-vow-days strong { font: 800 1.9rem/1 var(--hero-display); color: var(--hero-good); }
.hero-vow-days small { display: block; font: 700 .62rem var(--hero-mono); letter-spacing: .12em; color: var(--hero-muted); margin-top: 2px; }
.hero-vow-rank { font: 700 .62rem var(--hero-mono); letter-spacing: .12em; color: var(--hero-xp); border: 1px solid var(--hero-xp-deep); border-radius: 3px; padding: 0 4px; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 4px 10px; }
.hero-stats .money b { color: var(--hero-good); }
.hero-path { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 2px; align-items: start; position: relative; }
.hero-path::before { content: ""; position: absolute; left: 5%; right: 5%; top: 9px; height: 2px; background: var(--hero-line); }
.hero-path .node { display: grid; justify-items: center; gap: 3px; position: relative; font: 700 .6rem var(--hero-mono); color: var(--hero-muted); }
.hero-path .node i { width: 20px; height: 20px; border-radius: 50%; background: var(--hero-ground); border: 2px solid var(--hero-line); display: grid; place-items: center; }
.hero-path .node.reached i { background: var(--hero-good); border-color: var(--hero-good); }
.hero-path .node.next i { border-color: var(--hero-xp); box-shadow: 0 0 8px color-mix(in srgb, var(--hero-xp) 60%, transparent); }
.hero-path .node.loot i::after { content: ""; width: 6px; height: 6px; border-radius: 1px; background: var(--hero-xp); }
.hero-path .node.reached.loot i::after { background: var(--hero-ground); }
.hero-vow-foot { display: flex; justify-content: space-between; gap: 10px; align-items: center; flex-wrap: wrap; font-size: .8rem; color: var(--hero-muted); }
.hero-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.hero-prompt { border: 1px dashed var(--hero-system); border-radius: 4px; padding: 10px 12px; display: grid; gap: 8px; font-size: .88rem; }
.hero-prompt.shaken { border-color: var(--hero-danger); }
.hero-support { margin: 10px 0 0; padding: 10px 16px 0; border-top: 1px solid var(--hero-line); font-size: .78rem; color: var(--hero-muted); }
.hero-support span { color: var(--hero-ink); font-family: var(--hero-mono); user-select: all; white-space: nowrap; }

.hero-btn { border: 1px solid var(--hero-line); background: var(--hero-panel-2); padding: 10px 16px; border-radius: 4px; font-weight: 700; }
.hero-btn.small { padding: 7px 12px; font-size: .82rem; }
.hero-btn.primary { background: var(--hero-xp); border-color: var(--hero-xp); color: var(--hero-ground); }
.hero-btn.primary.confirm, .hero-buy.confirm { background: var(--hero-gold); border-color: var(--hero-gold); color: var(--hero-ground); }
.hero-btn:disabled { opacity: .45; cursor: not-allowed; }
.hero-btn.held.on { background: var(--hero-good); border-color: var(--hero-good); color: var(--hero-ground); }
.hero-btn.slip.armed { border-color: var(--hero-danger); color: var(--hero-danger); }
.hero-buy { min-width: 76px; padding: 8px 12px; font-size: .85rem; }
.hero-buy.ready { background: color-mix(in srgb, var(--hero-gold) 18%, var(--hero-panel-2)); border-color: var(--hero-gold); color: var(--hero-gold); }
.hero-treat { padding: 10px 16px; border-top: 1px solid var(--hero-line); }
.hero-treat-meta { display: block; }
.hero-treat-meta b { color: var(--hero-gold); font-family: var(--hero-mono); }

.hero-add { padding: 12px 16px 16px; border-top: 1px solid var(--hero-line); margin-top: 10px; display: grid; gap: 10px; }
.hero-add-toggle { background: none; border: 1px dashed var(--hero-line); color: var(--hero-system); width: 100%; padding: 10px; border-radius: 4px; font-weight: 500; }
.hero-starters { display: flex; flex-wrap: wrap; gap: 6px; }
.hero-chip-btn { background: var(--hero-panel-2); border: 1px solid var(--hero-line); color: var(--hero-ink); border-radius: 999px; padding: 5px 12px; font-size: .82rem; }
.hero-sheet form { display: grid; gap: 10px; }
.hero-sheet label { display: grid; gap: 4px; font-size: .8rem; color: var(--hero-muted); }
.hero-sheet .hero-check, .hero-sheet .hero-mins label { display: flex; }
.hero-sheet input[type=text], .hero-sheet input[type=number], .hero-sheet select { font: inherit; font-size: 16px; padding: 9px 10px; background: var(--hero-ground); color: var(--hero-ink); border: 1px solid var(--hero-line); border-radius: 4px; width: 100%; }
.hero-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hero-fieldset { border: 0; padding: 0; margin: 0; }
.hero-fieldset legend { font-size: .8rem; color: var(--hero-muted); }
.hero-icon-pick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.hero-icon-pick label { position: relative; display: block; }
.hero-icon-pick span { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--hero-line); border-radius: 4px; background: var(--hero-ground); }
.hero-icon-pick input:checked + span { border-color: var(--hero-gold); }
.hero-icon-pick svg { width: 22px; height: 22px; }

.hero-trophies { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 12px 8px; padding: 12px 16px 8px; }
.hero-trophy { background: none; border: 0; padding: 0; display: grid; justify-items: center; gap: 4px; text-align: center; font-size: .72rem; line-height: 1.2; color: var(--hero-muted); }
.hero-trophy svg { width: 60px; height: 60px; }
.hero-trophy.got { color: var(--hero-ink); }
.hero-trophy.sel svg { filter: drop-shadow(0 0 6px var(--hero-system)); }
.hero-trophy-detail { margin: 0 16px 16px; padding: 10px 12px; border-radius: 4px; background: var(--hero-panel-2); font-size: .88rem; color: var(--hero-muted); min-height: 2.6em; }
.hero-trophy-detail b { color: var(--hero-ink); }
.hero-log { list-style: none; margin: 0; padding: 10px 16px 16px; display: grid; gap: 6px; font: 500 .78rem/1.45 var(--hero-mono); color: var(--hero-muted); }
.hero-log li span { color: var(--hero-system); }
.hero-log li em { font-style: normal; color: var(--hero-xp); }
.hero-log li strong { font-weight: 500; color: var(--hero-gold); }

@media (max-width: 420px) {
  .hero-sheet { margin-right: -8px; margin-left: -8px; padding: 16px 12px 24px; }
  .hero-build { grid-template-columns: 1fr; }
  .hero-doll { max-width: 180px; }
  .hero-slots { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero-two { grid-template-columns: 1fr; }
}
@media (max-width: 380px) { .hero-attrs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (prefers-reduced-motion: reduce) { .hero-fill { transition: none; } }

/* Today: a compact view of the character */
.hero-today { margin: 0 0 2rem; padding: 1.1rem 1.25rem; border: 1px solid var(--line); border-radius: 4px 4px 22px 4px; background: rgba(251, 249, 243, 0.82); box-shadow: var(--shadow); }
.hero-today-inner { display: grid; gap: .9rem; }
.hero-today-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; }
.hero-today-stats span { display: grid; gap: .15rem; min-width: 0; }
.hero-today-stats small { font-size: .62rem; font-weight: 700; letter-spacing: .14em; color: var(--ink-soft); }
.hero-today-stats strong { font: 600 1.25rem/1.15 var(--display); color: var(--ink); overflow-wrap: anywhere; }
.hero-today-vows { display: grid; gap: .45rem; }
.hero-today-vows .micro-label { margin: 0; }
.hero-today-vows > div { display: flex; flex-wrap: wrap; gap: .5rem; }
.hero-today-vow { display: inline-flex; align-items: center; gap: .45rem; padding: .5rem .85rem; border: 1px solid var(--line); border-radius: 999px; background: var(--paper-light); color: var(--ink); font: 600 .85rem var(--body); cursor: pointer; }
.hero-today-vow small { color: var(--ink-soft); font-weight: 500; }
.hero-today-vow.on { background: var(--ink); border-color: var(--ink); color: white; }
.hero-today-vow.on small { color: rgba(255, 255, 255, .7); }
.hero-today-vow:disabled { opacity: .55; cursor: default; }
.hero-today-focus { margin: 0; font-size: .85rem; color: var(--ink-soft); }
.hero-today .secondary-button { justify-self: start; }
@media (max-width: 640px) { .hero-today-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Cultivation ---------- */
.cultivate-today { margin: 0 0 2rem; padding: 1rem 1.25rem; border: 1px solid var(--line); border-radius: 4px 4px 22px 4px; background: rgba(251, 249, 243, 0.82); box-shadow: var(--shadow); }
.cultivate-today-inner { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 1rem; }
.cultivate-today-inner p { display: grid; gap: .2rem; margin: 0; min-width: 0; }
.cultivate-today-inner small { font-size: .62rem; font-weight: 700; letter-spacing: .14em; color: var(--ink-soft); overflow-wrap: anywhere; }
.cultivate-today-inner strong { font: 600 1.05rem/1.3 var(--display); color: var(--ink); }
.cultivate-today-mark { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--ink); color: #f0c060; font-size: 1.25rem; }
.cultivate-today-inner.live .cultivate-today-mark { animation: cv-breathe 4s ease-in-out infinite; }
.cultivate-today-inner.waiting .cultivate-today-mark { background: #c96542; color: #fff6e2; }
@keyframes cv-breathe { 50% { box-shadow: 0 0 0 8px rgba(23, 56, 47, .12); } }

.cultivate-view .page-intro { margin-bottom: 2.5rem; }
.cultivate-sheet {
  --cv-dross: #6f7a91; --cv-common: #a39a86; --cv-uncommon: #74c69d; --cv-rare: #79aefc; --cv-epic: #b98ae0; --cv-legendary: #f0a040;
  max-width: 680px;
}
.cultivate-sheet .r-dross { --r: var(--cv-dross); }
.cultivate-sheet .r-common { --r: var(--cv-common); }
.cultivate-sheet .r-uncommon { --r: var(--cv-uncommon); }
.cultivate-sheet .r-rare { --r: var(--cv-rare); }
.cultivate-sheet .r-epic { --r: var(--cv-epic); }
.cultivate-sheet .r-legendary { --r: var(--cv-legendary); }
.cv-panel { padding: 18px 16px; display: grid; gap: 12px; }
.cv-panel h2 { margin: 0; font: 700 1.35rem/1.25 var(--hero-display); letter-spacing: .03em; color: var(--hero-ink); overflow-wrap: anywhere; }
.cv-panel .hero-head { padding: 0; }
.cv-kicker { margin: 0; font: 600 .7rem/1.4 var(--hero-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--hero-system); overflow-wrap: anywhere; }
.cultivate-sheet input::placeholder { color: var(--hero-muted); opacity: .75; }
.cv-intention { margin: 0; font-style: italic; color: var(--hero-muted); }
.cv-hint { margin: 0; font-size: .85rem; color: var(--hero-muted); }
.cv-live { margin: 0; color: var(--hero-ink); }
.cv-live.muted { color: var(--hero-muted); font-size: .9rem; }
.cv-done { margin: 0; color: var(--hero-good); font-weight: 700; }
.cv-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.cv-optional { color: var(--hero-muted); font-size: .75rem; }

.cv-active { justify-items: start; background: radial-gradient(ellipse 90% 60% at 50% 0%, color-mix(in srgb, var(--hero-system) 10%, transparent), transparent 70%), var(--hero-panel); }
.cv-clock { display: flex; align-items: baseline; gap: 8px; }
.cv-clock strong { font: 700 clamp(3.5rem, 16vw, 5.5rem)/1 var(--hero-display); color: var(--hero-xp); font-variant-numeric: tabular-nums; }
.cv-clock small { color: var(--hero-muted); font-size: 1rem; }
.cv-net { display: grid; grid-template-columns: repeat(12, 14px); gap: 6px; }
.cv-net i { width: 14px; height: 14px; border: 1.5px solid var(--hero-line); border-radius: 50%; transition: background .6s ease, border-color .6s ease; }
.cv-net i.on { background: color-mix(in srgb, var(--hero-system) 55%, transparent); border-color: var(--hero-system); }

.cv-sources { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; border: 0; min-width: 0; }
.cultivate-sheet .cv-source { position: relative; display: block; min-width: 0; max-width: 100%; cursor: pointer; }
.cultivate-sheet .cv-source input { position: absolute; top: 0; left: 0; width: 1px; height: 1px; margin: 0; opacity: 0; pointer-events: none; }
.cv-source span { display: grid; gap: 1px; min-width: 0; max-width: 100%; padding: 8px 12px; border: 1px solid var(--hero-line); border-radius: 6px; background: var(--hero-panel-2); color: var(--hero-ink); }
.cv-source b { font-weight: 700; overflow-wrap: anywhere; }
.cv-source small { color: var(--hero-muted); font-size: .72rem; }
.cv-source input:checked + span { border-color: var(--hero-xp); box-shadow: inset 0 0 0 1px var(--hero-xp); }
.cv-source input:focus-visible + span { outline: 2px solid var(--hero-system); outline-offset: 2px; }
.cultivate-sheet .cv-field { max-width: 420px; }

.cv-catches { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.cv-catch { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 6px; background: var(--hero-panel-2); border-left: 3px solid var(--r); }
.cv-catch .cv-glyph { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: var(--r); background: color-mix(in srgb, var(--r) 14%, transparent); font-size: 1.05rem; }
.cv-catch-copy { display: grid; min-width: 0; }
.cv-catch-copy strong { color: var(--hero-ink); overflow-wrap: anywhere; }
.cv-catch-copy small { color: var(--r); font-size: .72rem; letter-spacing: .04em; }
.cv-catch.r-dross .cv-catch-copy strong { color: var(--hero-muted); font-weight: 500; }
.cv-count { font: 700 .85rem var(--hero-mono); color: var(--hero-muted); }
.cv-catch .cv-flavour { grid-column: 2 / -1; margin: 0; }
.cv-flavour { margin: 0; color: var(--hero-muted); font-size: .82rem; font-style: italic; }
.cv-catch.r-rare, .cv-catch.r-epic, .cv-catch.r-legendary { box-shadow: 0 0 18px -6px var(--r); }
.cv-catch.lustrous { background: linear-gradient(110deg, var(--hero-panel-2) 30%, color-mix(in srgb, var(--hero-gold) 16%, var(--hero-panel-2)) 50%, var(--hero-panel-2) 70%); background-size: 250% 100%; animation: cv-shimmer 3.2s linear infinite; }
.cv-catch.lustrous .cv-glyph { color: var(--hero-gold); box-shadow: 0 0 0 1px var(--hero-gold); }
@keyframes cv-shimmer { from { background-position: 100% 0; } to { background-position: -150% 0; } }
.cv-reveal-list .cv-catch { opacity: 0; transform: translateY(6px) scale(.98); transition: opacity .25s ease, transform .25s ease; }
.cv-reveal-list .cv-catch.shown { opacity: 1; transform: none; }
.cv-reveal-list .cv-catch.shown.r-rare, .cv-reveal-list .cv-catch.shown.r-epic, .cv-reveal-list .cv-catch.shown.r-legendary { animation: cv-land .9s ease-out; }
@keyframes cv-land { 0% { box-shadow: 0 0 0 0 var(--r); } 40% { box-shadow: 0 0 34px 4px var(--r); } 100% { box-shadow: 0 0 18px -6px var(--r); } }

.cv-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cv-chip { padding: 3px 9px; border-radius: 999px; border: 1px solid var(--r, var(--hero-gold)); color: var(--r, var(--hero-gold)); font-size: .75rem; font-weight: 700; }
.cv-group { display: grid; gap: 6px; }
.cv-group h3 { margin: 6px 0 0; font: 700 .8rem/1.2 var(--hero-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--hero-muted); }
.cv-satchel .hero-empty-copy { margin: 0; }

.cv-rules summary { cursor: pointer; font: 700 .95rem var(--hero-display); letter-spacing: .06em; color: var(--hero-ink); }
.cv-rules ul { margin: 0; padding-left: 1.1rem; display: grid; gap: 6px; font-size: .88rem; color: var(--hero-muted); }
.cv-odds { width: 100%; border-collapse: collapse; font-size: .85rem; }
.cv-odds th, .cv-odds td { padding: 6px 8px; border-bottom: 1px solid var(--hero-line); text-align: right; }
.cv-odds th:first-child { text-align: left; font-weight: 500; }
.cv-odds thead th { color: var(--hero-muted); font-weight: 600; }
.cv-dot { display: inline-block; width: 9px; height: 9px; margin-right: 8px; border-radius: 50%; background: var(--r); }

.cv-row-end { display: flex; align-items: center; gap: 8px; }
.cv-refine { white-space: nowrap; }
.cv-essence { display: flex; align-items: baseline; gap: 8px; }
.cv-essence strong { font: 700 2.4rem/1 var(--hero-display); color: var(--hero-gold); font-variant-numeric: tabular-nums; }
.cv-essence small { color: var(--hero-muted); }
.cv-subhead, .cv-legend { margin: 4px 0 0; padding: 0; font: 700 .8rem/1.2 var(--hero-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--hero-muted); }
.cv-legend { width: 100%; margin-bottom: 6px; }
.cv-shop { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.cv-shop li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 6px; background: var(--hero-panel-2); }
.cv-shop-copy { display: grid; gap: 2px; min-width: 0; }
.cv-shop-copy small { color: var(--hero-muted); font-size: .8rem; }
.cv-shop-copy .cv-owned, .cv-burning { color: var(--hero-gold); font-weight: 700; }
.cv-burning { margin: 0; font-size: .9rem; }
.cv-chip.incense { --r: var(--hero-gold); }
.cv-codex-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; }
.cv-tile { position: relative; display: grid; justify-items: center; gap: 4px; min-width: 0; padding: 10px 6px; border: 1px solid var(--hero-line); border-radius: 6px; background: var(--hero-panel-2); text-align: center; }
.cv-tile .cv-glyph { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: var(--hero-muted); background: var(--hero-ground); }
.cv-tile-name { font-size: .72rem; line-height: 1.2; color: var(--hero-muted); overflow-wrap: anywhere; }
.cv-tile.found { border-color: color-mix(in srgb, var(--r) 45%, var(--hero-line)); }
.cv-tile.found .cv-glyph { color: var(--r); background: color-mix(in srgb, var(--r) 14%, transparent); }
.cv-tile.found .cv-tile-name { color: var(--hero-ink); }
.cv-tile.sel { box-shadow: 0 0 0 2px var(--hero-system); }
.cv-shiny { position: absolute; top: 4px; right: 6px; font-style: normal; color: var(--hero-gold); }
.cv-detail { display: grid; gap: 4px; margin-top: 6px; padding: 10px 12px; border-radius: 6px; background: var(--hero-panel-2); border-left: 3px solid var(--r, var(--hero-line)); }
.cv-detail p { margin: 0; color: var(--hero-muted); font-size: .88rem; }
.cv-detail small { color: var(--hero-muted); font-size: .75rem; }

@media (max-width: 640px) {
  .cultivate-today-inner { grid-template-columns: auto minmax(0, 1fr); }
  .cultivate-today-inner .secondary-button { grid-column: 1 / -1; justify-self: stretch; }
  .cv-net { grid-template-columns: repeat(12, minmax(0, 1fr)); width: 100%; max-width: 260px; }
  .cv-net i { width: auto; aspect-ratio: 1; }
  .cv-catch { grid-template-columns: 34px minmax(0, 1fr); }
  .cv-row-end { grid-column: 2; }
}
@media (prefers-reduced-motion: reduce) {
  .cultivate-today-inner.live .cultivate-today-mark, .cv-catch.lustrous, .cv-reveal-list .cv-catch.shown { animation: none; }
  .cv-reveal-list .cv-catch, .cv-net i { transition: none; }
}

/* Dread Dragons */
.todo-item:has(.row-dragon) { grid-template-columns: auto 1fr auto auto; }
.row-dragon { width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; cursor: pointer; font-size: 1.1rem; opacity: 0.45; filter: grayscale(1); transition: opacity 0.2s, filter 0.2s, transform 0.2s; }
.row-dragon:hover, .row-dragon:focus-visible { opacity: 1; filter: none; transform: scale(1.15) rotate(-8deg); }
.dragon-lair { margin: 0 0 2rem; padding: clamp(20px, 3vw, 34px); color: var(--paper-light); background: radial-gradient(circle at 85% 0%, rgba(201, 101, 66, 0.35), transparent 55%), linear-gradient(160deg, #1d332c, #10221d); border-radius: 22px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.dragon-lair.victory-flash { animation: lair-victory 1.2s ease-out; }
.dragon-lair .eyebrow, .dragon-lair .micro-label { color: var(--gold); }
.dragon-lair h2 { margin: 0.2rem 0 0.4rem; font-family: var(--display); font-size: clamp(1.6rem, 3.4vw, 2.3rem); font-weight: 500; color: var(--paper-light); }
.dragon-lair p { color: rgba(251, 249, 243, 0.78); }
.lair-head { display: grid; grid-template-columns: 1fr minmax(200px, 280px); gap: 1.5rem; align-items: start; }
.dread-ledger { padding: 16px 18px; background: rgba(251, 249, 243, 0.07); border: 1px solid rgba(211, 154, 54, 0.4); border-radius: 16px; }
.dread-ledger strong { display: block; font-family: var(--display); font-size: 2.6rem; line-height: 1.05; color: var(--gold); }
.dread-ledger p { margin: 0.3rem 0 0; font-size: 0.86rem; }
.dread-ledger b { color: var(--paper-light); }
.dragon-roster { display: grid; gap: 14px; margin: 1.4rem 0; }
.dragon-card { display: grid; grid-template-columns: 96px 1fr; gap: 1.2rem; align-items: center; padding: 18px; background: rgba(251, 249, 243, 0.06); border: 1px solid rgba(251, 249, 243, 0.12); border-radius: 18px; }
.dragon-card h3 { margin: 0.15rem 0; font-family: var(--display); font-size: 1.35rem; font-weight: 500; color: var(--paper-light); }
.dragon-card .dragon-task { margin: 0 0 0.6rem; font-size: 0.92rem; }
.dragon-card.is-striking { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), 0 0 32px rgba(211, 154, 54, 0.25); }
.dragon-card.is-hit .dragon-sprite { animation: dragon-hit 0.6s ease; }
.dragon-sprite { position: relative; display: grid; place-items: center; width: 96px; height: 96px; border-radius: 50%; background: radial-gradient(circle, rgba(201, 101, 66, 0.35), transparent 70%); }
.dragon-body { font-size: 3.4rem; animation: dragon-bob 3s ease-in-out infinite; }
.dread-1 .dragon-body { font-size: 2.4rem; filter: hue-rotate(60deg); }
.dread-2 .dragon-body { font-size: 2.8rem; filter: hue-rotate(30deg); }
.dread-4 .dragon-body { filter: hue-rotate(-60deg) saturate(1.3); }
.dread-5 .dragon-body { font-size: 4rem; filter: hue-rotate(-110deg) saturate(1.6) drop-shadow(0 0 10px rgba(201, 101, 66, 0.8)); }
.dragon-flame { position: absolute; right: 0; bottom: 6px; font-size: 1.5rem; animation: dragon-swing 0.9s ease-in-out infinite; }
.dragon-hp { display: flex; gap: 5px; margin-bottom: 0.8rem; }
.dragon-hp i { width: 22px; height: 8px; border-radius: 4px; background: rgba(251, 249, 243, 0.15); transition: background 0.4s; }
.dragon-hp i.full { background: linear-gradient(90deg, var(--terracotta), #e2814f); box-shadow: 0 0 8px rgba(201, 101, 66, 0.6); }
.dragon-hint { margin: 0 0 0.8rem; font-size: 0.88rem; }
.strike-timer { display: flex; align-items: center; gap: 1rem; margin-bottom: 0.8rem; }
.strike-timer b { font-family: var(--display); font-size: 2.2rem; font-variant-numeric: tabular-nums; color: var(--gold); }
.strike-timer span { font-size: 0.88rem; color: rgba(251, 249, 243, 0.85); font-style: italic; }
.dragon-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; }
.dragon-lair .secondary-button { color: var(--paper-light); border-color: rgba(251, 249, 243, 0.35); background: transparent; }
.dragon-lair .text-action { color: rgba(251, 249, 243, 0.7); }
.summon-form { display: grid; grid-template-columns: 2fr 1fr 1fr auto; gap: 12px; align-items: end; margin-top: 1.4rem; }
.summon-form label { display: grid; gap: 6px; font-size: 0.78rem; letter-spacing: 0.04em; color: rgba(251, 249, 243, 0.7); }
.summon-form input, .summon-form select { min-height: 46px; padding: 0 12px; color: var(--ink); background: var(--paper-light); border: 1px solid transparent; border-radius: 12px; font: inherit; font-size: 0.95rem; }
.summon-form input:focus, .summon-form select:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.lurking, .trophy-hall { margin-top: 1.2rem; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.lurking .micro-label, .trophy-hall .micro-label { flex-basis: 100%; }
.lurking button { padding: 8px 14px; color: var(--paper-light); background: rgba(251, 249, 243, 0.08); border: 1px dashed rgba(211, 154, 54, 0.6); border-radius: 999px; cursor: pointer; font: inherit; font-size: 0.86rem; }
.lurking button:hover { background: rgba(211, 154, 54, 0.2); }
.lurking small { opacity: 0.6; margin-left: 4px; }
.trophy-hall ul { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.trophy-hall li { display: grid; grid-template-columns: auto auto; column-gap: 6px; padding: 8px 12px; background: rgba(211, 154, 54, 0.12); border-radius: 12px; font-size: 0.82rem; }
.trophy-hall li span { grid-row: span 2; font-size: 1.2rem; }
.trophy-hall li small { color: rgba(251, 249, 243, 0.65); }
.dragon-victory { display: grid; grid-template-columns: auto 1fr auto; gap: 1rem; align-items: center; margin: 1.2rem 0; padding: 16px 18px; background: linear-gradient(90deg, rgba(211, 154, 54, 0.3), rgba(211, 154, 54, 0.08)); border: 1px solid var(--gold); border-radius: 16px; animation: victory-in 0.6s cubic-bezier(0.2, 1.4, 0.4, 1); }
.dragon-victory > span { font-size: 2.2rem; }
.dragon-victory p { margin: 0.2rem 0 0; }
.dragon-victory s { opacity: 0.6; }
.dragon-victory strong { color: var(--gold); }
@keyframes dragon-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes dragon-swing { 0%, 100% { transform: rotate(-20deg); } 50% { transform: rotate(25deg); } }
@keyframes dragon-hit { 0% { transform: translateX(0); filter: brightness(1); } 20% { transform: translateX(-10px) rotate(-8deg); filter: brightness(2.4); } 40% { transform: translateX(8px) rotate(6deg); } 60% { transform: translateX(-5px); } 100% { transform: translateX(0); filter: brightness(1); } }
@keyframes victory-in { from { opacity: 0; transform: scale(0.9) translateY(-8px); } to { opacity: 1; transform: none; } }
@keyframes lair-victory { 0% { box-shadow: 0 0 0 0 rgba(211, 154, 54, 0.9); } 100% { box-shadow: 0 0 0 28px rgba(211, 154, 54, 0); } }
@media (prefers-reduced-motion: reduce) { .dragon-body, .dragon-flame, .dragon-card.is-hit .dragon-sprite, .dragon-victory, .dragon-lair.victory-flash { animation: none; } }
@media (max-width: 760px) {
  .lair-head { grid-template-columns: 1fr; }
  .summon-form { grid-template-columns: 1fr 1fr; }
  .summon-form .summon-task, .summon-form button { grid-column: 1 / -1; }
  .dragon-card { grid-template-columns: 64px 1fr; gap: 0.9rem; padding: 14px; }
  .dragon-sprite { width: 64px; height: 64px; }
  .dragon-body { font-size: 2.5rem; }
}
