:root {
  color-scheme: light;
  --canvas: #f4f6f2;
  --paper: #fff;
  --ink: #192e25;
  --muted: #596b60;
  --edge: #dfe7dd;
  --forest: #285a43;
  --dark: #193c30;
  --pale: #eaf2e7;
  --amber: #86501c;
  --amber-bg: #fff0d8;
  --radius: 1rem;
  --sans: "Inter", "Segoe UI", system-ui, sans-serif;
  --display: "Instrument Serif", Georgia, serif;
}
* { box-sizing: border-box; }
html { min-width: 320px; scroll-padding-top: 5rem; }
body { margin: 0; background: var(--canvas); color: var(--ink); font: 1rem/1.5 var(--sans); }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
button:disabled { opacity: .55; cursor: wait; }
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }
a { color: var(--forest); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: .2em; }
h1, h2, h3, p, dl, dd, ul, ol { margin: 0; }
h1, h2, h3 { line-height: 1.2; }
h1 { font-size: clamp(1.85rem, 3.5vw, 2.6rem); letter-spacing: -.04em; }
h2 { font-size: 1.2rem; letter-spacing: -.025em; }
h3 { font-size: 1rem; letter-spacing: -.015em; }
:focus-visible { outline: 2px solid #548264; outline-offset: 3px; }
[hidden] { display: none !important; }
[role="region"]:focus-visible { outline-offset: -3px; }
.icon { display: inline-block; width: 1.15rem; height: 1.15rem; flex: 0 0 auto; vertical-align: middle; }
.muted, .metadata { color: var(--muted); }
.metadata { font-size: .8rem; }
.sr-only, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; white-space: nowrap; clip-path: inset(50%); }
.skip-link:focus { position: fixed; z-index: 20; top: 10px; left: 10px; padding: .6rem 1rem; border-radius: .5rem; background: var(--paper); }

