:root {
  color-scheme: dark;
  --bg: #090d12;
  --panel: #111922;
  --panel-2: #172230;
  --ink: #fbf4e9;
  --muted: #bcb1a5;
  --gold: #ecc77e;
  --line: rgba(255, 255, 255, 0.13);
  --danger: #ff8b8b;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: linear-gradient(145deg, #150f12 0%, #090d12 52%, #101823 100%);
  color: var(--ink);
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  letter-spacing: 0;
}

button,
input,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

img,
video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

[hidden] {
  display: none !important;
}

.phone-shell {
  position: relative;
  width: min(100vw, 430px);
  min-height: 100vh;
  margin: 0 auto;
  overflow-x: hidden;
  padding: 0 14px 92px;
  background:
    linear-gradient(180deg, rgba(236, 199, 126, 0.07), transparent 220px),
    var(--bg);
  box-shadow: 0 0 80px rgba(0, 0, 0, 0.42);
}

.login-screen {
  display: grid;
  min-height: 100vh;
  align-content: center;
  gap: 16px;
  padding: 24px 4px;
}

.museum-mark,
.avatar,
.icon-button {
  display: grid;
  place-items: center;
  border-radius: 50%;
}

.museum-mark {
  width: 72px;
  height: 72px;
  background: var(--gold);
  color: #15100b;
  font-weight: 800;
  font-size: 22px;
}

.login-screen p,
.app-top p {
  margin: 0;
  color: var(--gold);
  font-size: 11px;
  text-transform: uppercase;
}

.login-screen h1 {
  margin: 0 0 18px;
  font-size: 42px;
  line-height: 1;
}

.login-card,
.memory-form {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(236, 199, 126, 0.24);
  border-radius: 8px;
  background: var(--panel);
}

.login-card label {
  display: grid;
  gap: 7px;
}

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

input,
textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--ink);
  outline: 0;
  padding: 11px 12px;
}

textarea {
  resize: vertical;
  line-height: 1.55;
}

input:focus,
textarea:focus {
  border-color: rgba(236, 199, 126, 0.7);
}

.login-card button,
.memory-form button,
.wish-form button {
  min-height: 44px;
  border-radius: 7px;
  background: var(--gold);
  color: #17110b;
  font-weight: 800;
}

.top-area {
  position: sticky;
  top: 0;
  z-index: 4;
  margin: 0 -14px;
  padding: 14px 14px 10px;
  background: linear-gradient(180deg, rgba(9, 13, 18, 0.96), rgba(9, 13, 18, 0.78));
  backdrop-filter: blur(18px);
}

.app-top {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  gap: 12px;
}

.avatar,
.icon-button {
  width: 42px;
  height: 42px;
}

.avatar {
  background: var(--gold);
  color: #15100b;
  font-size: 13px;
  font-weight: 800;
}

.icon-button {
  background: rgba(255, 255, 255, 0.1);
  color: var(--ink);
  font-size: 21px;
}

.app-top h1 {
  margin: 2px 0 0;
  font-size: 24px;
  line-height: 1.1;
}

.day-card {
  display: none;
  align-items: end;
  justify-content: space-between;
  width: 100%;
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
  text-align: left;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

#appShell.view-home .day-card {
  display: flex;
}

.day-card:active {
  transform: translateY(1px);
}

.day-card:focus-visible {
  outline: 2px solid rgba(236, 199, 126, 0.75);
  outline-offset: 2px;
}

.day-card:hover {
  border-color: rgba(236, 199, 126, 0.38);
  background: rgba(255, 255, 255, 0.08);
}

.day-card span,
.day-card time {
  color: var(--muted);
  font-size: 12px;
}

.day-card strong {
  display: block;
  margin-top: 4px;
  font-size: 30px;
  line-height: 1;
}

.message-board {
  display: none;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
  padding: 10px 12px;
  border: 1px solid rgba(236, 199, 126, 0.2);
  border-radius: 8px;
  background: rgba(17, 25, 34, 0.72);
}

#appShell.view-home .message-board {
  display: grid;
}

.message-board span {
  color: var(--gold);
  font-size: 11px;
}

.message-board p {
  margin: 3px 0 0;
  color: #e7ddd0;
  font-size: 14px;
  line-height: 1.35;
  overflow-wrap: anywhere;
  white-space: normal;
}

.message-board > button {
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid rgba(236, 199, 126, 0.38);
  border-radius: 999px;
  background: rgba(236, 199, 126, 0.1);
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.message-form {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1fr) 64px;
  gap: 8px;
  margin-top: 2px;
}

.message-form input,
.message-form button {
  min-height: 38px;
}

.message-form input {
  padding: 8px 10px;
}

.message-form button {
  border-radius: 7px;
  background: var(--gold);
  color: #17110b;
  font-weight: 800;
}

.view {
  display: none;
  padding-top: 16px;
}

.view.active {
  display: block;
  animation: rise 260ms ease both;
}

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

.hero-memory {
  position: relative;
  min-height: 360px;
  overflow: hidden;
  border: 1px solid rgba(236, 199, 126, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(155deg, rgba(236, 199, 126, 0.24), transparent 48%),
    linear-gradient(20deg, #161f2b, #0b0f15 62%);
}

.hero-memory::after,
.media-grid article::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(0, 0, 0, 0.78));
  pointer-events: none;
}

.empty-hero,
.hero-copy {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 1;
}

.empty-hero span,
.hero-copy span,
.section-head button,
.anniversary-preview span,
.gold-card span {
  color: var(--gold);
  font-size: 12px;
}

.empty-hero h2,
.hero-copy h2 {
  margin: 8px 0 8px;
  font-size: 27px;
  line-height: 1.1;
}

.empty-hero p,
.hero-copy p {
  margin: 0;
  color: #e0d4c6;
  font-size: 14px;
  line-height: 1.45;
}

.quick-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 12px;
}

.quick-stats button {
  min-width: 0;
  padding: 15px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  text-align: center;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.quick-stats button:active {
  transform: translateY(1px);
}

.quick-stats button:focus-visible {
  outline: 2px solid rgba(236, 199, 126, 0.75);
  outline-offset: 2px;
}

.quick-stats button:hover {
  border-color: rgba(236, 199, 126, 0.42);
  background: rgba(236, 199, 126, 0.08);
}

.quick-stats strong {
  display: block;
  font-size: 24px;
}

.quick-stats span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

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

.section-head h2 {
  margin: 0;
  font-size: 22px;
}

.section-head button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(236, 199, 126, 0.35);
  border-radius: 6px;
  background: rgba(236, 199, 126, 0.1);
}

.sticky-title {
  position: sticky;
  top: 118px;
  z-index: 3;
  padding: 10px 0 12px;
  background: linear-gradient(180deg, rgba(9, 13, 18, 0.94), rgba(9, 13, 18, 0.72));
  backdrop-filter: blur(14px);
}

.timeline {
  border-left: 1px solid rgba(236, 199, 126, 0.36);
}

.timeline article {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 10px;
  padding: 0 0 20px 14px;
}

.timeline time {
  color: var(--gold);
  font-size: 12px;
  font-weight: 700;
}

.timeline h3,
.diary-list h3 {
  margin: 0 0 6px;
  font-size: 17px;
}

.timeline p,
.diary-list p,
.date-stack p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.anniversary-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 4px 0;
  padding: 18px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(236, 199, 126, 0.18), rgba(255, 255, 255, 0.06));
  border: 1px solid rgba(236, 199, 126, 0.24);
}

.anniversary-preview strong {
  display: block;
  margin-top: 5px;
  font-size: 18px;
}

.anniversary-preview p {
  margin: 0;
  color: var(--ink);
  font-weight: 700;
}

.calendar-head {
  margin-top: 0;
  color: #f5f5f7;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Helvetica Neue", sans-serif;
}

.calendar-head h2 {
  font-size: 28px;
  letter-spacing: 0;
}

.calendar-head button {
  min-height: 34px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #ff453a;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", sans-serif;
  font-weight: 700;
}

