:root {
  --bg: #f8f6ff;
  --surface: #ffffff;
  --surface-soft: #eee7ff;
  --ink: #30283f;
  --muted: #6c647a;
  --line: #e7e1ef;
  --accent: #b69ae9;
  --accent-dark: #70519e;
  --success: #4f8669;
  --danger: #a94b4b;
  --shadow: 0 8px 28px rgba(77, 51, 113, 0.06);
  --radius: 24px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 92px; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 7% 4%, rgba(255, 192, 135, .34), transparent 22rem),
    radial-gradient(circle at 92% 12%, rgba(166, 211, 218, .3), transparent 26rem),
    repeating-linear-gradient(0deg, rgba(184, 127, 85, .055) 0 1px, transparent 1px 7px),
    linear-gradient(135deg, #fff9f1 0%, #fff2e4 48%, #f6eee3 100%);
  font-family: "Hiragino Sans", "Yu Gothic UI", "Noto Sans JP", system-ui, -apple-system, sans-serif;
  line-height: 1.65;
}
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 28px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 14px 24px;
  background: rgba(255, 253, 249, 0.9);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(206, 217, 209, 0.9);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-family: "Hiragino Sans", "Yu Gothic UI", sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  white-space: nowrap;
}
.brand-mark { font-size: 1.55rem; line-height: 1; }
.desktop-nav { display: flex; align-items: center; justify-content: center; gap: 20px; margin-left: auto; }
.desktop-nav a { color: var(--muted); font-size: 0.8rem; font-weight: 700; }
.desktop-nav a:hover, .desktop-nav a:focus-visible { color: var(--accent-dark); }