#app { display: grid; grid-template-columns: 14rem minmax(0, 1fr); min-height: 100dvh; }
.sidebar {
  position: sticky; top: 0; z-index: 6; height: 100dvh; min-width: 0;
  display: flex; flex-direction: column; padding: 1.6rem .9rem 1rem;
  background: var(--paper); border-right: 1px solid var(--edge);
}
.brand { display: flex; align-items: center; gap: .65rem; margin: 0 .25rem 1.8rem; color: var(--ink); width: fit-content; }
.brand:hover { text-decoration: none; }
.brand-mark {
  display: grid; place-items: center; flex: 0 0 auto; width: 2.7rem; height: 2.7rem;
  background: var(--dark); color: #f5e7ba; border-radius: .8rem;
}
.brand-mark .icon { width: 1.4rem; height: 1.4rem; }
.brand strong { display: block; font-size: 1.05rem; letter-spacing: -.04em; }
.brand small { display: block; font-size: .75rem; color: var(--muted); white-space: nowrap; }
.navigation { display: grid; gap: .25rem; overflow-y: auto; padding: .2rem; }
.nav-link {
  display: flex; align-items: center; gap: .75rem; min-height: 2.8rem;
  padding: .55rem .75rem; border-radius: .6rem; color: #51675a; font-size: .9rem; font-weight: 580; white-space: nowrap;
}
.nav-link:hover { text-decoration: none; background: #f0f4ed; color: var(--ink); }
.nav-link[aria-current="page"] { background: #e7f0e3; color: #254f3b; font-weight: 720; }
.nav-link b {
  margin-left: auto; min-width: 1.4rem; height: 1.4rem; display: grid; place-items: center;
  padding: 0 .3rem; border-radius: .35rem; background: var(--amber-bg); color: var(--amber); font-size: .8rem;
}
.sidebar-bottom { margin-top: auto; padding-top: 1rem; }
.sidebar-bottom > .button { margin: 0 0 .65rem .15rem; }
.readonly {
  display: flex; gap: .5rem; align-items: center; padding: .65rem .6rem;
  background: #edf4e9; border: 1px solid #dce8d7; border-radius: .7rem; color: #2b503d;
}
.readonly-icon { display: grid; place-items: center; flex: 0 0 auto; width: 1.8rem; height: 1.8rem; background: #dfeadb; border-radius: .45rem; }
.readonly-icon .icon { width: .95rem; height: .95rem; }
.readonly strong { display: block; font-size: .875rem; }
.readonly small { display: block; font-size: .75rem; color: #536f5d; }

.workspace { min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: .8rem;
  min-height: 4.5rem; padding: .65rem 1.8rem; background: var(--paper); border-bottom: 1px solid var(--edge);
}
.breadcrumb, .bar-actions { display: flex; align-items: center; gap: .6rem; white-space: nowrap; }
.breadcrumb { color: var(--muted); font-size: .875rem; }
.breadcrumb strong { color: var(--ink); font-weight: 650; }
.breadcrumb .icon { width: .8rem; height: .8rem; }
.readonly-pill {
  display: inline-flex; align-items: center; gap: .4rem; padding: .4rem .6rem;
  border: 1px solid #dce8d6; border-radius: .5rem; background: #f0f5ec; color: #365e44; font-size: .8rem; font-weight: 650;
}
.readonly-pill .icon { width: .9rem; height: .9rem; }
.mobile-backup { display: none !important; }
main { max-width: 1550px; padding: 1.6rem 1.8rem 3rem; margin: 0 auto; }
main:focus, h1:focus { outline: none; }
.hero {
  display: flex; align-items: center; min-height: 12.2rem; overflow: hidden; border-radius: var(--radius);
  background-color: var(--dark);
  background-image: linear-gradient(90deg, #193c31 0%, #193c31df 30%, #193c3100 79%), url("assets/advent-wool.webp");
  background-size: cover; background-position: center, center 57%;
}
.hero-copy { position: relative; z-index: 1; padding: 1.7rem 2.1rem; color: #fffbed; }
.hero h1 { font: 400 clamp(2.35rem, 5.1vw, 4rem)/1.08 var(--display); letter-spacing: -.035em; margin: .55rem 0 .4rem; }
.hero-date { display: inline-flex; align-items: center; gap: .45rem; font-size: .875rem; color: #f7e0a0; font-weight: 670; }
.hero-date .icon { width: 1rem; height: 1rem; }
.hero p { color: #e1ebe0; font-size: 1rem; }
.button, .icon-button {
  display: inline-flex; justify-content: center; align-items: center; gap: .4rem; min-height: 2.45rem;
  padding: .45rem .75rem; border: 1px solid transparent; border-radius: .55rem;
  background: transparent; color: var(--ink); font-size: .875rem; font-weight: 650; white-space: nowrap;
  transition: background-color .15s, border-color .15s;
}
.button .icon, .icon-button .icon { width: 1rem; height: 1rem; }
.icon-button { padding: 0; width: 2.3rem; height: 2.3rem; min-height: 2.3rem; border-color: var(--edge); background: var(--paper); color: var(--forest); }
.icon-button:hover { background: #edf4e8; border-color: #b2c6ac; }
.primary { color: #fff; background: var(--forest); border-color: var(--forest); }
.primary:hover { background: #19432f; border-color: #19432f; }
.secondary { background: var(--paper); color: var(--forest); border-color: #d6e1d2; }
.secondary:hover, .quiet:hover { background: #edf4e8; border-color: #dce7d8; }
.quiet { color: var(--forest); }
.danger-quiet { color: #9b4535; }
.danger-quiet:hover { background: #ffebe4; }
.text-button { display: inline-flex; align-items: center; gap: .45rem; padding: .3rem 0; border: 0; background: none; color: var(--forest); font-size: .875rem; font-weight: 680; }
.text-button .icon { width: 1rem; height: 1rem; }
.text-button:hover { text-decoration: underline; text-underline-offset: .2em; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .8rem; margin: 1rem 0; }
.stat { min-width: 0; display: block; padding: .9rem 1rem .8rem; background: var(--paper); border: 1px solid var(--edge); border-radius: .85rem; color: var(--ink); }
a.stat:hover { text-decoration: none; border-color: #9ab393; }
.stat-label { display: flex; align-items: center; gap: .5rem; color: #3c5748; font-size: .875rem; font-weight: 670; line-height: 1.3; }
.stat-icon { display: inline-grid; place-items: center; flex: 0 0 auto; width: 1.9rem; height: 1.9rem; border-radius: .5rem; }
.stat-icon .icon { width: 1rem; height: 1rem; }
.green { background: #e3efe0; color: #2a6043; }
.sage { background: #edf3e4; color: #52723b; }
.sand { background: #f7efda; color: #7d6329; }
.amber { background: var(--amber-bg); color: var(--amber); }
.stat-value { font-size: clamp(1.75rem, 3.2vw, 2.3rem); font-weight: 740; line-height: 1.15; letter-spacing: -.05em; margin: .5rem 0 .2rem; overflow-wrap: anywhere; }
.stat-value small { font-size: 1rem; font-weight: 520; letter-spacing: -.02em; color: #677a6c; }
.stat-foot { color: var(--muted); font-size: .75rem; }
.sample-notice {
  display: flex; gap: .5rem; align-items: center; padding: .25rem .6rem .25rem .8rem; margin-bottom: 1rem;
  background: #fcfaf0; border: 1px solid #e9e4cf; border-radius: .6rem; color: #615a3d; font-size: .8rem;
}
.sample-notice > .icon { width: 1rem; height: 1rem; }
.sample-notice p { flex: 1; }
.sample-notice strong { margin-right: .5rem; }
.sample-notice .button { min-height: 2rem; font-size: .8rem; padding: .3rem .4rem; }

.card { min-width: 0; background: var(--paper); border: 1px solid var(--edge); border-radius: var(--radius); box-shadow: 0 2px 3px #162f1b03; }
.card-title { display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: 1.1rem 1.2rem .9rem; }
.card-title p { margin-top: .25rem; color: var(--muted); font-size: .875rem; }
.month-icon { display: grid; place-items: center; width: 2.2rem; height: 2.2rem; border: 1px solid #dfebd9; border-radius: .55rem; background: #f3f7ee; color: #426147; }
.calendar-layout { display: grid; grid-template-columns: minmax(0, 1.85fr) minmax(310px, 1fr); gap: 1rem; align-items: start; }
.calendar-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .5rem; padding: 0 1.2rem; }
.day-cell {
  display: flex; flex-direction: column; justify-content: space-between; gap: .6rem; text-align: left;
  min-width: 0; min-height: 4.65rem; padding: .55rem .6rem; border: 1px solid #e4eadf; border-radius: .65rem;
  color: #3d5547; background: #f7f9f3;
}
.day-cell.has-action { background: #fff; border-color: #dce7d6; color: var(--ink); }
.day-cell:hover { background: #eff6e9; border-color: #a8bea1; }
.day-cell[aria-pressed="true"] { background: #e9f3e2; border-color: #5e8759; box-shadow: inset 0 0 0 1px #5e8759; }
.day-top { display: flex; align-items: center; justify-content: space-between; gap: .2rem; }
.day-top strong { font-size: 1.45rem; line-height: 1.15; font-weight: 715; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.day-dot { display: inline-block; flex: 0 0 auto; width: 7px; height: 7px; border-radius: 100%; background: #7d9180; }
.day-dot.progress { background: #b37d27; }
.day-dot.ready { background: #2e7751; }
.day-dot.active { background: #3474a3; }
.day-dot.closed { background: #85648f; }
.day-alert, .row-alert { color: var(--amber); }
.day-alert .icon, .row-alert .icon { width: 1rem; height: 1rem; }
.day-caption, .weekday { color: var(--muted); font-size: .75rem; }
.day-caption { display: block; width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.day-caption b { color: var(--forest); }
.has-action .day-caption { font-weight: 600; color: #3d5747; }
.calendar-legend { display: flex; flex-wrap: wrap; gap: .45rem .85rem; padding: .9rem 1.2rem 1rem; color: var(--muted); font-size: .75rem; }
.calendar-legend span { display: inline-flex; align-items: center; gap: .3rem; }
.calendar-legend .icon { width: .9rem; height: .9rem; color: var(--amber); }

.detail-card { overflow: hidden; }
.detail-head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .85rem 1rem; background: #f1f6ec; border-bottom: 1px solid #e4ecdc; color: #3f6048; font-size: .875rem; font-weight: 650; }
.eyebrow { display: inline-flex; align-items: center; gap: .45rem; font-size: .875rem; font-weight: 650; }
.eyebrow .icon { width: 1rem; height: 1rem; }
.detail-body { padding: 1rem; }
.detail-body h2 { margin: .65rem 0; font-size: 1.5rem; overflow-wrap: anywhere; }
.badges { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; }
.badge, .sample-tag { display: inline-flex; align-items: center; padding: .2rem .5rem; font-size: .875rem; font-weight: 650; line-height: 1.3; border-radius: .4rem; background: #edf1e9; color: #4b6051; white-space: nowrap; }
.badge.progress { background: #fff1d8; color: #83571e; }
.badge.ready { background: #e4f2e3; color: #2c613d; }
.badge.active { background: #e6eff9; color: #315f82; }
.badge.closed { background: #f0eaf4; color: #695172; }
.badge.missing { background: #faebe3; color: #8d4f35; }
.badge.skip { background: #edf0e8; color: #5a695c; }
.sample-tag { font-size: .75rem; background: #f4eddb; color: #786038; vertical-align: middle; }
.offer-line { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; font-size: .875rem; color: #3d674d; }
.coupon { display: inline-block; max-width: 100%; padding: .25rem .45rem; overflow-wrap: anywhere; background: #edf4e7; border: 1px solid #e0ead8; color: #285138; border-radius: .35rem; font: 650 .875rem/1.25 ui-monospace, Consolas, monospace; letter-spacing: .035em; }
.detail-facts { display: grid; gap: .5rem; margin: .95rem 0; font-size: .875rem; }
.detail-facts > div { display: grid; grid-template-columns: 6rem minmax(0, 1fr); gap: .4rem; align-items: baseline; }
.detail-facts dt { color: var(--muted); }
.detail-facts dt .icon { width: .85rem; height: .85rem; margin-right: .15rem; }
.detail-facts dd { font-weight: 550; overflow-wrap: anywhere; }
.detail-next { padding: .65rem .75rem; margin: .85rem 0; border: 1px solid #e5eadd; border-radius: .6rem; background: #f6f8f0; font-size: .875rem; overflow-wrap: anywhere; }
.detail-next strong { display: block; color: #3a6043; font-weight: 680; }
.detail-next p { color: #4a6150; margin-top: .3rem; white-space: pre-line; }
.detail-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem; }
.detail-assets { margin-top: .5rem; }
.issue-link { display: inline-flex; align-items: center; gap: .4rem; margin-bottom: .6rem; color: var(--amber); font-size: .875rem; font-weight: 680; }
.issue-link .icon { width: 1rem; height: 1rem; }

.list-card { margin-top: 1rem; }
.table-wrap { overflow-x: auto; border-top: 1px solid var(--edge); border-radius: 0 0 var(--radius) var(--radius); }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: .875rem; }
thead { background: #f3f6ef; }
th { padding: .65rem .8rem; color: #526858; font-size: .875rem; font-weight: 650; white-space: nowrap; }
td { padding: .8rem; border-top: 1px solid #ebefe5; }
th:first-child, td:first-child { padding-left: 1.2rem; }
th:last-child, td:last-child { padding-right: 1.2rem; }
tbody tr:first-child td { border-top: 0; }
tbody tr:hover { background: #fbfdf8; }
.row-title { min-width: 8rem; max-width: 25rem; overflow-wrap: anywhere; }
.row-title strong { font-weight: 670; }
.row-date { display: block; color: #506a56; font-size: .875rem; margin-bottom: .2rem; }
.row-meta { display: block; color: var(--muted); font-size: .75rem; line-height: 1.4; margin-top: .25rem; max-width: 20rem; overflow-wrap: anywhere; }
.next-cell { min-width: 10rem; max-width: 19rem; }
.next-cell strong { font-size: .875rem; font-weight: 550; }
.row-progress { display: grid; gap: .2rem; min-width: 3rem; color: #526d58; font-size: .875rem; font-weight: 650; }
progress { width: 3.6rem; height: .35rem; overflow: hidden; border: 0; border-radius: .5rem; background: #e5eddf; color: #5c8759; }
progress::-webkit-progress-bar { background: #e5eddf; border-radius: .5rem; }
progress::-webkit-progress-value { background: #5c8759; border-radius: .5rem; }
progress::-moz-progress-bar { background: #5c8759; border-radius: .5rem; }
.number { font-variant-numeric: tabular-nums; white-space: nowrap; }
.source-link { text-decoration: underline; text-underline-offset: .15em; overflow-wrap: anywhere; }

.page-heading { padding: .1rem 0 1.25rem; }
.page-heading p { margin-top: .5rem; color: var(--muted); }
.list-tools, .summary-bar { display: flex; align-items: center; flex-wrap: wrap; gap: .8rem; justify-content: space-between; padding: .9rem 1rem; font-size: .875rem; }
.summary-bar { margin-bottom: 1rem; background: var(--paper); border: 1px solid var(--edge); border-radius: .8rem; }
.summary-bar > span { display: inline-flex; align-items: center; gap: .35rem; color: var(--forest); }
.summary-bar > span .icon { width: 1rem; height: 1rem; }
.summary-bar .inline-field { margin-left: auto; }
.search-field, .inline-field { display: inline-flex; align-items: center; gap: .5rem; min-width: 0; color: var(--muted); font-size: .875rem; }
.search-field { width: min(100%, 22rem); position: relative; }
.search-field .icon { position: absolute; left: .65rem; width: 1rem; height: 1rem; }
.search-field input { width: 100%; }
.search-field input[type="search"] { padding-left: 2.1rem; }
.inline-field select { max-width: 100%; }
input:not([type="checkbox"]):not([type="file"]), select, textarea {
  min-width: 0; min-height: 2.5rem; padding: .5rem .65rem; border: 1px solid #d6e1d1;
  border-radius: .55rem; background: #fff; color: var(--ink); font-size: .875rem;
}
select {
  appearance: none; -webkit-appearance: none; padding-right: 2.1rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23586f5c' stroke-width='1.5' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-position: right .6rem center; background-size: 1rem; background-repeat: no-repeat;
}
input::placeholder, textarea::placeholder { color: #6a7b6d; opacity: 1; }
input[type="checkbox"] { width: 1.05rem; height: 1.05rem; flex: 0 0 auto; margin: 0; accent-color: var(--forest); }
textarea { resize: vertical; }
.field { display: grid; gap: .35rem; min-width: 0; color: #425b48; font-size: .875rem; font-weight: 650; }
.field input, .field textarea, .field select { width: 100%; font-weight: 450; }
.field small { color: var(--muted); font-size: .75rem; font-weight: 450; }
.field-compact { margin-bottom: .65rem; }
.check-field { display: flex; align-items: center; gap: .5rem; color: #425b48; font-size: .875rem; font-weight: 550; }
.empty { text-align: center; padding: 2.2rem 1.2rem; }
.empty-icon { display: inline-grid; place-items: center; width: 2.6rem; height: 2.6rem; margin-bottom: .75rem; border-radius: .7rem; background: var(--pale); color: var(--forest); }
.empty p { color: var(--muted); font-size: .875rem; margin: .4rem 0 .9rem; }
.empty p:last-child { margin-bottom: 0; }
.stack { display: grid; gap: .85rem; }
.asset-group-head { display: flex; align-items: center; justify-content: space-between; gap: .7rem; padding: 1rem 1.1rem; border-bottom: 1px solid var(--edge); }
.asset-group-head h2 { font-size: 1.1rem; }
.small-summary { padding: .3rem .5rem; border-radius: .4rem; color: var(--forest); background: var(--pale); white-space: nowrap; font-size: .875rem; font-weight: 650; }
.channel-list { padding: 0 1.1rem; list-style: none; }
.channel-list li { display: flex; align-items: center; gap: .6rem; padding: .7rem 0; border-bottom: 1px solid #ecf0e6; }
.channel-list li:last-child { border-bottom: 0; }
.channel-icon { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: .5rem; flex: 0 0 auto; background: #edf4e7; color: var(--forest); }
.channel-icon .icon { width: 1rem; height: 1rem; }
.channel-info { flex: 1; min-width: 0; font-size: .875rem; overflow-wrap: anywhere; }
.channel-info p { color: var(--muted); font-size: .8rem; white-space: pre-line; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.channel-info small { display: block; font-size: .75rem; color: var(--muted); }

.preview-select { justify-content: start; }
.preview-select .inline-field { margin-left: 0; }
.preview-select .button { margin-left: auto; }
.segmented, .editor-tabs { display: flex; flex-wrap: wrap; gap: .25rem; width: fit-content; padding: .25rem; border: 1px solid #e1e9d9; border-radius: .6rem; background: #edf3e7; }
.segmented button, .editor-tabs button { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 2.2rem; padding: .4rem .65rem; border: 1px solid transparent; border-radius: .4rem; background: transparent; color: var(--muted); font-size: .875rem; font-weight: 650; }
.segmented button:hover, .editor-tabs button:hover { background: #f7faf3; color: var(--forest); }
.segmented button[aria-pressed="true"], .editor-tabs button[aria-pressed="true"] { background: #fff; border-color: #d8e4d0; color: var(--forest); box-shadow: 0 1px 3px #26422e0d; }
.segmented .icon { width: 1rem; height: 1rem; }
.preview-toggle { margin-bottom: .85rem; }
.preview-layout { display: grid; grid-template-columns: minmax(0, 1.85fr) minmax(260px, 1fr); gap: 1rem; align-items: start; }
.preview-stage { padding: .8rem; background: #eff4e9; }
.preview-notes { padding: 1rem; }
.preview-notes .detail-facts > div { grid-template-columns: 6rem minmax(0, 1fr); }
.preview-hint, .bottom-note { margin-top: 1rem; color: var(--muted); font-size: .8rem; }
.preview-hint .icon, .bottom-note .icon { width: 1rem; height: 1rem; margin-right: .2rem; }
.browser-frame { overflow: hidden; border: 1px solid #d8e5d2; border-radius: .75rem; background: #fff; }
.mock-address { display: flex; align-items: center; gap: .8rem; padding: .55rem .65rem; border-bottom: 1px solid #dfe9d8; background: #edf4e6; color: #5c725f; font-size: .75rem; }
.mock-address span { display: flex; align-items: center; gap: .35rem; }
.mock-address .icon { width: .75rem; height: .75rem; }
.mock-address i { width: .4rem; height: .4rem; background: #9db397; border-radius: 50%; }
.store-strip { padding: .6rem .8rem; background: #2d583f; color: #fff9e6; text-align: center; font-size: .875rem; font-weight: 650; white-space: pre-line; overflow-wrap: anywhere; }
.store-navigation { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .8rem; border-bottom: 1px solid #e8eee0; color: #2c4f38; font-size: .875rem; font-weight: 720; }
.store-navigation .icon { width: 1rem; height: 1rem; margin-left: .2rem; }
.store-banner {
  display: flex; align-items: center; position: relative; min-height: 11rem; padding: 1rem; overflow: hidden;
  background: linear-gradient(95deg, #1b3e2deb 10%, #1b3e2d3b 90%), url("assets/advent-wool.webp") center / cover; color: #fff9e5;
}
.store-banner > div { position: relative; z-index: 1; }
.store-banner:has(.custom-banner) > div { padding: .65rem; border-radius: .5rem; background: #193c30e6; }
.custom-banner { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.store-banner span { font-size: .8rem; color: #f4dda4; }
.store-banner h3 { max-width: 27rem; font: 400 clamp(1.7rem, 3vw, 2.5rem)/1.12 var(--display); margin: .3rem 0; overflow-wrap: anywhere; }
.store-banner p, .store-offer p { font-size: .875rem; white-space: pre-line; overflow-wrap: anywhere; }
.store-banner .mock-coupon { margin-top: .7rem; }
.mock-coupon { display: inline-flex; align-items: center; gap: .5rem; max-width: 100%; min-height: 2.3rem; padding: .4rem .65rem; background: #f1f6e9; color: #2d573b; border: 1px dashed #a2bd96; border-radius: .4rem; font-size: .875rem; font-weight: 670; }
.mock-coupon:hover { background: #e4f1dc; }
.mock-coupon code { min-width: 0; overflow-wrap: anywhere; }
.mock-coupon .icon { width: .9rem; height: .9rem; }
.mock-nav-items { display: flex; flex-wrap: wrap; gap: .5rem; padding: .8rem; color: #4c7153; font-size: .8rem; }
.mock-nav-items span { background: #f1f5eb; padding: .3rem .5rem; border-radius: .4rem; }
.mock-empty { padding: 1.5rem 1rem; color: var(--muted); font-size: .875rem; }
.mock-cart, .mock-product { padding: 1rem; }
.mock-cart h3 { margin-bottom: .8rem; }
.mock-line { display: flex; justify-content: space-between; gap: .5rem; margin-bottom: .7rem; padding-bottom: .65rem; border-bottom: 1px solid #e5eddc; font-size: .875rem; color: #425d46; }
.mock-line .icon { width: 1rem; height: 1rem; }
.store-offer { display: grid; gap: .5rem; padding: .8rem; border-radius: .6rem; background: #edf5e6; color: #33563a; }
.store-offer .mock-coupon { justify-self: start; }
.cart-feedback { font-size: .8rem; color: #365f3c; }
.cart-feedback.warn { color: #825823; }
.cart-feedback .icon { width: .95rem; height: .95rem; }
.mock-controls { display: flex; align-items: end; flex-wrap: wrap; gap: .6rem .9rem; margin-top: .8rem; }
.mock-controls .field { width: 10rem; }
.mock-controls .check-field { min-height: 2.4rem; }
.mock-product { display: grid; grid-template-columns: minmax(90px, .9fr) minmax(0, 1.3fr); gap: .85rem; }
.mock-product-photo { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem; min-height: 9rem; border-radius: .6rem; background: #f0f4e9; color: #667e69; font-size: .8rem; text-align: center; }
.mock-product-photo .icon { width: 2rem; height: 2rem; }
.mock-product-description { display: grid; gap: .5rem; color: #315039; overflow-wrap: anywhere; }
.mock-product-description > p { color: var(--muted); font-size: .8rem; }
.mock-price { font-size: 1.3rem; }
.mock-price small { font-size: .75rem; font-weight: 450; color: var(--muted); }

.conflict-card { padding: 1rem; }
.conflict-header { display: flex; align-items: center; gap: .75rem; }
.conflict-header .stat-icon { width: 2.4rem; height: 2.4rem; }
.conflict-tags { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .35rem; }
.conflict-tags span { padding: .2rem .45rem; border-radius: .35rem; background: #fff2dc; color: #80501c; font-size: .875rem; font-weight: 650; }
.conflict-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; margin: .9rem 0; }
.conflict-pair > div { min-width: 0; padding: .75rem .75rem .3rem; border: 1px solid var(--edge); border-radius: .65rem; background: #fafcf6; }
.conflict-pair .badges { margin-top: .5rem; }
.conflict-pair .button { margin-left: -.4rem; }
.conflict-details { display: grid; gap: .35rem; padding-left: 1.2rem; font-size: .875rem; color: #50654f; }
.result-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 0; }
.revenue-card { padding: 1rem; }
.revenue-bars { display: grid; gap: .7rem; list-style: none; padding: 1rem 0 0; }
.revenue-bars li { display: grid; grid-template-columns: minmax(100px, 1fr) minmax(80px, 2fr) auto; align-items: center; gap: .7rem; font-size: .875rem; }
.revenue-bars span { overflow-wrap: anywhere; }
.revenue-bars progress { width: 100%; height: .55rem; }
.history-list { padding: 0 1rem; list-style: none; border-top: 1px solid var(--edge); }
.history-list li { display: flex; gap: .7rem; padding: .85rem 0; border-bottom: 1px solid #eaf0e1; }
.history-list li:last-child { border-bottom: 0; }
.history-dot { display: grid; place-items: center; width: 2rem; height: 2rem; flex: 0 0 auto; border-radius: .5rem; background: var(--pale); color: var(--forest); }
.history-dot .icon { width: 1rem; height: 1rem; }
.history-body { flex: 1; min-width: 0; }
.history-top { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .3rem .6rem; font-size: .875rem; }
.history-top time { color: var(--muted); font-size: .8rem; }
.history-body > p { font-size: .875rem; color: #506c52; overflow-wrap: anywhere; }
.history-body summary { cursor: pointer; margin-top: .4rem; color: var(--forest); font-size: .875rem; font-weight: 650; }
.history-changes > div { display: grid; grid-template-columns: minmax(90px, 1fr) minmax(0, 3fr); gap: .6rem; padding: .65rem 0; border-bottom: 1px solid #edf3e4; font-size: .875rem; }
.history-changes dt { color: var(--muted); }
.history-changes dd { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; overflow-wrap: anywhere; white-space: pre-line; }
.history-changes dd small { display: block; font-size: .75rem; color: var(--muted); font-weight: 450; margin-bottom: .2rem; }

dialog { width: min(calc(100% - 24px), 740px); max-height: calc(100dvh - 28px); overflow: auto; padding: 0; border: 1px solid #d0deca; border-radius: 1rem; background: var(--paper); color: var(--ink); box-shadow: 0 22px 80px #132f2341; }
dialog::backdrop { background: #193b2da8; }
#backup { max-width: 540px; }
#action-editor { display: flex; flex-direction: column; max-height: calc(100dvh - 30px); }
.dialog-header, .dialog-footer { display: flex; justify-content: space-between; align-items: center; gap: .75rem; flex: 0 0 auto; padding: 1rem 1.2rem; }
.dialog-header h2 { font-size: 1.4rem; overflow-wrap: anywhere; }
.dialog-header .eyebrow { margin-bottom: .35rem; color: var(--forest); }
.dialog-content { min-height: 0; overflow: auto; padding: 1rem 1.2rem 1.2rem; }
.dialog-footer { justify-content: end; border-top: 1px solid var(--edge); background: #f8fbf3; }
.dialog-footer > .danger-quiet { margin-right: auto; }
.footer-actions, .backup-buttons { display: flex; flex-wrap: wrap; gap: .5rem; }
.editor-tabs { margin: 0 1.2rem; flex: 0 0 auto; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem; }
.span-two { grid-column: 1 / -1; }
.form-error, .storage-message { padding: .65rem .8rem; margin: 0 0 .8rem; border: 1px solid #f2ddcd; border-radius: .5rem; background: #fff1e6; color: #8b4c2e; font-size: .875rem; }
.pane-note, .backup-content p { color: var(--muted); font-size: .875rem; margin-bottom: .85rem; }
.backup-content .form-error { margin: .85rem 0 0; color: #8b4c2e; }
.sample-checkbox { padding: .65rem; border-radius: .5rem; background: #faf3e1; }
.editor-channels { display: grid; gap: .5rem; }
.editor-channel { border: 1px solid var(--edge); border-radius: .65rem; }
.editor-channel summary { display: flex; align-items: center; gap: .55rem; cursor: pointer; list-style: none; padding: .6rem; color: #3f5c45; font-size: .875rem; }
.editor-channel summary::-webkit-details-marker { display: none; }
.editor-channel summary strong { min-width: 0; flex: 1; }
.editor-channel summary > .icon { width: .9rem; height: .9rem; }
.editor-channel[open] summary > .icon { transform: rotate(90deg); }
.channel-editor-fields { padding: .8rem; border-top: 1px solid var(--edge); }
.toast {
  position: fixed; right: 1rem; bottom: 1rem; z-index: 10; max-width: min(27rem, calc(100% - 2rem));
  padding: .7rem 1rem; border-radius: .65rem; background: #21462e; color: #fff; font-size: .875rem;
  box-shadow: 0 5px 15px #223d3426; opacity: 0; pointer-events: none; transform: translateY(5px); transition: opacity .18s, transform .18s;
}
.toast.show { opacity: 1; transform: translateY(0); }

@media (max-width: 1200px) {
  #app { grid-template-columns: 12.5rem minmax(0, 1fr); }
  .sidebar { padding-inline: .7rem; }
  .topbar { padding-inline: 1.2rem; }
  main { padding-inline: 1.2rem; }
  .brand { gap: .4rem; margin-inline: 0; }
  .brand-mark { width: 2.3rem; height: 2.3rem; }
  .brand small { font-size: .75rem; }
  .calendar-grid, .calendar-legend { padding-inline: .9rem; }
  .calendar-grid { gap: .4rem; }
  .day-cell { padding-inline: .45rem; }
  .stat { padding-inline: .7rem; }
  .stat-label { gap: .35rem; }
  .calendar-layout { grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); }
}
@media (max-width: 1020px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .result-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .calendar-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .calendar-layout { grid-template-columns: minmax(0, 1.3fr) minmax(260px, 1fr); }
  .preview-layout { grid-template-columns: minmax(0, 1fr); }
  .readonly-pill { font-size: .75rem; }
  .breadcrumb > span { display: none; }
  .breadcrumb > .icon { display: none; }
}
@media (max-width: 760px) {
  #app { display: block; }
  .sidebar { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--edge); padding: .65rem .75rem .3rem; }
  .brand { margin: 0 0 .6rem; }
  .brand strong { font-size: 1rem; }
  .navigation { display: flex; overflow-x: auto; overflow-y: hidden; gap: .2rem; }
  .nav-link { gap: .35rem; min-height: 2.3rem; padding: .35rem .5rem; font-size: .875rem; }
  .nav-link .icon { width: 1rem; height: 1rem; }
  .nav-link b { width: 1.1rem; min-width: 1.1rem; height: 1.1rem; font-size: .75rem; }
  .sidebar-bottom { display: none; }
  .mobile-backup { display: inline-flex !important; }
  .topbar { min-height: 3.6rem; padding: .5rem .75rem; }
  .bar-actions { gap: .4rem; }
  .readonly-pill { padding: .45rem; font-size: 0; }
  .readonly-pill .icon { width: 1rem; height: 1rem; }
  main { padding: 1rem .75rem 2rem; }
  .hero { min-height: 10rem; }
  .hero-copy { padding: 1.1rem 1.3rem; }
  .hero h1 { font-size: clamp(2.15rem, 7vw, 3.4rem); }
  .hero p { font-size: .875rem; }
  .stats { gap: .6rem; margin: .7rem 0; }
  .stat-value { font-size: 2rem; }
  .calendar-layout { grid-template-columns: minmax(0, 1fr); gap: .8rem; }
  .calendar-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .day-cell { min-height: 4.1rem; }
  .sample-notice { margin-bottom: .8rem; }
  .page-heading p { font-size: .875rem; }
}
@media (max-width: 480px) {
  .hero { background-image: linear-gradient(90deg, #193c31 0%, #193c31eb 34%, #193c3155 100%), url("assets/advent-wool.webp"); background-position: center, 68% center; }
  .calendar-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .sample-notice p span { display: none; }
  .sample-notice strong { font-size: .8rem; }
  .result-stats { grid-template-columns: minmax(0, 1fr); }
  .summary-bar, .list-tools { padding: .7rem; }
  .summary-bar .inline-field { margin-left: 0; }
  .list-tools .inline-field { width: 100%; }
  .preview-select .inline-field { width: 100%; }
  .preview-select .inline-field select { flex: 1; width: 100%; }
  .preview-toggle { gap: .1rem; }
  .segmented button, .editor-tabs button { padding-inline: .45rem; font-size: .875rem; }
  .preview-toggle .icon { display: none; }
  .preview-toggle button { flex: 1; }
  .asset-group-head { padding: .8rem; align-items: start; }
  .asset-group-head .small-summary { font-size: .75rem; }
  .channel-list { padding-inline: .75rem; }
  .channel-list li { flex-wrap: wrap; gap: .4rem; }
  .channel-list .channel-info { min-width: 9rem; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .span-two { grid-column: 1; }
  .dialog-header, .dialog-content, .dialog-footer { padding-inline: .7rem; }
  .editor-tabs { margin-inline: .7rem; }
  .dialog-footer .button { padding-inline: .5rem; gap: .25rem; }
  .dialog-footer .danger-quiet .icon { display: none; }
  .editor-channel summary { flex-wrap: wrap; }
  .editor-channel summary strong { min-width: 7rem; }
  .conflict-pair { grid-template-columns: minmax(0, 1fr); }
  .history-changes > div { grid-template-columns: minmax(0, 1fr); }
  .revenue-bars li { grid-template-columns: minmax(75px, 1.3fr) minmax(45px, 1fr) auto; gap: .4rem; }
  .mock-product { grid-template-columns: minmax(0, 1fr); }
  .mock-product-photo { min-height: 6rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
