/* Health Quest: new game-screen design (Audi 2026-10-18). Loaded last; night = default, day = html[data-theme="light"]. */
.guild-theme {
  --hq-win: rgba(16, 12, 34, .9);
  --hq-win-2: rgba(28, 22, 54, .92);
  --hq-ink: #fff3d6;
  --hq-ink-2: #d9ccef;
  --hq-gold: #ffd56a;
  --hq-sky-1: #070b24; --hq-sky-2: #161a48; --hq-sky-3: #2c2458;
  --hq-scene: url('health-rpg/scene-night.png');
  --hq-scene-top: #070b24;
  background: linear-gradient(180deg, var(--hq-sky-1) 0, var(--hq-sky-2) 420px, var(--hq-sky-3) 1400px, #1b1636 100%) fixed !important;
}
html[data-theme="light"] .guild-theme {
  /* day keeps the same deep game windows over a bright sky (brown boards read as the retired wood) */
  --hq-win: rgba(22, 18, 48, .92);
  --hq-win-2: rgba(34, 28, 66, .95);
  --hq-sky-1: #5cb2f2; --hq-sky-2: #a8dafc; --hq-sky-3: #e4f4ff;
  --hq-scene: url('health-rpg/scene-day.png');
  --hq-scene-top: #3f9be8;
  background: linear-gradient(180deg, var(--hq-sky-1) 0, var(--hq-sky-2) 420px, var(--hq-sky-3) 1200px, #f3ead8 100%) fixed !important;
}
/* night sky: pixel stars over the whole page; day: hidden */
.guild-theme::before {
  opacity: 1 !important; mask-image: none !important;
  background-image:
    radial-gradient(1px 1px at 12% 18%, #fff6d8 99%, transparent), radial-gradient(1px 1px at 33% 42%, #9fb4ff 99%, transparent),
    radial-gradient(1px 1px at 58% 12%, #fff6d8 99%, transparent), radial-gradient(2px 2px at 76% 33%, #fff6d8 99%, transparent),
    radial-gradient(1px 1px at 88% 64%, #9fb4ff 99%, transparent), radial-gradient(1px 1px at 22% 78%, #fff6d8 99%, transparent),
    radial-gradient(2px 2px at 46% 70%, #fff6d8 99%, transparent), radial-gradient(1px 1px at 67% 88%, #9fb4ff 99%, transparent) !important;
  background-size: 420px 380px !important;
}
html[data-theme="light"] .guild-theme::before { background-image: none !important; }

/* ---------- hide the old hero + duplicated rows (their buttons stay as the owners the HUD presses) ---------- */
body.has-hq-hud .health-hero,
body.has-hq-hud #today-panel .quick-action-zone,
body.has-hq-hud #today-panel .today-cockpit > .section-heading,
body.has-hq-hud #today-panel .macro-card:is(.protein, .calories) { display: none !important; }

/* ---------- pixel window frame shared by HUD + every section ---------- */
.hq-window,
.guild-theme :is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel):is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel) > :is(section:not(.hq-room), details, .care-today),
.guild-theme #workout-panel#workout-panel .training-week,
.guild-theme #haumea-sync-summary,
.guild-theme .health-tabs {
  border: 8px solid transparent !important;
  border-image: url('health-rpg/frame.png') 4 / 8px / 0 stretch !important;
  border-radius: 0 !important;
  background: var(--hq-win) !important;
  box-shadow: 0 10px 0 rgba(0, 0, 0, .28), 0 18px 40px rgba(0, 0, 0, .35) !important;
  image-rendering: pixelated;
}
.guild-theme :is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel):is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel) > :is(section:not(.hq-room), details, .care-today)::before,
.guild-theme :is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel):is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel) > :is(section:not(.hq-room), details, .care-today)::after { display: none !important; }
.guild-theme :is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel):is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel) > :is(section:not(.hq-room), details, .care-today) { margin-bottom: 1.25rem !important; }
.guild-theme .health-panel :is(.section-heading, .daily-adventure-heading) h2,
.guild-theme .health-panel > section > h2 {
  font-family: 'Silkscreen', var(--font-display) !important; letter-spacing: .01em; color: var(--hq-ink) !important;
  text-shadow: 0 2px 0 #000;
}
.guild-theme .health-panel :is(.section-heading, .daily-adventure-heading) > div > p,
.guild-theme .health-panel .section-heading p { color: var(--hq-gold) !important; }
.guild-theme .health-panel :is(.section-heading, .daily-adventure-heading) > div > :is(span, small):not([class]) { color: var(--hq-ink-2) !important; }

/* Train's layout is only a grid: its week board carries the frame, never a frame around a frame. */
.guild-theme #workout-panel#workout-panel > .training-layout { border: 0 !important; background: none !important; box-shadow: none !important; }

