:root {
  --ink: #111210;
  --ink-soft: #1d1f1d;
  --paper: #f2f3ef;
  --paper-deep: #e7e9e3;
  --white: #fcfcfa;
  --line: #d4d7d0;
  --muted: #6d736c;
  --muted-light: #a7ada5;
  --vermilion: #e44f36;
  --jade: #176f63;
  --gold: #bd8d32;
  --blue: #425eb7;
  --danger: #bf3f35;
  --display: "Songti SC", "STSong", "Noto Serif CJK SC", serif;
  --body: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --utility: "DIN Alternate", "Avenir Next Condensed", var(--body);
  color-scheme: light;
}

* {
  box-sizing: border-box;
  letter-spacing: 0;
}

html,
body {
  width: 100%;
  min-height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  background: #d8dcd6;
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
}

button,
input,
textarea,
select {
  color: inherit;
  font: inherit;
}

button {
  border: 0;
}

button,
[role="button"] {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

img,
video {
  display: block;
  max-width: 100%;
}

.prototype-stage {
  position: relative;
  display: grid;
  min-height: 100vh;
  min-height: 100dvh;
  grid-template-rows: 58px 1fr;
}

.studio-chrome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  color: #343833;
  border-bottom: 1px solid rgba(17, 18, 16, 0.12);
  background: rgba(247, 248, 245, 0.82);
  backdrop-filter: blur(18px);
}

.studio-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 650;
}

.studio-mark {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: var(--white);
  background: var(--ink);
  border-radius: 6px;
  font-family: var(--display);
  font-size: 18px;
}

.chrome-button {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  color: #343833;
  border: 1px solid rgba(17, 18, 16, 0.15);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.6);
  cursor: pointer;
}

.chrome-button svg {
  width: 16px;
  height: 16px;
}

.device-shell {
  display: grid;
  min-height: 0;
  place-items: center;
  padding: 18px;
}

.device {
  position: relative;
  width: min(402px, calc(100vw - 30px));
  height: min(866px, calc(100dvh - 94px));
  min-height: 650px;
  overflow: hidden;
  border: 8px solid #202220;
  border-radius: 46px;
  background: var(--paper);
  box-shadow:
    0 24px 65px rgba(24, 29, 23, 0.24),
    0 3px 8px rgba(24, 29, 23, 0.18);
}

.hardware-island {
  position: absolute;
  z-index: 30;
  top: 10px;
  left: 50%;
  width: 108px;
  height: 28px;
  transform: translateX(-50%);
  border-radius: 20px;
  background: #060706;
}

.status-bar {
  position: absolute;
  z-index: 25;
  top: 0;
  left: 0;
  display: flex;
  width: 100%;
  height: 43px;
  align-items: center;
  justify-content: space-between;
  padding: 6px 19px 0;
  color: var(--ink);
  pointer-events: none;
  font-family: var(--utility);
  font-size: 12px;
  font-weight: 750;
}

.status-icons {
  display: flex;
  align-items: center;
  gap: 5px;
}

.status-icons svg {
  width: 14px;
  height: 14px;
  stroke-width: 2.3;
}

.app-viewport {
  position: relative;
  width: 100%;
  height: 100%;
}

.app-screen {
  position: relative;
  display: flex;
  width: 100%;
  height: 100%;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
  background: var(--paper);
  animation: screen-enter 260ms ease both;
}

.app-screen.is-dark {
  color: var(--white);
  background: var(--ink);
}

.screen-scroll {
  min-height: 0;
  flex: 1;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}

.screen-scroll::-webkit-scrollbar,
.horizontal-scroll::-webkit-scrollbar {
  display: none;
}

.app-header {
  z-index: 5;
  display: grid;
  min-height: 62px;
  grid-template-columns: 42px 1fr 42px;
  align-items: center;
  padding: 42px 14px 8px;
  border-bottom: 1px solid var(--line);
  background: rgba(242, 243, 239, 0.94);
  backdrop-filter: blur(16px);
}

.app-header.no-rule {
  border-bottom: 0;
}

.app-header.dark-header {
  color: var(--white);
  border-bottom-color: rgba(255, 255, 255, 0.13);
  background: rgba(17, 18, 16, 0.86);
}

.app-header-title {
  min-width: 0;
  text-align: center;
  font-size: 15px;
  font-weight: 680;
  white-space: nowrap;
}

.icon-button {
  display: inline-grid;
  width: 40px;
  height: 40px;
  place-items: center;
  padding: 0;
  color: inherit;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
}

.icon-button:active {
  background: rgba(17, 18, 16, 0.08);
}

.icon-button svg {
  width: 21px;
  height: 21px;
  stroke-width: 1.9;
}

.flow-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 10px 18px 0;
}

.flow-progress span {
  width: 22px;
  height: 3px;
  border-radius: 3px;
  background: #cfd2cc;
}

.flow-progress span.is-active {
  width: 34px;
  background: var(--vermilion);
}

.flow-progress span.is-done {
  background: var(--jade);
}

.page-pad {
  padding: 20px 18px 112px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 8px;
  color: var(--jade);
  font-family: var(--utility);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.eyebrow svg {
  width: 14px;
  height: 14px;
}

.page-title {
  margin: 0;
  font-family: var(--display);
  font-size: 30px;
  font-weight: 700;
  line-height: 1.18;
}

.page-lead {
  margin: 10px 0 22px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
}

.section-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 24px 0 11px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.section-label small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}

