html,
body {
  width: 100%;
  height: 100%;
  height: 100dvh;
  overflow: hidden;
}

body {
  display: block;
  min-height: 0;
  padding: 0;
  background: #f7f3f0;
}

body::before {
  display: none;
}

#onlyus-prototype {
  width: 100%;
  height: 100%;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

#onlyus-prototype input,
#onlyus-prototype textarea,
#onlyus-prototype select,
#onlyus-prototype [contenteditable="true"] {
  -webkit-user-select: text;
  user-select: text;
  -webkit-touch-callout: default;
}

/* Romantic visual direction: warm coral balanced with lilac and mint accents. */
#onlyus-prototype {
  --background: #f6f3f7;
  --foreground: #342e35;
  --card: #fffdfd;
  --card-foreground: #342e35;
  --secondary: #f0e8f0;
  --secondary-foreground: #403640;
  --muted: #e9e2eb;
  --muted-foreground: #766b78;
  --primary: #c96372;
  --primary-foreground: #fff9fa;
  --border: #dfd3df;
  --input: #d8cad9;
  --viz-series-1: #d77a86;
  --viz-series-2: #c89b52;
  --viz-series-3: #72a08d;
  --viz-series-4: #8e82b5;
  --viz-series-5: #5d9ba1;
  --viz-series-6: #b47799;
}

#onlyus-prototype .shell,
#onlyus-prototype .topbar {
  background-color: var(--background);
}

#onlyus-prototype .content {
  position: relative;
  isolation: isolate;
  background-color: var(--background);
  background-image:
    linear-gradient(115deg, transparent 0 49%, rgba(142, 130, 181, 0.035) 49.2% 49.5%, transparent 49.7%),
    linear-gradient(25deg, transparent 0 49%, rgba(201, 99, 114, 0.028) 49.2% 49.5%, transparent 49.7%);
  background-size: 34px 34px, 42px 42px;
}

#onlyus-prototype .topbar {
  border-bottom-color: #e5dbe5;
}

#onlyus-prototype .page[data-page="home"] .hero {
  position: relative;
  overflow: hidden;
  border-color: #e1d3df;
  background:
    linear-gradient(135deg, rgba(238, 225, 243, 0.78), rgba(255, 253, 253, 0.82) 56%),
    var(--card);
  box-shadow: 0 7px 18px rgba(112, 82, 111, 0.06);
}

#onlyus-prototype .page[data-page="home"] .hero::after {
  content: "♡  ·  ✦";
  position: absolute;
  top: 13px;
  right: 17px;
  color: rgba(201, 99, 114, 0.38);
  font-size: 15px;
  letter-spacing: 3px;
  pointer-events: none;
  animation: ou-heart-drift 5.2s ease-in-out infinite;
}

#onlyus-prototype .pill {
  border-color: #e4d7e4;
  background: rgba(255, 253, 253, 0.82);
}

#onlyus-prototype .page[data-page="home"] .hero > p {
  background: #f8edf2;
  color: #715d68;
}

#onlyus-prototype .page[data-page="home"] > .section {
  border-top-color: #e4d7e2;
}

#onlyus-prototype .page[data-page="home"] .grid-two > *,
#onlyus-prototype .page[data-page="home"] .home-plan-card {
  border-color: #e3d7e2;
  box-shadow: 0 4px 12px rgba(112, 82, 111, 0.045);
}

#onlyus-prototype .page[data-page="home"] .grid-two > *:first-child::after,
#onlyus-prototype .page[data-page="home"] .grid-two > *:last-child::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  opacity: 0.58;
  pointer-events: none;
}

#onlyus-prototype .page[data-page="home"] .grid-two > *:first-child {
  position: relative;
}

#onlyus-prototype .page[data-page="home"] .grid-two > *:first-child::after {
  top: 9px;
  right: 10px;
  background: #d9a45a;
}

#onlyus-prototype .page[data-page="home"] .grid-two > *:last-child {
  position: relative;
}

#onlyus-prototype .page[data-page="home"] .grid-two > *:last-child::after {
  top: 9px;
  right: 10px;
  background: #80aa96;
}

#onlyus-prototype .memo-card,
#onlyus-prototype .dish-row,
#onlyus-prototype .date-card,
#onlyus-prototype .period-card,
#onlyus-prototype .memory-card {
  border-color: #e1d6e1;
  box-shadow: 0 3px 10px rgba(112, 82, 111, 0.035);
}

#onlyus-prototype .memo-countdown,
#onlyus-prototype .memo-meta-state {
  background: #f5e9ef;
  border-color: #e4d3df;
}

#onlyus-prototype .bottom-nav {
  background: rgba(255, 253, 253, 0.96);
  border-top-color: #e2d8e2;
  box-shadow: 0 -5px 16px rgba(112, 82, 111, 0.055);
}

#onlyus-prototype .bottom-nav .nav-btn.is-active {
  color: #c45c6e;
}

#onlyus-prototype .home-menu-badge,
#onlyus-prototype .category-badge {
  box-shadow: 0 0 0 3px rgba(255, 253, 253, 0.82);
}

@keyframes ou-heart-drift {
  0%, 100% { transform: translateY(0) rotate(-3deg); opacity: 0.7; }
  50% { transform: translateY(-3px) rotate(3deg); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  #onlyus-prototype .page[data-page="home"] .hero::after {
    animation: none;
  }
}

#onlyus-prototype img {
  -webkit-user-drag: none;
  user-drag: none;
}

#onlyus-prototype button,
#onlyus-prototype [role="button"] {
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  touch-action: manipulation;
}

#onlyus-prototype button:focus:not(:focus-visible),
#onlyus-prototype [role="button"]:focus:not(:focus-visible) {
  outline: none;
}

#onlyus-prototype button:focus-visible,
#onlyus-prototype [role="button"]:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--primary) 58%, transparent);
  outline-offset: 2px;
}

/* Short tactile feedback without the dark native tap flash. */
#onlyus-prototype button:not(.nav-btn):not(.memory-drag-handle):not(.mobile-date-panel button):not(.menu-owner > button):not(.memo-view-switch > button):not(.anniversary-filter-switch > button):not(.basket-switch > button):not(.order-time-switch > button) {
  transition-property: transform, color, background-color, border-color, box-shadow, opacity;
  transition-duration: 130ms;
  transition-timing-function: ease-out;
}

#onlyus-prototype button:not(:disabled):not(.nav-btn):not(.memory-drag-handle):not(.mobile-date-panel button):not(.menu-owner > button):not(.memo-view-switch > button):not(.anniversary-filter-switch > button):not(.basket-switch > button):not(.order-time-switch > button):active {
  transform: scale(0.97);
}

#onlyus-prototype .order-basket-fab:active {
  transform: scale(0.93);
}

/* Category selection changes immediately; only the finger press remains tactile. */
#onlyus-prototype .category-btn {
  transition: transform 90ms ease-out !important;
}

/* Modal surfaces settle upward; the order basket grows from the shopping bag. */
#onlyus-prototype .modal-backdrop {
  box-sizing: border-box;
  background: color-mix(in srgb, var(--foreground) 32%, transparent);
}