/* ---------- HUD ---------- */
.hq-hud { position: relative; margin: 0 0 1.25rem; isolation: isolate; }
.hq-scene {
  position: absolute; inset: 0 0 46px; z-index: -1; border: 8px solid transparent;
  border-image: url('health-rpg/frame.png') 4 / 8px / 0 stretch;
  background: var(--hq-scene) repeat-x 42% bottom / 2160px 540px, var(--hq-scene-top);
  image-rendering: pixelated; box-shadow: 0 14px 40px rgba(0, 0, 0, .45);
}
.hq-stage {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(330px, 420px); grid-template-rows: auto 1fr;
  grid-template-areas: "title status" "lane status"; align-items: end; column-gap: 1rem;
  min-height: 400px; padding: 1.6rem 1.6rem 4.6rem;
}
.hq-title { grid-area: title; align-self: start; }
.hq-eyebrow {
  display: inline-block; margin: 0 0 .5rem; padding: .2rem .6rem; border-radius: 6px; color: var(--hq-gold);
  background: rgba(10, 8, 22, .62); font: 700 .9rem/1.3 'Outfit', sans-serif;
}
.hq-title h1 {
  margin: 0; color: #fff6dc; font: 700 clamp(2.2rem, 4.4vw, 3.6rem)/1 'Silkscreen', var(--font-display); letter-spacing: .01em;
  text-shadow: 0 3px 0 #2b1a0e, 0 0 24px rgba(255, 213, 106, .35);
}
.hq-info { margin-top: .9rem; max-width: 30rem; color: var(--hq-ink); }
.guild-theme #hq-hud .hq-info > summary {
  display: inline-flex; align-items: center; gap: .4rem; min-height: 40px; padding: .35rem .8rem; border-radius: 6px; cursor: pointer;
  color: var(--hq-ink) !important; background: rgba(10, 8, 22, .7) !important; border: 1px solid rgba(255, 213, 106, .45); font-size: .88rem; font-weight: 700;
}
.hq-info > summary::before { content: 'ℹ️'; }
.hq-info[open] { padding: .7rem .85rem; border-radius: 8px; background: rgba(10, 8, 22, .86); border: 1px solid rgba(255, 213, 106, .45); }
.hq-info[open] > summary { margin-bottom: .6rem; }
.guild-theme #hq-hud .hq-info :is(span, strong) { color: var(--hq-ink-2) !important; font-size: .85rem; line-height: 1.55; }
.hq-info .health-quicklinks { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .6rem; }
.hq-info .health-quicklinks a { padding: .3rem .65rem; border-radius: 999px; color: #2b1a0e !important; background: #ffe08a; border-color: #ffd56a !important; font-weight: 700; font-size: .85rem; text-decoration: none; }
.hq-info .health-quicklinks a:focus-visible, .hq-info > summary:focus-visible { outline: 3px solid var(--hq-gold); outline-offset: 2px; }
html[data-theme="light"] .hq-title h1 { color: #2b1a0e; text-shadow: 0 3px 0 #ffe08a, 0 0 18px rgba(255, 255, 255, .5); }
.hq-lane { grid-area: lane; position: relative; align-self: stretch; min-height: 290px; }
.hq-char {
  position: absolute; bottom: 0; left: 28%; margin: 0; display: grid; justify-items: center; width: 200px; translate: -50% 0;
}
.hq-char-btn { padding: 0; border: 0; background: none; cursor: pointer; display: block; }
.hq-char-btn:focus-visible { outline: 3px solid var(--hq-gold); outline-offset: 4px; border-radius: 8px; }
.hq-char[data-face="left"] .hq-char-img { scale: -1 1; }
.hq-char[data-act="walk"] .hq-char-img { animation: hq-walk .32s steps(2) infinite; }
.hq-char[data-act="wave"] .hq-char-img { animation: hq-wave .7s steps(2) 3; }
.hq-char[data-act="nod"] .hq-char-img { animation: hq-bob .5s steps(2) 4; }
.hq-char[data-act="sit"] .hq-char-img { animation: none; }
.hq-char[data-act="jump"] .hq-char-img { animation: hq-jump .7s steps(4) 2; }
.hq-bubble {
  position: absolute; bottom: calc(100% + 6px); left: 50%; translate: -50% 0; z-index: 3; width: max-content; max-width: 240px;
  padding: .45rem .7rem; border-radius: 6px; color: #2b1a0e; background: #fffaf0; border: 2px solid #2b1a0e;
  box-shadow: 0 3px 0 rgba(0, 0, 0, .35); font: 700 .88rem/1.35 'Outfit', sans-serif; text-align: center;
  opacity: 0; transform: translateY(6px); transition: opacity .18s steps(3), transform .18s steps(3); pointer-events: none;
}
.hq-bubble::after { content: ''; position: absolute; top: 100%; left: 50%; margin-left: -6px; border: 6px solid transparent; border-top-color: #2b1a0e; }
.hq-bubble.is-on { opacity: 1; transform: none; }
.hq-bubble:empty { display: none; }
.hq-nameplate { position: relative; z-index: 2; }
.hq-char-img { width: 200px; height: auto; image-rendering: pixelated; filter: drop-shadow(0 4px 0 rgba(0, 0, 0, .35)); animation: hq-bob 1.4s steps(2) infinite; }
.hq-char-shadow { width: 120px; height: 14px; margin-top: -10px; border-radius: 50%; background: rgba(0, 0, 0, .35); }
.hq-nameplate {
  display: inline-flex; align-items: baseline; gap: .45rem; margin-bottom: .4rem; padding: .3rem .8rem; border-radius: 6px;
  color: #fff; background: rgba(10, 8, 22, .72); border: 1px solid rgba(255, 213, 106, .55); font: 700 .95rem/1.2 'Outfit', sans-serif;
}
.hq-nameplate small { color: var(--hq-gold); font-weight: 800; }
.hq-status { grid-area: status; position: relative; padding: .9rem 1rem 1rem; color: var(--hq-ink); }
.hq-window-title { display: flex; align-items: center; gap: .55rem; margin: -.2rem 0 .7rem; padding-bottom: .55rem; border-bottom: 2px solid rgba(255, 213, 106, .25); }
.hq-window-title .rpg-icon { width: 32px; height: 32px; }
.hq-window-title strong { font: 700 1.25rem/1 'Silkscreen', sans-serif; color: var(--hq-gold); }
.hq-window-title small { margin-left: auto; color: var(--hq-ink-2); font-size: .85rem; }
.hq-level { display: grid; grid-template-columns: 1fr auto; gap: .3rem .6rem; align-items: baseline; margin-bottom: .75rem; }
.hq-level b { font-size: 1.05rem; }
.hq-level span { color: var(--hq-ink-2); font-size: .85rem; font-variant-numeric: tabular-nums; }
.hq-exp { grid-column: 1 / -1; display: block; height: 10px; background: #0a0816; border: 1px solid #3c3560; }
.hq-exp i { display: block; height: 100%; width: var(--fill); background: linear-gradient(180deg, #a8f07a, #4fb84a); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45); }
.hq-bars { display: grid; gap: .55rem; }
.hq-bar {
  display: grid; gap: .25rem; width: 100%; padding: .45rem .55rem; text-align: left; color: inherit; cursor: pointer;
  background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .08); border-radius: 6px; font: inherit;
}
.hq-bar:hover { background: rgba(255, 255, 255, .09); }
.hq-bar:focus-visible { outline: 3px solid var(--hq-gold); outline-offset: 2px; }
.hq-bar-head { display: flex; justify-content: space-between; gap: .6rem; font-size: .95rem; }
.hq-bar-label { font-weight: 700; }
.hq-bar-value { font-variant-numeric: tabular-nums; font-weight: 700; }
.hq-bar-track { display: block; height: 12px; background: #0a0816; border: 1px solid #3c3560; box-shadow: inset 0 2px 0 rgba(0, 0, 0, .5); }
.hq-bar-fill { display: block; height: 100%; width: var(--fill); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .35); transition: width .6s steps(8); }
.hq-bar--protein .hq-bar-fill { background: linear-gradient(180deg, #ff9a5a, #d84a2a); }
.hq-bar--energy .hq-bar-fill { background: linear-gradient(180deg, #7ac4ff, #2f72d8); }
.hq-bar--quest .hq-bar-fill { background: linear-gradient(180deg, #ffe08a, #d89a2a); }
.hq-bar.is-done .hq-bar-fill { background: linear-gradient(180deg, #a8f07a, #3ea84a); }
.hq-bar.is-over .hq-bar-fill { background: linear-gradient(180deg, #ffd07a, #e08a1a); }
.hq-bar-note { font-size: .82rem; color: var(--hq-ink-2); }
.hq-bar.is-done .hq-bar-note { color: #a8f07a; font-weight: 700; }
.hq-bar.is-over .hq-bar-note { color: #ffc46a; font-weight: 700; }
.hq-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: .35rem; margin: .8rem 0 0; padding: 0; list-style: none; }
.hq-stat {
  display: grid; justify-items: center; gap: .1rem; padding: .35rem .2rem; border-radius: 6px;
  background: rgba(0, 0, 0, .28); border: 1px solid rgba(255, 213, 106, .22);
}
.hq-stat .rpg-icon { width: 32px; height: 32px; }
.hq-stat b { font-size: .78rem; color: var(--hq-gold); }
.hq-stat span { font-size: .78rem; color: var(--hq-ink); font-variant-numeric: tabular-nums; }
.hq-streak { margin: .7rem 0 0; font-size: .88rem; color: var(--hq-ink-2); }
.hq-streak.is-on { color: #ffc46a; font-weight: 700; }

.hq-actions {
  position: relative; z-index: 2; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem;
  margin: -64px 1.6rem 0;
}
.hq-action {
  display: flex; align-items: center; gap: .75rem; min-height: 92px; padding: .6rem .8rem; text-align: left; cursor: pointer;
  color: var(--hq-ink); font: inherit;
  border: 8px solid transparent; border-image: url('health-rpg/frame.png') 4 / 8px / 0 stretch;
  background: var(--hq-win-2); image-rendering: pixelated; box-shadow: 0 8px 0 rgba(0, 0, 0, .3);
  transition: transform .12s steps(2);
}
.hq-action:first-child { background: linear-gradient(180deg, #5a3a12, #3a240c); }
.hq-action:hover { transform: translateY(-3px); }
.hq-action:active { transform: translateY(1px); }
.hq-action:focus-visible { outline: 3px solid var(--hq-gold); outline-offset: 3px; }
.hq-action-slot {
  display: grid; place-items: center; flex: none; width: 64px; height: 64px; border-radius: 6px;
  background: radial-gradient(circle at 40% 35%, #4a3a6a, #140f26); border: 2px solid #c48a24;
}
.hq-action:first-child .hq-action-slot { background: radial-gradient(circle at 40% 35%, #7a5a20, #2a1a08); }
.hq-action-slot .rpg-icon { width: 48px; height: 48px; image-rendering: auto; }
.hq-action:hover .hq-action-slot .rpg-icon { animation: hq-bob .5s steps(2) 2; }
.hq-action-copy { display: grid; gap: .15rem; min-width: 0; }
.hq-action-copy strong { font-size: 1.05rem; line-height: 1.2; }
.hq-action-copy small { color: var(--hq-ink-2); font-size: .82rem; }

/* ---------- game menu (tabs) ---------- */
.guild-theme .health-tabs { padding: .35rem !important; gap: .3rem !important; }
.guild-theme .health-tab {
  color: var(--hq-ink) !important; background: transparent !important; border: 2px solid transparent !important; border-radius: 6px !important; box-shadow: none !important;
}
.guild-theme .health-tab:hover { background: rgba(255, 255, 255, .07) !important; }
.guild-theme .health-tab.active {
  color: #2b1a0e !important; background: linear-gradient(180deg, #ffe08a, #e6ad3a) !important; border-color: #7a4a12 !important;
}

/* ---------- Today: the HUD owns the nutrition summary; the rest become game tiles ---------- */
body.has-hq-hud #today-panel :is(.macro-grid, #today-nutrition-context, .today-status-help) { display: none !important; }
.guild-theme #today-panel .today-cockpit { padding: 1rem !important; }
.hq-minis { display: grid; grid-template-columns: 1fr 1fr; gap: .55rem; }
.hq-bar--mini { padding: .35rem .5rem; }
.hq-bar--mini .hq-bar-head { font-size: .85rem; flex-wrap: wrap; }
.hq-bar--mini .hq-bar-track { height: 8px; }
.hq-bar--mini .hq-bar-note { font-size: .78rem; }
.hq-bar--carbs .hq-bar-fill { background: linear-gradient(180deg, #f2e6b8, #c8a65a); }
.hq-bar--fat .hq-bar-fill { background: linear-gradient(180deg, #c8f08a, #7aa83a); }
.hq-meals { margin: .55rem 0 0; font-size: .85rem; color: var(--hq-ink-2); }
.guild-theme #today-panel .today-grid { gap: .75rem !important; }
.guild-theme #today-panel .decision-card.hq-tile,
.guild-theme #today-panel .today-journal-action {
  position: relative; display: grid !important; grid-template-columns: 64px minmax(0, 1fr); column-gap: .85rem; align-items: center;
  min-height: 112px; padding: .85rem 2.2rem .85rem .85rem !important; text-align: left;
  color: var(--hq-ink) !important; background: var(--hq-win-2) !important; border: 2px solid rgba(255, 213, 106, .35) !important;
  border-radius: 8px !important; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06) !important; cursor: pointer;
}
.guild-theme #today-panel .decision-card.hq-tile:hover,
.guild-theme #today-panel .today-journal-action:hover { border-color: var(--hq-gold) !important; background: rgba(48, 38, 86, .95) !important; }

.guild-theme #today-panel .decision-card.hq-tile > :not(.hq-tile-icon) { grid-column: 2; }
.guild-theme #today-panel .hq-tile-icon,
.guild-theme #today-panel .today-journal-action > .rpg-icon-slot {
  grid-row: 1 / span 3; display: grid; place-items: center; width: 64px; height: 64px; border-radius: 8px; font-size: 0;
  background: radial-gradient(circle at 40% 35%, #4a3a6a, #140f26); border: 2px solid #c48a24;
}
.guild-theme #today-panel .today-journal-action > .rpg-icon-slot { grid-row: auto; }
.guild-theme #today-panel :is(.hq-tile-icon, .today-journal-action > .rpg-icon-slot) .rpg-icon { width: 48px; height: 48px; image-rendering: auto; }
.guild-theme #today-panel .decision-card.hq-tile p { margin: 0 0 .2rem !important; color: var(--hq-gold) !important; font-size: .78rem !important; letter-spacing: .06em; }
.guild-theme #today-panel .decision-card.hq-tile h3 { margin: 0 !important; color: var(--hq-ink) !important; font-size: 1.1rem !important; }
.guild-theme #today-panel .decision-card.hq-tile span:not(.hq-tile-icon),
.guild-theme #today-panel .today-journal-action small { color: var(--hq-ink-2) !important; font-size: .88rem !important; line-height: 1.5; }
.guild-theme #today-panel .today-journal-action strong { color: var(--hq-ink) !important; font-size: 1.05rem; }
.guild-theme #today-panel .today-journal-action { grid-template-columns: 64px minmax(0, 1fr) auto; min-height: 96px; padding-right: 1rem !important; }
.guild-theme #today-panel .today-journal-action > span:not(.rpg-icon-slot) { display: grid; gap: .2rem; }
.guild-theme #today-panel .today-journal-action > i {
  font-style: normal; font-weight: 800; white-space: nowrap; padding: .55rem .9rem; border-radius: 6px;
  color: #2b1a0e !important; background: linear-gradient(180deg, #ffe08a, #e6ad3a); border: 2px solid #7a4a12;
}
.guild-theme #today-panel .decision-card.hq-tile::after { content: '›' !important; display: block !important; position: absolute; right: .9rem; top: 50%; transform: translateY(-50%); color: var(--hq-gold); font-size: 1.6rem; }

@media (max-width: 980px) {
  .hq-stage { grid-template-columns: minmax(0, 1fr) minmax(300px, 380px); min-height: 0; }
  .hq-char-img { width: 170px; }
  .hq-char { width: 170px; }
  .hq-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: -56px; }
}
@media (max-width: 640px) {
  .hq-scene { inset: 0 0 auto; height: var(--hq-scene-h, 300px); background-size: 1080px 270px, auto; background-position: 38% bottom, 0 0; }
  .hq-status { margin-top: 14px; }
  .hq-stage { grid-template-columns: 1fr; grid-template-rows: auto; grid-template-areas: "title" "lane" "actions" "status"; padding: 1.1rem .75rem 1rem; gap: .6rem; }
  .hq-stage > .hq-actions { grid-area: actions; margin: 0 !important; }
  .hq-lane { min-height: 190px; }
  .hq-char { width: 140px; }
  .hq-bubble { max-width: 200px; font-size: .82rem; }
  .hq-title h1 { font-size: 2.1rem; }
  .hq-char-img { width: 140px; }
  .hq-actions { margin: .75rem 0 0; gap: .5rem; }
  .hq-action { min-height: 76px; padding: .45rem .5rem; gap: .5rem; }
  .hq-action-slot { width: 48px; height: 48px; }
  .hq-action-slot .rpg-icon { width: 32px; height: 32px; image-rendering: pixelated; }
  .hq-action-copy strong { font-size: .95rem; }
}
@keyframes hq-bob { 50% { transform: translateY(-4px); } }
@keyframes hq-walk { 50% { transform: translateY(-5px) rotate(-2deg); } }
@keyframes hq-wave { 50% { transform: rotate(-4deg); } }
@keyframes hq-jump { 0%, 100% { transform: none; } 50% { transform: translateY(-34px); } }
@keyframes hq-cheer { 50% { transform: translateY(-10px); } }
@media (prefers-reduced-motion: reduce) { .hq-char-img, .hq-action-slot .rpg-icon, .hq-bar-fill, .hq-room-img, .hq-room-title .rpg-icon, .hq-char, .hq-bubble { animation: none !important; transition: none !important; } }
html[data-motion="paused"] :is(.hq-char-img, .hq-action-slot .rpg-icon, .hq-room-img, .hq-room-title .rpg-icon) { animation: none !important; }

/* ---------- Today hero only on Today; every other tab opens on its own pixel room ---------- */
body[data-hq-tab]:not([data-hq-tab="today"]) .hq-hud { display: none; }
.hq-room {
  position: relative; display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem;
  min-height: 192px; margin: 0 0 1.25rem; padding: 1rem 1.2rem .4rem; overflow: hidden;
  border: 8px solid transparent; border-image: url('health-rpg/frame.png') 4 / 8px / 0 stretch; image-rendering: pixelated;
  background: var(--hq-room) repeat-x left bottom / 1440px 192px, #1a1430;
  box-shadow: 0 10px 0 rgba(0, 0, 0, .28), 0 18px 40px rgba(0, 0, 0, .35);
}
.hq-room-title { align-self: flex-start; display: flex; align-items: center; gap: .6rem; padding: .35rem .8rem .35rem .45rem; border-radius: 8px; background: rgba(10, 8, 22, .72); border: 1px solid rgba(255, 213, 106, .5); }
.hq-room-title .rpg-icon { width: 48px; height: 48px; animation: hq-bob 1.6s steps(2) infinite; }
.hq-room-title h2 { margin: 0; color: #fff3d6; font: 700 clamp(1.6rem, 3vw, 2.2rem)/1 'Silkscreen', var(--font-display); text-shadow: 0 2px 0 #000; }
.hq-room-npc { position: relative; margin: 0 4% 0 0; display: grid; justify-items: center; }
.hq-room-img { width: 150px; height: auto; image-rendering: pixelated; filter: drop-shadow(0 4px 0 rgba(0, 0, 0, .35)); animation: hq-bob 1.6s steps(2) infinite; }
.hq-room .hq-room-tip { bottom: 58%; left: auto; right: calc(100% + 4px); translate: 0 0; max-width: 260px; text-align: left; }
.hq-room .hq-room-tip::after { top: 50%; left: 100%; margin: -6px 0 0; border-top-color: transparent; border-left-color: #2b1a0e; }
.hq-room[data-room="calendar"] { --hq-room: url('health-rpg/rooms/calendar-night.png'); }
html[data-theme="light"] .hq-room[data-room="calendar"] { --hq-room: url('health-rpg/rooms/calendar-day.png'); }
.hq-room[data-room="add"] { --hq-room: url('health-rpg/rooms/add-night.png'); }
html[data-theme="light"] .hq-room[data-room="add"] { --hq-room: url('health-rpg/rooms/add-day.png'); }
.hq-room[data-room="workout"] { --hq-room: url('health-rpg/rooms/workout-night.png'); }
html[data-theme="light"] .hq-room[data-room="workout"] { --hq-room: url('health-rpg/rooms/workout-day.png'); }
.hq-room[data-room="food"] { --hq-room: url('health-rpg/rooms/food-night.png'); }
html[data-theme="light"] .hq-room[data-room="food"] { --hq-room: url('health-rpg/rooms/food-day.png'); }
.hq-room[data-room="mental"] { --hq-room: url('health-rpg/rooms/mental-night.png'); }
html[data-theme="light"] .hq-room[data-room="mental"] { --hq-room: url('health-rpg/rooms/mental-day.png'); }
.hq-room[data-room="care"] { --hq-room: url('health-rpg/rooms/care-night.png'); }
html[data-theme="light"] .hq-room[data-room="care"] { --hq-room: url('health-rpg/rooms/care-day.png'); }
.hq-room[data-room="body"] { --hq-room: url('health-rpg/rooms/body-night.png'); }
html[data-theme="light"] .hq-room[data-room="body"] { --hq-room: url('health-rpg/rooms/body-day.png'); }
.hq-room[data-room="insights"] { --hq-room: url('health-rpg/rooms/insights-night.png'); }
html[data-theme="light"] .hq-room[data-room="insights"] { --hq-room: url('health-rpg/rooms/insights-day.png'); }
.hq-room[data-room="profile"] { --hq-room: url('health-rpg/rooms/profile-night.png'); }
html[data-theme="light"] .hq-room[data-room="profile"] { --hq-room: url('health-rpg/rooms/profile-day.png'); }
@media (max-width: 640px) {
  .hq-room { min-height: 210px; padding: .7rem .7rem .3rem; background-size: 1080px 144px, auto; background-position: right bottom, 0 0; }
  .hq-room .hq-room-tip { bottom: 14px; }
  .hq-room-title .rpg-icon { width: 32px; height: 32px; }
  .hq-room-img { width: 110px; }
  .hq-room .hq-room-tip { max-width: 150px; font-size: .8rem; }
}

/* ---------- one look for leftover boxes (classified by health-rpg.js) ---------- */
.guild-theme :is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel):is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel) [data-hqs="paper"] {
  border: 2px solid #2b1a0e !important; border-radius: 4px !important;
  box-shadow: inset 0 0 0 2px rgba(255, 240, 200, .85), inset 0 -4px 0 rgba(120, 80, 30, .16), 0 4px 0 rgba(0, 0, 0, .38) !important;
}
.guild-theme :is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel):is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel) [data-hqs="paper-inner"] { border-radius: 4px !important; box-shadow: none !important; }
.guild-theme :is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel):is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel) [data-hqs="wood"] {
  background-image: none !important;
  background: var(--hq-win-2) !important; border: 2px solid rgba(255, 213, 106, .35) !important; border-radius: 6px !important; box-shadow: none !important;
}
.guild-theme :is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel):is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel) [data-hqs="wood"]::before, .guild-theme :is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel):is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel) [data-hqs="wood"]::after { background: none !important; }

/* ---------- footer joins the night (day: dusk wood) ---------- */
/* night only: the day theme keeps the site's own light footer (its dark TikTok logo vanished on a night footer, cold review 2026-10-18) */
html:not([data-theme="light"]) body.guild-theme footer { background: linear-gradient(180deg, #110d26, #07061a) !important; border-top: 3px solid #c48a24 !important; }

/* text the page wrote in dark ink that now sits on a dark game window (found by health-rpg.js) */
.guild-theme .hq-on-dark { color: var(--hq-ink) !important; }
.guild-theme small.hq-on-dark, .guild-theme .hq-on-dark small { color: var(--hq-ink-2) !important; }
/* locked / not-yet items: never fade text with opacity; dashed edge + quiet paper instead */
.guild-theme .food-topup-item.is-locked, .guild-theme .badge:not(.unlocked) { opacity: 1 !important; }

.guild-theme .quest-stat-badge.stat-vit { color: #14501f !important; }
.guild-theme .import-label { color: #2b1a0e !important; }

/* Silkscreen is wide: section headings stay ≤ 1.75rem and wrap instead of running off the window */
.guild-theme .health-panel :is(.section-heading, .daily-adventure-heading) h2,
.guild-theme .health-panel > section > h2,
.guild-theme .health-panel h2[style*="Silkscreen"] {
  font-size: clamp(1.2rem, 2.3vw, 1.75rem) !important; line-height: 1.2 !important; letter-spacing: 0 !important;
  white-space: normal !important; overflow-wrap: anywhere; min-width: 0; max-width: 100%;
}
.guild-theme .health-panel :is(.section-heading, .daily-adventure-heading) > div { min-width: 0; }
/* one height for text inputs and dropdowns that share a row */
.guild-theme .health-panel :is(select, input[type="text"], input[type="number"], input[type="date"], input[type="time"], input[type="url"], input:not([type])) {
  height: 50px; min-height: 50px; box-sizing: border-box;
}
/* quest title rows wrap on narrow cards so "Complete ✓" stays inside the card */
.guild-theme .quest-title-line { flex-wrap: wrap; row-gap: .3rem; }
.guild-theme .quest-title-left { min-width: 0; flex: 1 1 auto; }
.guild-theme .score-card-copy strong { display: block; margin-top: .3rem; line-height: 1.05; }

.hq-stat-hint { margin: .45rem 0 0; font-size: .8rem; color: var(--hq-ink-2); }
/* keep the action bar on a laptop's first screen */
@media (min-width: 981px) and (max-height: 920px) {
  .hq-stage { min-height: 0; padding-top: 1.1rem; padding-bottom: 4.2rem; }
  .hq-lane { min-height: 240px; }
  .hq-char, .hq-char-img { width: 170px; }
}

.guild-theme .food-topup-item.is-locked .food-topup-log { opacity: 1 !important; color: #3a2a1a !important; border-color: #8a7356 !important; }
.guild-theme button.hq-on-dark:not([class*="primary"]) { border-color: rgba(255, 213, 106, .6) !important; }

/* same weight as the old double-id panel rules, so the fixes actually apply */
.guild-theme :is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel):is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel) .hq-on-dark { color: var(--hq-ink) !important; }
.guild-theme :is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel):is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel) small.hq-on-dark { color: var(--hq-ink-2) !important; }

.guild-theme :is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel):is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel) .bq-empty { background: #f3e9d4 !important; color: #3a2a1a !important; }

/* =====================================================================
   Health Quest components v2 (Audi 2026-10-18 05:50: "สีกล่อง สีปุ่มมันดูไม่ค่อยน่ากด แถมเป็นสี่เหลี่ยมแบบ AI
   … ตอนกดเข้าไปดู detail เหมือนกัน … กล่องขอบเหลี่ยมๆ สีครีมๆ หรือน้ำตาล … กล่องในกล่อง").
   Windows = rounded jewel-edged game panels. Inner items = soft slots on the window (no cream, no brown,
   no box in a box). Buttons = chunky game buttons with depth that press down.
   ===================================================================== */
.guild-theme {
  --hq-edge: linear-gradient(135deg, #ffe9a6 0%, #d99a2e 28%, #7a5bd0 62%, #ffd56a 100%);
  --hq-panel: linear-gradient(180deg, rgba(40, 33, 86, .94) 0%, rgba(20, 16, 46, .95) 100%);
  --hq-slot: rgba(255, 255, 255, .055);
  --hq-slot-line: rgba(255, 255, 255, .11);
}
/* ---- windows: rounded, gold-violet jewel edge, top sheen, corner gems ---- */
.guild-theme :is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel):is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel) > :is(section:not(.hq-room), details, .care-today),
.guild-theme #workout-panel#workout-panel .training-week,
.guild-theme #haumea-sync-summary,
.guild-theme .health-tabs,
.hq-window,
.guild-theme :is(#card-detail-modal, #quick-log-window, #training-exercise-modal) {
  position: relative;
  border: 2px solid transparent !important;
  border-image: none !important;
  border-radius: 20px !important;
  background: var(--hq-panel) padding-box, var(--hq-edge) border-box !important;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .45), 0 16px 34px rgba(4, 2, 16, .45), inset 0 1px 0 rgba(255, 255, 255, .12) !important;
}
.hq-scene, .hq-room {
  border: 2px solid transparent !important; border-image: none !important; border-radius: 20px !important; overflow: hidden;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .45), 0 16px 34px rgba(4, 2, 16, .45) !important;
}
.hq-scene { background: var(--hq-scene) repeat-x 42% bottom / 2160px 540px padding-box, linear-gradient(var(--hq-scene-top), var(--hq-scene-top)) padding-box, var(--hq-edge) border-box !important; }
.hq-room { background: var(--hq-room) repeat-x left bottom / 1440px 192px padding-box, linear-gradient(#1a1430, #1a1430) padding-box, var(--hq-edge) border-box !important; }
@media (max-width: 640px) {
  .hq-scene { background-size: 1080px 270px, auto, auto !important; background-position: 38% bottom, 0 0, 0 0 !important; }
  .hq-room { background-size: 1080px 144px, auto, auto !important; background-position: right bottom, 0 0, 0 0 !important; }
}
.guild-theme :is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel):is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel) > :is(section:not(.hq-room), details, .care-today)::before {
  content: '' !important; display: block !important; position: absolute; top: -7px; left: 22px; width: 12px; height: 12px; z-index: 2;
  background: radial-gradient(circle at 35% 30%, #fff6c8, #ffd56a 40%, #b8781e 75%) !important; transform: rotate(45deg); border-radius: 2px;
  box-shadow: 0 0 0 2px #1a1236, 0 0 10px rgba(255, 213, 106, .6) !important;
}
.guild-theme :is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel):is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel) > :is(section:not(.hq-room), details, .care-today)::after { display: none !important; }

/* ---- slots: every leftover card becomes a soft rounded slot on the window; inner cards are not boxed again ---- */
.guild-theme :is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel):is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel) [data-hqs="paper"][data-hqs], .guild-theme :is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel):is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel) [data-hqs="wood"][data-hqs],
.guild-theme :is(#card-detail-modal, #quick-log-window, #training-exercise-modal) [data-hqs="paper"][data-hqs], .guild-theme :is(#card-detail-modal, #quick-log-window, #training-exercise-modal) [data-hqs="wood"][data-hqs] {
  background: var(--hq-slot) !important; background-image: none !important;
  border: 1px solid var(--hq-slot-line) !important; border-radius: 14px !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06) !important;
}
.guild-theme :is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel):is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel) [data-hqs][data-hqs][data-tint], .guild-theme :is(#card-detail-modal, #quick-log-window, #training-exercise-modal) [data-hqs][data-hqs][data-tint] {
  background: linear-gradient(135deg, color-mix(in srgb, var(--hq-tint) 26%, transparent), color-mix(in srgb, var(--hq-tint) 8%, transparent)) !important;
  border-color: color-mix(in srgb, var(--hq-tint) 55%, transparent) !important;
}
.guild-theme :is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel):is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel) [data-hqs="paper-inner"][data-hqs], .guild-theme :is(#card-detail-modal, #quick-log-window, #training-exercise-modal) [data-hqs="paper-inner"][data-hqs] {
  background: transparent !important; background-image: none !important; border: 0 !important; box-shadow: none !important; border-radius: 12px !important;
}
.guild-theme :is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel):is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel) [data-hqs="paper-inner"][data-hqs][data-hqs][data-tint], .guild-theme :is(#card-detail-modal, #quick-log-window, #training-exercise-modal) [data-hqs="paper-inner"][data-hqs][data-hqs][data-tint] {
  background: color-mix(in srgb, var(--hq-tint) 16%, transparent) !important;
}
.guild-theme :is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel):is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel) [data-hqs]:is(:hover):is(button, a, [role="button"], article[tabindex], .decision-card, .habit-card, .food-topup-item) {
  border-color: rgba(255, 213, 106, .55) !important; background-color: rgba(255, 255, 255, .09) !important;
}