.field-label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.text-input {
  width: 100%;
  min-height: 48px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  caret-color: var(--vermilion);
  font-size: 16px;
}

.text-input::placeholder,
.story-textarea::placeholder {
  color: #9da29b;
}

.home-header {
  display: flex;
  min-height: 82px;
  align-items: flex-end;
  justify-content: space-between;
  padding: 42px 18px 10px;
}

.home-brand {
  display: flex;
  align-items: center;
  gap: 9px;
}

.brand-seal {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  color: var(--white);
  border-radius: 7px;
  background: var(--ink);
  font-family: var(--display);
  font-size: 18px;
  font-weight: 800;
}

.home-brand strong {
  display: block;
  font-family: var(--display);
  font-size: 18px;
}

.home-brand small {
  display: block;
  margin-top: 1px;
  color: var(--muted);
  font-family: var(--utility);
  font-size: 9px;
  font-weight: 700;
}

.quota-button {
  display: flex;
  min-height: 34px;
  align-items: center;
  gap: 6px;
  padding: 7px 9px;
  color: var(--ink);
  border: 1px solid #c7cac3;
  border-radius: 7px;
  background: transparent;
  cursor: pointer;
  font-family: var(--utility);
  font-size: 11px;
  font-weight: 750;
}

.quota-button svg {
  width: 14px;
  height: 14px;
  color: var(--gold);
}

.home-content {
  padding: 9px 18px 94px;
}

.home-intro {
  margin: 7px 0 19px;
}

.home-intro p {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 12px;
}

.home-intro h1 {
  margin: 0;
  font-family: var(--display);
  font-size: 31px;
  line-height: 1.2;
}

.mode-stack {
  display: grid;
  gap: 10px;
}

.mode-card {
  position: relative;
  display: block;
  width: 100%;
  height: 148px;
  overflow: hidden;
  padding: 0;
  color: var(--white);
  border-radius: 8px;
  background: #252824;
  cursor: pointer;
  text-align: left;
}

.mode-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 500ms ease;
}

.mode-card::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, rgba(10, 12, 10, 0.84) 0%, rgba(10, 12, 10, 0.42) 58%, rgba(10, 12, 10, 0.08) 100%);
}

.mode-card:active img {
  transform: scale(1.025);
}

.mode-copy {
  position: absolute;
  z-index: 1;
  top: 0;
  left: 0;
  display: flex;
  width: 72%;
  height: 100%;
  flex-direction: column;
  justify-content: flex-end;
  padding: 16px;
}

.mode-number {
  margin-bottom: auto;
  color: rgba(255, 255, 255, 0.66);
  font-family: var(--utility);
  font-size: 10px;
}

.mode-copy strong {
  font-family: var(--display);
  font-size: 21px;
}

.mode-copy small {
  display: block;
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.74);
  font-size: 11px;
  line-height: 1.5;
}

.mode-arrow {
  position: absolute;
  z-index: 2;
  right: 14px;
  bottom: 14px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 50%;
  background: rgba(17, 18, 16, 0.2);
  backdrop-filter: blur(8px);
}

.mode-arrow svg {
  width: 17px;
  height: 17px;
}

.home-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 22px 0 10px;
}

.home-section-title h2 {
  margin: 0;
  font-size: 14px;
}

.text-button {
  padding: 5px 0;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 11px;
}

.recent-row {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  align-items: center;
  gap: 11px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  background: transparent;
}

.recent-thumb {
  width: 56px;
  height: 68px;
  overflow: hidden;
  border-radius: 6px;
  background: var(--paper-deep);
}

.recent-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.recent-meta {
  min-width: 0;
}

.recent-meta strong {
  display: block;
  overflow: hidden;
  font-family: var(--display);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recent-meta small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
}

.recent-action {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 7px;
  background: transparent;
  cursor: pointer;
}

.recent-action svg {
  width: 15px;
  height: 15px;
}

.bottom-nav {
  position: absolute;
  z-index: 10;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  min-height: 74px;
  grid-template-columns: repeat(4, 1fr);
  padding: 8px 18px 10px;
  border-top: 1px solid rgba(17, 18, 16, 0.1);
  background: rgba(250, 250, 247, 0.94);
  backdrop-filter: blur(18px);
}

.nav-item {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 3px;
  color: #8b908a;
  border-radius: 7px;
  background: transparent;
  cursor: pointer;
  font-size: 9px;
}

.nav-item svg {
  width: 19px;
  height: 19px;
  stroke-width: 1.8;
}

.nav-item.is-active {
  color: var(--ink);
  font-weight: 700;
}

.nav-item.is-active svg {
  color: var(--vermilion);
  stroke-width: 2.2;
}

.assistant-line {
  display: grid;
  grid-template-columns: 32px 1fr;
  align-items: start;
  gap: 10px;
  margin: 20px 0 12px;
}

.ai-avatar {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  color: var(--white);
  border-radius: 7px;
  background: var(--jade);
  font-family: var(--display);
  font-size: 15px;
  font-weight: 800;
}

.assistant-line p {
  margin: 2px 0 0;
  color: #343934;
  font-size: 13px;
  line-height: 1.7;
}

.prompt-box {
  overflow: hidden;
  border: 1px solid #cdd1ca;
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 8px 24px rgba(26, 30, 25, 0.05);
}

