/* Patch 254 — loaded last on purpose. Heirloom presentation profile. */
:is(.household-page,.home-page,.family-page,.people-page,.money-page,.lifehub-page).heirloom-workspace {
  --hw-ink:#42311f; --hw-muted:#79664d; --hw-line:rgba(130,94,43,.28);
  min-height:100%; max-width:none!important; margin:0!important;
  padding:clamp(18px,2.2vw,34px)!important;
  color:var(--hw-ink)!important;
  background:
    radial-gradient(circle at 18% 0,rgba(255,255,255,.75),transparent 34%),
    linear-gradient(135deg,#eee4cf 0%,#faf5e9 48%,#e6dac0 100%)!important;
}
:is(.household-hero,.home-hero,.family-hero,.people-hero,.money-hero,.lifehub-hero){
  display:flex!important; justify-content:space-between!important; align-items:flex-end!important;
  gap:26px!important; margin:0 0 18px!important; padding:31px 35px!important;
  border:1px solid rgba(139,101,46,.34)!important; border-radius:5px!important;
  background:linear-gradient(145deg,rgba(255,254,248,.98),rgba(235,220,190,.93))!important;
  box-shadow:0 18px 42px rgba(60,40,17,.13),inset 0 0 0 5px rgba(255,255,255,.42)!important;
}
:is(.household-hero,.home-hero,.family-hero,.people-hero,.money-hero,.lifehub-hero) h1{
  margin:0 0 8px!important; color:#49331f!important;
  font:italic 500 clamp(2.35rem,4vw,4.6rem)/.98 Georgia,"Times New Roman",serif!important;
}
:is(.household-eyebrow,.home-eyebrow,.family-eyebrow,.people-eyebrow,.money-eyebrow,.lifehub-eyebrow){
  letter-spacing:.18em!important; text-transform:uppercase!important; color:#98733d!important;
}
:is(.household-shortcuts,.home-shortcuts,.family-shortcuts,.people-shortcuts,.money-shortcuts,.lifehub-shortcuts){
  display:grid!important; grid-template-columns:repeat(auto-fit,minmax(132px,1fr))!important;
  gap:9px!important; margin:0 0 18px!important;
}
:is(.household-shortcut,.home-shortcut,.family-shortcut,.people-shortcut,.money-shortcut,.lifehub-shortcut){
  min-height:70px!important; padding:10px 12px!important; border-radius:4px!important;
  border:1px solid rgba(138,101,47,.27)!important;
  background:linear-gradient(#fffdf7,#f2e8d2)!important;
  color:#624a2f!important; box-shadow:0 7px 16px rgba(56,38,17,.07)!important;
  font-family:Georgia,"Times New Roman",serif!important;
}
:is(.household-shortcut,.home-shortcut,.family-shortcut,.people-shortcut,.money-shortcut,.lifehub-shortcut).is-active{
  background:#fff9e9!important; border-color:#9b743e!important;
  box-shadow:inset 0 -3px #9b743e,0 9px 20px rgba(56,38,17,.11)!important;
}
:is(.household-grid,.home-grid,.home-dashboard,.family-grid,.family-dashboard,.people-grid,.people-layout,.people-dashboard,.money-dashboard,.lifehub-layout,.lifehub-dashboard){
  gap:16px!important;
}
:is(.household-card,.home-card,.family-card,.people-card,.people-panel,.money-panel,.lifehub-panel,.lifehub-card){
  border:1px solid var(--hw-line)!important; border-radius:5px!important;
  background:linear-gradient(150deg,rgba(255,254,249,.97),rgba(243,233,212,.92))!important;
  box-shadow:0 12px 27px rgba(60,40,17,.09),inset 0 0 0 4px rgba(255,255,255,.34)!important;
}
:is(.household-card,.home-card,.family-card,.people-card,.people-panel,.money-panel,.lifehub-panel) h2{
  color:#4a3521!important; font-family:Georgia,"Times New Roman",serif!important;
  font-style:italic!important; font-weight:500!important;
}
:is(.household-list-item,.home-list-item,.family-list-item,.people-list-item,.money-record,.lifehub-record-card){
  border-radius:3px!important; background:rgba(255,252,243,.78)!important;
  border-color:rgba(135,98,44,.2)!important;
}
@media (min-width:1100px){
  .heirloom-workspace .people-layout,.heirloom-workspace .lifehub-layout{
    grid-template-columns:245px minmax(470px,1fr) 340px!important;
  }
}
@media (max-width:850px){
  :is(.household-hero,.home-hero,.family-hero,.people-hero,.money-hero,.lifehub-hero){align-items:flex-start!important;flex-direction:column!important}
}

/* Patch 255 — Household now uses the actual Legacy three-column archive shell. */
.household-page.heirloom-workspace {
  min-height:100%;
  max-width:none!important;
  margin:0!important;
  padding:18px 22px 34px!important;
  background:transparent!important;
}
.household-archive-layout {
  display:grid;
  grid-template-columns:225px minmax(0,1fr) 285px;
  gap:14px;
  align-items:start;
}
.household-archive-sidebar { display:grid; gap:14px; }
.household-archive-main { min-width:0; display:grid; gap:14px; }
.household-archive-detail { position:sticky; top:14px; }
.household-archive-panel,
.household-page.heirloom-workspace .household-card {
  border:1px solid rgba(112,87,51,.18)!important;
  border-radius:18px!important;
  background:rgba(255,255,255,.84)!important;
  box-shadow:0 10px 30px rgba(45,31,17,.08)!important;
  backdrop-filter:blur(2px);
}
.household-archive-panel { padding:16px; }
.household-archive-summary h2,
.household-archive-context h2,
.household-archive-toolbar h1 {
  font-family:Georgia,"Times New Roman",serif!important;
  color:#352b22!important;
  font-weight:500!important;
}
.household-archive-summary h2 { margin:4px 0 10px; font-size:2rem; }
.household-archive-summary>p:not(.household-card__eyebrow) { color:#6c6257; line-height:1.5; }
.household-archive-stats {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
  margin-top:15px;
}
.household-archive-stats div {
  min-height:72px;
  padding:11px 10px;
  border-radius:13px;
  background:rgba(236,227,207,.62);
}
.household-archive-stats strong { display:block; font:600 1.35rem Georgia,serif; color:#493823; }
.household-archive-stats span { display:block; margin-top:4px; color:#756d62; font-size:.72rem; }
.household-archive-nav { display:grid; gap:3px; }
.household-archive-link {
  display:grid;
  grid-template-columns:24px 1fr;
  align-items:center;
  gap:8px;
  padding:9px 10px;
  border-radius:10px;
  color:#4d4439;
  text-decoration:none;
  font-family:Georgia,"Times New Roman",serif;
}
.household-archive-link:hover,
.household-archive-link.is-active { background:#eee3cb; color:#3e3020; }
.household-archive-toolbar {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  min-height:92px;
}
.household-archive-toolbar h1 { margin:3px 0 5px; font-size:clamp(1.8rem,2.6vw,2.7rem); }
.household-archive-toolbar p { margin:0; color:#6d6459; }
.household-archive-toolbar__status {
  display:flex;
  align-items:center;
  gap:8px;
  flex:0 0 auto;
  padding:10px 13px;
  border:1px solid rgba(112,87,51,.18);
  border-radius:12px;
  background:#fffdf8;
  color:#6f6558;
  font-size:.78rem;
}
.household-page.heirloom-workspace .household-grid,
.household-page.heirloom-workspace .household-grid--emergency {
  grid-template-columns:1fr!important;
  gap:12px!important;
}
.household-page.heirloom-workspace .household-card {
  padding:16px!important;
  min-height:0!important;
}
.household-page.heirloom-workspace .household-card__heading { margin-bottom:14px; }
.household-page.heirloom-workspace .household-card h2 { font-size:1.45rem!important; font-style:normal!important; }
.household-page.heirloom-workspace .household-list-item {
  border-radius:14px!important;
  background:rgba(255,255,255,.9)!important;
  box-shadow:0 7px 20px rgba(66,46,23,.04);
}
.household-archive-context { text-align:center; padding:28px 18px; }
.household-archive-flourish { display:block; font-size:2.2rem; color:#98794c; margin-bottom:8px; }
.household-archive-context h2 { margin:5px 0 10px; font-size:1.7rem; }
.household-archive-context>p { color:#665d52; line-height:1.55; }
.household-archive-detail-stats { display:grid; gap:8px; margin:18px 0; }
.household-archive-detail-stats div {
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:10px 12px;
  border-radius:11px;
  background:rgba(236,227,207,.58);
}
.household-archive-detail-stats dt { color:#786b5b; font-size:.75rem; text-transform:uppercase; letter-spacing:.08em; }
.household-archive-detail-stats dd { margin:0; font:600 1.35rem Georgia,serif; color:#493823; }
@media(max-width:1180px){
  .household-archive-layout{grid-template-columns:215px minmax(0,1fr)}
  .household-archive-detail{grid-column:1/-1;position:static}
  .household-archive-context{max-width:none}
}
@media(max-width:820px){
  .household-page.heirloom-workspace{padding:12px!important}
  .household-archive-layout{grid-template-columns:1fr}
  .household-archive-sidebar{grid-template-columns:1fr 1fr}
  .household-archive-toolbar{align-items:flex-start;flex-direction:column}
}
@media(max-width:560px){
  .household-archive-sidebar{grid-template-columns:1fr}
  .household-archive-stats{grid-template-columns:1fr 1fr}
}

/* Patch 256 — Archive Workspace Family
   The Legacy archive is the visual reference for ordinary collection pages.
   Root dashboards and specialist workspaces keep their own information architecture. */
:is(.home-page,.family-page,.people-page,.money-page,.lifehub-page).heirloom-workspace {
  padding:18px 22px 34px!important;
  background:transparent!important;
}

/* The global child ribbon already carries destination navigation.  Local mastheads remain
   structurally available but are intentionally suppressed by the canonical shell. */
:is(.home-page,.family-page,.people-page,.money-page,.lifehub-page).heirloom-workspace
:is(.home-card,.family-card,.people-card,.people-panel,.money-panel,.lifehub-panel,.lifehub-card) {
  border:1px solid rgba(112,87,51,.18)!important;
  border-radius:18px!important;
  background:rgba(255,255,255,.84)!important;
  box-shadow:0 10px 30px rgba(45,31,17,.08)!important;
  backdrop-filter:blur(2px);
}

:is(.home-page,.family-page,.people-page,.money-page,.lifehub-page).heirloom-workspace
:is(.home-card,.family-card,.people-card,.people-panel,.money-panel,.lifehub-panel) h2 {
  color:#352b22!important;
  font-family:Georgia,"Times New Roman",serif!important;
  font-style:normal!important;
  font-weight:500!important;
}

:is(.home-page,.family-page,.people-page,.money-page,.lifehub-page).heirloom-workspace
:is(.home-list-item,.family-list-item,.people-list-item,.money-record,.lifehub-record-card) {
  border:1px solid rgba(112,87,51,.16)!important;
  border-radius:14px!important;
  background:rgba(255,255,255,.9)!important;
  box-shadow:0 7px 20px rgba(66,46,23,.04)!important;
}

/* Collection/detail workspaces use the Legacy archive's calm three-column proportions. */
@media (min-width:1181px) {
  .people-page.heirloom-workspace .people-layout,
  .lifehub-page.heirloom-workspace .lifehub-layout {
    grid-template-columns:225px minmax(0,1fr) 285px!important;
    gap:14px!important;
    align-items:start!important;
  }
  .people-page.heirloom-workspace :is(.people-sidebar,.people-detail),
  .lifehub-page.heirloom-workspace :is(.lifehub-sidebar,.lifehub-detail) {
    position:sticky;
    top:14px;
  }
}

/* Toolbars and collection headings mirror the Legacy living-history toolbar. */
:is(.people-page,.lifehub-page,.money-page,.home-page,.family-page).heirloom-workspace
:is(.people-toolbar-panel,.lifehub-toolbar-panel,.money-toolbar-panel,.home-toolbar-panel,.family-toolbar-panel) {
  min-height:92px;
  padding:16px!important;
  border-radius:18px!important;
}

:is(.people-page,.lifehub-page,.money-page,.home-page,.family-page).heirloom-workspace
:is(input[type="search"],select,textarea,input:not([type="checkbox"]):not([type="radio"])) {
  border-color:rgba(112,87,51,.22)!important;
  border-radius:12px!important;
  background:#fffdf9!important;
}

/* Dashboard roots keep their distinctive dashboard composition, only inheriting materials. */
:is(.home-page[data-home-section="homebase"],
    .family-page[data-family-section="family-emergency"],
    .money-page[data-money-section="what-i-have"]) {
  --archive-layout-preserve-dashboard:1;
}

@media(max-width:820px){
  :is(.home-page,.family-page,.people-page,.money-page,.lifehub-page).heirloom-workspace{padding:12px!important}
}

/* Patch 258 — Routed workspace ownership correction.
   Category routes render exactly one workspace. The Legacy frame is reserved for Legacy pages;
   Household, Home, Family, People, Money, Library, and Lifestyle own their internal layouts. */

/* Patch 259 — Family adopts the Household archive workspace exactly.
   The shell owns the columns; Family's existing feature cards are constrained
   to the center workspace so no child grid can escape into either sidebar. */
.family-page.heirloom-workspace {
  min-height:100%;
  max-width:none!important;
  margin:0!important;
  padding:18px 22px 34px!important;
  background:transparent!important;
}
.family-page.heirloom-workspace .family-archive-layout {
  width:100%;
  min-width:0;
}
.family-page.heirloom-workspace .family-archive-sidebar,
.family-page.heirloom-workspace .family-archive-main,
.family-page.heirloom-workspace .family-archive-detail {
  min-width:0;
}
.family-page.heirloom-workspace .family-grid,
.family-page.heirloom-workspace .family-dashboard {
  display:grid!important;
  grid-template-columns:minmax(0,1fr)!important;
  gap:12px!important;
  width:100%!important;
  min-width:0!important;
}
.family-page.heirloom-workspace :is(
  .family-card,
  .family-card--wide,
  .family-card--span-4,
  .family-card--span-5,
  .family-card--span-7,
  .family-card--span-8
) {
  grid-column:1/-1!important;
  width:auto!important;
  max-width:100%!important;
  min-width:0!important;
  min-height:0!important;
  padding:16px!important;
  border:1px solid rgba(112,87,51,.18)!important;
  border-radius:18px!important;
  background:rgba(255,255,255,.84)!important;
  box-shadow:0 10px 30px rgba(45,31,17,.08)!important;
}
.family-page.heirloom-workspace .family-card__heading {
  margin-bottom:14px;
  min-width:0;
}
.family-page.heirloom-workspace .family-card h2 {
  font-size:1.45rem!important;
  font-style:normal!important;
}
.family-page.heirloom-workspace :is(
  .family-stat-grid,
  .family-action-grid,
  .family-record-grid,
  .family-document-grid,
  .family-memory-grid,
  .family-recipe-grid,
  .family-calendar-summary,
  .family-form-row
) {
  min-width:0;
  max-width:100%;
}
.family-page.heirloom-workspace :is(input,select,textarea,button,a) {
  max-width:100%;
}
.family-page.heirloom-workspace .family-list-item {
  border-radius:14px!important;
  background:rgba(255,255,255,.9)!important;
  box-shadow:0 7px 20px rgba(66,46,23,.04);
}
@media(max-width:1180px){
  .family-page.heirloom-workspace .family-archive-layout{
    grid-template-columns:215px minmax(0,1fr);
  }
  .family-page.heirloom-workspace .family-archive-detail{
    grid-column:1/-1;
    position:static;
  }
}
@media(max-width:820px){
  .family-page.heirloom-workspace{padding:12px!important}
  .family-page.heirloom-workspace .family-archive-layout{grid-template-columns:1fr}
  .family-page.heirloom-workspace .family-archive-sidebar{grid-template-columns:1fr 1fr}
}
@media(max-width:560px){
  .family-page.heirloom-workspace .family-archive-sidebar{grid-template-columns:1fr}
}


/* Patch 372 — unified calendar, Explorer views, and shopping reconstruction */
.tapestry-calendar-shell{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(310px,.65fr);gap:18px;align-items:start}.tapestry-calendar-main,.tapestry-calendar-side{min-width:0}.tapestry-calendar-toolbar{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:12px}.tapestry-calendar-actions{display:flex;gap:7px}.tapestry-calendar-actions button,.explorer-toolbar button{padding:7px 10px;border:1px solid rgba(120,92,57,.22);border-radius:9px;background:#fffaf0;color:#6d5639;cursor:pointer}.tapestry-calendar-filters{display:flex;flex-wrap:wrap;gap:10px;margin-bottom:12px}.tapestry-calendar-filters label{display:inline-flex;align-items:center;gap:7px;padding:7px 11px;border-radius:999px;border:1px solid rgba(120,92,57,.16);background:rgba(255,255,255,.7);font-weight:700;font-size:.78rem}.tapestry-calendar-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:6px}.tapestry-calendar-grid>b{padding:6px;text-align:center;color:#7b6a57;font-size:.68rem;text-transform:uppercase}.tapestry-calendar-grid>button,.tapestry-calendar-grid>.is-blank{min-height:118px;padding:8px;border:1px solid rgba(120,92,57,.16);border-radius:12px;background:rgba(255,255,255,.7);text-align:left}.tapestry-calendar-grid>button{display:flex;flex-direction:column;gap:6px;cursor:pointer}.tapestry-calendar-grid>button:hover,.tapestry-calendar-grid>button.is-selected{border-color:#97754b;background:#fffdf7;box-shadow:0 8px 20px rgba(65,48,29,.09)}.tapestry-calendar-grid>button.is-today>span{display:grid;place-items:center;width:28px;height:28px;border-radius:50%;background:#82633d;color:#fff}.tapestry-calendar-grid button div{display:grid;gap:3px}.tapestry-calendar-grid small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:3px 5px;border-radius:6px;font-size:.65rem}.scope-personal{--scope:#4474b8}.scope-household{--scope:#5b8a55}.scope-family{--scope:#b4872d}.tapestry-calendar-grid small.scope-personal,.tapestry-calendar-agenda .scope-personal{border-left:4px solid #4474b8;background:#eef4ff}.tapestry-calendar-grid small.scope-household,.tapestry-calendar-agenda .scope-household{border-left:4px solid #5b8a55;background:#eff8ee}.tapestry-calendar-grid small.scope-family,.tapestry-calendar-agenda .scope-family{border-left:4px solid #b4872d;background:#fff7df}.tapestry-calendar-agenda{display:grid;gap:8px;max-height:300px;overflow:auto}.tapestry-calendar-agenda article{display:grid;grid-template-columns:65px 1fr;gap:10px;padding:10px;border-radius:10px}.tapestry-calendar-agenda strong,.tapestry-calendar-agenda small{display:block}.tapestry-calendar-agenda small{color:#756b60}.explorer-toolbar{display:flex;align-items:center;flex-wrap:wrap;gap:6px;margin:0 0 12px;padding:8px;border:1px solid rgba(120,92,57,.14);border-radius:11px;background:rgba(255,255,255,.48)}.explorer-toolbar span{margin-right:5px;font-weight:800;font-size:.72rem;text-transform:uppercase;color:#806b50}.explorer-toolbar button.is-active{background:#80623d;color:#fff}.explorer-view[data-view="details"] .household-list-item{display:grid;grid-template-columns:minmax(220px,1fr) auto auto}.explorer-view[data-view="list"]{display:grid;gap:5px}.explorer-view[data-view="small"]{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:8px}.explorer-view[data-view="medium"]{display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:12px}.explorer-view[data-view="large"]{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:15px}.explorer-view[data-view="xl"],.explorer-view[data-view="thumb"]{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:18px}.explorer-view[data-view="small"] .household-list-item,.explorer-view[data-view="medium"] .household-list-item,.explorer-view[data-view="large"] .household-list-item,.explorer-view[data-view="xl"] .household-list-item,.explorer-view[data-view="thumb"] .household-list-item{display:flex;flex-direction:column;align-items:stretch;min-height:130px}.explorer-view[data-view="xl"] .household-list-item:before,.explorer-view[data-view="thumb"] .household-list-item:before{content:"▤";display:grid;place-items:center;min-height:105px;border-radius:10px;background:linear-gradient(145deg,#f4ead5,#fffdf7);font-size:3rem;color:#9a7950}.shopping-capture{display:grid;grid-template-columns:minmax(220px,2fr) 90px 150px 140px 140px auto;gap:8px;margin-bottom:12px}.shopping-capture input,.shopping-capture select,.shopping-toolbar input,.shopping-toolbar select{min-width:0;padding:10px 11px;border:1px solid rgba(120,92,57,.22);border-radius:10px;background:rgba(255,255,255,.72)}.shopping-toolbar{display:flex;gap:8px;justify-content:space-between;margin-bottom:12px}.shopping-toolbar input{flex:1}.shopping-board{display:grid;gap:14px}.shopping-group{border:1px solid rgba(120,92,57,.14);border-radius:14px;overflow:hidden;background:rgba(255,255,255,.5)}.shopping-group h3{display:flex;justify-content:space-between;margin:0;padding:10px 14px;background:rgba(226,211,184,.45);font:600 1rem Georgia,serif}.shopping-item{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:11px;padding:11px 14px;border-top:1px solid rgba(120,92,57,.1)}.shopping-item.is-done{opacity:.56;text-decoration:line-through}.shopping-item strong,.shopping-item span{display:block}.shopping-item span{font-size:.75rem;color:#7b7064}@media(max-width:1050px){.tapestry-calendar-shell{grid-template-columns:1fr}.shopping-capture{grid-template-columns:1fr 90px 1fr}.shopping-capture button{grid-column:1/-1}}@media(max-width:700px){.tapestry-calendar-grid>button,.tapestry-calendar-grid>.is-blank{min-height:78px}.tapestry-calendar-grid small{display:none}.shopping-capture{grid-template-columns:1fr}.shopping-toolbar{flex-direction:column}}
.shared-photo-card{display:grid!important;grid-template-columns:minmax(140px,220px) 1fr auto auto!important;align-items:center}.shared-photo-preview{padding:0;border:0;background:transparent;cursor:zoom-in}.shared-photo-preview img{display:block;width:100%;aspect-ratio:4/3;object-fit:cover;border-radius:10px}.shared-document-icon{display:grid;place-items:center;width:52px;height:64px;border-radius:8px;background:#eee5d5;font-size:1.8rem}.shared-photo-lightbox{max-width:min(1100px,92vw);padding:14px;border:0;border-radius:14px;background:#171717;color:#fff}.shared-photo-lightbox::backdrop{background:rgba(0,0,0,.82)}.shared-photo-lightbox img{display:block;max-width:100%;max-height:82vh;margin:auto}.shared-photo-lightbox button{position:absolute;right:18px;top:18px;width:38px;height:38px;border:0;border-radius:50%;background:#fff;color:#222;font-size:1.4rem}@media(max-width:700px){.shared-photo-card{grid-template-columns:1fr!important}.shared-photo-preview img{aspect-ratio:1}}