#onlyus-prototype .modal-sheet {
  box-sizing: border-box;
  min-height: 0;
  border: 2px solid color-mix(in srgb, var(--primary) 24%, var(--border));
  box-shadow:
    0 12px 32px color-mix(in srgb, var(--foreground) 13%, transparent),
    0 2px 8px color-mix(in srgb, var(--foreground) 8%, transparent);
}

#onlyus-prototype .modal-head > strong {
  font-size: 17px;
  font-weight: 650;
  line-height: 1.3;
}

#onlyus-prototype #period-record-card .modal-head,
#onlyus-prototype #period-setup-form .modal-head,
#onlyus-prototype #order-form .modal-head,
#onlyus-prototype #learn-form .modal-head,
#onlyus-prototype #add-form .modal-head,
#onlyus-prototype #duplicate-confirm .modal-head,
#onlyus-prototype #delete-dish-confirm .modal-head,
#onlyus-prototype #photo-viewer .modal-head {
  justify-content: center;
  text-align: center;
}

#onlyus-prototype #memo-form .modal-head:has(.icon-inline-btn[hidden]),
#onlyus-prototype #anniversary-form .modal-head:has(.icon-inline-btn[hidden]),
#onlyus-prototype #memory-form .modal-head:has(.icon-inline-btn[hidden]) {
  justify-content: center;
  text-align: center;
}

#onlyus-prototype label > .mobile-select {
  width: 100%;
  justify-self: start;
}

#onlyus-prototype .modal-sheet label,
#onlyus-prototype .modal-sheet input,
#onlyus-prototype .modal-sheet textarea,
#onlyus-prototype .modal-sheet .mobile-select,
#onlyus-prototype .modal-sheet .number-stepper {
  min-width: 0;
  max-width: 100%;
}

#onlyus-prototype .anniversary-form-grid,
#onlyus-prototype .memo-form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

#onlyus-prototype .anniversary-form-grid > label,
#onlyus-prototype .memo-form-grid > label {
  min-width: 0;
}

#onlyus-prototype .memo-location-field > input {
  width: 100%;
}

#onlyus-prototype .memo-location-field > .memo-location-suggestions {
  width: 100%;
}

#onlyus-prototype .modal-sheet input:not([type="file"]),
#onlyus-prototype .mobile-select-button,
#onlyus-prototype .mobile-date-button {
  height: 40px;
  min-height: 40px;
  padding: 0 10px 0 12px;
  border: 1px solid color-mix(in srgb, var(--foreground) 18%, var(--input));
  border-radius: 8px;
  background: var(--secondary);
  color: var(--foreground);
  font-size: 14px;
  line-height: 1;
}

#onlyus-prototype .mobile-date {
  position: relative;
  width: 100%;
  min-width: 0;
}

#onlyus-prototype .mobile-date-native {
  display: none !important;
}

#onlyus-prototype .mobile-date-button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  text-align: left;
}

#onlyus-prototype .mobile-date-value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#onlyus-prototype .mobile-date-button svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  color: var(--muted-foreground);
}

#onlyus-prototype .mobile-date-panel {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  left: 0;
  width: min(280px, calc(100vw - 60px));
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
  box-shadow: 0 12px 28px color-mix(in srgb, var(--foreground) 18%, transparent);
}

#onlyus-prototype .mobile-date.align-end .mobile-date-panel {
  right: 0;
  left: auto;
}

#onlyus-prototype .mobile-date.opens-up .mobile-date-panel {
  top: auto;
  bottom: calc(100% + 6px);
}

#onlyus-prototype .mobile-date-panel[hidden] {
  display: none;
}

#onlyus-prototype .mobile-date-head {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 4px;
  margin-bottom: 6px;
}

#onlyus-prototype .mobile-date-title {
  min-width: 0;
  min-height: 34px;
  padding: 0 6px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--foreground);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  font-size: 14px;
  font-weight: 650;
}

#onlyus-prototype .mobile-date-title::after {
  content: "";
  width: 6px;
  height: 6px;
  margin-top: -3px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  opacity: 0.7;
}

#onlyus-prototype .mobile-date-nav {
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--foreground);
  display: grid;
  place-items: center;
}

#onlyus-prototype .mobile-date-nav svg {
  width: 17px;
  height: 17px;
}

#onlyus-prototype .mobile-date-week,
#onlyus-prototype .mobile-date-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 2px;
}

#onlyus-prototype .mobile-date-week[hidden],
#onlyus-prototype .mobile-date-days[hidden] {
  display: none;
}

#onlyus-prototype .mobile-date-week span {
  padding: 3px 0 5px;
  color: var(--muted-foreground);
  font-size: 11px;
  text-align: center;
}

#onlyus-prototype .mobile-date-day {
  aspect-ratio: 1;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--foreground);
  font-size: 12px;
}

#onlyus-prototype .mobile-date-day.is-outside {
  color: color-mix(in srgb, var(--muted-foreground) 45%, transparent);
}

#onlyus-prototype .mobile-date-day.is-today {
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary) 55%, transparent);
}

#onlyus-prototype .mobile-date-day.is-selected {
  background: var(--primary);
  color: var(--primary-foreground);
  font-weight: 700;
  box-shadow: none;
}

#onlyus-prototype .mobile-date-panel button {
  -webkit-tap-highlight-color: transparent;
  transition: none !important;
}

#onlyus-prototype .mobile-date-panel button:active {
  transform: none !important;
}

#onlyus-prototype .mobile-date-years {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  min-height: 222px;
  align-content: center;
}

#onlyus-prototype .mobile-date-years[hidden] {
  display: none;
}

#onlyus-prototype .mobile-date-year {
  min-height: 38px;
  padding: 0 6px;
  border: 0;
  border-radius: 7px;
  background: var(--secondary);
  color: var(--foreground);
  font-size: 13px;
}

#onlyus-prototype .mobile-date-year.is-selected {
  background: var(--primary);
  color: var(--primary-foreground);
  font-weight: 700;
}

#onlyus-prototype .mobile-date-actions {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

#onlyus-prototype .mobile-date-actions button {
  min-height: 30px;
  padding: 4px 8px;
  border: 0;
  background: transparent;
  color: var(--primary);
  font-size: 12px;
}

#onlyus-prototype textarea {
  resize: none;
  overflow-y: hidden;
}

#onlyus-prototype .field-error {
  color: #b33f32;
  font-size: 12px;
  line-height: 1.35;
}

#onlyus-prototype .memo-location-field {
  position: relative;
}

#onlyus-prototype .memo-location-suggestions {
  position: absolute;
  z-index: 22;
  top: calc(100% + 5px);
  right: 0;
  left: 0;
  padding: 5px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  box-shadow: 0 8px 22px color-mix(in srgb, var(--foreground) 16%, transparent);
}

#onlyus-prototype .memo-location-suggestions[hidden] {
  display: none;
}

#onlyus-prototype .memo-location-suggestions button {
  width: 100%;
  min-height: 36px;
  padding: 6px 8px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--foreground);
  font-size: 13px;
  text-align: left;
}

#onlyus-prototype .number-stepper {
  display: grid;
  grid-template-columns: 38px 52px 38px;
  width: max-content;
  height: 40px;
  border: 1px solid var(--input);
  border-radius: 8px;
  background: var(--secondary);
  overflow: hidden;
}

