:root {
  --paper: #fdfbf7;
  --paper-deep: #f8efd9;
  --green: #7cb342;
  --green-dark: #537d2d;
  --sky: #87ceeb;
  --sun: #ffa726;
  --pink: #ffb7c5;
  --lavender: #b39ddb;
  --brown: #5d4e37;
  --muted: #8b7355;
  --line: rgba(93, 78, 55, 0.16);
  --shadow: 0 18px 46px rgba(93, 78, 55, 0.14);
  --soft-shadow: 0 10px 24px rgba(93, 78, 55, 0.1);
  --radius-xl: 34px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--brown);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", system-ui, sans-serif;
  line-height: 1.8;
  background:
    radial-gradient(circle at 12% 8%, rgba(135, 206, 235, 0.34), transparent 30%),
    radial-gradient(circle at 88% 14%, rgba(255, 183, 197, 0.32), transparent 32%),
    linear-gradient(180deg, #fff9ea 0%, var(--paper) 36%, #f8f3df 100%);
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

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

button {
  cursor: pointer;
}

.grain {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  opacity: 0.34;
  background-image:
    linear-gradient(rgba(93, 78, 55, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(93, 78, 55, 0.025) 1px, transparent 1px);
  background-size: 18px 18px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px clamp(18px, 5vw, 72px);
  border-bottom: 1px solid rgba(124, 179, 66, 0.18);
  background: rgba(253, 251, 247, 0.78);
  backdrop-filter: blur(16px);
}

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

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 2px solid var(--green);
  border-radius: 42% 58% 51% 49% / 52% 41% 59% 48%;
  color: var(--green-dark);
  background: #fff8dc;
  box-shadow: 4px 5px 0 rgba(124, 179, 66, 0.16);
  transform: rotate(-4deg);
}

.brand-text,
.script-title {
  font-family: "STKaiti", "KaiTi", "FangSong", "Microsoft YaHei", cursive;
  letter-spacing: 0.04em;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.main-nav a {
  position: relative;
  padding: 8px 13px;
  border-radius: 999px;
  color: var(--muted);
  transition: 220ms ease;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--green-dark);
  background: rgba(124, 179, 66, 0.12);
}

.login-pill {
  border: 1px dashed rgba(124, 179, 66, 0.55);
  background: rgba(255, 255, 255, 0.58);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(93, 78, 55, 0.14);
  border-radius: 50%;
  color: var(--brown);
  background: #fff9e8;
}

.app-shell {
  min-height: calc(100vh - 80px);
}

.page {
  width: min(1180px, calc(100vw - 36px));
  margin: 0 auto;
  padding: clamp(34px, 6vw, 72px) 0 90px;
}

.hero {
  position: relative;
  width: min(1280px, calc(100vw - 28px));
  min-height: calc(100vh - 88px);
  margin: 0 auto;
  display: grid;
  place-items: center;
  padding: 70px 18px;
  overflow: hidden;
  border-radius: 0 0 46px 46px;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 18px 0 0;
  z-index: -2;
  border-radius: 42px;
  background:
    radial-gradient(circle at 18% 32%, rgba(255, 255, 255, 0.85) 0 8%, transparent 10%),
    radial-gradient(circle at 62% 18%, rgba(255, 255, 255, 0.78) 0 7%, transparent 9%),
    linear-gradient(180deg, #aee5ff 0 44%, #d9f0b8 44% 62%, #a9d675 62% 100%);
  box-shadow: inset 0 -44px 120px rgba(255, 247, 213, 0.86), var(--shadow);
}

.hill,
.hill::before,
.hill::after {
  position: absolute;
  z-index: -1;
  display: block;
  border-radius: 50% 50% 0 0;
  background: linear-gradient(180deg, #9ccc65, #6fa638);
  content: "";
}

.hill {
  right: -6%;
  bottom: 0;
  width: 62%;
  height: 28%;
}

.hill::before {
  right: 54%;
  bottom: -8px;
  width: 82%;
  height: 105%;
  background: linear-gradient(180deg, #b7dc7b, #83b84b);
}

.hill::after {
  right: -18%;
  bottom: -18px;
  width: 68%;
  height: 85%;
  background: linear-gradient(180deg, #c8e790, #86bf51);
}

.windmill {
  position: absolute;
  right: 14%;
  bottom: 26%;
  width: 82px;
  height: 130px;
  opacity: 0.86;
}

.windmill::before {
  content: "";
  position: absolute;
  left: 35px;
  bottom: 0;
  width: 16px;
  height: 78px;
  border-radius: 12px 12px 0 0;
  background: #fff7df;
  border: 2px solid rgba(93, 78, 55, 0.22);
}

.windmill::after {
  content: "✣";
  position: absolute;
  left: 11px;
  top: 8px;
  color: #fff7df;
  font-size: 64px;
  line-height: 1;
  text-shadow: 0 2px 0 rgba(93, 78, 55, 0.22);
  animation: spin 10s linear infinite;
}

.hero-card {
  max-width: 760px;
  padding: clamp(28px, 5vw, 56px);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 42% 58% 51% 49% / 52% 44% 56% 48%;
  text-align: center;
  background: rgba(253, 251, 247, 0.72);
  backdrop-filter: blur(10px);
  box-shadow: 0 20px 70px rgba(93, 78, 55, 0.16);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  color: var(--green-dark);
  font-weight: 700;
}

.hero h1 {
  margin: 0;
  font-family: "STKaiti", "KaiTi", "Microsoft YaHei", cursive;
  font-size: clamp(44px, 7vw, 76px);
  line-height: 1.14;
  letter-spacing: 0.04em;
}

.hero p {
  max-width: 560px;
  margin: 18px auto 30px;
  color: var(--muted);
  font-size: clamp(17px, 2vw, 21px);
}

.hero-actions,
.section-actions,
.form-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 10px 20px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: var(--green);
  box-shadow: 0 10px 0 rgba(83, 125, 45, 0.16), var(--soft-shadow);
  transition: transform 220ms var(--bounce), box-shadow 220ms ease, background 220ms ease;
}

.btn:hover {
  transform: translateY(-3px);
  background: var(--green-dark);
  box-shadow: 0 13px 0 rgba(83, 125, 45, 0.14), var(--shadow);
}

.btn:active {
  transform: scale(0.96);
}

.btn.secondary {
  color: var(--green-dark);
  background: #fff8df;
  border: 1px dashed rgba(124, 179, 66, 0.54);
}

.btn.sun {
  background: var(--sun);
}

.btn.ghost {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid var(--line);
  box-shadow: none;
}

.floating {
  position: fixed;
  right: clamp(18px, 4vw, 46px);
  bottom: clamp(18px, 4vw, 42px);
  z-index: 10;
  width: 58px;
  height: 58px;
  padding: 0;
  border-radius: 50%;
  font-size: 24px;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}

.section-head.center {
  display: block;
  max-width: 730px;
  margin-inline: auto;
  text-align: center;
}

.section-head h2,
.page-title {
  margin: 0;
  font-family: "STKaiti", "KaiTi", "Microsoft YaHei", cursive;
  font-size: clamp(34px, 4vw, 48px);
  line-height: 1.24;
}

.section-head p {
  margin: 8px 0 0;
  color: var(--muted);
}

.welcome-note {
  position: relative;
  max-width: 860px;
  margin: 54px auto;
  padding: clamp(26px, 5vw, 46px);
  border: 2px dashed rgba(124, 179, 66, 0.26);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.55);
  box-shadow: var(--soft-shadow);
}

.welcome-note::before,
.welcome-note::after {
  position: absolute;
  font-size: 40px;
  animation: float 7s ease-in-out infinite;
}

.welcome-note::before {
  content: "🌼";
  left: 22px;
  top: -24px;
}

.welcome-note::after {
  content: "☁️";
  right: 34px;
  bottom: -24px;
  animation-delay: 1.3s;
}

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

.feature-card,
.content-card,
.album-card,
.diary-card,
.profile-card {
  position: relative;
  padding: 24px;
  border: 1px solid rgba(124, 179, 66, 0.26);
  border-radius: 34px 26px 38px 24px;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: var(--soft-shadow);
  transition: transform 300ms var(--bounce), box-shadow 300ms ease, border-color 300ms ease;
}

.feature-card:nth-child(even),
.content-card:nth-child(even) {
  transform: translateY(18px) rotate(1deg);
}

.feature-card:hover,
.content-card:hover,
.album-card:hover,
.diary-card:hover,
.profile-card:hover {
  transform: translateY(-4px) rotate(0deg);
  border-color: var(--sun);
  box-shadow: var(--shadow);
}

.feature-icon {
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  margin-bottom: 14px;
  border-radius: 43% 57% 56% 44% / 45% 51% 49% 55%;
  background: #fff3c8;
  font-size: 30px;
}

.link-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: inherit;
  margin-bottom: 8px;
}
.link-card-header:hover h3 {
  color: var(--green);
}
.link-card-icon {
  display: grid;
  width: 56px;
  height: 56px;
  min-width: 56px;
  place-items: center;
  border-radius: 43% 57% 56% 44% / 45% 51% 49% 55%;
  background: #fff3c8;
  font-size: 26px;
  transition: transform 0.25s var(--bounce);
}
.link-card-header:hover .link-card-icon {
  transform: scale(1.12);
}
.link-card-header h3 {
  margin: 0;
  transition: color 0.2s;
}

/* 图标选择器 */
.icon-picker-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 8px;
}
.icon-picker-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 1;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 12px;
  background: var(--paper-deep);
  font-size: 22px;
  cursor: pointer;
  transition: all 0.18s ease;
}
.icon-picker-btn:hover {
  background: #fff3c8;
  transform: scale(1.1);
}
.icon-picker-btn.active {
  border-color: var(--green);
  background: rgba(124, 179, 66, 0.12);
  box-shadow: 0 0 0 3px rgba(124, 179, 66, 0.18);
}