/* ---- game buttons: depth, gradient, press ---- */
.guild-theme :is(:is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel), :is(#card-detail-modal, #quick-log-window, #training-exercise-modal)) :is(.primary-action, .success-action, .complete-button, .food-log-button, .hero-log-action),
.hq-actions .hq-action:first-child {
  border: 0 !important; border-radius: 12px !important; color: #2b1a0e !important; font-weight: 800 !important;
  background: linear-gradient(180deg, #fff0a8 0%, #ffcf4a 45%, #e6981e 100%) !important;
  box-shadow: 0 4px 0 #8a4f0e, 0 9px 18px rgba(240, 170, 40, .3), inset 0 1px 0 rgba(255, 255, 255, .7) !important;
  transition: transform .08s steps(2), box-shadow .08s steps(2), filter .12s;
}
.guild-theme :is(:is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel), :is(#card-detail-modal, #quick-log-window, #training-exercise-modal)) :is(.secondary-action, .text-action, .ledger-action, .mental-action, .universal-intake-action, .care-edit-button, .habit-edit, .routine-edit, .context-edit-trigger, .cancel-edit, .detail-task-edit, .upload-btn, .food-photo-button, .training-photo-button, .notion-refresh-action),
.guild-theme #health-undo-bar .health-undo-button {
  border: 1px solid rgba(170, 150, 255, .45) !important; border-radius: 12px !important; color: #fff3d6 !important; font-weight: 700 !important;
  background: linear-gradient(180deg, #5a4bb0 0%, #3a2f86 100%) !important;
  box-shadow: 0 3px 0 #1a1446, inset 0 1px 0 rgba(255, 255, 255, .22) !important; text-decoration: none !important;
  transition: transform .08s steps(2), box-shadow .08s steps(2), filter .12s;
}
.guild-theme :is(:is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel), :is(#card-detail-modal, #quick-log-window, #training-exercise-modal)) :is(.danger-row-action, .danger-action) {
  border: 0 !important; border-radius: 12px !important; color: #fff !important; font-weight: 800 !important;
  background: linear-gradient(180deg, #d8473c 0%, #941c14 100%) !important;
  box-shadow: 0 3px 0 #5a0f0a, inset 0 1px 0 rgba(255, 255, 255, .35) !important;
  transition: transform .08s steps(2), box-shadow .08s steps(2), filter .12s;
}
.guild-theme :is(:is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel), :is(#card-detail-modal, #quick-log-window, #training-exercise-modal)) :is(.primary-action, .secondary-action, .text-action, .danger-row-action, .danger-action, .success-action, .ledger-action, .mental-action, .universal-intake-action, .routine-edit, .habit-edit, .care-edit-button, .context-edit-trigger, .cancel-edit, .complete-button, .food-log-button):hover {
  transform: translateY(-2px); filter: brightness(1.08);
}
.guild-theme :is(:is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel), :is(#card-detail-modal, #quick-log-window, #training-exercise-modal)) :is(.primary-action, .secondary-action, .text-action, .danger-row-action, .danger-action, .success-action, .ledger-action, .mental-action, .universal-intake-action, .routine-edit, .habit-edit, .care-edit-button, .context-edit-trigger, .cancel-edit, .complete-button, .food-log-button):active {
  transform: translateY(3px); box-shadow: 0 1px 0 rgba(0, 0, 0, .5) !important;
}
.guild-theme :is(:is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel), :is(#card-detail-modal, #quick-log-window, #training-exercise-modal)) :is(button, a, summary):focus-visible { outline: 3px solid #ffe08a !important; outline-offset: 3px; }

/* ---- inputs and choice chips on dark windows ---- */
.guild-theme :is(:is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel), :is(#card-detail-modal, #quick-log-window, #training-exercise-modal)) :is(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]), select, textarea) {
  color: #fff3d6 !important; background: rgba(8, 6, 26, .62) !important; border: 1px solid rgba(255, 213, 106, .35) !important;
  border-radius: 10px !important; box-shadow: inset 0 2px 4px rgba(0, 0, 0, .35) !important; color-scheme: dark;
}
.guild-theme :is(:is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel), :is(#card-detail-modal, #quick-log-window, #training-exercise-modal)) select option { color: #fff3d6; background: #1c1640; }
.guild-theme :is(:is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel), :is(#card-detail-modal, #quick-log-window, #training-exercise-modal)) :is(input, textarea)::placeholder { color: #b9aedc !important; opacity: 1; }
.guild-theme :is(:is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel), :is(#card-detail-modal, #quick-log-window, #training-exercise-modal)) :is(input, select, textarea):focus { border-color: #ffd56a !important; box-shadow: 0 0 0 3px rgba(255, 213, 106, .25) !important; }
.guild-theme :is(:is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel), :is(#card-detail-modal, #quick-log-window, #training-exercise-modal)) .mood-btn {
  border-radius: 999px !important; color: #fff3d6 !important; background: rgba(255, 255, 255, .06) !important;
  border: 1px solid rgba(255, 255, 255, .14) !important; box-shadow: none !important;
}
.guild-theme :is(:is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel), :is(#card-detail-modal, #quick-log-window, #training-exercise-modal)) .mood-btn:has(input:checked) {
  color: #2b1a0e !important; background: linear-gradient(180deg, #fff0a8, #ffcf4a 50%, #e6981e) !important; border-color: transparent !important;
  box-shadow: 0 3px 0 #8a4f0e !important;
}
.guild-theme :is(:is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel), :is(#card-detail-modal, #quick-log-window, #training-exercise-modal)) :is(label, legend, .field-label) { color: #e9def9; }
.guild-theme :is(:is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel), :is(#card-detail-modal, #quick-log-window, #training-exercise-modal)) .advanced-fields > summary, .guild-theme :is(:is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel), :is(#card-detail-modal, #quick-log-window, #training-exercise-modal)) details > summary.manual-entry-btn {
  color: #fff3d6 !important; background: rgba(255, 255, 255, .06) !important; border: 1px solid rgba(255, 255, 255, .12) !important; border-radius: 12px !important;
}

/* ---- popups: same window, header band, no parchment ---- */
.guild-theme :is(#card-detail-modal, #quick-log-window, #training-exercise-modal) { color: #fff3d6; }
.guild-theme :is(#card-detail-modal, #quick-log-window, #training-exercise-modal)::backdrop { background: rgba(6, 4, 20, .7); backdrop-filter: blur(3px); }
.guild-theme #quick-log-window .ro-window-bar, .guild-theme #card-detail-modal .modal-dialog-header {
  background: linear-gradient(180deg, rgba(90, 70, 180, .55), rgba(40, 30, 90, .2)) !important; border-bottom: 1px solid rgba(255, 213, 106, .35) !important;
  border-radius: 18px 18px 0 0;
}
.guild-theme #quick-log-window .ro-window-body { background: transparent !important; }
.guild-theme #quick-log-window .ro-window-body :is(label, small, p, summary, span) { color: #e9def9; }
.guild-theme #quick-log-window .form-actions, .guild-theme #quick-log-window .capture-form-actions {
  background: linear-gradient(180deg, rgba(20, 16, 46, 0), rgba(20, 16, 46, .96) 35%) !important; border-top: 1px solid rgba(255, 213, 106, .2) !important;
}
.guild-theme #card-detail-modal .modal-dialog-body { background: transparent !important; color: #fff3d6; }
.guild-theme #card-detail-modal .modal-dialog-body :is(h3, p, span, small, li, label) { color: #e9def9; }
.guild-theme #card-detail-modal .modal-detail-icon { border-radius: 14px !important; }
.guild-theme #card-detail-modal .modal-close-btn, .guild-theme #quick-log-window .ro-window-x { border-radius: 10px !important; }
.meal-slot-chips button { color: #fff3d6; background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .16); }
.meal-slot-chips button:hover { background: rgba(255, 255, 255, .12); }
.meal-recent-chip { color: #fff3d6; background: rgba(255, 255, 255, .05); border-color: rgba(255, 213, 106, .45); }
.meal-recent-chip small, .meal-recent-label { color: #d9ccef; }

/* ---- HUD/room details match the rounded windows ---- */
.hq-action { border: 2px solid transparent !important; border-image: none !important; border-radius: 16px !important;
  background: linear-gradient(180deg, rgba(60, 50, 130, .96), rgba(30, 24, 70, .96)) padding-box, var(--hq-edge) border-box !important;
  box-shadow: 0 5px 0 #120e30, 0 12px 24px rgba(4, 2, 16, .4) !important; }
.hq-actions .hq-action:first-child { border: 2px solid transparent !important; background: linear-gradient(180deg, #fff0a8 0%, #ffcf4a 45%, #e6981e 100%) padding-box, var(--hq-edge) border-box !important; }
.hq-actions .hq-action:first-child .hq-action-copy small { color: #4a2a08; }
.hq-action:active { transform: translateY(4px); box-shadow: 0 1px 0 #120e30 !important; }
.hq-action-slot, .hq-tile-icon, #today-panel .today-journal-action > .rpg-icon-slot { border-radius: 14px !important; }
.hq-bar { border-radius: 12px; }
.hq-bar-track, .hq-exp { border-radius: 999px; overflow: hidden; }
.hq-stat { border-radius: 12px; }
.hq-room-title, .hq-eyebrow, .hq-nameplate, .hq-info > summary { border-radius: 12px !important; }
.guild-theme .health-tab { border-radius: 12px !important; }
.guild-theme .health-tab.active { box-shadow: 0 3px 0 #8a4f0e, inset 0 1px 0 rgba(255, 255, 255, .6) !important; }
.guild-theme #today-panel .decision-card.hq-tile, .guild-theme #today-panel .today-journal-action { border-radius: 16px !important; background: var(--hq-slot) !important; border: 1px solid var(--hq-slot-line) !important; }
.guild-theme #today-panel .decision-card.hq-tile:hover, .guild-theme #today-panel .today-journal-action:hover { border-color: rgba(255, 213, 106, .6) !important; background: rgba(255, 255, 255, .09) !important; }
.guild-theme #today-panel .today-journal-action > i { border-radius: 12px; border: 0; box-shadow: 0 3px 0 #8a4f0e; }
/* Daily routine slots: same soft slot instead of cream cards */
body[data-rpg="inventory"] #today-panel .routine-lane.routine-lane-open { background: rgba(0, 0, 0, .22) !important; border-radius: 16px !important; box-shadow: inset 0 2px 8px rgba(0, 0, 0, .35) !important; }
body[data-rpg="inventory"] #today-panel .routine-step { background: var(--hq-slot) !important; border: 1px solid var(--hq-slot-line) !important; border-radius: 16px !important; }
body[data-rpg="inventory"] #today-panel .routine-step:hover { box-shadow: 0 6px 0 rgba(0, 0, 0, .35) !important; border-color: rgba(255, 213, 106, .55) !important; }
body[data-rpg="inventory"] #today-panel .routine-step.done { background: linear-gradient(160deg, rgba(80, 200, 120, .26), rgba(80, 200, 120, .08)) !important; border-color: rgba(120, 230, 150, .6) !important; }
body[data-rpg="inventory"] #today-panel .routine-copy strong { color: #fff3d6 !important; }
body[data-rpg="inventory"] #today-panel .routine-step.done .routine-copy strong { color: #b9f5c8 !important; }
body[data-rpg="inventory"] #today-panel .routine-copy small { color: #d9ccef !important; }
body[data-rpg="inventory"] #today-panel .routine-step > em { color: #2b1a0e; }
body[data-rpg="inventory"] #today-panel .routine-step .routine-marker.has-rpg-icon { border-radius: 16px !important; }
body[data-rpg="inventory"] #today-panel .routine-step .routine-edit { border-radius: 10px !important; }

/* cards that sit on the page (not inside a window) become small windows themselves */
.guild-theme :is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel):is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel):is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel) [data-hqs="paper-solid"] {
  background: var(--hq-panel) padding-box, var(--hq-edge) border-box !important; border: 2px solid transparent !important;
  border-radius: 16px !important; box-shadow: 0 10px 24px rgba(4, 2, 16, .4) !important;
}
.guild-theme :is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel):is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel):is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel) [data-hqs="paper"][data-hqs]:not([data-tint]) { background: var(--hq-slot) !important; background-image: none !important; }
.guild-theme :is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel):is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel):is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel) [data-hqs="paper"][data-hqs][data-tint] {
  background: linear-gradient(135deg, color-mix(in srgb, var(--hq-tint) 26%, transparent), color-mix(in srgb, var(--hq-tint) 8%, transparent)) !important;
}

.guild-theme #card-detail-modal .modal-dialog-header h2 { font-size: clamp(1.05rem, 2vw, 1.35rem) !important; line-height: 1.25 !important; letter-spacing: 0; }
.guild-theme #card-detail-modal .modal-dialog-actions { background: linear-gradient(180deg, rgba(28, 22, 64, 0), #1c1640 30%) !important; border-top: 1px solid rgba(255, 213, 106, .2) !important; box-shadow: none !important; }
/* slots never fade from the old cream: only movement transitions */
.guild-theme [data-hqs]:not([data-hqs="-"]) { transition-property: transform, box-shadow, filter !important; }
.guild-theme .hq-room .hq-room-title h2 { font-family: "Silkscreen", var(--font-display) !important; font-weight: 700 !important; color: #fff3d6 !important; }
.guild-theme :is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel):is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel) .quest-stat-badge.stat-vit { color: #14501f !important; }

/* small chips keep a light pill so their coloured ink stays readable on dark slots */
.guild-theme :is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel):is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel) :is(.quest-stat-badge, .priority-tag) {
  background: #fbf3e0 !important; border: 0 !important; border-radius: 999px !important; padding: .12rem .5rem !important; box-shadow: 0 2px 0 rgba(0, 0, 0, .35) !important;
}
/* locked badges / food items: a dashed empty slot, never faded */
.guild-theme :is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel):is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel) :is(.badge:not(.unlocked), .food-topup-item.is-locked) { border-style: dashed !important; border-color: rgba(255, 255, 255, .28) !important; }
/* charts drawn for cream cards: lift their labels on dark slots */
.guild-theme :is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel):is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel) [data-hqs] svg text { fill: #fff3d6 !important; }
.guild-theme :is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel):is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel) :is(.danger-row-action, .danger-action) { color: #fff !important; }

/* ---- Train + Food parchment cards, styled statically (they re-draw on theme switch, so no runtime guessing) ---- */
.guild-theme :is(#workout-panel, #food-panel):is(#workout-panel, #food-panel):is(#workout-panel, #food-panel) :is(.training-exercise, .training-routine, .training-week-summary, .training-start-here, .program-day-tab:not(.active), .food-meter, .food-meal, .food-quest, .food-supp, .food-topup-item, .food-rank, .food-supp-guide) {
  color: #fff3d6 !important; background: rgba(255, 255, 255, .055) !important; background-image: none !important;
  border: 1px solid rgba(255, 255, 255, .11) !important; border-radius: 14px !important; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06) !important;
}
.guild-theme :is(#workout-panel, #food-panel):is(#workout-panel, #food-panel):is(#workout-panel, #food-panel) :is(.training-exercise, .training-routine, .training-week-summary, .training-start-here, .program-day-tab:not(.active), .food-meter, .food-meal, .food-quest, .food-supp, .food-topup-item, .food-rank, .food-supp-guide) :is(strong, h3, summary, .training-exercise-name, .training-routine-summary, .food-meter-label, .food-quest-head, .food-topup-head, .food-meal-head) { color: #fff3d6 !important; }
.guild-theme :is(#workout-panel, #food-panel):is(#workout-panel, #food-panel):is(#workout-panel, #food-panel) :is(.training-exercise, .training-routine, .training-week-summary, .training-start-here, .program-day-tab:not(.active), .food-meter, .food-meal, .food-quest, .food-supp, .food-topup-item, .food-rank, .food-supp-guide) :is(p, li, small, .training-routine-when, .food-meter-left, .food-quest-meta, .food-topup-serving, .food-supp-note, .food-rank-next, .training-week-progress-label, .food-meal-time, .food-meal-label, .training-exercise-number, .program-day-activity) { color: #d9ccef !important; }
.guild-theme :is(#workout-panel, #food-panel):is(#workout-panel, #food-panel):is(#workout-panel, #food-panel) .food-meter-head strong, .guild-theme :is(#workout-panel, #food-panel):is(#workout-panel, #food-panel):is(#workout-panel, #food-panel) .food-rank-copy strong { color: #ffd56a !important; }
.guild-theme :is(#workout-panel, #food-panel):is(#workout-panel, #food-panel):is(#workout-panel, #food-panel) .food-meter-head strong small, .guild-theme :is(#workout-panel, #food-panel):is(#workout-panel, #food-panel):is(#workout-panel, #food-panel) .food-rank-copy small { color: #f0d79a !important; }
.guild-theme :is(#workout-panel, #food-panel):is(#workout-panel, #food-panel):is(#workout-panel, #food-panel) :is(.food-topup-more, .training-routine-time, .training-routine-count) { color: #ffd56a !important; }
.guild-theme :is(#workout-panel, #food-panel):is(#workout-panel, #food-panel):is(#workout-panel, #food-panel) :is(.food-meter-bar, .food-quest-bar, .training-week-progress-bar) { background: rgba(0, 0, 0, .38) !important; border-radius: 999px; }
.guild-theme :is(#workout-panel, #food-panel):is(#workout-panel, #food-panel):is(#workout-panel, #food-panel) :is(.training-exercise-options, .food-detail-stats div, .training-exercise-icon) { background: rgba(255, 255, 255, .06) !important; border: 1px solid rgba(255, 255, 255, .1) !important; border-radius: 12px !important; }
.guild-theme :is(#workout-panel, #food-panel):is(#workout-panel, #food-panel):is(#workout-panel, #food-panel) .training-option dt { color: #ffd56a !important; }
.guild-theme :is(#workout-panel, #food-panel):is(#workout-panel, #food-panel):is(#workout-panel, #food-panel) .training-option dd { color: #fff3d6 !important; }
.guild-theme :is(#workout-panel, #food-panel):is(#workout-panel, #food-panel):is(#workout-panel, #food-panel) :is(.food-meter.is-done, .food-quest.is-done, .food-supp.is-taken, .food-topup-item--lean, .food-topup-item--balanced, .food-topup-item--energy, .training-routine--dynamic, .training-routine--static) { border-left-width: 1px !important; }
.guild-theme :is(#workout-panel, #food-panel):is(#workout-panel, #food-panel):is(#workout-panel, #food-panel) :is(.program-day-tab--strength, .program-day-tab--cardio, .program-day-tab--mobility, .program-day-tab--rest):not(.active) { border-top-width: 1px !important; }
.guild-theme :is(#workout-panel, #food-panel):is(#workout-panel, #food-panel):is(#workout-panel, #food-panel) :is(.food-meter.is-done, .food-quest.is-done, .food-supp.is-taken) { background: linear-gradient(90deg, color-mix(in srgb, #4fbf8f 30%, transparent), color-mix(in srgb, #4fbf8f 6%, transparent) 70%) !important; border-color: color-mix(in srgb, #4fbf8f 60%, transparent) !important; }
.guild-theme :is(#workout-panel, #food-panel):is(#workout-panel, #food-panel):is(#workout-panel, #food-panel) .food-topup-item--lean { background: linear-gradient(90deg, color-mix(in srgb, #4fbf8f 30%, transparent), color-mix(in srgb, #4fbf8f 6%, transparent) 70%) !important; border-color: color-mix(in srgb, #4fbf8f 60%, transparent) !important; }
.guild-theme :is(#workout-panel, #food-panel):is(#workout-panel, #food-panel):is(#workout-panel, #food-panel) .food-topup-item--balanced { background: linear-gradient(90deg, color-mix(in srgb, #e6ad3a 30%, transparent), color-mix(in srgb, #e6ad3a 6%, transparent) 70%) !important; border-color: color-mix(in srgb, #e6ad3a 60%, transparent) !important; }
.guild-theme :is(#workout-panel, #food-panel):is(#workout-panel, #food-panel):is(#workout-panel, #food-panel) .training-routine--dynamic { background: linear-gradient(90deg, color-mix(in srgb, #e0772e 30%, transparent), color-mix(in srgb, #e0772e 6%, transparent) 70%) !important; border-color: color-mix(in srgb, #e0772e 60%, transparent) !important; }
.guild-theme :is(#workout-panel, #food-panel):is(#workout-panel, #food-panel):is(#workout-panel, #food-panel) .training-routine--static { background: linear-gradient(90deg, color-mix(in srgb, #4a7fc1 30%, transparent), color-mix(in srgb, #4a7fc1 6%, transparent) 70%) !important; border-color: color-mix(in srgb, #4a7fc1 60%, transparent) !important; }
.guild-theme :is(#workout-panel, #food-panel):is(#workout-panel, #food-panel):is(#workout-panel, #food-panel) .program-day-tab--strength:not(.active) { background: linear-gradient(180deg, color-mix(in srgb, #e08a2e 30%, transparent), color-mix(in srgb, #e08a2e 6%, transparent) 70%) !important; border-color: color-mix(in srgb, #e08a2e 60%, transparent) !important; }
.guild-theme :is(#workout-panel, #food-panel):is(#workout-panel, #food-panel):is(#workout-panel, #food-panel) .program-day-tab--cardio:not(.active) { background: linear-gradient(180deg, color-mix(in srgb, #2f9a6b 30%, transparent), color-mix(in srgb, #2f9a6b 6%, transparent) 70%) !important; border-color: color-mix(in srgb, #2f9a6b 60%, transparent) !important; }
.guild-theme :is(#workout-panel, #food-panel):is(#workout-panel, #food-panel):is(#workout-panel, #food-panel) .program-day-tab--mobility:not(.active) { background: linear-gradient(180deg, color-mix(in srgb, #4a7fc1 30%, transparent), color-mix(in srgb, #4a7fc1 6%, transparent) 70%) !important; border-color: color-mix(in srgb, #4a7fc1 60%, transparent) !important; }

.guild-theme :is(#workout-panel, #food-panel):is(#workout-panel, #food-panel):is(#workout-panel, #food-panel) .program-day-tab.active, .guild-theme :is(#workout-panel, #food-panel):is(#workout-panel, #food-panel):is(#workout-panel, #food-panel) .program-day-tab.active * { color: #2b1a0e !important; }
.guild-theme :is(#workout-panel, #food-panel):is(#workout-panel, #food-panel):is(#workout-panel, #food-panel) [data-workout-kind] {
  color: #fff3d6 !important; background: rgba(255, 255, 255, .055) !important; background-image: none !important;
  border: 1px solid rgba(255, 255, 255, .11) !important; border-radius: 14px !important; box-shadow: none !important;
}
.guild-theme :is(#workout-panel, #food-panel):is(#workout-panel, #food-panel):is(#workout-panel, #food-panel) [data-workout-kind] :is(strong, b) { color: #fff3d6 !important; }
.guild-theme :is(#workout-panel, #food-panel):is(#workout-panel, #food-panel):is(#workout-panel, #food-panel) [data-workout-kind] :is(small, i) { color: #d9ccef !important; }
.guild-theme :is(#workout-panel, #food-panel):is(#workout-panel, #food-panel):is(#workout-panel, #food-panel) [data-workout-kind]:hover { border-color: rgba(255, 213, 106, .6) !important; background: rgba(255, 255, 255, .09) !important; }
/* "Start here" sits straight on the page: give it its own window so it never lands on the day sky */
.guild-theme :is(#workout-panel, #food-panel):is(#workout-panel, #food-panel):is(#workout-panel, #food-panel) .training-start-here.training-start-here.training-start-here { background: var(--hq-panel) padding-box, var(--hq-edge) border-box !important; border: 2px solid transparent !important; border-radius: 16px !important; }
html.hq-no-fade *, html.hq-no-fade *::before, html.hq-no-fade *::after { transition: none !important; }

.guild-theme :is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel):is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel):is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel) .food-topup-item.is-locked { background: transparent !important; background-image: none !important; border: 1px dashed rgba(255, 255, 255, .3) !important; opacity: 1 !important; }
.guild-theme :is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel):is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel):is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel) .food-topup-item.is-locked :is(strong, .food-topup-head) { color: #fff3d6 !important; }
.guild-theme :is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel):is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel):is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel) .food-topup-item.is-locked :is(small, .food-topup-serving, .food-topup-more) { color: #d9ccef !important; }
.guild-theme :is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel):is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel):is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel) .food-topup-item.is-locked .food-topup-log { color: #fff3d6 !important; opacity: 1 !important; }
.guild-theme :is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel):is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel):is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel) .food-chip { color: #1f3a2a !important; }
.guild-theme #profile-panel#profile-panel#profile-panel svg text { fill: #fff3d6 !important; color: #fff3d6 !important; }
.guild-theme :is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel):is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel):is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel) :is(.danger-row-action, .danger-action) {
  color: #fff !important; border: 0 !important; background: linear-gradient(180deg, #d8473c 0%, #941c14 100%) !important;
  box-shadow: 0 3px 0 #5a0f0a, inset 0 1px 0 rgba(255, 255, 255, .35) !important; border-radius: 12px !important;
}

/* ---- fold rows: theme-coloured, emoji first, a clear Open/Close pill (Audi 2026-10-18 06:26) ---- */
.guild-theme :is(:is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel):is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel):is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel), :is(#card-detail-modal, #quick-log-window, #training-exercise-modal)) summary[data-hq-fold] {
  display: flex !important; align-items: center; gap: .6rem; list-style: none; cursor: pointer;
  min-height: 48px; padding: .6rem .7rem .6rem .9rem !important; border-radius: 12px !important;
  color: #fff3d6 !important; font-weight: 700 !important; text-decoration: none !important;
  background: linear-gradient(90deg, rgba(122, 91, 208, .34), rgba(122, 91, 208, .1)) !important; background-image: linear-gradient(90deg, rgba(122, 91, 208, .34), rgba(122, 91, 208, .1)) !important;
  border: 1px solid rgba(170, 150, 255, .42) !important; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1) !important;
}
.guild-theme :is(:is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel):is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel):is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel), :is(#card-detail-modal, #quick-log-window, #training-exercise-modal)) summary[data-hq-fold]::-webkit-details-marker { display: none; }
.guild-theme :is(:is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel):is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel):is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel), :is(#card-detail-modal, #quick-log-window, #training-exercise-modal)) summary[data-hq-fold]::marker { content: ''; }
.guild-theme :is(:is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel):is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel):is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel), :is(#card-detail-modal, #quick-log-window, #training-exercise-modal)) summary[data-hq-fold]::before { content: attr(data-emoji) !important; display: inline !important; position: static !important; width: auto !important; height: auto !important; background: none !important; border: 0 !important; transform: none !important; font-size: 1.1rem; }
.guild-theme :is(:is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel):is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel):is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel), :is(#card-detail-modal, #quick-log-window, #training-exercise-modal)) summary[data-hq-fold]::after {
  content: '📖 Open ▾' !important; display: inline-block !important; position: static !important; margin-left: auto; padding: .25rem .65rem; border-radius: 999px;
  color: #2b1a0e !important; background: linear-gradient(180deg, #fff0a8, #ffcf4a 55%, #e6981e) !important; box-shadow: 0 2px 0 #8a4f0e;
  font-size: .78rem; font-weight: 800; white-space: nowrap; transform: none !important; border: 0 !important; width: auto !important; height: auto !important;
}
.guild-theme :is(:is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel):is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel):is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel), :is(#card-detail-modal, #quick-log-window, #training-exercise-modal)) details[open] > summary[data-hq-fold]::after { content: '📕 Close ▴' !important; color: #fff3d6 !important; background: rgba(255, 255, 255, .14) !important; box-shadow: none; }
.guild-theme :is(:is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel):is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel):is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel), :is(#card-detail-modal, #quick-log-window, #training-exercise-modal)) summary[data-hq-fold]:hover { border-color: rgba(255, 213, 106, .7) !important; }
.guild-theme :is(:is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel):is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel):is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel), :is(#card-detail-modal, #quick-log-window, #training-exercise-modal)) details[open] > summary[data-hq-fold] { margin-bottom: .7rem; }
/* plain buttons get their emoji without changing their label */
.guild-theme :is(:is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel):is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel):is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel), :is(#card-detail-modal, #quick-log-window, #training-exercise-modal)) button[data-emoji]::before { content: attr(data-emoji); margin-right: .35rem; }

.hq-garmin { display: grid; gap: .3rem; width: 100%; margin-top: .55rem; padding: .5rem .6rem; text-align: left; cursor: pointer; color: inherit; font: inherit;
  border-radius: 12px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .12); }