#onlyus-prototype .number-stepper button {
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--primary);
  display: grid;
  place-items: center;
}

#onlyus-prototype .number-stepper button:first-child {
  border-right: 1px solid var(--border);
}

#onlyus-prototype .number-stepper button:last-child {
  border-left: 1px solid var(--border);
}

#onlyus-prototype .number-stepper button svg {
  width: 16px;
  height: 16px;
}

#onlyus-prototype .number-stepper input {
  width: 52px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--foreground);
  font-size: 15px;
  font-weight: 600;
  text-align: center;
}

#onlyus-prototype .memory-card.sortable-ghost {
  opacity: 0.2 !important;
}

#onlyus-prototype .memory-card.sortable-chosen {
  box-shadow: 0 8px 22px color-mix(in srgb, var(--foreground) 22%, transparent);
}

#onlyus-prototype .memory-card.sortable-drag {
  opacity: 1 !important;
}

#onlyus-prototype .memory-drag-handle {
  top: 50%;
  right: auto;
  left: 50%;
  width: 46px;
  height: 46px;
  transform: translate(-50%, -50%);
  border: 1px solid rgb(255 255 255 / 28%);
  background: rgb(28 25 24 / 68%);
  box-shadow: 0 4px 14px rgb(0 0 0 / 28%);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  touch-action: none;
}

#onlyus-prototype .memory-drag-handle svg {
  width: 24px;
  height: 24px;
  stroke-width: 2.8;
}

#onlyus-prototype .memory-drag-handle:active {
  transform: translate(-50%, -50%);
}

/* Sortable appends the touch fallback to body, so its size cannot rely on root-scoped rules. */
.memory-card.sortable-fallback {
  width: 148px !important;
  min-width: 148px !important;
  max-width: 148px !important;
  height: 125px !important;
  min-height: 125px !important;
  max-height: 125px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 8px !important;
  overflow: hidden !important;
  position: relative;
  background: #eadfd9;
  color: white;
  opacity: 1 !important;
  box-shadow: 0 10px 24px rgb(40 35 33 / 22%);
  touch-action: none;
}

.memory-card.sortable-fallback img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
}

.memory-card.sortable-fallback .memory-card-copy {
  position: absolute;
  inset: auto 0 0;
  display: grid;
  gap: 1px;
  padding: 22px 8px 7px;
  background: linear-gradient(transparent, rgb(0 0 0 / 66%));
}

.memory-card.sortable-fallback .memory-card-copy strong {
  font-size: 12px;
  font-weight: 600;
}

.memory-card.sortable-fallback .memory-card-copy span {
  color: rgb(255 255 255 / 82%);
  font-size: 10px;
}

.memory-card.sortable-fallback .memory-drag-handle {
  display: grid !important;
  place-items: center;
  position: absolute;
  top: 50%;
  left: 50%;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid rgb(255 255 255 / 28%);
  border-radius: 50%;
  transform: translate(-50%, -50%) !important;
  background: rgb(28 25 24 / 68%);
  color: white;
  opacity: 1 !important;
  box-shadow: 0 4px 14px rgb(0 0 0 / 28%);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.memory-card.sortable-fallback .memory-drag-handle svg {
  width: 24px;
  height: 24px;
  stroke-width: 2.8;
}

#onlyus-prototype .modal-backdrop:not([hidden]) {
  animation: onlyus-backdrop-in 100ms ease-out both;
}

#onlyus-prototype .modal-backdrop:not([hidden]) > .modal-sheet {
  animation: onlyus-sheet-in 210ms cubic-bezier(0.2, 0.78, 0.28, 1) both;
}

#onlyus-prototype #order-basket:not([hidden]) > .basket-sheet {
  transform-origin: left bottom;
  animation: onlyus-basket-from-bag 160ms cubic-bezier(0.18, 0.72, 0.28, 1) both;
}

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

@keyframes onlyus-sheet-in {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes onlyus-basket-from-bag {
  from {
    opacity: 1;
    transform: translate(-2px, -38px) scale(0.16, 0.1);
    border-radius: 28px;
  }
  to {
    opacity: 1;
    transform: translate(0, 0) scale(1, 1);
    border-radius: 22px;
  }
}

#onlyus-prototype > .perspective-switch,
#onlyus-prototype > .toast {
  display: none;
}

#onlyus-prototype .shell {
  width: 100%;
  max-width: 430px;
  height: 100%;
  margin: 0 auto;
  border: 0;
  border-radius: 0;
  background: #f7f3f0;
}

/* Fixed-workspace pages fill the content track; their inner lists own scrolling. */
#onlyus-prototype .content.menu-scroll-mode {
  align-content: stretch;
  grid-template-rows: minmax(0, 1fr);
}

#onlyus-prototype .topbar {
  padding-top: max(13px, env(safe-area-inset-top));
  background: #f7f3f0;
}

#onlyus-prototype .bottom-nav {
  box-sizing: border-box;
  height: 79px;
  padding-bottom: max(14px, calc(env(safe-area-inset-bottom) + 6px));
}

#onlyus-prototype .bottom-nav .nav-btn {
  margin: 0 3px;
  color: #9d8c84;
  transition: color 160ms ease;
}

#onlyus-prototype .bottom-nav .nav-btn.is-active {
  color: #c75f49;
  font-weight: 700;
}

#onlyus-prototype .bottom-nav .nav-btn.is-active svg {
  stroke-width: 2.35;
}

@media (min-width: 431px) {
  body {
    background: #eee7e3;
  }
}

/* Keep the relationship summary as the only refreshed visual area. */
#onlyus-prototype .hero .meta-row {
  gap: 8px;
}

#onlyus-prototype .hero .meta-row .pill {
  background: #fffaf7;
  border-color: #ead8d0;
  color: #352c29;
}

#onlyus-prototype .hero .meta-row .pill-number {
  color: #cc7965;
}

/* First visual pass: make the home page the reference hierarchy. */
#onlyus-prototype .page[data-page="home"] .hero {
  gap: 13px;
  padding: 16px;
  border: 1px solid #eadfd9;
  border-radius: 18px;
  background: rgba(255, 253, 251, 0.55);
}

#onlyus-prototype .page[data-page="home"] .hero .meta-row {
  margin-bottom: 4px;
}

#onlyus-prototype .page[data-page="home"] .hero h2 {
  margin: 0;
  font-size: 23px;
  line-height: 1.35;
  font-weight: 750;
}

#onlyus-prototype .page[data-page="home"] .hero > p {
  margin: 0;
  padding: 15px 16px;
  border-radius: 16px;
  background: #f8ebe5;
  color: #6f5c54;
  font-size: 14px;
  line-height: 1.5;
}

#onlyus-prototype .page[data-page="home"] .grid-two {
  gap: 12px;
}

#onlyus-prototype .page[data-page="home"] .grid-two > * {
  border-color: #ead8d0;
  border-radius: 16px;
}

#onlyus-prototype .page[data-page="home"] .section-heading {
  margin-top: 2px;
  margin-bottom: 4px;
}

#onlyus-prototype .page[data-page="home"] .section-heading h3 {
  font-size: 19px;
  font-weight: 750;
}