.shell { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 18px 0 72px; }
.card { background: rgba(255, 253, 249, 0.94); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.hero { position: relative; min-height: 540px; overflow: hidden; isolation: isolate; border: 8px solid #fffdf8; border-radius: 8px; box-shadow: 0 8px 0 #efd4b8, 0 22px 44px rgba(136, 83, 58, .16); transform: rotate(-.25deg); }
.hero-photo { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.hero.has-memory-cover { transform: rotate(.18deg); }
.hero-shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(255, 252, 246, .98) 0%, rgba(255, 248, 239, .91) 34%, rgba(255, 245, 232, .18) 64%, rgba(255, 253, 247, 0) 78%);
}
.hero-copy { width: min(570px, 52%); padding: clamp(42px, 7vw, 82px); padding-right: 0; }
.eyebrow { margin: 0 0 7px; color: var(--accent-dark); font-size: 0.76rem; font-weight: 900; letter-spacing: 0.16em; }
.hero h1 { margin: 10px 0 18px; font-size: clamp(2.4rem, 5vw, 4.5rem); line-height: 1.15; letter-spacing: -0.035em; }
.hero-copy > p:not(.eyebrow) { max-width: 31rem; margin: 0 0 28px; color: #43635a; font-size: 1.05rem; }
.hero-button { display: inline-flex; }

.button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 5px;
  padding: 11px 18px;
  font-weight: 850;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}
.button:hover { transform: translateY(-1px); }
.button:active, .quick-card:active { transform: scale(.975); filter: brightness(.96); }
.button.is-pressed, .quick-card.is-pressed { transform: scale(.975); }
.button:focus-visible, .quick-card:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, .text-button:focus-visible {
  outline: 3px solid rgba(239, 112, 134, 0.24);
  outline-offset: 2px;
}
.button:disabled { opacity: 0.58; cursor: wait; transform: none; }
.button.is-loading::before { content: ""; width: .9em; height: .9em; margin-right: .55em; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: button-spin .7s linear infinite; }
@keyframes button-spin { to { transform: rotate(360deg); } }
.button.primary { color: #493d36; background: linear-gradient(135deg, #f8cf9f, #ea9569); box-shadow: 0 8px 18px rgba(197, 109, 72, 0.24); }
.button.primary:hover { background: linear-gradient(135deg, #ffe0b7, #eea176); }
.button.secondary { color: var(--ink); background: #fff; border: 1px solid var(--line); box-shadow: none; }
.button.compact { min-height: 38px; padding: 7px 11px; font-size: 0.8rem; }
.button.full { width: 100%; }

.quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; margin: 22px 0; border: 1px solid var(--line); background: var(--line); }
.quick-card {
  appearance: none;
  min-height: 138px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  padding: 24px 22px;
  background: var(--surface);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.quick-card > span { font-size: 1.75rem; margin-bottom: 4px; }
.quick-card strong { font-size: 1rem; }
.quick-card small { color: var(--muted); font-size: 0.82rem; }
.quick-card:hover { transform: none; background: #e8f0e9; }

.guide-video {
  display: grid;
  grid-template-columns: minmax(240px, 0.72fr) minmax(0, 1.28fr);
  gap: clamp(20px, 4vw, 44px);
  align-items: center;
  margin: 18px 0;
  padding: clamp(20px, 3vw, 34px);
  overflow: hidden;
}
.guide-video-copy h2 { margin: 6px 0 12px; font-size: clamp(1.5rem, 3vw, 2.15rem); line-height: 1.3; }
.guide-video-copy > p:last-child { margin: 0; color: var(--muted); line-height: 1.85; }
.guide-video video { display: block; width: 100%; aspect-ratio: 16 / 9; border-radius: 20px; background: #2b2024; box-shadow: 0 18px 44px rgba(58, 35, 42, 0.18); }

.account-card, .form-card, .album-card, .story-studio, .plan-card { padding: clamp(20px, 3vw, 32px); }
.account-card { margin-bottom: 18px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.section-head h2 { margin: 0; font-size: clamp(1.45rem, 2.7vw, 2rem); line-height: 1.25; }
.section-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: var(--surface-soft); font-size: 1.5rem; }
.state-badge { padding: 6px 11px; color: var(--muted); background: #f7f2ef; border-radius: 999px; font-size: 0.8rem; font-weight: 800; }
.state-badge.active { color: var(--success); background: #e9f6ef; }
.account-badges { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; justify-content: flex-end; }
.plan-badge { padding: 6px 11px; color: #6b5349; background: #f8e9de; border: 1px solid #e8c8b3; border-radius: 999px; font-size: 0.8rem; font-weight: 900; }
.plan-badge.plus { color: #fff; background: var(--accent-dark); border-color: var(--accent-dark); }
.auth-grid { display: grid; grid-template-columns: 1fr 1fr auto; align-items: end; gap: 13px; }
.auth-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.auth-grid .text-button { grid-column: 1 / -1; justify-self: start; }
label { display: grid; gap: 7px; color: var(--muted); font-size: 0.88rem; font-weight: 750; }
label em { color: var(--accent-dark); font-style: normal; font-size: 0.76rem; }
input, select, textarea {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 12px 14px;
  color: var(--ink);
  background: #fff;
  outline: none;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: #e79cab; box-shadow: 0 0 0 4px rgba(239, 112, 134, 0.09); }
.status { min-height: 1.2rem; margin: 10px 0 0; color: var(--success); font-size: 0.84rem; }
.text-button, .text-link { padding: 0; color: var(--accent-dark); background: transparent; border: 0; font-weight: 800; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.text-button.danger { color: var(--danger); }
.usage-panel { margin-top: 18px; padding: 17px 18px; border-radius: 17px; background: #fff6f2; border: 1px solid #f0dcd5; }
.usage-copy { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.usage-copy span { color: var(--muted); font-size: 0.83rem; }
.progress-track { height: 9px; overflow: hidden; border-radius: 999px; background: #f2d8dc; }
.progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent-dark), var(--accent)); transition: width 0.3s ease; }
.usage-panel .text-link { display: inline-block; margin-top: 9px; font-size: 0.8rem; }

.workspace-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-card { position: relative; }
.anchor-target { position: absolute; top: -90px; }
.form-card label { margin: 15px 0; }
.upload { min-height: 180px; place-items: center; padding: 22px; border: 1.5px dashed #e6acb5; border-radius: 18px; background: #fff9f7; text-align: center; cursor: pointer; }
.upload input { display: none; }
.upload-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; color: var(--accent-dark); background: #ffe9ed; font-size: 1.8rem; }
.upload small { color: var(--muted); font-weight: 500; }
.capture-help { margin: 14px 0 0; color: var(--muted); font-size: 0.8rem; line-height: 1.7; }
.preview-wrap { overflow: hidden; margin-top: 14px; border-radius: 4px; background: #f5efeb; }
.comment-selection-status { margin: 0; padding: 11px 12px 7px; color: var(--accent-dark); font-size: .82rem; font-weight: 900; }
.preview-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 4px; }
.preview-comment-toggle { position: relative; overflow: hidden; min-width: 0; padding: 0; border: 3px solid transparent; border-radius: 5px; cursor: pointer; background: #fff; }
.preview-comment-toggle img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.preview-comment-toggle.is-selected { border-color: var(--accent-dark); }
.preview-comment-state { position: absolute; right: 5px; bottom: 5px; max-width: calc(100% - 10px); padding: 4px 6px; color: #fff; border-radius: 999px; background: rgba(20, 57, 49, .83); font-size: .67rem; font-weight: 900; }
.preview-comment-toggle.is-selected .preview-comment-state { background: var(--accent-dark); }
.selected-photo-actions { display: flex; gap: 9px; margin-top: 12px; }
.selected-photo-actions .button { flex: 1; }
.is-saving .capture-panel, .is-saving .upload, .is-saving input, .is-saving textarea { pointer-events: none; opacity: .62; }

.album-card, .story-studio { margin-top: 18px; }
.album-tools { display: flex; align-items: center; gap: 10px; }
.album-view-switcher { display: flex; overflow: hidden; border: 1px solid var(--line); border-radius: 4px; background: #fffef9; }
.album-view-button { display: inline-flex; align-items: center; gap: 5px; min-height: 36px; padding: 7px 10px; color: var(--muted); border: 0; border-right: 1px solid var(--line); background: transparent; font: inherit; font-size: .76rem; font-weight: 800; cursor: pointer; }
.album-view-button:last-child { border-right: 0; }
.album-view-button:hover { color: var(--accent-dark); background: #edf3ed; }
.album-view-button:focus-visible { position: relative; z-index: 1; outline: 3px solid rgba(23,104,92,.3); outline-offset: -3px; }
.album-view-button.is-active { color: #fff; background: var(--accent-dark); }
.album-filters { display: flex; align-items: end; gap: 12px; margin: 0 0 20px; padding: 13px; border-left: 4px solid var(--accent); background: #edf3ed; }
.album-filters label { display: grid; flex: 1; gap: 5px; color: var(--accent-dark); font-size: .76rem; font-weight: 800; }
.album-filters select, .album-filters input { width: 100%; min-height: 39px; padding: 7px 9px; }
.album-filters .text-button { min-height: 39px; white-space: nowrap; }
.album-month-picker { margin: -7px 0 20px; padding: 15px; border: 1px solid var(--line); border-radius: 12px; background: #fffaf5; }
.album-month-picker-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.album-month-picker-head > div { display: grid; gap: 2px; }.album-month-picker-head strong { color: var(--accent-dark); font-size: .9rem; }.album-month-picker-head span { color: var(--muted); font-size: .76rem; }
.album-month-picker select { min-height: 36px; padding: 6px 9px; font-weight: 800; }
.album-month-calendar { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 7px; }
.album-month-folder { position: relative; display: grid; place-items: center; min-height: 76px; padding: 7px 3px; overflow: hidden; color: var(--accent-dark); border: 1px solid #e8d2c4; border-radius: 7px; background: #fff; font: inherit; cursor: pointer; }.album-month-folder:hover:not(:disabled) { border-color: var(--accent-dark); background: #fff0e1; }.album-month-folder:focus-visible { outline: 3px solid rgba(23,104,92,.3); outline-offset: 2px; }.album-month-folder.is-active { color: #fff; border-color: var(--accent-dark); background: var(--accent-dark); }.album-month-folder:disabled { color: #b9aaa1; border-style: dashed; background: #fbf7f4; cursor: default; }.album-month-folder.has-photo::after { position: absolute; inset: 0; content: ""; background: linear-gradient(rgba(10,35,29,.08), rgba(10,35,29,.76)); }.album-month-folder img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }.album-month-folder-copy { position: relative; z-index: 1; display: grid; gap: 2px; place-items: center; }.album-month-folder.has-photo .album-month-folder-copy { color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.85); }.album-month-folder strong { font-size: .76rem; }.album-month-folder small { font-size: .66rem; font-weight: 700; }
.empty { padding: 58px 20px; color: var(--muted); text-align: center; }
.empty-icon { font-size: 3.3rem; }
.empty h3 { margin: 12px 0 3px; color: var(--ink); font-size: 1.3rem; }
.empty p { margin: 0; }
.album-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.album-grid[data-view="list"] { grid-template-columns: 1fr; max-width: 760px; }
.album-month-heading { grid-column: 1 / -1; margin: 11px 0 -5px; padding: 0 0 8px; color: var(--accent-dark); border-bottom: 1px solid #b6cbb9; font-size: 1rem; }
.album-month-heading:first-child { margin-top: 0; }
.album-grid[data-view="compact"] { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.album-grid[data-view="compact"] .memory-entry { position: relative; }
.album-grid[data-view="compact"] .memory-card { position: relative; border-radius: 4px; }
.album-grid[data-view="compact"] .memory-visual { margin: 0; border: 0; border-radius: 0; }
.album-grid[data-view="compact"] .memory-photo { aspect-ratio: 1; }
.album-grid[data-view="compact"] .memory-overlay, .album-grid[data-view="compact"] .memory-body { display: none; }
.memory-entry { min-width: 0; max-width: 100%; }
.memory-card { box-sizing: border-box; min-width: 0; max-width: 100%; overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: #fff; }
.memory-visual { position: relative; margin: 12px 12px 0; overflow: hidden; border: 1px solid var(--line); border-radius: 3px; background: #e7eee7; }
.memory-photo { display: block; box-sizing: border-box; inline-size: 100%; max-inline-size: 100%; aspect-ratio: 4 / 3; object-fit: contain; background: #e7eee7; }
.album-grid:not([data-view="compact"]) .memory-photo { inline-size: 100%; max-inline-size: 100%; margin: 0; border: 0; border-radius: 0; }
.memory-photo.image-unavailable { visibility: hidden; }
.memory-visual.is-viewable { cursor: zoom-in; }
.memory-visual.is-viewable:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.story-player.is-viewable { cursor: zoom-in; }
.story-player.is-viewable:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.memory-body { padding: 14px; }
.memory-overlay { position: absolute; right: 0; bottom: 0; left: 0; display: grid; gap: 5px; padding: 42px 12px 10px; color: #fff; background: linear-gradient(transparent, rgba(15, 43, 37, .78)); }
.memory-date { justify-self: end; color: #fff; font-size: .72rem; font-weight: 800; line-height: 1.2; text-shadow: 0 1px 3px rgba(0, 0, 0, .8); }
.memory-overlay .memory-story { justify-self: center; margin: 0; color: #fff; font-size: .88rem; font-weight: 800; line-height: 1.55; text-align: center; text-shadow: 0 1px 3px rgba(0, 0, 0, .8); white-space: pre-line; }
.memory-comment-action { margin-top: 10px; }

.story-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.story-actions article { display: flex; flex-direction: column; padding: 19px; border: 1px solid var(--line); border-radius: 18px; background: #fffdfa; }
.story-actions h3 { margin: 0 0 5px; font-size: 1.05rem; }
.story-actions p { flex: 1; margin: 0 0 18px; color: var(--muted); font-size: 0.87rem; }
.plus-feature-tag { display: inline-block; margin-left: 4px; padding: 2px 5px; color: #fff; background: var(--accent-dark); font-size: .62rem; font-weight: 900; line-height: 1.1; vertical-align: middle; }
.story-actions .plus-locked { background: #f4f7f0; }
.story-actions .plus-locked .button:disabled { cursor: not-allowed; }
.story-auto-note { margin: -4px 0 18px; color: var(--muted); font-size: 0.92rem; line-height: 1.75; }
.story-collection-list { display: grid; gap: 13px; margin-top: 18px; }
.story-slide-controls { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }
.story-slide-controls span { color: var(--muted); font-size: .82rem; font-weight: 800; }
.story-collection { min-width: 0; padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: #fff8f4; }
.story-player { position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden; box-sizing: border-box; width: 100%; min-height: 220px; margin: 14px 0; aspect-ratio: 16 / 8; background: #183d36; }
.story-player img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; min-width: 0; min-height: 0; max-width: 100%; max-height: 100%; object-fit: contain; animation: story-photo-in 700ms ease both; }
.story-player-label { margin: 14px 0 0; color: var(--accent-dark); font-size: .82rem; font-weight: 900; }
.story-player-count { position: absolute; z-index: 1; top: 12px; right: 12px; padding: 4px 9px; color: #fff; background: rgba(12, 39, 33, .88); font-size: .75rem; font-weight: 800; }
.story-player-caption { position: absolute; z-index: 1; right: 14px; bottom: 15px; left: 14px; color: #fff; font-size: clamp(.85rem, 2.5vw, 1.05rem); font-weight: 900; line-height: 1.45; text-align: center; text-shadow: 0 2px 5px #000, 0 0 2px #000; }
@keyframes story-photo-in { from { opacity: .35; transform: scale(1.04); } to { opacity: 1; transform: scale(1); } }
.story-kind { color: var(--accent-dark); font-size: 0.76rem; font-weight: 900; letter-spacing: 0.1em; }
.story-collection h3 { margin: 4px 0 8px; }
.story-collection p { margin: 0; color: #66524b; white-space: pre-line; }

.calendar-dialog { width: min(680px, calc(100% - 24px)); padding: 0; background: #fffdfb; }
.calendar-dialog form { padding: clamp(22px, 4vw, 34px); }
.calendar-intro { margin: -7px 0 18px; color: var(--muted); font-size: 0.9rem; }
.calendar-choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0 0 18px; }
.calendar-choice { overflow: hidden; min-height: 160px; position: relative; padding: 0; border: 2px solid #f1cbd2; border-radius: 15px; cursor: pointer; background: #f8eeea; }
.calendar-choice:hover { border-color: var(--accent); }
.calendar-choice img { width: 100%; height: 100%; min-height: 160px; object-fit: cover; }
.calendar-choice span { position: absolute; right: 7px; bottom: 7px; padding: 3px 7px; color: #fff; background: rgba(52, 34, 31, 0.72); border-radius: 999px; font-size: 0.68rem; font-weight: 800; }
.calendar-print-sheet { display: none; width: min(860px, calc(100% - 28px)); margin: 24px auto; padding: clamp(24px, 5vw, 55px); color: #3f302c; background: #fffdfb; }
.calendar-print-header { text-align: center; }
.calendar-print-header p { margin: 0; color: var(--accent-dark); font-weight: 900; letter-spacing: 0.14em; }
.calendar-print-header h1 { margin: 4px 0 22px; font-family: Georgia, "Yu Mincho", serif; font-size: clamp(1.8rem, 4vw, 3rem); }
.calendar-print-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.calendar-print-photos figure { margin: 0; }
.calendar-print-photos img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 12px; }
.calendar-print-photos figcaption { margin-top: 6px; color: #6c574f; font-size: 0.72rem; line-height: 1.55; text-align: center; overflow-wrap: anywhere; }
.calendar-print-note { min-height: 1.7em; margin: 17px 0; color: var(--accent-dark); text-align: center; font-family: Georgia, "Yu Mincho", serif; }
.calendar-weekdays, .calendar-days { display: grid; grid-template-columns: repeat(7, 1fr); }
.calendar-weekdays span { padding: 7px; color: var(--accent-dark); text-align: center; font-size: 0.78rem; font-weight: 900; }
.calendar-weekdays .is-sunday, .calendar-day.is-sunday, .calendar-day.is-holiday { color: #c83f54; }
.calendar-weekdays .is-saturday, .calendar-day.is-saturday { color: #386eb5; }
.calendar-days { border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.calendar-day { display: flex; flex-direction: column; gap: 2px; min-height: 48px; padding: 7px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 0.82rem; }
.calendar-day b { font-size: 1em; font-weight: 850; }
.calendar-day small { overflow: hidden; color: currentColor; font-size: .58em; font-weight: 800; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.calendar-day.is-empty { background: #fbfafc; }

.plans-section { padding-top: 64px; }
.plans-heading { max-width: 700px; margin: 0 auto 24px; text-align: center; }
.plans-heading h2 { margin: 6px 0 10px; font-size: clamp(1.7rem, 3.3vw, 2.6rem); line-height: 1.3; }
.plans-heading > p:last-child { color: var(--muted); }
.plan-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; max-width: 860px; margin: 0 auto; }
.plan-card { position: relative; }
.plan-card.featured { border: 2px solid #ef9bac; transform: translateY(-8px); }
.plan-name { display: inline-flex; padding: 6px 11px; border-radius: 999px; background: var(--surface-soft); color: var(--accent-dark); font-size: 0.8rem; font-weight: 900; }
.plan-card h3 { margin: 14px 0 4px; font-size: 2rem; }
.plan-card h3 small { font-size: 0.8rem; }
.plan-card > p { color: var(--muted); }
.plan-card ul { display: grid; gap: 8px; padding: 0; margin: 20px 0; list-style: none; }
.plan-card li::before { content: "✓"; margin-right: 8px; color: var(--success); font-weight: 900; }
.plan-choice { display: grid; gap: 9px; margin: 20px 0; padding: 0; border: 0; }
.plan-choice legend { margin-bottom: 9px; color: var(--ink); font-size: 0.88rem; font-weight: 850; }
.plan-choice label { display: flex; align-items: center; gap: 12px; margin: 0; padding: 13px 14px; border: 1px solid var(--line); border-radius: 14px; color: var(--ink); background: #fff; cursor: pointer; transition: border-color .15s ease, background .15s ease; }
.plan-choice label:has(input:checked) { border-color: var(--accent); background: #fff5f6; box-shadow: 0 0 0 3px rgba(239,112,134,.1); }
.plan-choice input { flex: 0 0 auto; width: 19px; min-height: 19px; margin: 0; padding: 0; accent-color: var(--accent-dark); }
.plan-choice span { display: grid; gap: 1px; }
.plan-choice strong { font-size: 0.92rem; }
.plan-choice small { color: var(--muted); font-size: 0.78rem; font-weight: 650; }
.plan-choice em { display: inline-flex; margin-left: 5px; padding: 2px 6px; border-radius: 999px; color: #a44556; background: #ffe3e8; font-size: 0.68rem; font-style: normal; vertical-align: 1px; }

footer { display: grid; place-items: center; gap: 15px; padding: 36px 20px 48px; color: var(--muted); border-top: 1px solid var(--line); background: #fff; text-align: center; }
.footer-brand { font-size: 1.18rem; }
footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; font-size: 0.84rem; }
footer nav a { text-decoration: underline; text-underline-offset: 3px; }
footer p { margin: 0; font-size: 0.78rem; }
.toast { position: fixed; z-index: 50; left: 50%; bottom: max(24px, env(safe-area-inset-bottom)); width: min(500px, calc(100% - 28px)); padding: 14px 18px; color: #fff; background: #43332d; border-radius: 14px; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18); opacity: 0; pointer-events: none; transform: translate(-50%, 18px); transition: 0.2s ease; }
.toast.visible { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: #8c3438; }
.activity-status { position: fixed; z-index: 49; left: 50%; bottom: max(86px, calc(env(safe-area-inset-bottom) + 72px)); display: flex; align-items: center; gap: 12px; width: min(440px, calc(100% - 28px)); max-width: calc(100vw - 28px); padding: 14px 16px; color: #fff; background: rgba(23, 61, 54, .96); border: 1px solid rgba(255,255,255,.17); border-radius: 8px; box-shadow: 0 18px 45px rgba(15, 45, 39, .28); }
.activity-status strong, .activity-status span { display: block; }
.activity-status > div { min-width: 0; overflow-wrap: anywhere; }
.activity-status strong { font-size: .92rem; }
.activity-status #activityDetail { margin-top: 3px; color: #dcebe1; font-size: .79rem; line-height: 1.45; }
.activity-spinner { flex: 0 0 auto; width: 25px; height: 25px; border: 3px solid rgba(255,255,255,.28); border-top-color: #fff; border-radius: 50%; animation: button-spin .7s linear infinite; }
.hidden-force { display: none !important; }

.legal-shell { width: min(820px, calc(100% - 28px)); margin: 32px auto 72px; padding: clamp(24px, 5vw, 56px); }
.legal-shell h1 { margin: 6px 0 24px; font-size: clamp(2rem, 5vw, 3rem); line-height: 1.2; }
.legal-shell h2 { margin: 30px 0 7px; font-size: 1.15rem; }
.legal-shell p, .legal-shell li { color: #65544d; }
.legal-shell .legal-date { margin: 36px 0 20px; color: var(--muted); font-size: 0.86rem; }
.support-note { margin: 28px 0; padding: 22px; border-radius: 18px; background: #fff5f1; border: 1px solid var(--line); }
.support-note h2 { margin-top: 0; }
.support-note ul { padding-left: 1.3rem; }
.owner-label { margin-left: auto; color: var(--muted); font-size: 0.75rem; font-weight: 900; letter-spacing: 0.14em; }
.owner-shell { width: min(960px, calc(100% - 28px)); margin: 42px auto 80px; }
.owner-card { width: min(520px, 100%); margin: 0 auto; padding: clamp(24px, 5vw, 48px); }
.owner-card h1, .owner-dashboard h1 { margin: 4px 0 12px; font-size: clamp(2rem, 4vw, 2.8rem); }
.owner-card > p { color: var(--muted); }
.owner-form { display: grid; gap: 16px; margin-top: 28px; }
.owner-note { margin-top: 22px; font-size: 0.8rem; }
.owner-identity { margin: 0; color: var(--muted); font-size: 0.9rem; }
.owner-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.owner-metrics article { display: grid; gap: 5px; padding: 24px; }
.owner-metrics span, .owner-metrics small { color: var(--muted); font-size: 0.82rem; font-weight: 750; }
.owner-metrics strong { font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.15; }
.owner-checklist { margin-top: 18px; padding: clamp(22px, 4vw, 34px); }
.owner-checklist h2 { margin: 3px 0 14px; }
.owner-checklist ul { display: grid; gap: 9px; padding-left: 1.2rem; color: #65544d; }

@media (max-width: 940px) {
  .desktop-nav { display: none; }
  .topbar { justify-content: space-between; }
  .hero { min-height: 470px; }
  .hero-copy { width: 64%; padding: 54px 38px; }
  .quick-grid, .story-actions { grid-template-columns: 1fr 1fr; }
  .album-grid { grid-template-columns: 1fr 1fr; }
  .auth-grid { grid-template-columns: 1fr 1fr; }
  .auth-buttons { grid-column: 1 / -1; }
}

@media (max-width: 680px) {
  .guide-video { grid-template-columns: 1fr; }
  .guide-video video { border-radius: 14px; }
  html { scroll-padding-top: 76px; }
  .topbar { min-height: 64px; padding: 10px 15px; }
  .brand { font-size: 1.2rem; }
  .brand-mark { font-size: 1.55rem; }
  .shell { width: min(100% - 22px, 1180px); padding-top: 10px; }
  .hero { min-height: 560px; display: flex; align-items: flex-end; }
  .hero-photo { object-position: 62% center; }
  .hero-shade { background: linear-gradient(180deg, rgba(255,255,255,0.03) 22%, rgba(255, 251, 248, 0.97) 62%, #fffbf8 100%); }
  .hero-copy { width: 100%; padding: 28px 22px 30px; }
  .hero h1 { font-size: 2.35rem; }
  .hero-copy > p:not(.eyebrow) { font-size: 0.95rem; }
  .quick-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .quick-card { min-height: 132px; padding: 16px; }
  .quick-card > span { font-size: 1.45rem; }
  .quick-card small { font-size: 0.74rem; }
  .workspace-grid, .plan-grid, .auth-grid { grid-template-columns: 1fr; }
  .owner-metrics { grid-template-columns: 1fr; }
  .auth-buttons { grid-column: auto; }
  .album-grid, .story-actions { grid-template-columns: 1fr; }
  .album-grid[data-view="compact"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .album-grid[data-view="compact"] .memory-meta { color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, .8); }
  .calendar-choice, .calendar-choice img { min-height: 110px; }
  .account-card, .form-card, .album-card, .story-studio, .plan-card { padding: 20px; }
  .section-head { align-items: flex-start; }
  .section-icon { width: 44px; height: 44px; }
  .plan-card.featured { transform: none; }
  .plans-section { padding-top: 44px; }
  .usage-copy { align-items: flex-start; flex-direction: column; gap: 2px; }
}

@media print {
  @page { size: A4 portrait; margin: 6mm; }
  body.printing-calendar main, body.printing-calendar .topbar, body.printing-calendar footer { display: none !important; }
  body.printing-calendar .calendar-print-sheet { display: grid !important; grid-template-rows: auto 83mm auto auto minmax(0, 1fr); gap: 3mm; width: 198mm; height: 285mm; margin: 0; padding: 0; background: #fff; }
  body.printing-calendar .calendar-print-header { align-self: end; }
  body.printing-calendar .calendar-print-header p { font-size: 9pt; }
  body.printing-calendar .calendar-print-header h1 { margin: 1mm 0 0; font-size: 30pt; }
  body.printing-calendar .calendar-print-photos { grid-template-columns: repeat(3, 1fr); gap: 3mm; height: 83mm; }
  body.printing-calendar .calendar-print-photos figure { display: grid; grid-template-columns: 1fr; grid-template-rows: 65mm minmax(0, 1fr); min-width: 0; }
  body.printing-calendar .calendar-print-photos img { width: 100%; height: 65mm; aspect-ratio: auto; border-radius: 2mm; object-fit: cover; }
  body.printing-calendar .calendar-print-photos figcaption { overflow: visible; margin-top: 1mm; font-size: 9.6pt; line-height: 1.25; text-align: center; white-space: normal; overflow-wrap: anywhere; text-overflow: clip; }
  body.printing-calendar .calendar-print-note { min-height: 0; margin: 0; font-size: 10pt; line-height: 1.45; }
  body.printing-calendar .calendar-weekdays { align-self: end; }
  body.printing-calendar .calendar-weekdays span { padding: 1.2mm 0; font-size: 9pt; }
  body.printing-calendar .calendar-days { grid-template-rows: repeat(var(--calendar-weeks), minmax(0, 1fr)); height: 100%; }
  body.printing-calendar .calendar-day { min-height: 0; padding: 2.2mm; font-size: 12pt; }
  body.printing-calendar .calendar-day small { margin-top: .7mm; font-size: 7pt; }
  .topbar, .quick-grid, .account-card, .workspace-grid, .album-head .button, .story-actions, .delete-memory, #plans, footer, .toast, .activity-status { display: none !important; }
  body { background: #fff; }
  .shell { width: 100%; padding: 0; }
  .hero { min-height: 270px; box-shadow: none; }
  .album-card, .story-studio { box-shadow: none; border: 0; padding: 18px 0; }
  .album-grid { grid-template-columns: 1fr 1fr; }
  .memory-card, .story-collection { break-inside: avoid; }
}
.visually-hidden{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
.capture-panel{padding:18px;border-radius:18px;background:linear-gradient(135deg,#fff1e7,#fff9f4);border:1px solid #f3d3bd;text-align:center}
.capture-panel p{margin:10px 0 0;color:#765c4d;font-size:.9rem;line-height:1.6}
.camera-button{font-size:1.05rem;min-height:54px}
.choice-divider{display:flex;align-items:center;gap:12px;color:#9a8172;font-size:.82rem;margin:4px 0}
.choice-divider::before,.choice-divider::after{content:"";height:1px;background:#eadfd8;flex:1}
.edit-dialog{width:min(92vw,560px);border:0;border-radius:22px;padding:24px;box-shadow:0 24px 80px rgba(58,35,22,.25);color:inherit}
.edit-dialog::backdrop{background:rgba(45,31,23,.48);backdrop-filter:blur(3px)}
.photo-viewer-dialog{box-sizing:border-box;width:100vw;height:100dvh;max-width:none;max-height:none;margin:0;padding:24px;border:0;background:rgba(12,20,18,.96);color:#fff}.photo-viewer-dialog::backdrop{background:rgba(12,20,18,.96)}.photo-viewer-figure{display:grid;place-items:center;gap:12px;width:100%;height:100%;margin:0}.photo-viewer-figure img{display:block;max-width:100%;max-height:calc(100dvh - 88px);object-fit:contain}.photo-viewer-figure figcaption{max-width:min(760px,100%);margin:0;color:#fff;text-align:center;font-size:.9rem;line-height:1.6;white-space:pre-line}.photo-viewer-close{position:fixed;z-index:2;top:16px;right:18px;width:46px;height:46px;border:1px solid rgba(255,255,255,.55);border-radius:50%;color:#fff;background:rgba(0,0,0,.3);font-size:2rem;line-height:1;cursor:pointer}.photo-viewer-close:hover{background:rgba(255,255,255,.2)}.photo-viewer-close:focus-visible{outline:3px solid #fff;outline-offset:3px}.photo-viewer-progress{position:fixed;z-index:1;top:25px;left:24px;margin:0;padding:5px 10px;border:1px solid rgba(255,255,255,.45);color:#fff;background:rgba(0,0,0,.3);font-size:.8rem;font-weight:800}
.edit-dialog form{display:grid;gap:18px}
.media-share-content{display:grid;gap:18px}.media-share-apps{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.media-share-apps .button{width:100%;display:flex;align-items:center;justify-content:center;gap:8px;flex-wrap:wrap}.media-share-apps svg{width:32px;height:32px;flex-shrink:0}.media-share-downloads{display:grid;gap:12px;max-height:220px;overflow:auto;overflow-wrap:anywhere}.media-share-downloads a{padding:8px}
.edit-dialog textarea{width:100%;box-sizing:border-box}
.dialog-actions,.memory-actions{display:flex;gap:12px;align-items:center;justify-content:flex-end;flex-wrap:wrap}
.memory-card .memory-actions{gap:8px;margin:12px 0 0;padding-top:10px;border-top:1px solid var(--line);font-size:.72rem;justify-content:flex-start}.memory-card .memory-actions .text-button{padding:3px 2px}.memory-card .memory-actions .danger{color:#a34032}
.plus-tools{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-top:14px;padding:15px 17px;border:1px solid #f0dcd5;border-radius:17px;background:#fff}
.plus-tools p{margin:3px 0 0;color:var(--muted);font-size:.8rem;line-height:1.55}.plus-tools-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}.dialog-copy{margin:-4px 0 2px;color:var(--muted);font-size:.9rem;line-height:1.7}.invite-result{display:grid;gap:7px;padding:15px;border:1px solid #f1ced5;border-radius:16px;background:#fff6f7}.invite-result span{color:var(--muted);font-size:.8rem;font-weight:700}.invite-result strong,.family-row code{letter-spacing:.06em;color:var(--accent-dark);font-size:1.1rem}.family-member-list{display:grid;gap:8px}.family-member-list h3{margin:4px 0 0;font-size:.94rem}.family-row{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0;padding:9px 0;border-bottom:1px solid var(--line);color:var(--muted);font-size:.82rem}.family-row code{font-family:ui-monospace,monospace}.shared-viewer #petForm,.shared-viewer #memoryForm{display:none}.shared-viewer .story-actions article:not(:nth-child(4)):not(:nth-child(5)){display:none}
.share-actions{display:flex;gap:8px;flex-wrap:wrap}.invite-result small{color:var(--muted);font-size:.76rem;line-height:1.55}
.share-guide{margin:14px 0 0;color:var(--muted);font-size:.78rem;line-height:1.6}.calendar-actions{flex-wrap:wrap}.memory-actions .share-memory{color:var(--accent-dark)}
.account-delete{margin-top:14px;font-size:.82rem}.danger-button{min-height:46px;border:0;border-radius:14px;padding:11px 18px;color:#fff;background:var(--danger);font-weight:850;cursor:pointer}.danger-button:disabled{opacity:.58;cursor:wait}
@media(max-width:680px){.plus-tools{align-items:flex-start;flex-direction:column}.plus-tools-actions{justify-content:flex-start}}

/* PetMemoryLog editorial system: intentionally distinct from pink, rounded pet-AI landing pages. */
.card { border-radius: var(--radius); box-shadow: var(--shadow); background: var(--surface); }
.section-icon { border-radius: 4px; background: #f9e3cc; }
.state-badge { border-radius: 4px; background: #f8e9de; }.state-badge.active { background: #dcefe3; }
.guide-video { grid-template-columns: minmax(230px, .68fr) minmax(0, 1.32fr); gap: clamp(22px, 3vw, 36px); border: 0; background: transparent; box-shadow: none; }
.guide-video-copy { align-self: stretch; display: flex; flex-direction: column; justify-content: center; padding: 0; border: 0; background: transparent; }
.guide-video-copy .eyebrow { color: var(--muted); letter-spacing: .1em; }
.guide-video-copy h2 { color: #3f3732; font-size: clamp(1.35rem, 2.5vw, 1.9rem); }
.guide-video-copy > p:last-child { color: #665b53; font-size: .95rem; line-height: 1.75; }
.guide-video video { border: 0; border-radius: 0; background: #171717; box-shadow: none; }
input,select,textarea { border-radius: 4px; background: #fffdf9; } input:focus,select:focus,textarea:focus { border-color: var(--accent-dark); box-shadow: 0 0 0 4px rgba(227,138,97,.16); }
.capture-panel { border-radius: 4px; background: #fff1e4; border-color: #f1cfb6; }.upload { border-radius: 4px; border-color: #ddad88; background: #fff8f0; }.upload-icon { border-radius: 4px; color: var(--accent-dark); background: #ffe1c7; }
.usage-panel,.plus-tools { border-radius: 4px; background: #fff1e4; border-color: #f1cfb6; }.progress-track { background: #f5d5c0; }.progress-track span { background: linear-gradient(90deg,var(--accent-dark),var(--accent)); }
.memory-card,.preview-wrap { border-radius: 4px; }.memory-photo { background: #f4e6da; }.memory-story,.story-collection p { color: #77675d; }
.story-actions { grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--line); background: var(--line); }.story-actions article { border: 0; border-radius: 0; background: var(--surface); padding: 24px; }.story-actions article:first-child { border-left: 5px solid var(--accent); }.story-actions article:last-child { grid-column: 1 / -1; }.story-collection { border-radius: 4px; background: #fff5eb; border-left: 5px solid var(--accent-dark); }
.plans-heading { text-align: left; margin-left: 0; }.plan-grid { max-width: none; }.plan-card.featured { border-color: var(--accent-dark); transform: none; box-shadow: 8px 8px 0 #f0cfb5; }.plan-name { border-radius: 4px; background: #fde2cc; }.plan-choice label { border-radius: 4px; }.plan-choice label:has(input:checked) { border-color: var(--accent-dark); background: #fff0e1; box-shadow: 0 0 0 3px rgba(227,138,97,.12); }.plan-choice em { color: #855220; background: #f7dfac; }
.calendar-choice { border-radius: 4px; border-color: #e3bf9e; background: #fff1e4; }.calendar-choice:hover { border-color: var(--accent-dark); }.calendar-print-sheet { color: var(--ink); background: #fffdf9; }.calendar-print-header p,.calendar-print-note,.calendar-weekdays span { color: var(--accent-dark); }
.edit-dialog { border-radius: 6px; }.invite-result { border-color: #f0c8a8; background: #fff4e8; }.family-row code,.invite-result strong { color: var(--accent-dark); }.danger-button { border-radius: 5px; }
footer { background: #805449; color: #fff4e8; border-top: 0; } footer .brand { color: #fff; }
@media(max-width:680px){.hero{min-height:570px;border-radius:8px 8px 34px 8px}.hero-copy{width:100%;padding:30px 24px}.hero-shade{background:linear-gradient(180deg,rgba(255,253,247,.08) 20%,rgba(255,253,247,.96) 63%,#fffdf7 100%)}.guide-video{grid-template-columns:1fr}.guide-video-copy{padding:0}.story-actions{grid-template-columns:1fr}.story-actions article:first-child{border-left:0;border-top:5px solid var(--accent)}}

@media (max-width: 680px) {
  .preview-wrap { width: 100%; max-width: 100%; }
  .preview-grid { width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .preview-grid img { min-width: 0; max-width: 100%; height: auto; }
  .album-tools { width: 100%; justify-content: space-between; }
  .album-filters { align-items: stretch; flex-wrap: wrap; gap: 9px; }
  .album-filters label { min-width: calc(50% - 5px); }
  .album-filters .text-button { width: 100%; }
  .album-month-calendar { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .album-view-button { min-height: 38px; padding: 7px 8px; }
  .album-grid, .album-grid[data-view="list"], .album-grid[data-view="compact"] { display: grid; overflow: visible; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 0; }
  .album-grid[data-view="list"] { grid-template-columns: 1fr; }
  .album-grid[data-view="compact"] { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
  .memory-entry, .memory-card { min-width: 0; max-width: 100%; }
  .memory-photo { inline-size: 100%; max-inline-size: 100%; }
}

/* Phone-first layout: prevents horizontal drift and keeps the first action visible. */
@media (max-width: 480px) {
  html { width: 100%; }
  body { width: 100%; overflow-x: hidden; background: #fff6ed; }
  .topbar { width: 100%; min-height: 58px; gap: 7px; padding: 8px 11px; background: #fffdf9; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .card { box-shadow: 0 5px 14px rgba(136, 83, 58, .08); }
  .brand { min-width: 0; gap: 5px; font-size: 1rem; letter-spacing: -0.025em; }
  .brand-mark { font-size: 1.28rem; }
  #languageToggle { min-height: 36px; padding: 7px 9px; font-size: 0.74rem; white-space: nowrap; }
  #signoutBtn { min-height: 36px; padding: 7px 9px; font-size: 0.74rem; }
  .shell { width: calc(100% - 16px); padding: 8px 0 44px; }
  .hero { min-height: 455px; border-radius: 7px 7px 28px 7px; }
  .hero-photo { object-position: 60% center; }
  .hero-copy { padding: 22px 17px 23px; }
  .hero h1 { margin: 6px 0 12px; font-size: clamp(2rem, 10vw, 2.45rem); }
  .hero-copy > p:not(.eyebrow) { margin-bottom: 18px; font-size: 0.9rem; line-height: 1.7; }
  .button { min-height: 44px; padding: 10px 14px; }
  .quick-grid { gap: 1px; margin: 12px 0; }
  .quick-card { min-height: 118px; padding: 13px 11px; }
  .quick-card strong { font-size: .9rem; }
  .quick-card small { font-size: .69rem; line-height: 1.45; }
  .guide-video, .account-card, .form-card, .album-card, .story-studio, .plan-card { padding: 17px; }
  .guide-video { gap: 12px; }
  .guide-video-copy h2 { font-size: 1.3rem; }
  .section-head { gap: 9px; margin-bottom: 14px; }
  .album-head { align-items: stretch; flex-direction: column; }
  .album-view-switcher { flex: 1; }
  .album-view-button { flex: 1; justify-content: center; }
  .section-head h2 { font-size: 1.3rem; }
  .state-badge { padding: 4px 7px; font-size: .7rem; white-space: nowrap; }
  .auth-grid, .workspace-grid, .plan-grid { gap: 10px; }
  .auth-buttons { gap: 8px; }
  input, select, textarea { min-height: 46px; font-size: 16px; }
  .calendar-dialog, .edit-dialog { width: calc(100% - 16px); max-height: calc(100dvh - 16px); }
  .calendar-dialog form, .edit-dialog form { padding: 18px; overflow: auto; }
  .dialog-actions { flex-direction: column-reverse; }
  .dialog-actions .button { width: 100%; }
  .preview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* v55: soft lilac, mint and sticker illustrations. Screen-only keeps PDF styling intact. */
@media screen {
 body { background: var(--bg); }
 .topbar { background: #f8f6ff; border-color: var(--line); }
 .brand-mark { display: flex; flex-shrink: 0; }
 .brand-mark img { width: 40px; height: 40px; border-radius: 13px; }
 .card { background: var(--surface); }
 .hero, .hero.has-memory-cover { border: 0; border-radius: 30px; transform: none; box-shadow: var(--shadow); }
 .hero-shade { background: linear-gradient(90deg,#f2edff 0%,rgba(242,237,255,.95) 32%,rgba(242,237,255,0) 67%); }
 .hero-copy > p:not(.eyebrow) { color: #635771; }
 .hero h1 { font-weight: 850; letter-spacing: -.045em; }
 .button { border-radius: 16px; }
 .button.primary { color: #302044; background: #d6c4fa; box-shadow: 0 5px 14px #70519e14; }
 .button.primary:hover { background: #cbb3f5; }
 .button:focus-visible, .quick-card:focus-visible, a:focus-visible { outline: 3px solid #70519e; outline-offset: 3px; }
 .quick-grid { gap: 14px; border: 0; background: transparent; }
 .quick-card { border: 1px solid var(--line); border-radius: 22px; transition: transform .16s ease, box-shadow .16s ease; }
 .quick-card:nth-child(1) { background: #eee7ff; }
 .quick-card:nth-child(2) { background: #e4f5ee; }
 .quick-card:nth-child(3) { background: #fff0f4; }
 .quick-card:nth-child(4) { background: #fff7d9; }
 .quick-card:hover { transform: translateY(-3px); box-shadow: 0 8px 20px #70519e15; }
 .journal-icon { display: inline-block; width: 36px; height: 36px; vertical-align: middle; color: #554168; flex-shrink: 0; }
 .quick-card > span { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 17px; background: #ffffffb8; margin-bottom: 8px; }
 .camera-button .journal-icon { width: 25px; height: 25px; margin-right: 7px; }
 .empty-icon .journal-icon { width: 68px; height: 68px; }
 .section-icon { background: #f0eaff; }
 .usage-panel, .capture-panel { background: #f5f0ff; border-color: var(--line); }
 .upload { background: #faf8ff; border-color: #bbabd4; border-radius: 20px; }
 .upload-icon { color: #70519e; background: #eee7ff; }
 .progress-track { background: #eae1fa; }
 .state-badge, .plan-badge { color: #635075; background: #f0eaff; border-color: var(--line); }
 .plan-badge.plus { color: white; background: #70519e; }
 input:focus, select:focus, textarea:focus { border-color: #9171bd; box-shadow: 0 0 0 3px #9171bd22; }
 .guide-video video { box-shadow: none; }
}
@media screen and (max-width: 680px) {
 .hero { display: flex; flex-direction: column; min-height: 0; background: #f2edff; }
 .hero-photo { position: relative; inset: auto; z-index: auto; height: 250px; object-position: right center; }
 .hero-shade { display: none; }
 .hero-copy { width: 100%; padding: 25px 22px 28px; }
 .hero h1 { font-size: clamp(2rem,8vw,3rem); }
 .quick-grid { gap: 10px; }
 .quick-card { padding: 16px; }
 .quick-card small { font-size: .76rem; }
 .brand-mark img { width: 34px; height: 34px; border-radius: 11px; }
 .card { box-shadow: 0 4px 14px #4d337109; }
}
@media (prefers-reduced-motion: reduce) {
 html { scroll-behavior: auto; }
 .button, .quick-card { transition: none; }
 .quick-card:hover { transform: none; }
}

/* Keep the supplied 3:2 pet photographs whole on narrow screens. These rules
   intentionally come after the responsive defaults above. */
@media screen and (max-width:680px) {
  .ba-grid img { height:auto !important; aspect-ratio:3 / 2; object-fit:contain !important; background:#f4f1f5; }
  .demo-comment { color:#fff; background:linear-gradient(0deg,rgba(43,31,58,.66),rgba(43,31,58,.18)),url("assets/golden-toy-poodle-hero-v1.png") center / cover no-repeat !important; }
  .demo-comment small { color:#f2eafa !important; }
  .demo-month { background:linear-gradient(0deg,rgba(43,31,58,.68),rgba(43,31,58,.08) 65%),url("assets/golden-family-hero.png") center / cover no-repeat !important; }
}
.memory-nudges { margin:18px 0; display:grid; gap:14px; }.streak-message { margin:0; font-weight:700; color:#5c4870; }.memory-reminders { display:flex; flex-wrap:wrap; gap:8px; color:#706875; font-size:.9rem; }.memory-reminders .text-button { background:#f4effa; padding:8px 10px; border-radius:10px; }.monthly-letter { display:flex; flex-wrap:wrap; align-items:center; gap:10px 16px; padding:16px; background:#f8f5fb; border-radius:14px; }.monthly-letter span { color:#6d6571; font-size:.9rem; flex:1; }

/* The monthly-album step needs a real memory, not an empty color panel. */
.demo-month { background:linear-gradient(0deg,rgba(43,31,58,.68),rgba(43,31,58,.06) 65%),url("assets/golden-family-hero.png") center / cover no-repeat; }

/* v70 public conversion pages: intentionally separate from the private app. */
.lp-body { background:#fbfafc; color:#302b36; }
.lp-nav { max-width:1180px; margin:auto; padding:18px 28px; display:flex; align-items:center; gap:28px; justify-content:space-between; }
.lp-nav nav { display:flex; gap:24px; margin-left:auto; }.lp-nav nav a,.app-back-link { color:#655b6b; text-decoration:none; font-size:.9rem; }
.lp-shell { max-width:1120px; margin:auto; padding:18px 28px 64px; }.lp-hero { min-height:560px; overflow:hidden; position:relative; display:grid; grid-template-columns:1.05fr .95fr; align-items:center; background:#eee9f8; border-radius:32px; }.lp-hero-copy { position:relative; z-index:1; padding:64px; }.lp-hero h1 { max-width:650px; font-size:clamp(2.65rem,5.1vw,4.6rem); line-height:1.1; letter-spacing:-.06em; margin:.2em 0; }.lp-hero h1 span { color:#6c5488; }.lp-hero-copy>p:not(.eyebrow) { max-width:540px; font-size:1.08rem; line-height:1.8; color:#625a68; }.lp-cta { margin-top:12px; font-size:1rem; }.lp-hero-copy small { display:block; margin-top:12px; color:#756d78; }.lp-hero-image { height:100%; }.lp-hero-image img { width:100%; height:100%; object-fit:cover; }
.lp-proof { display:grid; grid-template-columns:repeat(3,1fr); gap:1px; background:#ded9e4; margin:18px 0 110px; border:1px solid #ded9e4; border-radius:18px; overflow:hidden; }.lp-proof div { background:#fff; padding:24px 26px; display:grid; gap:4px; }.lp-proof strong { font-size:1.05rem; }.lp-proof span { color:#746c76; font-size:.88rem; }
.lp-section { margin:0 auto 120px; max-width:980px; }.lp-section>h2,.lp-final h2 { font-size:clamp(2rem,4vw,3.25rem); letter-spacing:-.055em; line-height:1.15; margin:8px 0 18px; }.steps-lead { max-width:580px; color:#6d6571; line-height:1.75; margin:0 0 32px; }.lp-steps { display:grid; grid-template-columns:repeat(3,1fr); gap:18px; }.lp-steps article { min-height:350px; background:#fff; border:1px solid #e6e0e8; border-radius:20px; padding:22px; position:relative; overflow:hidden; }.lp-steps article>span { color:#8f8198; font-size:.72rem; font-weight:700; letter-spacing:.1em; }.step-visual { width:100%; aspect-ratio:3 / 2; box-sizing:border-box; border-radius:12px; margin:14px 0 18px; overflow:hidden; }.photo-visual { background:#f4f1f5; }.photo-visual img { width:100%; height:100%; object-fit:contain; display:block; }.lp-steps h3 { margin:8px 0; }.lp-steps p { color:#706875; font-size:.9rem; line-height:1.7; }.demo-comment { background:#f0ebf8; padding:20px; font-family:serif; line-height:1.8; display:flex; flex-direction:column; justify-content:center; }.demo-comment small { display:block; margin-top:14px; font-family:system-ui,sans-serif; color:#786a85; font-size:.72rem; }.demo-month { padding:20px; background:#554568; color:white; display:flex; flex-direction:column; justify-content:flex-end; gap:8px; }.demo-month i { font-style:normal; font-size:.72rem; opacity:.75; }
.lp-before-after { text-align:center; }.ba-grid { display:grid; grid-template-columns:1fr 80px 1fr; gap:18px; align-items:center; }.ba-grid figure { margin:0; border:1px solid #e4dfe5; border-radius:18px; overflow:hidden; text-align:left; background:white; }.ba-grid img { height:330px; width:100%; object-fit:cover; display:block; }.ba-grid figcaption { padding:16px; color:#6e6672; }.ba-arrow { font-size:2rem; color:#80679d; }.memory-demo figcaption { color:#332a3d; }.memory-demo time,.memory-demo small { color:#76657f; font-size:.78rem; }.memory-demo p { font-family:serif; font-size:1.15rem; margin:12px 0; }.center-copy { line-height:1.8; color:#655c69; }
.lp-plans { text-align:center; }.lp-plans .plan-grid { text-align:left; }.lp-safety { background:#f3f0f7; padding:54px; border-radius:24px; }.safety-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:16px; }.safety-grid article { background:white; padding:22px; border-radius:14px; }.safety-grid h3 { margin:0 0 8px; }.safety-grid p,.safety-note { color:#665e6b; line-height:1.7; font-size:.9rem; }.examples { text-align:center; }.examples img { width:100%; max-height:450px; object-fit:cover; border-radius:20px; }.lp-final { text-align:center; padding:90px 30px; background:#e9e1f5; border-radius:28px; }.lp-final p { color:#62566d; margin-bottom:25px; }
@media screen and (max-width:680px) { .lp-nav { padding:14px 17px; gap:10px; }.lp-nav nav { display:none; }.lp-nav .brand { font-size:.88rem; }.lp-shell { padding:8px 14px 40px; }.lp-hero { display:flex; flex-direction:column-reverse; min-height:0; border-radius:22px; }.lp-hero-image { height:275px; width:100%; }.lp-hero-copy { padding:32px 23px; }.lp-hero h1 { font-size:2.42rem; }.lp-proof { margin:10px 0 68px; }.lp-proof div { padding:16px 10px; }.lp-proof strong { font-size:.85rem; }.lp-proof span { font-size:.7rem; }.lp-section { margin-bottom:72px; }.lp-section>h2 { margin-bottom:25px; }.lp-steps { grid-template-columns:1fr; }.lp-steps article { min-height:0; }.ba-grid { grid-template-columns:1fr; }.ba-arrow { transform:rotate(90deg); margin:-6px auto; }.ba-grid img { height:260px; }.lp-safety { padding:28px 19px; }.safety-grid { grid-template-columns:1fr; }.lp-final { padding:55px 20px; }.app-back-link { display:none; } }