.calendar-panel {
  padding: 16px 14px 18px;
  border: 0;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
  color: #1d1d1f;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Helvetica Neue", sans-serif;
}

.calendar-month {
  display: grid;
  grid-template-columns: 38px 1fr 38px;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.calendar-month strong {
  color: #1d1d1f;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", sans-serif;
  text-align: center;
  font-size: 22px;
  font-weight: 800;
}

.calendar-month button {
  display: grid;
  place-items: center;
  min-height: 38px;
  border: 0;
  border-radius: 50%;
  background: #f2f2f7;
  color: #ff3b30;
  font-size: 24px;
  line-height: 1;
}

.weekday-row,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.weekday-row {
  margin-bottom: 5px;
  color: #8e8e93;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

.calendar-day,
.calendar-blank {
  min-width: 0;
  aspect-ratio: 1;
  border-radius: 14px;
}

.calendar-day {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 5px 3px 4px;
  border: 0;
  background: transparent;
  color: #1d1d1f;
  text-align: center;
  transition: background 160ms ease, transform 160ms ease;
}

.calendar-day:active {
  transform: scale(0.96);
}

.calendar-day time {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  margin: auto;
  justify-self: center;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
}

.calendar-day.has-phase {
  background: color-mix(in srgb, var(--phase-color) 12%, #ffffff);
}

.note-dot {
  position: absolute;
  top: 4px;
  left: 50%;
  z-index: 2;
  width: 5px;
  height: 5px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: var(--note-color, #1d1d1f);
}

.phase-chip {
  position: absolute;
  left: 4px;
  right: 4px;
  bottom: 4px;
  z-index: 1;
  display: block;
  min-height: 11px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--phase-color) 72%, #ffffff);
  color: #ffffff;
  font-size: 7.5px;
  font-weight: 800;
  line-height: 11px;
  overflow: hidden;
  text-align: center;
  white-space: nowrap;
}

.phase-safe .phase-chip {
  color: #0b4d1f;
}

.calendar-day.has-note {
  background: transparent;
}

.calendar-day.has-note.has-phase {
  background: color-mix(in srgb, var(--phase-color) 12%, #ffffff);
}

.calendar-day.selected {
  background: #fff5f5;
  box-shadow: inset 0 0 0 2px #ff3b30;
}

.calendar-day.today time {
  background: #ff3b30;
  color: #ffffff;
}

.calendar-day.selected:not(.today) time {
  color: #ff3b30;
}

.calendar-editor {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding: 16px;
  border: 0;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
  color: #1d1d1f;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Helvetica Neue", sans-serif;
}

.calendar-editor > span {
  color: #ff3b30;
  font-size: 14px;
  font-weight: 800;
}

.calendar-editor input {
  border: 0;
  border-radius: 12px;
  background: #f2f2f7;
  color: #1d1d1f;
  font-family: inherit;
  font-weight: 600;
}

.color-row {
  display: flex;
  gap: 10px;
}

.color-row label {
  position: relative;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
}

.color-row input {
  position: absolute;
  width: 1px;
  min-height: 1px;
  height: 1px;
  opacity: 0;
}

.color-row span {
  display: block;
  width: 28px;
  height: 28px;
  border: 2px solid transparent;
  border-radius: 50%;
  background: var(--swatch);
}

.color-row input:checked + span {
  border-color: #ffffff;
  box-shadow: 0 0 0 3px #ff3b30;
}

.calendar-editor button {
  min-height: 44px;
  border-radius: 14px;
  background: #ff3b30;
  color: #ffffff;
  font-family: inherit;
  font-weight: 800;
}

.period-card {
  display: grid;
  gap: 12px;
  margin-top: 12px;
  padding: 16px;
  border: 0;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
  color: #1d1d1f;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Helvetica Neue", sans-serif;
}

.period-card-title span,
.period-card label span {
  display: block;
  color: #86868b;
  font-size: 12px;
  font-weight: 700;
}

.period-card-title strong {
  display: block;
  margin-top: 4px;
  color: #1d1d1f;
  font-size: 14px;
}

.period-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.period-card input {
  min-height: 42px;
  margin-top: 6px;
}

.period-legend {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
}

.period-legend span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 28px;
  border-radius: 999px;
  background: #f2f2f7;
  color: #3a3a3c;
  font-size: 11px;
  font-weight: 700;
}

.period-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.period-dot.period {
  background: #ff3b30;
}

.period-dot.expected {
  background: #ff9f0a;
}

.period-dot.fertile {
  background: #ff9500;
}

.period-dot.safe {
  background: #34c759;
}

.period-card button {
  min-height: 44px;
  border-radius: 14px;
  background: #ff3b30;
  color: #ffffff;
  font-weight: 800;
}

.period-card p {
  margin: 0;
  color: #86868b;
  font-size: 12px;
  line-height: 1.45;
}

.upload-form {
  margin-bottom: 12px;
}

.upload-form-compact {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.file-picker input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.file-picker span {
  display: grid;
  place-items: center;
  min-height: 48px;
  border: 1px dashed rgba(236, 199, 126, 0.42);
  border-radius: 7px;
  color: var(--gold);
}

.filter-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 10px;
}

.filter-row button {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted);
  font-size: 13px;
}

.filter-row button.active {
  background: var(--gold);
  color: #17110b;
  font-weight: 800;
}

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

.media-grid article {
  position: relative;
  min-height: 178px;
  overflow: hidden;
  border-radius: 8px;
  background: var(--panel);
}

.media-grid article.wide {
  grid-column: 1 / -1;
  min-height: 230px;
}

.media-grid strong {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 1;
  font-size: 15px;
  overflow-wrap: anywhere;
}

.video-card video {
  position: relative;
  z-index: 1;
}

.video-card::after {
  display: none;
}

.diary-compose {
  margin-bottom: 14px;
  background:
    linear-gradient(135deg, rgba(236, 199, 126, 0.16), transparent 65%),
    var(--panel);
}

.diary-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.diary-list article {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.diary-date {
  display: grid;
  place-items: center;
  align-self: start;
  min-height: 58px;
  border-radius: 8px;
  background: rgba(236, 199, 126, 0.12);
  color: var(--gold);
}

.diary-date span {
  font-size: 20px;
  font-weight: 800;
}

.diary-date small {
  margin-top: -10px;
  font-size: 11px;
}

.diary-date time {
  margin-top: -8px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
}

.tag {
  display: inline-flex;
  margin-top: 12px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--gold);
  font-size: 12px;
}

.compact-form {
  margin-bottom: 14px;
}

.date-stack {
  display: grid;
  gap: 12px;
}

.date-stack article,
.wish-card,
.empty-state {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.date-stack .gold-card {
  min-height: 150px;
  background:
    linear-gradient(135deg, rgba(236, 199, 126, 0.95), rgba(160, 104, 59, 0.9)),
    #d7a85a;
  color: #20160d;
}

.gold-card span {
  color: rgba(32, 22, 13, 0.68);
  font-weight: 800;
}

.gold-card h3 {
  margin: 10px 0 28px;
  font-size: 28px;
}

.gold-card small {
  display: block;
  margin: -18px 0 24px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.gold-card p {
  color: #20160d;
  font-size: 18px;
  font-weight: 800;
}

.date-stack time {
  display: block;
  margin-bottom: 8px;
  color: var(--gold);
  font-size: 12px;
}

.date-stack strong {
  display: block;
  margin-bottom: 8px;
  font-size: 18px;
}

.wish-card {
  margin-top: 14px;
}

.wish-card h3 {
  margin: 0 0 12px;
  font-size: 19px;
}

.wish-form {
  display: grid;
  grid-template-columns: 1fr 74px;
  gap: 8px;
  margin-bottom: 10px;
}

.wish-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 42px;
  color: #e7ddd0;
  font-size: 15px;
  user-select: none;
  -webkit-user-select: none;
}

.wish-item input {
  accent-color: var(--gold);
  width: 18px;
  min-height: 18px;
  height: 18px;
}

.wish-item span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wish-delete-sheet {
  position: fixed;
  inset: 0;
  z-index: 22;
  display: grid;
  align-items: end;
  justify-items: center;
  padding: 18px;
}

.wish-delete-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(25, 23, 20, 0.22);
  backdrop-filter: blur(10px);
}

.wish-delete-panel {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
  width: min(100%, 398px);
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.84);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 22px 60px rgba(70, 52, 36, 0.22);
  color: #191714;
}

.wish-delete-panel h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 820;
  text-align: center;
}

