:root {
  color-scheme: light;
  --ink: #2d2530;
  --muted: #756a72;
  --paper: rgba(255, 255, 255, 0.78);
  --line: rgba(92, 62, 76, 0.16);
  --rose: #ff6f9f;
  --rose-dark: #d93f78;
  --mint: #a8e8d4;
  --lemon: #ffe08a;
  --lilac: #b8a2ff;
  --sky: #91d9ff;
  --shadow: 0 24px 70px rgba(122, 78, 96, 0.2);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 12% 16%, rgba(255, 224, 138, 0.65), transparent 28%),
    radial-gradient(circle at 86% 10%, rgba(145, 217, 255, 0.6), transparent 24%),
    linear-gradient(135deg, #fff7fb 0%, #f4fffb 48%, #fff9e6 100%);
  overflow-x: hidden;
}

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

button {
  cursor: pointer;
}

.ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.bubble,
.spark {
  position: absolute;
  display: block;
  opacity: 0.72;
}

.bubble {
  width: 9rem;
  aspect-ratio: 1;
  border-radius: 999px;
  filter: blur(1px);
  animation: float 10s ease-in-out infinite;
}

.bubble-a {
  left: -2rem;
  top: 20%;
  background: rgba(255, 111, 159, 0.24);
}

.bubble-b {
  right: 4%;
  bottom: 12%;
  background: rgba(168, 232, 212, 0.42);
  animation-delay: -4s;
}

.bubble-c {
  right: 22%;
  top: -3rem;
  background: rgba(184, 162, 255, 0.24);
  animation-delay: -7s;
}

.spark {
  width: 1.1rem;
  aspect-ratio: 1;
  border-radius: 42% 58% 55% 45%;
  background: var(--rose);
  transform: rotate(45deg);
  animation: twinkle 3.8s ease-in-out infinite;
}

.spark-a {
  left: 12%;
  bottom: 18%;
}

.spark-b {
  left: 53%;
  top: 12%;
  background: var(--lemon);
  animation-delay: -1.3s;
}

.spark-c {
  right: 12%;
  top: 42%;
  background: var(--mint);
  animation-delay: -2.2s;
}

.shell {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1.1fr);
  gap: 28px;
  align-items: center;
  padding: 32px 0;
}

.welcome-panel,
.app-panel {
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: var(--paper);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}