.feature-card h3,
.content-card h3,
.album-card h3,
.diary-card h3 {
  margin: 0 0 8px;
  font-size: 22px;
}

.feature-card p,
.content-card p,
.album-card p,
.diary-card p {
  margin: 0;
  color: var(--muted);
}

.filter-bar {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  margin-bottom: 24px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.chip {
  flex: 0 0 auto;
  padding: 8px 15px;
  border: 1px dashed rgba(124, 179, 66, 0.42);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.65);
  transition: 180ms ease;
}

.chip.active,
.chip:hover {
  color: #fff;
  background: var(--green);
}

.meta-row,
.card-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.meta-row {
  margin: 12px 0;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  color: var(--green-dark);
  background: rgba(124, 179, 66, 0.13);
  font-size: 13px;
}

.tag.sun {
  color: #9a5a00;
  background: rgba(255, 167, 38, 0.19);
}

.tag.blue {
  color: #227190;
  background: rgba(135, 206, 235, 0.26);
}

.tag.pink {
  color: #9b5260;
  background: rgba(255, 183, 197, 0.26);
}

.small-btn {
  border: 0;
  border-radius: 999px;
  padding: 6px 12px;
  color: var(--muted);
  background: rgba(253, 251, 247, 0.9);
}

.small-btn:hover {
  color: var(--green-dark);
}