.wish-delete-panel p {
  margin: 0;
  color: #71685f;
  font-size: 14px;
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wish-delete-panel button {
  min-height: 46px;
  border-radius: 18px;
  font-weight: 820;
}

.wish-delete-confirm {
  background: #ff3b30;
  color: #ffffff;
}

.wish-delete-cancel {
  background: #f5f1ed;
  color: #191714;
}

.wish-empty,
.empty-state {
  color: var(--muted);
  font-size: 14px;
}

.gallery-upload-add {
  position: fixed;
  left: min(calc(50% + 145px), calc(100vw - 70px));
  bottom: calc(env(safe-area-inset-bottom, 0px) + 82px);
  z-index: 7;
  display: none;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e44945, #b9232a);
  color: #ffffff;
  font-size: 32px;
  box-shadow: 0 18px 36px rgba(201, 47, 43, 0.26);
}

#appShell.view-gallery .gallery-upload-add {
  display: grid;
}

.gallery-upload-add:active {
  transform: scale(0.94);
}

.gallery-upload-add:focus-visible {
  outline: 3px solid rgba(201, 47, 43, 0.24);
  outline-offset: 3px;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 12px;
  z-index: 6;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  width: min(calc(100vw - 24px), 406px);
  min-height: 64px;
  padding: 8px;
  transform: translateX(-50%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(13, 19, 27, 0.88);
  backdrop-filter: blur(20px);
}

.bottom-nav button {
  min-width: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.bottom-nav button.active {
  background: rgba(236, 199, 126, 0.16);
  color: var(--gold);
  font-weight: 800;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 172px;
  z-index: 20;
  max-width: min(360px, calc(100vw - 36px));
  transform: translateX(-50%);
  padding: 11px 14px;
  border: 1px solid rgba(236, 199, 126, 0.38);
  border-radius: 8px;
  background: rgba(14, 20, 28, 0.92);
  color: var(--ink);
  backdrop-filter: blur(14px);
}

@media (max-width: 360px) {
  .phone-shell {
    padding-inline: 10px;
  }

  .top-area {
    margin-inline: -10px;
    padding-inline: 10px;
  }

  .hero-memory {
    min-height: 330px;
  }

  .day-card strong {
    font-size: 26px;
  }

  .empty-hero h2,
  .hero-copy h2 {
    font-size: 23px;
  }
}

/* iOS-style full app skin */
:root {
  color-scheme: light;
  --bg: #f5f5f7;
  --panel: #ffffff;
  --panel-2: #f2f2f7;
  --ink: #1d1d1f;
  --muted: #86868b;
  --gold: #ff3b30;
  --line: rgba(60, 60, 67, 0.16);
  --danger: #ff3b30;
  --ios-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
}

html,
body {
  background: #e9e9ee;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Helvetica Neue", sans-serif;
}

.phone-shell {
  background:
    linear-gradient(180deg, #fbfbfd 0%, #f5f5f7 280px),
    var(--bg);
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.13);
}

.top-area {
  background: rgba(245, 245, 247, 0.86);
  border-bottom: 1px solid rgba(60, 60, 67, 0.1);
}

.museum-mark,
.avatar {
  background: #ff3b30;
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(255, 59, 48, 0.22);
}

.icon-button {
  background: #ffffff;
  color: #ff3b30;
  box-shadow: var(--ios-shadow);
}

.login-screen p,
.app-top p,
.message-board span,
.empty-hero span,
.hero-copy span,
.section-head button,
.anniversary-preview span,
.gold-card span,
.timeline time,
.date-stack time,
.tag,
.calendar-head button {
  color: #ff3b30;
}

.app-top h1,
.login-screen h1,
.section-head h2,
.calendar-head,
.calendar-head h2 {
  color: #1d1d1f;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Helvetica Neue", sans-serif;
  font-weight: 800;
}

.login-card,
.memory-form,
.day-card,
.message-board,
.quick-stats button,
.anniversary-preview,
.calendar-panel,
.calendar-editor,
.diary-list article,
.date-stack article,
.wish-card,
.empty-state {
  border: 0;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: var(--ios-shadow);
  color: #1d1d1f;
}

.day-card {
  padding: 18px;
}

.day-card:hover {
  background: #ffffff;
}

.day-card:focus-visible,
.quick-stats button:focus-visible {
  outline: 3px solid rgba(255, 59, 48, 0.28);
  outline-offset: 2px;
}

.day-card span,
.day-card time,
.quick-stats span,
.timeline p,
.diary-list p,
.date-stack p,
.wish-empty,
.empty-state {
  color: #86868b;
}

.day-card strong {
  color: #1d1d1f;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", sans-serif;
  font-weight: 800;
}

.message-board p,
.wish-item {
  color: #1d1d1f;
}

.message-board > button,
.section-head button {
  border: 0;
  background: #fff1f0;
  color: #ff3b30;
}

input,
textarea,
.calendar-editor input {
  border: 0;
  border-radius: 14px;
  background: #f2f2f7;
  color: #1d1d1f;
}

input::placeholder,
textarea::placeholder {
  color: #9a9aa0;
}

input:focus,
textarea:focus {
  border-color: transparent;
  box-shadow: 0 0 0 3px rgba(255, 59, 48, 0.18);
}

.login-card button,
.memory-form button,
.wish-form button,
.message-form button,
.calendar-editor button {
  border-radius: 14px;
  background: #ff3b30;
  color: #ffffff;
  box-shadow: none;
}

.hero-memory {
  min-height: 342px;
  border: 0;
  border-radius: 22px;
  background:
    linear-gradient(145deg, #ffffff, #f2f2f7),
    #ffffff;
  box-shadow: var(--ios-shadow);
}

.hero-memory::after {
  background: linear-gradient(180deg, transparent 38%, rgba(0, 0, 0, 0.68));
}

.empty-hero h2,
.empty-hero p {
  color: #1d1d1f;
}

.empty-hero,
.hero-copy {
  left: 20px;
  right: 20px;
  bottom: 20px;
}

.hero-copy h2,
.hero-copy p {
  color: #ffffff;
}

.quick-stats button {
  padding: 17px 8px;
}

.quick-stats strong {
  color: #1d1d1f;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", sans-serif;
  font-weight: 800;
}

.sticky-title {
  background: rgba(245, 245, 247, 0.88);
}

.timeline {
  border-left: 0;
}

.timeline article {
  grid-template-columns: 58px 1fr;
  margin-bottom: 10px;
  padding: 14px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--ios-shadow);
}

.timeline h3,
.diary-list h3,
.date-stack strong,
.wish-card h3 {
  color: #1d1d1f;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", sans-serif;
}

.anniversary-preview {
  background: #ffffff;
}

.anniversary-preview p {
  color: #ff3b30;
}

.calendar-head button {
  background: #ffffff;
  box-shadow: var(--ios-shadow);
}

.calendar-panel,
.calendar-editor {
  box-shadow: var(--ios-shadow);
}

.filter-row button {
  border: 0;
  background: #ffffff;
  color: #86868b;
  box-shadow: var(--ios-shadow);
}

.filter-row button.active {
  background: #ff3b30;
  color: #ffffff;
}

.media-grid article {
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--ios-shadow);
}

.media-grid strong {
  color: #ffffff;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.45);
}

.diary-compose,
.compact-form {
  background: #ffffff;
}

.diary-date {
  background: #fff1f0;
  color: #ff3b30;
}

.tag {
  background: #fff1f0;
}

.date-stack .gold-card {
  background: #ff3b30;
  color: #ffffff;
}

.gold-card span,
.gold-card p {
  color: rgba(255, 255, 255, 0.78);
}

.gold-card h3 {
  color: #ffffff;
}

.wish-item input {
  accent-color: #ff3b30;
}

.bottom-nav {
  border: 1px solid rgba(60, 60, 67, 0.16);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

.bottom-nav button {
  border-radius: 16px;
  color: #6e6e73;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", sans-serif;
  font-weight: 600;
}

.bottom-nav button.active {
  background: #ff3b30;
  color: #ffffff;
}

.avatar {
  position: relative;
  isolation: isolate;
  width: 54px;
  height: 50px;
  border-radius: 0;
  background: transparent;
  clip-path: none;
  color: #ffffff;
  font-size: 12px;
  line-height: 1;
  text-shadow: 0 1px 4px rgba(120, 0, 18, 0.28);
  filter: drop-shadow(0 10px 18px rgba(255, 45, 85, 0.22));
  box-shadow: none;
}

.avatar::before {
  content: "";
  position: absolute;
  inset: 1px 2px 0;
  z-index: -2;
  background: linear-gradient(145deg, #ff7a86 0%, #ff2d55 46%, #ff3b30 100%);
  -webkit-mask: url("/heart-avatar.svg") center / contain no-repeat;
  mask: url("/heart-avatar.svg") center / contain no-repeat;
}

.avatar::after {
  content: "";
  position: absolute;
  top: 10px;
  left: 16px;
  z-index: -1;
  width: 12px;
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.32);
  transform: rotate(-28deg);
}

.toast {
  border: 0;
  border-radius: 18px;
  background: rgba(28, 28, 30, 0.88);
  color: #ffffff;
}

/* Premium private gallery skin */
:root {
  --bg: #f7f2ec;
  --panel: rgba(255, 255, 255, 0.82);
  --panel-2: #f3ede6;
  --ink: #191714;
  --muted: #7c756d;
  --gold: #c92f2b;
  --line: rgba(43, 35, 28, 0.11);
  --danger: #c92f2b;
  --premium-red: #c92f2b;
  --premium-red-soft: #fff0ef;
  --premium-cream: #fffaf4;
  --premium-shadow: 0 22px 50px rgba(70, 52, 36, 0.13);
  --premium-shadow-soft: 0 12px 30px rgba(70, 52, 36, 0.09);
  --hairline: rgba(43, 35, 28, 0.12);
}

html,
body {
  background:
    linear-gradient(90deg, #eeedf1 0%, #fbf7f1 50%, #eeedf1 100%);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Helvetica Neue", sans-serif;
}

.phone-shell {
  width: min(100vw, 430px);
  padding: 0 16px 104px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(250, 245, 238, 0.94) 370px, #f4eee7 100%),
    var(--bg);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.75),
    0 30px 90px rgba(37, 28, 20, 0.14);
}

.top-area {
  margin: 0 -16px;
  padding: 18px 16px 12px;
  background: rgba(250, 246, 240, 0.78);
  border-bottom: 1px solid rgba(43, 35, 28, 0.07);
  backdrop-filter: saturate(130%) blur(22px);
}

.app-top {
  grid-template-columns: 58px minmax(0, 1fr) 40px;
  gap: 12px;
}

.app-top h1 {
  margin: 0;
  color: #161616;
  font-size: 23px;
  font-weight: 850;
  letter-spacing: 0;
}

.icon-button {
  width: 38px;
  height: 38px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--premium-red);
  box-shadow: 0 10px 24px rgba(73, 55, 40, 0.1);
}

.avatar {
  width: 56px;
  height: 52px;
  font-size: 12px;
  filter: drop-shadow(0 12px 22px rgba(201, 47, 43, 0.18));
}

.avatar::before {
  inset: 0 2px;
  background: linear-gradient(145deg, #ff7e80 0%, #e94143 45%, #bb1f26 100%);
}

.avatar::after {
  top: 10px;
  left: 17px;
  background: rgba(255, 255, 255, 0.38);
}

.day-card {
  margin-top: 18px;
  padding: 22px 20px;
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(255, 250, 244, 0.9)),
    #ffffff;
  box-shadow: var(--premium-shadow-soft);
}

.day-card span,
.day-card time {
  color: #91877c;
  font-size: 12px;
  font-weight: 600;
}

.day-card strong {
  margin-top: 6px;
  color: #171717;
  font-size: 34px;
  font-weight: 880;
  letter-spacing: 0;
}

.day-card:hover {
  background: #ffffff;
}

.day-card:focus-visible,
.quick-stats button:focus-visible,
.message-board > button:focus-visible,
.bottom-nav button:focus-visible {
  outline: 3px solid rgba(201, 47, 43, 0.2);
  outline-offset: 2px;
}

.message-board {
  margin-top: 12px;
  padding: 15px 16px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 16px 36px rgba(70, 52, 36, 0.1);
  backdrop-filter: blur(18px);
  cursor: pointer;
}

.message-board span {
  color: var(--premium-red);
  font-size: 12px;
  font-weight: 800;
}

.message-board p {
  margin-top: 5px;
  color: #201d1a;
  font-size: 15px;
  line-height: 1.46;
}

.message-board > button,
.section-head button,
.calendar-head button {
  min-height: 38px;
  padding: 0 15px;
  border: 1px solid rgba(201, 47, 43, 0.08);
  border-radius: 999px;
  background: #fff0ef;
  color: var(--premium-red);
  font-weight: 800;
  box-shadow: none;
}

.message-board:focus-visible {
  outline: 3px solid rgba(201, 47, 43, 0.18);
  outline-offset: 3px;
}

.message-history {
  display: grid;
  gap: 12px;
  padding-bottom: 14px;
}

.message-history article {
  display: grid;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--premium-shadow-soft);
}