.welcome-panel {
  min-height: 680px;
  border-radius: 34px;
  padding: 34px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.brand-mark {
  width: 42px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: white;
  background: linear-gradient(145deg, var(--rose), var(--lilac));
  box-shadow: 0 12px 24px rgba(217, 63, 120, 0.24);
}

.hero-copy {
  max-width: 450px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--rose-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2 {
  margin: 0;
  font-family: "Playfair Display", Georgia, serif;
  line-height: 1;
}

h1 {
  max-width: 11ch;
  font-size: clamp(3.9rem, 7vw, 6.6rem);
}

h2 {
  font-size: clamp(2.1rem, 4vw, 3.5rem);
}

h3 {
  margin: 0;
  font-size: 1.02rem;
}

.hero-text {
  max-width: 34rem;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

.phone-preview {
  position: relative;
  width: min(330px, 100%);
  min-height: 390px;
  margin-left: auto;
  border-radius: 38px;
  padding: 22px;
  background: linear-gradient(160deg, #ffffff 0%, #fff0f6 100%);
  box-shadow: inset 0 0 0 1px rgba(92, 62, 76, 0.1), 0 24px 60px rgba(217, 63, 120, 0.2);
  transform: rotate(-3deg);
  animation: phoneSway 6s ease-in-out infinite;
}

.preview-top {
  display: flex;
  gap: 7px;
  margin-bottom: 58px;
}

.preview-top span {
  width: 10px;
  aspect-ratio: 1;
  border-radius: 99px;
  background: var(--line);
}

.preview-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 20px 45px rgba(122, 78, 96, 0.12);
}

.preview-card strong,
.preview-card small {
  display: block;
}

.preview-card small {
  margin-top: 8px;
  color: var(--muted);
}

.preview-card-main {
  transform: translateX(-8px);
}

.preview-card-small {
  width: 72%;
  margin: 18px 0 0 auto;
  background: #f2fff9;
}

.preview-pill {
  display: inline-flex;
  margin-bottom: 14px;
  border-radius: 999px;
  padding: 7px 12px;
  color: #7a3858;
  background: #ffe1ed;
  font-size: 0.78rem;
  font-weight: 800;
}

.app-panel {
  min-height: 680px;
  border-radius: 30px;
  padding: clamp(20px, 3vw, 34px);
}

.hidden {
  display: none !important;
}

.notice {
  margin-bottom: 18px;
  border: 1px solid rgba(217, 63, 120, 0.26);
  border-radius: 18px;
  padding: 14px 16px;
  color: #78304e;
  background: rgba(255, 225, 237, 0.84);
}

.auth-view {
  min-height: 600px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.panel-heading {
  margin-bottom: 26px;
}

.form-stack,
.item-form {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 15px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.78);
  outline: 0;
  transition: border 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

textarea {
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(217, 63, 120, 0.55);
  box-shadow: 0 0 0 4px rgba(255, 111, 159, 0.12);
}

.primary-button,
.ghost-button,
.icon-button {
  border: 0;
  border-radius: 16px;
  font-weight: 900;
  transition: transform 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
}

.primary-button {
  min-height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 18px;
  color: white;
  background: linear-gradient(135deg, var(--rose), #ff9f6e);
  box-shadow: 0 16px 32px rgba(217, 63, 120, 0.26);
}

.primary-button:hover,
.ghost-button:hover,
.icon-button:hover {
  transform: translateY(-2px);
}

.primary-button:disabled {
  cursor: wait;
  opacity: 0.65;
  transform: none;
}

.status-text {
  min-height: 1.4em;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.dashboard-head,
.list-toolbar,
.wish-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.dashboard-head {
  margin-bottom: 22px;
}

.view-switcher {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 6px;
  background: rgba(255, 255, 255, 0.48);
}

.view-tab {
  min-height: 44px;
  border: 0;
  border-radius: 13px;
  color: var(--muted);
  background: transparent;
  font-weight: 900;
  transition: color 180ms ease, background 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.view-tab:hover {
  transform: translateY(-1px);
}

.view-tab.active {
  color: white;
  background: linear-gradient(135deg, var(--rose), var(--lilac));
  box-shadow: 0 12px 24px rgba(217, 63, 120, 0.2);
}

.icon-button {
  width: 48px;
  aspect-ratio: 1;
  color: var(--rose-dark);
  background: #ffe1ed;
}

.item-form {
  grid-template-columns: 1fr 0.72fr;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.48);
}

.wide-field,
.add-button {
  grid-column: 1 / -1;
}

.list-toolbar {
  margin: 22px 0 14px;
}

.list-toolbar .status-text {
  margin: 0;
}

.list-toolbar select,
.wish-status {
  max-width: 150px;
  padding: 11px 12px;
  border-radius: 13px;
  font-size: 0.86rem;
  font-weight: 800;
}

.items-list {
  display: grid;
  gap: 12px;
}

.wish-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.66);
  box-shadow: 0 16px 35px rgba(122, 78, 96, 0.1);
  animation: cardIn 360ms ease both;
}

.wish-main {
  min-width: 0;
}

.status-badge {
  display: inline-flex;
  margin-bottom: 8px;
  border-radius: 999px;
  padding: 5px 9px;
  color: #7a3858;
  background: #ffe1ed;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.status-badge.reserved {
  color: #37664f;
  background: #dcfff1;
}

.status-badge.bought {
  color: #6e5516;
  background: #fff0b8;
}

.wish-meta,
.wish-note {
  margin: 7px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.wish-link {
  display: inline-flex;
  margin-top: 12px;
  color: var(--rose-dark);
  font-weight: 900;
  text-decoration: none;
}

.wish-link:hover {
  text-decoration: underline;
}

.wish-actions {
  align-items: flex-start;
  flex-direction: column;
}

.ghost-button {
  min-height: 42px;
  padding: 0 14px;
  color: #8b3159;
  background: #fff0f6;
}

.empty-state {
  border: 1px dashed rgba(217, 63, 120, 0.32);
  border-radius: 24px;
  padding: 34px 18px;
  text-align: center;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.42);
}

.empty-state div {
  color: var(--rose);
  font-size: 3rem;
}

.empty-state h3 {
  margin-top: 8px;
  color: var(--ink);
}

.photos-panel {
  position: relative;
  min-height: 500px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: 18px;
  background:
    radial-gradient(circle at 12% 16%, rgba(255, 224, 138, 0.52), transparent 22%),
    radial-gradient(circle at 84% 8%, rgba(145, 217, 255, 0.42), transparent 22%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.7), rgba(255, 240, 246, 0.72));
}

.photo-sky {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.balloon {
  position: absolute;
  width: 42px;
  height: 54px;
  border-radius: 48% 48% 46% 46%;
  background: linear-gradient(145deg, #ff8cb6, #ff5e94);
  box-shadow: inset -8px -10px 0 rgba(122, 45, 78, 0.08);
  animation: balloonFloat 7s ease-in-out infinite;
}

.balloon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 52px;
  width: 1px;
  height: 52px;
  background: rgba(122, 78, 96, 0.26);
}

.balloon-a {
  right: 16px;
  top: 58px;
}

.balloon-b {
  left: 18px;
  top: 180px;
  background: linear-gradient(145deg, #b8a2ff, #8fd8ff);
  animation-delay: -2.4s;
}

.balloon-c {
  right: 22%;
  bottom: 34px;
  background: linear-gradient(145deg, #ffe08a, #ffa879);
  animation-delay: -4.2s;
}

.floating-heart {
  position: absolute;
  color: rgba(217, 63, 120, 0.56);
  font-size: 1.2rem;
  animation: heartDrift 5.5s ease-in-out infinite;
}

.heart-a {
  left: 12%;
  top: 62px;
}

.heart-b {
  right: 18%;
  top: 168px;
  color: rgba(184, 162, 255, 0.72);
  animation-delay: -1.4s;
}

.heart-c {
  left: 46%;
  bottom: 42px;
  color: rgba(255, 159, 110, 0.72);
  animation-delay: -2.8s;
}

.heart-d {
  right: 8%;
  bottom: 128px;
  animation-delay: -3.7s;
}

.photo-heading {
  position: relative;
  z-index: 1;
  margin-bottom: 16px;
}

.photo-heading h3 {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1;
}

.photo-controls {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.photo-control-button {
  width: 44px;
  aspect-ratio: 1;
  border: 0;
  border-radius: 15px;
  color: var(--rose-dark);
  background: rgba(255, 225, 237, 0.9);
  font-size: 1.45rem;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 12px 24px rgba(217, 63, 120, 0.14);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.photo-control-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(217, 63, 120, 0.2);
}

.photo-controls .status-text {
  min-height: auto;
  margin: 0;
  text-align: center;
  font-weight: 900;
}

.photos-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.photo-card {
  position: relative;
  min-width: 0;
  margin: 0;
  border: 8px solid rgba(255, 255, 255, 0.9);
  border-bottom-width: 42px;
  border-radius: 10px;
  background: white;
  box-shadow: 0 18px 40px rgba(122, 78, 96, 0.18);
  transform: rotate(var(--tilt));
  animation: photoPop 420ms ease both;
  animation-delay: var(--delay);
}

.photo-card:nth-child(3n) {
  grid-column: span 2;
}

.photo-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 4px;
  background: #fff0f6;
}

.photo-card figcaption {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: -32px;
  color: #7a3858;
  font-size: 0.8rem;
  font-weight: 900;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@keyframes float {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(12px, -18px, 0) scale(1.04);
  }
}

@keyframes twinkle {
  0%,
  100% {
    transform: rotate(45deg) scale(0.78);
    opacity: 0.42;
  }
  50% {
    transform: rotate(45deg) scale(1.08);
    opacity: 0.9;
  }
}

@keyframes phoneSway {
  0%,
  100% {
    transform: rotate(-3deg) translateY(0);
  }
  50% {
    transform: rotate(-1deg) translateY(-8px);
  }
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes balloonFloat {
  0%,
  100% {
    transform: translateY(0) rotate(-3deg);
  }
  50% {
    transform: translateY(-18px) rotate(4deg);
  }
}

@keyframes heartDrift {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(0.9);
    opacity: 0.48;
  }
  50% {
    transform: translate3d(8px, -14px, 0) scale(1.18);
    opacity: 0.92;
  }
}

@keyframes photoPop {
  from {
    opacity: 0;
    transform: rotate(var(--tilt)) translateY(12px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: rotate(var(--tilt)) translateY(0) scale(1);
  }
}

@media (max-width: 900px) {
  .shell {
    grid-template-columns: 1fr;
    align-items: stretch;
    width: min(680px, calc(100% - 24px));
    padding: 12px 0;
  }

  .welcome-panel,
  .app-panel {
    min-height: auto;
    border-radius: 26px;
  }

  .welcome-panel {
    gap: 26px;
    padding: 24px;
  }

  h1 {
    max-width: 12ch;
    font-size: clamp(3rem, 14vw, 4.8rem);
  }

  .phone-preview {
    width: 100%;
    min-height: 270px;
    transform: none;
  }
}

@media (max-width: 560px) {
  .shell {
    width: min(100% - 18px, 480px);
  }

  .welcome-panel {
    padding: 20px;
  }

  .app-panel {
    padding: 18px;
  }

  .hero-text {
    font-size: 0.98rem;
  }

  .item-form,
  .wish-card {
    grid-template-columns: 1fr;
  }

  .dashboard-head,
  .list-toolbar {
    align-items: flex-start;
  }

  .list-toolbar {
    flex-direction: column;
  }

  .list-toolbar select,
  .wish-status {
    max-width: none;
  }

  .wish-actions {
    width: 100%;
  }

  .ghost-button {
    width: 100%;
  }

  .photos-grid {
    grid-template-columns: 1fr;
  }

  .photo-card:nth-child(3n) {
    grid-column: auto;
  }
}

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