/* One visual grammar for adding, filtering and editing across MiWi. Module colours stay intact. */
:root{--miwi-field-height:44px;--miwi-field-radius:11px;--miwi-panel-radius:18px}

:is(.miwi-editor__form,.budget-form-modal,.event-form,.habit-form,.parcel-form,.garden-fields,.med-form,.house-form,.contact-form,.project-form,.new-store-form) label:not(:has(input[type=checkbox],input[type=radio])){color:var(--muted,#69716a);font-size:12px;font-weight:700;letter-spacing:0;line-height:1.35;text-transform:none}
:is(.miwi-editor__form,.budget-form-modal,.event-form,.habit-form,.parcel-form,.garden-fields,.med-form,.house-form,.contact-form,.project-form,.new-store-form) :is(input:not([type=checkbox],[type=radio],[type=hidden],[type=file]),select,textarea){box-sizing:border-box;min-width:0;min-height:var(--miwi-field-height);border:1px solid var(--line,#d6ded3);border-radius:var(--miwi-field-radius);background:#faf9f5;color:var(--ink,#293126);font-family:'DM Sans',system-ui,sans-serif;font-size:14px;letter-spacing:normal;text-transform:none}
:is(.miwi-editor__form,.budget-form-modal,.event-form,.habit-form,.parcel-form,.garden-fields,.med-form,.house-form,.contact-form,.project-form,.new-store-form) :is(input,select,textarea):focus-visible{outline:2px solid var(--olive,#577766);outline-offset:2px}

:is(.garden-filters,.events-tools,.house-document-tools,.transaction-tools,.lp-facets,.wine-filters,.watch-search,.med-search,.list-search-label,.compact-tools-panel) :is(input[type=search],select){box-sizing:border-box;min-height:var(--miwi-field-height);border:1px solid var(--line,#d6ded3);border-radius:var(--miwi-field-radius);background:var(--paper,#fffefa);color:var(--ink,#293126);font-family:'DM Sans',system-ui,sans-serif;font-size:14px}
:is(.garden-filters,.events-tools,.house-document-tools,.transaction-tools,.lp-facets,.wine-filters,.watch-search,.med-search,.list-search-label,.compact-tools-panel) :is(input[type=search],select):focus-visible{outline:2px solid var(--olive,#577766);outline-offset:2px}
:is(.garden-filters,.events-tools,.house-document-tools,.lp-facets) label{color:var(--muted,#69716a);font-size:12px;font-weight:700;letter-spacing:0;text-transform:none}
.documents-page .house-heading{align-items:end;padding-bottom:10px}.documents-page .house-heading h1{font-size:clamp(46px,7vw,76px)}.documents-heading-actions{display:flex;align-items:center;gap:8px;flex:none}.documents-filter-toggle{display:grid;place-items:center;width:47px;height:47px;padding:0;border:1px solid var(--line);border-radius:12px;background:var(--paper);color:var(--ink);cursor:pointer}.documents-filter-toggle svg{width:21px;height:21px}.documents-filter-toggle[aria-expanded=true]{border-color:var(--olive);background:var(--olive-pale)}.documents-filter-toggle:focus-visible{outline:2px solid var(--olive);outline-offset:2px}.documents-intro{margin:0 0 18px;color:var(--muted);font-size:13px;line-height:1.5}.documents-page .house-document-tools[hidden]{display:none!important}.documents-page .house-document-tools{padding:14px;border:1px solid var(--line);border-radius:16px;background:var(--paper)}@media(max-width:650px){.documents-page .house-heading{padding-top:32px;gap:7px}.documents-page .house-heading h1{font-size:clamp(36px,10vw,58px)}.documents-heading-actions{gap:6px}.documents-filter-toggle{width:44px;height:44px}.documents-page .house-add{min-height:44px;max-width:95px;padding:7px 9px;font-size:11px}.documents-intro{margin-bottom:15px}}
.recent-section-toggle{display:inline-flex;align-items:center;gap:10px;min-height:44px;padding:0;border:0;background:transparent;color:inherit;font:inherit;text-align:left;cursor:pointer}.recent-section-toggle::after{content:'⌄';font:22px/1 'DM Sans',sans-serif;transition:transform .2s}.recent-section-toggle[aria-expanded=true]::after{transform:rotate(180deg)}.recent-section-toggle:focus-visible{outline:2px solid var(--olive);outline-offset:3px}.recent-items[hidden]{display:none!important}
.events-tools label{display:grid;gap:6px;min-width:0}.events-tools label :is(input,select){width:100%}.events-tools>button{align-self:end;min-height:44px}

:is(.miwi-editor,.budget-dialog,.event-dialog,.habit-dialog,.parcel-dialog,.garden-dialog,.med-dialog,.watch-dialog,.home-dialog){border:0;border-radius:21px;box-shadow:0 24px 72px #2630243d}
:is(.miwi-editor,.budget-dialog,.event-dialog,.habit-dialog,.parcel-dialog,.garden-dialog,.med-dialog,.watch-dialog,.home-dialog)::backdrop{background:#2630249c}
:is(.miwi-editor,.budget-dialog,.event-dialog,.habit-dialog,.parcel-dialog,.garden-dialog,.med-dialog,.watch-dialog,.home-dialog) :is(.dialog-close,.garden-dialog-head button,.med-detail-head button,.home-dialog__head button){display:grid;place-items:center;min-width:44px;min-height:44px;border:0;border-radius:50%;background:#f0f0e9;color:var(--ink,#293126);font-size:23px;line-height:1;cursor:pointer}
:is(.miwi-editor__actions,.budget-form-modal .modal-actions,.event-form .actions,.habit-form-actions,.parcel-form-actions,.garden-form-actions,.med-form-actions,.house-form-actions){gap:10px}
:is(.miwi-editor__save,.budget-form-modal .budget-primary,.event-form button[type=submit],.habit-form-actions button[type=submit],.parcel-form button[type=submit],.garden-form-actions .garden-primary,.med-form-actions .med-save,.house-form-actions button[type=submit],.contact-form button[type=submit],.project-form button[type=submit]){min-height:44px;border:0;border-radius:11px;background:var(--olive,#577766);color:#fffdf8;font-family:'DM Sans',system-ui,sans-serif;font-size:13px;font-weight:700}
@media(max-width:620px){:is(.miwi-editor__actions,.budget-form-modal .modal-actions,.event-form .actions,.habit-form-actions,.parcel-form-actions,.garden-form-actions,.med-form-actions,.house-form-actions) :is(button[type=submit],.miwi-editor__save,.garden-primary,.budget-primary){min-height:48px}}
@media(max-width:720px){.events-tools>label:first-child{grid-column:1/-1}}
/* Consistent compact title actions on small screens. */
@media(max-width:620px){
  .budget-page .budget-heading{position:relative;display:block;padding-bottom:20px}
  .budget-page .budget-heading .budget-primary{position:absolute;top:31px;right:0;width:auto;min-height:48px}
  .events-page .events-heading{display:flex!important;flex-direction:row!important;align-items:flex-end!important;justify-content:space-between;gap:8px;padding-bottom:18px}
  .events-page .events-heading h1{font-size:clamp(25px,7.2vw,34px)!important;white-space:normal}
  .events-page .events-heading .heading-add-action{flex:none;max-width:120px;padding:8px 10px;white-space:normal}
  .export-page .export-heading{margin-bottom:25px}
  .export-page .export-heading h1{font-size:clamp(45px,12vw,57px);margin-bottom:14px}
  .export-page .export-heading p{font-size:.95rem}
}
@media(max-width:360px){
  .budget-page .budget-heading h1{font-size:40px}
  .events-page .events-heading .heading-add-action{max-width:92px;font-size:11px}
}
/* Shared spacing for simple empty list states; illustrated hero states stay module-specific. */
:is(.med-empty,.habit-empty,.house-empty,.garden-empty,.loyalty-empty){padding:22px;border:1px dashed var(--line,#dedfd4);border-radius:18px;background:var(--paper,#fffefa);color:var(--muted,#69716a);line-height:1.5}

/* MiWi's shared finishing layer. Module accents and editorial media surfaces remain intact. */
:root {
  --muted: #666c63;
  --finish-canvas: #f7f4ec;
  --finish-paper: #fffdf8;
  --finish-line: #e3dfd5;
  --finish-muted: #666c63;
  --finish-space-1: 4px;
  --finish-space-2: 8px;
  --finish-space-3: 12px;
  --finish-space-4: 16px;
  --finish-space-5: 24px;
  --finish-space-6: 32px;
  --finish-card-radius: 19px;
  --finish-field-radius: 12px;
  --finish-control-height: 48px;
}

/* One recognizable scale for module headings. The home greeting has its own role. */
@media (max-width: 720px) {
  .page-shell:not(.home-page) main h1 {
    font-family: 'DM Serif Display', Georgia, serif !important;
    font-size: clamp(36px, 10.5vw, 43px) !important;
    line-height: .98 !important;
    letter-spacing: -.045em;
  }
  .events-page .events-heading h1,
  .kijk-page .kijk-heading h1 {font-size: clamp(35px, 9.5vw, 42px) !important;}
  .page-shell .eyebrow {font-size: 11px;line-height: 1.35;letter-spacing: .13em;}
  .heading-row {padding-top: 27px;padding-bottom: 18px;}
  .addressbook-main .heading-row,
  .collections-main .heading-row {padding-top: 27px;}
  .events-page .events-heading {padding-top: 29px;}
  .budget-page .budget-heading,
  .garden-page .garden-heading,
  .house-page .house-heading,
  .settings-page .settings-main,
  .export-page .export-heading {padding-top: 27px;}
  .loyalty-page .loyalty-heading {padding-top: 27px;}
  .documents-page .house-heading h1 {font-size: clamp(35px, 9.5vw, 42px) !important;}
}

.menu-universal-search {padding:12px 0 16px;border-bottom:1px solid rgba(50,54,42,.14);margin-bottom:5px;}
.menu-universal-search label {display:block;font-size:11px;letter-spacing:.13em;text-transform:uppercase;margin-bottom:8px;color:#d9dfcb;}
.menu-universal-search input {box-sizing:border-box;width:100%;min-height:48px;border:1px solid #d9d6ce;border-radius:15px;background:#faf9f5;padding:0 15px;font:inherit;color:#292e26;outline-offset:2px;}
.menu-search-status {font-size:12px;line-height:1.5;color:#d9dfcb;margin-top:7px;}
.menu-search-status:empty {display:none;}
.menu-search-results:not(:empty) {max-height:min(46vh,430px);overflow-y:auto;margin:12px 0;overscroll-behavior:contain;}
.menu-search-group {padding:6px 0 12px;}
.menu-search-group h3 {font-size:11px;letter-spacing:.12em;text-transform:uppercase;color:#d9dfcb;margin:6px 0;}
.menu-search-result {display:flex!important;flex-direction:column;align-items:flex-start!important;justify-content:center!important;gap:2px;min-height:56px!important;padding:8px 10px!important;border-radius:11px;text-decoration:none;}
.menu-search-result:hover,.menu-search-result:focus-visible {background:#ffffff19;}
.menu-search-result strong {font-size:14px;line-height:1.3;color:#fffdf8;}
.menu-search-result small {font-size:11px;line-height:1.3;color:#cbd2c5;}
.menu-panel nav a[hidden],.menu-settings[hidden] {display:none!important;}
.miwi-search-target {outline:3px solid #795c88;outline-offset:4px;}

/* Readable data and predictable touch areas. */
.page-shell :is(button, a, summary) { -webkit-tap-highlight-color: transparent; }
.page-shell :is(button, a, summary):focus-visible {outline: 3px solid var(--module-ink, #526f5c);outline-offset: 3px;}
.page-shell :is(.menu-toggle,.menu-close,.documents-filter-toggle,.events-add) {min-width:44px;min-height:44px;}
.page-shell :is(.sync-status,.micro-label) {letter-spacing:.08em;}
.budget-month button {width:44px;height:44px;min-width:44px;min-height:44px;}
.home-calendar__button,.home-calendar__subtle {min-height:44px;}
.full-calendar__header>button,.full-calendar__month-nav button {width:44px;height:44px;min-width:44px;min-height:44px;}
.full-calendar__views button,.full-calendar__toolbar>button {min-height:44px;}
.page-shell :is(.timeline-label,.eyebrow) {font-weight:700;}
.page-shell :is(time,.event-card small,.budget-total,.budget-amount) {font-variant-numeric:tabular-nums;}

/* The same control geometry across long forms; retain their module accent. */
:is(.miwi-editor__form,.budget-form-modal,.event-form,.habit-form,.parcel-form,.garden-fields,.med-form,.house-form,.contact-form,.project-form,.new-store-form) :is(input:not([type=checkbox],[type=radio],[type=hidden],[type=file]),select,textarea) {
  min-height: var(--finish-control-height);
  border-color: var(--finish-line);
  border-radius: var(--finish-field-radius);
  background: var(--finish-paper);
  font-size: 15px;
}
:is(.miwi-editor__form,.budget-form-modal,.event-form,.habit-form,.parcel-form,.garden-fields,.med-form,.house-form,.contact-form,.project-form,.new-store-form) label:not(:has(input[type=checkbox],input[type=radio])) {
  color: var(--finish-muted);
  font-size: 13px;
  line-height: 1.35;
}
:is(.miwi-editor__form,.budget-form-modal,.event-form,.habit-form,.parcel-form,.garden-fields,.med-form,.house-form,.contact-form,.project-form,.new-store-form) input[type=checkbox] {
  width: 20px;
  height: 20px;
  min-width: 20px;
  min-height: 20px;
  padding: 0;
  flex: none;
  accent-color: var(--module-ink, var(--olive, #526f5c));
}
:is(.miwi-editor,.budget-dialog,.event-dialog,.habit-dialog,.parcel-dialog,.garden-dialog,.med-dialog,.watch-dialog,.home-dialog) {
  border-radius: 22px;
  box-shadow: 0 22px 68px #26302435;
}

/* Compact utility content; retain the media tiles' own spacing and depth. */
.event-card {box-shadow: 0 6px 18px #302d4310;}
.event-card .ticket-link {min-height:44px;display:inline-flex;align-items:center;justify-content:center;}
.loyalty-page .loyalty-heading-row {gap:12px;}
.loyalty-page .loyalty-heading-row h1 {min-width:0;}
.loyalty-page .loyalty-add-button {flex:none;}
.addressbook-main .contact-card {min-height:104px;}
.addressbook-main .contact-copy strong {font-size:21px;}
.documents-page .house-heading {padding-bottom:12px;}
.documents-page .documents-intro {line-height:1.5;}

@media (max-width: 620px) {
  .menu-panel {padding:20px;}
  .menu-panel__top {top:-20px;margin:-20px -20px 0;padding:20px;}
  .menu-panel nav a {min-height:48px;padding:9px 0;font-size:15px;}
  .menu-panel .menu-link-icon {width:29px;height:29px;}
  .budget-form-modal {row-gap:14px;}
  .budget-dialog h2 {margin-bottom:18px;}
  .event-choice .choice-card {min-height:72px;padding:13px 15px;}
  .event-choice .choice-card strong {font-size:19px;}
  .event-choice .choice-card span {font-size:12px;}
  .event-card {grid-template-columns:53px minmax(0,1fr);gap:10px;padding:14px;}
  .event-card strong {font-size:19px;line-height:1.15;}
  .event-card .ticket-link {grid-column:2;}
  .addressbook-main .contact-card {min-height:106px;padding:13px;}
}

@media (min-width: 480px) and (max-width: 720px) {
  .event-card {grid-template-columns:60px minmax(0,1fr) auto;}
  .event-card .ticket-link {grid-column:3;grid-row:1;align-self:center;}
}

@media (prefers-reduced-motion: reduce) {
  .menu-panel,.menu-backdrop {transition:none;}
}

/* Give every module the same illustrated outer frame and calm inner sheet as Vandaag. */
body.page-shell:not(.home-page) {
  position: relative;
  background: #f7f4ec url('/images/miwi-home-background.png') center top / cover fixed no-repeat;
}
body.page-shell:not(.home-page)::before {
  content: '';
  position: fixed;
  z-index: 0;
  inset: 0;
  background: rgba(247,244,236,.62);
  pointer-events: none;
}
body.page-shell:not(.home-page) > :is(.utility-nav,main) {
  position: relative;
  z-index: 1;
}
body.page-shell:not(.home-page) > main {
  width: 100%;
  padding: clamp(26px,4vw,48px) clamp(20px,3vw,36px) 56px;
  border-radius: 30px;
  background: rgba(255,253,248,.72);
  backdrop-filter: blur(2px);
}
@media (max-width: 720px) {
  body.page-shell:not(.home-page) {background-attachment: scroll;}
  body.page-shell:not(.home-page)::before {background: rgba(247,244,236,.72);}
  body.page-shell:not(.home-page) > main {
    padding: 24px 16px 38px;
    border-radius: 20px;
    background: rgba(255,253,248,.58);
  }
}
@media (max-width: 600px) {
  body.page-shell:is(.events-page,.kijk-page,.parcels-page) > .utility-nav {
    position: sticky;
  }
}
/* Collection titles and navigation scroll with their content on every screen. */
body.page-shell.collection-detail-page > .utility-nav,
.collection-detail-page .collection-context {
  position: static;
  top: auto;
}

/* Compact hoofdmenu met dezelfde lees- en tabvolgorde. */
.menu-panel nav[aria-label="MiWi-pagina's"]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:3px 14px}
.menu-panel nav[aria-label="MiWi-pagina's"] a{grid-template-columns:26px minmax(0,1fr);gap:7px;min-height:47px;padding:7px 3px;border:0;border-bottom:1px solid #ffffff26;border-radius:0;font-size:13px;line-height:1.2;overflow-wrap:anywhere}
.menu-panel nav[aria-label="MiWi-pagina's"] a[aria-current="page"]{border-bottom-color:#d9dfcb;background:#ffffff12}
.menu-panel nav[aria-label="MiWi-pagina's"] .menu-link-icon{width:26px;height:26px}
.menu-panel .menu-settings{margin-top:12px}
