/* Health & Habit Guild Theme — original CSS-only adventure board system.
   Inspired by classic mission-board hierarchy; no third-party game assets. */

@font-face {
  font-family: 'Anuphan';
  src: url('fonts/anuphan-400-700.woff2') format('woff2');
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+0E01-0E5B, U+200C-200D, U+25CC;
}
@font-face {
  font-family: 'Anuphan';
  src: url('fonts/anuphan-latin-400-700.woff2') format('woff2');
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+0000-00FF;
}
@font-face {
  font-family: 'Pridi';
  src: url('fonts/pridi-600.woff2') format('woff2');
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  unicode-range: U+0E01-0E5B, U+200C-200D, U+25CC;
}
@font-face {
  font-family: 'Pridi';
  src: url('fonts/pridi-latin-600.woff2') format('woff2');
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  unicode-range: U+0000-00FF;
}
@font-face {
  font-family: 'Pridi';
  src: url('fonts/pridi-700.woff2') format('woff2');
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  unicode-range: U+0E01-0E5B, U+200C-200D, U+25CC;
}
@font-face {
  font-family: 'Pridi';
  src: url('fonts/pridi-latin-700.woff2') format('woff2');
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  unicode-range: U+0000-00FF;
}

.guild-theme {
  --guild-night: #130b08;
  --guild-wood: #3d2417;
  --guild-wood-mid: #58351e;
  --guild-wood-light: #75502d;
  --guild-gold: #efb944;
  --guild-gold-light: #ffd979;
  --guild-gold-deep: #a96919;
  --guild-parchment: #ead3a5;
  --guild-parchment-light: #fff0cb;
  --guild-parchment-soft: #dfc18e;
  --guild-ink: #432e1e;
  --guild-muted: #65482e;
  --font-body: 'Anuphan', 'Leelawadee UI', Tahoma, sans-serif;
  --font-head: 'Anuphan', 'Leelawadee UI', Tahoma, sans-serif;
  --font-display: 'Pridi', Georgia, serif;
  --guild-red: #81352b;
  --guild-green: #477157;
  --guild-board-shadow: 0 24px 70px rgba(5,2,1,.48), inset 0 0 0 2px rgba(255,221,146,.09);
  --guild-paper-shadow: 0 9px 18px rgba(21,10,4,.24), inset 0 0 24px rgba(117,74,26,.11), inset 0 1px 0 rgba(255,255,255,.5);
  color: #f8e7c0;
  font-family: var(--font-body);
  background:
    linear-gradient(90deg, rgba(9,4,2,.42), transparent 9%, transparent 91%, rgba(9,4,2,.42)),
    repeating-linear-gradient(90deg, transparent 0 2px, rgba(255,218,151,.025) 2px 3px, transparent 3px 220px),
    repeating-linear-gradient(0deg, #22120c 0 4px, #2b180f 4px 88px, #1b0d09 88px 93px);
}
.guild-theme ::selection { background: rgba(181, 126, 52, 0.45); color: inherit; }
.guild-theme :is(input, textarea)::selection { color: #3d2817; }
.guild-theme::before {
  opacity: .32;
  background-image:
    repeating-linear-gradient(7deg, transparent 0 18px, rgba(255,220,160,.025) 18px 19px, transparent 19px 38px),
    radial-gradient(ellipse at 20% 12%, rgba(229,166,68,.09), transparent 30%),
    radial-gradient(ellipse at 80% 52%, rgba(0,0,0,.25), transparent 38%);
  background-size: auto;
  mask-image: none;
}
.guild-theme :is(h2,h3) { font-family: var(--font-head); }
.guild-theme h1,
.guild-theme .section-heading h2,
.guild-theme .daily-adventure-heading h2,
.guild-theme .sync-heading-copy h2,
.guild-theme .calendar-toolbar h2,
.guild-theme .character-sheet > h2,
.guild-theme .people-directory-hero h2 { font-family: var(--font-display); }
.guild-theme :is(button,input,select,textarea),
.guild-theme .import-label { font-family: var(--font-body); }

/* Guild masthead */
.guild-theme .health-topbar {
  border-bottom: 1px solid #8b5a2b;
  background:
    linear-gradient(180deg, rgba(255,221,147,.07), transparent 35%),
    repeating-linear-gradient(90deg, #26150d 0 120px, #2d190f 120px 240px);
  box-shadow: 0 8px 30px rgba(0,0,0,.38), inset 0 -2px 0 rgba(0,0,0,.3);
}
.guild-theme .health-brand-copy { font-family: var(--font-body); font-weight: 600; }
.guild-theme .health-brand b { color: var(--guild-gold-light); }
.guild-theme .health-topbar nav a { color: #d5bd96; }
.guild-theme .health-topbar nav a:hover,
.guild-theme .health-topbar nav a:focus-visible { color: var(--guild-gold-light); }
.guild-theme .brand-avatar { border: 2px solid #b98136; box-shadow: 0 0 0 2px #28160e; }

/* Hall welcome scroll */
.guild-theme .health-hero {
  overflow: visible;
  margin-top: 1.35rem;
  padding-top: clamp(3.9rem,7vw,5.2rem);
  border: 10px solid var(--guild-wood-mid);
  border-radius: 10px 10px 20px 20px;
  color: var(--guild-ink);
  background:
    linear-gradient(135deg, rgba(255,255,255,.3), transparent 36%),
    repeating-linear-gradient(0deg, transparent 0 5px, rgba(100,62,22,.025) 5px 6px),
    var(--guild-parchment-light);
  box-shadow: var(--guild-board-shadow), inset 0 0 40px rgba(118,67,17,.16), 0 0 0 2px #23120a;
}
.guild-theme .health-hero::before {
  width: 54px;
  height: 54px;
  inset: auto 24px 20px auto;
  border: 3px double #e6bd69;
  border-radius: 50%;
  background: radial-gradient(circle,#a33d2d 0 38%,#75251e 39% 65%,#521814 66%);
  filter: none;
  opacity: .82;
  box-shadow: 0 5px 10px rgba(67,31,12,.35);
}
.guild-theme .health-hero::after {
  width: 92%;
  height: 14px;
  right: 4%;
  bottom: -9px;
  border-radius: 50%;
  background: rgba(25,11,5,.34);
  filter: blur(8px);
}
.guild-hall-banner {
  position: absolute;
  z-index: 3;
  top: -27px;
  left: 50%;
  width: min(460px,75%);
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  padding: .75rem 2.6rem;
  color: #4a2d13;
  background: linear-gradient(180deg,#ffe18a,#e9ae38 62%,#bc741d);
  clip-path: polygon(0 12%,9% 12%,13% 0,18% 13%,82% 13%,87% 0,91% 12%,100% 12%,94% 50%,100% 88%,83% 87%,78% 100%,22% 100%,17% 87%,0 88%,6% 50%);
  filter: drop-shadow(0 8px 6px rgba(18,7,2,.34));
  font: 600 clamp(.72rem,2vw,.95rem)/1 var(--font-body);
  letter-spacing: .08em;
  text-align: center;
  transform: translateX(-50%);
}
.guild-theme .health-label { color: var(--guild-gold-deep); }
.guild-theme .health-hero h1 { color: #3b281a; font-weight: 600; text-shadow: 0 1px 0 rgba(255,255,255,.65); }
.guild-theme .health-lead { color: #6f573f; }
.guild-theme .hero-log-action,
.guild-theme .primary-action,
.guild-theme .secondary-action,
.guild-theme .mental-action,
.guild-theme .success-action,
.guild-theme .import-label {
  color: #3d250e;
  border: 1px solid #9f6418;
  border-radius: 9px;
  background: linear-gradient(180deg,#ffe083 0,#f5bd46 48%,#d58d25 100%);
  box-shadow: inset 0 1px 0 #fff1b7, inset 0 -2px 0 rgba(112,61,11,.25), 0 5px 10px rgba(51,25,7,.22);
  text-shadow: 0 1px 0 rgba(255,244,195,.7);
}
.guild-theme .hero-log-action:hover,
.guild-theme .primary-action:hover,
.guild-theme .secondary-action:hover,
.guild-theme .mental-action:hover,
.guild-theme .success-action:hover,
.guild-theme .import-label:hover {
  background: linear-gradient(180deg,#ffec9f,#ffc957 52%,#e59c2c);
  transform: translateY(-1px);
}
.guild-theme .hero-targets span {
  color: #5a4028;
  border-color: rgba(117,77,34,.3);
  background: rgba(255,255,255,.26);
}
.guild-theme .hero-targets b { color: #8b5715; }
.guild-theme .privacy-note {
  border: 1px solid #b58c55;
  border-radius: 8px 16px 8px 16px;
  background: rgba(202,169,111,.25);
  box-shadow: inset 0 0 16px rgba(109,68,26,.08);
}
.guild-theme .privacy-note summary { color: #5b3a1e; }
.guild-theme .privacy-note span,
.guild-theme .privacy-note span strong { color: #6f573f; }

/* Oracle relay board */
.guild-theme .sync-panel {
  border: 8px solid #4d2c19;
  border-radius: 14px;
  background:
    radial-gradient(circle at 7% 4%,rgba(238,185,68,.1),transparent 26%),
    repeating-linear-gradient(90deg,rgba(255,255,255,.018) 0 1px,transparent 1px 110px),
    linear-gradient(145deg,#2c1a12,#140d0b 58%,#23160f);
  box-shadow: var(--guild-board-shadow), 0 0 0 2px #211008;
}
.guild-theme .sync-panel::before {
  opacity: .18;
  background-image: repeating-linear-gradient(0deg,transparent 0 24px,rgba(239,185,68,.08) 24px 25px);
  mask-image: none;
}
.guild-theme .sync-heading-copy p,
.guild-theme .sync-section-label span { color: var(--guild-gold-light); }
.guild-theme .sync-section-label span {
  font-size: .72rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: .08em;
}
.guild-theme .sync-heading-copy h2 { color: #fff0c7; font-weight: 600; }
.guild-theme .sync-status,
.guild-theme .sync-section-label small { color: #c9b28d; }
.guild-theme .sync-direction {
  border-color: #805326;
  background: #120b08;
  color: #f6ddb0;
}

/* Carved navigation rail */
.guild-theme .health-tabs {
  padding: .48rem;
  border: 2px solid #774a24;
  border-radius: 12px;
  background:
    linear-gradient(180deg,rgba(255,224,159,.08),transparent 35%),
    repeating-linear-gradient(90deg,#3d2416 0 100px,#492b19 100px 200px);
  box-shadow: 0 10px 28px rgba(0,0,0,.35), inset 0 0 0 3px rgba(38,18,8,.35);
}
.guild-theme .health-tab {
  color: #d9c19a;
  border: 1px solid transparent;
  border-radius: 8px;
  background: rgba(22,11,7,.26);
}
.guild-theme .health-tab:hover { color: #fff0c7; background: rgba(255,224,159,.08); }
.guild-theme .health-tab.active,
.guild-theme .add-tab,
.guild-theme .add-tab.active {
  color: #44280f;
  border-color: #9d641e;
  background: linear-gradient(180deg,#ffe18a,#eab03e 62%,#c57b20);
  box-shadow: inset 0 1px 0 #fff1b5, 0 5px 12px rgba(24,10,3,.35);
}

/* Shared wooden boards */
.guild-theme :is(
  .today-cockpit:not(.sync-panel), .daily-adventure, .quick-action-zone,
  .today-timeline-zone, .quest-zone, .life-today-zone, .calendar-zone,
  .day-detail, .recent-history-zone, .quick-log-hub, .insight-overview,
  .chart-card, .progress-insight, .level-panel, .stat-grid, .badge-zone,
  .mental-hub, .character-sheet, .habit-hub, .program-zone, .people-hub
) {
  position: relative;
  border: 8px solid #4a2a18;
  border-radius: 12px 12px 18px 18px;
  background:
    linear-gradient(180deg,rgba(255,225,161,.05),transparent 22%),
    repeating-linear-gradient(90deg,#2e1b12 0 150px,#372015 150px 300px);
  box-shadow: var(--guild-board-shadow), 0 0 0 2px #1b0d07;
  backdrop-filter: none;
}
.guild-theme :is(
  .today-cockpit:not(.sync-panel), .daily-adventure, .quick-action-zone,
  .today-timeline-zone, .quest-zone, .life-today-zone, .calendar-zone,
  .day-detail, .recent-history-zone, .quick-log-hub, .insight-overview,
  .chart-card, .progress-insight, .badge-zone, .mental-hub, .habit-hub,
  .program-zone, .people-hub
)::before {
  content: "";
  position: absolute;
  inset: 8px;
  z-index: 0;
  border: 1px solid rgba(239,185,68,.13);
  border-radius: 5px 5px 12px 12px;
  pointer-events: none;
}
.guild-theme :is(
  .today-cockpit:not(.sync-panel), .daily-adventure, .quick-action-zone,
  .today-timeline-zone, .quest-zone, .life-today-zone, .calendar-zone,
  .day-detail, .recent-history-zone, .quick-log-hub, .insight-overview,
  .chart-card, .progress-insight, .badge-zone, .mental-hub, .habit-hub,
  .program-zone, .people-hub
) > * { position: relative; z-index: 1; }
.guild-theme .section-heading h2,
.guild-theme .calendar-toolbar h2,
.guild-theme .inbox-heading h3,
.guild-theme .quest-group-heading h3 { color: #fff0c7; font-weight: 600; }
.guild-theme .section-heading p,
.guild-theme .calendar-toolbar .health-label,
.guild-theme .quest-tier-label { color: var(--guild-gold-light); }
.guild-theme .section-heading > span,
.guild-theme .section-heading small,
.guild-theme .quest-group-heading span,
.guild-theme .habit-cap-note { color: #cbb590; }



/* Parchment material */
.guild-theme :is(
  .macro-card, .decision-card, .routine-step, .daily-checklist,
  .quick-actions button, .empty-state, .timeline-row, .quest, .habit-card, .calendar-day, .day-summary article, .capture-form, .capture-row, .log-form-surface, .score-card, .coverage-card, .consistency-breakdown article, .metric-chart, .trend-grid article, .stat, .badge, .mental-card, .profile-settings-card, .quest-settings-card, .data-vault, .people-entry-card, .people-index-card, .person-card, .program-row, .history-row) {
  color: var(--guild-ink);
  border-color: #b98e50;
  background:
    linear-gradient(135deg,rgba(255,255,255,.38),transparent 34%),
    repeating-linear-gradient(0deg,transparent 0 4px,rgba(107,66,25,.022) 4px 5px),
    var(--guild-parchment);
  box-shadow: var(--guild-paper-shadow);
  backdrop-filter: none;
}
.guild-theme :is(
  .macro-card, .decision-card, .routine-step, .daily-checklist,
  .quick-actions button, .empty-state, .timeline-row, .quest, .habit-card, .calendar-day, .day-summary article, .capture-form, .capture-row, .log-form-surface, .score-card, .coverage-card, .consistency-breakdown article, .metric-chart, .trend-grid article, .stat, .badge, .mental-card, .profile-settings-card, .quest-settings-card, .data-vault, .people-entry-card, .people-index-card, .person-card, .program-row, .history-row) :is(h2,h3,strong) { color: var(--guild-ink); }
.guild-theme :is(
  .macro-card, .decision-card, .routine-step, .daily-checklist,
  .quick-actions button, .empty-state, .timeline-row, .quest, .habit-card, .calendar-day, .day-summary article, .capture-form, .capture-row, .log-form-surface, .score-card, .coverage-card, .consistency-breakdown article, .metric-chart, .trend-grid article, .stat, .badge, .mental-card, .profile-settings-card, .quest-settings-card, .data-vault, .people-entry-card, .people-index-card, .person-card, .program-row, .history-row) :is(p,small) { color: var(--guild-muted); }
.guild-theme .score-card span,
.guild-theme .coverage-card span,
.guild-theme .score-card small,
.guild-theme .coverage-card small,
.guild-theme .consistency-breakdown span,
.guild-theme .consistency-breakdown small { color: #65482e; }
.guild-theme .coverage-card strong { color: #432e1e; }
.guild-theme .trend-grid :is(span,small),
.guild-theme .metric-chart-heading span,
.guild-theme .chart-axis,
.guild-theme .chart-empty { color: #65482e; }

/* Today status scroll */
.guild-theme .today-cockpit .macro-grid {
  gap: .55rem;
  overflow: visible;
  background: transparent;
}
.guild-theme .today-cockpit .macro-card {
  min-height: 130px;
  border: 1px solid #b98e50;
  border-radius: 8px 8px 15px 15px;
}
.guild-theme .macro-card > span { color: #70583d; }
.guild-theme .macro-card strong { color: #4a311d; }
.guild-theme .macro-card small,
.guild-theme .macro-card small b { color: #765117; }
.guild-theme .metric-track,
.guild-theme .routine-progress-track,
.guild-theme .quest-progress,
.guild-theme .attribute-track,
.guild-theme .character-xp-track,
.guild-theme .xp-track { background: rgba(91,57,23,.18); }
.guild-theme .today-cockpit .decision-card {
  border: 1px solid #b98e50;
  border-left: 5px solid #a66a22;
  border-radius: 6px 12px 12px 6px;
}
.guild-theme .decision-card p { color: #9a621b; }
.guild-theme .decision-card span { color: var(--guild-muted); }

/* Daily route and checklist */
.guild-theme .daily-adventure::after {
  content: "DAILY ROUTE";
  position: absolute;
  top: -1px;
  right: 34px;
  padding: .3rem 1rem .45rem;
  color: #42260e;
  background: linear-gradient(180deg,#ffe18a,#d9952d);
  clip-path: polygon(0 0,100% 0,90% 100%,10% 100%);
  font-size: .58rem;
  font-weight: 800;
  letter-spacing: .12em;
}
.guild-theme .daily-adventure-heading h2 { color: #fff0c7; font-weight: 600; }
.guild-theme .daily-adventure-heading > div:first-child > span { color: #cbb590; }
.guild-theme .daily-adventure-heading p,
.guild-theme .routine-lane-heading small { color: var(--guild-gold-light); }
.guild-theme .routine-progress strong { color: var(--guild-gold-light); }
.guild-theme .routine-progress > span { color: #cbb590; }
.guild-theme .routine-journey::before { border-color: rgba(239,185,68,.42); }
.guild-theme .routine-phase-icon {
  border: 2px solid #9c672d;
  background: radial-gradient(circle at 35% 30%,#8b5b2d,#25140c 72%);
  box-shadow: 0 0 0 6px #2d1a11, inset 0 1px 0 rgba(255,255,255,.18);
}
.guild-theme .routine-lane-heading h3 { color: #fff0c7; }
.guild-theme .routine-step {
  border: 1px solid #b98e50;
  border-radius: 8px 8px 15px 15px;
}
.guild-theme .routine-step:hover { border-color: #8d5a22; background: var(--guild-parchment-light); }
.guild-theme .routine-marker {
  color: #f6d179;
  border-color: #7d4f25;
  background: radial-gradient(circle at 35% 30%,#81552d,#27160d 72%);
}
.guild-theme .routine-copy strong { color: var(--guild-ink); }
.guild-theme .routine-copy small { color: var(--guild-muted); }
.guild-theme .routine-step em { color: #955c16; }
.guild-theme .routine-step.done {
  border-color: #6f8b64;
  background: linear-gradient(135deg,rgba(255,255,255,.38),transparent 34%),#d9dfb0;
}
.guild-theme .routine-step.done .routine-marker { color: #fff6d3; border-color: #365844; background: var(--guild-green); }
.guild-theme .routine-step.done .routine-copy strong { color: #35523e; }
.guild-theme .routine-heading-tools { display: flex; flex-direction: column; align-items: flex-end; gap: .65rem; }
.guild-theme .routine-manager-toggle { min-height: 44px; padding: .45rem .75rem; font-size: .72rem; }
.guild-theme .routine-manager[hidden] { display: none; }
.guild-theme .routine-manager {
  display: grid;
  grid-template-columns: minmax(220px,.6fr) minmax(0,1.4fr);
  gap: 1rem;
  margin: 0 0 1.15rem;
  padding: 1rem;
  color: var(--guild-ink);
  border: 1px solid #b98e50;
  border-radius: 8px 16px 8px 16px;
  background: var(--guild-parchment);
  box-shadow: var(--guild-paper-shadow);
}
.guild-theme .routine-manager-copy p { margin: 0; color: #8c5617; font-size: .62rem; font-weight: 700; letter-spacing: .12em; }
.guild-theme .routine-manager-copy h3 { margin: .35rem 0 .25rem; color: var(--guild-ink); }
.guild-theme .routine-manager-copy span { color: #65482e; font-size: .76rem; line-height: 1.55; }
.guild-theme .routine-form { display: flex; flex-wrap: wrap; gap: .7rem; align-items: end; }
.guild-theme .routine-form > label { display: grid; gap: .35rem; color: #604329; font-size: .67rem; font-weight: 700; }
.guild-theme .routine-form > label:nth-of-type(1) { flex: 1 1 110px; }
.guild-theme .routine-form > label:nth-of-type(2) { flex: 2 1 180px; }
.guild-theme .routine-form > label:nth-of-type(3) { flex: 1 1 110px; }
.guild-theme .routine-form > label:nth-of-type(4) { flex: 0 1 70px; }
.guild-theme .routine-form > label:nth-of-type(5) { flex: 3 1 200px; }
.guild-theme .routine-form > label:nth-of-type(6) { flex: 4 1 240px; }
.guild-theme .routine-form :is(input,select) { width: 100%; min-height: 44px; padding: .62rem .7rem; color: #3d2817; border: 1px solid #aa7e43; border-radius: 7px; background: #fff3cf; }
.guild-theme .routine-form-actions { width: 100%; display: flex; justify-content: flex-end; gap: .55rem; margin-top: .4rem; }
.guild-theme .routine-item { min-width: 0; margin-top: .45rem; }
.guild-theme .routine-item .routine-step { margin-top: 0; }
.guild-theme .routine-item-actions { display: flex; justify-content: flex-end; gap: .3rem; padding: .3rem .3rem 0; }
.guild-theme .routine-item-actions button { min-width: 44px; min-height: 44px; padding: .35rem .6rem; color: #d8c09b; border: 1px solid #6f4826; border-radius: 6px; background: rgba(20,9,5,.35); font-size: .64rem; }
.guild-theme .routine-item-actions .routine-delete { color: #f2b1a4; }
.guild-theme .routine-item-actions button:hover { color: #fff0c7; border-color: #b47b38; background: rgba(239,185,68,.12); }
.guild-theme .daily-checklist {
  align-self: start;
  padding: 1.25rem;
  border: 1px solid #b98e50;
  border-radius: 12px 22px 12px 22px;
  background:
    linear-gradient(135deg,rgba(255,255,255,.35),transparent 34%),
    repeating-linear-gradient(0deg,transparent 0 5px,rgba(107,66,25,.025) 5px 6px),
    var(--guild-parchment-light);
  box-shadow: var(--guild-paper-shadow), 0 0 0 4px rgba(112,68,31,.2);
}
.guild-theme .checklist-heading { align-items: flex-start; }
.guild-theme .checklist-heading p { color: #9b631d; }
.guild-theme .checklist-heading h3 { margin-top: .38rem; color: var(--guild-ink); font-size: 1.08rem; line-height: 1.3; }
.guild-theme .checklist-heading > span {
  min-width: 52px;
  min-height: 32px;
  display: grid;
  place-items: center;
  padding: .3rem .6rem;
  color: var(--guild-ink);
  border: 1px solid rgba(127,79,29,.36);
  border-radius: 999px;
  background: rgba(255,248,220,.56);
  font-size: .72rem;
  font-weight: 700;
  white-space: nowrap;
}
.guild-theme .checklist-intro {
  margin: .7rem 0 0;
  color: var(--guild-muted);
  font-size: .74rem;
  line-height: 1.55;
}
.guild-theme .checklist-form {
  grid-template-columns: minmax(0,1fr) 50px;
  gap: .65rem;
  margin-top: 1rem;
}
.guild-theme .checklist-form input {
  min-width: 0;
  min-height: 50px;
  padding: .72rem .85rem;
  border: 1px solid #ad8247;
  border-radius: 10px;
  background: #fff8e5;
}
.guild-theme .checklist-form button {
  width: 50px;
  min-height: 50px;
  box-shadow: inset 0 1px 0 #fff2ad, 0 5px 10px rgba(71,37,9,.18);
}
.guild-theme .checklist-list { margin-top: .85rem; }
.guild-theme .checklist-row { border-color: rgba(92,58,24,.16); }
.guild-theme .checklist-name { color: var(--guild-ink); }
.guild-theme .checklist-empty {
  min-height: 92px;
  display: grid;
  grid-template-columns: auto minmax(0,1fr);
  gap: .75rem;
  align-items: center;
  padding: .85rem;
  color: var(--guild-muted);
  border: 1px dashed rgba(142,99,49,.45);
  border-radius: 10px 16px 10px 16px;
  background: rgba(255,248,222,.42);
}
.guild-theme .checklist-empty-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: #fff2b5;
  border: 2px solid #d5a64f;
  border-radius: 50%;
  background: #7c4c20;
  box-shadow: inset 0 0 0 3px #3b2110;
}
.guild-theme .checklist-empty-copy { min-width: 0; }
.guild-theme .checklist-empty-copy strong,
.guild-theme .checklist-empty-copy > span { display: block; }
.guild-theme .checklist-empty-copy strong { color: var(--guild-ink); font-size: .82rem; }
.guild-theme .checklist-empty-copy > span { margin-top: .18rem; color: var(--guild-muted); font-size: .69rem; line-height: 1.5; }
.guild-theme .checklist-note {
  margin-top: .9rem;
  padding-top: .75rem;
  color: var(--guild-muted);
  border-top: 1px solid rgba(92,58,24,.16);
  font-size: .67rem;
  line-height: 1.55;
}
.guild-theme .checklist-note::before { content: "◇"; margin-right: .4rem; color: #9b631d; }
.guild-theme .checklist-toggle { border-color: #8e6331; }
.guild-theme .checklist-row.done .checklist-toggle { color: #fff7d4; border-color: #365844; background: var(--guild-green); }

/* Forms and command buttons */
.guild-theme input,
.guild-theme select,
.guild-theme textarea {
  color: var(--guild-ink);
  border: 1px solid #ad8247;
  border-radius: 7px;
  background: #fff6dd;
  box-shadow: inset 0 2px 6px rgba(98,61,24,.1);
}
.guild-theme input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  filter: sepia(1) hue-rotate(-50deg) saturate(3) brightness(0.6); /* Make it brownish */
  opacity: 0.8;
}

.guild-theme input:hover,
.guild-theme select:hover,
.guild-theme textarea:hover { border-color: #8e5c24; background: #fff9e9; }
.guild-theme input:focus,
.guild-theme select:focus,
.guild-theme textarea:focus {
  color: var(--guild-ink);
  border-color: var(--guild-gold-deep);
  background: #fffbed;
  box-shadow: 0 0 0 3px rgba(217,151,48,.22), inset 0 2px 6px rgba(98,61,24,.08);
}
.guild-theme label { color: #f2deb5; }
.guild-theme :is(.capture-form,.log-form-surface,.profile-settings-card,.quest-settings-card,.data-vault,.people-entry-card) label { color: #5d432b; }
.guild-theme .checklist-form button {
  color: #3d250e;
  border: 1px solid #9f6418;
  background: linear-gradient(180deg,#ffe083,#d89026);
}
.guild-theme .quick-actions button {
  border: 1px solid #b98e50;
  border-radius: 8px 8px 17px 17px;
}
.guild-theme .quick-actions button:hover { border-color: #8b571e; background: var(--guild-parchment-light); }
.guild-theme .quick-actions button strong { color: var(--guild-ink); }
.guild-theme .quick-actions button small { color: var(--guild-muted); }
.guild-theme .quick-actions button > i { color: #9b631d; }
.guild-theme .quick-actions .capture-action,
.guild-theme .quick-actions button[data-quick] {
  background: linear-gradient(135deg,rgba(255,255,255,.36),transparent 34%),var(--guild-parchment);
  border-color: #b98e50;
}

/* Timeline and calendar ledgers */
.guild-theme .empty-state {
  padding: 1.35rem;
  border: 1px dashed #a57b43;
  border-radius: 7px 13px 7px 13px;
}
.guild-theme .timeline-row::before { border-color: #95662f; }
.guild-theme .calendar-weekdays,
.guild-theme .calendar-legend { color: #dcc7a1; }
.guild-theme .calendar-legend { border-color: #82542b; background: rgba(16,8,5,.2); }
.guild-theme .calendar-controls strong { color: var(--guild-gold-light); }
.guild-theme .calendar-controls button { border-color: #8d5b28; background: rgba(22,10,5,.32); }
.guild-theme .calendar-day-number { color: var(--guild-ink); }
.guild-theme .calendar-day:hover { border-color: #8e5b24; background: var(--guild-parchment-light); }
.guild-theme .calendar-day.today { box-shadow: inset 0 0 0 2px #7a6541, var(--guild-paper-shadow); }
.guild-theme .calendar-day.selected { border-color: #a56a1b; background: #f6dfa8; box-shadow: inset 0 0 0 2px #d19a3f, var(--guild-paper-shadow); }
.guild-theme .day-summary span { color: var(--guild-muted); }
.guild-theme .day-summary strong { color: #7d5119; }
.guild-theme .capture-form > label:first-child,
.guild-theme .inbox-heading h3 { color: #e5cf9b; }
.guild-theme .capture-meta > span,
.guild-theme .capture-privacy { color: var(--guild-muted); }
.guild-theme .advanced-fields > summary,
.guild-theme .device-intake > summary,
.guild-theme .photo-intake-disclosure > summary { color: var(--guild-ink); font-weight: 700; text-decoration: underline; text-decoration-color: rgba(67,46,30,0.3); }
.guild-theme .manual-entry > summary { color: #dac39e; font-weight: 600; text-decoration: none; }
.guild-theme .quick-log-switcher { border-color: #7b4c27; background: rgba(20,10,6,.32); }
.guild-theme .quick-log-switcher button { color: #dac39e; }
.guild-theme .quick-log-switcher button.active { color: #3d250e; background: var(--guild-gold); }

/* Reference-inspired mission cards */
.guild-theme .mmorpg-board {
  border: 10px solid #4a2a18;
  background:
    linear-gradient(180deg,rgba(255,225,161,.05),transparent 22%),
    repeating-linear-gradient(90deg,#2e1b12 0 150px,#372015 150px 300px);
  box-shadow: var(--guild-board-shadow), 0 0 0 2px #1b0d07;
}
.guild-theme .guild-board-crown {
  margin-top: -1.1rem;
  padding: .72rem 2rem .82rem;
  border: 0;
  border-radius: 0;
  color: #4c2d10;
  background: linear-gradient(180deg,#ffe18a,#e9ae38 62%,#bc741d);
  clip-path: polygon(0 12%,10% 12%,15% 0,20% 13%,80% 13%,85% 0,90% 12%,100% 12%,94% 50%,100% 88%,80% 87%,75% 100%,25% 100%,20% 87%,0 88%,6% 50%);
  filter: drop-shadow(0 7px 5px rgba(17,7,2,.4));
  font-family: var(--font-body);
}
.guild-theme .quest-heading h2 { color: #fff0c7; }
.guild-theme .quest-summary,
.guild-theme .quest-cadence { color: #ffe18a; border-color: #8f5c2a; background: rgba(22,10,5,.34); }
.guild-theme .quest-board-tools { display: flex; align-items: flex-end; flex-direction: column; gap: .35rem; }
.guild-theme .quest-scroll-cue { display: none; }
.guild-theme .main-quest-board,
.guild-theme .side-quest-board {
  border: 2px solid #70441f;
  border-radius: 7px;
  background: rgba(18,9,5,.34);
  box-shadow: inset 0 0 26px rgba(0,0,0,.25);
}
.guild-theme .main-quest-board::after,
.guild-theme .side-quest-board::after { color: rgba(239,185,68,.12); }
.guild-theme .quest {
  min-height: 154px;
  align-content: start;
  padding: 1rem;
  border: 1px solid #b98e50;
  border-radius: 8px 8px 18px 18px;
  background:
    linear-gradient(135deg,rgba(255,255,255,.42),transparent 34%),
    repeating-linear-gradient(0deg,transparent 0 4px,rgba(107,66,25,.022) 4px 5px),
    var(--guild-parchment-light);
  box-shadow: var(--guild-paper-shadow);
}
.guild-theme .quest::before {
  left: 0;
  right: 0;
  height: 12px;
  border-radius: 9px 9px 50% 50%;
  background: linear-gradient(180deg,#f7e6bf,#cfa76d);
  box-shadow: 0 3px 6px rgba(88,50,17,.2);
}
.guild-theme .quest-stat-badge { font-weight: 900; }
.guild-theme .stat-str { color: #8a1f1f; background: rgba(220,53,69,.15); }
.guild-theme .stat-int { color: #0d47a1; background: rgba(13,71,161,.12); }
.guild-theme .stat-vit { color: #1b5e20; background: rgba(27,94,32,.12); }
.guild-theme .stat-dex { color: #9c6c0e; background: rgba(212,154,38,.2); }
.guild-theme .stat-luk { color: #4a148c; background: rgba(74,20,140,.12); }
.guild-theme .btn-quick-log { background: #d1ebd8; color: #1e5a32; border-color: #a3d4b4; box-shadow: 0 2px 5px rgba(30,90,50,.15); }
.guild-theme .btn-quick-log:hover { background: #bce3c5; }
.guild-theme .btn-detail-log { background: rgba(107,66,25,.04); color: #6b4219; border-color: rgba(107,66,25,.18); }
.guild-theme .btn-detail-log:hover { background: rgba(107,66,25,.08); color: #42280f; }
.guild-theme .weekly-quest { min-height: 126px; padding-bottom: 1rem; }
.guild-theme .quest:hover {
  border-color: #8f5a20;
  background: linear-gradient(135deg,rgba(255,255,255,.45),transparent 34%),#fff2cf;
  transform: translateY(-2px);
}
.guild-theme .quest.done { border-color: #68815f; background: linear-gradient(135deg,rgba(255,255,255,.36),transparent 34%),#dbe1b5; }
.guild-theme .quest-title-line strong { color: var(--guild-ink); }
.guild-theme .quest-state { color: #37709b; }
.guild-theme .quest-meta small { color: var(--guild-muted); }
.guild-theme .quest-icon {
  border-color: #9a642b;
  background: radial-gradient(circle at 35% 30%,#85582f,#2b180e 72%);
  box-shadow: 0 0 0 3px #e3c98f,0 0 0 4px #9b6b32,inset 0 1px 2px rgba(255,255,255,.18);
}
.guild-theme .quest-progress { background: rgba(90,55,21,.18); }
.guild-theme .quest-progress i { background: linear-gradient(90deg,#4e85a3,#d18d2d); }
.guild-theme .quest-reward { color: #40250d; background: linear-gradient(135deg,#ffe28a,#d9972f); }
.guild-theme .boss-stage {
  border: 2px solid #7c462b;
  background: linear-gradient(90deg,#3b1716,#21100d 48%,#2b1713);
  box-shadow: inset 0 0 24px rgba(0,0,0,.35);
}
.guild-theme .boss-copy strong { color: #ffe18a; }
.guild-theme .boss-copy span,
.guild-theme .boss-copy small { color: #dbc19b; }
.guild-theme .weekly-quest-zone { border-color: #79502b; }

/* Side quests and rewards */
.guild-theme .habit-card { border: 1px solid #b98e50; border-radius: 7px 7px 14px 14px; }
.guild-theme .habit-card.done { border-color: #68815f; background: linear-gradient(135deg,rgba(255,255,255,.36),transparent 34%),#dbe1b5; }
.guild-theme .habit-card small { color: var(--guild-muted); }
.guild-theme .habit-stat-chip { color: #f8e4a6; background: #69441e; }
.guild-theme .habit-actions button,
.guild-theme .person-card-actions button,
.guild-theme .data-actions button {
  color: #4b2d12;
  border-color: #9f6418;
  background: linear-gradient(180deg,#ffe083,#d89026);
}
.guild-theme .habit-actions .habit-complete { color: #3d250e; border-color: #9f6418; }
.guild-theme .danger-row-action { color: #8a1f1f !important; }
.guild-theme .row-actions .danger-row-action:hover { background: #d32f2f !important; color: #fff !important; border-color: #d32f2f !important; }
.guild-theme .row-actions button:not(.danger-row-action):not(.complete-button):hover { color: #21618C; border-color: rgba(33, 97, 140, 0.4); }
.guild-theme .person-card-delete {
  position: absolute !important;
  top: 0.6rem !important;
  right: 0.6rem !important;
  width: 26px !important;
  height: 26px !important;
  flex: 0 0 26px !important;
  color: #8a483a !important;
  background: rgba(138,72,58,0.1) !important;
  font-weight: 800;
  font-size: 1.2rem;
  border: 1px solid rgba(138,72,58,0.2);
  margin: 0 !important;
}
.guild-theme .person-card-delete:hover { color: #fff !important; background: #b83d3d !important; }

/* Make status badges next to name look distinct (sharp, solid) */
.guild-theme .person-card-name-row {
  flex-wrap: wrap; /* Allow wrapping if name is too long */
}
.guild-theme .person-card-name-row .chip {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  min-height: 0 !important;
  color: #7a512d !important;
  font-weight: 800 !important;
  text-transform: uppercase;
  font-size: 0.65rem !important;
  letter-spacing: 0.05em;
}

/* Make chips highly readable in light theme */
.guild-theme .chip-field-label {
  color: #a65814 !important; /* Dark burnt orange for headers */
  font-weight: 900;
  font-size: 0.8rem;
}
.guild-theme .chip {
  background: color-mix(in srgb, var(--chip-color) 15%, #fdf5e6) !important;
  border: 1px solid color-mix(in srgb, var(--chip-color) 80%, transparent) !important;
  color: #3d250e !important;
  font-weight: 800 !important;
  box-shadow: 0 2px 4px rgba(61, 37, 14, 0.05) !important;
}
/* Make all chips in the form smaller and less fat */
.guild-theme .people-form .chip {
  min-height: 32px !important;
  padding: 0.25rem 0.75rem !important;
  font-size: 0.65rem !important;
}
.guild-theme .chip.active {
  background: var(--chip-color) !important;
  color: #2a1808 !important;
  border: 2px solid var(--chip-color) !important;
  box-shadow: 0 4px 12px color-mix(in srgb, var(--chip-color) 40%, transparent) !important;
}

/* Adventurer's Progress Ledger — one progression story, not six equal cards */
.guild-theme .insight-overview.adventurer-ledger {
  overflow: hidden;
  padding: clamp(1.25rem,3vw,2rem);
  border: 2px solid #6f4322;
  border-radius: 28px 28px 28px 10px;
  background:
    radial-gradient(circle at 12% 0,rgba(239,185,68,.13),transparent 30%),
    radial-gradient(circle at 88% 100%,rgba(105,168,176,.08),transparent 34%),
    repeating-linear-gradient(90deg,rgba(255,255,255,.018) 0 1px,transparent 1px 150px),
    linear-gradient(145deg,#332016,#1b100c 68%,#24150f);
  box-shadow: 0 20px 48px rgba(6,2,1,.34), inset 0 1px 0 rgba(255,225,157,.12);
}
.guild-theme .insight-overview.adventurer-ledger::before {
  inset: 7px;
  border-color: rgba(239,185,68,.16);
  border-radius: 21px 21px 21px 7px;
}
.guild-theme .ledger-heading { align-items: end; margin-bottom: 1.5rem; }
.guild-theme .ledger-heading h2 { margin: .35rem 0 .2rem; color: #fff0c7; font-size: clamp(1.45rem,3vw,2rem); }
.guild-theme .ledger-heading small { display: block; max-width: 66ch; color: #cbb590; line-height: 1.55; }
.guild-theme .ledger-chapter {
  color: var(--guild-gold-light);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .08em;
}
.guild-theme .adventurer-ledger .range-select { color: #d7c29e; font-size: .72rem; font-weight: 700; }
.guild-theme .adventurer-ledger .range-select select {
  color: var(--guild-ink);
  border-color: #b7843d;
  background: var(--guild-parchment-light);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7);
}
.guild-theme .consistency-layout {
  display: grid;
  grid-template-columns: minmax(210px,.72fr) minmax(330px,1.55fr) minmax(220px,.8fr);
  gap: clamp(1rem,2vw,1.5rem);
  align-items: stretch;
}
.guild-theme .adventurer-ledger .score-card {
  --score: 0;
  min-width: 0;
  display: grid;
  grid-template-columns: 88px minmax(0,1fr);
  grid-template-rows: 1fr auto;
  gap: .85rem;
  align-items: center;
  padding: 1.2rem;
  color: #f8e7c0;
  border: 1px solid rgba(239,185,68,.24);
  border-radius: 22px 22px 8px 22px;
  background: linear-gradient(150deg,rgba(239,185,68,.1),rgba(9,5,3,.28)),#24140e;
  box-shadow: inset 0 1px 0 rgba(255,235,184,.08);
}
.guild-theme .consistency-rank-seal {
  position: relative;
  isolation: isolate;
  width: 88px;
  height: 88px;
  display: grid;
  place-content: center;
  gap: .1rem;
  border-radius: 50%;
  color: #ffe39a;
  background: conic-gradient(var(--guild-gold) calc(var(--score) * 1%),rgba(255,255,255,.09) 0);
  box-shadow: 0 0 0 1px rgba(239,185,68,.24),0 12px 24px rgba(3,1,0,.28);
  text-align: center;
}
.guild-theme .consistency-rank-seal::before { content: ""; position: absolute; inset: 6px; z-index: -1; border: 1px solid #8d5c29; border-radius: inherit; background: radial-gradient(circle at 35% 28%,#55341e,#1b0e0a 70%); }
.guild-theme .consistency-rank-seal span { font-size: .51rem; font-weight: 700; letter-spacing: .12em; }
.guild-theme .consistency-rank-seal b { font-family: var(--font-display); font-size: 1.12rem; line-height: 1; }
.guild-theme .score-card-copy { min-width: 0; }
.guild-theme .adventurer-ledger .score-card-copy > span { display: block; color: #d1b889; font-size: .7rem; }
.guild-theme .adventurer-ledger .score-card-copy strong { display: block; margin: .1rem 0; color: #ffe08a; font: 700 clamp(2.25rem,4vw,3.15rem)/1 var(--font-display); }
.guild-theme .adventurer-ledger .score-card-copy small { display: block; color: #f3dfb8; font-size: .78rem; }
.guild-theme .adventurer-ledger .score-card > p { grid-column: 1 / -1; margin: .15rem 0 0; padding-top: .8rem; color: #bfa982; border-top: 1px solid rgba(239,185,68,.15); font-size: .64rem; line-height: 1.55; }
.guild-theme .consistency-breakdown {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  padding-left: 1.35rem;
}
.guild-theme .consistency-breakdown::before { content: ""; position: absolute; top: .65rem; bottom: .65rem; left: .36rem; border-left: 1px dashed rgba(255,220,141,.28); }
.guild-theme .consistency-breakdown article {
  --stat-accent: #efb944;
  position: relative;
  min-width: 0;
  display: grid;
  gap: .38rem;
  padding: .58rem 0 .68rem .35rem;
  color: #f7e5be;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: inset 0 -1px rgba(255,255,255,.055);
}
.guild-theme .consistency-breakdown article:last-child { box-shadow: none; }
.guild-theme .consistency-breakdown article::before { content: ""; position: absolute; top: 1.05rem; left: -1.29rem; width: 9px; height: 9px; border: 2px solid #2b180f; border-radius: 50%; background: var(--stat-accent); box-shadow: 0 0 0 2px rgba(255,255,255,.08); }
.guild-theme .consistency-stat.logging { --stat-accent: #e5bd55; }
.guild-theme .consistency-stat.nutrition { --stat-accent: #6fcdb6; }
.guild-theme .consistency-stat.training { --stat-accent: #d8a3e8; }
.guild-theme .consistency-stat.recovery { --stat-accent: #85add9; }
.guild-theme .consistency-stat-heading,
.guild-theme .consistency-stat-detail { display: flex; align-items: end; justify-content: space-between; gap: .75rem; }
.guild-theme .adventurer-ledger .consistency-stat-heading strong { display: block; color: #f8e7c0; font: 650 .88rem/1.2 var(--font-body); }
.guild-theme .adventurer-ledger .consistency-stat-heading > b { color: var(--stat-accent); font: 700 1rem/1 var(--font-body); }
.guild-theme .adventurer-ledger .consistency-stat-eyebrow { display: block; margin-bottom: .08rem; color: #ae9875; font-size: .52rem; font-weight: 700; letter-spacing: .1em; }
.guild-theme .consistency-track { height: 6px; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,.075); }
.guild-theme .consistency-track-fill { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg,color-mix(in srgb,var(--stat-accent) 72%,#fff),var(--stat-accent)); }
.guild-theme .adventurer-ledger .consistency-stat-detail small { color: #bda786; font-size: .62rem; line-height: 1.35; }
.guild-theme .adventurer-ledger .consistency-stat-detail em { flex: 0 0 auto; color: #d8c29a; font-size: .58rem; font-style: normal; }
.guild-theme .adventurer-ledger .coverage-card {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: .55rem;
  padding: 1.2rem;
  color: var(--guild-ink);
  border: 0;
  border-radius: 8px 22px 22px 22px;
  background: linear-gradient(135deg,rgba(255,255,255,.42),transparent 34%),var(--guild-parchment-light);
  box-shadow: var(--guild-paper-shadow);
}
.guild-theme .adventurer-ledger .coverage-card > span { color: #80531f; font-size: .68rem; font-weight: 700; }
.guild-theme .adventurer-ledger .coverage-card strong { color: #432e1e; font: 700 1.35rem/1.1 var(--font-display); }
.guild-theme .coverage-progress { height: 8px; overflow: hidden; border-radius: 999px; background: rgba(84,52,24,.12); }
.guild-theme .coverage-progress span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#b97824,#e9b74a); }
.guild-theme .adventurer-ledger .coverage-card p { margin: .1rem 0; color: #60452d; font-size: .72rem; line-height: 1.45; }
.guild-theme .ledger-action { width: 100%; min-height: 44px; padding: .65rem .8rem; color: #3c260f; border: 1px solid #a66b1f; border-radius: 10px; background: linear-gradient(180deg,#ffdc79,#e8a92f); box-shadow: inset 0 1px #fff0b0,0 5px 12px rgba(80,43,8,.16); font-weight: 700; }
.guild-theme .ledger-action:hover { transform: translateY(-1px); background: linear-gradient(180deg,#ffe596,#efb43c); }
.guild-theme .adventurer-ledger .coverage-card > small { color: #765f48; font-size: .61rem; line-height: 1.45; }

/* Insights chapters use quieter outlines than the interactive quest boards. */
.guild-theme #progress-panel .chart-card,
.guild-theme #progress-panel .progress-insight,
.guild-theme #progress-panel .level-panel,
.guild-theme #progress-panel .stat-grid,
.guild-theme #progress-panel .badge-zone { border-width: 1px; border-color: rgba(137,88,38,.45); border-radius: 24px 24px 24px 9px; box-shadow: 0 14px 34px rgba(5,2,1,.25),inset 0 1px rgba(255,228,171,.07); }
.guild-theme #progress-panel :is(.chart-card,.progress-insight,.badge-zone)::before { display: none; }
.guild-theme #progress-panel .charts-grid { gap: 1.1rem; margin-top: 1.1rem; }
.guild-theme #progress-panel .chart-card { padding: clamp(1.1rem,2.5vw,1.55rem); }
.guild-theme .chart-card > div > p { color: var(--guild-gold-light); }
.guild-theme .chart-card > div > h3 { margin-top: .3rem; color: #fff0c7; font: 600 1.12rem/1.3 var(--font-body); }
.guild-theme .chart-card > div > small { color: #cbb590; }
.guild-theme #progress-panel .metric-chart { border: 0; border-radius: 16px 16px 16px 6px; box-shadow: var(--guild-paper-shadow); }
.guild-theme .metric-chart-heading strong { color: var(--guild-ink); }
.guild-theme .metric-chart-heading span,
.guild-theme .chart-axis { color: var(--guild-muted); }
.guild-theme .weekly-review { color: var(--guild-muted); background: var(--guild-parchment); }
.guild-theme .level-orbit { border-color: var(--guild-gold); background: radial-gradient(circle,#6a411d,#24130c 70%); }
.guild-theme .level-copy p,
.guild-theme .level-copy h2,
.guild-theme .level-copy small { color: #f7e4bb; }
.guild-theme .stat small { color: var(--guild-muted); }
.guild-theme .stat strong { color: #7d5119; }
.guild-theme .badge { opacity: .62; }
.guild-theme .badge.unlocked { opacity: 1; border-color: #a27639; background: var(--guild-parchment-light); }
.guild-theme .mental-card p { color: var(--guild-muted); }
.guild-theme .mental-card > span:first-child { border: 1px solid #9f733a; background: rgba(113,73,31,.13); }

/* Character sheet, settings, and companion codex */
.guild-theme .character-sheet {
  color: #f6e4bd;
  background:
    radial-gradient(circle at 50% 18%,rgba(239,185,68,.12),transparent 30%),
    repeating-linear-gradient(90deg,#2c1910 0 90px,#382015 90px 180px);
}
.guild-theme .character-sheet h2 { color: #ffe18a; }
.guild-theme .character-sheet > p,
.guild-theme .character-class,
.guild-theme .character-note { color: #d3bc94; }
.guild-theme .character-level strong,
.guild-theme .character-xp strong { color: #ffe18a; }
.guild-theme .attribute-grid article { background: rgba(9,4,2,.28); }
.guild-theme .character-radar-wrap { border-color: #78502c; background: rgba(12,6,4,.3); }
.guild-theme .profile-settings-card,
.guild-theme .quest-settings-card,
.guild-theme .data-vault {
  border: 8px solid #4a2a18;
  border-radius: 10px 10px 16px 16px;
  box-shadow: var(--guild-board-shadow);
}
.guild-theme .profile-card-heading h2,
.guild-theme .profile-card-heading h3 { color: var(--guild-ink); }
.guild-theme .profile-card-heading p { color: #986019; }
.guild-theme .profile-card-heading small { color: var(--guild-muted); }
.guild-theme .profile-card-heading > span { border-color: #a57d47; background: rgba(120,75,28,.1); }
.guild-theme .danger-zone { border-color: rgba(126,53,43,.25); }
.guild-theme .danger-zone span { color: var(--guild-muted); }
.guild-theme .danger-action { color: #fff0df; border-color: #723129; background: linear-gradient(180deg,#a74e40,#743028); text-shadow: none; }
.guild-theme .program-row strong,
.guild-theme .history-row strong { color: var(--guild-ink); }
.guild-theme .program-row small,
.guild-theme .history-row small { color: var(--guild-muted); }
.guild-theme .people-directory-hero {
  border-color: #a56a22;
  background: linear-gradient(180deg,#f9dda0,#dca243);
  box-shadow: var(--guild-paper-shadow);
}
.guild-theme .people-directory-hero p { color: var(--guild-ink); margin-bottom: 0.5rem; opacity: 0.8; }
.guild-theme .people-directory-hero h2,
.guild-theme .people-directory-hero small { color: var(--guild-ink); }
.guild-theme .people-lock { border-color: #85541f; background: rgba(75,42,14,.16); }
.guild-theme .people-privacy { color: var(--guild-muted); border-color: #b98e50; background: var(--guild-parchment); }
.guild-theme .people-privacy strong { color: #7c501a; }
.guild-theme .person-card {
  position: relative;
  padding-right: 2.2rem;
  background: var(--guild-parchment);
  border: 1px solid #d4b48f;
  box-shadow: 0 4px 12px rgba(99, 61, 23, 0.12);
}
.guild-theme .person-card h3 { color: #351d0d !important; font-weight: 800; }
.guild-theme .person-card p { color: #6b4d32; }
.guild-theme .people-search { color: #5d432b; }
.guild-theme .chip-category {
  background: #ecd4b3;
  border: 1px solid #d4b48f;
}
.guild-theme .chip-category summary { color: #5d3615; font-weight: 800; }
.guild-theme .people-status-tabs { border-color: rgba(91,55,22,.2); }
.guild-theme .status-tab { color: var(--guild-muted); }
.guild-theme .status-tab:hover { color: var(--guild-ink); background: rgba(120,76,29,.1); }
.guild-theme .status-tab.active { color: #482b11; background: #e5b65d; }
.guild-theme .status-tab.tab-birthday { color: #d67a33 !important; }
.guild-theme .people-category-header { color: var(--guild-muted); border-color: rgba(91,55,22,.2); }

/* Editable quest ownership */
.guild-theme .quest-manager {
  margin-top: 1rem;
  padding: 1.1rem;
  color: var(--guild-ink);
  border: 2px solid #8d632f;
  border-radius: 12px;
  background: linear-gradient(135deg,rgba(255,255,255,.35),transparent 38%),var(--guild-parchment-light);
  box-shadow: var(--guild-paper-shadow);
}
.guild-theme .quest-manager-heading,
.guild-theme .quest-template-list-heading,
.guild-theme .weekly-rules-form > div { display: flex; flex-direction: column; gap: .15rem; }
.guild-theme .quest-manager-heading { flex-direction: row; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.guild-theme .quest-manager-heading p,
.guild-theme .weekly-rules-form p { margin: 0; color: #986019; font-size: .7rem; font-weight: 800; letter-spacing: .08em; }
.guild-theme .quest-manager-heading h3,
.guild-theme .weekly-rules-form h4 { margin: 0; color: var(--guild-ink); }
.guild-theme .quest-manager-heading span,
.guild-theme .quest-template-list-heading span,
.guild-theme .weekly-rules-form > div > span { color: var(--guild-muted); font-size: .78rem; }
.guild-theme .quest-manager-layout { display: grid; grid-template-columns: minmax(280px,.9fr) minmax(0,1.1fr); gap: 1rem; margin-top: 1rem; }
.guild-theme .quest-form,
.guild-theme .weekly-rules-form { padding: .9rem; border: 1px solid rgba(92,57,21,.28); border-radius: 10px; background: rgba(255,250,230,.42); }
.guild-theme .quest-form { display: grid; gap: .7rem; align-content: start; }
.guild-theme .quest-form label,
.guild-theme .weekly-rules-form label { display: grid; gap: .3rem; color: #5d432b; font-size: .76rem; font-weight: 700; }
.guild-theme .quest-form input,
.guild-theme .quest-form select,
.guild-theme .weekly-rules-form input { color: var(--guild-ink); border-color: #b88b4a; background: #fff8e3; }
.guild-theme .quest-form label small { color: var(--guild-muted); font-weight: 500; }
.guild-theme .quest-template-list-heading { margin-bottom: .55rem; }
.guild-theme .quest-template-list { display: grid; gap: .45rem; }
.guild-theme .quest-template-row { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: .65rem; padding: .65rem; border: 1px solid rgba(92,57,21,.22); border-radius: 9px; background: rgba(255,248,224,.58); }
.guild-theme .quest-tier-main { border-left: 4px solid #d3832b !important; }
.guild-theme .quest-tier-side { border-left: 4px solid rgba(144, 114, 82, 0.2) !important; }
.guild-theme .quest-template-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: rgba(120,76,29,.12); }
.guild-theme .quest-template-copy { display: grid; gap: .1rem; min-width: 0; }
.guild-theme .quest-template-copy strong { color: var(--guild-ink); }
.guild-theme .quest-template-copy small { overflow-wrap: anywhere; color: var(--guild-muted); }
.guild-theme .quest-template-row .row-actions { display: flex; gap: .35rem; }
.guild-theme .quest-template-row .row-actions button { min-height: 44px; padding: .45rem .65rem; }
.guild-theme .weekly-rules-form { display: grid; grid-template-columns: minmax(220px,1.4fr) repeat(4,minmax(115px,.7fr)) auto; align-items: end; gap: .7rem; margin-top: 1rem; }
.guild-theme .quest-board-tools .quest-manager-toggle { min-height: 44px; padding: .45rem .65rem; color: #f6d889; border-color: rgba(246,216,137,.4); }
.guild-theme .quest-group-heading .quest-manager-toggle { min-height: 44px; padding-block: .45rem; }
.guild-theme .quest-manager-heading .text-action { min-width: 44px; min-height: 44px; }
.guild-theme .side-quest-board .quest-manager-toggle { color: #f1d3ff; border-color: rgba(241,211,255,.36); }

.guild-theme .source-edit-tools { display: flex; align-items: center; gap: .75rem; }
.guild-theme .source-edit-action { min-height: 44px; padding: .45rem .7rem; border: 1px solid rgba(143,91,34,.2); border-radius: 10px; color: var(--guild-ink); background: rgba(255,250,226,.48); }
.guild-theme .workout-hub,
.guild-theme .workout-history-zone { margin-bottom: 1rem; padding: clamp(1.15rem,3vw,2rem); border: 1px solid rgba(117,77,34,.28); border-radius: 22px; background: linear-gradient(160deg,rgba(255,250,226,.86),rgba(227,205,158,.77)); box-shadow: var(--guild-paper-shadow); }
.guild-theme .workout-lanes { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .85rem; margin-top: 1rem; }
.guild-theme .workout-lanes button { min-width: 0; min-height: 148px; display: grid; grid-template-columns: auto 1fr auto; grid-template-rows: auto auto; gap: .28rem .7rem; align-items: center; padding: 1.05rem; border: 1px solid rgba(108,68,28,.22); border-radius: 20px 20px 8px 20px; text-align: left; color: var(--guild-ink); background: radial-gradient(circle at 15% 15%,rgba(220,171,65,.14),transparent 34%),rgba(255,250,226,.72); box-shadow: inset 0 1px rgba(255,255,255,.58),0 10px 22px rgba(77,45,18,.09); }
.guild-theme .workout-lanes button > span { grid-row: 1 / span 2; font-size: 2rem; }
.guild-theme .workout-lanes button > strong { align-self: end; color: var(--guild-ink); font: 700 1.02rem/1.2 var(--font-body); }
.guild-theme .workout-lanes button > small { align-self: start; color: var(--guild-muted); font-size: .7rem; line-height: 1.45; }
.guild-theme .workout-lanes button > i { grid-column: 3; grid-row: 1 / span 2; color: var(--guild-gold-deep); font-size: 1.2rem; font-style: normal; }
.guild-theme .workout-lanes button:hover { transform: translateY(-2px); border-color: rgba(143,91,34,.38); }
.guild-theme .workout-hub .section-heading h2,
.guild-theme .workout-history-zone .section-heading h2 { color: var(--guild-ink); }
.guild-theme .workout-hub .section-heading p,
.guild-theme .workout-history-zone .section-heading p { color: var(--guild-gold-deep); }
.guild-theme .workout-hub .section-heading small,
.guild-theme .workout-history-zone .section-heading small { color: var(--guild-muted); }
.guild-theme .loadout-zone { margin-bottom: 1rem; }
.guild-theme .program-form-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: .55rem; align-items: center; }
.guild-theme .workout-history-zone .timeline-list { margin-top: .9rem; }
.guild-theme .habit-form #habit-cancel-edit { align-self: end; }

/* Toast and footer integration */
.guild-theme .app-status { color: #fff0c7; border-color: #9d6428; background: #2b170e; }
body.guild-theme footer {
  color: #d7c19b;
  border-top-color: #71431f;
  background:
    linear-gradient(180deg,rgba(255,222,157,.04),transparent 28%),
    repeating-linear-gradient(90deg,#1b0e09 0 150px,#24130c 150px 300px);
  box-shadow: inset 0 2px 0 rgba(255,213,128,.05), 0 -16px 38px rgba(8,3,1,.22);
}
body.guild-theme footer :is(h2,h3,h4,strong) { color: var(--guild-gold-light); }
body.guild-theme footer a { color: #d7c19b; }
body.guild-theme footer a:hover,
body.guild-theme footer a:focus-visible { color: var(--guild-gold-light); }

@media (max-width: 900px) {
  .guild-theme .health-hero { margin-top: 1rem; padding-top: 4.6rem; }
  .guild-theme .guild-board-crown { max-width: 82%; }
  .guild-theme .main-quest-board,
  .guild-theme .side-quest-board { padding: 1rem; }
  .guild-theme .quest-manager-layout,
  .guild-theme .weekly-rules-form { grid-template-columns: 1fr 1fr; }
  .guild-theme .weekly-rules-form > div,
  .guild-theme .weekly-rules-form > button { grid-column: 1 / -1; }
  .guild-theme .workout-lanes { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .guild-theme { background: repeating-linear-gradient(0deg,#22120c 0 88px,#190d08 88px 93px); }
  .guild-theme .health-shell { padding-inline: .7rem; }
  .guild-theme .health-hero { padding: 4.4rem 1.1rem 1.35rem; border-width: 7px; }
  .guild-hall-banner { top: -22px; width: 88%; min-height: 52px; padding-inline: 1.5rem; font-size: .67rem; letter-spacing: .04em; }
  .guild-theme .health-hero::before { width: 42px; height: 42px; right: 14px; bottom: 12px; }
  .guild-theme .health-tabs { border-width: 1px; }
  .guild-theme :is(
    .today-cockpit:not(.sync-panel), .daily-adventure, .quick-action-zone,
    .today-timeline-zone, .quest-zone, .life-today-zone, .calendar-zone,
    .day-detail, .recent-history-zone, .quick-log-hub, .insight-overview,
    .chart-card, .progress-insight, .badge-zone, .mental-hub, .habit-hub,
    .program-zone, .people-hub, .workout-hub, .workout-history-zone
  ) { border-width: 6px; padding: 1rem; }
  .guild-theme .today-cockpit .macro-grid { gap: .4rem; }
  .guild-theme .today-cockpit .macro-card { border: 1px solid #b98e50; }
  .guild-theme .guild-board-crown { max-width: 96%; margin-top: -.8rem; padding: .6rem 1rem .72rem; }
  .guild-theme .quest { min-height: 144px; padding-bottom: 3.45rem; }
  .guild-theme button.quest::after { right: 8%; left: 8%; }
  .guild-theme .profile-settings-card,
  .guild-theme .quest-settings-card,
  .guild-theme .data-vault { border-width: 6px; }
  .guild-theme .routine-heading-tools { width: 100%; align-items: stretch; }
  .guild-theme .routine-manager { grid-template-columns: 1fr; }
  .guild-theme .routine-item-actions button { min-height: 44px; }
  .guild-theme .quest-manager-layout,
  .guild-theme .weekly-rules-form { grid-template-columns: 1fr; }
  .guild-theme .quest-manager-heading { flex-direction: column; }
  .guild-theme .quest-manager-heading > button { align-self: flex-end; }
  .guild-theme .quest-template-row { grid-template-columns: auto minmax(0,1fr); }
  .guild-theme .quest-template-row .row-actions { grid-column: 1 / -1; justify-content: flex-end; }
  .guild-theme .quest-board-tools { align-items: flex-end; }
  .guild-theme .source-edit-tools { width: 100%; justify-content: space-between; }
  .guild-theme .workout-lanes button { min-height: 108px; }
  .guild-theme .main-quest-board { overflow: hidden; }
  .guild-theme .main-quest-board .quest-board-header { align-items: flex-end; }
  .guild-theme .quest-scroll-cue {
    display: inline-flex;
    align-items: center;
    color: #f1c96f;
    font-size: .66rem;
    font-weight: 700;
    letter-spacing: .03em;
    white-space: nowrap;
  }
  .guild-theme .main-quest-board .quest-list {
    display: grid;
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: minmax(260px,84%);
    gap: .75rem;
    overflow-x: auto;
    margin-inline: -.85rem;
    padding: .2rem .85rem 1rem;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: .85rem;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
    touch-action: pan-x;
  }
  .guild-theme .main-quest-board .quest-list::-webkit-scrollbar { display: none; }
  .guild-theme .main-quest-board .quest {
    height: 100%;
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }
}

@media (prefers-contrast: more) {
  .guild-theme :is(.macro-card,.decision-card,.routine-step,.daily-checklist,.quick-actions button,.quest,.habit-card,.calendar-day) {
    background: #fff1cf;
    border-color: #70481f;
  }
}
. g u i l d - t h e m e   . q u e s t - h i s t o r y - d o t . p a s s e d   {   b a c k g r o u n d :   # 4 c a f 5 0 ;   } 
 
 . g u i l d - t h e m e   . q u e s t - h i s t o r y - d o t . f a i l e d   {   b a c k g r o u n d :   r g b a ( 1 0 8 ,   6 8 ,   2 8 ,   0 . 2 ) ;   } 
 
 

.guild-theme .quest-history-dot.passed { background: #4caf50; }
.guild-theme .quest-history-dot.failed { background: rgba(108, 68, 28, 0.2); }

.guild-theme .quest-history-dot.passed { background: #4caf50; }
.guild-theme .quest-history-dot.failed { background: rgba(108, 68, 28, 0.2); }

.guild-theme .detail-subquest-item.done { background: rgba(247, 197, 72, 0.1); border-color: rgba(247, 197, 72, 0.3); color: #c99337; }

.guild-theme .quest-tier-heading { color: var(--guild-ink); }

.guild-theme .advanced-fields,
.guild-theme .photo-intake-disclosure,
.guild-theme .device-intake {
    background: rgba(67, 46, 30, 0.05);
    border: 1px solid rgba(67, 46, 30, 0.15);
}



.guild-theme .starter-exercise {
    background: rgba(138, 90, 68, 0.08);
    border: 1px solid rgba(138, 90, 68, 0.2);
}
.guild-theme .starter-exercise-copy strong { color: var(--guild-ink); }
.guild-theme .starter-exercise-copy span { color: var(--guild-red); }
.guild-theme .starter-exercise-copy small { color: rgba(60, 42, 33, 0.6); }

.guild-theme details.advanced-fields > summary {
    color: #3c2a21 !important;
    font-weight: 800 !important;
    background: rgba(138, 90, 68, 0.1);
    padding: 10px;
    border-radius: 8px;
    border: 1px solid rgba(138, 90, 68, 0.3);
}

/* GUARANTEE READABILITY IN EXERCISE ROWS FOR GUILD THEME */






.guild-theme .program-zone .advanced-fields > summary {
    color: #f2deb5 !important;
    font-weight: 800 !important;
    background: rgba(255, 255, 255, 0.05) !important;
    padding: 10px !important;
    border-radius: 8px !important;
    border: 1px solid rgba(242, 222, 181, 0.3) !important;
}


.guild-theme .program-zone .advanced-fields > summary {
    color: #f2deb5 !important;
    font-weight: 800 !important;
    background: rgba(255, 255, 255, 0.05) !important;
    padding: 10px !important;
    border-radius: 8px !important;
    border: 1px solid rgba(242, 222, 181, 0.3) !important;
}

.guild-theme .log-form-surface .text-action {
    color: #8c5730 !important;
    font-weight: 700 !important;
}
.guild-theme .log-form-surface .text-action:hover {
    color: #a63a29 !important;
}
.guild-theme .program-zone .text-action {
    color: #f2deb5 !important;
    font-weight: 700 !important;
}
.guild-theme .program-zone .text-action:hover {
    color: #fff !important;
}

.guild-theme .log-form-surface input::placeholder,
.guild-theme .log-form-surface textarea::placeholder {
    color: rgba(93, 67, 43, 0.5) !important;
}
.guild-theme .program-zone input::placeholder,
.guild-theme .program-zone textarea::placeholder {
    color: rgba(242, 222, 181, 0.4) !important;
}

/* Proper fix for Advanced Fields */
.guild-theme .log-form-surface .advanced-fields {
    background: rgba(138, 90, 68, 0.05) !important;
    border: 1px solid rgba(138, 90, 68, 0.2) !important;
}
.guild-theme .log-form-surface .advanced-fields > summary {
    color: #3c2a21 !important;
    font-weight: 800 !important;
    padding: 5px 0;
}
.guild-theme .program-zone .advanced-fields {
    background: rgba(255, 255, 255, 0.02) !important;
    border: 1px solid rgba(242, 222, 181, 0.15) !important;
}
.guild-theme .program-zone .advanced-fields > summary {
    color: #f2deb5 !important;
    font-weight: 800 !important;
    padding: 5px 0;
}

/* Exercise Row - Light Context (Workout Modal) */
.guild-theme .log-form-surface .exercise-row {
    background: rgba(138, 90, 68, 0.04);
    border: 1px solid rgba(138, 90, 68, 0.2);
    border-radius: 11px;
}
.guild-theme .log-form-surface .exercise-row label {
    color: #3c2a21 !important;
    font-weight: 700 !important;
}
.guild-theme .log-form-surface .exercise-row input {
    background: #fff;
    color: #2b1810;
    border: 1px solid rgba(138, 90, 68, 0.3);
}
.guild-theme .log-form-surface .exercise-remove {
    color: #b22222 !important;
    background: rgba(178, 34, 34, 0.08) !important;
    border: 1px solid rgba(178, 34, 34, 0.2) !important;
    font-weight: 700;
}
.guild-theme .log-form-surface .exercise-advanced-summary {
    color: #8a5a44 !important;
    font-weight: 600;
}

/* Exercise Row - Dark Context (Program Zone / Weekly Loadout) */
.guild-theme .program-zone .exercise-row {
    background:
        linear-gradient(135deg,rgba(255,255,255,.38),transparent 34%),
        repeating-linear-gradient(0deg,transparent 0 4px,rgba(107,66,25,.022) 4px 5px),
        var(--guild-parchment);
    border: 1px solid #b98e50;
    border-radius: 11px;
    box-shadow: var(--guild-paper-shadow);
}
.guild-theme .program-zone .exercise-row label {
    color: #3c2a21 !important;
    font-weight: 700 !important;
}
.guild-theme .program-zone .exercise-row input {
    background: rgba(255, 255, 255, 0.6) !important;
    color: #2b1810 !important;
    border: 1px solid rgba(138, 90, 68, 0.3) !important;
}
.guild-theme .program-zone .exercise-row input:focus {
    background: #fff !important;
    border-color: #8a5a44 !important;
    box-shadow: 0 0 0 2px rgba(138, 90, 68, 0.2) !important;
}
.guild-theme .program-zone .exercise-remove {
    color: #b22222 !important;
    background: rgba(178, 34, 34, 0.08) !important;
    border: 1px solid rgba(178, 34, 34, 0.2) !important;
    font-weight: 700;
}
.guild-theme .program-zone .exercise-advanced-summary {
    color: #8a5a44 !important;
    font-weight: 700;
}

/* Health V4.3 — daily flow, universal intake and personal care */
.guild-theme .health-label { color: #7b4a12; }
.guild-theme .privacy-note span { color: #593e28; }
.guild-theme .privacy-note span strong { color: #593e28; }
.guild-theme .routine-step em { color: #78450d; }
.guild-theme .quick-actions button i { color: #70400d; }

.guild-theme .today-journal-action {
  width: 100%; min-height: 72px; margin-top: 1rem; padding: .9rem 1rem;
  display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: .85rem; align-items: center;
  color: #402913; text-align: left; border: 2px solid #a96c24; border-radius: 12px;
  background: linear-gradient(135deg,#fff0c9,#eecb88); box-shadow: var(--guild-paper-shadow);
}
.guild-theme .today-journal-action > span:first-child { font-size: 1.8rem; }
.guild-theme .today-journal-action > span:nth-child(2) { display: grid; gap: .15rem; }
.guild-theme .today-journal-action strong { font: 600 1.05rem var(--font-display); }
.guild-theme .today-journal-action small { color: #65482e; }
.guild-theme .today-journal-action i { color: #74430e; font-style: normal; font-weight: 700; }
.guild-theme .today-journal-action.done { border-color: #477157; background: linear-gradient(135deg,#eff2d7,#c9d39c); }
.guild-theme .today-journal-composer { margin-top: .7rem; padding: 1rem; display: grid; gap: .85rem; color: #432e1e; border: 1px solid #b98e50; border-radius: 8px 8px 16px 16px; background: var(--guild-parchment); box-shadow: var(--guild-paper-shadow); }
.guild-theme .today-journal-composer[hidden] { display: none; }
.guild-theme .today-journal-composer-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.guild-theme .today-journal-composer-heading > div { display: grid; gap: .08rem; }
.guild-theme .today-journal-composer-heading p { color: #7b4a12; font-size: .68rem; font-weight: 800; letter-spacing: .1em; }
.guild-theme .today-journal-composer-heading h3 { margin: 0; color: #3b281a; }
.guild-theme .today-journal-composer-heading small { color: #65482e; }
.guild-theme #today-journal-close { min-width: 44px; min-height: 44px; color: #5b3614; border-color: #9d7545; }
.guild-theme #today-journal-form-host .mental-form { margin: 0; }
.guild-theme #today-journal-form-host .mental-form > label { color: #593e28; }

.guild-theme .universal-intake {
  margin: 1rem 0 1.25rem; padding: .9rem; display: grid; grid-template-columns: minmax(220px,1fr) repeat(3,minmax(160px,.7fr)); gap: .75rem;
  border: 1px solid #ad7b3f; border-radius: 12px; color: #432e1e; background: rgba(255,240,203,.82);
}
.guild-theme .universal-intake > div { display: grid; gap: .2rem; align-content: center; }
.guild-theme .universal-intake > div span { color: #65482e; font-size: .78rem; }
.guild-theme .universal-intake-action { min-height: 58px; padding: .65rem; display: grid; grid-template-columns: auto 1fr; gap: .15rem .55rem; text-align: left; color: #432e1e; border: 1px solid #b98e50; border-radius: 9px; background: #f4dfb2; }
.guild-theme .universal-intake-action > span { grid-row: 1 / 3; align-self: center; font-size: 1.35rem; }
.guild-theme .universal-intake-action small { color: #65482e; }

.guild-theme :is(.workout-preset-zone,.history-day-zone,.care-hero,.care-shelf,.grooming-playbook) {
  position: relative; margin-bottom: 1rem; padding: clamp(1.2rem,3vw,2rem); color: #f8e7c0;
  border: 8px solid #4a2a18; border-radius: 12px 12px 18px 18px;
  background: linear-gradient(180deg,rgba(255,225,161,.05),transparent 22%), repeating-linear-gradient(90deg,#372016 0 140px,#402519 140px 280px);
  box-shadow: var(--guild-board-shadow), 0 0 0 2px #1d0e08;
}
.guild-theme :is(.workout-preset-zone,.history-day-zone,.care-hero,.care-shelf,.grooming-playbook) .section-heading h2 { color: #fff0c7; }
.guild-theme :is(.workout-preset-zone,.history-day-zone,.care-hero,.care-shelf,.grooming-playbook) .section-heading p { color: #ffd979; }
.guild-theme :is(.workout-preset-zone,.history-day-zone,.care-hero,.care-shelf,.grooming-playbook) .section-heading small { color: #d8c19d; }

.guild-theme .workout-presets,
.guild-theme .history-day-strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(210px,1fr); gap: .75rem; overflow-x: auto; padding: .15rem .1rem .65rem; scroll-snap-type: x mandatory; }
.guild-theme .workout-preset-card,
.guild-theme .history-day-card { min-height: 118px; padding: .85rem; display: grid; gap: .25rem; align-content: start; color: #432e1e; text-align: left; border: 1px solid #b98e50; border-radius: 10px; background: var(--guild-parchment); box-shadow: var(--guild-paper-shadow); scroll-snap-align: start; }
.guild-theme .workout-preset-icon { font-size: 1.5rem; }
.guild-theme .workout-preset-card small,
.guild-theme .history-day-card small { color: #65482e; }
.guild-theme .workout-preset-card i { margin-top: auto; color: #74430e; font-style: normal; font-size: .78rem; font-weight: 700; }
.guild-theme .history-day-card.selected { outline: 3px solid #efb944; outline-offset: 1px; }
.guild-theme .history-day-date { color: #74430e; font-size: .72rem; font-weight: 700; }

.guild-theme .detail-task-section { margin: 0 0 1rem; padding: 1rem; color: #f7e5bd; border: 1px solid rgba(239,185,68,.35); border-radius: 12px; background: rgba(17,9,6,.28); }
.guild-theme .detail-task-heading { display: flex; justify-content: space-between; gap: 1rem; align-items: end; margin-bottom: .75rem; }
.guild-theme .detail-task-heading p { margin: 0; color: #ffd979; font-size: .68rem; font-weight: 700; letter-spacing: .08em; }
.guild-theme .detail-task-heading h3 { margin: .1rem 0 0; color: #fff0c7; }
.guild-theme .detail-task-heading > span { color: #d8c19d; font-size: .72rem; }
.guild-theme .detail-task-list { display: grid; gap: .45rem; }
.guild-theme .detail-task-row { min-height: 48px; padding: .35rem .45rem; display: grid; grid-template-columns: 36px minmax(0,1fr) auto 40px; gap: .35rem; align-items: center; border: 1px solid rgba(255,217,121,.22); border-radius: 8px; background: rgba(255,255,255,.05); }
.guild-theme .detail-task-row input { width: 22px; height: 22px; accent-color: #efb944; }
.guild-theme .detail-task-row.done .detail-task-copy { opacity: .68; text-decoration: line-through; }
.guild-theme .detail-task-edit,
.guild-theme .detail-task-remove { min-width: 44px; min-height: 44px; color: #f7e5bd; border: 1px solid rgba(255,217,121,.28); border-radius: 7px; background: rgba(255,255,255,.06); }
.guild-theme .detail-task-remove { color: #ffd1c9; }
.guild-theme .detail-task-empty { color: #d8c19d; }
.guild-theme .detail-task-form { margin-top: .65rem; display: grid; grid-template-columns: minmax(0,1fr) auto auto; gap: .45rem; }
.guild-theme .detail-task-form input { min-height: 46px; }

.guild-theme .care-layout { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1rem; }
.guild-theme .care-form { margin-bottom: 1rem; padding: 1rem; display: grid; gap: .8rem; color: #432e1e; border: 1px solid #b98e50; border-radius: 12px; background: var(--guild-parchment); box-shadow: var(--guild-paper-shadow); }
.guild-theme .care-form label { display: grid; gap: .35rem; color: #593e28; font-weight: 700; }
.guild-theme .care-form :is(input,select,textarea) { width: 100%; min-height: 46px; color: #2f2116; border: 1px solid #9d7545; border-radius: 8px; background: #fff8e5; }
.guild-theme .care-form textarea { min-height: 82px; resize: vertical; }
.guild-theme .care-image-field { position: relative; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: .55rem; align-items: start; }
.guild-theme .care-image-input { position: absolute; width: 1px !important; height: 1px; min-height: 0 !important; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.guild-theme .care-image-picker { grid-column: 1 / -1; min-height: 58px; padding: .7rem .8rem; display: flex; grid-template: none; align-items: center; gap: .65rem; cursor: pointer; color: #4a311d; border: 1px dashed #986e3b; border-radius: 10px; background: #f7e8c0; }
.guild-theme .care-image-picker > span:last-child { display: grid; gap: .08rem; }
.guild-theme .care-image-picker > span:first-child { font-size: 1.35rem; }
.guild-theme .care-image-picker small { color: #65482e; font-weight: 500; }
.guild-theme .care-image-picker.is-processing { opacity: .65; pointer-events: none; }
.guild-theme .care-image-input:focus-visible + .care-image-picker { outline: 3px solid #9a5918; outline-offset: 2px; }
.guild-theme .care-image-preview { min-height: 112px; display: grid; place-items: center; overflow: hidden; color: #765638; border: 1px solid #c7a56f; border-radius: 10px; background: rgba(255,248,229,.65); }
.guild-theme .care-image-preview img { width: 100%; max-height: 240px; object-fit: contain; background: #2d2119; }
.guild-theme .care-image-remove { min-width: 72px; min-height: 44px; color: #69251e; border-color: #9b4b42; background: #f3d8c9; }
.guild-theme .care-image-note { grid-column: 1 / -1; color: #65482e; line-height: 1.45; }
.guild-theme .care-card-list { display: grid; gap: .75rem; }
.guild-theme .care-card { padding: 1rem; display: grid; gap: .75rem; color: #432e1e; border: 1px solid #b98e50; border-radius: 10px; background: var(--guild-parchment); box-shadow: var(--guild-paper-shadow); }
.guild-theme .care-card-media { margin: -1rem -1rem 0; overflow: hidden; aspect-ratio: 16 / 10; border-radius: 9px 9px 0 0; background: #2d2119; }
.guild-theme .care-card-media img { width: 100%; height: 100%; display: block; object-fit: cover; }
.guild-theme .care-card.used { border-color: #477157; background: #e6dfb4; }
.guild-theme .care-card-heading { display: grid; grid-template-columns: auto minmax(0,1fr); gap: .65rem; align-items: center; }
.guild-theme .care-card-heading > div { display: grid; gap: .08rem; }
.guild-theme .care-card-heading h3 { margin: 0; color: #3b281a; }
.guild-theme .care-card-heading small { color: #74430e; font-weight: 700; }
.guild-theme .care-card-icon { font-size: 1.55rem; }
.guild-theme .care-card-details { display: grid; gap: .35rem; }
.guild-theme .care-card-details :is(p,small) { margin: 0; color: #593e28; white-space: pre-wrap; }
.guild-theme .care-card-actions { display: flex; flex-wrap: wrap; gap: .45rem; }
.guild-theme .care-card-actions button { min-height: 44px; }
.guild-theme .care-use-toggle { color: #284333; border: 1px solid #477157; border-radius: 8px; background: #dce7c9; font-weight: 700; }
.guild-theme .care-card-actions .text-action { color: #56391d !important; border: 1px solid #9d7545; border-radius: 8px; background: #f6e6bd; font-weight: 700; }
.guild-theme .care-card-actions .danger-row-action { color: #fff5ed !important; border: 1px solid #5e1813; border-radius: 8px; background: #7b251e; font-weight: 700; }
.guild-theme .care-form :is(input,textarea)::placeholder { color: #65482e; opacity: 1; }

/* Save station: one dominant capture journey, then quiet destination routes. */
.guild-theme .capture-station {
  overflow: hidden;
  padding: clamp(1.15rem,3vw,2rem);
  border-width: 6px;
  background:
    radial-gradient(circle at 90% 0,rgba(255,201,92,.12),transparent 30%),
    repeating-linear-gradient(90deg,#2e1b12 0 150px,#372015 150px 300px);
}
.guild-theme .capture-station-heading { align-items: end; margin-bottom: 1rem; }
.guild-theme .capture-station-heading small { color: #d8c4a1; font-size: .84rem; }
.guild-theme .capture-station-heading #edit-status {
  padding: .35rem .65rem; color: #ffe09a; border: 1px solid rgba(255,207,105,.28);
  border-radius: 999px; background: rgba(29,14,8,.38); font-size: .68rem;
}
.guild-theme .capture-station .capture-form {
  margin: 0; padding: clamp(1.15rem,3vw,1.7rem); border: 1px solid #d8ad65;
  border-radius: 24px 24px 10px 24px;
  background:
    linear-gradient(145deg,rgba(255,255,255,.5),transparent 35%),
    repeating-linear-gradient(0deg,transparent 0 4px,rgba(107,66,25,.022) 4px 5px),
    #f0dba9;
  box-shadow: 0 18px 36px rgba(14,6,3,.24), inset 0 1px 0 rgba(255,255,255,.72);
}
.guild-theme .capture-form > label:first-of-type { display: block; margin-bottom: .5rem; color: #57381f; font-size: .82rem; font-weight: 700; }
.guild-theme .capture-form textarea {
  min-height: 150px; padding: 1rem 1.05rem; color: #3f2918; border: 2px solid #b77e35;
  border-radius: 14px; background: #fff8e6; box-shadow: inset 0 2px 8px rgba(83,48,18,.08);
  line-height: 1.7; resize: vertical;
}
.guild-theme .capture-form textarea::placeholder { color: #80684f; opacity: 1; }
.guild-theme .capture-form textarea:focus { border-color: #84500f; outline: 3px solid rgba(171,111,25,.2); outline-offset: 2px; }
.guild-theme .capture-form-footer { margin-top: .2rem; }
.guild-theme .capture-form-actions { margin-top: 0; }
.guild-theme .capture-form-actions .primary-action { min-height: 48px; padding-inline: 1.2rem; border-radius: 12px; box-shadow: 0 8px 16px rgba(91,51,9,.22); }
.guild-theme .capture-privacy { display: flex; align-items: center; gap: .35rem; margin: 0; color: #6d5032; }
.guild-theme .capture-link-preview { color: #5b3c21; }
.guild-theme .capture-preview-link {
  min-height: 40px; display: inline-flex; align-items: center; padding: .45rem .7rem;
  color: #fff3d2; border: 1px solid #6b411d; border-radius: 999px; background: #70400d;
  font-size: .76rem; font-weight: 700; text-decoration: none;
}
.guild-theme .capture-preview-link:hover { background: #532d0b; text-decoration: underline; }
.guild-theme .universal-intake {
  margin: 1.35rem 0 1.6rem; padding: 0; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .7rem;
  border: 0; border-radius: 0; color: #f8e7c0; background: transparent;
}
.guild-theme .capture-route-intro {
  grid-column: 1 / -1; display: grid; grid-template-columns: 42px minmax(0,1fr); gap: .75rem;
  align-items: center; padding: .3rem .15rem .65rem; border-bottom: 1px solid rgba(222,179,100,.2);
}
.guild-theme .capture-route-intro > div { display: grid; gap: .1rem; }
.guild-theme .capture-route-intro strong { color: #ffe4a5; font: 600 1rem var(--font-display); }
.guild-theme .capture-route-intro span:not(.capture-route-compass) { color: #cbb590; font-size: .76rem; }
.guild-theme .capture-route-compass {
  width: 42px; height: 42px; display: grid; place-items: center; color: #4a2b10;
  border: 1px solid #f2c365; border-radius: 50%; background: linear-gradient(145deg,#ffe39c,#d99a2b);
  box-shadow: 0 7px 16px rgba(0,0,0,.24);
}
.guild-theme .universal-intake-action {
  position: relative; min-height: 94px; padding: .9rem 2.15rem .9rem .9rem;
  display: grid; grid-template-columns: 42px minmax(0,1fr); gap: .12rem .7rem; align-content: center;
  text-align: left; color: #432e1e; border: 1px solid #ad7b3f; border-radius: 16px 16px 7px 16px;
  background: linear-gradient(145deg,#f8e6bd,#e8c98e); box-shadow: 0 10px 22px rgba(10,4,2,.18);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.guild-theme .universal-intake-action::after {
  content: ""; position: absolute; top: 50%; right: 1rem; width: 8px; height: 8px;
  border-top: 2px solid #77440e; border-right: 2px solid #77440e; transform: translateY(-50%) rotate(45deg);
}
.guild-theme .universal-intake-action:hover { transform: translateY(-2px); border-color: #e0a943; box-shadow: 0 14px 26px rgba(10,4,2,.24); }
.guild-theme .universal-intake-action:focus-visible { outline: 3px solid #ffd46f; outline-offset: 3px; }
.guild-theme .universal-intake-action .capture-route-icon {
  grid-row: 1 / 3; width: 42px; height: 42px; display: grid; place-items: center; align-self: center;
  border-radius: 13px; background: rgba(113,67,17,.1); font-size: 1.25rem;
}
.guild-theme .universal-intake-action strong { align-self: end; color: #432e1e; font: 600 .96rem var(--font-display); }
.guild-theme .universal-intake-action small { align-self: start; color: #6a4d31; font-size: .72rem; line-height: 1.45; }
.guild-theme .inbox-heading { margin: 0 0 .75rem; padding-top: 1.2rem; border-top: 1px solid rgba(222,179,100,.22); }
.guild-theme .inbox-heading-copy p { color: #e9bd61; font-size: .64rem; font-weight: 800; letter-spacing: .12em; }
.guild-theme .inbox-heading-copy h3 { color: #fff0c7; font-size: 1.15rem; }
.guild-theme .inbox-heading-copy span { color: #cbb590; font-size: .72rem; }
.guild-theme .capture-inbox .empty-state { min-height: 76px; display: grid; place-items: center; border-style: dashed; box-shadow: none; }
.guild-theme .capture-row { padding: 1rem; border-left: 4px solid #b26d13; border-radius: 9px 16px 16px 9px; }
.guild-theme .capture-message { color: #432e1e; }
.guild-theme .capture-inline-link { color: #71400c; font-weight: 800; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.guild-theme .capture-inline-link:hover { color: #4e2907; }
.guild-theme .capture-row .row-actions { align-self: center; }
.guild-theme .capture-row .capture-edit { color: #4d321b; border: 1px solid #9d7545; border-radius: 9px; background: #f8e8c0; font-weight: 750; }
.guild-theme .capture-row .danger-row-action { color: #fff5ed; border: 1px solid #5e1813; border-radius: 9px; background: #7b251e; font-weight: 750; }
.guild-theme .manual-entry { margin-top: 1.4rem; border-top-color: rgba(222,179,100,.2); }
.guild-theme .manual-entry > summary { min-height: 48px; padding: .2rem .35rem; color: #e8cfa8; }

@media (max-width: 900px) {
  .guild-theme .care-layout { grid-template-columns: 1fr; }
  .guild-theme .universal-intake { grid-template-columns: 1fr 1fr; }
  .guild-theme .capture-route-intro { grid-column: 1 / -1; }
  .guild-theme .universal-intake-action:last-child { grid-column: 1 / -1; }
  .guild-theme .consistency-layout { grid-template-columns: minmax(210px,.72fr) minmax(0,1.5fr); }
  .guild-theme .coverage-card { grid-column: 1 / -1; grid-template-columns: minmax(150px,.45fr) minmax(0,1fr) auto; align-items: center; }
  .guild-theme .coverage-card > small { grid-column: 1 / -1; }
}
@media (max-width: 680px) {
  .guild-theme .today-journal-action { grid-template-columns: auto minmax(0,1fr); }
  .guild-theme .today-journal-action i { grid-column: 2; }
  .guild-theme .universal-intake { grid-template-columns: 1fr; }
  .guild-theme .capture-route-intro { grid-column: auto; grid-template-columns: 36px minmax(0,1fr); }
  .guild-theme .capture-route-compass { width: 36px; height: 36px; }
  .guild-theme .universal-intake-action:last-child { grid-column: auto; }
  .guild-theme .capture-station { padding: .85rem; border-width: 4px; }
  .guild-theme .capture-station-heading { align-items: start; }
  .guild-theme .capture-station .capture-form { padding: 1rem; border-radius: 18px 18px 8px 18px; }
  .guild-theme .capture-form textarea { min-height: 132px; }
  .guild-theme .capture-preview-link { min-height: 44px; }
  .guild-theme .universal-intake-action { min-height: 88px; }
  .guild-theme .workout-presets,
  .guild-theme .history-day-strip { grid-auto-columns: minmax(240px,84%); }
  .guild-theme .detail-task-heading { align-items: start; flex-direction: column; }
  .guild-theme .detail-task-row { grid-template-columns: 34px minmax(0,1fr) 40px; }
  .guild-theme .detail-task-edit { grid-column: 2; justify-self: start; }
  .guild-theme .detail-task-remove { grid-column: 3; grid-row: 1 / 3; }
  .guild-theme .detail-task-form { grid-template-columns: 1fr auto; }
  .guild-theme #detail-task-cancel { grid-column: 1 / -1; }
  .guild-theme .insight-overview.adventurer-ledger { padding: 1.05rem; border-width: 2px; border-radius: 22px 22px 22px 8px; }
  .guild-theme .ledger-heading { align-items: stretch; flex-direction: column; gap: 1rem; }
  .guild-theme .adventurer-ledger .range-select { justify-content: space-between; }
  .guild-theme .adventurer-ledger .range-select select { min-width: 118px; }
  .guild-theme .consistency-layout { grid-template-columns: 1fr; gap: 1rem; }
  .guild-theme .score-card { grid-template-columns: 76px minmax(0,1fr); padding: 1rem; }
  .guild-theme .consistency-rank-seal { width: 76px; height: 76px; }
  .guild-theme .consistency-breakdown { padding-left: 1.2rem; }
  .guild-theme .coverage-card { grid-column: auto; grid-template-columns: 1fr; align-items: stretch; }
  .guild-theme #progress-panel .charts-grid { grid-template-columns: 1fr; }
  .guild-theme #progress-panel .chart-card,
  .guild-theme #progress-panel .progress-insight,
  .guild-theme #progress-panel .badge-zone { padding: 1rem; border-width: 1px; }
}