.hq-garmin:hover { border-color: rgba(255, 213, 106, .6); }
.hq-garmin:focus-visible { outline: 3px solid #ffe08a; outline-offset: 2px; }
.hq-garmin-head { display: flex; justify-content: space-between; gap: .5rem; flex-wrap: wrap; font-size: .92rem; }
.hq-garmin-age { font-size: .82rem; font-weight: 700; }
.hq-garmin.is-fresh .hq-garmin-age { color: #a8f07a; }
.hq-garmin.is-late .hq-garmin-age { color: #ffd56a; }
.hq-garmin.is-stale { border-color: rgba(255, 130, 100, .55); background: rgba(240, 100, 80, .1); }
.hq-garmin.is-stale .hq-garmin-age { color: #ff9a7a; }
.hq-garmin-facts { display: flex; flex-wrap: wrap; gap: .35rem .8rem; font-size: .84rem; color: #e9def9; }
.hq-garmin small { font-size: .78rem; color: #d9ccef; }
.guild-theme #routine-clock, .guild-theme #routine-clock * { text-shadow: 0 2px 0 rgba(0, 0, 0, .55) !important; }

/* ---- leftover brown pieces from older sheets (cold review 2026-10-18 20:34: Edit / ＋ Log buttons #4a2a18,
   session-kind tag, edit-status) → the same violet game button / slot as the rest; page end keeps the sky colour ---- */
html:has(body.guild-theme) { background: #1b1636 !important; }
html[data-theme="light"]:has(body.guild-theme) { background: #f3ead8 !important; }
.guild-theme :is(:is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel):is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel):is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel), #training-exercise-modal#training-exercise-modal#training-exercise-modal, #card-detail-modal#card-detail-modal#card-detail-modal) :is(.training-edit-content, .food-topup-log, .food-topup-add, .program-card-open)[class] {
  border: 1px solid rgba(170, 150, 255, .45) !important; border-radius: 12px !important; color: #fff3d6 !important; font-weight: 700 !important;
  background: linear-gradient(180deg, #5a4bb0 0%, #3a2f86 100%) !important;
  box-shadow: 0 3px 0 #1a1446, inset 0 1px 0 rgba(255, 255, 255, .22) !important;
}
.guild-theme :is(:is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel):is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel):is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel), #training-exercise-modal#training-exercise-modal#training-exercise-modal) :is(.training-edit-content, .food-topup-log, .food-topup-add, .program-card-open)[class]:hover { filter: brightness(1.15); }
.guild-theme :is(:is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel):is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel):is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel)) :is(.food-topup-log, .training-view-guide)[class]:disabled { background: transparent !important; color: #b9addb !important; border-color: rgba(170, 150, 255, .3) !important; box-shadow: none !important; }
.guild-theme :is(:is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel):is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel):is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel)) :is(.training-session-kind, #edit-status)[class], .guild-theme :is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel):is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel):is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel) #edit-status {
  background: rgba(150, 130, 255, .14) !important; color: #e9ddff !important; border: 1px solid rgba(170, 150, 255, .35) !important;
}
/* Keep the single shared Slime Mate visible on Health too.  It is lifted above fixed bars
   by slime.js; the in-page mascot remains the contextual Health guide. */