#onlyus-prototype .page[data-page="home"] .home-menu-card-title,
#onlyus-prototype .page[data-page="home"] #home-period-label {
  color: #75615a;
  font-weight: 600;
}

#onlyus-prototype .page[data-page="home"] > .section {
  margin-top: 2px;
  padding-top: 10px;
  gap: 5px;
  border-top: 1px solid #ead8d0;
}

#onlyus-prototype .page[data-page="home"] > .section .section-head {
  min-height: 30px;
  margin-bottom: 4px;
}

#onlyus-prototype .page[data-page="home"] > .section .section-head h2 {
  margin: 0;
  line-height: 1.2;
}

#onlyus-prototype .page[data-page="home"] > .section .mini-btn {
  min-height: 28px;
  padding: 4px 10px;
  line-height: 1.15;
}

/* Anniversary page: make the relationship count and horizontal memories easier to use. */
#onlyus-prototype .anniversary-together-copy > .text-small {
  font-size: 16px;
}

#onlyus-prototype .anniversary-together-copy > .text-small svg {
  width: 17px;
  height: 17px;
}

#onlyus-prototype .anniversary-together-count strong {
  font-family: "Baskerville", "Palatino Linotype", "Segoe Print", cursive;
  font-size: 42px;
}

#onlyus-prototype .memory-grid {
  height: 126px;
  min-height: 126px;
  padding-bottom: 0;
  align-items: flex-start;
  overflow-y: hidden;
  overscroll-behavior-y: none;
  touch-action: pan-x;
}

#onlyus-prototype .memory-card,
#onlyus-prototype .memory-card img,
#onlyus-prototype .memory-card-copy {
  touch-action: pan-x;
}

#onlyus-prototype .memory-section {
  overflow: hidden;
}

#onlyus-prototype .memory-grid.is-sorting {
  overscroll-behavior: none;
}

#onlyus-prototype.is-memory-dragging .anniversary-page,
#onlyus-prototype.is-memory-dragging .anniversary-important,
#onlyus-prototype.is-memory-dragging .anniversary-list,
#onlyus-prototype.is-memory-dragging .memory-section,
#onlyus-prototype.is-memory-dragging .memory-grid {
  overscroll-behavior: none;
  touch-action: none;
}

#onlyus-prototype.is-memory-dragging .anniversary-list {
  overflow-y: hidden;
}

#onlyus-prototype.is-memory-dragging .memory-grid {
  overflow-x: hidden;
}

#onlyus-prototype .memory-sort-button svg {
  width: 22px;
  height: 22px;
  stroke-width: 2.6;
}

#onlyus-prototype .memory-sort-button {
  width: 30px;
  height: 30px;
  min-height: 30px;
}

#onlyus-prototype .anniversary-filter-switch button {
  font-size: 12px;
}

/* Shared sliding indicator for two-option segmented controls. */
#onlyus-prototype .menu-owner,
#onlyus-prototype .memo-view-switch,
#onlyus-prototype .anniversary-filter-switch,
#onlyus-prototype .basket-switch,
#onlyus-prototype .order-time-switch {
  --segment-inset: 3px;
  --segment-gap: 2px;
  --segment-background: var(--card);
  --segment-shadow: 0 1px 4px color-mix(in srgb, var(--foreground) 10%, transparent);
  position: relative;
  isolation: isolate;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

#onlyus-prototype .anniversary-filter-switch {
  --segment-inset: 2px;
}

#onlyus-prototype .order-time-switch {
  --segment-inset: 4px;
  --segment-gap: 6px;
  --segment-background: var(--primary);
  --segment-shadow: 0 5px 12px color-mix(in srgb, var(--primary) 18%, transparent);
}

#onlyus-prototype .menu-owner::before,
#onlyus-prototype .memo-view-switch::before,
#onlyus-prototype .anniversary-filter-switch::before,
#onlyus-prototype .basket-switch::before,
#onlyus-prototype .order-time-switch::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: var(--segment-inset);
  bottom: var(--segment-inset);
  left: var(--segment-inset);
  width: calc((100% - (var(--segment-inset) * 2) - var(--segment-gap)) / 2);
  border-radius: inherit;
  background: var(--segment-background);
  box-shadow: var(--segment-shadow);
  transform: translateX(0);
  transition: transform 150ms linear;
  pointer-events: none;
}

#onlyus-prototype .menu-owner:has(> :nth-child(2).is-active)::before,
#onlyus-prototype .memo-view-switch:has(> :nth-child(2).is-active)::before,
#onlyus-prototype .anniversary-filter-switch:has(> :nth-child(2).is-active)::before,
#onlyus-prototype .basket-switch:has(> :nth-child(2).is-active)::before,
#onlyus-prototype .order-time-switch:has(> :nth-child(2).is-active)::before {
  transform: translateX(calc(100% + var(--segment-gap)));
}

#onlyus-prototype .menu-owner > button,
#onlyus-prototype .memo-view-switch > button,
#onlyus-prototype .anniversary-filter-switch > button,
#onlyus-prototype .basket-switch > button,
#onlyus-prototype .order-time-switch > button {
  position: relative;
  z-index: 1;
  background: transparent !important;
  box-shadow: none !important;
  transition: color 150ms linear;
}

@media (prefers-reduced-motion: reduce) {
  #onlyus-prototype .menu-owner::before,
  #onlyus-prototype .memo-view-switch::before,
  #onlyus-prototype .anniversary-filter-switch::before,
  #onlyus-prototype .basket-switch::before,
  #onlyus-prototype .order-time-switch::before,
  #onlyus-prototype .menu-owner > button,
  #onlyus-prototype .memo-view-switch > button,
  #onlyus-prototype .anniversary-filter-switch > button,
  #onlyus-prototype .basket-switch > button,
  #onlyus-prototype .order-time-switch > button {
    transition: none;
  }

  #onlyus-prototype button,
  #onlyus-prototype [role="button"] {
    transition: none !important;
  }

  #onlyus-prototype .modal-backdrop:not([hidden]),
  #onlyus-prototype .modal-backdrop:not([hidden]) > .modal-sheet {
    animation: none !important;
  }
}

#onlyus-prototype .anniversary-row-time {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 72px;
  width: 72px;
  min-width: 72px;
  box-sizing: border-box;
  padding: 5px 7px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--primary) 10%, var(--card));
  color: var(--foreground);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
}

#onlyus-prototype .anniversary-row-time.is-upcoming-soon {
  background: color-mix(in srgb, var(--primary) 17%, var(--card));
  color: var(--primary);
  font-weight: 700;
}

#onlyus-prototype .anniversary-row-time.is-today {
  padding: 5px 7px;
  border: 0;
  background: color-mix(in srgb, var(--primary) 22%, var(--card));
  color: var(--primary);
  font-size: 12px;
  font-weight: 750;
  line-height: 1;
}

#onlyus-prototype .anniversary-row-copy {
  width: 100%;
}

#onlyus-prototype .anniversary-row-copy > strong {
  flex: 1 1 auto;
}

#onlyus-prototype .memo-countdown {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 72px;
  width: 72px;
  min-width: 72px;
  box-sizing: border-box;
}

#onlyus-prototype .memo-status-filter {
  width: 68px;
  min-width: 68px;
  height: 28px;
  min-height: 28px;
  padding: 3px 16px 3px 6px;
  text-align-last: center;
}

