/* Local layout revision. The existing milk glass, type, colour and pointer
   treatments remain shared with the login. Memory-house geometry is untouched. */
body.video-entry-page:not(.viewing-memories) .space-shell {
  grid-template-columns:224px minmax(0,1fr);
}
body:not(.viewing-memories) .space-sidebar {
  padding:43px 21px 24px;
}
body:not(.viewing-memories) .space-brand {
  width:fit-content;
  gap:0;
  padding:0 13px;
  font-size:27px;
  line-height:1.5;
  letter-spacing:.12em;
}
body:not(.viewing-memories) .space-sidebar-caption {
  margin:10px 0 39px 13px;
  font-size:10px;
  line-height:1.8;
  letter-spacing:.055em;
}
body:not(.viewing-memories) .space-nav {
  gap:7px;
}
body:not(.viewing-memories) .space-nav-item {
  min-height:47px;
  padding:12px 13px;
  gap:12px;
  border-radius:12px;
  font-size:13px;
}
body:not(.viewing-memories) .space-nav-item svg {
  width:17px;
  height:17px;
  flex:none;
}
body:not(.viewing-memories) .space-nav-item.active {
  background:rgba(235,205,214,.4);
  border-color:rgba(255,255,255,.7);
  box-shadow:inset 0 1px rgba(255,255,255,.4);
}
body:not(.viewing-memories) .space-sidebar-bottom {
  padding-top:32px;
}
body:not(.viewing-memories) .space-storage {
  padding:0 12px 23px;
}
body:not(.viewing-memories) .space-storage>span {
  align-items:baseline;
  gap:8px;
  font-size:10px;
  line-height:1.7;
}
body:not(.viewing-memories) .space-storage progress {
  height:3px;
  margin-top:9px;
}
body:not(.viewing-memories) .space-account {
  gap:8px;
  padding:17px 2px 0;
}
body:not(.viewing-memories) .space-account strong {
  font-size:12px;
  line-height:1.6;
  white-space:nowrap;
}
body:not(.viewing-memories) .space-account small {
  margin-top:2px;
  line-height:1.5;
  white-space:nowrap;
}
body:not(.viewing-memories) .space-account .space-icon-button {
  width:28px;
  height:32px;
  flex:none;
}
body:not(.viewing-memories) .space-main {
  display:flex;
  flex-direction:column;
  width:100%;
  min-width:0;
  max-width:1264px;
  min-height:100dvh;
  margin-inline:auto;
  padding:30px clamp(28px,3.6vw,52px) 0;
}
body:not(.viewing-memories) .space-topline {
  justify-content:flex-end;
  flex:none;
  min-height:38px;
  margin:0 0 32px;
}
body:not(.viewing-memories) .space-top-nav {
  margin-left:auto;
  gap:4px;
}
body:not(.viewing-memories) .space-top-nav a {
  padding:10px 15px;
  font-size:12px;
}
body:not(.viewing-memories) #spacePage {
  display:flex;
  flex:1;
  flex-direction:column;
  min-width:0;
  min-height:0;
}
body:not(.viewing-memories) #spacePage .space-heading {
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:22px 28px;
  flex:none;
  margin-bottom:30px;
}
#spacePage .space-heading .space-eyebrow {
  margin-bottom:11px;
  font-size:8px;
  line-height:1.6;
  letter-spacing:.17em;
}
#spacePage .space-heading h1 {
  font-size:clamp(32px,2.65vw,41px);
  line-height:1.45;
  letter-spacing:.055em;
}
#spacePage .space-heading>div>p:last-child {
  max-width:34em;
  margin-top:10px;
  font-size:12px;
  line-height:1.9;
}
#spacePage .space-heading-actions {
  gap:10px;
  padding:0;
  justify-self:end;
}
#spacePage .space-heading-actions .space-button {
  min-height:44px;
  padding:12px 18px;
}
#spacePage .space-tools {
  flex:none;
  margin-bottom:25px;
  padding:10px 0 18px;
}
#spacePage .space-search {
  min-width:0;
}
#spacePage .space-search input {
  min-width:0;
}
#spacePage .space-sort {
  flex:none;
}
#spacePage .space-section-label {
  flex:none;
  margin-bottom:19px;
}
#spacePage .category-gallery {
  flex:none;
  grid-template-columns:repeat(auto-fill,minmax(min(100%,250px),1fr));
  gap:28px 24px;
}
#spacePage .space-file-section {
  flex:none;
}
#spacePage .space-empty {
  display:flex;
  flex:1;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  min-height:340px;
  padding:52px 12px 68px;
  text-align:center;
}
#spacePage .space-empty h2 {
  margin:0 0 13px;
  font:500 clamp(23px,2.05vw,28px)/1.7 "Noto Serif SC","Songti SC",serif;
  letter-spacing:.055em;
}
#spacePage .space-empty p {
  max-width:30em;
  margin:0 0 26px;
  font-size:12px;
  line-height:1.95;
}
#spacePage .space-empty .space-button {
  min-height:44px;
  padding:12px 23px;
}
#spacePage[data-library-empty=true] .space-heading {
  margin-bottom:0;
}
#spacePage[data-library-empty=true] .category-gallery:empty,
#spacePage[data-library-empty=true] .space-file-section {
  display:none;
}
#spacePage[data-library-empty=true] .space-empty {
  min-height:360px;
  padding:48px 12px 68px;
}
body:not(.viewing-memories) .space-footer {
  flex:none;
  height:auto;
  gap:14px;
  margin-top:30px;
  padding:21px 0 24px;
  font-size:8px;
  line-height:1.8;
}
html[data-space-theme=dark] body:not(.viewing-memories) .space-nav-item.active {
  background:rgba(207,143,157,.13);
  border-color:rgba(207,143,157,.12);
  box-shadow:none;
}
@media (max-width:1100px) and (min-width:761px) {
  body.video-entry-page:not(.viewing-memories) .space-shell {
    grid-template-columns:204px minmax(0,1fr);
  }
  body:not(.viewing-memories) .space-sidebar {
    padding-inline:16px;
  }
  body:not(.viewing-memories) .space-main {
    padding-inline:30px;
  }
  body:not(.viewing-memories) #spacePage .space-heading {
    column-gap:18px;
  }
  #spacePage .space-heading-actions {
    gap:8px;
  }
  #spacePage .space-heading-actions .space-button {
    padding-inline:13px;
    font-size:11px;
  }
}
@media (max-width:960px) and (min-width:761px) {
  body:not(.viewing-memories) #spacePage .space-heading {
    grid-template-columns:minmax(0,1fr);
    gap:20px;
  }
  #spacePage .space-heading-actions {
    justify-self:start;
  }
}
@media (max-width:760px) {
  body.video-entry-page:not(.viewing-memories) .space-shell {
    display:flex;
    grid-template-columns:none;
  }
  body:not(.viewing-memories) .space-sidebar {
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    align-items:center;
    gap:13px 12px;
    width:100%;
    min-width:0;
    height:auto;
    padding:max(16px,env(safe-area-inset-top)) max(18px,env(safe-area-inset-right)) 12px max(18px,env(safe-area-inset-left));
  }
  body:not(.viewing-memories) .space-brand {
    grid-column:1;
    grid-row:1;
    padding:0;
    font-size:25px;
    letter-spacing:.09em;
  }
  body:not(.viewing-memories) .space-sidebar-caption {
    display:none;
  }
  body:not(.viewing-memories) .space-sidebar-bottom {
    display:grid;
    grid-column:2;
    grid-row:1;
    gap:1px;
    min-width:0;
    max-width:205px;
    margin:0;
    padding:0;
  }
  body:not(.viewing-memories) .space-account {
    grid-row:1;
    gap:7px;
    border:0;
    padding:0;
  }
  body:not(.viewing-memories) .space-account>div {
    min-width:0;
    max-width:100px;
  }
  body:not(.viewing-memories) .space-account strong {
    font-size:11px;
  }
  body:not(.viewing-memories) .space-account .space-icon-button {
    width:30px;
    height:30px;
  }
  body:not(.viewing-memories) .space-storage {
    display:block;
    grid-row:2;
    padding:0 2px;
  }
  body:not(.viewing-memories) .space-storage>span {
    justify-content:flex-end;
    gap:7px;
    font-size:8px;
    line-height:1.5;
  }
  body:not(.viewing-memories) .space-storage progress {
    display:none;
  }
  body:not(.viewing-memories) .space-nav {
    display:grid;
    grid-column:1/-1;
    grid-row:2;
    grid-template-columns:repeat(3,minmax(0,1fr));
    width:100%;
    gap:6px;
  }
  body:not(.viewing-memories) .space-nav-item {
    justify-content:center;
    gap:7px;
    min-width:0;
    min-height:42px;
    padding:10px 5px;
    font-size:11px;
  }
  body:not(.viewing-memories) .space-nav-item svg {
    width:15px;
    height:15px;
  }
  body:not(.viewing-memories) .space-nav-item small {
    margin:0;
    font-size:9px;
  }
  body:not(.viewing-memories) .space-main {
    min-height:calc(100dvh - 116px);
    padding:19px max(20px,env(safe-area-inset-right)) 0 max(20px,env(safe-area-inset-left));
  }
  body:not(.viewing-memories) .space-topline {
    min-height:34px;
    margin-bottom:25px;
  }
  body:not(.viewing-memories) .space-top-nav {
    gap:3px;
  }
  body:not(.viewing-memories) .space-top-nav a {
    padding:9px 12px;
    font-size:11px;
  }
  body:not(.viewing-memories) #spacePage .space-heading {
    grid-template-columns:minmax(0,1fr);
    gap:20px;
    margin-bottom:24px;
  }
  #spacePage .space-heading h1 {
    font-size:32px;
  }
  #spacePage .space-heading .space-eyebrow {
    font-size:7px;
    margin-bottom:9px;
    letter-spacing:.13em;
  }
  #spacePage .space-heading>div>p:last-child {
    margin-top:8px;
    font-size:12px;
    line-height:1.85;
  }
  #spacePage .space-heading-actions {
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    justify-self:stretch;
    width:100%;
    gap:10px;
  }
  #spacePage .space-heading-actions .space-button {
    min-width:0;
    padding:12px;
    font-size:12px;
  }
  #spacePage .space-tools {
    gap:10px;
    margin-bottom:21px;
    padding:6px 0 15px;
  }
  #spacePage .space-search {
    gap:7px;
  }
  #spacePage .space-search input {
    font-size:12px;
  }
  #spacePage .space-sort select {
    max-width:94px;
    font-size:11px;
  }
  #spacePage .category-gallery {
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:23px 14px;
  }
  #spacePage .space-empty,
  #spacePage[data-library-empty=true] .space-empty {
    min-height:310px;
    padding:40px 4px 56px;
  }
  #spacePage .space-empty h2 {
    font-size:22px;
    line-height:1.7;
    letter-spacing:.04em;
  }
  #spacePage .space-empty p {
    max-width:23em;
    margin-bottom:24px;
    font-size:11px;
    line-height:1.95;
  }
  body:not(.viewing-memories) .space-footer {
    flex-wrap:wrap;
    gap:5px 12px;
    margin-top:24px;
    padding:18px 0 21px;
    font-size:7px;
  }
}
@media (max-width:370px) {
  body:not(.viewing-memories) .space-sidebar {
    padding-inline:15px;
  }
  body:not(.viewing-memories) .space-main {
    padding-inline:16px;
  }
  body:not(.viewing-memories) .space-brand {
    font-size:23px;
  }
  body:not(.viewing-memories) .space-account>div {
    max-width:76px;
  }
  body:not(.viewing-memories) .space-nav-item {
    gap:5px;
    font-size:10px;
  }
  #spacePage .category-gallery {
    grid-template-columns:minmax(0,1fr);
  }
  #spacePage .space-empty h2 {
    font-size:20px;
  }
}