.message-history article div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.message-history strong {
  color: #171717;
  font-size: 14px;
  font-weight: 800;
}

.message-history time {
  color: #9a9087;
  font-size: 12px;
  white-space: nowrap;
}

.message-history p {
  margin: 0;
  color: #2b2621;
  font-size: 15px;
  line-height: 1.55;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.record-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
}

.record-actions .tag {
  margin-top: 0;
}

.delete-action {
  justify-self: end;
  min-height: 30px;
  margin-top: 12px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 59, 48, 0.1);
  color: var(--premium-red);
  font-size: 12px;
  font-weight: 780;
}

.delete-action:active {
  transform: translateY(1px);
}

.message-empty {
  padding: 24px 14px 30px;
  color: #8a8076;
  text-align: center;
}

.mood-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  padding: 2px 0 4px;
}

.mood-row label {
  position: relative;
  display: grid;
  place-items: center;
}

.mood-row input {
  position: absolute;
  width: 1px;
  min-height: 1px;
  height: 1px;
  opacity: 0;
}

.mood-row span {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 38px;
  border: 1px solid rgba(43, 35, 28, 0.08);
  border-radius: 999px;
  background: rgba(248, 244, 238, 0.82);
  font-size: 21px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.mood-row input:checked + span {
  border-color: rgba(201, 47, 43, 0.12);
  background: #ffffff;
  box-shadow:
    0 10px 22px rgba(70, 52, 36, 0.11),
    0 0 0 3px rgba(201, 47, 43, 0.08);
}

.diary-mood {
  font-size: 28px;
  line-height: 1;
}

.media-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.media-grid .empty-state {
  grid-column: 1 / -1;
}

.media-card-shell {
  position: relative;
  min-width: 0;
  aspect-ratio: 1;
}

.media-card {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  aspect-ratio: 1;
  overflow: hidden;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(70, 52, 36, 0.08);
}

.media-card img,
.media-card video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.12));
  pointer-events: none;
}

.media-card strong {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.media-card:active {
  transform: scale(0.97);
}

.media-card:focus-visible {
  outline: 3px solid rgba(201, 47, 43, 0.2);
  outline-offset: 2px;
}

.media-select-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 4;
  display: none;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid rgba(60, 60, 67, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: transparent;
  font-size: 15px;
  font-weight: 850;
  line-height: 1;
  box-shadow: 0 8px 18px rgba(70, 52, 36, 0.16);
  backdrop-filter: blur(12px);
}

#appShell.media-selecting .media-select-badge {
  display: grid;
}

