/* LifePorch design system. Shared surfaces, type, controls, and responsive rhythm. */
:root {
  --ink: #203b31;
  --muted: #58665f;
  --line: #dce3dd;
  --surface: #fff;
  --radius-card: 16px;
  --radius-control: 9px;
  --shadow-card: 0 6px 24px #193f2c08;
  --focus-ring: #a77a34;
  --space-section: 40px;
}
body { line-height: 1.5; }
button, a, input, textarea, select, summary { -webkit-tap-highlight-color: transparent; }
summary { cursor: pointer; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 4px; }
.site-header { height: 76px; padding-inline: max(24px, calc((100% - 1200px)/2)); }
.site-header .brand { font: 700 28px/1 var(--serif); letter-spacing: -.8px; }
.site-header .brand > span:first-of-type { display: block; font: inherit; color: var(--ink); letter-spacing: inherit; margin: 0; }
.site-header .brand > .brand-tagline { font: 500 11px/1.5 -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; color: var(--muted); letter-spacing: .14em; margin-left: 12px; }
.header-links > span { display: none; }
.button { min-height: 44px; padding: 11px 18px; border-radius: var(--radius-control); font-size: 14px; line-height: 1.35; font-weight: 600; }
.button.primary { background: var(--green); border-color: var(--green); box-shadow: 0 2px 4px #1d352910; }
.button.secondary { background: var(--surface); border-color: var(--line); }
.button.text { color: var(--green); }
.button.small { font-size: 14px; }
.icon-button { border-radius: 9px; min-height: 44px; min-width: 44px; }
.eyebrow { font-size: 12px; letter-spacing: .13em; font-weight: 650; line-height: 1.6; }
.shell { max-width: 1248px; padding: 28px 24px 40px; }
.breadcrumb { display: none; }
.cover { height: auto; min-height: 206px; padding: 26px 32px; border-radius: 20px; display: flex; align-items: center; }
.cover-note { position: relative; top: auto; left: auto; max-width: min(70%, 560px); margin: 0; font-size: 27px; line-height: 1.2; overflow-wrap: anywhere; }
.cover-note span { font: 600 12px/1.4 -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; letter-spacing: .12em; margin: 0 0 11px; }
.cover-note strong { display: block; white-space: pre-line; font: inherit; }
.cover-edit { min-height: 44px; font-size: 14px; bottom: 18px; right: 20px; background: #fffffff0; color: var(--ink); }
:root[data-porch-theme=clay] .cover[data-cover-style=landscape] { background-color: #ae7258; background-blend-mode: luminosity; }
:root[data-porch-theme=ocean] .cover[data-cover-style=landscape] { background-color: #4a7789; background-blend-mode: luminosity; }
.cover[data-cover-style=studio] { background: radial-gradient(ellipse at 87% 10%, #fff2, transparent 43%), radial-gradient(ellipse at 100% 110%, #d7bd8266, transparent 55%), var(--green); }
.cover[data-cover-style=studio]::after { background: none; }
.cover[data-cover-style=minimal] { background: var(--surface); border: 1px solid var(--line); }
.cover[data-cover-style=minimal]::after { display: none; }
.cover[data-cover-style=minimal] .cover-note { color: var(--green); text-shadow: none; font-style: normal; }
.cover[data-cover-style=minimal] .cover-note span { color: var(--muted); }
.profile-area { gap: 24px; padding: 0 8px 28px; }
.profile-photo { width: 112px; height: 112px; border: 5px solid var(--paper); box-shadow: none; margin-top: -30px; }
.profile-copy { padding-top: 20px; }
.profile-copy h1 { font: 400 clamp(32px, 3.4vw, 43px)/1.12 var(--serif); letter-spacing: -.035em; }
.profile-copy p { margin-top: 9px; font-size: 16px; line-height: 1.55; max-width: 600px; }
.profile-copy .location { font-size: 14px; margin-top: 10px; }
.profile-actions { gap: 10px; }
.section-navigation { margin-bottom: 32px; }
.tabs { gap: 28px; margin: 0; }
.tab { min-height: 54px; font-size: 15px; font-weight: 500; padding: 15px 2px; }
.tab.active { color: var(--green); border-bottom-width: 3px; font-weight: 650; }
.overview-layout { gap: 32px; }
.intro-card { max-width: 720px; padding-bottom: 30px; }
.intro-card h2 { font: 400 clamp(28px, 2.7vw, 36px)/1.17 var(--serif); letter-spacing: -.025em; margin: 10px 0 16px; text-wrap: balance; }
.intro-card p { font-size: 16px; line-height: 1.8; max-width: 68ch; }
.section { margin-bottom: var(--space-section); }
.section-head { margin-bottom: 20px; gap: 16px; }
.section-head h2 { font: 400 30px/1.2 var(--serif); letter-spacing: -.02em; }
.panel-heading h2 { font: 400 clamp(30px, 3vw, 40px)/1.15 var(--serif); }
.panel-heading p, .side-card p, .full-empty p, .selected-empty p, .bring-it-home p { font-size: 16px; line-height: 1.7; }
.side-card { border: 1px solid var(--line); border-radius: var(--radius-card); background: #fff9; padding: 26px; box-shadow: none; }
.side-card h2 { font: 400 26px/1.2 var(--serif); }
.side-card small { font-size: 13px; }
.feature-grid { gap: 20px; }
.creation-card, .album-card, .media-card { border-radius: var(--radius-card); box-shadow: var(--shadow-card); border-color: var(--line); }
.creation-art { height: 200px; }
.creation-text { padding: 22px; }
.creation-text { display: flex; flex-direction: column; flex: 1; }
.creation-text h3 { font: 400 25px/1.2 var(--serif); }
.creation-text p { font-size: 16px; line-height: 1.6; margin-top: 10px; }
.creation-text > span { font-size: 12px; line-height: 1.5; letter-spacing: .06em; margin-top: auto; padding-top: 18px; }
.art-tag { font-size: 13px; border-radius: 5px; }
.link-row { border: 1px solid var(--line); border-radius: 12px; padding: 16px; box-shadow: none; }
.link-content h3 { font-size: 16px; line-height: 1.4; }
.link-content p { font-size: 13px; margin-top: 5px; }
.link-badge { font-size: 12px; padding: 5px 9px; }
.all-links { gap: 14px; }
.album-info { align-items: flex-start; gap: 10px; padding: 18px; }
.album-info strong { font-size: 24px; line-height: 1.25; overflow-wrap: anywhere; }
.album-info span { font-size: 13px; flex-shrink: 0; }
.filters { gap: 12px; margin-block: 24px; }
.chip { min-height: 44px; font-size: 14px; padding: 10px 16px; }
.media-meta, .mini-label, .record-credit, .record-info p { font-size: 13px; }
.full-empty { border-style: solid; padding: 40px 28px; background: var(--soft); }
.full-empty h3 { font-size: 28px; }
.footer { font-size: 13px; line-height: 1.6; padding-top: 26px; }

/* Owner controls are clearly separated from the profile visitors receive. */
.workspace-bar { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 11px max(24px, calc((100% - 1200px)/2)); border-bottom: 1px solid var(--line); background: var(--soft); }
.workspace-context { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; }
.workspace-context > span:first-child { font-size: 14px; font-weight: 650; color: var(--green); }
.workspace-save { font-size: 13px; color: var(--muted); }
.workspace-save[data-save-state=error] { color: #96372c; font-weight: 600; }
.workspace-actions { display: flex; gap: 18px; align-items: center; }
.workspace-actions a, .workspace-actions button { min-height: 36px; display: inline-flex; align-items: center; font-size: 14px; color: var(--green); text-decoration: underline; text-underline-offset: 4px; }
.porch-builder { background: var(--surface); border-color: var(--line); color: var(--ink); border-radius: var(--radius-card); box-shadow: var(--shadow-card); }
.builder-heading h2 { font: 400 28px/1.2 var(--serif); margin: 7px 0 16px; }
.builder-steps { gap: 14px; }
.builder-steps button { padding: 18px; background: var(--soft); border-color: transparent; }
.builder-steps strong { font-size: 16px; line-height: 1.4; }
.builder-steps small, .builder-footer { font-size: 14px; line-height: 1.6; }
.builder-step-number { color: var(--green); }
.builder-progress { background: var(--soft); font-size: 13px; }

/* Forms and onboarding use the same reusable control sizing and type scale. */
dialog { border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 28px 100px #16332633; }
.modal-head { padding: 26px 28px 20px; }
.modal-head h2 { font: 400 30px/1.17 var(--serif); letter-spacing: -.025em; }
.modal-head p { font-size: 15px; line-height: 1.6; }
.modal-body { padding: 24px 28px 28px; }
.field { margin-bottom: 22px; }
.field > span { font-size: 14px; margin-bottom: 8px; }
.field input:not([type=checkbox]), .field textarea, .field select, .search { border-radius: var(--radius-control); border-color: #c8d3cb; font-size: 16px; padding: 12px 14px; line-height: 1.5; }
.field textarea { min-height: 130px; }
.field small, .storage-hint, .local-note { font-size: 14px; line-height: 1.65; }
.form-error { font-size: 14px; color: #96372c; }
.check-label, .section-option label { font-size: 15px; }
.theme-options { gap: 12px; margin-bottom: 28px; }
.theme-option { min-height: 64px; font-size: 14px; border-radius: 11px; }
.theme-option.selected { border-color: var(--green); background: var(--soft); }
.design-cover-picker { border: 0; padding: 0; margin: 0 0 24px; min-width: 0; }
.design-cover-picker legend { font-size: 15px; font-weight: 650; margin-bottom: 12px; }
.cover-style-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; }
.cover-style-option { position: relative; border: 1px solid var(--line); border-radius: 12px; padding: 10px; cursor: pointer; min-width: 0; }
.cover-style-option:has(input:checked) { border-color: var(--green); box-shadow: 0 0 0 1px var(--green); background: var(--soft); }
.cover-style-option input { position: absolute; top: 16px; right: 16px; width: 20px; height: 20px; accent-color: var(--green); }
.cover-style-swatch { display: block; height: 65px; border-radius: 7px; background: #294b3e; margin-bottom: 10px; }
.cover-style-swatch[data-theme=clay] { background-color: #8b4e3b; }
.cover-style-swatch[data-theme=ocean] { background-color: #315b73; }
.cover-style-swatch[data-style=landscape] { background-image: url('/assets/landscape.svg'); background-size: cover; background-position: center; background-blend-mode: luminosity; }
.cover-style-swatch[data-style=studio] { background-image: radial-gradient(ellipse at 100% 0%, #fff5, transparent 70%); }
.cover-style-swatch[data-style=minimal] { background: #f9faf7; border: 1px solid #d7dfd5; }
.cover-style-option strong { display: block; font-size: 14px; }
.cover-style-option small { display: block; font-size: 12px; line-height: 1.5; color: var(--muted); margin-top: 5px; }
.design-copy-fields { padding: 16px; margin: 0 0 28px; border-radius: 12px; background: var(--soft); }
.design-copy-fields summary { font-size: 14px; font-weight: 600; min-height: 28px; }
.design-copy-fields[open] summary { margin-bottom: 18px; }
.design-copy-fields .storage-hint { margin-bottom: 0; }
.section-option { padding: 12px; border-color: var(--line); border-radius: 10px; margin-top: 8px; }
.setup-shell { max-width: 1120px; padding: 48px 24px; }
.setup-welcome { padding-bottom: 32px; margin-bottom: 32px; }
.setup-welcome h1 { font-size: clamp(38px, 4.8vw, 58px); line-height: 1.08; max-width: 650px; }
.setup-welcome p { font-size: 18px; line-height: 1.6; margin-top: 20px; }
.setup-label h2 { font: 400 28px/1.2 var(--serif); }
.setup-label > span, .setup-note { font-size: 14px; }
.starter-card { border-radius: 12px; padding: 20px; }
.starter-card strong { font-size: 16px; }
.starter-card span, .option-copy small { font-size: 14px; line-height: 1.6; }
.porch-option { border-radius: 12px; padding: 22px 42px 22px 20px; }
.option-copy strong { font-size: 16px; }
.setup-bottom { padding-top: 24px; }
.account-screen { max-width: 1120px; margin: 48px auto; gap: 64px; align-items: center; }
.account-intro { border-radius: 22px; background: radial-gradient(ellipse at 100% 100%, #b8aa6426, transparent 70%), var(--green); }
.account-intro h1 { font: 400 clamp(40px, 4.5vw, 56px)/1.08 var(--serif); }
.account-form-card { padding: 30px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-card); }
.account-form-card h2 { font: 400 32px/1.15 var(--serif); }
.account-promises span { font-size: 16px; }
.account-house { display: none; }
.account-loading { max-width: 680px; margin: 0 auto; padding: 96px 24px; }
.account-loading h1 { font: 400 38px/1.15 var(--serif); margin-bottom: 18px; }
.account-loading p { font-size: 16px; color: var(--muted); line-height: 1.7; margin-bottom: 24px; }
.account-loading a.button { display: inline-flex; align-items: center; }

@media (hover: hover) {
  .button.secondary:hover, .icon-button:hover { background: var(--soft); border-color: #bdccc0; }
  .creation-card:hover, .album-card:hover { transform: translateY(-2px); box-shadow: 0 12px 28px #193f2c12; }
  .link-row:hover { border-color: #aebfb0; background: #fff; }
}
@media (max-width: 1100px) {
  .site-header .brand > .brand-tagline { display: none; }
  .workspace-bar { padding-inline: 24px; }
  .account-screen { gap: 32px; }
}
@media (min-width: 761px) {
  .creation-card { display: flex; flex-direction: column; }
  .creation-art { flex-shrink: 0; }
  .overview-layout:not(.full-width) { grid-template-columns: minmax(0,1fr) 260px; }
  .side-column { display: block; }
  .side-card { margin-bottom: 24px; padding: 22px; }
  .feature-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .profile-actions { padding-top: 20px; }
}
@media (min-width: 761px) and (max-width: 1050px) {
  .overview-layout:not(.full-width) { grid-template-columns: 1fr; }
  .side-column { display: grid; grid-template-columns: repeat(auto-fit,minmax(210px,1fr)); gap: 20px; }
  .side-card { margin-bottom: 0; }
  .profile-copy h1 { font-size: 34px; }
  .tabs { gap: 24px; }
}
@media (max-width: 760px) {
  :root { --space-section: 32px; }
  .site-header { height: auto; min-height: 64px; padding: 9px max(14px,env(safe-area-inset-right)) 9px max(14px,env(safe-area-inset-left)); }
  .site-header .brand { font-size: 24px; }
  .header-links .button { font-size: 14px; }
  .workspace-bar { padding: 10px 16px; gap: 8px 16px; flex-wrap: wrap; }
  .workspace-context { gap: 4px; display: flex; flex-direction: column; align-items: flex-start; }
  .workspace-context > span:first-child { font-size: 13px; }
  .workspace-save { font-size: 12px; }
  .workspace-actions { gap: 12px; }
  .workspace-actions a, .workspace-actions button { min-height: 44px; font-size: 13px; }
  .workspace-actions a { max-width: 100px; line-height: 1.4; }
  .shell { padding: 16px 16px 32px; }
  .cover { min-height: 140px; padding: 20px; border-radius: 15px; }
  .cover-note { max-width: 100%; font-size: 21px; line-height: 1.17; }
  .cover-note span { font-size: 11px; margin-bottom: 9px; }
  .cover-edit { display: none; }
  .profile-area { grid-template-columns: 72px minmax(0,1fr); padding: 0 0 16px; gap: 12px; }
  .profile-photo { width: 72px; height: 72px; margin-top: -20px; border-width: 4px; }
  .profile-copy { padding-top: 14px; }
  .profile-copy h1 { font-size: 30px; line-height: 1.1; }
  .profile-copy p { font-size: 16px; line-height: 1.5; margin-top: 7px; }
  .profile-copy .location { font-size: 13px; }
  .profile-actions .button { font-size: 14px; min-height: 46px; }
  .section-navigation { margin-bottom: 24px; }
  .has-many .mobile-section-picker { padding: 8px 0; }
  .mobile-section-picker > span { font-size: 14px; }
  .mobile-section-picker select { font-size: 16px; min-height: 46px; }
  .intro-card { padding-bottom: 26px; }
  .intro-card h2 { font-size: 29px; margin: 10px 0 14px; }
  .intro-card p { font-size: 16px; line-height: 1.7; }
  .section-head { margin-bottom: 18px; gap: 8px; }
  .section-head h2 { font-size: 27px; }
  .section-head .button.text { font-size: 14px; }
  .feature-grid { gap: 14px; }
  .creation-text { padding: 17px; }
  .creation-text h3 { font-size: 24px; }
  .creation-text p { font-size: 16px; line-height: 1.5; }
  .creation-text > span { font-size: 12px; }
  .link-row { padding: 13px; }
  .album-info { padding: 14px; flex-wrap: wrap; }
  .album-info strong { font-size: 23px; }
  .side-card { padding: 22px; }
  .porch-builder { padding: 18px; margin-bottom: 26px; }
  .builder-heading h2 { font-size: 24px; }
  .porch-builder:not([open]) .builder-heading h2 { font-size: 21px; }
  .builder-heading .eyebrow { font-size: 11px; }
  .builder-progress { font-size: 12px; }
  .builder-steps { grid-template-columns: 1fr; }
  .builder-steps button { padding: 15px; }
  .builder-footer { font-size: 14px; gap: 8px; }
  .builder-footer button { min-height: 44px; }
  .modal-head { padding: 20px 18px 16px; }
  .modal-head h2 { font-size: 26px; }
  .modal-head p { font-size: 14px; }
  .modal-body { padding: 20px 18px max(24px,env(safe-area-inset-bottom)); }
  .field > span { font-size: 15px; }
  .cover-style-grid { gap: 9px; }
  .cover-style-option { padding: 8px; }
  .cover-style-option input { right: 12px; top: 12px; }
  .cover-style-option small { font-size: 12px; }
  .cover-style-swatch { height: 58px; }
  .theme-options { gap: 8px; }
  .setup-header { flex-wrap: wrap; }
  .setup-header .brand { flex: 1; }
  .setup-header .header-links { flex: none; }
  .setup-header > .account-header-button { display: none; }
  .setup-shell { padding: 30px 18px; }
  .setup-welcome::after { display: none; }
  .setup-welcome h1 { max-width: 100%; font-size: 43px; }
  .setup-welcome p { font-size: 16px; }
  .starter-card { padding: 16px; }
  .setup-label h2 { font-size: 26px; }
  .account-screen { margin: 20px auto 40px; padding: 0 16px; gap: 20px; }
  .account-intro { padding: 22px 24px; border-radius: 16px; }
  .account-intro h1 { font-size: 33px; margin: 12px 0 0; }
  .account-intro > p { display: none; }
  .account-form-card { padding: 24px 20px; border-radius: 16px; }
  .account-form-card h2 { font-size: 29px; }
  .footer { font-size: 13px; gap: 12px; }
}
@media (max-width: 380px) {
  .site-header { padding-inline: 10px; gap: 6px; }
  .site-header .brand { font-size: 22px; }
  .workspace-bar { padding-inline: 12px; }
  .workspace-context { width: 100%; flex-direction: row; justify-content: space-between; }
  .workspace-actions { width: 100%; justify-content: space-between; }
  .workspace-actions a { max-width: none; }
  .shell { padding-inline: 12px; }
  .cover { padding: 18px; }
  .profile-copy h1 { font-size: 28px; }
  .mobile-section-picker > span { max-width: 90px; }
  .creation-text { padding: 14px; }
  .creation-text h3 { font-size: 22px; }
  .cover-style-grid { grid-template-columns: 1fr; }
  .cover-style-option { display: grid; grid-template-columns: 70px 1fr; gap: 4px 12px; padding: 12px 38px 12px 12px; }
  .cover-style-swatch { grid-row: span 2; margin: 0; height: 60px; }
  .cover-style-option input { top: 14px; right: 10px; }
  .cover-style-option small { margin: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
  .creation-card, .album-card, .button { transition: none; }
}

/* Album publishing is explicit and grouped by the visitor's section. */
.publish-albums { border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin: 24px 0; min-width: 0; }
.publish-albums legend { font-size: 16px; font-weight: 650; padding-inline: 6px; }
.publish-albums > p { font-size: 14px; line-height: 1.6; margin: 0 0 16px; color: var(--muted); }
.publish-albums .check-label { align-items: flex-start; overflow-wrap: anywhere; }

.account-edit-mode { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px; margin-bottom: 20px; background: var(--soft); border-radius: 12px; }
.account-edit-mode h3 { font: 400 26px/1.2 var(--serif); margin: 6px 0 10px; }
.account-edit-mode p { font-size: 15px; line-height: 1.6; margin: 0; }
.account-edit-mode .button { flex-shrink: 0; }
.account-porch-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; }
@media (max-width: 760px) {
 .account-edit-mode { flex-direction: column; align-items: stretch; }
 .header-links:has([data-account=toggle-edit]) { flex-wrap: wrap; }
 .site-header:has([data-account=toggle-edit]) { flex-wrap: wrap; }
}