.story-textarea {
  display: block;
  width: 100%;
  min-height: 160px;
  resize: none;
  padding: 15px;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 15px;
  line-height: 1.75;
}

.prompt-toolbar {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  padding: 7px 8px 7px 12px;
  border-top: 1px solid #e2e4df;
}

.media-tools {
  display: flex;
  align-items: center;
  gap: 2px;
}

.media-tool {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: #535852;
  border-radius: 7px;
  background: transparent;
  cursor: pointer;
}

.media-tool svg {
  width: 19px;
  height: 19px;
}

.media-tool.is-recording {
  color: var(--white);
  background: var(--vermilion);
}

.character-count {
  color: var(--muted-light);
  font-family: var(--utility);
  font-size: 10px;
}

.example-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 11px;
}

.inline-link {
  padding: 2px 0;
  color: var(--jade);
  border-bottom: 1px solid currentColor;
  background: transparent;
  cursor: pointer;
  font-size: inherit;
}

.attachment-strip {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  overflow-x: auto;
  scrollbar-width: none;
}

.attachment {
  position: relative;
  width: 62px;
  height: 76px;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 6px;
  background: var(--paper-deep);
}

.attachment img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.attachment button {
  position: absolute;
  top: 3px;
  right: 3px;
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  color: var(--white);
  border-radius: 50%;
  background: rgba(10, 11, 10, 0.72);
  cursor: pointer;
}

.attachment button svg {
  width: 12px;
  height: 12px;
}

.recording-panel {
  display: flex;
  min-height: 58px;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding: 10px 12px;
  color: var(--white);
  border-radius: 8px;
  background: var(--ink-soft);
}

.record-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--vermilion);
  animation: record-pulse 1s ease-in-out infinite;
}

.waveform {
  display: flex;
  height: 27px;
  flex: 1;
  align-items: center;
  gap: 3px;
}

.waveform span {
  width: 2px;
  height: 8px;
  border-radius: 2px;
  background: #aeb6ae;
  animation: wave 720ms ease-in-out infinite alternate;
}

.waveform span:nth-child(2n) {
  animation-delay: 140ms;
}

.waveform span:nth-child(3n) {
  animation-delay: 280ms;
}

.record-time {
  font-family: var(--utility);
  font-size: 11px;
}

.sticky-action {
  position: absolute;
  z-index: 9;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 12px 18px max(14px, env(safe-area-inset-bottom));
  border-top: 1px solid rgba(17, 18, 16, 0.09);
  background: rgba(242, 243, 239, 0.94);
  backdrop-filter: blur(18px);
}

.primary-button,
.secondary-button {
  display: inline-flex;
  width: 100%;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
}

.primary-button {
  color: var(--white);
  background: var(--ink);
}

.primary-button.accent {
  background: var(--vermilion);
}

.primary-button svg,
.secondary-button svg {
  width: 18px;
  height: 18px;
}

.primary-button:disabled {
  color: #9ba099;
  background: #dadcd7;
  cursor: default;
}

.secondary-button {
  color: var(--ink);
  border: 1px solid var(--line);
  background: var(--white);
}

.segmented {
  display: grid;
  gap: 3px;
  padding: 3px;
  border-radius: 8px;
  background: #dfe2dc;
}

.segmented.cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.segmented.cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

.segment-button {
  min-height: 38px;
  padding: 7px 8px;
  color: var(--muted);
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
}

.segment-button.is-active {
  color: var(--ink);
  background: var(--white);
  box-shadow: 0 1px 3px rgba(21, 24, 20, 0.11);
}

.age-summary {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 10px;
  margin: 18px 0 12px;
}

.age-summary strong {
  font-family: var(--utility);
  font-size: 38px;
  line-height: 1;
}

.age-summary span {
  color: var(--muted);
  font-size: 13px;
}

.age-ruler {
  position: relative;
  height: 128px;
  overflow: hidden;
  border-radius: 8px;
  background: var(--ink-soft);
}

.film-perfs {
  position: absolute;
  right: 8px;
  left: 8px;
  display: grid;
  grid-template-columns: repeat(14, 1fr);
  gap: 6px;
}

.film-perfs.is-top {
  top: 7px;
}

.film-perfs.is-bottom {
  bottom: 7px;
}

.film-perfs span {
  height: 5px;
  border-radius: 1px;
  background: rgba(250, 250, 247, 0.48);
}

.ruler-track {
  position: absolute;
  top: 57px;
  right: 22px;
  left: 22px;
  height: 3px;
  border-radius: 3px;
  background: #696e68;
}

.ruler-range {
  position: absolute;
  top: 0;
  height: 100%;
  border-radius: 3px;
  background: var(--vermilion);
}

.age-range-input {
  position: absolute;
  z-index: 4;
  top: 45px;
  left: 18px;
  width: calc(100% - 36px);
  height: 26px;
  margin: 0;
  pointer-events: none;
  appearance: none;
  background: transparent;
}

.age-range-input::-webkit-slider-thumb {
  width: 20px;
  height: 20px;
  pointer-events: auto;
  border: 4px solid var(--white);
  border-radius: 50%;
  background: var(--vermilion);
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.38);
  appearance: none;
}

.age-range-input::-moz-range-thumb {
  width: 13px;
  height: 13px;
  pointer-events: auto;
  border: 4px solid var(--white);
  border-radius: 50%;
  background: var(--vermilion);
}