.media-card-shell.selected .media-card {
  outline: 3px solid rgba(255, 59, 48, 0.9);
  outline-offset: -3px;
}

.media-card-shell.selected .media-select-badge {
  display: grid;
  border-color: rgba(255, 255, 255, 0.82);
  background: #ff3b30;
  color: #ffffff;
}

.play-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.16);
}

.play-badge::before {
  content: "";
  margin-left: 2px;
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 9px solid #191714;
}

.media-viewer {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 18px;
}

.media-viewer[hidden] {
  display: none;
}

.media-viewer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(14, 12, 10, 0.72);
  backdrop-filter: blur(14px);
}

.media-viewer-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 430px);
  max-height: calc(100vh - 48px);
  overflow: hidden;
  border-radius: 30px;
  background: #0f0d0b;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.42);
}

.media-viewer.is-video .media-viewer-panel {
  background: transparent;
}

.media-viewer-close {
  position: absolute;
  right: 12px;
  top: 12px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: #191714;
  font-size: 26px;
  line-height: 1;
}

.media-viewer-body {
  display: grid;
  place-items: center;
  background: #050505;
}

.media-viewer.is-video .media-viewer-body {
  background: transparent;
}

.media-viewer-body img,
.media-viewer-body video {
  width: 100%;
  max-height: min(76vh, 720px);
  object-fit: contain;
  background: #050505;
}

.media-viewer.is-video .media-viewer-body video {
  aspect-ratio: 9 / 16;
  max-height: calc(100vh - 48px);
  object-fit: cover;
  background: transparent;
}

.media-viewer-caption {
  padding: 14px 16px 16px;
  background: #0f0d0b;
}

.media-viewer.is-video .media-viewer-caption {
  display: none;
}

.media-viewer-caption h2 {
  margin: 0;
  color: #ffffff;
  font-size: 17px;
  line-height: 1.35;
}

.message-form {
  margin-top: 8px;
}

input,
textarea,
.calendar-editor input,
.period-card input {
  border: 1px solid rgba(43, 35, 28, 0.08);
  border-radius: 18px;
  background: rgba(248, 244, 238, 0.9);
  color: #191714;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

input:focus,
textarea:focus {
  border-color: rgba(201, 47, 43, 0.22);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    0 0 0 4px rgba(201, 47, 43, 0.12);
}

.login-card button,
.memory-form button,
.wish-form button,
.message-form button,
.calendar-editor button,
.period-card button {
  border-radius: 18px;
  background: linear-gradient(135deg, #e44945 0%, #b9232a 100%);
  color: #ffffff;
  box-shadow: 0 12px 26px rgba(201, 47, 43, 0.2);
}

.view {
  padding-top: 18px;
}

.hero-memory {
  min-height: 386px;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 30px;
  background:
    linear-gradient(145deg, #fffefd 0%, #efe6db 100%);
  box-shadow: var(--premium-shadow);
}

.hero-memory img,
.hero-memory video {
  transform: scale(1.01);
}

.hero-memory::after {
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0) 42%, rgba(12, 10, 8, 0.76) 100%);
}

.empty-hero,
.hero-copy {
  left: 22px;
  right: 22px;
  bottom: 24px;
}

.empty-hero span,
.hero-copy span {
  color: #f35a55;
  font-size: 12px;
  font-weight: 850;
}

.empty-hero h2,
.hero-copy h2 {
  margin: 9px 0 10px;
  color: #ffffff;
  font-size: 31px;
  font-weight: 880;
  line-height: 1.08;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.18);
}

.empty-hero h2,
.empty-hero p {
  color: #171717;
  text-shadow: none;
}

.empty-hero p,
.hero-copy p {
  color: rgba(255, 255, 255, 0.86);
  font-size: 15px;
  line-height: 1.55;
}

.empty-hero p {
  color: #71685f;
}

.quick-stats {
  gap: 12px;
  margin-top: 14px;
}

.quick-stats button {
  min-height: 100px;
  padding: 18px 10px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--premium-shadow-soft);
}

.quick-stats button:hover {
  background: #ffffff;
}

.quick-stats strong {
  color: #151515;
  font-size: 30px;
  font-weight: 870;
}

.quick-stats span {
  margin-top: 8px;
  color: #786f66;
  font-size: 13px;
  font-weight: 650;
}

.section-head {
  margin: 28px 0 14px;
}

.section-head h2,
.calendar-head h2 {
  color: #151515;
  font-size: 26px;
  font-weight: 880;
  letter-spacing: 0;
}

.timeline article,
.diary-list article,
.date-stack article,
.wish-card,
.empty-state,
.anniversary-preview,
.calendar-panel,
.calendar-editor,
.period-card,
.memory-form {
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--premium-shadow-soft);
}

.timeline article {
  grid-template-columns: 62px 1fr;
  gap: 12px;
  margin-bottom: 12px;
  padding: 16px;
}

.timeline time,
.date-stack time,
.tag {
  color: var(--premium-red);
}

.timeline h3,
.diary-list h3,
.date-stack strong,
.wish-card h3 {
  color: #161616;
  font-weight: 820;
}

.timeline p,
.diary-list p,
.date-stack p {
  color: #766d64;
}

.anniversary-preview {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 241, 238, 0.8));
}

.anniversary-preview p {
  color: var(--premium-red);
}

.filter-row {
  padding-bottom: 12px;
}

.filter-row button {
  min-height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  background: rgba(255, 255, 255, 0.78);
  color: #71685f;
  box-shadow: 0 8px 20px rgba(70, 52, 36, 0.08);
}

.filter-row button.active {
  background: #191714;
  color: #ffffff;
}

.gallery-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  padding-bottom: 12px;
}

.gallery-toolbar .filter-row {
  min-width: 0;
  padding-bottom: 0;
}

.gallery-select-tools {
  display: flex;
  gap: 7px;
}

.gallery-select-toggle,
.gallery-delete-selected {
  min-height: 38px;
  padding: 0 13px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 760;
  box-shadow: var(--ios-shadow);
}

.gallery-select-toggle {
  background: #ffffff;
  color: #191714;
}

.gallery-delete-selected {
  background: #ff3b30;
  color: #ffffff;
}

.media-grid {
  gap: 12px;
}

.media-grid article {
  min-height: 194px;
  border-radius: 28px;
  background: #ffffff;
  box-shadow: var(--premium-shadow-soft);
}

.media-grid article.wide {
  min-height: 252px;
}

.media-grid article::after {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 44%, rgba(12, 10, 8, 0.7));
}

.media-grid strong {
  left: 16px;
  right: 16px;
  bottom: 16px;
  color: #ffffff;
  font-size: 16px;
}

.diary-compose,
.compact-form {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(255, 242, 238, 0.76));
}

.diary-date {
  border-radius: 18px;
  background: #fff0ef;
  color: var(--premium-red);
}

.date-stack .gold-card {
  background: linear-gradient(135deg, #191714 0%, #4d342f 62%, #b9232a 100%);
  color: #ffffff;
}

.gold-card h3 {
  color: #ffffff;
}

.gold-card span,
.gold-card p {
  color: rgba(255, 255, 255, 0.78);
}

.wish-item {
  color: #191714;
}

.calendar-head {
  color: #151515;
}

.calendar-panel,
.calendar-editor,
.period-card {
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--premium-shadow-soft);
}

.calendar-month button {
  background: #f6eee8;
  color: var(--premium-red);
}

.calendar-month strong {
  color: #151515;
  font-size: 23px;
}

.weekday-row {
  color: #9a9087;
}

.calendar-day {
  color: #191714;
}

