/* CHIKARA Calendar Designer 0.1.0 - page styles. Shell, kit and motion come from shell.css, chikara-theme.css, motion.css. ASCII only.
   No inline style attributes anywhere (CSP style-src 'self'); the app sets sizes and colours through the CSS object model. */
@font-face { font-family: 'Playfair Display'; src: url('fonts/playfair-display-latin-500-normal.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Playfair Display'; src: url('fonts/playfair-display-latin-500-italic.woff2') format('woff2'); font-weight: 500; font-style: italic; font-display: swap; }
@font-face { font-family: 'Playfair Display'; src: url('fonts/playfair-display-latin-600-normal.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Playfair Display'; src: url('fonts/playfair-display-latin-700-normal.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Lora'; src: url('fonts/lora-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Lora'; src: url('fonts/lora-latin-400-italic.woff2') format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'Lora'; src: url('fonts/lora-latin-500-normal.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Lora'; src: url('fonts/lora-latin-600-normal.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Fraunces'; src: url('fonts/fraunces-latin-500-normal.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Fraunces'; src: url('fonts/fraunces-latin-500-italic.woff2') format('woff2'); font-weight: 500; font-style: italic; font-display: swap; }
@font-face { font-family: 'Fraunces'; src: url('fonts/fraunces-latin-600-normal.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Cormorant Garamond'; src: url('fonts/cormorant-garamond-latin-500-normal.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Cormorant Garamond'; src: url('fonts/cormorant-garamond-latin-500-italic.woff2') format('woff2'); font-weight: 500; font-style: italic; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('fonts/inter-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('fonts/inter-latin-500-normal.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('fonts/inter-latin-600-normal.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'DM Mono'; src: url('fonts/dm-mono-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'DM Mono'; src: url('fonts/dm-mono-latin-500-normal.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }

/* ---------- workspace ---------- */
.top-actions { display: flex; gap: 8px; align-items: center; margin-left: auto; }
#designBtn { display: none; }
.workspace { display: grid; grid-template-columns: minmax(300px, 360px) minmax(0, 1fr); align-items: start; min-height: calc(100dvh - 64px); }
.drawer { position: sticky; top: 58px; max-height: calc(100dvh - 58px); overflow-y: auto; padding: 12px 14px 120px; border-right: 1px solid var(--line); background: var(--surface); overscroll-behavior: contain; }
.drawer[hidden] { display: block !important; }
html.has-island .drawer { top: calc(var(--island-strip) + 58px); max-height: calc(100dvh - var(--island-strip) - 58px); }
.stage { min-width: 0; padding: 14px 14px calc(var(--halo-size, 70px) + 48px); }
.stage-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.stage-bar .small { margin: 0; color: var(--muted); }
.preview { display: flex; flex-direction: column; align-items: center; gap: 20px; padding: 18px 8px; background: var(--surface-3); border-radius: 16px; overflow-x: hidden; }
.footer { margin: 18px 0 0; font-size: .75rem; color: var(--muted); text-align: center; }
@media (max-width: 899px) {
  html.has-island .drawer { top: calc(var(--island-strip) + 58px); max-height: none; }
  .workspace { display: block; }
  #designBtn { display: inline-flex; align-items: center; }
  .drawer { position: fixed; z-index: 90; left: 0; right: 0; bottom: 0; top: 58px; max-height: none; border-right: 0; transform: translateX(-102%); transition: transform .28s var(--m-ease); visibility: hidden; }
  .drawer.open { transform: none; visibility: visible; }
  .stage { padding: 10px 8px calc(var(--halo-size, 70px) + 48px); }
  .top-actions .btn { padding: 8px 10px; }
}

/* ---------- drawer controls ---------- */
.sec { border-bottom: 1px solid var(--line); }
.sec-head { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 48px; padding: 8px 2px; border: 0; background: none; color: var(--ink); font-family: var(--f-display); font-size: 1.25rem; font-weight: 600; text-align: left; }
.sec-head .chev { width: 18px; height: 18px; transition: transform .2s var(--m-ease); }
.sec-head[aria-expanded="true"] .chev { transform: rotate(180deg); }
.chev, .ico, .moon { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.sec-body { padding: 2px 2px 16px; display: grid; gap: 12px; }
.sec-body[hidden] { display: none; }
.sec.flash { animation: sec-flash 1.2s var(--m-ease); }
@keyframes sec-flash { 0%, 60% { background: var(--surface-3); } 100% { background: transparent; } }
.ctl { display: grid; gap: 6px; }
.ctl > label, .ctl > .lbl { font-size: .8rem; font-weight: 700; color: var(--muted); letter-spacing: .02em; }
.help { margin: 0; font-size: .8rem; color: var(--muted); }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.row > .field { flex: 1 1 110px; min-width: 0; }
.drawer .field { width: 100%; min-height: 44px; padding: 8px 10px; border: 1px solid var(--edge); border-radius: 10px; background: var(--surface-2); color: var(--ink); }
.drawer textarea.field { min-height: 76px; resize: vertical; }
.seg { display: flex; border: 1px solid var(--edge); border-radius: 12px; overflow: hidden; }
.seg .btn { flex: 1; border: 0; border-radius: 0; border-right: 1px solid var(--line); min-width: 0; padding: 8px 6px; font-size: .86rem; }
.seg .btn:last-child { border-right: 0; }
.chk { display: flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 600; cursor: pointer; }
.chk input { width: 22px; height: 22px; accent-color: var(--gold); flex: none; }
.layouts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.layout-card { display: grid; gap: 4px; padding: 6px; text-align: left; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.layout-card[aria-pressed="true"] { border-color: var(--primary-ink); box-shadow: 0 0 0 1px var(--primary-ink); }
.layout-card svg { width: 100%; height: auto; display: block; }
.layout-card span { font-size: .8rem; font-weight: 700; }
.swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.swatch { width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--edge); position: relative; padding: 0; }
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--primary-ink); }
.swatch-wrap { position: relative; display: inline-block; }
.swatch-x { position: absolute; top: -8px; right: -8px; width: 24px; height: 24px; min-height: 24px; min-width: 24px; padding: 0; border-radius: 50%; border: 1px solid var(--edge); background: var(--surface); font-size: .8rem; line-height: 1; }
.themes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.themes .btn { font-size: .8rem; padding: 6px 4px; display: flex; gap: 6px; align-items: center; justify-content: center; }
.dot { width: 12px; height: 12px; border-radius: 50%; flex: none; box-shadow: 0 0 0 1px var(--edge); }
.slider { display: grid; grid-template-columns: 2.4rem 1fr 2.6rem; gap: 8px; align-items: center; font-size: .8rem; }
.slider input[type="range"] { width: 100%; min-height: 32px; accent-color: var(--gold); }
.preview-chip { height: 40px; border-radius: 10px; box-shadow: 0 0 0 1px var(--edge); }
.tabs { display: flex; gap: 4px; }
.tabs .btn { flex: 1; font-size: .84rem; padding: 6px; }
.drop { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.drop img { width: 52px; height: 52px; object-fit: contain; border: 1px solid var(--edge); border-radius: 8px; background: #fff; }
.qr-prev { width: 120px; height: 120px; background: #fff; border-radius: 8px; padding: 6px; border: 1px solid var(--edge); }
.qr-prev svg { width: 100%; height: 100%; display: block; }
.stk-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.stk-grid .btn { display: grid; place-items: center; gap: 2px; padding: 6px 2px; min-height: 56px; font-size: .7rem; }
.stk-grid .ico { width: 24px; height: 24px; }
.kd-list { display: grid; gap: 6px; }
.kd { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); position: relative; }
.kd .name { flex: 1; min-width: 0; overflow-wrap: anywhere; font-weight: 600; font-size: .9rem; }
.kd .when { font-size: .75rem; color: var(--muted); display: block; font-weight: 400; }
.kd .ico { width: 18px; height: 18px; flex: none; }
.msg { min-height: 1.3em; font-size: .85rem; margin: 0; }
.msg.bad { color: var(--danger-ink); }
.danger { border-color: var(--danger-ink); color: var(--danger-ink); }
.icon-pick { display: flex; flex-wrap: wrap; gap: 4px; }
.icon-pick .btn { padding: 6px; min-height: 40px; min-width: 40px; }
.icon-pick .ico { width: 22px; height: 22px; }
body.arming .stage-bar .arm-note { font-weight: 700; color: var(--teal-ink); }

/* ---------- pages: always paper, whatever the app theme ---------- */
.frame { flex: none; }
.page-sheet {
  --paper: #FFFDF7; --ink: #1A1208; --mid: #4f4331; --faint: #6b5e49; --line-soft: #E2D6BC; --panel-alt: #F4ECDA;
  --accent: #1A524A; --accent-ink: #FFF9F0; --accent-text: #1A524A; --accent-soft: rgba(26, 82, 74, .2);
  --display-font: 'Playfair Display', Georgia, serif; --body-font: 'Lora', Georgia, serif; --mono: 'DM Mono', ui-monospace, Consolas, monospace;
  position: relative; overflow: hidden; background: var(--paper); color: var(--ink); font-family: var(--body-font); line-height: 1.25;
  box-shadow: 0 14px 44px rgba(26, 18, 8, .22), 0 2px 8px rgba(26, 18, 8, .12); transform-origin: top left;
}
.page-sheet * { box-sizing: border-box; }
.page-sheet.size-a4 { width: 210mm; height: 297mm; font-size: 16px; }
.page-sheet.size-a3 { width: 297mm; height: 420mm; font-size: 22.63px; }
.page-sheet.size-letter { width: 215.9mm; height: 279.4mm; font-size: 16px; }
.page-sheet.size-square { width: 210mm; height: 210mm; font-size: 16px; }
.page-sheet.year-overview.size-a4 { width: 297mm; height: 210mm; }
.page-sheet.year-overview.size-a3 { width: 420mm; height: 297mm; }
.page-sheet.year-overview.size-letter { width: 279.4mm; height: 215.9mm; }
.page-sheet svg.ico { fill: none; stroke: currentColor; stroke-width: 1.8; }
.page-sheet .moon-dark { fill: none; } .page-sheet .moon-lit { fill: currentColor; stroke: none; } .page-sheet .moon-rim { fill: none; stroke: currentColor; stroke-width: 1.3; }

/* sticker layer shared by the layouts */
.cell-stickers { position: absolute; top: .2em; right: .2em; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .1em; max-width: 75%; z-index: 2; }
.cell-sticker { width: 1.45em; height: 1.45em; padding: 0; border: 0; background: none; color: var(--accent-text); display: block; cursor: pointer; }
.cell-sticker .ico { width: 100%; height: 100%; }
.cell-moon { display: inline-block; width: .9em; height: .9em; margin-left: .25em; vertical-align: -.1em; color: var(--faint); }
.cell-moon .moon { width: 100%; height: 100%; }
.cell-tag-ico { display: inline-block; width: .95em; height: .95em; vertical-align: -.15em; margin-right: .15em; }
.cell-tag-ico .ico { width: 100%; height: 100%; }
body.arming .page-sheet [data-day] { cursor: copy; }
body.arming .page-sheet [data-day]:hover, .page-sheet [data-day]:focus-visible { outline: 2px dashed var(--accent-text); outline-offset: -2px; }

/* Classic grid */
.layout-classic { display: flex; flex-direction: column; height: 100%; padding: 2.4em 2.2em 2.2em; }
.cg-header { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: .4em; flex-shrink: 0; }
.cg-title { font-family: var(--display-font); font-weight: 700; font-size: 2.2em; color: var(--accent-text); line-height: 1; }
.cg-title .cg-year { color: var(--ink); font-weight: 500; font-style: italic; margin-left: .4em; font-size: .7em; }
.cg-brand { font-family: var(--mono); font-size: .6em; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); text-align: right; }
.cg-logo { max-height: 2.1em; max-width: 7em; object-fit: contain; }
.cg-dow-row { display: grid; grid-template-columns: repeat(7, 1fr); border-bottom: 2px solid var(--accent); padding-bottom: .35em; margin-bottom: .3em; flex-shrink: 0; }
.cg-dow-row.with-wknum { grid-template-columns: 1.75em repeat(7, 1fr); }
.cg-dow { font-family: var(--mono); font-size: .62em; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-text); text-align: center; }
.cg-wknum-head { font-family: var(--mono); font-size: .5em; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); text-align: center; }
.cg-grid { display: grid; grid-template-columns: repeat(7, 1fr); grid-auto-rows: 1fr; gap: 2px; flex: 1; min-height: 0; }
.cg-grid.with-wknum { grid-template-columns: 1.75em repeat(7, 1fr); }
.cg-wknum-cell { display: flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: .56em; color: var(--faint); background: var(--panel-alt); border: 1px solid var(--line-soft); }
.cg-cell { border: 1px solid var(--line-soft); padding: .3em .35em; display: flex; flex-direction: column; position: relative; background: var(--paper); min-height: 0; overflow: hidden; }
.cg-cell.other { opacity: .3; }
.cg-num { font-family: var(--display-font); font-weight: 600; font-size: .95em; color: var(--ink); display: inline-block; }
.cg-cell.weekend .cg-num { color: var(--accent-text); }
.cg-holiday-tag { font-family: var(--mono); font-size: .5em; letter-spacing: .01em; color: var(--accent-text); margin-top: auto; line-height: 1.2; background: color-mix(in srgb, var(--accent) 14%, transparent); padding: .1em .3em; border-radius: 3px; overflow-wrap: anywhere; }
.cg-notes-line { border-bottom: 1px solid var(--line-soft); flex: 1; margin-top: 2px; }
.cg-badge-row { display: flex; gap: 2px; flex-wrap: wrap; margin-top: 2px; }
.cg-badge-dot { width: .4em; height: .4em; border-radius: 50%; flex-shrink: 0; display: inline-block; }

/* Editorial */
.layout-editorial { display: flex; height: 100%; }
.ed-side { width: 30%; background: var(--accent); color: var(--accent-ink); padding: 2em 1.4em; display: flex; flex-direction: column; flex-shrink: 0; min-width: 0; }
.ed-monthnum { font-family: var(--display-font); font-style: italic; font-weight: 500; font-size: 4.6em; line-height: .85; opacity: .95; }
.ed-monthname { font-family: var(--display-font); font-weight: 700; font-size: 1.5em; margin-top: .6em; letter-spacing: -.01em; overflow-wrap: anywhere; }
.ed-year { font-family: var(--mono); font-size: .68em; letter-spacing: .12em; opacity: .9; margin-top: .2em; }
.ed-logo { max-height: 2.4em; max-width: 7em; object-fit: contain; margin-bottom: .6em; align-self: flex-start; background: #fff; padding: .2em .4em; border-radius: 4px; }
.ed-quote { font-family: var(--display-font); font-style: italic; font-size: .85em; line-height: 1.5; margin-top: 1.2em; opacity: .96; border-top: 1px solid currentColor; padding-top: 1em; }
.ed-holidays { margin-top: 1.2em; display: flex; flex-direction: column; gap: .4em; }
.ed-hitem { font-family: var(--mono); font-size: .56em; letter-spacing: .02em; display: flex; justify-content: space-between; gap: .6em; }
.ed-main { flex: 1; padding: 2em 1.8em; display: flex; flex-direction: column; min-width: 0; }
.ed-dow-row { display: grid; grid-template-columns: repeat(7, 1fr); margin-bottom: .4em; flex-shrink: 0; }
.ed-dow { font-family: var(--mono); font-size: .56em; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); text-align: center; }
.ed-grid { display: grid; grid-template-columns: repeat(7, 1fr); grid-auto-rows: 1fr; gap: 1px; flex: 1; min-height: 0; }
.ed-cell { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding-top: .5em; position: relative; gap: .2em; }
.ed-num { font-family: var(--display-font); font-weight: 600; font-size: 1em; color: var(--ink); width: 1.7em; height: 1.7em; display: flex; align-items: center; justify-content: center; border-radius: 50%; }
.ed-cell.other .ed-num { opacity: .3; }
.ed-cell.has-holiday .ed-num { background: var(--accent-soft); }
.ed-cell.today .ed-num { background: var(--accent); color: var(--accent-ink); }
.ed-cell .cell-stickers { top: -.1em; right: 0; }
.ed-cell .cell-sticker { width: 1.2em; height: 1.2em; }
.ed-moon { width: .85em; height: .85em; color: var(--faint); }
.ed-moon .moon { width: 100%; height: 100%; }
.ed-dots { display: flex; gap: 2px; }

/* Minimal ledger */
.layout-ledger { font-family: var(--mono); height: 100%; padding: 2em 2.2em; display: flex; flex-direction: column; }
.lg-header { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 1.5px solid var(--ink); padding-bottom: .5em; margin-bottom: .5em; flex-shrink: 0; }
.lg-title { font-size: 1.1em; letter-spacing: .06em; text-transform: uppercase; font-weight: 500; }
.lg-title span { color: var(--accent-text); }
.lg-brand { font-size: .6em; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.lg-rows { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.lg-row { display: grid; grid-template-columns: 2.2em 5em 1fr; align-items: center; border-bottom: 1px solid var(--line-soft); padding: .1em 0; flex: 1; min-height: 0; position: relative; }
.lg-row.with-wknum { grid-template-columns: 2.4em 2.2em 5em 1fr; }
.lg-num { font-size: .85em; font-weight: 500; }
.lg-num.weekend { color: var(--accent-text); }
.lg-dayname { font-size: .6em; letter-spacing: .04em; text-transform: uppercase; color: var(--mid); }
.lg-dayname .cell-moon { width: 1em; height: 1em; }
.lg-holiday { font-size: .62em; letter-spacing: .02em; color: var(--accent-text); display: flex; align-items: center; gap: .3em; min-width: 0; }
.lg-notes { font-size: .6em; color: var(--faint); display: flex; align-items: center; gap: .3em; }
.lg-row .cell-stickers { position: static; margin-left: auto; max-width: none; flex-wrap: nowrap; }
.lg-row .cell-sticker { width: 1.7em; height: 1.7em; }

/* Photo or header band */
.layout-band { display: flex; flex-direction: column; height: 100%; }
.bd-band { height: 32%; background: var(--accent); position: relative; display: flex; align-items: flex-end; padding: 1.4em 1.8em; flex-shrink: 0; overflow: hidden; }
.bd-band.has-photo-bg { background-color: var(--ink); }
.bd-band.has-photo-bg .bd-band-content { color: #FFF9F0; }
.bd-band-bg, .cover-bg-layer { position: absolute; inset: 0; background-size: cover; background-position: center; z-index: 0; }
.filter-grayscale { filter: grayscale(100%); } .filter-sepia { filter: sepia(70%); } .filter-warm { filter: sepia(25%) saturate(140%) hue-rotate(-8deg); } .filter-contrast { filter: contrast(135%) saturate(110%); } .filter-fade { filter: saturate(55%) brightness(1.12) contrast(90%); }
.bd-band::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,.35) 100%); z-index: 0; }
.bd-band-content { position: relative; z-index: 1; color: var(--accent-ink); width: 100%; display: flex; justify-content: space-between; align-items: flex-end; gap: 1em; }
.bd-title { font-family: var(--display-font); font-weight: 700; font-size: 2em; line-height: 1.1; overflow-wrap: anywhere; }
.bd-year { font-family: var(--mono); font-size: .7em; letter-spacing: .1em; opacity: .95; }
.bd-logo { max-height: 2.2em; max-width: 7em; object-fit: contain; background: #fff; padding: .2em .4em; border-radius: 4px; }
.bd-body { flex: 1; padding: 1.2em 1.8em 2em; display: flex; flex-direction: column; min-height: 0; }
.bd-dow-row { display: grid; grid-template-columns: repeat(7, 1fr); margin-bottom: .3em; flex-shrink: 0; }
.bd-dow-row.with-wknum { grid-template-columns: 1.6em repeat(7, 1fr); }
.bd-wknum-head { font-family: var(--mono); font-size: .5em; color: var(--faint); text-align: center; }
.bd-dow { font-family: var(--mono); font-size: .56em; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-text); text-align: center; }
.bd-grid { display: grid; grid-template-columns: repeat(7, 1fr); grid-auto-rows: 1fr; gap: 1px; flex: 1; min-height: 0; }
.bd-grid.with-wknum { grid-template-columns: 1.6em repeat(7, 1fr); }
.bd-wknum-cell { display: flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: .52em; color: var(--faint); background: var(--panel-alt); border-top: 1px solid var(--line-soft); }
.bd-cell { border-top: 1px solid var(--line-soft); padding: .3em; display: flex; flex-direction: column; position: relative; min-height: 0; overflow: hidden; }
.bd-cell.other { opacity: .3; }
.bd-num { font-family: var(--display-font); font-weight: 600; font-size: .9em; display: inline-block; }
.bd-holiday-tag { font-family: var(--mono); font-size: .46em; color: var(--accent-text); margin-top: auto; overflow-wrap: anywhere; }

/* Year overview, twelve months on one page */
.year-overview-inner { padding: 2em; height: 100%; display: flex; flex-direction: column; }
.yo-header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 1em; flex-shrink: 0; }
.yo-title { font-family: var(--display-font); font-weight: 700; font-size: 1.9em; color: var(--accent-text); }
.yo-title span { color: var(--ink); font-weight: 500; font-style: italic; }
.yo-logo { max-height: 2em; max-width: 7em; object-fit: contain; }
.yo-grid { display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(3, 1fr); gap: .9em; flex: 1; min-height: 0; }
.yo-month { border: 1px solid var(--line-soft); border-radius: 8px; padding: .5em .6em; display: flex; flex-direction: column; min-height: 0; }
.yo-month-name { font-family: var(--display-font); font-weight: 700; font-size: .8em; color: var(--accent-text); margin-bottom: .3em; }
.yo-mini-dow { display: grid; grid-template-columns: repeat(7, 1fr); }
.yo-mini-dow span { font-family: var(--mono); font-size: .42em; color: var(--faint); text-align: center; }
.yo-mini-grid { display: grid; grid-template-columns: repeat(7, 1fr); grid-auto-rows: 1fr; flex: 1; }
.yo-mini-day { font-size: .5em; text-align: center; padding: .1em 0; color: var(--ink); position: relative; }
.yo-mini-day.other { opacity: .25; }
.yo-mini-day.weekend { color: var(--accent-text); }
.yo-mini-day.holiday::after { content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 3px; height: 3px; border-radius: 50%; background: var(--accent); }
.page-footer-credit { position: absolute; bottom: .6em; right: .9em; font-family: var(--mono); font-size: .45em; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.page-legend { position: absolute; bottom: .6em; left: .9em; display: flex; gap: .6em; flex-wrap: wrap; align-items: center; max-width: 60%; }
.legend-item { display: flex; align-items: center; gap: .3em; font-family: var(--mono); font-size: .45em; letter-spacing: .03em; color: var(--mid); text-transform: uppercase; }
.legend-dot { width: 1em; height: 1em; border-radius: 50%; flex-shrink: 0; }
.page-qr-code { position: absolute; width: 4.4em; height: 4.4em; background: #fff; padding: .25em; border-radius: 3px; z-index: 3; line-height: 0; }
.page-qr-code svg { width: 100%; height: 100%; display: block; }
.page-qr-code.br { bottom: .6em; right: .6em; } .page-qr-code.tr { top: .6em; right: .6em; }
.page-qr-code.err { font: 600 .45em/1.2 var(--mono); color: #8F2E24; line-height: 1.2; padding: .6em; }
/* cover and notes */
.cover-page-inner { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 3em 2em; position: relative; background: var(--paper); overflow: hidden; }
.cover-page-inner.has-bg { background: none; }
.cover-page-inner.has-bg::before { content: ''; position: absolute; inset: 0; background: rgba(26, 18, 8, .45); z-index: 0; }
.cover-content { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; }
.cover-title { font-family: var(--display-font); font-weight: 700; font-size: 3em; color: var(--accent-text); line-height: 1.1; overflow-wrap: anywhere; }
.cover-page-inner.has-bg .cover-title, .cover-page-inner.has-bg .cover-year { color: #FFF9F0; }
.cover-year { font-family: var(--mono); font-size: 1.1em; letter-spacing: .16em; color: var(--ink); margin-top: .6em; }
.cover-logo { max-height: 4.4em; max-width: 14em; object-fit: contain; margin-bottom: 1.6em; }
.cover-quote { font-family: var(--display-font); font-style: italic; font-size: 1.05em; color: var(--mid); margin-top: 1.6em; max-width: 36em; }
.cover-page-inner.has-bg .cover-quote { color: #F4EBDA; }
.notes-page-inner { height: 100%; padding: 2.4em 2.2em; display: flex; flex-direction: column; }
.notes-page-title { font-family: var(--display-font); font-weight: 700; font-size: 1.5em; color: var(--accent-text); border-bottom: 2px solid var(--accent); padding-bottom: .5em; margin-bottom: 1.2em; flex-shrink: 0; }
.notes-page-lines { flex: 1; display: flex; flex-direction: column; gap: 1.6em; }
.notes-page-line { border-bottom: 1px solid var(--line-soft); flex: 1; }
.empty-note { padding: 28px 16px; text-align: center; color: var(--muted); }

/* ---------- print: the pages are the only thing that prints ---------- */
@page a4 { size: A4; margin: 0; } @page a4l { size: A4 landscape; margin: 0; }
@page a3 { size: A3; margin: 0; } @page a3l { size: A3 landscape; margin: 0; }
@page letter { size: letter; margin: 0; } @page letterl { size: letter landscape; margin: 0; }
@page sq { size: 210mm 210mm; margin: 0; }
@media print {
  html, body { background: #fff !important; margin: 0 !important; padding: 0 !important; min-height: 0 !important; }
  html.has-island body { padding-top: 0 !important; } html.has-island::before { display: none !important; }
  .boot, .island, .update-bar, .topbar, .menu, .drawer, .stage-bar, .footer, .halo, .halo-petals, .halo-backdrop, .modal-wrap, .tour, .wait-chip, #fxLayer { display: none !important; }
  .workspace { display: block !important; min-height: 0 !important; }
  .stage { padding: 0 !important; }
  .preview { display: block !important; padding: 0 !important; background: #fff !important; border-radius: 0 !important; overflow: visible !important; }
  .frame { width: auto !important; height: auto !important; display: block !important; }
  .page-sheet { zoom: 1 !important; box-shadow: none !important; break-after: page; page-break-after: always; break-inside: avoid; -webkit-print-color-adjust: exact; print-color-adjust: exact; margin: 0 !important; }
  .page-sheet.no-break-after { break-after: auto; page-break-after: auto; }
  .page-sheet.size-a4 { page: a4; height: 296.4mm; } .page-sheet.size-a3 { page: a3; height: 419.4mm; } .page-sheet.size-letter { page: letter; height: 278.8mm; } .page-sheet.size-square { page: sq; height: 209.4mm; }
  .page-sheet.year-overview.size-a4 { page: a4l; height: 209.4mm; } .page-sheet.year-overview.size-a3 { page: a3l; height: 296.4mm; } .page-sheet.year-overview.size-letter { page: letterl; height: 215.3mm; }
  body.arming .page-sheet [data-day] { outline: 0 !important; }
}
@media (prefers-reduced-motion: reduce) { .drawer, .sec-head .chev { transition: none; } .sec.flash { animation: none; } }

.page-sheet.lay-editorial .page-legend { left: calc(30% + 1.2em); }
.page-sheet.has-qr .cg-header, .page-sheet.has-qr .lg-header, .page-sheet.has-qr .bd-band-content { padding-right: 5.6em; }
.page-sheet.has-qr .ed-main { padding-top: 5.8em; }