#onlyus-prototype .memo-filter-row {
  grid-template-columns: minmax(0, 1fr) max-content 30px;
  gap: 6px;
}

#onlyus-prototype .memo-category-tabs {
  position: relative;
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  height: 30px;
  min-height: 30px;
  padding: 2px;
  border: 1px solid color-mix(in srgb, var(--border) 82%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--secondary) 78%, transparent);
  overflow: hidden;
}

#onlyus-prototype .memo-category-tabs::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: 2px;
  bottom: 2px;
  left: 2px;
  width: calc((100% - 4px) / 5);
  border-radius: 6px;
  background: var(--primary);
  transform: translateX(0);
  transition: transform 150ms linear;
}

#onlyus-prototype .memo-category-tabs:has(> :nth-child(2).is-active)::before {
  transform: translateX(100%);
}

#onlyus-prototype .memo-category-tabs:has(> :nth-child(3).is-active)::before {
  transform: translateX(200%);
}

#onlyus-prototype .memo-category-tabs:has(> :nth-child(4).is-active)::before {
  transform: translateX(300%);
}

#onlyus-prototype .memo-category-tabs:has(> :nth-child(5).is-active)::before {
  transform: translateX(400%);
}

#onlyus-prototype .memo-category-tabs .tab {
  position: relative;
  z-index: 1;
  min-width: 0;
  height: 24px;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent !important;
  color: var(--muted-foreground);
  font-size: 13px;
  white-space: nowrap;
}

#onlyus-prototype .memo-category-tabs .tab.is-active {
  color: var(--primary-foreground);
}

#onlyus-prototype .memo-status-wrap {
  position: relative;
  width: max-content;
  min-width: 0;
}

#onlyus-prototype .memo-status-button {
  width: 76px;
  min-width: 76px;
  height: 30px;
  padding: 0 6px 0 7px;
  border: 1px solid color-mix(in srgb, var(--foreground) 18%, var(--border));
  border-radius: 7px;
  background: var(--secondary);
  color: var(--foreground);
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 13px;
  white-space: nowrap;
}

#onlyus-prototype #memo-status-label {
  flex: 0 0 auto;
  white-space: nowrap;
  word-break: keep-all;
  line-height: 1;
}

#onlyus-prototype .memo-status-button svg {
  width: 13px;
  height: 13px;
  flex: 0 0 13px;
}

#onlyus-prototype .memo-status-button .memo-status-chevron {
  width: 12px;
  height: 12px;
  flex-basis: 12px;
  color: var(--muted-foreground);
}

#onlyus-prototype .memo-status-button.is-active {
  border-color: color-mix(in srgb, var(--primary) 58%, var(--border));
  background: color-mix(in srgb, var(--primary) 12%, var(--secondary));
  color: var(--primary);
  font-weight: 600;
}

#onlyus-prototype .memo-status-menu {
  position: absolute;
  z-index: 5;
  top: calc(100% + 6px);
  right: 0;
  width: 116px;
  padding: 5px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  box-shadow: 0 8px 22px color-mix(in srgb, var(--foreground) 14%, transparent);
}

#onlyus-prototype .memo-status-menu[hidden] {
  display: none;
}

#onlyus-prototype .memo-status-option {
  width: 100%;
  min-height: 32px;
  padding: 5px 7px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--foreground);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
  text-align: left;
}

#onlyus-prototype .memo-status-option.is-active {
  background: var(--secondary);
  font-weight: 600;
}

#onlyus-prototype .memo-status-check {
  width: 14px;
  flex: 0 0 14px;
  text-align: center;
}

/* Unified mobile replacement for native select controls. */
#onlyus-prototype .mobile-select {
  position: relative;
  width: 100%;
  min-width: 0;
}

#onlyus-prototype .mobile-select-native {
  display: none !important;
}

#onlyus-prototype .mobile-select-button {
  width: 100%;
  min-width: 0;
  height: 40px;
  padding: 0 10px 0 12px;
  border: 1px solid color-mix(in srgb, var(--foreground) 18%, var(--input));
  border-radius: 8px;
  background: var(--secondary);
  color: var(--foreground);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 14px;
  text-align: left;
}

#onlyus-prototype .mobile-select-value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#onlyus-prototype .mobile-select-chevron {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  color: var(--muted-foreground);
  transition: transform 150ms linear;
}

#onlyus-prototype .mobile-select-button[aria-expanded="true"] .mobile-select-chevron {
  transform: rotate(180deg);
}

#onlyus-prototype .mobile-select-menu {
  position: absolute;
  z-index: 20;
  top: calc(100% + 6px);
  right: 0;
  left: 0;
  padding: 5px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  box-shadow: 0 8px 22px color-mix(in srgb, var(--foreground) 16%, transparent);
}

#onlyus-prototype .mobile-select-menu[hidden] {
  display: none;
}

#onlyus-prototype .mobile-select.opens-up .mobile-select-menu {
  top: auto;
  bottom: calc(100% + 6px);
}

#onlyus-prototype .mobile-select-option {
  width: 100%;
  min-height: 36px;
  padding: 6px 8px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--foreground);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
  text-align: left;
}

#onlyus-prototype .mobile-select-option.is-active {
  background: var(--secondary);
  font-weight: 600;
}

#onlyus-prototype .mobile-select-check {
  width: 14px;
  flex: 0 0 14px;
  text-align: center;
}

#onlyus-prototype .memo-sort-button {
  width: 30px;
  height: 30px;
}

/* Mobile image picker: keep the upload affordance square and touch-friendly. */
#onlyus-prototype .image-upload-field {
  display: grid;
  gap: 6px;
}

#onlyus-prototype .image-upload-tile {
  position: relative;
  display: grid;
  place-items: center;
  width: 92px;
  aspect-ratio: 1;
  border: 1px dashed color-mix(in srgb, var(--primary) 42%, var(--border));
  border-radius: 8px;
  background: color-mix(in srgb, var(--primary) 5%, var(--card));
  color: var(--primary);
  cursor: pointer;
  overflow: hidden;
}

#onlyus-prototype .image-upload-tile input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

#onlyus-prototype .image-upload-visual {
  display: grid;
  justify-items: center;
  gap: 3px;
  pointer-events: none;
  font-size: 11px;
}

#onlyus-prototype .image-upload-visual svg {
  width: 22px;
  height: 22px;
  stroke-width: 1.8;
}

/* Keep the anniversary page on three explicit tracks even when the middle list is sparse. */
#onlyus-prototype .page.anniversary-page.is-active {
  height: 100%;
  min-height: 0;
  align-content: stretch;
  grid-template-rows: 104px minmax(0, 1fr) 174px;
}

#onlyus-prototype .content:has(.anniversary-page.is-active) {
  align-content: stretch;
  grid-template-rows: minmax(0, 1fr);
}

#onlyus-prototype .anniversary-important {
  min-height: 0;
  height: 100%;
}

#onlyus-prototype .anniversary-list {
  min-height: 0;
  overflow-y: auto;
}

#onlyus-prototype .memory-section {
  height: 174px;
  min-height: 174px;
  align-self: stretch;
}