.calendar-day.has-phase {
  background: color-mix(in srgb, var(--phase-color) 13%, #fffaf4);
}

.calendar-day.has-note.has-phase {
  background: color-mix(in srgb, var(--phase-color) 13%, #fffaf4);
}

.calendar-day.selected {
  background: #fff2f1;
  box-shadow: inset 0 0 0 2px var(--premium-red);
}

.calendar-day.today time {
  background: var(--premium-red);
}

.calendar-day.selected:not(.today) time {
  color: var(--premium-red);
}

.period-legend span {
  background: #f6eee8;
  color: #504840;
}

.bottom-nav {
  bottom: 14px;
  width: min(calc(100vw - 28px), 402px);
  min-height: 68px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 18px 50px rgba(70, 52, 36, 0.15);
  backdrop-filter: saturate(130%) blur(24px);
}

.bottom-nav button {
  border-radius: 22px;
  color: #72695f;
  font-size: 13px;
  font-weight: 760;
}

.bottom-nav button.active {
  background: #191714;
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(25, 23, 20, 0.16);
}

.toast {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 22px;
  background: rgba(25, 23, 20, 0.9);
}

.diary-list article {
  grid-template-columns: 58px minmax(0, 1fr);
}

.diary-list article > div:last-child {
  min-width: 0;
  max-width: 100%;
}

.diary-list p {
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
}

.hero-copy,
.timeline article > div:last-child {
  min-width: 0;
}

.hero-copy h2,
.hero-copy p,
.timeline h3,
.timeline p {
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
}

.hero-cover-button {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--premium-red);
  font-size: 13px;
  font-weight: 780;
  box-shadow: 0 10px 24px rgba(70, 52, 36, 0.14);
  backdrop-filter: saturate(130%) blur(18px);
}

.hero-cover-button:active {
  transform: translateY(1px);
}

.hero-memory {
  height: clamp(348px, 90vw, 386px);
  min-height: 0;
}

.hero-memory img,
.hero-memory video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.date-stack .gold-card {
  display: flex;
  flex-direction: column;
  height: 118px;
  min-height: 118px;
  padding: 18px;
  overflow: hidden;
}

.gold-card h3 {
  margin: 0;
  font-size: 25px;
  line-height: 1.12;
}

.gold-card small {
  display: -webkit-box;
  margin: 7px 0 0;
  font-size: 12px;
  line-height: 1.25;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.gold-card p {
  margin: auto 0 0;
  font-size: 16px;
}

@media (max-width: 360px) {
  .phone-shell {
    padding-inline: 12px;
  }

  .top-area {
    margin-inline: -12px;
    padding-inline: 12px;
  }

  .app-top {
    grid-template-columns: 54px minmax(0, 1fr) 38px;
  }

  .app-top h1 {
    font-size: 21px;
  }

  .day-card strong {
    font-size: 29px;
  }

  .quick-stats button {
    min-height: 88px;
  }
}

/* A1 cream puff skin */
:root {
  color-scheme: light;
  --bg: #fff9f5;
  --bg-2: #ffe4ed;
  --bg-3: #ffd0dd;
  --card: rgba(255, 255, 255, 0.78);
  --card-strong: #fff7fb;
  --panel: rgba(255, 255, 255, 0.78);
  --panel-2: #fff0f5;
  --accent: #ff5d86;
  --accent-2: #ff8eaa;
  --accent-soft: #ffc8d8;
  --ink: #57313d;
  --muted: rgba(87, 49, 61, 0.58);
  --line: rgba(255, 116, 153, 0.18);
  --danger: #ff5f78;
  --gold: #ff5d86;
  --premium-red: #ff5d86;
  --premium-red-soft: #fff0f5;
  --premium-cream: #fff9f5;
  --cream-shadow: 0 18px 44px rgba(175, 73, 103, 0.16);
  --cream-shadow-soft: 0 10px 26px rgba(175, 73, 103, 0.11);
  --cream-inset:
    inset 4px 4px 10px rgba(255, 255, 255, 0.76),
    inset -6px -8px 14px rgba(255, 126, 161, 0.12);
  --button-shadow:
    inset 3px 3px 7px rgba(255, 255, 255, 0.5),
    inset -5px -7px 12px rgba(186, 32, 76, 0.18),
    0 14px 28px rgba(255, 93, 134, 0.25);
  --font-soft: -apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans SC", "Helvetica Neue", sans-serif;
}

html,
body {
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.98), transparent 22rem),
    linear-gradient(90deg, #f1eef2 0%, #fff9f5 48%, #f1eef2 100%);
  color: var(--ink);
  font-family: var(--font-soft);
}

button,
input,
textarea {
  font-family: var(--font-soft);
}

button {
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

button:active {
  transform: translateY(1px) scale(0.985);
}

.phone-shell {
  position: relative;
  width: min(100vw, 430px);
  min-height: 100vh;
  padding: 0 16px 108px;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 18% 5%, rgba(255, 255, 255, 0.92), transparent 9rem),
    radial-gradient(circle at 88% 4%, rgba(255, 199, 218, 0.62), transparent 10rem),
    linear-gradient(180deg, #fffaf7 0%, #ffeaf1 46%, #ffd7e3 100%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.7),
    0 28px 88px rgba(123, 66, 83, 0.18);
}

.phone-shell::before {
  content: "";
  position: fixed;
  left: 50%;
  top: 0;
  z-index: 0;
  width: min(100vw, 430px);
  height: 100vh;
  transform: translateX(-50%);
  background:
    linear-gradient(125deg, rgba(255, 255, 255, 0.45), transparent 34%),
    radial-gradient(circle at 18% 17%, rgba(255, 255, 255, 0.75), transparent 6rem),
    radial-gradient(circle at 78% 84%, rgba(255, 93, 134, 0.13), transparent 9rem);
  pointer-events: none;
}

.phone-shell > * {
  position: relative;
  z-index: 1;
}

.login-screen {
  align-content: center;
  gap: 14px;
  min-height: 100vh;
  padding: 34px 8px;
  color: var(--ink);
}

.museum-mark {
  width: 78px;
  height: 78px;
  border-radius: 30px;
  background: linear-gradient(145deg, #ff98b4, #ff5d86 62%, #ff7a99);
  color: #ffffff;
  font-size: 20px;
  font-weight: 900;
  text-transform: lowercase;
  box-shadow: var(--button-shadow);
  transform: rotate(-8deg);
}

.museum-mark::before {
  content: "♥";
  position: absolute;
  right: 11px;
  top: 8px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 13px;
}

.login-screen p {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.login-screen h1 {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: clamp(34px, 10vw, 44px);
  font-weight: 900;
  letter-spacing: 0;
}

.login-card,
.memory-form,
.wish-card,
.empty-state,
.calendar-panel,
.calendar-editor,
.period-card,
.diary-list article,
.timeline article,
.message-history article,
.date-stack article,
.quick-stats button,
.anniversary-preview,
.message-board,
.day-card {
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 30px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(255, 238, 245, 0.74)),
    var(--card);
  box-shadow: var(--cream-shadow-soft);
  color: var(--ink);
}

.login-card,
.memory-form,
.period-card,
.calendar-editor,
.wish-card {
  padding: 22px;
  box-shadow: var(--cream-shadow), var(--cream-inset);
}

input,
textarea,
.calendar-editor input,
.period-card input {
  min-height: 48px;
  border: 1px solid rgba(255, 116, 153, 0.16);
  border-radius: 22px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.7), rgba(255, 240, 246, 0.68)),
    #fff8fb;
  color: var(--ink);
  box-shadow:
    inset 2px 3px 8px rgba(130, 71, 88, 0.08),
    inset -3px -4px 8px rgba(255, 255, 255, 0.82);
}

input::placeholder,
textarea::placeholder {
  color: rgba(87, 49, 61, 0.38);
}

input:focus,
textarea:focus {
  border-color: rgba(255, 93, 134, 0.45);
  box-shadow:
    inset 2px 3px 8px rgba(130, 71, 88, 0.08),
    inset -3px -4px 8px rgba(255, 255, 255, 0.82),
    0 0 0 4px rgba(255, 142, 170, 0.18);
}

.login-card button,
.memory-form button,
.wish-form button,
.message-form button,
.calendar-editor button,
.period-card button {
  min-height: 48px;
  border-radius: 22px;
  background: linear-gradient(145deg, #ff8eaa, #ff5d86);
  color: #ffffff;
  font-weight: 900;
  box-shadow: var(--button-shadow);
}

.top-area {
  margin: 0 -16px;
  padding: 18px 16px 14px;
  background:
    linear-gradient(180deg, rgba(255, 249, 245, 0.94), rgba(255, 240, 246, 0.78));
  border-bottom: 1px solid rgba(255, 116, 153, 0.12);
  backdrop-filter: saturate(135%) blur(22px);
}

.app-top {
  grid-template-columns: 58px minmax(0, 1fr) 42px;
  gap: 12px;
}

.app-top h1 {
  color: var(--ink);
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 0;
}

.avatar {
  width: 56px;
  height: 52px;
  filter: drop-shadow(0 14px 24px rgba(255, 93, 134, 0.24));
}

.avatar::before {
  background: linear-gradient(145deg, #ffa0b9 0%, #ff5d86 48%, #ff7a99 100%);
}

.avatar::after {
  background: rgba(255, 255, 255, 0.44);
}

.icon-button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(255, 225, 236, 0.82));
  color: var(--accent);
  box-shadow:
    inset 2px 2px 5px rgba(255, 255, 255, 0.86),
    0 10px 24px rgba(175, 73, 103, 0.12);
}

.day-card {
  margin-top: 18px;
  padding: 22px 20px;
  overflow: hidden;
  background:
    radial-gradient(circle at 86% 20%, rgba(255, 255, 255, 0.92), transparent 4.5rem),
    linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(255, 228, 237, 0.8));
  box-shadow: var(--cream-shadow), var(--cream-inset);
}