.small-btn.danger {
  color: #c0392b;
}
.small-btn.danger:hover {
  color: #a93226;
}

.whitelist-add-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}
.whitelist-add-bar .input {
  flex: 1;
}

.whitelist-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}
.whitelist-table th,
.whitelist-table td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}
.whitelist-table th {
  color: var(--muted);
  font-weight: 500;
  font-size: 13px;
}
.whitelist-table tr:hover {
  background: var(--paper-deep);
}

.notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
  padding: 18px 20px;
  border: 1px dashed rgba(255, 167, 38, 0.42);
  border-radius: var(--radius-lg);
  color: var(--muted);
  background: rgba(255, 248, 224, 0.75);
}

.diary-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 28px;
}

.side-panel {
  align-self: start;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.54);
}

.diary-card {
  margin-bottom: 18px;
}

.diary-date {
  color: var(--green-dark);
  font-family: "STKaiti", "KaiTi", "Microsoft YaHei", cursive;
  font-size: 20px;
}

.diary-body {
  white-space: pre-wrap;
  line-height: 1.8;
}
.diary-body img {
  max-width: 100%;
  border-radius: 12px;
  margin: 12px 0;
  display: block;
}
.diary-body h2 {
  margin: 16px 0 8px;
  font-size: 20px;
  color: var(--brown);
}
.diary-body blockquote {
  margin: 12px 0;
  padding: 10px 16px;
  border-left: 4px solid var(--green);
  background: var(--paper-deep);
  border-radius: 0 10px 10px 0;
  color: var(--muted);
}
.diary-body ul,
.diary-body ol {
  margin: 8px 0;
  padding-left: 22px;
}
.diary-body li {
  margin: 4px 0;
}
.diary-body a {
  color: var(--green-dark);
  text-decoration: underline;
}

