.space-page { min-height: 100vh; }
.space-header { position: sticky; top: 0; background: rgba(11,16,24,.86); backdrop-filter: blur(14px); }
.space-header .wordmark-mark { display: grid; place-items: center; font-size: 20px; }
.space-nav { display: flex; gap: clamp(10px,2vw,28px); margin: 0 auto; }
.space-nav button, .text-button { border: 0; background: none; color: #a9afb3; cursor: pointer; font-size: 10px; letter-spacing: .06em; padding: 8px 2px; }
.space-nav button:hover, .space-nav button[aria-pressed="true"], .text-button:hover { color: var(--gold); }
.space-lock { color: #c4c6c4; border: 1px solid rgba(217,185,129,.2); border-radius: 30px; padding: 8px 12px; font-size: 9px; letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; }
.space-lock span { color: var(--gold); margin-right: 6px; }
.space-session { display: flex; align-items: center; gap: 10px; }
.space-page [hidden] { display: none !important; }
.space-main { width: min(1320px, 100% - 12.2%); margin: 0 auto; padding: 70px 0 44px; }
.space-heading { display: grid; grid-template-columns: 1fr .7fr; gap: 8%; align-items: end; padding: 0 0 42px; border-bottom: 1px solid var(--line); }
.space-heading h1 { margin: 20px 0 0; font: 400 clamp(58px, 7vw, 92px)/.85 var(--display); letter-spacing: -.045em; }
.space-heading h1 em, .view-panel h2 em, .entry-form h3 em, .access-copy h2 em { color: var(--gold); font-weight: 400; }
.space-heading > p { max-width: 390px; color: #a7acae; font: 400 20px/1.45 var(--display); margin: 0 0 2px auto; }
.service-note { margin: 26px 0 0; padding: 15px 18px; border: 1px solid rgba(217,185,129,.22); color: #d4c4a5; background: rgba(217,185,129,.045); font-size: 12px; }
.service-note[data-tone="error"] { border-color: rgba(201,134,115,.4); color: #e0b8a9; background: rgba(201,134,115,.07); }
.access-card { display: grid; grid-template-columns: .8fr 1.2fr; gap: 8%; align-items: center; max-width: 920px; min-height: 430px; margin: 70px auto 35px; padding: 55px 8%; border: 1px solid var(--line); background: linear-gradient(130deg, rgba(217,185,129,.035), transparent 48%), rgba(16,23,34,.65); }
.access-ornament { width: min(220px, 100%); aspect-ratio: 1; border: 1px solid rgba(217,185,129,.28); border-radius: 50%; display: grid; place-items: center; justify-self: center; position: relative; color: var(--gold); font-size: 32px; }
.access-ornament::before, .access-ornament::after { content: ""; position: absolute; inset: 18px; border: 1px dashed rgba(145,164,150,.36); border-radius: 50%; transform: rotate(-25deg); }
.access-ornament::after { inset: 48px; border-style: solid; border-color: rgba(201,134,115,.3); transform: rotate(25deg); }
.access-copy h2 { margin: 15px 0; font: 400 clamp(42px,5vw,62px)/.91 var(--display); }
.access-copy > p:not(.eyebrow) { max-width: 430px; margin: 0 0 25px; color: #a9afb3; font-size: 12px; }
.subtle-note { color: #838d92; display: inline-block; max-width: 460px; font-size: 10px; line-height: 1.6; }
.view-panel { padding: 43px 0 18px; animation: panel-in .38s ease both; }
.view-title-row { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 29px; }
.view-title-row h2 { margin: 9px 0 0; font: 400 clamp(42px,5vw,66px)/.92 var(--display); letter-spacing: -.035em; }
.quiet-seal { border: 1px solid rgba(217,185,129,.22); border-radius: 50%; width: 70px; height: 70px; display: grid; place-content: center; text-align: center; color: #c4b18f; font-size: 8px; letter-spacing: .09em; flex: none; }
.overview-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.overview-link { min-height: 290px; text-align: left; border: 1px solid var(--line); padding: 25px 28px; position: relative; display: flex; flex-direction: column; align-items: flex-start; background: radial-gradient(circle at 85% 18%, rgba(217,185,129,.1), transparent 37%), rgba(16,23,34,.65); cursor: pointer; transition: transform .25s,border-color .25s,background .25s; }
.overview-link:hover { transform: translateY(-4px); border-color: rgba(217,185,129,.43); }
.overview-history { background-image: radial-gradient(ellipse at 80% 100%, rgba(145,164,150,.12), transparent 50%); }
.overview-people { background-image: radial-gradient(ellipse at 80% 100%, rgba(201,134,115,.11), transparent 50%); }
.overview-mark { color: var(--gold); font: 400 27px/1 var(--display); position: absolute; top: 20px; right: 24px; }
.overview-link small { color: #9c9f9d; font-size: 8px; letter-spacing: .18em; }
.overview-link strong { margin: 35px 0 auto; font: 400 clamp(39px,4.5vw,57px)/.82 var(--display); }
.overview-count { color: #9ea5a6; font-size: 10px; margin-top: 30px; }
.home-note { display: flex; gap: 16px; align-items: center; max-width: 700px; margin: 36px auto; color: #c6b693; text-align: center; }
.home-note > span { color: var(--gold); font-size: 23px; }
.home-note p { margin: 0; font: 400 19px/1.4 var(--display); }
.preview-disclaimer { border-top: 1px solid var(--line); padding-top: 18px; display: flex; align-items: center; justify-content: center; gap: 10px; color: #7f898c; font-size: 9px; letter-spacing: .08em; text-align: center; }
.preview-disclaimer span { color: var(--gold); }
.button-outline { color: #d9c6a1; border: 1px solid rgba(217,185,129,.35); background: transparent; }
.button-outline:hover { background: rgba(217,185,129,.08); }
.timeline-list { position: relative; max-width: 930px; padding: 4px 0 4px 30px; margin-left: 6%; }
.timeline-list::before { content: ""; position: absolute; left: 6px; top: 0; bottom: 0; width: 1px; background: linear-gradient(var(--gold), rgba(217,185,129,.04)); }
.memory-card { position: relative; border: 1px solid var(--line); background: rgba(16,23,34,.7); padding: 21px 23px; margin: 0 0 17px; }
.timeline-list .memory-card::before { content: ""; position: absolute; left: -30px; top: 29px; width: 11px; height: 11px; border-radius: 50%; background: var(--night); border: 1px solid var(--gold); box-shadow: 0 0 14px rgba(217,185,129,.33); }
.memory-card header { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.memory-date, .memory-meta { color: #c8b48e; font-size: 9px; letter-spacing: .1em; text-transform: uppercase; }
.memory-card h3 { margin: 10px 0 7px; font: 500 31px/1 var(--display); }
.memory-card p { margin: 0; max-width: 720px; color: #a8afb0; font-size: 11px; white-space: pre-wrap; }
.memory-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 14px; }
.memory-tags span { color: #b7bebc; border: 1px solid rgba(232,223,208,.14); padding: 4px 8px; font-size: 8px; }
.memory-actions { display: flex; gap: 10px; flex: none; }
.memory-actions button { border: 0; background: none; cursor: pointer; color: #858e91; font-size: 9px; text-decoration: underline; text-underline-offset: 3px; }
.memory-actions button:hover { color: var(--gold); }
.today-date { color: var(--gold); font: 400 24px var(--display); }
.memory-list { max-width: 920px; }
.collection-layout { display: grid; grid-template-columns: minmax(0,1fr) minmax(290px,.65fr); gap: 35px; align-items: start; }
.people-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.person-card { border: 1px solid var(--line); padding: 20px; min-height: 160px; background: rgba(16,23,34,.66); position: relative; }
.person-card h3 { margin: 0; font: 500 31px/1 var(--display); }
.person-card p { margin: 10px 0 0; color: #949da0; font-size: 10px; }
.person-card .memory-actions { margin-top: 18px; }
.person-history { margin: 18px 0 34px; padding: clamp(22px,4vw,40px); border: 1px solid rgba(218,185,122,.25); background: linear-gradient(135deg,rgba(25,33,43,.94),rgba(13,19,28,.86)); }
.person-history-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; padding-bottom: 25px; border-bottom: 1px solid var(--line); }
.person-history-heading h3 { margin: 7px 0 0; color: #eee9df; font: 400 clamp(34px,5vw,55px)/.95 var(--display); }
.person-history-birth { margin: 12px 0 5px; color: #b5ad9f; font-size: 10px; }
.person-history-count { color: var(--gold); font-size: 9px; letter-spacing: .12em; text-transform: uppercase; }
.person-history-grid { display: grid; grid-template-columns: minmax(0,1.25fr) minmax(270px,.75fr); gap: 30px; padding-top: 25px; }
.person-history-grid h4 { margin: 0 0 16px; color: #e4e0d7; font: 400 25px/1 var(--display); }
.person-history-grid .memory-list { max-width: none; }
.person-history-grid .empty-state { min-height: 0; padding: 24px 15px; }
.relationship-workbench { margin-top: 62px; padding-top: 35px; border-top: 1px solid var(--line); }
.relationship-intro { max-width: 620px; margin-bottom: 25px; }
.relationship-intro h3 { margin: 8px 0; font: 400 clamp(35px,4vw,51px)/.95 var(--display); }
.relationship-intro h3 em { color: var(--gold); font-weight: 400; }
.relationship-intro > p:last-child { max-width: 500px; color: #99a2a3; font-size: 11px; line-height: 1.6; }
.relationship-content { display: grid; grid-template-columns: minmax(0,1fr) minmax(290px,.65fr); gap: 35px; align-items: start; }
.relationship-list { display: grid; gap: 9px; }
.relationship-card { display: flex; justify-content: space-between; align-items: center; gap: 14px; border: 1px solid var(--line); background: rgba(16,23,34,.55); padding: 15px 17px; }
.relationship-card h4 { margin: 0; color: #e4e0d7; font: 400 21px/1.1 var(--display); }
.relationship-card p { margin: 7px 0 0; color: #a7a494; font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
.relationship-card > button { border: 0; background: none; color: #929a9b; cursor: pointer; font-size: 9px; text-decoration: underline; text-underline-offset: 3px; }
.relationship-card > button:hover { color: var(--gold); }
.relationship-empty { margin: 0; }
.archived-relationships-toggle { margin-top: 20px; padding: 0; color: #9ba2a0; font-size: 9px; }
.archived-relationships-toggle span { color: var(--gold); padding-left: 5px; }
.archived-relationships-panel { margin-top: 14px; padding: 14px; border: 1px dashed rgba(232,223,208,.16); background: rgba(11,16,24,.38); }
.archived-relationships-panel > .subtle-note { margin-bottom: 12px; }
.archived-relationship-card { border-color: rgba(232,223,208,.1); }
.relationship-workbench .entry-form h4 { margin: 8px 0 0; font: 400 32px/1 var(--display); }
.relationship-workbench .entry-form h4 em { color: var(--gold); font-weight: 400; }
.entry-form { border: 1px solid rgba(217,185,129,.23); background: rgba(16,23,34,.78); padding: 23px; }
.form-heading { margin-bottom: 20px; }
.form-heading h3 { margin: 8px 0 0; font: 400 34px/1 var(--display); }
.entry-form label { display: flex; flex-direction: column; gap: 6px; color: #aab0af; font-size: 9px; letter-spacing: .05em; margin: 0 0 14px; }
.entry-form input:not([type=checkbox]), .entry-form select, .entry-form textarea { width: 100%; min-height: 39px; border: 1px solid rgba(232,223,208,.16); border-radius: 1px; padding: 9px 10px; background: #0c131c; color: var(--ink); font: 400 11px var(--sans); }
.entry-form textarea { resize: vertical; }
.entry-form input:focus, .entry-form select:focus, .entry-form textarea:focus { outline: 1px solid var(--gold); border-color: var(--gold); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-actions { display: flex; align-items: center; gap: 13px; margin-top: 6px; }
.form-actions .button { min-height: 41px; padding: 10px 13px; font-size: 9px; }
.form-feedback { min-height: 15px; margin: 12px 0 0; color: #b9c5bb; font-size: 9px; }
.form-feedback[data-tone="error"] { color: #e0aa9b; }
.participant-field { border: 1px solid rgba(232,223,208,.14); margin: 0 0 15px; padding: 11px; }
.participant-field legend { padding: 0 5px; color: #aab0af; font-size: 9px; }
.participant-list { display: flex; gap: 7px; flex-wrap: wrap; }
.participant-option { display: inline-flex; align-items: center; gap: 6px; border: 1px solid rgba(232,223,208,.15); padding: 7px 9px; color: #d5d3ca; font-size: 9px; cursor: pointer; }
.participant-option:has(input:checked) { border-color: rgba(217,185,129,.55); color: var(--gold); }
.participant-option input { accent-color: var(--gold); }
.check-label { flex-direction: row !important; align-items: center; }
.check-label input { accent-color: var(--gold); }
.empty-state { padding: 28px; text-align: center; border: 1px dashed rgba(232,223,208,.16); color: #929a9c; font: 400 20px var(--display); }
.back-link { margin: 40px 0 0; color: #939da0; font-size: 10px; }
.back-link a:hover { color: var(--gold); }
@keyframes panel-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 960px) {
  .space-header { padding: 0 4%; }
  .space-nav { gap: 12px; }
  .space-main { width: min(100% - 8%, 800px); padding-top: 52px; }
  .collection-layout { grid-template-columns: 1fr; }
  .relationship-content { grid-template-columns: 1fr; }
  .person-history-grid { grid-template-columns: 1fr; }
  .entry-form { max-width: 650px; }
}
@media (max-width: 700px) {
  .space-header { height: auto; min-height: 72px; flex-wrap: wrap; padding: 12px 5%; gap: 8px; }
  .space-header .wordmark { min-width: 0; }
  .space-header .wordmark-copy strong { font-size: 25px; }
  .space-lock { font-size: 8px; padding: 7px 9px; }
  .space-nav { order: 3; width: 100%; justify-content: space-between; margin: 3px 0 0; border-top: 1px solid var(--line); padding-top: 5px; gap: 5px; }
  .space-nav button { font-size: 8px; letter-spacing: 0; }
  .space-main { width: min(100% - 10%, 520px); padding-top: 39px; }
  .space-heading { grid-template-columns: 1fr; gap: 17px; padding-bottom: 28px; }
  .space-heading h1 { font-size: clamp(54px,15vw,78px); }
  .space-heading > p { margin: 0; max-width: 330px; font-size: 18px; }
  .access-card { grid-template-columns: 1fr; gap: 27px; min-height: auto; margin-top: 35px; padding: 31px 8%; text-align: center; }
  .access-ornament { width: 120px; font-size: 22px; }
  .access-copy h2 { font-size: 48px; }
  .access-copy .button { margin: 0 auto; }
  .view-panel { padding-top: 35px; }
  .view-title-row { align-items: center; }
  .view-title-row h2 { font-size: 44px; }
  .view-title-row .button { max-width: 155px; font-size: 8px; gap: 7px; padding: 9px; }
  .overview-grid { grid-template-columns: 1fr; }
  .overview-link { min-height: 205px; }
  .overview-link strong { margin-top: 25px; font-size: 48px; }
  .overview-count { margin-top: 19px; }
  .people-list { grid-template-columns: 1fr; }
  .person-history-heading { display: block; }
  .person-history-heading > button { margin-top: 18px; }
  .relationship-card h4 { font-size: 19px; }
  .timeline-list { margin-left: 0; padding-left: 24px; }
  .timeline-list .memory-card::before { left: -24px; }
  .memory-card { padding: 17px; }
  .memory-card header { align-items: flex-start; }
  .memory-card h3 { font-size: 27px; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .entry-form { padding: 18px; }
  .today-date { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  .space-page *, .space-page *::before, .space-page *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