.day-card::after {
  content: "♥";
  position: absolute;
  right: 18px;
  top: 14px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 18px;
  background: linear-gradient(145deg, #fff9fb, #ffdce8);
  color: var(--accent);
  font-size: 18px;
  transform: rotate(9deg);
  box-shadow:
    inset 3px 3px 6px rgba(255, 255, 255, 0.86),
    0 12px 22px rgba(255, 93, 134, 0.18);
}

.day-card span,
.day-card time,
.quick-stats span,
.timeline p,
.diary-list p,
.date-stack p,
.wish-empty,
.empty-state,
.period-card-title span,
.period-card label span {
  color: var(--muted);
}

.day-card strong {
  color: var(--ink);
  font-size: clamp(34px, 10vw, 44px);
  font-weight: 950;
}

.message-board {
  margin-top: 12px;
  padding: 16px;
  border-radius: 28px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(255, 238, 245, 0.76));
  box-shadow: var(--cream-shadow-soft), var(--cream-inset);
}

.message-board span,
.calendar-editor > span,
.empty-hero span,
.hero-copy span,
.section-head button,
.anniversary-preview span,
.timeline time,
.date-stack time,
.tag {
  color: var(--accent);
}

.message-board p,
.wish-item,
.message-history p {
  color: var(--ink);
}

.message-board > button,
.section-head button,
.calendar-head button,
.gallery-select-toggle,
.gallery-delete-selected,
.delete-action,
.hero-cover-button {
  border: 1px solid rgba(255, 116, 153, 0.16);
  border-radius: 999px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(255, 226, 236, 0.82));
  color: var(--accent);
  font-weight: 850;
  box-shadow:
    inset 2px 2px 5px rgba(255, 255, 255, 0.78),
    0 9px 20px rgba(175, 73, 103, 0.1);
}

.gallery-delete-selected,
.delete-action {
  background: rgba(255, 240, 246, 0.9);
  color: var(--danger);
}

.view {
  padding-top: 20px;
}

.view.active {
  animation: rise 240ms ease both;
}

.hero-memory {
  height: clamp(348px, 90vw, 386px);
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.84);
  border-radius: 34px;
  background:
    radial-gradient(circle at 22% 15%, rgba(255, 255, 255, 0.88), transparent 7rem),
    linear-gradient(145deg, #ffc8d8 0%, #fff4f8 58%, #fffaf7 100%);
  box-shadow: var(--cream-shadow), var(--cream-inset);
}

.hero-memory::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(125deg, rgba(255, 255, 255, 0.36), transparent 38%),
    radial-gradient(circle at 18% 16%, rgba(255, 255, 255, 0.72), transparent 4rem);
  pointer-events: none;
}

.hero-memory::after {
  z-index: 2;
  background: linear-gradient(180deg, rgba(87, 49, 61, 0) 42%, rgba(87, 49, 61, 0.58) 100%);
}

.hero-memory img,
.hero-memory video {
  position: absolute;
  inset: 0;
  object-fit: cover;
}

.empty-hero,
.hero-copy {
  z-index: 3;
  left: 24px;
  right: 24px;
  bottom: 25px;
}

.empty-hero h2,
.hero-copy h2 {
  margin: 9px 0 9px;
  font-size: 30px;
  font-weight: 950;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.hero-copy h2,
.hero-copy p {
  color: #ffffff;
  text-shadow: 0 2px 16px rgba(87, 49, 61, 0.28);
}

.empty-hero h2,
.empty-hero p {
  color: var(--ink);
}

.hero-cover-button {
  top: 17px;
  right: 17px;
  z-index: 4;
  min-height: 38px;
  padding: 0 15px;
  color: var(--accent);
}

.quick-stats {
  gap: 12px;
  margin-top: 14px;
}

.quick-stats button {
  min-height: 96px;
  padding: 16px 8px;
  border-radius: 28px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(255, 235, 242, 0.78));
  box-shadow: var(--cream-shadow-soft), var(--cream-inset);
}

.quick-stats strong {
  color: var(--ink);
  font-size: 30px;
  font-weight: 950;
}

.section-head {
  margin: 26px 0 14px;
}

.section-head h2,
.calendar-head h2,
.wish-card h3 {
  color: var(--ink);
  font-size: 26px;
  font-weight: 950;
}

.sticky-title {
  top: 112px;
  background: rgba(255, 249, 245, 0.84);
  backdrop-filter: saturate(135%) blur(18px);
}

.timeline {
  border-left: 0;
}

.timeline article {
  grid-template-columns: 60px minmax(0, 1fr);
  gap: 12px;
  margin-bottom: 12px;
  padding: 16px;
  border-radius: 25px;
}

.timeline h3,
.diary-list h3,
.date-stack strong {
  color: var(--ink);
}

.anniversary-preview {
  padding: 18px;
  border-radius: 28px;
  background:
    radial-gradient(circle at 82% 18%, rgba(255, 255, 255, 0.78), transparent 4rem),
    linear-gradient(135deg, rgba(255, 199, 216, 0.8), rgba(255, 247, 251, 0.9));
  box-shadow: var(--cream-shadow-soft), var(--cream-inset);
}

.anniversary-preview p {
  color: var(--accent);
}

.message-history {
  gap: 13px;
}

.message-history article {
  padding: 18px;
  border-radius: 28px;
}

.message-empty,
.empty-state,
.wish-empty {
  color: var(--muted);
}

.calendar-head {
  color: var(--ink);
}

.calendar-panel,
.calendar-editor,
.period-card {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(255, 238, 245, 0.76));
}

.calendar-month button {
  min-height: 40px;
  border-radius: 50%;
  background: linear-gradient(145deg, #ffffff, #ffe4ed);
  color: var(--accent);
  box-shadow:
    inset 2px 2px 5px rgba(255, 255, 255, 0.86),
    0 8px 18px rgba(175, 73, 103, 0.12);
}

.calendar-month strong {
  color: var(--ink);
  font-weight: 950;
}

.weekday-row {
  color: rgba(87, 49, 61, 0.48);
}

.calendar-day,
.calendar-blank {
  border-radius: 16px;
}

.calendar-day {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.42);
}

