* { box-sizing: border-box; }
html {
  overscroll-behavior: none;
}
:root {
  --bg: #f5eee7;
  --card: rgba(255,255,255,.72);
  --text: #211b18;
  --muted: #746a63;
  --line: rgba(33,27,24,.12);
  --accent: #211b18;
  --danger: #9b2c2c;
  --ok: #23613a;
}
body {
  margin: 0;
  min-height: 100vh;
  overscroll-behavior: none;
  touch-action: pan-y;
  background: radial-gradient(circle at top, #fff8f0 0, var(--bg) 45%, #e9ded4 100%);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 600 600%27%3E%3Cfilter id=%27noise%27%3E%3CfeTurbulence type=%27fractalNoise%27 baseFrequency=%270.72%27 numOctaves=%273%27 stitchTiles=%27stitch%27/%3E%3C/filter%3E%3Crect width=%27100%25%27 height=%27100%25%27 filter=%27url(%23noise)%27/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 180px 180px;
  opacity: .065;
  mix-blend-mode: multiply;
}
body > * { position: relative; z-index: 1; }
a { color: inherit; }
.auth-page { display: flex; align-items: center; justify-content: center; padding: 28px 16px; }
.auth-card { width: min(520px, 100%); }
.brand { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.brand::before, .top strong::before { content: ""; width: 22px; height: 22px; flex: 0 0 22px; border-radius: 6px; background: url("icon.webp") center / cover no-repeat; box-shadow: 0 1px 4px rgba(33,27,24,.12); }
.landing-brand::before { content: ""; width: 22px; height: 22px; flex: 0 0 22px; border-radius: 6px; background: url("icon.webp") center / cover no-repeat; box-shadow: 0 1px 4px rgba(33,27,24,.12); }
.landing-brand, .top strong { display: inline-flex; align-items: center; gap: 8px; }
.brand a { text-decoration: none; }
.form-link { margin: 14px 0 0; text-align: center; color: var(--muted); font-size: 14px; }
.form-link a { font-weight: 800; text-decoration: none; }
.inline-followup { margin-top: 12px; }
h1 { font-size: clamp(34px, 8vw, 56px); line-height: .95; letter-spacing: -0.06em; margin: 0 0 16px; }
h2 { font-size: 18px; margin: 0 0 14px; }
.muted, .hint { color: var(--muted); line-height: 1.55; }
.panel, .hero-card, .diptych-card, .upload-card, .waiting, .archive-item, .empty {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 22px;
  margin: 16px 0;
  backdrop-filter: blur(14px);
  box-shadow: 0 18px 60px rgba(54,43,35,.08);
}
.panel.ghost { background: rgba(255,255,255,.45); }
.compact-panel { padding: 16px; }
label { display: block; font-size: 13px; color: var(--muted); margin: 12px 0; }
label span { opacity: .72; }
.checkbox-row { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; }
.checkbox-row input { width: 18px; height: 18px; accent-color: var(--accent); }
.checkbox-line { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; }
.checkbox-line input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }
input[type="email"], input[type="password"], input[type="text"] {
  width: 100%; margin-top: 7px; padding: 14px 14px; border-radius: 16px; border: 1px solid var(--line); background: rgba(255,255,255,.82); font-size: 16px; outline: none;
}
button, .button {
  display: inline-flex; align-items: center; justify-content: center; width: 100%; min-height: 48px; padding: 12px 18px; border: 0; border-radius: 999px; background: var(--accent); color: #fff; font-size: 15px; font-weight: 700; text-decoration: none; cursor: pointer;
}
.button.secondary { background: rgba(33,27,24,.08); color: var(--text); }
button.danger, .button.danger { background: var(--danger); color: #fff; }
.danger-zone { border-color: rgba(155,44,44,.28); }
.danger-zone h2 { color: var(--danger); }
.alert { padding: 12px 14px; border-radius: 16px; margin: 12px 0; font-size: 14px; }
.alert.error { background: rgba(155,44,44,.1); color: var(--danger); }
.alert.ok { background: rgba(35,97,58,.1); color: var(--ok); }
.relationship-list { display: grid; gap: 10px; }
.relationship-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; gap: 10px 14px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.46); }
.relationship-row span { color: var(--muted); font-size: 13px; }
.relationship-row .button { width: auto; min-height: 38px; padding: 8px 12px; font-size: 13px; }
.relationship-row .button + .button { margin-left: 4px; }
.relationship-tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; }
.relationship-tabs a { flex: 0 0 auto; padding: 10px 14px; border-radius: 999px; background: rgba(33,27,24,.08); color: var(--muted); text-decoration: none; font-weight: 800; font-size: 13px; }
.relationship-tabs a.active { background: var(--text); color: #fff; }
.archive-setting { padding: 12px 0; border-top: 1px solid var(--line); }
.top { position: sticky; top: 0; z-index: 2; padding: 14px 18px; background: rgba(245,238,231,.82); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.top div { max-width: 740px; margin: 0 auto; display:flex; justify-content:space-between; gap: 12px; }
.top span { color: var(--muted); }
.container { width: min(740px, 100%); margin: 0 auto; padding: 18px; }
.with-nav { padding-bottom: calc(140px + env(safe-area-inset-bottom)); }
.me-page.with-nav { padding-bottom: calc(180px + env(safe-area-inset-bottom)); }
.label { margin: 0 0 12px; color: var(--muted); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 32px; letter-spacing: .08em; padding: 18px; background: rgba(255,255,255,.8); border: 1px dashed var(--line); border-radius: 20px; text-align: center; }
.diptych-frame { display: grid; grid-template-columns: 1fr 1fr; overflow: hidden; border-radius: 22px; background: #1c1714; aspect-ratio: 4 / 3; border: 1px solid rgba(0,0,0,.18); }
.diptych-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.diptych-frame.small { border-radius: 18px; }
.diptych-partial { width: 100%; }
.today-frame-wrap { position: relative; }
.today-frame-wrap .frame-share { position: absolute; top: 10px; right: 10px; z-index: 2; }
.split-upload-card { position: relative; }
.split-upload-card .reminder-share { position: absolute; top: 12px; right: 12px; z-index: 3; margin-top: 0; }
.split-upload-card .live-hint { padding-right: 46px; }
.caption { display: flex; gap: 10px; justify-content: center; align-items: center; flex-wrap: wrap; color: var(--muted); font-size: 13px; margin-top: 12px; }
.file-picker { display: flex; align-items: center; justify-content: center; border: 1px dashed rgba(33,27,24,.24); border-radius: 24px; background: rgba(255,255,255,.55); min-height: 180px; color: var(--text); font-size: 18px; font-weight: 700; cursor: pointer; }
.file-picker input { display: none; }
.upload-card button { margin-top: 14px; }
.retake-panel { margin-top: 14px; padding-top: 0; border-top: 0; }
.retake-panel .hint { margin-top: 0; }
.retake-form { height: auto !important; margin-top: 10px !important; }
.retake-form .file-picker,
.archive-retake-form.retake-form .archive-retake-picker {
  width: auto;
  min-height: 38px;
  height: auto;
  display: inline-flex;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 800;
}
.retake-form .half-picker { position: static; }
.retake-form .half-picker span {
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
}
.retake-form.camera-active .half-picker,
.archive-retake-form.retake-form.camera-active .archive-retake-picker {
  display: none;
}
.upload-half .retake-form {
  position: absolute;
  inset: 0;
  z-index: 3;
  height: 100% !important;
  margin: 0 !important;
  text-align: center;
  pointer-events: none;
}
.upload-half .retake-form .half-picker {
  position: absolute;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  z-index: 4;
  pointer-events: auto;
  box-shadow: 0 10px 24px rgba(0,0,0,.22);
}
.upload-half .retake-form .fallback-photo-input,
.upload-half .retake-form .camera-wrap,
.upload-half .retake-form .half-preview {
  pointer-events: auto;
}
.archive-retake-form { display: grid; gap: 16px; }
.archive-retake-form .archive-retake-picker, .archive-retake-form .archive-retake-submit { width: 100%; }
.archive-retake-form.retake-form { display: block; text-align: center; }
.archive-retake-form.retake-form .archive-retake-picker { width: auto; }
.archive-retake-form.retake-form .archive-retake-input { display: none; }
.archive-retake-form .archive-retake-picker { position: relative; min-height: 54px; border-radius: 16px; font-size: 15px; overflow: hidden; }
.archive-retake-form .archive-retake-input { position: absolute; inset: 0; display: block; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.archive-retake-form .archive-retake-picker + .archive-retake-submit { margin-top: 6px; }
.archive-retake-form .archive-retake-submit { margin-top: 2px; }
.upload-half .archive-retake-form.retake-form .archive-retake-picker {
  position: absolute;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  z-index: 4;
  width: auto;
  min-height: 38px;
  pointer-events: auto;
  box-shadow: 0 10px 24px rgba(0,0,0,.22);
}
.archive-retake-preview { position: relative; margin-top: 0; }
.archive-retake-preview img { max-height: 260px; border-radius: 16px; }
.archive-retake-progress { margin-top: 0; }
.upload-half .archive-retake-preview {
  position: absolute;
  inset: 0;
  z-index: 3;
  margin: 0;
  background: #1c1714;
}
.upload-half .archive-retake-preview[hidden] { display: none; }
.upload-half .archive-retake-preview img {
  width: 100%;
  height: 100%;
  max-height: none;
  border-radius: 0;
  object-fit: cover;
}
.upload-half .archive-retake-progress {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 58px;
  z-index: 5;
  padding: 8px 10px;
  border-radius: 14px;
  background: rgba(255,255,255,.82);
  backdrop-filter: blur(12px);
}
.waiting { text-align: center; }
.placeholder.filled { overflow:hidden; border-radius:24px; aspect-ratio: 3 / 4; max-height: 360px; background:#241f1c; }
.placeholder.filled img { width:100%; height:100%; object-fit:cover; }
.archive-list { display: grid; gap: 4px; }
.archive-head { display:flex; justify-content:space-between; align-items:center; margin-bottom: 12px; color: var(--muted); }
.archive-head strong { color: var(--text); }
.archive-actions { display: flex; align-items: center; gap: 10px; }
.frame-share { width: 36px; min-height: 36px; padding: 0; border-radius: 50%; background: rgba(255,255,255,.72); border: 1px solid var(--line); color: var(--text); line-height: 1; display: inline-flex; align-items: center; justify-content: center; box-shadow: none; }
.frame-share svg { width: 19px; height: 19px; display: block; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.frame-share:hover { background: #fff; }
.missing { min-height: 170px; display:flex; align-items:center; justify-content:center; border: 1px dashed var(--line); border-radius: 22px; color: var(--muted); background: rgba(255,255,255,.38); }
.empty { text-align:center; padding: 40px 24px; }
.bottom-nav { position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); width: min(520px, calc(100% - 28px)); display:grid; grid-template-columns: repeat(var(--nav-count, 4),1fr); gap: 6px; padding: 8px; border-radius: 999px; background: rgba(255,255,255,.78); border: 1px solid var(--line); backdrop-filter: blur(18px); box-shadow: 0 18px 50px rgba(45,35,28,.14); }
.bottom-nav a { text-align:center; text-decoration:none; padding: 12px 8px; border-radius: 999px; color: var(--muted); font-size: 13px; font-weight: 700; }
.bottom-nav a.active { background: var(--text); color: #fff; }
@media (max-width: 520px) {
  .container { padding: 14px; }
  .panel, .hero-card, .diptych-card, .upload-card, .waiting, .archive-item, .empty { border-radius: 24px; padding: 18px; }
  .relationship-row { grid-template-columns: 1fr 1fr; }
  .relationship-row strong, .relationship-row span { grid-column: 1 / -1; }
}
.upload-preview { margin: 14px 0 0; }
.upload-preview img { width: 100%; max-height: 320px; object-fit: cover; border-radius: 22px; display: block; background: #1c1714; }
.progress-wrap { margin-top: 14px; }
.progress-bar { height: 10px; width: 100%; overflow: hidden; border-radius: 999px; background: rgba(33,27,24,.1); border: 1px solid var(--line); }
.progress-bar span { display: block; height: 100%; width: 0%; border-radius: inherit; background: var(--text); transition: width .18s ease; }
button:disabled { opacity: .55; cursor: not-allowed; }
.live-hint { font-size: 13px; }

.archive-summary {
  text-align: center;
  background: rgba(255,255,255,.74);
  border: 1px solid var(--line);
  border-radius: 30px;
  padding: 28px 22px;
  margin: 16px 0 20px;
  box-shadow: 0 18px 60px rgba(54,43,35,.08);
}
.archive-summary .pair-names { margin: 0 0 8px; color: var(--muted); font-weight: 700; }
.archive-summary h1 { margin-bottom: 8px; }
.recap-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }
.recap-actions .button { width: auto; min-width: 150px; }
.recap-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.recap-grid.monthly { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.recap-grid article { min-width: 0; }
.recap-grid p { margin: 8px 0 0; color: var(--muted); font-size: 13px; text-align: center; }
.big-number { font-size: clamp(30px, 9vw, 52px); line-height: 1; letter-spacing: -0.06em; font-weight: 800; margin: 4px 0 8px; }
.diptych-open { width: 100%; min-height: 0; padding: 0; border-radius: 18px; background: transparent; color: inherit; display: block; cursor: zoom-in; }
.diptych-open:focus-visible { outline: 3px solid rgba(33,27,24,.28); outline-offset: 4px; }
.lightbox[hidden] { display: none; }
.lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(20,16,14,.78); backdrop-filter: blur(18px); padding: 18px; display: flex; align-items: center; justify-content: center; }
.lightbox-inner { width: min(980px, 100%); }
.lightbox .label { color: rgba(255,255,255,.72); text-align: center; }
.lightbox-frame { border-radius: 24px; max-height: 82vh; width: 100%; }
.lightbox-close { position: fixed; top: 14px; right: 14px; width: 44px; min-height: 44px; padding: 0; border-radius: 50%; background: rgba(255,255,255,.86); color: #211b18; font-size: 28px; line-height: 1; }
.modal-open { overflow: hidden; }

.landing-top {
  width: min(1080px, 100%);
  margin: 0 auto;
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.landing-brand { font-weight: 500; text-decoration: none; letter-spacing: .02em; }
.landing-top nav { display: flex; gap: 8px; }
.landing-top nav a { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 8px 15px; border-radius: 999px; background: rgba(33,27,24,.08); color: var(--text); text-decoration: none; font-weight: 500; }
.landing-top nav a.primary { background: var(--text); color: #fff; }
.landing { width: min(1080px, 100%); margin: 0 auto; padding: 12px 18px 42px; }
.landing-hero { min-height: clamp(520px, calc(100vh - 210px), 680px); display: grid; grid-template-columns: minmax(0, .95fr) minmax(300px, 1.05fr); gap: 32px; align-items: center; }
.landing-copy { max-width: 520px; }
.landing-copy h1 { font-size: clamp(46px, 9vw, 86px); }
.landing-actions { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
.landing-actions .button { width: auto; min-width: 150px; }
.app-download-section { margin: 18px 0 22px; }
.app-download-card { width: 100%; padding: 18px 20px; border: 1px solid rgba(33,27,24,.14); border-radius: 26px; background: linear-gradient(135deg, rgba(255,255,255,.74), rgba(255,255,255,.46)); box-shadow: 0 18px 58px rgba(54,43,35,.1); }
.app-download-inner { width: min(720px, 100%); margin: 0 auto; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 18px; }
.app-download-icon { width: 72px; height: 72px; border-radius: 18px; object-fit: cover; box-shadow: 0 16px 34px rgba(33,27,24,.18), 0 3px 10px rgba(33,27,24,.1); }
.app-download-copy { min-width: 0; }
.app-download-copy strong { display: block; margin-bottom: 4px; font-size: 20px; letter-spacing: 0; }
.app-download-copy p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.45; font-weight: 600; }
.app-download-action { display: flex; justify-content: flex-end; }
.app-download-card a { display: inline-flex; width: 160px; }
.app-download-badge { display: block; width: 160px; height: auto; }
.landing-visual { min-width: 0; }
.landing-frame { overflow: hidden; aspect-ratio: 4 / 3; border-radius: 28px; background: #1c1714; box-shadow: 0 24px 80px rgba(36,28,22,.22); }
.landing-preview-image { display: block; width: 100%; height: 100%; object-fit: cover; }
.landing-caption { margin-top: 12px; color: var(--muted); text-align: center; font-weight: 700; }
.landing-band { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 20px; }
.landing-band article { padding: 18px; border: 1px solid var(--line); border-radius: 22px; background: rgba(255,255,255,.54); box-shadow: 0 18px 60px rgba(54,43,35,.08); }
.landing-band strong { display: block; margin-bottom: 8px; font-size: 18px; }
.landing-band p { margin: 0; color: var(--muted); line-height: 1.5; }
.landing-footer { width: min(1080px, 100%); margin: 0 auto; padding: 0 18px 28px; display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; color: var(--muted); font-size: 13px; }
.landing-footer a { color: var(--text); text-decoration: none; font-weight: 600; }
.legal-page { width: min(760px, 100%); margin: 0 auto; padding: 18px 18px 42px; }
.legal-page h1 { font-size: clamp(34px, 7vw, 54px); letter-spacing: -0.04em; }
.legal-page p { line-height: 1.6; }

.admin-container { width: min(1120px, 100%); }
.admin-hero {
  padding: 18px 0 4px;
}
.admin-hero h1 {
  margin-bottom: 10px;
}
.admin-hero .muted {
  max-width: 680px;
}
.admin-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0;
}
.admin-stat-grid article {
  min-height: 132px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255,255,255,.7);
  box-shadow: 0 18px 60px rgba(54,43,35,.08);
}
.admin-stat-grid span,
.admin-stat-grid small {
  display: block;
  color: var(--muted);
  line-height: 1.35;
}
.admin-stat-grid strong {
  display: block;
  margin: 10px 0 8px;
  font-size: clamp(28px, 5vw, 44px);
  line-height: 1;
  letter-spacing: -0.04em;
}
.admin-panel {
  overflow: hidden;
}
.admin-table-wrap {
  overflow-x: auto;
  margin: 0 -8px;
  padding: 0 8px 4px;
}
.admin-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-size: 13px;
}
.admin-table th,
.admin-table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.admin-table th {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
}
.admin-table td span {
  color: var(--muted);
}
.admin-inline-form {
  margin: 0;
}
.admin-reset-form {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 0 0 8px;
}
.admin-reset-form input {
  min-width: 150px;
  padding: 8px 10px;
  font-size: 0.88rem;
}
.admin-small-button {
  width: auto;
  min-height: 34px;
  padding: 7px 11px;
  font-size: 12px;
  white-space: nowrap;
}
@media (max-width: 520px) {
  .landing-top { padding: 14px; }
  .landing-top nav a { min-height: 36px; padding: 7px 12px; font-size: 14px; }
  .landing { padding: 0 14px 26px; }
  .landing-hero { min-height: auto; grid-template-columns: 1fr; gap: 14px; align-items: start; }
  .landing-copy { max-width: none; }
  .landing-copy .label { margin-bottom: 8px; }
  .landing-copy h1 { font-size: clamp(38px, 13vw, 58px); margin-bottom: 10px; }
  .landing-copy .muted { margin: 0; font-size: 15px; line-height: 1.45; }
  .landing-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
  .landing-actions .button { width: 100%; min-width: 0; min-height: 44px; padding: 10px 12px; font-size: 14px; }
  .app-download-section { margin: 12px 0 14px; }
  .app-download-card { border-radius: 22px; padding: 16px; }
  .app-download-inner { grid-template-columns: auto minmax(0, 1fr); gap: 12px; }
  .app-download-icon { width: 58px; height: 58px; border-radius: 14px; }
  .app-download-copy strong { font-size: 17px; line-height: 1.16; }
  .app-download-copy p { font-size: 13px; }
  .app-download-action { grid-column: 1 / -1; justify-content: flex-start; padding-left: 70px; }
  .landing-frame { border-radius: 20px; box-shadow: 0 14px 42px rgba(36,28,22,.18); }
  .landing-caption { margin-top: 8px; font-size: 13px; }
  .landing-band { grid-template-columns: 1fr; gap: 8px; margin-top: 12px; }
  .landing-band article { padding: 13px 14px; border-radius: 18px; }
  .landing-band strong { margin-bottom: 4px; font-size: 16px; }
  .landing-band p { font-size: 14px; line-height: 1.35; }
  .landing-footer { padding: 0 14px 24px; }
  .admin-container { padding: 14px; }
  .admin-stat-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .admin-stat-grid article { min-height: 118px; padding: 14px; border-radius: 18px; }
  .admin-stat-grid strong { font-size: 30px; }
  .admin-table { min-width: 720px; }
}

@media (max-width: 520px) and (min-height: 760px) {
  .landing-visual { order: -1; }
  .landing-frame { aspect-ratio: 4 / 3; }
}

@media (max-width: 380px) {
  .landing-top { gap: 10px; }
  .landing-top nav { gap: 6px; }
  .landing-top nav a { padding: 7px 10px; }
  .landing-actions { grid-template-columns: 1fr; }
}

/* Today split upload layout */
.split-upload-card { padding: 18px; }
.upload-diptych-frame {
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  border-radius: 22px;
  background: #1c1714;
  aspect-ratio: 4 / 3;
  border: 1px solid rgba(0,0,0,.18);
}
.upload-half {
  position: relative;
  min-width: 0;
  min-height: 0;
  border-right: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.05);
}
.upload-half:last-child { border-right: 0; }
.upload-half img { width: 100%; height: 100%; object-fit: cover; display: block; }
.upload-half.mine.empty-half { background: rgba(255,255,255,.09); }
.upload-half.partner.empty-half { background: repeating-linear-gradient(135deg, rgba(255,255,255,.08), rgba(255,255,255,.08) 10px, rgba(255,255,255,.035) 10px, rgba(255,255,255,.035) 20px); }
.upload-half form { height: 100%; margin: 0; }
.half-label {
  position: absolute;
  z-index: 2;
  top: 10px;
  left: 10px;
  max-width: calc(100% - 20px);
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(20,16,14,.58);
  color: rgba(255,255,255,.86);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .02em;
  backdrop-filter: blur(10px);
}
.half-picker {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 100%;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(255,255,255,.92);
  text-align: center;
  padding: 0 12px;
  font-size: 15px;
}
.half-picker span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.22);
}
.fallback-photo-input { display: none; }
.camera-wrap {
  position: absolute;
  inset: 0;
  z-index: 3;
  background: #1c1714;
}
.camera-wrap[hidden] { display: none; }
.camera-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.camera-actions {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  display: flex;
  gap: 8px;
  justify-content: center;
}
.camera-actions button {
  min-height: 36px;
  margin: 0;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12px;
  background: rgba(255,255,255,.86);
  color: #211b18;
  box-shadow: none;
}
.locked-half {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 42px 14px 14px;
  color: rgba(255,255,255,.58);
  text-align: center;
  font-size: 13px;
  font-weight: 700;
}
.half-preview {
  position: absolute;
  inset: 0;
  margin: 0;
  z-index: 1;
  display: block;
  background: #1c1714;
}
.half-preview[hidden] { display: none; }
.half-preview img {
  width: 100%;
  height: 100%;
  max-height: none;
  border-radius: 0;
  object-fit: cover;
}
.preview-place {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  z-index: 2;
  padding: 7px 9px;
  border-radius: 12px;
  background: rgba(20,16,14,.62);
  color: rgba(255,255,255,.9);
  font-size: 11px;
  font-weight: 800;
  text-align: center;
  backdrop-filter: blur(10px);
}
.preview-place[hidden] { display: none; }
.split-upload-card .progress-wrap { margin: 16px 4px 0; }
.split-upload-card button { margin-top: 14px; }
@media (max-width: 520px) {
  .upload-diptych-frame { border-radius: 20px; }
  .half-label { font-size: 10px; top: 8px; left: 8px; }
  .half-picker { font-size: 13px; }
}

/* Completed frame ritual */
.developing-card {
  min-height: 340px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: rgba(255,255,255,.74);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 28px 22px;
  margin: 16px 0;
  box-shadow: 0 18px 60px rgba(54,43,35,.08);
  overflow: hidden;
  position: relative;
}
.developing-card::before {
  content: "";
  position: absolute;
  inset: -40%;
  background: radial-gradient(circle at 50% 50%, rgba(255,255,255,.85), rgba(255,255,255,0) 42%);
  animation: filmPulse 1.1s ease-in-out infinite;
}
.developing-card > * { position: relative; z-index: 1; }
.developing-word {
  font-size: clamp(36px, 10vw, 64px);
  line-height: .95;
  letter-spacing: -0.06em;
  font-weight: 850;
  margin: 6px 0 12px;
}
.completed-reveal {
  animation: completedRise .48s ease-out both;
}
.completed-reveal .diptych-frame img:first-child {
  animation: leftHalfIn .55s ease-out both;
}
.completed-reveal .diptych-frame img:last-child {
  animation: rightHalfIn .55s ease-out both;
}
.complete-label { text-align: center; }
.celebration-line {
  text-align: center;
  font-size: 18px;
  line-height: 1.35;
  letter-spacing: -0.02em;
  font-weight: 750;
  margin: 16px auto 2px;
  max-width: 520px;
}
.confetti-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 80;
  overflow: hidden;
}
.confetti-layer span {
  position: absolute;
  top: -20px;
  width: 7px;
  height: 12px;
  border-radius: 2px;
  background: rgba(33,27,24,.42);
  opacity: .78;
  animation-name: confettiFall;
  animation-timing-function: cubic-bezier(.18,.72,.32,1);
  animation-fill-mode: forwards;
}
.confetti-layer span:nth-child(3n) { width: 5px; height: 10px; background: rgba(155,118,82,.42); }
.confetti-layer span:nth-child(3n+1) { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.88); }
@keyframes filmPulse {
  0%, 100% { opacity: .38; transform: scale(.92); }
  50% { opacity: .88; transform: scale(1.04); }
}
@keyframes completedRise {
  from { opacity: 0; transform: translateY(10px); filter: blur(6px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}
@keyframes leftHalfIn {
  from { opacity: 0; transform: translateX(-8%); filter: blur(7px); }
  to { opacity: 1; transform: translateX(0); filter: blur(0); }
}
@keyframes rightHalfIn {
  from { opacity: 0; transform: translateX(8%); filter: blur(7px); }
  to { opacity: 1; transform: translateX(0); filter: blur(0); }
}
@keyframes confettiFall {
  0% { opacity: 0; transform: translateY(0) rotate(0deg); }
  12% { opacity: .78; }
  100% { opacity: 0; transform: translateY(72vh) rotate(260deg); }
}
@media (prefers-reduced-motion: reduce) {
  .developing-card::before,
  .completed-reveal,
  .completed-reveal .diptych-frame img,
  .confetti-layer span { animation: none !important; }
  .confetti-layer { display: none; }
}
