@font-face {
  font-family: Manrope;
  src: url("/pilot/assets/manrope.ttf") format("truetype");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
:root {
  --ink: #242a26;
  --muted: #59635e;
  --mist: #e2e9eb;
  --soft: #f2f5f4;
  font: 500 16px/1.6 Manrope, Arial, sans-serif;
  color: var(--ink);
  color-scheme: light;
}
* { box-sizing: border-box }
[hidden], .desktop-only { display: none !important }
body { margin: 0; background: #a4b4c5; min-width: 280px; overflow-wrap: anywhere }
body::before { content: ""; position: fixed; inset: 0; background: #a4b4c5 url("/pilot/assets/bg.jpg") center/cover no-repeat; z-index: -1 }
h1,h2,p { margin: 0 }
h1,h2 { font-weight: 600; letter-spacing: -.035em; line-height: 1.22 }
h2 { font-size: 24px }
button,input,textarea { font: inherit; color: inherit }
button { cursor: pointer; border: 0; background: none; padding: 0; -webkit-tap-highlight-color: transparent }
button:disabled { opacity: .38; cursor: default }
button,a,label,input,textarea { touch-action: manipulation }
:focus-visible { outline: 3px solid #185a79; outline-offset: 3px }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; clip-path: inset(50%); overflow: hidden; white-space: nowrap }
.paper { background: white; border-radius: 30px }
.screen { min-height: 100vh; min-height: 100dvh }
.primary,.secondary,.light-pill,.story-button { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; font-size: 15px; line-height: 1.25; font-weight: 650; min-height: 52px; border-radius: 999px; padding: 12px 24px }
.primary { color: #fff; background: var(--ink) }
.secondary { color: var(--ink); background: var(--mist) }
.text-button,.back-link { color: var(--muted); min-height: 44px; font-size: 14px; font-weight: 600 }
.text-button { text-decoration: underline; text-underline-offset: .25em }
.back-link { align-self: flex-start }
.primary:hover:enabled,.story-button:hover { background-color: #39433c; color: white }
.secondary:hover,.light-pill:hover { background-color: #e1e9e9 }
small { font-size: 13px; line-height: 1.45; color: var(--muted) }
#loading,#notice,noscript { display: block; position: fixed; z-index: 4; left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100vw - 24px); padding: 12px 20px; border-radius: 16px; background: white; top: 10px; font-size: 14px }
#notice { color: #752f26; box-shadow: 0 4px 24px #26332c1c }
.welcome { padding: max(20px,env(safe-area-inset-top)) 10px max(16px,env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 12px; background: linear-gradient(180deg,#00000047,transparent 230px) }
.welcome-head,.app-head,.editor-head,.actions,.audience,.save-bar,.dialog-title,.index-title,.detail-head { display: flex; align-items: center }
.welcome-head { justify-content: space-between; gap: 12px; padding: 0 10px; color: white }
.brand { font-size: clamp(17px,5vw,24px); line-height: 1.25; font-weight: 650; letter-spacing: -.04em }
.light-pill { background: white; color: var(--ink); min-height: 44px; padding: 10px 20px }
.welcome-intro { flex: 1; display: flex; align-items: center; justify-content: center; flex-direction: column; text-align: center; color: white; padding: 35px 14px; gap: 13px }
.welcome-intro h1 { font-size: clamp(32px,10.25vw,40px); line-height: 1.125 }
.welcome-intro p { line-height: 26px; max-width: 400px }
.welcome-card { padding: 22px 20px; display: grid; gap: 20px }
.welcome-card h2 { font-size: 28px; line-height: 1.25 }
.welcome-card p,.family-card p,.form-card>p { font-weight: 450; color: var(--muted); line-height: 1.5 }
.welcome-card small { margin-top: -11px }
.wide-break { display: none }
.editor { padding: max(10px,env(safe-area-inset-top)) 10px max(10px,env(safe-area-inset-bottom)); display: flex; flex-direction: column }
.editor-form { flex: 1; display: flex; flex-direction: column; gap: 10px; min-width: 0 }
.editor-head { min-height: 54px; gap: 5px; color: white }
.editor-head h1 { font-size: 16px; font-weight: 650; letter-spacing: 0 }
.icon-button,.close { width: 44px; height: 44px; display: inline-grid; place-items: center; flex-shrink: 0 }
.editor-paper { padding: 20px; display: grid; gap: 12px }
textarea { display: block; padding: 0; resize: vertical; border: 0; background: transparent; width: 100%; min-height: 60px; max-height: 48vh; line-height: 26px; field-sizing: content }
textarea::placeholder { color: #757c78 }
.attachment { width: 100px; height: 100px; position: relative; border-radius: 14px; overflow: hidden; background: var(--mist) }
#thumbnail { width: 100%; height: 100%; object-fit: cover; display: block }
#remove-photo { position: absolute; top: 0; right: 0; width: 44px; height: 44px }
.add-photo { display: inline-flex; align-items: center; gap: 8px; width: fit-content; min-height: 44px; color: var(--muted); cursor: pointer; position: relative; font-size: 14px }
.add-photo input { position: absolute; inset: 0; opacity: 0; width: 100%; cursor: pointer }
.add-photo:focus-within { outline: 3px solid #185a79; outline-offset: 2px }
.save-bar { margin-top: auto; padding: 10px 14px 10px 24px; min-height: 72px; border-radius: 40px; background: white; justify-content: space-between; gap: 10px }
.audience { font-size: 13px; font-weight: 650; gap: 7px }
.center-screen { display: grid; place-items: center; padding: 16px 10px }
.form-card,.family-card { padding: 28px 22px; display: flex; flex-direction: column; gap: 16px; width: min(100%,460px) }
.form-card h1 { font-size: 30px; line-height: 1.22 }
.form-card form,#invite-result { display: grid; gap: 12px }
.form-card label,#invite-result label { font-size: 14px; font-weight: 650 }
input:not([type=file]) { border: 1px solid #bec9c6; border-radius: 12px; background: #fff; width: 100%; min-height: 50px; padding: 10px 13px }
#code { font-variant-numeric: tabular-nums; letter-spacing: .25em; font-size: 20px }
.form-error { font-size: 14px; color: #8e382c; margin-top: 2px }
.workspace { padding: max(12px,env(safe-area-inset-top)) 10px calc(94px + env(safe-area-inset-bottom)) }
.app-head { justify-content: space-between; gap: 10px; min-height: 52px; padding: 0 10px; color: white; margin-bottom: 12px }
.actions,.tabs { display: flex; align-items: center; gap: 8px }
.story-button { min-height: 44px; padding: 12px 16px; color: var(--ink); background: white }
.avatar { width: 38px; height: 38px; flex-shrink: 0; border-radius: 50%; display: inline-grid; place-items: center; background: #dce5de; color: #3b5146; font-size: 16px; font-weight: 650 }
.tabs { border-radius: 999px; background: white; padding: 8px }
.tabs button { flex: 1; min-height: 44px; font-size: 14px; border-radius: 999px; padding: 8px 18px }
.tabs button[aria-current=page] { box-shadow: inset 0 0 13px #0000001a; font-weight: 600 }
.mobile-nav { position: fixed; z-index: 2; bottom: max(10px,env(safe-area-inset-bottom)); left: 10px; right: 10px; gap: 0; min-height: 72px; box-shadow: 0 -3px 20px #86939720 }
.mobile-nav button { min-height: 54px }
.feed-grid { display: grid; gap: 10px }
.index-panel,.detail,.family-card { padding: 22px 20px }
.index-title { gap: 12px; margin-bottom: 14px }
.count { font: 12px/1.4 ui-monospace,monospace; color: var(--muted) }
#memory-index { display: grid }
.entry-link { position: relative; display: grid; gap: 4px; padding: 12px 12px 12px 18px; margin-left: 6px; border-left: 1px solid #d5dad6; text-decoration: none; color: var(--ink); border-radius: 0 12px 12px 0 }
.entry-link::before { content: ""; position: absolute; top: 20px; left: -4px; width: 7px; height: 7px; background: #758178; border-radius: 50% }
.entry-link[aria-current=true] { background: var(--mist) }
.entry-link strong { font-weight: 550; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden }
.entry-link small { font-size: 12px }
.detail { min-width: 0 }
.detail-head { justify-content: space-between; gap: 8px; flex-wrap: wrap }
.author { display: inline-flex; gap: 10px; align-items: center; font-size: 14px; font-weight: 600 }
.visibility-tag,.date-tag { display: inline-flex; align-items: center; gap: 6px; background: var(--soft); border-radius: 10px; font-size: 13px; padding: 7px 10px; color: #40514a }
button.visibility-tag { min-height: 44px; text-decoration: underline; text-underline-offset: .2em }
.detail-body { white-space: pre-wrap; font-size: 17px; line-height: 1.55; margin: 20px 0; color: #232b26 }
.memory-photo { display: block; overflow: hidden; width: 100%; height: auto; border-radius: 14px; background: var(--soft) }
.memory-photo img { width: 100%; height: auto; max-height: 52vh; display: block; object-fit: contain }
.date-tag { margin-top: 16px; background: var(--mist) }
.empty { max-width: 40em; color: var(--muted) }
.family-card .primary,.family-card .secondary { align-self: flex-start }
dialog { padding: 0; border: 0; color: var(--ink); background: transparent; width: min(460px,calc(100% - 20px)); max-height: 90dvh; border-radius: 28px }
dialog::backdrop { background: #1c262972 }
.dialog-body { padding: 22px; background: white; display: grid; gap: 8px }
.dialog-title { justify-content: space-between; gap: 8px; margin-bottom: 8px }
.close { font-size: 26px; border-radius: 50%; background: var(--soft) }
.option { text-align: left; padding: 12px 16px; display: grid; border: 1px solid #d8dfdc; border-radius: 16px }
.option[aria-pressed=true] { background: var(--mist); border-color: #aebfb7 }
.option small { margin-top: 2px }
@media (max-width:719px) {
  dialog { margin: auto auto max(10px,env(safe-area-inset-bottom)) }
  .welcome-intro { min-height: 175px }
  textarea { resize: none }
  .feed-grid { background: white; border-radius: 30px; gap: 0; padding: 22px 10px 20px }
  .index-panel { padding: 0 10px }
  .index-title { margin-bottom: 12px }
  .detail { position: relative; margin-left: 2px; padding: 0 10px 10px 18px; border-left: 1px solid #d5dad6; border-radius: 0 }
  .detail:has(.detail-head)::before { content: ""; position: absolute; top: 20px; left: -4px; width: 7px; height: 7px; background: #758178; border-radius: 50% }
  .author { min-height: 44px; color: var(--muted); font-size: 13px; font-weight: 500; text-decoration: none }
  .author:hover { text-decoration: underline }
  .detail-body { margin: 4px 0 12px }
}
@media (min-width:720px) {
  .mobile-only { display: none !important }
  .desktop-only { display: block !important }
  .desktop-only.tabs { display: flex !important }
  .welcome { padding: 28px clamp(36px,4vw,70px) 48px; align-items: center }
  .welcome-head { width: 100%; padding: 0 }
  .welcome-intro { gap: 16px }
  .welcome-intro h1 { font-size: clamp(40px,6vw,72px); letter-spacing: -.055em }
  .wide-break { display: inline }
  .welcome-card { width: min(100%,520px); padding: 30px 32px }
  body[data-view=editor] #workspace[data-ready][hidden] { display: block !important }
  body[data-view=editor]:not(:has(#workspace[data-ready])) #welcome[hidden] { display: flex !important }
  body[data-view=editor] { overflow: hidden }
  .editor { position: fixed; inset: 0; z-index: 3; align-items: center; justify-content: center; padding: 24px; background: #1c262975 }
  .editor-form { background: white; padding: 0; width: min(100%,772px); border-radius: 28px; gap: 0; max-height: calc(100dvh - 48px); overflow: auto; flex: none }
  .editor-head { padding: 26px 28px 16px 32px; justify-content: space-between; color: var(--ink) }
  .editor-head h1 { font-size: 30px; letter-spacing: -.03em }
  .editor-head .icon-button { order: 2; background: var(--soft); border-radius: 50% }
  .editor-head .icon-button img { filter: brightness(.28) }
  .editor-paper { padding: 8px 32px 18px; gap: 18px }
  textarea { font-size: 22px; line-height: 32px; min-height: 100px }
  .attachment { width: 180px; height: 180px }
  .save-bar { padding: 20px 32px 22px; border-radius: 0; border-top: 1px solid #dce2e1 }
  .workspace { max-width: 1640px; margin: 0 auto; padding: 26px clamp(24px,3.35vw,64px) 48px }
  .app-head { border-radius: 24px; min-height: 66px; padding: 10px 24px; color: var(--ink); background: white; display: grid; grid-template-columns: 1fr auto 1fr; margin-bottom: 35px }
  .app-head .actions { justify-self: end; gap: 16px }
  .app-head .brand { font-size: clamp(16px,1.7vw,24px) }
  .tabs { background: var(--soft); border-radius: 14px; gap: 0; padding: 5px }
  .tabs button { min-height: 34px; min-width: 88px; border-radius: 10px }
  .tabs button[aria-current=page] { background: var(--mist); box-shadow: none }
  .story-button { color: white; background: var(--ink); border-radius: 14px; padding: 10px 19px }
  .story-button img { filter: brightness(0) invert(1) }
  .page-title { font-size: 44px; margin: 0 0 26px }
  .feed-grid { align-items: start; grid-template-columns: minmax(210px,27fr) minmax(0,71fr); gap: 24px }
  .index-panel { padding: clamp(20px,2vw,28px) }
  .index-title { justify-content: space-between; flex-wrap: wrap; margin-bottom: 20px }
  .count { background: var(--soft); padding: 4px 10px; border-radius: 8px }
  .detail { padding: 30px 32px }
  .detail-body { font-size: clamp(22px,1.95vw,28px); line-height: 1.4; letter-spacing: -.025em; margin: 22px 0 }
  .author { font-size: 17px }
  .form-card,.family-card { padding: 32px }
  .family-card { width: min(100%,620px) }
}