.photo-wall {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.photo-card {
  display: grid;
  gap: 10px;
}

.album-cover {
  min-height: 150px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 8px solid rgba(255, 255, 255, 0.82);
  border-radius: 28px 22px 32px 24px;
  background:
    linear-gradient(145deg, rgba(135, 206, 235, 0.62), rgba(255, 183, 197, 0.48)),
    radial-gradient(circle at 22% 18%, rgba(255, 255, 255, 0.7), transparent 20%);
  box-shadow: var(--soft-shadow);
  text-decoration: none;
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.album-cover:hover,
.album-cover:focus-visible {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  outline: none;
}

.album-cover-icon span {
  font-size: 54px;
  filter: drop-shadow(0 8px 16px rgba(93, 78, 55, 0.16));
}

.album-cover-image img,
.cover-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cover-preview {
  max-height: 180px;
  margin-bottom: 10px;
  border: 8px solid rgba(255, 255, 255, 0.82);
  border-radius: 24px;
  box-shadow: var(--soft-shadow);
}

.icon-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.icon-option {
  cursor: pointer;
}

.icon-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.icon-option span {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(124, 179, 66, 0.24);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.62);
  font-size: 22px;
  transition: 180ms ease;
}

.icon-option input:checked + span,
.icon-option:hover span {
  border-color: rgba(212, 165, 116, 0.72);
  background: rgba(255, 248, 237, 0.92);
  transform: translateY(-1px);
}

.field-hint {
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.photo-tile {
  min-height: 132px;
  display: grid;
  place-items: center;
  border: 8px solid rgba(255, 255, 255, 0.8);
  border-radius: 28px 22px 32px 24px;
  color: rgba(93, 78, 55, 0.68);
  background:
    linear-gradient(145deg, rgba(135, 206, 235, 0.62), rgba(255, 183, 197, 0.48)),
    radial-gradient(circle at 22% 18%, rgba(255, 255, 255, 0.7), transparent 20%);
  box-shadow: var(--soft-shadow);
}

button.photo-tile {
  width: 100%;
  border-width: 8px;
  text-align: center;
}

.photo-image-tile {
  position: relative;
  overflow: hidden;
  min-height: 172px;
  padding: 0;
  background: #fff;
}

.photo-image-tile img {
  width: 100%;
  height: 100%;
  min-height: 172px;
  object-fit: cover;
  display: block;
  transition: transform 260ms ease;
}

.photo-image-tile:hover img {
  transform: scale(1.04);
}

.photo-image-tile span {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  color: #fff;
  background: rgba(93, 78, 55, 0.62);
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.photo-tile.no-image {
  padding: 16px;
}

.photo-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.photo-preview-image {
  display: block;
  max-width: 100%;
  max-height: 68vh;
  margin: 14px auto;
  border: 10px solid rgba(255, 255, 255, 0.82);
  border-radius: 26px;
  object-fit: contain;
  box-shadow: var(--soft-shadow);
}

.photo-tile:nth-child(2n) {
  background:
    linear-gradient(145deg, rgba(255, 235, 157, 0.75), rgba(124, 179, 66, 0.36)),
    radial-gradient(circle at 70% 18%, rgba(255, 255, 255, 0.66), transparent 22%);
}

.auth-card,
.form-card {
  width: min(560px, 100%);
  margin: 0 auto;
  padding: clamp(26px, 5vw, 40px);
  border: 1px solid rgba(124, 179, 66, 0.22);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.66);
  box-shadow: var(--shadow);
}

.confirm-box {
  display: grid;
  gap: 14px;
}

.confirm-box p {
  color: var(--muted);
  line-height: 1.7;
}

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.field label {
  color: var(--muted);
  font-size: 14px;
}

.input,
.textarea,
.select {
  width: 100%;
  border: 1px solid rgba(93, 78, 55, 0.16);
  border-radius: 18px;
  padding: 12px 14px;
  color: var(--brown);
  background: rgba(253, 251, 247, 0.88);
  outline: none;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.textarea {
  min-height: 150px;
  resize: vertical;
}

.input:focus,
.textarea:focus,
.select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(124, 179, 66, 0.12);
}

/* 富文本编辑器 */
.rich-editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}
.rich-editor-toolbar button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  color: var(--brown);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.18s ease;
}
.rich-editor-toolbar button:hover {
  background: var(--paper-deep);
  border-color: var(--green);
  color: var(--green-dark);
}
.rich-editor-toolbar button:active {
  transform: scale(0.95);
}
.rich-editor {
  width: 100%;
  min-height: 180px;
  max-height: 480px;
  overflow-y: auto;
  border: 1px solid rgba(93, 78, 55, 0.16);
  border-radius: 18px;
  padding: 14px;
  color: var(--brown);
  background: rgba(253, 251, 247, 0.88);
  outline: none;
  transition: border-color 180ms ease, box-shadow 180ms ease;
  line-height: 1.75;
}
.rich-editor:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(124, 179, 66, 0.12);
}
.rich-editor:empty::before {
  content: attr(placeholder);
  color: var(--muted);
  pointer-events: none;
}
.rich-editor h2 {
  margin: 0 0 10px;
  font-size: 20px;
  color: var(--brown);
}
.rich-editor blockquote {
  margin: 10px 0;
  padding: 8px 14px;
  border-left: 4px solid var(--green);
  background: var(--paper-deep);
  border-radius: 0 10px 10px 0;
  color: var(--muted);
}
.rich-editor ul,
.rich-editor ol {
  margin: 8px 0;
  padding-left: 22px;
}
.rich-editor li {
  margin: 4px 0;
}
.rich-editor a {
  color: var(--green-dark);
  text-decoration: underline;
}
.rich-editor img {
  max-width: 100%;
  border-radius: 12px;
  margin: 12px 0;
  display: block;
}

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