#onlyus-prototype .page[data-page="home"] .home-menu-link,
#onlyus-prototype .page[data-page="home"] .home-period-link {
  min-height: 18px;
  line-height: 1.2;
}

#onlyus-prototype .page[data-page="home"] .home-status-grid {
  height: 120px;
  min-height: 120px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

#onlyus-prototype .page[data-page="home"] .home-status-grid > .item {
  height: 120px;
  min-height: 120px;
  padding: 10px 11px 7px;
  border: 1px solid #ead8d0;
  border-radius: 14px;
  background: var(--card);
  overflow: hidden;
}

#onlyus-prototype .page[data-page="home"] .home-menu-card {
  grid-template-rows: 20px minmax(0, 1fr) 20px;
  gap: 4px;
}

#onlyus-prototype .page[data-page="home"] .home-period-card {
  grid-template-rows: 18px 25px 23px minmax(19px, 1fr);
  gap: 2px;
}

#onlyus-prototype .page[data-page="home"] .home-status-head {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 5px;
}

#onlyus-prototype .page[data-page="home"] .home-menu-card-title {
  padding-right: 0;
  white-space: nowrap;
}

#onlyus-prototype .page[data-page="home"] .home-menu-badge {
  position: static;
  flex: 0 0 auto;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  font-size: 10px;
}

#onlyus-prototype .page[data-page="home"] .home-menu-latest,
#onlyus-prototype .page[data-page="home"] #home-period-summary {
  color: var(--foreground);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.35;
}

#onlyus-prototype .page[data-page="home"] .home-menu-latest {
  font-size: 15px;
  line-height: 1.4;
}

#onlyus-prototype .page[data-page="home"] #home-period-summary {
  font-size: 15px;
  line-height: 1.35;
}

#onlyus-prototype .page[data-page="home"] .home-status-primary {
  min-width: 0;
  display: flex;
  align-items: center;
  padding: 0;
}

#onlyus-prototype .page[data-page="home"] .home-period-primary {
  align-items: center;
  transform: translateY(4px);
}

#onlyus-prototype .page[data-page="home"] .home-period-note-box {
  min-width: 0;
  display: flex;
  align-items: center;
  margin: 4px -4px -8px;
  padding: 1px 8px;
  border-radius: 8px;
  background: #f7efeb;
}

#onlyus-prototype .page[data-page="home"] #home-period-note {
  font-size: 11.5px;
  line-height: 1.3;
}

#onlyus-prototype .page[data-page="home"] .home-menu-link,
#onlyus-prototype .page[data-page="home"] .home-period-link {
  flex: 0 0 auto;
  width: auto;
  min-height: 18px;
  margin: 0 0 0 auto;
  padding: 1px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted-foreground);
  font-size: 11.5px;
  font-weight: 550;
  line-height: 1.2;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  align-self: end;
  transform: none;
}

#onlyus-prototype .page[data-page="home"] .home-menu-link::after,
#onlyus-prototype .page[data-page="home"] .home-period-link::after {
  content: "\203A";
  margin-left: 3px;
  font-size: 13px;
  font-weight: 400;
  line-height: 0.8;
}

/* Home stays a single, non-scrolling screen. Upcoming plans only use the remaining track. */
#onlyus-prototype .content:has(.page[data-page="home"].is-active) {
  align-content: stretch;
  grid-template-rows: minmax(0, 1fr);
  overflow: hidden;
}

#onlyus-prototype .page[data-page="home"].is-active {
  height: 100%;
  min-height: 0;
  grid-template-rows: auto 120px minmax(0, 1fr);
  overflow: hidden;
}

#onlyus-prototype .page[data-page="home"] > .section:last-child {
  min-height: 0;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

#onlyus-prototype #home-memo-list {
  min-height: 0;
  overflow: hidden;
  align-content: start;
}

/* iOS zooms the visual viewport when a focused editable control is below 16px. */
#onlyus-prototype input:not([type="file"]),
#onlyus-prototype textarea,
#onlyus-prototype [contenteditable="true"] {
  font-size: 16px !important;
}

/* A memory card is an album cover; its contents live in the detail sheet. */
#onlyus-prototype .memory-card-copy span {
  font-variant-numeric: tabular-nums;
}

#onlyus-prototype .memory-detail-sheet {
  height: min(76dvh, 680px);
  max-height: calc(100dvh - 130px);
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  overflow: hidden;
}

#onlyus-prototype .memory-title-cluster {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 9px;
}

#onlyus-prototype .memory-title-cluster > strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#onlyus-prototype .memory-edit-action {
  width: 30px;
  height: 30px;
  padding: 0;
  flex: 0 0 auto;
}

#onlyus-prototype .memory-edit-action svg {
  width: 16px;
  height: 16px;
  stroke-width: 2.2;
}

#onlyus-prototype .memory-select-action {
  min-width: 42px;
  min-height: 30px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--primary);
  font-size: 14px;
  font-weight: 650;
}

#onlyus-prototype .memory-cover-upload {
  width: 116px;
  height: 116px;
}

#onlyus-prototype .memory-cover-upload .image-upload-visual,
#onlyus-prototype .memory-cover-preview {
  width: 100%;
  height: 100%;
}

#onlyus-prototype .memory-cover-preview {
  position: absolute;
  inset: 0;
  object-fit: cover;
  object-position: 50% 50%;
}

#onlyus-prototype .memory-cover-upload.has-preview .image-upload-visual > svg {
  display: none;
}

#onlyus-prototype .memory-cover-upload.has-preview .image-upload-visual > span {
  position: absolute;
  right: 7px;
  bottom: 7px;
  left: 7px;
  z-index: 1;
  padding: 5px 7px;
  border-radius: 6px;
  background: rgb(0 0 0 / 56%);
  color: white;
  font-size: 11px;
  text-align: center;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

#onlyus-prototype .is-locked-field input[readonly] {
  background: color-mix(in srgb, var(--secondary) 72%, var(--card));
  color: var(--foreground);
  cursor: default;
}

#onlyus-prototype .memory-text-action {
  min-height: 30px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--primary);
  font-size: 14px;
  font-weight: 650;
}

#onlyus-prototype .memory-detail-sheet::-webkit-scrollbar {
  display: none;
}

#onlyus-prototype .memory-photo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  min-height: 0;
  padding: 2px;
  overflow-y: auto;
  align-content: start;
  overscroll-behavior: contain;
  scrollbar-width: none;
}

#onlyus-prototype .memory-photo-grid::-webkit-scrollbar {
  display: none;
}

#onlyus-prototype .memory-photo-card {
  position: relative;
  aspect-ratio: 1;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 8px;
  overflow: hidden;
  background: var(--secondary);
  color: white;
}

#onlyus-prototype .memory-photo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

#onlyus-prototype .memory-photo-check {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 25px;
  height: 25px;
  border: 2px solid rgb(255 255 255 / 92%);
  border-radius: 50%;
  display: none;
  place-items: center;
  background: rgb(24 24 27 / 34%);
  color: white;
  box-shadow: 0 1px 5px rgb(0 0 0 / 20%);
}

#onlyus-prototype .memory-photo-grid.is-selecting .memory-photo-check {
  display: grid;
}

#onlyus-prototype .memory-photo-check svg {
  width: 15px;
  height: 15px;
  stroke-width: 3;
  opacity: 0;
}