.age-ticks {
  position: absolute;
  right: 20px;
  bottom: 23px;
  left: 20px;
  display: flex;
  justify-content: space-between;
  color: #aeb3ad;
  font-family: var(--utility);
  font-size: 9px;
}

.age-anchor {
  position: absolute;
  z-index: 3;
  top: 76px;
  display: grid;
  width: 28px;
  height: 36px;
  transform: translateX(-50%);
  place-items: center;
  overflow: hidden;
  border: 2px solid var(--white);
  border-radius: 4px;
  background: #3b3e3a;
  box-shadow: 0 2px 7px rgba(0, 0, 0, 0.28);
}

.age-anchor img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-age-row {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 9px;
  margin-top: 10px;
}

.age-number-field {
  display: flex;
  min-height: 46px;
  align-items: center;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.age-number-field input {
  min-width: 0;
  width: 42px;
  border: 0;
  outline: 0;
  background: transparent;
  font-family: var(--utility);
  font-size: 14px;
}

.age-number-field span {
  color: var(--muted);
  font-size: 11px;
}

.upload-photo-button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px dashed #aeb3ac;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  font-size: 12px;
  font-weight: 650;
}

.upload-photo-button svg {
  width: 17px;
  height: 17px;
}

.photo-strip {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  overflow-x: auto;
  scrollbar-width: none;
}

.life-photo {
  position: relative;
  width: 70px;
  height: 88px;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 6px;
  background: var(--paper-deep);
}

.life-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.life-photo span {
  position: absolute;
  right: 3px;
  bottom: 3px;
  padding: 3px 5px;
  color: var(--white);
  border-radius: 4px;
  background: rgba(10, 11, 10, 0.72);
  font-family: var(--utility);
  font-size: 9px;
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.choice-chip {
  min-height: 36px;
  padding: 8px 12px;
  color: #555b54;
  border: 1px solid #cdd0ca;
  border-radius: 20px;
  background: var(--white);
  cursor: pointer;
  font-size: 12px;
}

.choice-chip.is-active {
  color: #105a51;
  border-color: #5a988f;
  background: #e2f0ec;
  font-weight: 700;
}

.analysis-hero {
  padding: 22px 18px 18px;
  border-bottom: 1px solid var(--line);
}

.analysis-hero .ai-avatar {
  margin-bottom: 14px;
}

.analysis-hero h1 {
  margin: 0;
  font-family: var(--display);
  font-size: 25px;
  line-height: 1.32;
}

.analysis-hero p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.analysis-content {
  padding: 4px 18px 112px;
}

.insight-line {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 10px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.insight-line span {
  color: var(--muted);
  font-size: 11px;
}

.insight-line strong {
  font-size: 12px;
  font-weight: 650;
  line-height: 1.55;
}

.question-block {
  padding: 20px 0 3px;
}

.question-index {
  color: var(--vermilion);
  font-family: var(--utility);
  font-size: 10px;
  font-weight: 800;
}

.question-block h2 {
  margin: 5px 0 12px;
  font-family: var(--display);
  font-size: 18px;
  line-height: 1.45;
}

.review-scroll {
  padding-bottom: 112px;
}

.review-hero {
  position: relative;
  height: 238px;
  overflow: hidden;
  background: var(--ink-soft);
}

.review-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.review-hero::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(0deg, rgba(10, 11, 10, 0.84) 0%, rgba(10, 11, 10, 0.08) 68%);
}

.review-hero-copy {
  position: absolute;
  z-index: 2;
  right: 18px;
  bottom: 17px;
  left: 18px;
  color: var(--white);
}

.review-hero-copy small {
  color: rgba(255, 255, 255, 0.7);
  font-family: var(--utility);
  font-size: 10px;
}

.review-title-input {
  display: block;
  width: 100%;
  margin-top: 3px;
  padding: 0;
  color: var(--white);
  border: 0;
  outline: 0;
  background: transparent;
  font-family: var(--display);
  font-size: 25px;
  font-weight: 700;
}

.review-body {
  padding: 18px;
}

.review-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 11px;
}

.review-heading h2 {
  margin: 0;
  font-size: 14px;
}

.review-heading small {
  color: var(--muted);
  font-size: 10px;
}

.scene-strip {
  display: flex;
  gap: 8px;
  margin-right: -18px;
  padding-right: 18px;
  overflow-x: auto;
  scrollbar-width: none;
}

.scene-card {
  position: relative;
  width: 80px;
  height: 125px;
  flex: 0 0 auto;
  overflow: hidden;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 6px;
  background: var(--paper-deep);
  cursor: pointer;
}

.scene-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.scene-card::after {
  position: absolute;
  inset: 58% 0 0;
  content: "";
  background: linear-gradient(0deg, rgba(7, 8, 7, 0.78), transparent);
}

.scene-card span {
  position: absolute;
  z-index: 1;
  right: 6px;
  bottom: 6px;
  left: 6px;
  color: var(--white);
  font-family: var(--utility);
  font-size: 9px;
  text-align: left;
}

.scene-card.is-active {
  border-color: var(--vermilion);
}

