:root {
  --cream: #fff8e8;
  --milk: #fffdf7;
  --gold: #f7b85b;
  --orange: #ec7f3a;
  --rose: #e96d74;
  --ink: #3f2b1f;
  --soft-ink: #7a5b45;
  --line: #f1d6a5;
  --shadow: 0 18px 50px rgba(111, 68, 28, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  line-height: 1.7;
}

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

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.hero {
  min-height: 92vh;
  padding: 22px clamp(18px, 4vw, 58px) 48px;
  background:
    radial-gradient(circle at 82% 18%, rgba(255, 255, 255, 0.9) 0 10%, transparent 27%),
    linear-gradient(135deg, #fffdf7 0%, #fff0c9 46%, #ffd59a 100%);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  max-width: 1120px;
  margin: 0 auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 1.08rem;
  font-weight: 800;
  text-decoration: none;
}

.brand img {
  width: 46px;
  height: 46px;
  border: 3px solid #fff;
  border-radius: 50%;
  object-fit: cover;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.nav-links a,
.ghost-button {
  min-height: 42px;
  padding: 8px 14px;
  border: 1px solid rgba(122, 91, 69, 0.18);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.55);
  font-weight: 700;
  text-decoration: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 480px);
  align-items: center;
  gap: clamp(26px, 6vw, 72px);
  max-width: 1120px;
  min-height: 76vh;
  margin: 0 auto;
  padding-top: 36px;
}

.tag {
  margin: 0 0 8px;
  color: var(--orange);
  font-weight: 900;
  letter-spacing: 0;
}

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

h1 {
  margin: 0;
  font-size: clamp(3.2rem, 11vw, 7rem);
  line-height: 0.95;
}

h2 {
  margin: 0;
  font-size: clamp(1.9rem, 4vw, 3.1rem);
  line-height: 1.16;
}

h3 {
  margin: 0 0 8px;
  font-size: 1.25rem;
}

.intro {
  max-width: 620px;
  margin: 22px 0 0;
  color: var(--soft-ink);
  font-size: 1.15rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.main-button,
.reaction-button {
  min-height: 46px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: var(--orange);
  box-shadow: 0 10px 24px rgba(236, 127, 58, 0.26);
  font-weight: 900;
  cursor: pointer;
}

.main-button {
  padding: 10px 18px;
}

.hero-photo {
  position: relative;
}

.hero-photo img {
  width: min(100%, 480px);
  aspect-ratio: 1;
  border: 10px solid rgba(255, 255, 255, 0.88);
  border-radius: 50%;
  object-fit: cover;
  box-shadow: var(--shadow);
}

.bubble {
  position: absolute;
  right: 0;
  bottom: 9%;
  max-width: 220px;
  padding: 12px 16px;
  border: 2px solid #fff;
  border-radius: 18px;
  background: var(--rose);
  color: #fff;
  box-shadow: var(--shadow);
  font-weight: 900;
}

.section {
  max-width: 1120px;
  margin: 0 auto;
  padding: 72px clamp(18px, 4vw, 32px);
}

.soft-band {
  max-width: none;
  background: var(--milk);
}

.soft-band > * {
  max-width: 1120px;
  margin-right: auto;
  margin-left: auto;
}

.section-title {
  margin-bottom: 28px;
}

.diary-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 22px;
}

.diary-card,
.status-panel,
.care-grid article,
.message-form,
.preview {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.diary-card {
  padding: clamp(20px, 4vw, 32px);
}

.date {
  margin: 0 0 6px;
  color: var(--orange);
  font-weight: 900;
}

.diary-card p:not(.date) {
  color: var(--soft-ink);
}

.reaction-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.reaction-button {
  padding: 8px 14px;
  background: var(--gold);
  color: var(--ink);
}

.reaction-button.active {
  background: var(--rose);
  color: #fff;
}

.status-panel {
  display: grid;
  gap: 12px;
  padding: 22px;
}

.status-panel div {
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--line);
}

.status-panel div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.status-label {
  display: block;
  color: var(--soft-ink);
  font-size: 0.9rem;
}

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

.photo-card {
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 2px solid transparent;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  box-shadow: var(--shadow);
  cursor: pointer;
}

.photo-card.active {
  border-color: var(--orange);
}

.photo-card img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 6px;
  object-fit: cover;
}

.photo-card span {
  font-weight: 900;
}

.preview {
  margin: 24px 0 0;
  overflow: hidden;
}

.preview img {
  width: 100%;
  max-height: 640px;
  object-fit: cover;
}

.preview figcaption {
  padding: 14px 18px;
  color: var(--soft-ink);
  font-weight: 800;
}

.sticker-band {
  max-width: none;
  background: #fff3dc;
}

.sticker-band > * {
  max-width: 1120px;
  margin-right: auto;
  margin-left: auto;
}

.sticker-sheet {
  width: min(100%, 820px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

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

.care-grid article {
  padding: 22px;
}

.care-grid p {
  margin-bottom: 0;
  color: var(--soft-ink);
}

.message-form {
  padding: 18px;
}

.message-form label {
  display: block;
  margin-bottom: 10px;
  font-weight: 900;
}

.message-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.message-row input {
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: #fffaf0;
}

.message-list {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 18px 0 0;
  list-style: none;
}

.message-list li {
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--soft-ink);
}

.footer {
  padding: 28px 18px;
  background: var(--ink);
  color: #fff8e8;
  text-align: center;
}

.footer p {
  margin: 0;
}

@media (max-width: 820px) {
  .nav,
  .hero-grid,
  .diary-layout {
    grid-template-columns: 1fr;
  }

  .nav {
    align-items: flex-start;
  }

  .hero-grid {
    min-height: auto;
  }

  .gallery-grid,
  .care-grid {
    grid-template-columns: 1fr;
  }

  .hero-photo img {
    margin: 0 auto;
  }
}

@media (max-width: 560px) {
  .hero {
    padding-top: 16px;
  }

  .nav {
    display: grid;
  }

  .nav-links {
    justify-content: flex-start;
  }

  .bubble {
    position: static;
    max-width: none;
    margin-top: 12px;
  }

  .message-row {
    grid-template-columns: 1fr;
  }

  .main-button,
  .ghost-button,
  .reaction-button {
    width: 100%;
    text-align: center;
  }
}