#onlyus-prototype .memory-photo-card.is-selected .memory-photo-check {
  border-color: var(--primary);
  background: var(--primary);
}

#onlyus-prototype .memory-photo-card.is-selected .memory-photo-check svg {
  opacity: 1;
}

#onlyus-prototype .memory-photo-card.is-selected img {
  transform: scale(0.94);
  border-radius: 6px;
}

#onlyus-prototype .memory-selection-bar {
  min-height: 42px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px 38px auto;
  align-items: center;
  gap: 6px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  font-weight: 600;
}

#onlyus-prototype .memory-selection-bar[hidden] {
  display: none;
}

#onlyus-prototype .memory-selection-bar .icon-inline-btn {
  width: 36px;
  height: 36px;
}

#onlyus-prototype .memory-photo-add-tile {
  aspect-ratio: 1;
  min-height: 0;
  padding: 0;
  border: 1px dashed color-mix(in srgb, var(--primary) 42%, var(--border));
  border-radius: 8px;
  background: color-mix(in srgb, var(--secondary) 76%, var(--card));
  color: var(--primary);
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 7px;
}

#onlyus-prototype .memory-photo-add-tile svg {
  width: 28px;
  height: 28px;
  stroke-width: 2;
}

#onlyus-prototype .memory-photo-add-tile span {
  font-size: 12px;
  font-weight: 600;
}

#onlyus-prototype #memory-photo-viewer {
  padding: 0;
  place-items: stretch;
  background: #09090b;
}

#onlyus-prototype .memory-photo-viewer-sheet {
  position: relative;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: #09090b;
  box-shadow: none;
}

#onlyus-prototype #memory-photo-viewer:not([hidden]) > .memory-photo-viewer-sheet {
  animation: none;
}

#onlyus-prototype .memory-photo-viewer-sheet > img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

#onlyus-prototype .memory-photo-viewer-actions {
  position: absolute;
  right: 14px;
  bottom: max(18px, env(safe-area-inset-bottom));
  left: 14px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  transition: opacity 140ms ease-out, transform 140ms ease-out;
}

#onlyus-prototype .memory-viewer-back,
#onlyus-prototype .memory-photo-download {
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid rgb(255 255 255 / 20%);
  border-radius: 50%;
  display: grid;
  place-items: center;
  border-color: rgb(255 255 255 / 20%);
  background: rgb(0 0 0 / 50%);
  color: white;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

#onlyus-prototype .memory-viewer-back {
  position: absolute;
  top: max(14px, env(safe-area-inset-top));
  left: 14px;
  z-index: 2;
  transition: opacity 140ms ease-out, transform 140ms ease-out;
}

#onlyus-prototype #memory-photo-viewer.is-controls-hidden .memory-viewer-back {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
}

#onlyus-prototype #memory-photo-viewer.is-controls-hidden .memory-photo-viewer-actions {
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
}

#onlyus-prototype .memory-viewer-back svg,
#onlyus-prototype .memory-photo-download svg {
  width: 20px;
  height: 20px;
  stroke-width: 2.3;
}

#onlyus-prototype .memory-photo-date {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: white;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 4px rgb(0 0 0 / 72%);
}

#onlyus-prototype .photo-tile > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#onlyus-prototype .photo-tile > img ~ small,
#onlyus-prototype .photo-tile > img ~ .photo-date {
  position: relative;
  z-index: 1;
  padding: 1px 4px;
  border-radius: 4px;
  background: rgb(0 0 0 / 48%);
  color: white;
}

#onlyus-prototype .photo-tile:not(.photo-upload) > small {
  display: none;
}

#onlyus-prototype .menu-activity-list {
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

#onlyus-prototype .activity-sheet {
  height: min(430px, calc(100dvh - 140px));
  max-height: calc(100dvh - 140px);
  overflow: hidden;
}

/* Expanded theme pass: carry the couple-oriented visual language through the full app shell. */
html,
body {
  background: #ece5ef;
}

#onlyus-prototype {
  --background: #f6f2f7;
  --card: #fffdfd;
  --secondary: #eee5f1;
  --muted: #e7dfe9;
  --border: #dccfe0;
}

#onlyus-prototype .screen {
  background: var(--background);
}

#onlyus-prototype .topbar {
  position: relative;
  overflow: hidden;
  border-bottom-color: #dcd0e0;
  background:
    linear-gradient(90deg, rgba(235, 222, 241, 0.98), rgba(250, 241, 246, 0.98) 68%, rgba(244, 231, 237, 0.98));
  box-shadow: 0 2px 12px rgba(102, 77, 108, 0.045);
}

#onlyus-prototype .topbar::before {
  content: "✦   ·   ♡   ·   ✦";
  position: absolute;
  top: max(8px, env(safe-area-inset-top));
  right: 90px;
  color: rgba(180, 126, 161, 0.22);
  font-size: 10px;
  letter-spacing: 4px;
  pointer-events: none;
}

#onlyus-prototype .brand,
#onlyus-prototype .account-wrap {
  position: relative;
  z-index: 1;
}

#onlyus-prototype .content {
  background-color: #f6f2f7;
  background-image:
    radial-gradient(circle at 18px 18px, rgba(201, 99, 114, 0.11) 0 1px, transparent 1.5px),
    radial-gradient(circle at 8px 8px, rgba(126, 111, 163, 0.08) 0 1px, transparent 1.5px),
    repeating-linear-gradient(135deg, transparent 0 25px, rgba(126, 111, 163, 0.035) 25.5px 26px, transparent 26.5px 51px);
  background-size: 42px 42px, 30px 30px, 100% 100%;
}

#onlyus-prototype .page[data-page="home"] .hero {
  border-color: #d8c9df;
  background:
    linear-gradient(135deg, rgba(224, 208, 237, 0.92), rgba(255, 252, 253, 0.88) 56%),
    var(--card);
  box-shadow: 0 9px 22px rgba(104, 78, 116, 0.09);
}

#onlyus-prototype .page[data-page="home"] .hero > p {
  background: #fae7ed;
  color: #765463;
}

#onlyus-prototype .page[data-page="home"] .grid-two > *:first-child {
  background: #fff8f3;
  border-color: #ead8cc;
}

#onlyus-prototype .page[data-page="home"] .grid-two > *:last-child {
  background: #f3faf6;
  border-color: #d4e4da;
}

#onlyus-prototype .page[data-page="home"] .home-period-note-box {
  background: #e8f2ed;
}

#onlyus-prototype .page[data-page="home"] .home-plan-card {
  background: #fbf7fd;
  border-color: #ddd0e4;
}

#onlyus-prototype .page[data-page="recipes"] .section,
#onlyus-prototype .page[data-page="memo"] .section,
#onlyus-prototype .page[data-page="anniversary"] .section {
  position: relative;
}

#onlyus-prototype .page[data-page="recipes"] .section:first-child::after,
#onlyus-prototype .page[data-page="memo"] .section:first-child::after,
#onlyus-prototype .page[data-page="anniversary"] .section:first-child::after {
  content: "✦";
  position: absolute;
  top: 1px;
  right: 2px;
  color: rgba(201, 99, 114, 0.34);
  font-size: 13px;
  pointer-events: none;
}