.scene-editor {
  display: grid;
  grid-template-columns: 30px 1fr 30px;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.scene-number {
  color: var(--vermilion);
  font-family: var(--utility);
  font-size: 11px;
  font-weight: 800;
}

.scene-editor p {
  margin: 0;
  font-size: 11px;
  line-height: 1.55;
}

.scene-editor button {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
}

.scene-editor svg {
  width: 15px;
  height: 15px;
}

.settings-block {
  margin-top: 22px;
}

.setting-row {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.setting-row-label strong {
  display: block;
  font-size: 12px;
}

.setting-row-label small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.toggle {
  position: relative;
  width: 44px;
  height: 26px;
  padding: 0;
  border-radius: 14px;
  background: #cbd0c9;
  cursor: pointer;
  transition: background 180ms ease;
}

.toggle::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0 1px 4px rgba(12, 15, 12, 0.22);
  content: "";
  transition: transform 180ms ease;
}

.toggle.is-on {
  background: var(--jade);
}

.toggle.is-on::after {
  transform: translateX(18px);
}

.generation-screen {
  isolation: isolate;
}

.generation-bg {
  position: absolute;
  z-index: -2;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.38;
  transition: opacity 350ms ease;
}

.generation-screen::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  background: rgba(10, 11, 10, 0.64);
}

.generation-main {
  display: flex;
  min-height: 0;
  flex: 1;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 14px 28px 28px;
  text-align: center;
}

.progress-ring {
  position: relative;
  width: 142px;
  height: 142px;
}

.progress-ring svg {
  width: 142px;
  height: 142px;
  transform: rotate(-90deg);
}

.progress-ring circle {
  fill: none;
  stroke-width: 6;
}

.progress-ring .ring-track {
  stroke: rgba(255, 255, 255, 0.2);
}

.progress-ring .ring-value {
  stroke: var(--vermilion);
  stroke-linecap: round;
  stroke-dasharray: 377;
  stroke-dashoffset: 377;
  transition: stroke-dashoffset 220ms linear;
}

.progress-number {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--utility);
  font-size: 34px;
  font-weight: 700;
}

.progress-number small {
  margin-left: 2px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
}

.generation-main h1 {
  margin: 22px 0 8px;
  font-family: var(--display);
  font-size: 24px;
}

.generation-main > p {
  min-height: 44px;
  margin: 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
  line-height: 1.65;
}

.generation-stages {
  width: 100%;
  margin-top: 30px;
  text-align: left;
}

.generation-stage {
  display: grid;
  min-height: 40px;
  grid-template-columns: 20px 1fr auto;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.42);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 11px;
}

.generation-stage svg {
  width: 15px;
  height: 15px;
}

.generation-stage.is-done {
  color: rgba(255, 255, 255, 0.72);
}

.generation-stage.is-current {
  color: var(--white);
  font-weight: 700;
}

.generation-stage.is-current svg {
  color: var(--vermilion);
}

.generation-stage time {
  font-family: var(--utility);
  font-size: 9px;
}

.result-screen {
  background: #080908;
}

.result-video-wrap {
  position: relative;
  min-height: 0;
  flex: 1;
  overflow: hidden;
}

.result-video-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(7, 8, 7, 0.68) 0%, transparent 35%, rgba(7, 8, 7, 0.34) 100%);
  pointer-events: none;
}

.result-top {
  position: absolute;
  z-index: 3;
  top: 0;
  right: 0;
  left: 0;
  display: grid;
  min-height: 82px;
  grid-template-columns: 42px 1fr 42px;
  align-items: end;
  padding: 38px 13px 5px;
  color: var(--white);
}

.result-top strong {
  text-align: center;
  font-size: 13px;
}

.play-button {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: 50%;
  display: grid;
  width: 58px;
  height: 58px;
  transform: translate(-50%, -50%);
  place-items: center;
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 50%;
  background: rgba(10, 11, 10, 0.34);
  backdrop-filter: blur(10px);
  cursor: pointer;
}

.play-button svg {
  width: 24px;
  height: 24px;
}

.result-caption {
  position: absolute;
  z-index: 2;
  right: 18px;
  bottom: 16px;
  left: 18px;
  color: var(--white);
}

.result-caption h1 {
  margin: 0;
  font-family: var(--display);
  font-size: 23px;
}

.result-caption p {
  margin: 6px 0 0;
  color: rgba(255, 255, 255, 0.7);
  font-family: var(--utility);
  font-size: 10px;
}

.result-actions {
  display: grid;
  grid-template-columns: 1fr 52px 52px;
  gap: 8px;
  padding: 12px 14px max(14px, env(safe-area-inset-bottom));
  background: var(--paper);
}

.result-actions .primary-button {
  min-height: 48px;
}

.square-action {
  display: grid;
  width: 52px;
  height: 48px;
  place-items: center;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  cursor: pointer;
}

.square-action svg {
  width: 19px;
  height: 19px;
}

.library-content {
  padding: 8px 18px 98px;
}

.library-title {
  margin: 18px 0 16px;
  font-family: var(--display);
  font-size: 29px;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 10px;
}

