/* Whole-page polish pass (2026-10-03): every tab uses wooden boards + parchment, nothing floats on bare wood,
   nothing blends. Loaded last. */

/* Mind & Sleep: sections that sat on bare wood become boards */
.guild-theme :is(.mental-stats-zone, .mental-history-zone, .care-hero) {
  position: relative; padding: 1.4rem 1.5rem; margin-bottom: 1.2rem;
  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: 0 18px 40px rgba(15, 6, 2, .55), 0 0 0 2px #1b0d07;
}
.guild-theme .mental-stats-zone .mood-legend span:not([data-mood]),
.guild-theme .mental-stats-zone #mental-mood-stats { color: #e3cba3 !important; }
.guild-theme .mood-tracker-grid .mood-day:not([data-mood]) { background: rgba(255, 240, 203, .14); outline: 1px solid rgba(255, 240, 203, .12); }

/* Care: empty states are parchment invitations, not dark holes */
.guild-theme .care-card-list .empty-state,
.guild-theme .care-empty {
  padding: 1.6rem 1.2rem !important; border: 1px dashed #b98e50 !important; border-radius: 10px;
  color: #4a2e18 !important; font-weight: 600; text-align: center;
  background: linear-gradient(135deg, rgba(255, 255, 255, .38), transparent 34%), #ead3a5 !important;
}
.guild-theme .care-hero .section-heading small { color: #e3cba3; }

/* Insights: chart lines readable on parchment */
.guild-theme .metric-chart .chart-line { stroke-width: 3.2; filter: brightness(.55) saturate(1.5); }
.guild-theme .metric-chart .chart-svg circle { r: 4.2px; filter: brightness(.55) saturate(1.5); stroke: #fff6e0; stroke-width: 1.5; }
.guild-theme .metric-chart .target-band { fill: rgba(47, 154, 107, .16); }
.guild-theme .metric-chart .chart-axis span { color: #5b4128; }

/* Row actions on parchment rows (History day detail, Today timeline) */
.guild-theme .timeline-row button:not(.danger-row-action) { color: #4a2a18 !important; border: 1px solid #8b5a2b !important; background: rgba(74, 42, 24, .06) !important; }

/* Today: "View History →" sits on the wood board */
.guild-theme #today-panel .source-edit-action { background: rgba(255, 243, 220, .1) !important; color: #fff3dc !important; border: 1px solid #f2d39b !important; }

/* DEX badge text darker on its pale chip */
.guild-theme .quest-stat-badge.stat-dex { color: #6b4200 !important; }

/* ===== Buttons, whole page (2026-10-03): same 3 tiers as Train/Food, coloured by the surface they sit on ===== */
/* On wood boards: text links/toggles become gold outline pills (no more off-theme blue) */
.guild-theme .health-panel :is(.daily-adventure, .life-today-zone, .quest-zone, .today-cockpit, .today-timeline-zone, .calendar-zone, .day-detail, .quick-log-hub, .recent-history-zone, .mental-stats-zone, .mental-history-zone, .habit-hub, .care-shelf, .care-playbook) .text-action:not(.source-edit-action) {
  color: #f1c76a !important; background: rgba(255, 243, 220, .06) !important; border: 1px solid rgba(241, 199, 106, .6) !important;
  border-radius: 8px; padding: .35rem .8rem; font-weight: 700; text-decoration: none; box-shadow: none !important;
}
.guild-theme .health-panel :is(.daily-adventure, .life-today-zone, .quest-zone, .today-cockpit, .today-timeline-zone, .calendar-zone, .day-detail, .quick-log-hub, .recent-history-zone, .mental-stats-zone, .mental-history-zone, .habit-hub) .text-action:hover { background: rgba(255, 243, 220, .16) !important; color: #ffe39a !important; }
/* Secondary actions on wood: cream outline */
.guild-theme .health-panel :is(.day-detail, .quick-log-hub, .calendar-zone) > * .secondary-action:not(:is(.log-form-surface, .capture-form, .collection-editor, .care-form, .habit-form) *),
.guild-theme .health-panel :is(.day-detail, .quick-log-hub) .section-heading .secondary-action {
  background: rgba(255, 243, 220, .08) !important; color: #fff3dc !important; border: 1px solid #f2d39b !important; box-shadow: none !important; font-weight: 700;
}
/* Secondary actions on parchment cards/forms: brown outline */
.guild-theme .health-panel :is(.care-form, .habit-form, .profile-settings-card, .quest-settings-card, .log-form-surface, .capture-form, .habit-card, .history-row, .collection-editor) .secondary-action {
  background: rgba(74, 42, 24, .06) !important; color: #4a2a18 !important; border: 1px solid #8b5a2b !important; box-shadow: none !important; font-weight: 700;
}
/* Delete actions everywhere: red outline */
.guild-theme .health-panel :is(.habit-card, .history-row, .timeline-row, .care-card) .danger-row-action {
  background: rgba(161, 42, 28, .06) !important; color: #a12a1c !important; border: 1px solid #a12a1c !important; box-shadow: none !important;
}

/* History day strip: emoji facts, empty days dimmed, full days highlighted */
.guild-theme .history-day-card.is-empty { opacity: .62; }
.guild-theme .history-day-card.is-full { border-left: 5px solid #2f9a6b !important; }
.guild-theme .history-day-card strong { line-height: 1.45; }

/* Character: habits now share the right column with the settings cards */
.guild-theme .profile-control-stack .life-system-grid { margin-top: 1rem; }
.guild-theme .profile-control-stack .habit-hub { margin: 0; }

/* Character: stat cards two per row on desktop so the sheet matches the right column height */
@media (min-width: 1001px) {
  .guild-theme .character-sheet .attribute-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
  .guild-theme .character-sheet .attribute-grid > :last-child:nth-child(odd) { grid-column: 1 / -1; }
}

/* ===== Mind & Sleep v2 (2026-10-04) ===== */
/* Mood colours were hidden by an older guild rule (health-room.css:815) — restore them. */
.guild-theme .mood-tracker-grid .mood-day[data-mood="1"], .guild-theme .mood-legend span[data-mood="1"] { background: #e05a4f; }
.guild-theme .mood-tracker-grid .mood-day[data-mood="2"], .guild-theme .mood-legend span[data-mood="2"] { background: #f29b38; }
.guild-theme .mood-tracker-grid .mood-day[data-mood="3"], .guild-theme .mood-legend span[data-mood="3"] { background: #f2cf4a; }
.guild-theme .mood-tracker-grid .mood-day[data-mood="4"], .guild-theme .mood-legend span[data-mood="4"] { background: #9ccf62; }
.guild-theme .mood-tracker-grid .mood-day[data-mood="5"], .guild-theme .mood-legend span[data-mood="5"] { background: #3fae5f; }
.guild-theme .mood-tracker-grid .mood-day[data-mood] { box-shadow: 0 0 0 1px rgba(0, 0, 0, .25); }
.guild-theme .mood-legend { display: flex; align-items: center; gap: .35rem; margin: .4rem 0 .6rem; }
.guild-theme .mood-legend span[data-mood] { width: 14px; height: 14px; border-radius: 4px; }
.guild-theme .mood-legend-label { color: #e3cba3 !important; font-size: .78rem; font-weight: 600; }

.guild-theme .mood-stat-chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.guild-theme .mood-stat-chip { display: grid; gap: .05rem; min-width: 96px; padding: .45rem .7rem; border-radius: 10px; border: 1px solid #b98e50; background: linear-gradient(135deg, rgba(255,255,255,.38), transparent 34%), #ead3a5; }
.guild-theme .mood-stat-chip small { color: #5b4128; font-size: .72rem; font-weight: 700; }
.guild-theme .mood-stat-chip strong { color: #3a2312; font-size: 1.05rem; }
.guild-theme .mood-stat-chip--good { border-left: 5px solid #3fae5f; }
.guild-theme .mood-stat-chip--neutral { border-left: 5px solid #f2cf4a; }
.guild-theme .mood-stat-chip--low { border-left: 5px solid #e05a4f; }
.guild-theme .mood-stat-chip--streak { border-left: 5px solid #e0772e; }

.guild-theme .journal-cta { display: grid; justify-items: end; gap: .3rem; }
.guild-theme #mental-journal-status { color: #e3cba3; font-size: .78rem; font-weight: 600; }
.guild-theme #mental-journal-status.is-done { color: #9ee6b8; }
.guild-theme .mental-journal-composer { margin: 0 0 1.2rem; }

/* Sleep card: last 7 nights */
.guild-theme .sleep-week { position: relative; display: grid; grid-template-columns: repeat(7, 1fr); align-items: end; gap: .3rem; height: 92px; margin: .6rem 0 1.2rem; padding: .4rem .2rem 0; border-bottom: 1px dashed #b98e50; }
.guild-theme .sleep-week::after { content: attr(data-average); position: absolute; right: 0; top: -1.1rem; color: #5b4128; font-size: .72rem; font-weight: 700; }
.guild-theme .sleep-week-day { display: grid; grid-template-rows: 1fr auto; justify-items: center; height: 100%; }
.guild-theme .sleep-week-day i { align-self: end; width: 70%; min-height: 3px; border-radius: 4px 4px 0 0; background: #c9b089; }
.guild-theme .sleep-week-day.is-good i { background: #3fae5f; }
.guild-theme .sleep-week-day.is-ok i { background: #f2b84b; }
.guild-theme .sleep-week-day.is-low i { background: #e05a4f; }
.guild-theme .sleep-week-day small { color: #5b4128; font-size: .68rem; font-weight: 700; margin-top: .2rem; }

/* Recent entries: mood edge + readable full entry */
.guild-theme #mental-history .history-row[data-mood="1"] { border-left: 6px solid #e05a4f !important; }
.guild-theme #mental-history .history-row[data-mood="2"] { border-left: 6px solid #f29b38 !important; }
.guild-theme #mental-history .history-row[data-mood="3"] { border-left: 6px solid #f2cf4a !important; }
.guild-theme #mental-history .history-row[data-mood="4"] { border-left: 6px solid #9ccf62 !important; }
.guild-theme #mental-history .history-row[data-mood="5"] { border-left: 6px solid #3fae5f !important; }
.guild-theme #mental-history .history-row[data-mood="session"] { border-left: 6px solid #6f9ed6 !important; }
.guild-theme #mental-history .history-icon { font-size: 1.5rem; }
.guild-theme .journal-full summary { cursor: pointer; color: #7a3d0e; font-weight: 700; font-size: .8rem; margin-top: .3rem; }
.guild-theme .journal-full p { color: #3a2312; line-height: 1.6; white-space: pre-line; margin: .3rem 0 0; }
/* Journal composer on Mind & Sleep sits on parchment: ink text, not board cream */
.guild-theme #mental-journal-form-host .mental-form { margin: 0; }
.guild-theme #mental-journal-form-host :is(label, .mood-btn, .upload-btn) { color: #4a3220 !important; }
.guild-theme #mental-journal-form-host .mood-btn { background: #f6e6c2; border: 1px solid #b98e50; }
.guild-theme #mental-journal-form-host .mood-btn:has(input:checked) { background: #f1b93c; border-color: #8a5a17; color: #2c1a0c !important; }
.guild-theme #mental-journal-form-host .upload-btn { background: #f6e6c2; border: 1px solid #b98e50; }
.guild-theme #mental-journal-close { min-width: 44px; min-height: 44px; color: #5b3614 !important; background: #f6e6c2 !important; border: 1px solid #9d7545 !important; }
.guild-theme #btn-add-journal { background-color: #f1b93c; }
/* Insights rank seal: the small label sat dark-on-dark */
.guild-theme .consistency-rank-seal span { color: #e3c58e !important; }

/* Mood calendar: every day opens its journal */
.guild-theme .mood-tracker-grid .mood-day[data-date] { cursor: pointer; transition: transform .12s ease, box-shadow .12s ease; }
.guild-theme .mood-tracker-grid .mood-day[data-date]:hover { transform: scale(1.35); box-shadow: 0 0 0 2px #ffe3a3; position: relative; z-index: 1; }
.guild-theme .mood-tracker-grid .mood-day[data-date]:focus-visible { outline: 2px solid #ffe3a3; outline-offset: 1px; }
#training-exercise-modal .mood-day-entry { margin: 0 0 .9rem; padding: .8rem .9rem; border-radius: 10px; border: 1px solid #b98e50; border-left: 6px solid #b98e50; background: #f6e6c2; }
#training-exercise-modal .mood-day-entry[data-mood="1"] { border-left-color: #e05a4f; }
#training-exercise-modal .mood-day-entry[data-mood="2"] { border-left-color: #f29b38; }
#training-exercise-modal .mood-day-entry[data-mood="3"] { border-left-color: #f2cf4a; }
#training-exercise-modal .mood-day-entry[data-mood="4"] { border-left-color: #9ccf62; }
#training-exercise-modal .mood-day-entry[data-mood="5"] { border-left-color: #3fae5f; }
#training-exercise-modal .mood-day-mood { margin: 0 0 .35rem; color: #3a2312; font-weight: 800; }
#training-exercise-modal .mood-day-note { margin: 0 0 .6rem; color: #3a2312; line-height: 1.65; white-space: pre-line; }
#training-exercise-modal .mood-day-photo { display: block; max-width: 100%; max-height: 320px; margin: 0 0 .6rem; border-radius: 8px; object-fit: cover; }
#training-exercise-modal .mood-day-empty { color: #4a3220; font-weight: 600; }
#training-exercise-modal .mood-day-extra { margin: .2rem 0 .8rem; padding-left: 1.1rem; color: #3a2312; }
#training-exercise-modal .mood-day-extra { color: #f3dfb8; }
#training-exercise-modal .mood-day-empty { color: #f3dfb8; }
#training-exercise-modal .mood-day-entry .training-edit-content { color: #fff3dc !important; background: #5b3614 !important; border: 1px solid #3a2312 !important; border-radius: 8px; padding: .4rem .8rem; font-weight: 700; }

/* ===== Care v2 (2026-10-04) ===== */
.guild-theme .care-today { margin: 0 0 1rem; }
.guild-theme :is(.care-today-board, .care-starter) { padding: 1.1rem 1.2rem; color: #3a2312; border: 1px solid #b98e50; border-radius: 14px; background: linear-gradient(135deg, rgba(255,255,255,.4), transparent 38%), #ead3a5; box-shadow: 0 10px 24px rgba(0,0,0,.35), inset 0 0 0 4px rgba(255,240,205,.35); }
.guild-theme .care-today-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; align-items: flex-start; }
.guild-theme .care-today-head h3 { margin: .1rem 0 .5rem; color: #3a2312; font-size: 1.35rem; }
.guild-theme :is(.care-today-eyebrow, .care-starter-eyebrow) { margin: 0; color: #7a3d0e; font-size: .72rem; font-weight: 800; letter-spacing: .12em; }
.guild-theme .care-progress { width: min(320px, 70vw); height: 12px; border-radius: 99px; background: #c9b089; overflow: hidden; box-shadow: inset 0 1px 2px rgba(0,0,0,.3); }
.guild-theme .care-progress i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #3fae5f, #8fd16a); transition: width .3s ease; }
.guild-theme .care-stat-chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.guild-theme .care-stat-chip { display: grid; gap: .05rem; min-width: 92px; padding: .45rem .7rem; border-radius: 10px; border: 1px solid #b98e50; border-left: 5px solid #b98e50; background: #f6e6c2; }
.guild-theme .care-stat-chip small { color: #5b4128; font-size: .72rem; font-weight: 700; }
.guild-theme .care-stat-chip strong { color: #3a2312; font-size: 1.05rem; }
.guild-theme .care-stat-chip--streak { border-left-color: #e0772e; }
.guild-theme .care-stat-chip--week { border-left-color: #3fae5f; }
.guild-theme .care-stat-chip--shelf { border-left-color: #6f9ed6; }
.guild-theme .care-stat-chip--looks { border-left-color: #b47ad6; }
.guild-theme .care-today-chips { display: flex; flex-wrap: wrap; gap: .5rem; margin: .9rem 0 .4rem; }
.guild-theme .care-today-chip { min-height: 44px; padding: .45rem .9rem; color: #3a2312; font-weight: 700; border: 1px solid #9d7545; border-radius: 99px; background: #fff3d6; cursor: pointer; transition: transform .12s ease, background .12s ease; }
.guild-theme .care-today-chip:hover { transform: translateY(-1px); background: #ffe9b8; }
.guild-theme .care-today-chip.is-done { color: #123d22; border-color: #2f7a47; background: #bfe5c3; }
.guild-theme .care-today-hint { color: #5b4128; font-size: .78rem; }
.guild-theme .care-starter h3 { margin: .15rem 0 .6rem; color: #3a2312; }
.guild-theme .care-starter-list { margin: 0 0 .9rem; padding-left: 1.1rem; display: grid; gap: .3rem; color: #3a2312; }
.guild-theme .care-starter-source { display: block; margin-top: .7rem; color: #5b4128; }
.guild-theme :is(.care-starter-source, .care-detail-steps, .care-steps) a { color: #7a3d0e; font-weight: 700; }

.guild-theme .care-filter { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 .8rem; }
.guild-theme .care-filter:empty { display: none; }
.guild-theme .care-filter-chip { min-height: 40px; padding: .35rem .8rem; color: #f8e7c0; font-weight: 700; border: 1px solid #b98e50; border-radius: 99px; background: rgba(0,0,0,.25); cursor: pointer; }
.guild-theme .care-filter-chip.active { color: #2c1a0c; border-color: #8a5a17; background: #f1b93c; }

.guild-theme .care-card--compact { cursor: pointer; transition: transform .14s ease, box-shadow .14s ease; }
.guild-theme .care-card--compact:hover { transform: translateY(-2px); box-shadow: 0 12px 24px rgba(0,0,0,.35); }
.guild-theme .care-card--compact .care-card-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; background: #f6e6c2; border: 1px solid #c7a56f; }
.guild-theme .care-card--compact[data-category="skincare"] { border-left: 6px solid #6f9ed6; }
.guild-theme .care-card--compact[data-category="cosmetics"] { border-left: 6px solid #d67aa6; }
.guild-theme .care-card--compact[data-category="supplement"] { border-left: 6px solid #3fae5f; }
.guild-theme .care-card--compact[data-category="fragrance"] { border-left: 6px solid #b47ad6; }
.guild-theme .care-card--compact[data-category="grooming-tool"] { border-left: 6px solid #8a6a4a; }
.guild-theme .care-card--compact.grooming-card { border-left: 6px solid #e0772e; }
.guild-theme .care-card--compact.used { border-color: #2f7a47; background: linear-gradient(135deg, rgba(255,255,255,.35), transparent 40%), #dfe8c4; }
.guild-theme .care-card-info { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.guild-theme .care-chip { display: inline-block; padding: .2rem .6rem; color: #4a3220; font-size: .8rem; font-weight: 700; border-radius: 99px; background: #f6e6c2; border: 1px solid #c7a56f; }
.guild-theme .care-card-purpose { flex-basis: 100%; margin: .1rem 0 0; color: #4a3220; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.guild-theme .care-card-week { display: flex; align-items: center; gap: .6rem; }
.guild-theme .care-card-week small { color: #5b4128; font-size: .74rem; font-weight: 700; }
.guild-theme .care-dots { display: flex; gap: 4px; flex-wrap: wrap; }
.guild-theme .care-dot { width: 14px; height: 14px; border-radius: 4px; background: #d8c3a0; border: 1px solid #b99c74; }
.guild-theme .care-dot.is-on { background: #3fae5f; border-color: #2f7a47; }
.guild-theme .care-dot.is-today { box-shadow: 0 0 0 2px #7a3d0e; }
.guild-theme .care-card-actions .care-use-toggle { color: #1f3d2a; border: 1px solid #477157; border-radius: 8px; background: #dce7c9; font-weight: 700; padding: 0 .9rem; }
.guild-theme .care-card-actions .care-use-toggle.is-done { color: #fff; border-color: #2f7a47; background: #3a8a55; }
.guild-theme .care-card-actions :is(.care-edit-button, .care-more-button) { color: #fff3dc !important; border: 1px solid #3a2312 !important; border-radius: 8px; background: #5b3614 !important; font-weight: 700; padding: 0 .9rem; }

#training-exercise-modal .care-dots { margin: .2rem 0 .6rem; }
#training-exercise-modal .care-detail-steps { white-space: pre-line; }
#training-exercise-modal .care-steps { display: grid; gap: .35rem; margin: 0 0 .8rem; }
#training-exercise-modal .care-step { margin: 0; padding: .45rem .7rem; color: #3a2312; border-radius: 8px; background: #f6e6c2; border-left: 4px solid #e0772e; }
#training-exercise-modal .care-step-head { margin: .5rem 0 .1rem; color: #ffd979; font-size: .78rem; letter-spacing: .1em; }
#training-exercise-modal .care-step-note { margin: 0; color: #f3dfb8; }
#training-exercise-modal .care-steps a, #training-exercise-modal .care-detail-steps a { color: #ffd979; font-weight: 700; }
#training-exercise-modal .food-detail-actions .danger-row-action { color: #fff5ed !important; border: 1px solid #5e1813 !important; border-radius: 8px; background: #8a2a22 !important; font-weight: 700; padding: .45rem .9rem; }
.guild-theme #insights-empty .text-action { color: #2c1a0c !important; border: 1px solid #8a5a17 !important; background: #f1b93c !important; }
#training-exercise-modal .food-detail-actions .training-edit-content { color: #2c1a0c !important; border: 1px solid #8a5a17 !important; border-radius: 8px; background: #f6e6c2 !important; font-weight: 700; padding: .45rem .9rem; }

/* ===== Today · History · Log · Insights · Character pass (2026-10-04) ===== */
/* Today macros: identity colour = top band (hues not used by the status legend); status = bar + word */
.guild-theme .today-cockpit .macro-card::after { content: '→'; width: auto; height: auto; top: auto; right: .8rem; bottom: .6rem; border-radius: 0; background: none; filter: none; opacity: .55; }
.guild-theme .today-cockpit .macro-card::before { display: none !important; }
.guild-theme .macro-grid--ranked { display: grid; grid-template-columns: 1.35fr 1.35fr 1fr 1fr; gap: .8rem; align-items: stretch; }
.guild-theme .macro-grid--ranked .macro-card { border-top: 6px solid var(--macro-id) !important; }
.guild-theme .macro-grid--ranked .macro-card.protein { --macro-id: #2f63b8; }
.guild-theme .macro-grid--ranked .macro-card.calories { --macro-id: #7a4fc9; }
.guild-theme .macro-grid--ranked .macro-card.carbs { --macro-id: #2b8f95; }
.guild-theme .macro-grid--ranked .macro-card.fat { --macro-id: #b0508c; }
.guild-theme .macro-grid--ranked :is(.macro-card.protein, .macro-card.calories) { background: linear-gradient(160deg, #fff6df, #f1dcae) !important; box-shadow: 0 12px 26px rgba(0,0,0,.4), 0 0 0 2px rgba(255,217,121,.55) !important; padding: 1.1rem 1.2rem 1.3rem; }
.guild-theme .macro-grid--ranked :is(.macro-card.protein, .macro-card.calories) strong { font-size: 2.3rem; color: #2c1a0c; }
.guild-theme .macro-grid--ranked :is(.macro-card.protein, .macro-card.calories) > span { color: #2c1a0c; font-weight: 800; font-size: 1rem; }
.guild-theme .macro-grid--ranked :is(.macro-card.protein, .macro-card.calories) .metric-track { height: 12px; }
.guild-theme .macro-grid--ranked :is(.macro-card.carbs, .macro-card.fat) { background: #e7d3a9 !important; opacity: .96; }
.guild-theme .macro-grid--ranked :is(.macro-card.carbs, .macro-card.fat) strong { font-size: 1.45rem; }
.guild-theme .macro-grid--ranked .metric-track { background: #d6c19b; border-radius: 99px; overflow: hidden; }
.guild-theme .macro-grid--ranked .macro-card .metric-track i { background: #b9a08a; }
.guild-theme .macro-grid--ranked .macro-card[data-state="done"] .metric-track i { background: #2f9a6b; }
.guild-theme .macro-grid--ranked .macro-card[data-state="on-track"] .metric-track i { background: #d6a23a; }
.guild-theme .macro-grid--ranked .macro-card[data-state="low"] .metric-track i { background: #e08a2e; }
.guild-theme .macro-grid--ranked .macro-card[data-state="over"] .metric-track i { background: #c8483a; }
.guild-theme .macro-left { display: block; margin-top: .45rem; color: #3a2312; font-size: .8rem; font-style: normal; font-weight: 700; }
.guild-theme :is(.macro-card.carbs, .macro-card.fat) .macro-left { font-size: .72rem; }
@media (max-width: 760px) { .guild-theme .macro-grid--ranked { grid-template-columns: 1fr 1fr; } }

/* Today quick actions: the most-used one is gold */
.guild-theme #quick-actions .quick-primary { background: linear-gradient(160deg, #ffd56b, #f0a92e) !important; border-color: #8a5a17 !important; box-shadow: 0 10px 24px rgba(0,0,0,.4), 0 0 0 2px rgba(255,226,140,.6) !important; }
.guild-theme #quick-actions .quick-primary :is(strong, small, i) { color: #2c1a0c !important; }

/* History: future days fade, logged days get warmer, dots bigger */
.guild-theme .calendar-day.future { opacity: .45; background: #cdb991 !important; }
.guild-theme .calendar-day[data-logged="3"], .guild-theme .calendar-day[data-logged="4"] { background: linear-gradient(160deg, #fff0c9, #f2d796) !important; }
.guild-theme .calendar-day[data-logged="0"]:not(.future):not(.outside) { background: #e6d4b0 !important; }
.guild-theme .calendar-dots .dot { width: 9px !important; height: 9px !important; box-shadow: 0 0 0 1px rgba(0,0,0,.25); }
.guild-theme .history-date-divider { margin: 1rem 0 .4rem; color: #ffd979; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; }
.guild-theme .history-date-divider:first-child { margin-top: 0; }
.guild-theme .history-row[data-kind="meal"] { border-left: 6px solid #e0a43a !important; }
.guild-theme .history-row[data-kind="workout"] { border-left: 6px solid #2b8f95 !important; }
.guild-theme .history-row[data-kind="sleep"] { border-left: 6px solid #6f9ed6 !important; }
.guild-theme .history-row[data-kind="checkin"] { border-left: 6px solid #7a4fc9 !important; }
.guild-theme .history-row[data-kind="capture"] { border-left: 6px solid #9a8a74 !important; }
.guild-theme .history-row .history-icon { font-size: 1.35rem; }

/* Log: entry type tiles first, meal biggest */
.guild-theme #manual-entry > summary.manual-entry-btn { color: #ffe9b8; font-weight: 800; border-style: solid; }
.guild-theme #manual-entry .quick-log-switcher { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: .55rem; }
.guild-theme #manual-entry .quick-log-switcher button { min-height: 64px; display: grid; place-items: center; gap: .1rem; font-weight: 800; font-size: 1rem; color: #3a2312; border: 1px solid #b98e50; border-radius: 12px; background: #f3e1b8; }
.guild-theme #manual-entry .quick-log-switcher button small { font-size: .68rem; font-weight: 700; color: #5b4128; text-transform: uppercase; letter-spacing: .06em; }
.guild-theme #manual-entry .quick-log-switcher button.active { color: #2c1a0c; background: linear-gradient(160deg, #ffd56b, #f0a92e); border-color: #8a5a17; box-shadow: 0 8px 18px rgba(0,0,0,.35); }
@media (max-width: 760px) { .guild-theme #manual-entry .quick-log-switcher { grid-template-columns: repeat(2, 1fr); } .guild-theme #manual-entry .quick-log-switcher .log-kind-primary { grid-column: 1 / -1; } }
.guild-theme .capture-note-intro { margin: 1.4rem 0 .6rem; padding-top: 1rem; border-top: 1px dashed rgba(255,217,121,.35); }
.guild-theme .capture-note-intro p { margin: 0; color: #ffd979; font-size: .72rem; font-weight: 800; letter-spacing: .1em; }
.guild-theme .capture-note-intro h3 { margin: .2rem 0; color: #fff0c7; }
.guild-theme .capture-note-intro small { color: #e3cba3; line-height: 1.55; }
.guild-theme .capture-note-intro small b { color: #ffb6a6; }

/* Insights charts: readable scale */
.guild-theme .chart-scale { fill: #5b4128; font-size: 10px; font-weight: 700; }
.guild-theme .chart-band-label { fill: #2f6b3e; font-size: 10px; font-weight: 800; }
.guild-theme .chart-partial-note { margin: .2rem 0 0; color: #5b4128; font-size: .74rem; }

/* Character habit cards: Complete = gold, Edit = cream, Delete = red outline */
.guild-theme .habit-card .habit-edit { color: #3a2312 !important; background: #f6e6c2 !important; border: 1px solid #9d7545 !important; box-shadow: none !important; }
.guild-theme .habit-card .danger-row-action { color: #8a1f1f !important; background: #fbeee6 !important; border: 1px solid #b4473a !important; }

/* Mobile More menu sits above section headings */
.guild-theme #health-more[open] .health-more-menu { z-index: 60; }
.guild-theme .chart-axis .chart-range { color: #3a2312; font-weight: 800; }
.guild-theme .capture-inbox .danger-row-action { color: #fff5ed !important; background: #8a2a22 !important; border: 1px solid #5e1813 !important; }
/* Text buttons inside parchment Log forms/cards are dark ink, not the wood-board gold pill */
.guild-theme .health-panel .quick-log-hub :is(.log-form-surface, .capture-form, .capture-row) .text-action:not(.source-edit-action) { color: #2c1a0c !important; background: #f6e6c2 !important; border: 1px solid #8a5a17 !important; }
.guild-theme .log-form-surface .exercise-advanced-summary.exercise-advanced-summary { color: #5b3614 !important; }
.guild-theme [data-log-form="checkin"] .mood-btn:has(input:checked) { color: #10301a !important; }
.guild-theme #manual-entry .quick-log-switcher button:not(.active) { color: #3a2312 !important; background: #f3e1b8 !important; border: 1px solid #b98e50 !important; }
.guild-theme #manual-entry .quick-log-switcher button.active { color: #2c1a0c !important; background: linear-gradient(160deg, #ffd56b, #f0a92e) !important; border-color: #8a5a17 !important; }

/* Inbox: turn a note into a real entry */
.guild-theme .capture-inbox .capture-convert { color: #2c1a0c !important; background: linear-gradient(160deg, #ffd56b, #f0a92e) !important; border: 1px solid #8a5a17 !important; font-weight: 800; border-radius: 8px; }

/* Insights weekly review */
.guild-theme .weekly-review { position: relative; margin: 0 0 1rem; padding: clamp(1.1rem, 3vw, 1.8rem); 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 .weekly-review .section-heading p { color: #ffd979; }
.guild-theme .weekly-review .section-heading h2 { color: #fff0c7; }
.guild-theme .weekly-review .section-heading small { color: #e3cba3; }
.guild-theme .weekly-review-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .7rem; margin-top: .8rem; }
.guild-theme .weekly-card { display: grid; align-content: start; gap: .25rem; padding: .85rem .9rem; color: #3a2312; border: 1px solid #b98e50; border-left: 6px solid #b9a08a; border-radius: 12px; background: #e7d3a9; }
.guild-theme .weekly-card--hero { grid-column: span 1; background: linear-gradient(160deg, #fff6df, #f1dcae); box-shadow: 0 10px 22px rgba(0,0,0,.35), 0 0 0 2px rgba(255,217,121,.5); }
.guild-theme .weekly-card[data-state="done"] { border-left-color: #2f9a6b; }
.guild-theme .weekly-card[data-state="on-track"] { border-left-color: #d6a23a; }
.guild-theme .weekly-card[data-state="low"] { border-left-color: #e08a2e; }
.guild-theme .weekly-card[data-state="over"] { border-left-color: #c8483a; }
.guild-theme .weekly-card[data-state="info"] { border-left-color: #6f9ed6; }
.guild-theme .weekly-card-label { margin: 0; color: #4a3220; font-size: .78rem; font-weight: 800; }
.guild-theme .weekly-card strong { color: #2c1a0c; font-size: 1.6rem; line-height: 1.15; }
.guild-theme .weekly-card--hero strong { font-size: 2rem; }
.guild-theme .weekly-card strong small { color: #4a3220; font-size: .78rem; font-weight: 700; }
.guild-theme .weekly-card-status { color: #2c1a0c; font-size: .78rem; font-weight: 800; }
.guild-theme .weekly-card-delta { color: #3a2312; font-size: .74rem; font-weight: 700; }
.guild-theme .weekly-card-note { color: #4a3220; font-size: .72rem; }
@media (max-width: 1000px) { .guild-theme .weekly-review-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .guild-theme .weekly-review-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* History: filter by kind */
.guild-theme .history-kind-filter { display: flex; flex-wrap: wrap; gap: .4rem; margin: .2rem 0 .9rem; }
.guild-theme .history-kind-chip { min-height: 40px; padding: .35rem .85rem; color: #f8e7c0; font-weight: 700; border: 1px solid #b98e50; border-radius: 99px; background: rgba(0,0,0,.25); cursor: pointer; }
.guild-theme .history-kind-chip:hover { background: rgba(255,217,121,.12); }
.guild-theme .history-kind-chip.active { color: #2c1a0c; border-color: #8a5a17; background: #f1b93c; }

/* Weekly cards: how far from target */
.guild-theme .weekly-card-bar { position: relative; height: 10px; margin: .25rem 0 .1rem; border-radius: 99px; background: #cdb991; overflow: hidden; box-shadow: inset 0 1px 2px rgba(0,0,0,.25); }
.guild-theme .weekly-card-bar i { display: block; height: 100%; border-radius: inherit; background: #b9a08a; }
.guild-theme .weekly-card-bar b { position: absolute; top: -2px; bottom: -2px; width: 2px; background: #2c1a0c; }
.guild-theme .weekly-card[data-state="done"] .weekly-card-bar i { background: #2f9a6b; }
.guild-theme .weekly-card[data-state="on-track"] .weekly-card-bar i { background: #d6a23a; }
.guild-theme .weekly-card[data-state="low"] .weekly-card-bar i { background: #e08a2e; }
.guild-theme .weekly-card[data-state="over"] .weekly-card-bar i { background: #c8483a; }
.guild-theme .weekly-card-gap { color: #2c1a0c; font-size: .74rem; font-weight: 800; }
.guild-theme .weekly-card[data-state="done"] { background: linear-gradient(160deg, #f1f6df, #dfe8c4) !important; }
.guild-theme .weekly-card[data-state="low"] { background: linear-gradient(160deg, #fbecd8, #f0d7b4) !important; }
.guild-theme .weekly-card[data-state="over"] { background: linear-gradient(160deg, #fbe4dc, #f0cdc0) !important; }

/* Not needed now (parked) — Care shelf and supplement stack */
.guild-theme .parked-shelf { margin-top: .9rem; padding: .6rem .8rem; border: 1px dashed #b98e50; border-radius: 12px; background: rgba(0,0,0,.22); }
.guild-theme .parked-shelf > summary { cursor: pointer; color: #e3cba3; font-weight: 800; }
.guild-theme .parked-row { display: flex; gap: .6rem; align-items: center; margin-top: .55rem; padding: .55rem .7rem; border-radius: 10px; background: #d9c7a3; border: 1px solid #b99c74; }
.guild-theme .parked-copy { flex: 1; display: grid; gap: .1rem; text-align: left; color: #3a2312; background: none; border: 0; cursor: pointer; }
.guild-theme .parked-copy strong { color: #3a2312; }
.guild-theme .parked-copy small { color: #4a3220; }
.guild-theme .parked-back { min-height: 40px; padding: 0 .8rem; color: #1f3d2a; font-weight: 800; border: 1px solid #477157; border-radius: 8px; background: #dce7c9; cursor: pointer; }
.guild-theme .food-supp-park { color: #3a2312 !important; background: #efe0bd !important; border: 1px solid #9d7545 !important; border-radius: 8px; font-weight: 700; }
.guild-theme .care-card--compact[data-category="hair"] { border-left: 6px solid #e0772e; }

.guild-theme .care-today-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: .4rem 1rem; margin: .8rem 0 .3rem; }
.guild-theme .care-today-group-label { margin: .2rem 0 .1rem; color: #5b3614; font-size: .74rem; font-weight: 800; letter-spacing: .06em; }
.guild-theme .care-today-group .care-today-chips { margin: .2rem 0 .3rem; }
.guild-theme .care-today-chip.is-optional:not(.is-done) { border-style: dashed; background: #fbf0d7; }
