/* PlayPal activity journal. Structure first, color only where it communicates data. */
:root {
  --paper: #f6f4ee;
  --surface: #fffefa;
  --ink: #232b2a;
  --muted: #66716d;
  --rule: #d9ded8;
  --accent: #264f48;
  --accent-hover: #386960;
  --dash-ink: var(--ink);
  --dash-muted: var(--muted);
  --dash-line: var(--rule);
  background: var(--paper);
  color: var(--ink);
  font-synthesis: none;
}
body, .shell { background: var(--paper); color: var(--ink); }
body, button, input, select, textarea { font-family: "Avenir Next", Avenir, "Helvetica Neue", Arial, sans-serif; }
body { font-size: 14px; }
.shell { max-width: none; width: 100%; margin: 0; padding: 0; border: 0; border-radius: 0; box-shadow: none; }
.site-header, .site-footer { background: var(--paper); border-color: var(--rule); }
.site-brand, .site-footer span:first-child {
  font-family: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  font-weight: 600;
  letter-spacing: -.04em;
  color: var(--ink);
}
.site-brand { font-size: 27px; padding: 0; border: 0; background: none; }
.site-brand:hover { color: var(--accent); }
.nav-group, .sidebar-caption { color: var(--muted); }
.nav-group { font-size: 10px; letter-spacing: .17em; }
.sidebar-caption { line-height: 1.6; max-width: 160px; }
.app-nav button, .app-nav button.selected {
  border-radius: 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  background: transparent;
}
.app-nav button.selected { color: var(--ink); font-weight: 700; background: transparent; }
.app-nav button.selected::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); margin-right: 11px; }
.app-nav button:hover { color: var(--ink); background: #ebeee7; }
.utility-bar {
  position: static;
  z-index: 4;
  background: var(--paper);
  border-color: var(--rule);
  min-height: 66px;
  margin-bottom: 0;
}
.utility-bar > span, .eyebrow, .intro .eyebrow, .daily-metrics .eyebrow,
.daily-metrics .glance-plan .eyebrow, .daily-metrics .glance-recent .eyebrow {
  color: var(--muted);
  font-family: "Avenir Next", Avenir, "Helvetica Neue", Arial, sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .13em;
}
.utility-bar > span { letter-spacing: .15em; }
.utility-bar .header-log, .button.primary, dialog .button.primary, .save-button {
  background: var(--accent);
  border: 1px solid var(--accent);
  color: #fff;
  border-radius: 3px;
  box-shadow: none;
}
.utility-bar .header-log:hover, .button.primary:hover, dialog .button.primary:hover, .save-button:hover { background: var(--accent-hover); }
.button.secondary, #screen-goals #open-goal, .button.outline,
.action-pill, .glance-goal #glance-goal-action,
.goal-actions button, .history-actions button, .plan-actions button,
.friend-card button, .request-line button, .friend-actions button {
  background: transparent;
  border: 1px solid #aebbb3;
  color: var(--accent);
  border-radius: 3px;
  font-weight: 650;
  box-shadow: none;
}
.button.secondary:hover, #screen-goals #open-goal:hover, .button.outline:hover,
.action-pill:hover, .glance-goal #glance-goal-action:hover,
.goal-actions button:hover, .history-actions button:hover, .plan-actions button:hover { background: #e9eee8; }
.text-button, dialog .text-button, dialog .details summary { color: var(--accent); }
.intro { margin: 0; padding: 39px 0 31px; }
.intro h1, .screen-heading h1, .section-heading h2, .dialog-head h2,
.glance-goal h2, .daily-metrics .glance h2, .goal h3, .profile-overview h2,
.profile-highlights h2, .profile-badges h2, .friends-home h2, .friends-panel h2,
.badge-card h2, .quick-links h2, .more-heading, .year-overview summary {
  font-family: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  font-weight: 600;
  letter-spacing: -.025em;
  color: var(--ink);
}
.intro h1 { font-size: clamp(36px, 4.5vw, 58px); line-height: 1.06; margin: 8px 0 9px; }
.intro-subtitle { font-size: 15px!important; color: var(--muted)!important; }
.screen-heading h1 { font-size: clamp(33px, 3.2vw, 43px); }
.section-heading h2 { font-size: 25px; }
.card, .home-actions, .companion-area, .daily-metrics > .glance,
.daily-stat, .quick-links, .calendar-card, .mix-card, .year-overview,
.goals-card, .pattern-card, .more-grid .card, .profile-overview,
.profile-highlights, .profile-badges, .account-panel, .friends-panel,
.friends-home, .badge-card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 2px;
  box-shadow: none;
}
.home-stage { grid-template-columns: minmax(0, 1.3fr) minmax(270px, .7fr); gap: 18px; align-items: stretch; }
.home-actions, .companion-area { padding: 24px; }
.week-heading { display: flex; gap: 5px; margin: 0 0 16px; }
.week-heading span { text-transform: none; letter-spacing: 0; font-weight: 500; }
.home-actions .week-strip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0; padding: 0; border: 1px solid var(--rule); border-radius: 0; background: var(--surface); }
.home-actions .week-day, .home-actions .week-day.today:not(.done), .home-actions .week-day.has-plan:not(.done),
.home-actions .week-day.done {
  min-height: 88px;
  border: 0;
  border-right: 1px solid var(--rule);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  outline: 0;
  color: var(--ink);
  padding: 9px 2px;
}
.home-actions .week-day:last-child { border-right: 0; }
.home-actions .week-day.today { background: #edf1ea!important; }
.home-actions .week-day.done { box-shadow: inset 0 -3px 0 var(--accent); }
.home-actions .week-day.done, .home-actions .week-day.today.done {
  background: #e0ebe1!important;
  box-shadow: inset 0 -3px 0 var(--accent);
}
.home-actions .week-day.done span, .home-actions .week-day.done b { color: var(--ink); }
.home-actions .week-day span { font-size: 10px; font-weight: 700; }
.home-actions .week-day b { font-size: 22px; font-weight: 500; margin: 4px auto 0; }
.home-actions .week-day .week-status { color: var(--muted); font-size: 10px; }
.home-actions button.week-day:hover, .home-actions .week-day:hover { background: #e9eee8!important; }
.home-actions .week-day.future { opacity: .5; }
.home-actions .feature-action {
  display: flex;
  width: 100%;
  min-height: 78px;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  margin: 15px 0 0;
  border: 1px solid var(--accent);
  border-radius: 2px;
  background: var(--accent);
  color: #fff;
  box-shadow: none;
}
.home-actions .feature-action::after { content: "+"; font-size: 25px; font-weight: 300; margin-left: 16px; }
.home-actions .feature-action:hover { background: var(--accent-hover); }
.home-actions .feature-action strong { font-size: 18px; font-weight: 650; letter-spacing: -.02em; }
.home-actions .feature-action small { font-size: 12px; color: #d5e4dc; }
.companion-area { display: block; }
.companion-art { display: none!important; }
.companion-area .glance-goal { display: block; text-align: left; }
.glance-goal .glance-top { justify-content: flex-start; }
.glance-goal h2 { font-size: 27px; margin: 13px 0 18px; }
.glance-goal .hero-progress-label { font-size: 17px!important; color: var(--ink); line-height: 1.4; }
.glance-goal .hero-encouragement { font-size: 12px!important; color: var(--muted); }
.glance-goal .progress-track, .progress-track { background: #e5e9e1; border-radius: 0; height: 6px; }
.glance-goal .progress-track { margin: 16px 0 10px; }
.glance-goal .progress-track div, .progress-track div { background: var(--accent); border-radius: 0; }
.glance-goal #glance-goal-action { margin: 16px 0 0; width: auto; }
.goal-grid-wrap.compact { max-width: none; margin: 22px 0 0; padding: 14px 0 0; border: 0; border-top: 1px solid var(--rule); border-radius: 0; background: transparent; }
.goal-grid-wrap.compact .goal-cubes { gap: 2px; }
.goal-cube, .cube-scale i { border-radius: 1px; background: #e7ebe5; }
.goal-cube.met, .cube-scale i:nth-of-type(3) { background: var(--accent); }
.goal-cube.current { background: #bed1c3; box-shadow: inset 0 0 0 1px var(--accent); }
.goal-cube.missed { background: #d4dcd3; }
.daily-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; margin: 20px 0 0; border: 1px solid var(--rule); background: var(--surface); }
.daily-metrics > .glance, .daily-stat {
  min-height: 155px;
  padding: 22px;
  border: 0;
  border-right: 1px solid var(--rule);
  border-radius: 0;
  background: transparent;
}
.daily-metrics > :last-child { border-right: 0; }
.daily-metrics > .glance-recent { border-right: 0; }
.daily-stat .stats { display: flex; gap: 25px; flex-wrap: wrap; margin: 16px 0 0; }
.daily-stat .stat { padding: 0; background: transparent; }
.daily-stat .stat strong { font-size: 31px; color: var(--ink); font-weight: 600; }
.daily-stat .stat span, .daily-metrics .glance p:not(.eyebrow), .goal-link #goal-spotlight span { color: var(--muted); font-size: 12px; }
.daily-metrics .glance h2 { font-size: 24px; margin-top: 10px; }
.daily-metrics .action-pill { margin-top: auto; width: auto; border: 0; border-bottom: 1px solid var(--accent); padding: 4px 0; min-height: 0; border-radius: 0; font-size: 12px; justify-content: flex-start; }
.daily-metrics > .goal-link { grid-column: 1 / -1; min-height: 85px; border-top: 1px solid var(--rule); border-right: 0; display: grid; grid-template-columns: 1fr auto; }
.daily-metrics > .goal-link .action-pill { grid-column: 2; grid-row: 1/3; align-self: center; width: auto; }
.friends-home { margin: 20px 0 0; padding: 22px 24px; }
#screen-goals { border-top: 1px solid var(--rule); margin-top: 46px; padding-top: 32px; }
#screen-calendar { border-top: 0; margin-top: 0; padding-top: 39px; }
#screen-goals > .screen-heading, #screen-calendar > .screen-heading { padding-bottom: 13px; }
#screen-goals > .button { margin: 0 0 17px; }
#screen-goals #open-goal { min-height: 42px; }
.goals-card, .calendar-card, .mix-card, .year-overview, .pattern-card { padding: 24px; }
.goal, .plan-item, .friend-profile, .friend-card, .request-line { border-color: var(--rule); border-radius: 2px; }
.goal h3 { font-size: 21px; }
.goal-grid-wrap { border-radius: 0; border-color: var(--rule); background: var(--surface); box-shadow: none; }
#screen-calendar { gap: 18px; }
#screen-calendar > .calendar-card { grid-column: 1; grid-row: 2/6; }
#screen-calendar > .calendar-summary { grid-column: 2; grid-row: 2; }
#screen-calendar > .mix-card { grid-column: 2; grid-row: 3; }
#screen-calendar > .year-overview { grid-column: 2; grid-row: 4; }
#screen-calendar > .pattern-card { grid-column: 2; grid-row: 5; }
.calendar-summary { min-width: 0; padding: 24px; background: var(--surface); border: 1px solid var(--rule); border-radius: 2px; }
.calendar-summary .stats { display: flex; gap: 12px; margin: 15px 0 0; flex-wrap: wrap; }
.calendar-summary .stats .stat { flex: 1 1 130px; min-width: 0; min-height: 105px; padding: 16px 18px; border-radius: 12px; display: flex; flex-direction: column; justify-content: center; }
.calendar-summary .stat strong { color: var(--ink); font-size: 32px; font-weight: 600; line-height: 1.15; }
.calendar-summary .stat span { color: var(--muted); font-size: 12px; line-height: 1.35; overflow-wrap: break-word; }
@media (max-width: 1170px) {
  #screen-calendar > .calendar-summary { width: 100%; }
  #screen-calendar > .screen-heading { order: 0; }
  #screen-calendar > .calendar-card { order: 1; }
  #screen-calendar > .calendar-summary { order: 2; }
  #screen-calendar > .year-overview { order: 3; }
  #screen-calendar > .mix-card { order: 4; }
  #screen-calendar > .pattern-card { order: 5; }
}
.calendar-card .calendar-labels { width: min(100%, 590px); margin: 18px auto 8px; gap: 2px; text-align: center; color: var(--muted); }
.calendar-card .calendar-labels span { padding: 0; }
.calendar-card .calendar-grid { width: min(100%, 590px); margin: 0 auto; gap: 4px 2px; border: 0; }
.calendar-card .calendar-empty { min-height: 60px; background: transparent; border: 0; }
.calendar-card .day, .calendar-card .day.today:not(.selected) {
  display: grid;
  place-items: center;
  justify-content: center;
  align-content: center;
  gap: 0;
  position: relative;
  min-height: 60px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent!important;
  box-shadow: none!important;
  outline: 0;
  color: var(--ink);
  text-align: center;
}
.calendar-card .day:hover, .calendar-card .day.selected { background: transparent!important; }
.calendar-card .day::before, .calendar-card .day::after {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  pointer-events: none;
}
.calendar-card .day::before { width: min(46px, calc(100% - 2px)); aspect-ratio: 1; border: 1px solid var(--rule); background: var(--surface); }
.calendar-card .day::after { width: min(36px, calc(100% - 12px)); aspect-ratio: 1; background: var(--surface); }
.calendar-card .day.active::before { border: 0; background: var(--day-fill, var(--accent)); }
.calendar-card .day.planned:not(.active)::before { border: 2px dashed #91a49a; }
.calendar-card .day:hover::after { background: #f0f4ee; }
.calendar-card .day.today::after { background: #e7f1e7; }
.calendar-card .day.selected::before, .calendar-card .day:focus-visible::before { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent); }
.calendar-card .day-number { position: relative; z-index: 1; font-size: 14px; font-weight: 600; line-height: 1; color: var(--ink); }
.calendar-card .day.today .day-number { font-weight: 600; color: var(--ink); }
.calendar-card .day-plan-mark { position: absolute; z-index: 1; bottom: 1px; left: calc(50% - 2px); width: 4px; height: 4px; border-radius: 50%; background: var(--accent); }
.calendar-card .legend-dot { position: relative; width: 12px; height: 12px; border-radius: 50%; }
.calendar-card .legend-dot::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--surface); }
.calendar-card .legend-plan { width: 12px; height: 12px; border: 2px dashed #91a49a; border-radius: 50%; background: transparent; }
.calendar-card .day-detail, .empty, .insight-summary > div { background: #f0f2ec; color: var(--muted); border-radius: 2px; }
.calendar-nav button { background: transparent; border: 1px solid var(--rule); border-radius: 2px; color: var(--ink); }
.calendar-nav button:hover { background: #e9eee8; }
.year-overview summary:after { color: var(--accent); }
.quick-links { padding: 20px 24px; }
.quick-links h2 { font-size: 23px; }
.quick-links-grid { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.quick-links-grid button { width: auto; min-height: 38px; padding: 5px 0; border: 0; border-bottom: 1px solid var(--rule); border-radius: 0; background: transparent; color: var(--accent); font-weight: 600; }
.quick-links-grid button:hover { border-color: var(--accent); background: transparent; color: var(--ink); }
.badge-card { min-height: 130px; gap: 19px; }
.badge-medal { display: grid; place-items: center; flex: 0 0 61px; width: 61px; height: 61px; border-radius: 50%; border: 1px solid #9aaea0; outline: 3px solid #eef2eb; background: #dce9dd; color: #294f3e; font-family: Georgia, serif; font-size: 26px; }
.badge-medal span { display: block; line-height: 1; }
.badge-ten, .badge-fifty { background: #ede2c9; color: #765824; border-color: #c4a971; outline-color: #f5f0e5; }
.badge-week, .badge-goal { background: #dfe6ef; color: #334d6d; border-color: #a2b3c8; outline-color: #edf1f5; }
.badge-account { background: #e9e2e1; color: #694b4b; border-color: #c1aaaa; outline-color: #f4efed; }
.badge-card.earned .badge-medal { animation: badge-breathe 4.8s ease-in-out infinite; }
.badge-card.earned:nth-child(3n+2) .badge-medal { animation-delay: -1.6s; }
.badge-card.earned:nth-child(3n) .badge-medal { animation-delay: -3.2s; }
.badge-card.locked .badge-medal { filter: grayscale(1); opacity: .52; animation: none; }
@keyframes badge-breathe { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .badge-card.earned .badge-medal { animation: none; } }
.profile-badge-list { gap: 16px; padding: 4px 2px; }
.profile-badge { display: inline-flex; padding: 0; border: 0; border-radius: 50%; background: transparent; cursor: help; }
.profile-badge .badge-medal { flex: 0 0 50px; width: 50px; height: 50px; border-width: 1px; outline-width: 2px; font-size: 22px; }
.profile-avatar, .friend-avatar { border-radius: 2px; }
.profile-overview { display: flex; align-items: center; gap: 20px; }
.profile-photo, .friend-avatar { display: grid; place-items: center; flex: none; overflow: hidden; background: #e5ece5; color: var(--accent); font-weight: 700; }
.profile-photo { width: 68px; height: 68px; border-radius: 50%; font-size: 28px; }
.friend-avatar { border-radius: 50%; }
.friend-avatar-large { width: 58px; height: 58px; font-size: 22px; }
.profile-photo img, .friend-avatar img { width: 100%; height: 100%; object-fit: cover; }
.friend-profile-head { display: flex; align-items: center; gap: 14px; }
.friend-card > span:nth-child(2) { flex: 1; min-width: 0; }
.friend-card button { flex: none; }
.challenge-panel { margin-top: 18px; padding: 24px; }
.challenge-form { display: grid; grid-template-columns: minmax(220px, 1fr) 160px; gap: 14px; align-items: end; }
.challenge-form fieldset { grid-column: 1/-1; border: 1px solid var(--rule); padding: 14px; }
.challenge-form legend { padding: 0 5px; }
#challenge-friend-choices { display: flex; flex-wrap: wrap; gap: 8px 18px; }
#challenge-friend-choices label { display: inline-flex; align-items: center; gap: 6px; }
#challenge-friend-choices input { min-height: 0; width: auto; accent-color: var(--accent); }
.challenge-item { border-top: 1px solid var(--rule); padding: 19px 0; }
.challenge-item h3 { margin: 0 0 6px; font-size: 19px; }
.challenge-item p { margin: 7px 0; color: var(--muted); line-height: 1.5; }
.challenge-members { padding: 0; list-style: none; display: grid; gap: 7px; margin: 14px 0; }
.challenge-members li { display: flex; align-items: center; gap: 11px; padding: 7px 0; }
.challenge-members li span:nth-child(2) { min-width: 0; }
.challenge-members strong, .challenge-members small { display: block; }
.challenge-members small { margin-top: 2px; color: var(--muted); }
.challenge-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.challenge-actions button { border: 1px solid var(--rule); background: var(--surface); color: var(--accent); padding: 9px 13px; min-height: 40px; cursor: pointer; }
.challenge-actions button:hover { background: #e8efe8; }
.challenge-actions button:last-child:not(:first-child) { color: #854349; }
#challenge-panel .fine-print { max-width: 75ch; }
#profile-form small { display: block; margin-top: 5px; font-size: 12px; color: var(--muted); }
@media (max-width: 650px) { .challenge-form { grid-template-columns: 1fr; } .challenge-form fieldset { grid-column: 1; } .friend-card { flex-wrap: wrap; } .friend-card button { margin-left: auto; } }
.profile-badges, .profile-highlights, .profile-overview, .account-panel, .friends-panel { padding: 24px; }
.more-section > summary { background: var(--surface); color: var(--accent); border: 1px solid var(--rule); border-radius: 2px; }
.more-section > summary:hover { background: #e9eee8; }
.more-grid .card { border-color: var(--rule); }
dialog { border: 1px solid var(--rule); border-radius: 3px; box-shadow: 0 18px 55px #17251e25; background: var(--surface); color: var(--ink); }
dialog::backdrop { background: #1d2b25a3; }
dialog .icon-button { border-radius: 2px; background: #eef0e9; color: var(--ink); }
dialog input, dialog select, dialog textarea { border-color: #bdc8bf; border-radius: 2px; color: var(--ink); }
dialog .dialog-intro, dialog .fine-print { color: var(--muted); }
dialog .preference-choices, .preference-extra { border-color: var(--rule); border-radius: 2px; }
.choice-grid label, .friend-profile, .goal-evidence, .goal-next, .shortcut { background: #f0f2ec; color: var(--ink); border-radius: 2px; }
.choice-grid input, .auth-mode input, .import-guest input { accent-color: var(--accent); }
.color-chip, .custom-chip, .color-options input[type=color] { border-radius: 2px; }
.toast { border-radius: 2px; background: var(--ink); }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible,
summary:focus-visible, .button:focus-visible, .feature-action:focus-visible,
.action-pill:focus-visible, .app-nav button:focus-visible,
.home-actions .week-day:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (min-width: 901px) {
  .shell { display: grid; grid-template-columns: 202px minmax(0, 1fr); grid-template-rows: minmax(100vh, auto) auto; }
  .site-header { grid-column: 1; grid-row: 1/3; position: sticky; top: 0; height: 100vh; padding: 27px 18px; border-right: 1px solid var(--rule); }
  .site-brand { margin: 0 10px 52px; }
  .app-nav { gap: 4px; }
  .app-nav button { padding: 10px 12px; }
  main { grid-column: 2; grid-row: 1; width: min(100%, 1360px); padding: 0 clamp(28px, 4vw, 64px) 80px; }
  .utility-bar { margin: 0 calc(-1 * clamp(28px, 4vw, 64px)); padding: 10px clamp(28px, 4vw, 64px); }
  .site-footer { grid-column: 2; grid-row: 2; padding: 18px clamp(28px, 4vw, 64px); }
  #screen-home, #screen-goals, #screen-calendar { scroll-margin-top: 24px; }
}
@media (max-width: 1050px) {
  .home-stage { grid-template-columns: 1fr; }
  .daily-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .daily-metrics > :nth-child(2) { border-right: 0; }
}
@media (max-width: 900px) {
  .site-header { position: sticky; top: 0; border-bottom: 1px solid var(--rule); background: var(--paper); }
  .app-nav button.selected::before { display: none; }
  .app-nav button.selected { border-bottom: 2px solid var(--accent); }
  .utility-bar { margin: 0 -22px; padding: 8px 22px; }
  main { padding: 0 22px 55px; }
}
@media (max-width: 740px) {
  .site-header { padding: 10px 17px 0; }
  .site-brand { font-size: 23px; margin: 0 0 7px; }
  .app-nav { grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1px solid var(--rule); }
  .app-nav button { min-width: 0; min-height: 37px; font-size: 12px; }
  main { padding: 0 16px 48px; }
  .utility-bar { margin: 0 -16px; padding: 8px 16px; min-height: 56px; }
  .utility-bar > span { font-size: 9px; }
  .intro { padding: 30px 0 25px; }
  .intro h1 { font-size: clamp(32px, 9vw, 43px); }
  .home-actions, .companion-area, .goals-card, .calendar-card, .mix-card, .year-overview, .pattern-card { padding: 17px; }
  .home-actions .week-day, .home-actions .week-day.today:not(.done), .home-actions .week-day.done { min-height: 75px; }
  .home-actions .week-day b { font-size: 17px; }
  .home-actions .week-day .week-status { font-size: 8px; }
  .daily-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .daily-metrics > .glance, .daily-stat { padding: 17px; }
  .daily-stat .stats { gap: 13px; }
  .daily-stat .stat strong { font-size: 26px; }
  #screen-goals { margin-top: 34px; padding-top: 25px; }
  #screen-calendar { margin-top: 0; padding-top: 30px; }
  #screen-goals > .button { width: auto; }
  #screen-calendar { display: flex; flex-direction: column; }
  #screen-calendar > .calendar-card, #screen-calendar > .calendar-summary, #screen-calendar > .year-overview,
  #screen-calendar > .mix-card, #screen-calendar > .pattern-card { width: 100%; margin: 0; }
  .calendar-card .calendar-empty, .calendar-card .day { min-height: 54px; padding: 0; }
  .calendar-card .calendar-labels span { padding: 0; }
  .quick-links-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #screen-home, #screen-goals, #screen-calendar { scroll-margin-top: 146px; }
}
@media (max-width: 480px) {
  .daily-metrics { grid-template-columns: 1fr; }
  .daily-metrics > .glance, .daily-stat { min-height: 0; border-right: 0; border-top: 1px solid var(--rule); }
  .daily-metrics > :first-child { border-top: 0; }
  .daily-metrics > .goal-link { grid-template-columns: 1fr; }
  .daily-metrics > .goal-link .action-pill { grid-column: 1; grid-row: auto; justify-self: start; }
  .calendar-card .calendar-labels span { padding: 0; }
  .calendar-card .day { min-height: 50px; }
  .calendar-nav { gap: 3px; }
  .calendar-nav button { width: 33px; height: 33px; }
}

/* Consistent green accents and a simpler hierarchy across the journal. */
.nav-group, .sidebar-caption, .utility-bar > span, .eyebrow { display: none!important; }
.utility-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-left: auto; }
.settings-wrap { position: relative; }
.settings-trigger { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 8px 12px; color: var(--accent); background: var(--surface); border: 1px solid #aebbb3; border-radius: 3px; font-size: 13px; font-weight: 650; white-space: nowrap; }
.settings-trigger:hover, .settings-trigger[aria-expanded="true"] { background: #e9eee8; }
.settings-menu { position: absolute; top: calc(100% + 7px); right: 0; z-index: 10; min-width: 205px; padding: 5px; background: var(--surface); border: 1px solid var(--rule); border-radius: 4px; box-shadow: 0 8px 24px #17251e20; }
.settings-menu button { display: block; width: 100%; min-height: 42px; padding: 9px 12px; border: 0; background: transparent; color: var(--ink); text-align: left; font-size: 14px; border-radius: 2px; }
.settings-menu button:hover, .settings-menu button:focus-visible { background: #e9eee8; }
.settings-trigger:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.utility-bar { position: sticky; top: 0; z-index: 6; }
.home-stage { display: block; margin-top: 25px; }
.home-actions { width: 100%; }
.home-date { font: 600 clamp(32px, 3.4vw, 45px)/1.15 "Iowan Old Style", "Palatino Linotype", Georgia, serif; letter-spacing: -.025em; color: var(--ink); margin: 0 0 25px; }
.home-actions .companion-area { margin-top: 24px; padding: 24px 0 0; border: 0; border-top: 1px solid var(--rule); border-radius: 0; background: transparent; box-shadow: none; }
.home-actions .week-day span { text-transform: none!important; }
.home-actions .week-day.future { opacity: 1; cursor: pointer; color: var(--muted); }
.home-actions .week-day.future .week-status { color: var(--accent); font-weight: 700; }
.home-actions button.week-day.future:hover { background: #e9eee8!important; }
.home-actions button.week-day.future:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.week-heading { align-items: baseline; flex-wrap: wrap; gap: 5px; color: var(--ink); font-size: 15px; font-weight: 650; letter-spacing: 0; line-height: 1.45; }
.week-heading span { color: var(--muted); font-size: 13px; }
.intro h1, .screen-heading h1, .section-heading h2, .dialog-head h2,
.glance-goal h2, .daily-metrics .glance h2, .goal h3, .profile-overview h2 { margin-top: 0; line-height: 1.2; }
.intro h1 { margin-bottom: 12px; }
.intro-subtitle { margin-top: 0!important; line-height: 1.5; }
.section-heading { align-items: baseline; margin-bottom: 18px; }
.section-heading h2 { margin-bottom: 0; }
.screen-heading h1 { margin-bottom: 12px; }
.dialog-head h2 { margin-bottom: 14px; }
dialog .dialog-intro { margin: 0 0 18px; line-height: 1.55; }
.glance-goal h2, .daily-metrics .glance h2 { margin-bottom: 14px; }
.glance-goal .hero-progress-label { margin: 0 0 12px; }
.daily-metrics .glance p:not(.eyebrow) { margin: 0 0 13px; line-height: 1.5; }
.profile-overview h2 { margin-bottom: 12px; }
.profile-overview p:last-child { line-height: 1.5; }
.goal h3 { margin-bottom: 12px; }
.places-card > p:not(.fine-print) { margin: 10px 0 17px; line-height: 1.55; }
.pattern-card .insight-week { gap: 14px; color: var(--muted); font-size: 13px; }
#screen-calendar > .pattern-card { border: 1px solid var(--rule); border-radius: 0; background: var(--surface); }
.pattern-card .insight-week b { color: #344C3D; font-size: 13px; }
.pattern-card .insight-bar { background: #e6efe5; }
.pattern-card .insight-bar i { background: #738A6E; }
.mix-ring circle:first-child { stroke: #e6efe5; }
.calendar-summary .stats .stat, .insight-summary > div { background: #eef3ec; }
.color-option input:checked + .color-chip, .color-option input:checked + .custom-chip { outline-color: #344C3D; }
.color-option input:focus-visible + .color-chip, .color-option input:focus-visible + .custom-chip { outline-color: #5C8A73; }
.custom-chip { background: #e6efe5; color: #344C3D; }
.custom-choice, .color-choice legend { color: var(--ink); }
.color-options input[type=color] { border-color: #aebbb3; }
.badge-week, .badge-goal { background: #dce9dd; color: #344C3D; border-color: #9aaea0; outline-color: #eef2eb; }
.glance-goal .hero-progress-label, .glance-goal .hero-encouragement,
.goal-days, .site-footer, .calendar-nav, .calendar-card .day,
.calendar-card .legend, .calendar-card .legend span,
.year-overview summary span, .year-month, .year-day-label,
.year-overview .fine-print, .mix-legend li, .mix-legend small,
.profile-overview p:last-child, .profile-privacy, .history-detail,
.venue-help, .fine-print, .badge-card.locked .badge-status { color: var(--muted); }
.home-actions .glance-goal p.hero-progress-label,
.home-actions .glance-goal p.hero-encouragement { color: var(--muted); }
.calendar-card button.day, .mix-card .hint, #activity-mix .mix-legend li,
#activity-mix .mix-legend li small { color: var(--muted); }
.calendar-card button.day { color: var(--muted)!important; }
.calendar-card .day-number, .calendar-nav strong { color: var(--ink); }
.site-footer span:first-child { color: var(--ink); }
a, a:visited { color: var(--accent); }
a:hover { color: var(--accent-hover); }
.badge-card.earned .badge-status { color: var(--accent); }
.venue-form input, .venue-form select { border-color: #bdc8bf; }
.history-actions button, .day-workout-actions button, .venue-item button,
.plan-actions button, .goal-actions button { color: var(--accent); }
.history-actions button:last-child, .day-workout-actions button:last-child,
.venue-item button[data-delete-venue], .plan-actions button:last-child,
.goal-actions button:last-child { color: #9b394c; }
.profile-highlights p, .venue-form .venue-help,
.venue-item small { color: var(--muted); }
.venue-help a, .venue-help a:visited,
.history-actions button:first-child, .plan-actions button { color: var(--accent); }
.site-settings { z-index: 9; }

/* Utility links share the page footer rather than occupying a separate card. */
.site-footer {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  margin: 0;
  padding: 16px clamp(28px, 4vw, 64px) 22px;
  border: 0;
  border-top: 1px solid var(--rule);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.footer-shortcuts { display: flex; flex-wrap: wrap; align-items: center; gap: 3px 20px; }
.footer-shortcuts button {
  width: auto;
  min-height: 32px;
  padding: 4px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}
.footer-shortcuts button:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.footer-shortcuts button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.footer-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 5px 18px; color: var(--muted); font-size: 12px; line-height: 1.4; }
.footer-meta span:first-child { font-size: 15px; }
@media (min-width: 901px) {
  main { padding-bottom: 28px; }
  .site-footer { padding: 16px clamp(28px, 4vw, 64px) 22px; }
}
@media (max-width: 900px) {
  main { padding-bottom: 24px; }
  .site-footer { padding: 14px 22px 22px; }
}
@media (max-width: 740px) {
  main { padding-bottom: 20px; }
  .site-footer { padding: 12px 16px 20px; }
  .footer-shortcuts { gap: 0 16px; }
}
.settings-trigger { width: 44px; height: 44px; min-height: 44px; padding: 0; border-radius: 50%; }
.utility-bar .header-log { margin: 0; }
#screen-home, #screen-goals, #screen-calendar, #screen-profile, #screen-friends, #screen-achievements { scroll-margin-top: 84px; }
@media (min-width: 901px) {
  .site-settings { position: fixed; top: 14px; right: clamp(28px, 4vw, 64px); }
}
@media (max-width: 900px) {
  .app-nav { flex: 1; min-width: 0; }
  .site-settings { margin-left: 12px; }
  .utility-bar .header-log { margin-left: auto; }
  #screen-home, #screen-goals, #screen-calendar, #screen-profile, #screen-friends, #screen-achievements { scroll-margin-top: calc(var(--playpal-header-height, 78px) + 82px); }
}
@media (max-width: 740px) {
  .site-settings { order: 1; margin: 0 0 7px auto; }
  .settings-trigger { width: 40px; height: 40px; min-height: 40px; }
  .home-stage { margin-top: 18px; }
  .home-date { margin-bottom: 20px; }
  .pattern-card .insight-week { gap: 8px; }
}
@media (max-width: 900px) {
  .site-header { z-index: 7; }
  .utility-bar { top: var(--playpal-header-height, 78px); }
}

/* Progress is a picture of completed work, not a decorative accent. */
.progress-steps { display: flex; align-items: stretch; gap: 5px; width: 100%; min-width: 0; height: 17px; }
.progress-steps i { display: block; flex: 1; min-width: 0; border-radius: 3px; background: #e7eee6; border: 1px solid #d5e1d6; }
.progress-steps i.filled { border-color: #587b62; background: #63876b; }
.weekly-glance { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 13px; margin: 0 0 18px; }
.weekly-glance strong { color: var(--ink); font: 600 clamp(36px, 4vw, 54px)/1 "Iowan Old Style", "Palatino Linotype", Georgia, serif; letter-spacing: -.04em; }
.weekly-glance strong span { color: var(--muted); font-size: .55em; }
.weekly-glance > span { max-width: 21ch; color: var(--muted); font-size: 13px; line-height: 1.35; }
.glance-goal .progress-steps { max-width: 420px; height: 21px; }
.glance-goal .hero-encouragement { margin: 11px 0 0; font-weight: 600; }
.goal-visual { margin: 17px 0 0; }
.goal-score { display: flex; align-items: baseline; flex-wrap: wrap; gap: 5px 10px; margin-bottom: 13px; }
.goal-score strong { color: var(--ink); font: 600 30px/1.1 "Iowan Old Style", "Palatino Linotype", Georgia, serif; }
.goal-score span, .milestone-scale { color: var(--muted); font-size: 12px; }
.goal-visual .progress-steps { height: 24px; }
.goal-visual .progress-track, .goal-link .progress-track, .profile-goal-row .progress-track, .friend-goal .progress-track { height: 12px; margin: 0; border-radius: 3px; background: #e7eee6; }
.goal-visual .progress-track > div, .goal-link .progress-track > div, .profile-goal-row .progress-track > span, .friend-goal .progress-track > span { display: block; height: 100%; border-radius: 3px; background: #63876b; }
.milestone-scale { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; }
.goal-details { border-top: 1px solid var(--rule); margin-top: 18px; padding-top: 10px; }
.goal-details summary { width: fit-content; padding: 6px 3px; color: var(--accent); cursor: pointer; font-size: 13px; font-weight: 600; }
.goal-details .goal-evidence { background: transparent; border: 0; padding: 0; margin: 10px 0; }
.goal-details .goal-next { margin-top: 10px; }
.goal .goal-top { align-items: baseline; }
.goal .goal-top h3 { margin-bottom: 0; }
.goal-link .progress-track { max-width: 220px; margin-top: 10px; }
.profile-goal-row { padding: 12px 0; border-bottom: 1px solid var(--rule); }
.profile-goal-row:last-child { border-bottom: 0; }
.profile-goal-row > span:first-child { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; margin-bottom: 9px; }
.profile-goal-row b { color: var(--ink); font-size: 13px; }
.profile-goal-row small { color: var(--muted); font-size: 12px; text-align: right; }
.profile-goal-row .progress-steps { height: 14px; }
.friend-goal { list-style: none; padding: 4px 0; }
.friend-goal > span:first-child { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; margin-bottom: 8px; }
.friend-profile ul:has(.friend-goal) { padding-left: 0; }
.challenge-heading { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; }
.challenge-heading > span { color: var(--accent); font-size: 12px; font-weight: 700; }
.challenge-intro { font-size: 12px; }
.challenge-consent { max-width: 66ch; font-size: 13px; }
.challenge-members { gap: 0; margin: 12px 0 20px; }
.challenge-members li { gap: 13px; padding: 13px 0; border-top: 1px solid var(--rule); }
.challenge-member-progress { flex: 1; min-width: 0; }
.challenge-member-top, .challenge-member-meta { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; }
.challenge-member-top strong { font-size: 14px; color: var(--ink); }
.challenge-member-top b { color: var(--accent); font-size: 16px; font-variant-numeric: tabular-nums; }
.challenge-member-top b span { color: var(--muted); font-size: 11px; font-weight: 500; }
.challenge-member-progress .progress-steps { max-width: 340px; height: 12px; margin: 7px 0 6px; }
.challenge-member-meta { justify-content: flex-start; }
.challenge-member-meta small { font-size: 11px; }
.checkin-label { color: var(--accent)!important; font-weight: 700; }
.paired-progress { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 20px; margin: 13px 0 15px; }
.paired-progress > div { min-width: 0; }
.paired-progress > div > span:first-child { display: flex; justify-content: space-between; gap: 8px; color: var(--ink); font-size: 12px; margin-bottom: 8px; }
.paired-progress b { color: var(--accent); font-variant-numeric: tabular-nums; }
.paired-progress .progress-steps { height: 14px; }
.shared-home-summary { border-top: 1px solid var(--rule); margin-top: 16px; padding-top: 16px; }
.shared-home-summary > strong { color: var(--ink); font-size: 13px; }
@media (max-width: 650px) {
  .paired-progress { grid-template-columns: 1fr; gap: 12px; }
  .goal-top { flex-wrap: wrap; }
  .goal-link .progress-track { max-width: 140px; }
}
@media (prefers-reduced-motion: no-preference) {
  .progress-steps i, .progress-track > div, .progress-track > span { transition: background-color .22s ease, width .22s ease; }
}