.project-card {
  padding: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.project-cover {
  position: relative;
  aspect-ratio: 9 / 12;
  overflow: hidden;
  border-radius: 7px;
  background: var(--paper-deep);
}

.project-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-duration {
  position: absolute;
  right: 5px;
  bottom: 5px;
  padding: 3px 5px;
  color: var(--white);
  border-radius: 4px;
  background: rgba(8, 9, 8, 0.7);
  font-family: var(--utility);
  font-size: 9px;
}

.project-card strong {
  display: block;
  margin-top: 7px;
  overflow: hidden;
  font-family: var(--display);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-card small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.profile-content {
  padding: 16px 18px 100px;
}

.profile-identity {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0 20px;
}

.profile-avatar {
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  color: var(--white);
  border-radius: 50%;
  background: var(--jade);
  font-family: var(--display);
  font-size: 20px;
}

.profile-identity strong {
  display: block;
  font-size: 15px;
}

.profile-identity small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}

.plan-panel {
  padding: 17px;
  color: var(--white);
  border-radius: 8px;
  background: var(--ink-soft);
}

.plan-panel-top {
  display: flex;
  align-items: start;
  justify-content: space-between;
}

.plan-panel h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 20px;
}

.plan-panel p {
  margin: 7px 0 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 10px;
}

.plan-badge {
  padding: 4px 6px;
  color: #2f2615;
  border-radius: 5px;
  background: #d6ad5c;
  font-family: var(--utility);
  font-size: 9px;
  font-weight: 800;
}

.quota-meter {
  height: 5px;
  margin: 18px 0 7px;
  overflow: hidden;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.15);
}

.quota-meter span {
  display: block;
  width: 40%;
  height: 100%;
  background: var(--vermilion);
}

.profile-menu {
  margin-top: 18px;
  border-top: 1px solid var(--line);
}

.profile-menu button {
  display: grid;
  width: 100%;
  min-height: 54px;
  grid-template-columns: 24px 1fr 20px;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  background: transparent;
  cursor: pointer;
  text-align: left;
  font-size: 12px;
}

.profile-menu svg {
  width: 17px;
  height: 17px;
}

.profile-menu button svg:last-child {
  color: var(--muted-light);
}

.toast {
  position: absolute;
  z-index: 100;
  right: 18px;
  bottom: 88px;
  left: 18px;
  display: flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  transform: translateY(18px);
  color: var(--white);
  border-radius: 7px;
  background: rgba(17, 18, 16, 0.94);
  box-shadow: 0 12px 30px rgba(15, 18, 14, 0.22);
  opacity: 0;
  pointer-events: none;
  font-size: 12px;
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  transform: translateY(0);
  opacity: 1;
}

.horizontal-scroll {
  overflow-x: auto;
  scrollbar-width: none;
}

.horizontal-scroll::-webkit-scrollbar {
  display: none;
}

.life-builder-pad {
  padding-top: 18px;
}

.person-rail {
  display: flex;
  gap: 12px;
  margin: 2px -18px 4px;
  padding: 2px 18px 10px;
}

.person-option {
  display: flex;
  width: 62px;
  flex: 0 0 62px;
  align-items: center;
  flex-direction: column;
  gap: 6px;
  padding: 0;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 10px;
}

.person-option-avatar {
  position: relative;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 50%;
  background: var(--paper-deep);
}

.person-option-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.person-option-avatar svg {
  width: 19px;
  height: 19px;
}

.person-option.is-active {
  color: var(--ink);
  font-weight: 700;
}

.person-option.is-active .person-option-avatar {
  border-color: var(--vermilion);
  box-shadow: 0 0 0 3px var(--paper), 0 0 0 4px rgba(228, 79, 54, 0.28);
}

.person-option.is-active .person-option-avatar::after {
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 12px;
  height: 12px;
  border: 2px solid var(--paper);
  border-radius: 50%;
  background: var(--vermilion);
  content: "";
}

.person-option-add .person-option-avatar {
  border: 1px dashed #9da39b;
  background: transparent;
}

.selected-person-line {
  display: grid;
  min-height: 66px;
  grid-template-columns: 44px 1fr 38px;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.selected-person-line > img {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  object-fit: cover;
}

.selected-person-line strong,
.selected-person-line span {
  display: block;
}

.selected-person-line strong {
  font-family: var(--display);
  font-size: 15px;
}

.selected-person-line span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}

.selected-person-line button {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: var(--jade);
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--white);
  cursor: pointer;
}

.selected-person-line button svg {
  width: 17px;
  height: 17px;
}

.life-timeline {
  position: relative;
  margin-top: 2px;
}

.life-timeline::before {
  position: absolute;
  top: 20px;
  bottom: 24px;
  left: 45px;
  width: 1px;
  background: #bcc1ba;
  content: "";
}

.life-timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 24px;
  padding: 11px 0 17px;
  transition: opacity 180ms ease;
}

.life-timeline-item.is-outside {
  opacity: 0.35;
}

.life-timeline-dot {
  position: absolute;
  z-index: 2;
  top: 19px;
  left: 41px;
  width: 9px;
  height: 9px;
  border: 2px solid var(--paper);
  border-radius: 50%;
  background: #969c95;
  box-shadow: 0 0 0 1px #969c95;
}

.life-timeline-item.is-in-range .life-timeline-dot {
  background: var(--vermilion);
  box-shadow: 0 0 0 1px var(--vermilion);
}

.life-timeline-time {
  padding-top: 1px;
  text-align: right;
}

.life-timeline-time strong {
  font-family: var(--utility);
  font-size: 18px;
}

.life-timeline-time > span {
  margin-left: 1px;
  color: var(--muted);
  font-size: 9px;
}

.life-timeline-time small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 8px;
  white-space: nowrap;
}

.life-timeline-story {
  min-width: 0;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--line);
}