.calendar-day.has-phase {
  background: color-mix(in srgb, var(--phase-color) 16%, #fff9f5);
}

.calendar-day.has-note.has-phase {
  background: color-mix(in srgb, var(--phase-color) 16%, #fff9f5);
}

.calendar-day.selected {
  background: #fff1f6;
  box-shadow:
    inset 0 0 0 2px var(--accent),
    0 8px 18px rgba(255, 93, 134, 0.14);
}

.calendar-day.today time {
  background: linear-gradient(145deg, #ff8eaa, #ff5d86);
  color: #ffffff;
}

.calendar-day.selected:not(.today) time {
  color: var(--accent);
}

.phase-chip {
  background: color-mix(in srgb, var(--phase-color) 70%, #ffffff);
}

.period-legend span {
  background: rgba(255, 255, 255, 0.58);
  color: var(--ink);
}

.color-row span {
  box-shadow:
    inset 2px 2px 4px rgba(255, 255, 255, 0.6),
    0 8px 16px rgba(175, 73, 103, 0.12);
}

.color-row input:checked + span {
  border-color: #ffffff;
  box-shadow:
    0 0 0 3px rgba(255, 93, 134, 0.26),
    0 8px 16px rgba(175, 73, 103, 0.12);
}

.gallery-toolbar {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
  padding-bottom: 14px;
}

.filter-row {
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 0;
}

.filter-row button {
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 999px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(255, 235, 242, 0.78));
  color: var(--muted);
  box-shadow: var(--cream-shadow-soft);
}

.filter-row button.active {
  background: linear-gradient(145deg, #ff8eaa, #ff5d86);
  color: #ffffff;
  box-shadow: var(--button-shadow);
}

.gallery-select-tools {
  display: flex;
  gap: 7px;
}

.gallery-select-toggle,
.gallery-delete-selected {
  min-height: 40px;
  padding: 0 14px;
}

.media-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.media-card {
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 22px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(255, 238, 245, 0.8));
  box-shadow: var(--cream-shadow-soft);
}

.media-card::after {
  background: linear-gradient(180deg, rgba(87, 49, 61, 0), rgba(87, 49, 61, 0.16));
}

.media-select-badge {
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 8px 18px rgba(175, 73, 103, 0.16);
}

.media-card-shell.selected .media-card {
  outline: 3px solid rgba(255, 93, 134, 0.88);
}

.media-card-shell.selected .media-select-badge {
  background: linear-gradient(145deg, #ff8eaa, #ff5d86);
}

.play-badge {
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 9px 20px rgba(87, 49, 61, 0.18);
}

.gallery-upload-add {
  width: 58px;
  height: 58px;
  border-radius: 22px;
  background: linear-gradient(145deg, #ff8eaa, #ff5d86);
  color: #ffffff;
  box-shadow: var(--button-shadow);
}

.diary-compose,
.compact-form {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(255, 238, 245, 0.78));
}

.mood-row {
  gap: 7px;
  padding: 0 0 8px;
}

.mood-row span {
  min-height: 40px;
  border: 1px solid rgba(255, 116, 153, 0.15);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(255, 233, 241, 0.74));
  box-shadow:
    inset 2px 2px 5px rgba(255, 255, 255, 0.82),
    0 8px 16px rgba(175, 73, 103, 0.08);
}

.mood-row input:checked + span {
  border-color: rgba(255, 93, 134, 0.3);
  background: #ffffff;
  box-shadow:
    0 10px 22px rgba(175, 73, 103, 0.14),
    0 0 0 4px rgba(255, 142, 170, 0.16);
}

.diary-list {
  gap: 14px;
}

.diary-list article {
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 14px;
  padding: 18px;
  border-radius: 30px;
}

.diary-date {
  min-height: 64px;
  border-radius: 23px;
  background:
    linear-gradient(145deg, #fff3f7, #ffe1eb);
  color: var(--accent);
  box-shadow:
    inset 2px 2px 5px rgba(255, 255, 255, 0.78),
    0 8px 16px rgba(175, 73, 103, 0.1);
}

.diary-date span {
  font-size: 22px;
}

.diary-mood {
  font-size: 27px;
}

.record-actions .tag,
.tag {
  background: #fff0f5;
  color: var(--accent);
}

.delete-action {
  min-height: 32px;
  margin-top: 0;
}

.date-stack {
  gap: 14px;
}

.date-stack .gold-card {
  display: flex;
  flex-direction: column;
  height: 118px;
  min-height: 118px;
  padding: 18px;
  overflow: hidden;
  border-radius: 30px;
  background:
    radial-gradient(circle at 86% 20%, rgba(255, 255, 255, 0.48), transparent 4.8rem),
    linear-gradient(135deg, #ffb2c5 0%, #ff7fa0 48%, #ff5d86 100%);
  color: #ffffff;
  box-shadow: var(--cream-shadow), var(--cream-inset);
}

.gold-card h3 {
  margin: 0;
  color: #ffffff;
  font-size: 25px;
  line-height: 1.12;
  text-shadow: 0 2px 12px rgba(144, 43, 74, 0.18);
}

.gold-card small {
  display: -webkit-box;
  margin: 7px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
  line-height: 1.25;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.gold-card p {
  margin: auto 0 0;
  color: rgba(255, 255, 255, 0.92);
  font-size: 16px;
}

.wish-card {
  margin-top: 14px;
}

.wish-form {
  grid-template-columns: minmax(0, 1fr) 78px;
  gap: 10px;
}

.wish-item {
  min-width: 0;
  min-height: 46px;
  padding: 8px 8px 8px 4px;
  border-radius: 18px;
}

.wish-item input {
  width: 22px;
  min-height: 22px;
  height: 22px;
  border-radius: 50%;
  accent-color: var(--accent);
}

.wish-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wish-delete-backdrop,
.media-viewer-backdrop {
  background: rgba(87, 49, 61, 0.28);
  backdrop-filter: blur(16px);
}

.wish-delete-panel {
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 34px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(255, 238, 245, 0.84));
  color: var(--ink);
  box-shadow: 0 28px 72px rgba(117, 62, 80, 0.22);
}

.wish-delete-confirm {
  background: linear-gradient(145deg, #ff8eaa, #ff5d86);
  color: #ffffff;
  box-shadow: var(--button-shadow);
}

.wish-delete-cancel {
  background: #fff3f7;
  color: var(--ink);
}

.media-viewer-panel {
  width: min(100%, 430px);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 34px;
  background: #2f1d25;
  box-shadow: 0 28px 80px rgba(87, 49, 61, 0.34);
}

.media-viewer-close {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(255, 226, 236, 0.86));
  color: var(--ink);
  box-shadow: 0 10px 24px rgba(87, 49, 61, 0.18);
}

.media-viewer-caption {
  background: #2f1d25;
}

.media-viewer-caption h2 {
  color: #fff8fb;
}

.bottom-nav {
  bottom: 14px;
  width: min(calc(100vw - 28px), 402px);
  min-height: 70px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow:
    inset 2px 2px 5px rgba(255, 255, 255, 0.82),
    0 18px 50px rgba(175, 73, 103, 0.16);
  backdrop-filter: saturate(135%) blur(24px);
}

.bottom-nav button {
  border-radius: 24px;
  color: rgba(87, 49, 61, 0.62);
  font-size: 13px;
  font-weight: 850;
}

.bottom-nav button.active {
  background: linear-gradient(145deg, #ff8eaa, #ff5d86);
  color: #ffffff;
  box-shadow: var(--button-shadow);
}

.toast {
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 24px;
  background: rgba(87, 49, 61, 0.9);
  color: #fff8fb;
  box-shadow: 0 18px 42px rgba(87, 49, 61, 0.24);
}

@media (max-width: 390px) {
  .phone-shell {
    padding-inline: 14px;
  }

  .top-area {
    margin-inline: -14px;
    padding-inline: 14px;
  }

  .app-top h1 {
    font-size: 24px;
  }

  .quick-stats button {
    min-height: 88px;
  }

  .media-grid {
    gap: 8px;
  }

  .bottom-nav {
    width: min(calc(100vw - 24px), 402px);
  }
}