/* an old ✦ ornament on the quest board sat on top of the "Add details" button (cold review 2026-10-18) */
.guild-theme .main-quest-board::after { display: none !important; }
/* ---- cold review round 3 ---- */
/* day footer: back to the readable night footer (the older sheets paint brown wood under it); the black TikTok logo goes light */
html[data-theme="light"] body.guild-theme footer { background: linear-gradient(180deg, #1c1640, #110d26) !important; border-top: 3px solid #c48a24 !important; }
html[data-theme="light"] body.guild-theme footer :is(a, p, span, small, li, h2, h3, h4, strong) { color: #f3ead6 !important; }
body.guild-theme footer a[data-footer-kind="tiktok"] img { filter: invert(1) brightness(1.2); }
/* the selected record type (Meal) mixed gold into the dark tile and read brown: violet fill + gold edge instead */
.guild-theme :is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel):is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel):is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel) .quick-log-switcher button.active[class] { background: linear-gradient(180deg, rgba(122, 100, 230, .55), rgba(70, 56, 160, .55)) !important; border-color: #ffd56a !important; color: #fff3d6 !important; }
/* dark pixel icons on the violet intake rows (People was invisible): a light round slot behind each */
.guild-theme :is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel):is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel):is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel) .universal-intake-action .capture-route-icon { background: rgba(255, 243, 214, .88) !important; border-radius: 50% !important; }
/* phones: quest cards in the sideways list keep their own height instead of stretching to the tallest one */
@media (max-width: 640px) { .guild-theme :is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel):is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel):is(#today-panel, #calendar-panel, #add-panel, #workout-panel, #food-panel, #progress-panel, #mental-panel, #profile-panel, #body-panel, #care-panel, #people-panel) .main-quest-board .quest-list { align-items: start !important; } .main-quest-board .quest-list > .quest { height: auto !important; min-height: 0 !important; } }
/* "most used" under the selected Meal tile: light ink on the new violet fill */
.guild-theme :is(#add-panel#add-panel#add-panel, #quick-log-window#quick-log-window) .quick-log-switcher button.active small { color: #ffe9a6 !important; }