.life-event-heading {
  display: flex;
  align-items: center;
  gap: 7px;
}

.life-event-heading strong {
  min-width: 0;
  overflow: hidden;
  font-family: var(--display);
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.life-event-heading span {
  flex: 0 0 auto;
  padding: 3px 5px;
  color: #105a51;
  border-radius: 4px;
  background: #dcebe7;
  font-size: 8px;
}

.life-timeline-story p {
  display: -webkit-box;
  margin: 6px 0 8px;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.life-event-photos {
  display: flex;
  height: 46px;
  align-items: center;
  gap: 5px;
  padding-bottom: 8px;
}

.life-event-photos img,
.life-event-photos button {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 5px;
}

.life-event-photos img {
  object-fit: cover;
}

.life-event-photos button {
  display: grid;
  place-items: center;
  color: var(--muted);
  border: 1px dashed #aeb3ac;
  background: transparent;
  cursor: pointer;
}

.life-event-photos button svg {
  width: 14px;
  height: 14px;
}

.timeline-empty {
  display: flex;
  min-height: 210px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 24px;
  color: var(--muted);
  border: 1px dashed #b8bdb6;
  border-radius: 8px;
  text-align: center;
}

.timeline-empty > svg {
  width: 26px;
  height: 26px;
  margin-bottom: 12px;
}

.timeline-empty strong {
  color: var(--ink);
  font-size: 13px;
}

.timeline-empty p {
  max-width: 240px;
  margin: 7px 0 14px;
  font-size: 10px;
  line-height: 1.6;
}

.timeline-empty button {
  min-height: 36px;
  padding: 7px 12px;
  color: var(--white);
  border-radius: 7px;
  background: var(--ink);
  cursor: pointer;
  font-size: 11px;
}

.memory-seal {
  background: var(--jade);
}

.memory-content {
  padding: 7px 18px 98px;
}

.memory-intro {
  margin: 16px 0 18px;
}

.memory-intro p {
  margin: 0 0 5px;
  color: var(--muted);
  font-family: var(--utility);
  font-size: 10px;
}

.memory-intro h1 {
  margin: 0;
  max-width: 310px;
  font-family: var(--display);
  font-size: 27px;
  line-height: 1.3;
}

.memory-person-filter {
  display: flex;
  gap: 8px;
  margin: 0 -18px;
  padding: 2px 18px 11px;
}

.memory-person-chip {
  display: inline-flex;
  min-width: 66px;
  height: 38px;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  padding: 4px 9px 4px 5px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 19px;
  background: var(--white);
  cursor: pointer;
  font-size: 10px;
}

.memory-person-chip img,
.all-people-icon {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  place-items: center;
  border-radius: 50%;
  object-fit: cover;
  background: var(--paper-deep);
}

.all-people-icon svg {
  width: 14px;
  height: 14px;
}

.memory-person-chip.is-active {
  color: var(--white);
  border-color: var(--ink);
  background: var(--ink);
  font-weight: 700;
}

.memory-toolbar {
  display: grid;
  grid-template-columns: 1fr 42px;
  align-items: center;
  gap: 8px;
  margin: 5px 0 18px;
}

.memory-fold-button {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  cursor: pointer;
}

.memory-fold-button svg {
  width: 17px;
  height: 17px;
}

.memory-timeline {
  position: relative;
  padding-left: 15px;
}

.memory-timeline::before {
  position: absolute;
  top: 16px;
  bottom: 24px;
  left: 4px;
  width: 1px;
  background: #bfc4bd;
  content: "";
}

.memory-event {
  position: relative;
  margin-bottom: 9px;
  border-bottom: 1px solid var(--line);
}

.memory-line-dot {
  position: absolute;
  z-index: 2;
  top: 19px;
  left: -15px;
  width: 9px;
  height: 9px;
  border: 2px solid var(--paper);
  border-radius: 50%;
  background: var(--jade);
  box-shadow: 0 0 0 1px var(--jade);
}

.memory-event-head {
  display: grid;
  width: 100%;
  min-height: 56px;
  grid-template-columns: 74px 1fr 30px;
  align-items: center;
  gap: 7px;
  padding: 6px 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.memory-date {
  color: var(--vermilion);
  font-family: var(--utility);
  font-size: 10px;
  font-weight: 800;
}

.memory-head-copy {
  min-width: 0;
}

.memory-head-copy strong,
.memory-head-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.memory-head-copy strong {
  font-family: var(--display);
  font-size: 15px;
}

.memory-head-copy small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.memory-head-icon {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  color: var(--muted);
}

.memory-head-icon svg {
  width: 15px;
  height: 15px;
}

.memory-event-body {
  padding: 1px 0 13px 81px;
  animation: memory-unfold 220ms ease both;
}

.memory-event-body > p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.65;
}

.memory-photo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}

.memory-photo-grid figure,
.memory-add-photo {
  position: relative;
  aspect-ratio: 3 / 4;
  min-width: 0;
  overflow: hidden;
  margin: 0;
  border-radius: 5px;
  background: var(--paper-deep);
}

.memory-photo-grid figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.memory-photo-grid figcaption {
  position: absolute;
  right: 3px;
  bottom: 3px;
  left: 3px;
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: 2px;
}

.memory-photo-grid figcaption span,
.memory-photo-grid figcaption em {
  max-width: 100%;
  overflow: hidden;
  padding: 2px 4px;
  color: var(--white);
  border-radius: 3px;
  background: rgba(10, 11, 10, 0.74);
  font-size: 7px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.memory-photo-grid figcaption em {
  background: rgba(23, 111, 99, 0.9);
}

.memory-add-photo {
  display: grid;
  place-items: center;
  color: var(--muted);
  border: 1px dashed #aeb3ac;
  background: transparent;
  cursor: pointer;
}

.memory-add-photo svg {
  width: 18px;
  height: 18px;
}

.memory-event-footer {
  display: flex;
  min-height: 34px;
  align-items: center;
  justify-content: space-between;
  margin-top: 7px;
}

.memory-event-footer > span,
.memory-event-footer button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 9px;
}

.memory-event-footer > span img {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  object-fit: cover;
}

.memory-event-footer button {
  padding: 5px;
  background: transparent;
  cursor: pointer;
}

.memory-event-footer button svg {
  width: 12px;
  height: 12px;
}

.memory-peek {
  display: flex;
  height: 35px;
  align-items: center;
  padding: 0 0 8px 81px;
}

.memory-peek img {
  width: 27px;
  height: 27px;
  margin-left: -5px;
  border: 2px solid var(--paper);
  border-radius: 4px;
  object-fit: cover;
}

.memory-peek img:first-child {
  margin-left: 0;
}

.memory-peek span {
  margin-left: 7px;
  color: var(--muted);
  font-size: 8px;
}

.sheet-backdrop {
  position: absolute;
  z-index: 90;
  inset: 0;
  display: flex;
  align-items: flex-end;
  background: rgba(11, 13, 11, 0.48);
  backdrop-filter: blur(3px);
  animation: backdrop-in 180ms ease both;
}

.bottom-sheet {
  width: 100%;
  max-height: 88%;
  overflow-y: auto;
  padding: 11px 18px max(18px, env(safe-area-inset-bottom));
  border-radius: 16px 16px 0 0;
  background: var(--paper);
  box-shadow: 0 -16px 50px rgba(8, 10, 8, 0.2);
  animation: sheet-rise 240ms ease both;
}

.sheet-handle {
  display: block;
  width: 36px;
  height: 4px;
  margin: 0 auto 7px;
  border-radius: 4px;
  background: #bdc1bb;
}

.sheet-header {
  display: flex;
  min-height: 56px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.sheet-header small {
  color: var(--jade);
  font-family: var(--utility);
  font-size: 9px;
  font-weight: 800;
}

.sheet-header h2 {
  margin: 2px 0 0;
  font-family: var(--display);
  font-size: 22px;
}

.sheet-field-gap {
  margin-top: 15px;
}

.sheet-primary {
  margin-top: 18px;
}

.sheet-person-row {
  display: flex;
  gap: 7px;
  margin: 0 -18px 12px;
  padding: 0 18px 4px;
}

.sheet-person {
  display: inline-flex;
  min-width: 78px;
  height: 38px;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  padding: 4px 8px 4px 4px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 19px;
  background: var(--white);
  cursor: pointer;
  font-size: 10px;
}

.sheet-person img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}

.sheet-person.is-active {
  color: var(--white);
  border-color: var(--jade);
  background: var(--jade);
  font-weight: 700;
}

.memory-form-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  gap: 9px;
}