.profile-card strong {
  display: block;
  font-size: 34px;
  color: var(--green-dark);
}

.profile-card span {
  color: var(--muted);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal.open {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(54, 44, 30, 0.28);
  backdrop-filter: blur(4px);
}

.modal-card {
  position: relative;
  z-index: 1;
  width: min(640px, 100%);
  max-height: min(760px, calc(100vh - 40px));
  overflow: auto;
  padding: 28px;
  border-radius: var(--radius-xl);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  color: var(--muted);
  background: rgba(93, 78, 55, 0.08);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 80;
  max-width: min(460px, calc(100vw - 40px));
  padding: 12px 18px;
  border-radius: 999px;
  color: #fff;
  background: rgba(83, 125, 45, 0.94);
  box-shadow: var(--shadow);
  transform: translate(-50%, 120px);
  opacity: 0;
  transition: 260ms ease;
}

.toast.show {
  transform: translate(-50%, 0);
  opacity: 1;
}

.empty-state {
  padding: 54px 20px;
  border: 1px dashed rgba(124, 179, 66, 0.28);
  border-radius: var(--radius-xl);
  text-align: center;
  background: rgba(255, 255, 255, 0.5);
}

.empty-illustration {
  font-size: 52px;
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  animation: rise 600ms var(--bounce) forwards;
}

.reveal:nth-child(2) {
  animation-delay: 80ms;
}

.reveal:nth-child(3) {
  animation-delay: 160ms;
}

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

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-7px);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.site-footer {
  padding: 20px 16px 28px;
  text-align: center;
  border-top: 1px solid rgba(124, 179, 66, 0.14);
  background: rgba(253, 251, 247, 0.6);
}
.site-footer a {
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.02em;
  transition: color 0.18s ease;
}
.site-footer a:hover {
  color: var(--green-dark);
}

@media (max-width: 1023px) {
  .feature-grid,
  .card-grid,
  .profile-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .diary-layout {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 767px) {
  .site-header {
    padding: 12px 16px;
  }

  .menu-toggle {
    display: block;
  }

  .main-nav {
    position: fixed;
    top: 68px;
    right: 14px;
    width: min(280px, calc(100vw - 28px));
    display: grid;
    gap: 8px;
    padding: 18px;
    border: 1px solid rgba(124, 179, 66, 0.18);
    border-radius: 26px;
    background: rgba(253, 251, 247, 0.95);
    box-shadow: var(--shadow);
    transform: translateX(calc(100% + 30px));
    transition: 240ms ease;
  }

  .main-nav.open {
    transform: translateX(0);
  }

  .hero {
    min-height: calc(100vh - 72px);
    padding-top: 42px;
  }

  .hero::before {
    border-radius: 30px;
  }

  .windmill {
    right: 6%;
    opacity: 0.42;
  }

  .hero-card {
    border-radius: 32px;
  }

  .feature-grid,
  .card-grid,
  .profile-grid,
  .photo-wall {
    grid-template-columns: 1fr;
  }

  .feature-card:nth-child(even),
  .content-card:nth-child(even) {
    transform: none;
  }

  .section-head {
    display: block;
  }

  .notice {
    display: block;
  }

  .notice .btn {
    margin-top: 12px;
  }

  .floating {
    width: 50px;
    height: 50px;
  }
}