#onlyus-prototype .page[data-page="recipes"] .dish-row {
  background: #fffafb;
  border-color: #e4d7e2;
}

#onlyus-prototype .page[data-page="recipes"] .dish-row.is-wish {
  background: #f8f1fb;
  border-color: #d9c8e2;
}

#onlyus-prototype .page[data-page="memo"] .memo-card {
  background: #fffafd;
  border-color: #e0d3e4;
}

#onlyus-prototype .page[data-page="anniversary"] .date-card {
  background: #fffafd;
}

#onlyus-prototype .bottom-nav {
  background: rgba(250, 246, 251, 0.97);
  border-top-color: #dcd0e0;
  box-shadow: 0 -7px 18px rgba(102, 77, 108, 0.08);
}

#onlyus-prototype .bottom-nav .nav-btn.is-active {
  color: #bd5870;
}

#onlyus-prototype .bottom-nav .nav-btn.is-active svg {
  filter: drop-shadow(0 1px 2px rgba(189, 88, 112, 0.2));
}

#onlyus-prototype .mini-btn,
#onlyus-prototype .subtle-action {
  border-color: #dbcddf;
  background: #fbf6fc;
}

#onlyus-prototype .mini-btn:hover,
#onlyus-prototype .subtle-action:hover {
  background: #f5e8f1;
}

/* The safe area and title bar intentionally share one solid system color. */
html,
body {
  background: #eee5f1;
}

#onlyus-prototype .topbar {
  background: #eee5f1;
}

/* Keep primary actions readable after the neutral button theme overrides. */
#onlyus-prototype .mini-btn.primary,
#onlyus-prototype .icon-inline-btn.primary,
#onlyus-prototype .primary.order-btn,
#onlyus-prototype .primary.wish-action-btn {
  border-color: #bd586a;
  background: #c96372;
  color: #fff9fa;
  box-shadow: 0 3px 8px rgba(174, 73, 94, 0.18);
}

#onlyus-prototype .mini-btn.primary:hover,
#onlyus-prototype .icon-inline-btn.primary:hover,
#onlyus-prototype .primary.order-btn:hover,
#onlyus-prototype .primary.wish-action-btn:hover {
  background: #b95366;
}

/* Warm the daily surface while retaining coral as the shared action color. */
html,
body {
  background: #f8e9e7;
}

#onlyus-prototype {
  --background: #fff8f4;
  --card: #fffdfb;
  --secondary: #f6e7e1;
  --muted: #f0e2db;
  --border: #ead8d0;
  --muted-foreground: #786864;
}

#onlyus-prototype .screen,
#onlyus-prototype .topbar {
  background: #f8e9e7;
}

#onlyus-prototype .content {
  background-color: #fff8f4;
  background-image:
    radial-gradient(circle at 18px 18px, rgba(204, 116, 104, 0.1) 0 1px, transparent 1.5px),
    radial-gradient(circle at 8px 8px, rgba(202, 157, 86, 0.07) 0 1px, transparent 1.5px),
    repeating-linear-gradient(135deg, transparent 0 25px, rgba(218, 157, 142, 0.035) 25.5px 26px, transparent 26.5px 51px);
}

#onlyus-prototype .page[data-page="home"] .hero {
  border-color: #ead2d0;
  background:
    linear-gradient(135deg, rgba(255, 226, 222, 0.92), rgba(255, 253, 249, 0.9) 56%),
    var(--card);
  box-shadow: 0 9px 22px rgba(153, 93, 83, 0.08);
}

#onlyus-prototype .page[data-page="home"] .home-plan-card,
#onlyus-prototype .page[data-page="memo"] .memo-card {
  background: #fffaf7;
  border-color: #eadbd5;
}

#onlyus-prototype .page[data-page="recipes"] .dish-row {
  background: #fffaf6;
  border-color: #eadcd6;
}

#onlyus-prototype .page[data-page="recipes"] .dish-row.is-wish {
  background: #fff4ef;
  border-color: #edd4cc;
}

#onlyus-prototype .bottom-nav {
  background: rgba(255, 251, 248, 0.97);
  border-top-color: #ead9d3;
  box-shadow: 0 -7px 18px rgba(143, 85, 77, 0.07);
}

#onlyus-prototype .mini-btn,
#onlyus-prototype .subtle-action {
  border-color: #ead8d0;
  background: #fff9f6;
}

/* A more expressive, still low-noise layer of couple-oriented decoration. */
#onlyus-prototype {
  --primary: #c9878e;
  --primary-foreground: #fffaf8;
  --viz-series-1: #d58b8d;
  --viz-series-2: #cda060;
  --viz-series-3: #7fa68f;
  --viz-series-4: #b78d9d;
}

#onlyus-prototype .content {
  background-image:
    radial-gradient(circle at 18px 18px, rgba(204, 116, 104, 0.16) 0 1.15px, transparent 1.7px),
    radial-gradient(circle at 8px 8px, rgba(202, 157, 86, 0.12) 0 1px, transparent 1.55px),
    repeating-linear-gradient(135deg, transparent 0 23px, rgba(218, 157, 142, 0.065) 23.5px 24.5px, transparent 25px 49px);
}

#onlyus-prototype .page {
  position: relative;
  isolation: isolate;
}

#onlyus-prototype .page::after {
  content: "♡  ✦  ·  ⌁";
  position: absolute;
  right: 7px;
  bottom: 10px;
  z-index: -1;
  color: rgba(198, 124, 128, 0.22);
  font-size: 13px;
  letter-spacing: 5px;
  pointer-events: none;
}

#onlyus-prototype .page[data-page="home"] .hero::after {
  color: rgba(194, 109, 120, 0.48);
  font-size: 18px;
  letter-spacing: 4px;
}

#onlyus-prototype .topbar::before {
  color: rgba(191, 117, 126, 0.34);
  font-size: 11px;
}

#onlyus-prototype .page[data-page="home"] .grid-two > *::after {
  width: 8px;
  height: 8px;
  opacity: 0.72;
  box-shadow: 0 0 0 3px rgba(255, 252, 248, 0.7);
}

#onlyus-prototype .page[data-page="recipes"] .section:first-child::after,
#onlyus-prototype .page[data-page="memo"] .section:first-child::after,
#onlyus-prototype .page[data-page="anniversary"] .section:first-child::after {
  color: rgba(196, 109, 120, 0.52);
  font-size: 15px;
}

#onlyus-prototype .mini-btn.primary,
#onlyus-prototype .icon-inline-btn.primary,
#onlyus-prototype .primary.order-btn,
#onlyus-prototype .primary.wish-action-btn {
  border-color: #bf7c83;
  background: #c9878e;
  color: #fffaf8;
  box-shadow: 0 2px 6px rgba(173, 101, 105, 0.12);
}

#onlyus-prototype .mini-btn.primary:hover,
#onlyus-prototype .icon-inline-btn.primary:hover,
#onlyus-prototype .primary.order-btn:hover,
#onlyus-prototype .primary.wish-action-btn:hover {
  background: #bd7c84;
}

#onlyus-prototype .bottom-nav .nav-btn.is-active {
  color: #bf747e;
}

@media (prefers-reduced-motion: reduce) {
  #onlyus-prototype .page::after {
    display: none;
  }
}