.memory-age-input {
  display: flex;
  min-height: 48px;
  align-items: center;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.memory-age-input input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  font-family: var(--utility);
  font-size: 15px;
}

.memory-age-input em {
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
}

.memory-upload-zone {
  display: flex;
  width: 100%;
  min-height: 112px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  margin-top: 14px;
  padding: 12px;
  color: var(--muted);
  border: 1px dashed #a9afa7;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.38);
  cursor: pointer;
}

.memory-upload-zone > svg {
  width: 22px;
  height: 22px;
}

.memory-upload-zone strong {
  color: var(--ink);
  font-size: 12px;
}

.memory-upload-zone span {
  max-width: 250px;
  font-size: 9px;
  line-height: 1.5;
  text-align: center;
}

.memory-upload-zone.has-image {
  position: relative;
  display: block;
  height: 150px;
  overflow: hidden;
  padding: 0;
  border-style: solid;
}

.memory-upload-zone.has-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.memory-upload-zone.has-image span {
  position: absolute;
  right: 7px;
  bottom: 7px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 7px;
  color: var(--white);
  border-radius: 5px;
  background: rgba(10, 11, 10, 0.75);
}

.memory-upload-zone.has-image span svg {
  width: 12px;
  height: 12px;
}

@keyframes memory-unfold {
  from {
    transform: translateY(-4px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes backdrop-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes sheet-rise {
  from { transform: translateY(28px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes screen-enter {
  from {
    transform: translateY(5px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes record-pulse {
  50% {
    opacity: 0.35;
  }
}

@keyframes wave {
  from {
    height: 6px;
  }
  to {
    height: 24px;
  }
}

@media (max-width: 600px) {
  .prototype-stage {
    display: block;
  }

  .studio-chrome {
    display: none;
  }

  .device-shell {
    display: block;
    padding: 0;
  }

  .device {
    width: 100vw;
    height: 100dvh;
    min-height: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
}

@media (max-height: 720px) and (min-width: 601px) {
  .device {
    min-height: 610px;
  }

  .mode-card {
    height: 130px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
