:root {
  --paper: #fffaf5;
  --paper-deep: #f8e7df;
  --rose: #d78f85;
  --rose-deep: #b86f68;
  --ink: #644840;
  --muted: #9d756b;
  --line: #ead6ce;
  --white: #fffdf9;
  --shadow: 0 14px 32px rgba(95, 66, 60, .10);
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
html { background: var(--paper); }
body { margin: 0; min-width: 320px; background: var(--paper); font-size: 16px; line-height: 1.7; }
a { color: inherit; }
button, audio { font: inherit; }
.stack { display:grid; gap:16px; }
.stack label { display:grid; gap:6px; color:var(--ink); }
.stack input { width:100%; border:1px solid #e4d2ca; border-radius:10px; padding:11px 12px; color:var(--ink); background:#fffdfa; }
.stack button { border:0; border-radius:10px; padding:12px 18px; background:#bd7771; color:#fff; font-weight:700; cursor:pointer; }
.notice { padding:11px 14px; border-radius:10px; }
.error { color:#9d4c48; background:#fff0ee; }
.access-card { max-width:520px; margin:48px auto; }

.site-header { display: flex; align-items: center; justify-content: space-between; gap: 18px; max-width: 960px; margin: 0 auto; padding: 23px 24px 18px; }
.site-brand { color: var(--ink); font-size: 20px; font-weight: 700; letter-spacing: .03em; text-decoration: none; white-space: nowrap; }
.site-header nav { display: flex; gap: 15px; }
.site-header nav a { color: var(--muted); font-size: 14px; text-decoration: none; }
.site-header nav a[aria-current="page"], .site-header nav a:hover { color: var(--rose-deep); }
.site-main { max-width: 720px; margin: 0 auto; padding: 20px 24px 56px; }
.site-footer { max-width: 720px; margin: 0 auto; padding: 0 24px 34px; color: #ad857b; font-size: 13px; text-align: center; }

.gentle-label { margin: 0 0 8px; color: var(--muted); font-size: 14px; letter-spacing: .08em; }
.home-intro { padding: 12px 0 25px; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 8px; color: var(--ink); font-size: clamp(30px, 7vw, 42px); line-height: 1.2; letter-spacing: .02em; }
h2 { margin-bottom: 8px; font-size: 20px; line-height: 1.4; }
.home-intro > p:last-child, .page-intro > p:last-child { margin-bottom: 0; color: var(--muted); }

.hero-photo { margin: 0 0 24px; overflow: hidden; border-radius: 28px; background: var(--paper-deep); box-shadow: var(--shadow); }
.hero-photo img { display: block; width: 100%; aspect-ratio: 1.42 / 1; object-fit: cover; }
.hero-photo figcaption { padding: 12px 17px 15px; color: var(--muted); font-size: 14px; }
.hero-empty { min-height: 210px; display: grid; place-items: center; }

.comfort-link { display: flex; align-items: center; gap: 16px; margin: 0 0 31px; padding: 17px 19px; border-radius: 22px; background: var(--rose); box-shadow: var(--shadow); color: var(--white); text-decoration: none; }
.comfort-link strong, .comfort-link small { display: block; }
.comfort-link strong { font-size: 19px; }
.comfort-link small { color: #fff4ee; font-size: 13px; }
.comfort-icon { width: 41px; height: 41px; flex: 0 0 41px; border: 2px solid #ffe9e1; border-radius: 50%; position: relative; }
.comfort-icon::before, .comfort-icon::after { content: ""; position: absolute; left: 50%; top: 50%; border-radius: 50%; transform: translate(-50%, -50%); }
.comfort-icon::before { width: 16px; height: 16px; border: 2px solid #ffe9e1; }
.comfort-icon::after { width: 4px; height: 4px; background: #ffe9e1; }
.comfort-arrow { margin-left: auto; font-size: 24px; }
.comfort-link:focus-visible, .action-tile:focus-visible, .breathing-button:focus-visible, .back-link:focus-visible { outline: 3px solid #72514a; outline-offset: 4px; }

.home-note { margin-bottom: 30px; padding: 23px 24px; border: 1px solid var(--line); border-radius: 22px; background: var(--white); }
.home-note p:last-child { margin-bottom: 0; color: var(--muted); }
.home-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 13px; }
.action-tile { min-height: 180px; display: flex; flex-direction: column; padding: 15px; border-radius: 22px; background: var(--paper-deep); color: var(--ink); text-decoration: none; }
.action-tile:nth-child(2) { background: #f5dfd7; }
.action-tile strong { margin-top: auto; font-size: 15px; }
.action-tile small { color: var(--muted); font-size: 12px; line-height: 1.5; }
.tile-art { display: block; height: 80px; border-radius: 13px; background: #d6aaa0; position: relative; overflow: hidden; }
.action-photo .tile-art::after { content: ""; position: absolute; width: 95px; height: 60px; left: 12px; bottom: -15px; background: #b36f69; clip-path: polygon(0 100%, 37% 35%, 58% 70%, 76% 20%, 100% 100%); }
.action-voice .tile-art { display: grid; place-items: center; background: #edd0c8; }
.action-voice .tile-art::after { content: ""; width: 34px; height: 34px; border-radius: 50%; background: var(--rose); box-shadow: 0 0 0 10px #f8e7df; }
.action-note .tile-art { background: #f0d8d1; }
.action-note .tile-art::after { content: ""; position: absolute; inset: 20px 18px; border-top: 5px solid #c8837c; border-bottom: 5px solid #d5a29a; }

.page-intro { margin: 14px 0 30px; }
.soft-empty { padding: 32px 24px; border: 1px solid var(--line); border-radius: 22px; background: var(--white); color: var(--muted); text-align: center; }
.soft-empty p { margin: 0; }
.photo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.photo-card { overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: var(--white); }
.photo-card img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.photo-card div { padding: 14px 15px 16px; }
.photo-card h2 { font-size: 17px; }
.photo-card p { margin-bottom: 7px; color: var(--muted); font-size: 14px; line-height: 1.6; }
time { color: #ad857b; font-size: 12px; }

.voice-list, .note-list { display: grid; gap: 16px; }
.voice-card { display: grid; grid-template-columns: 120px 1fr; gap: 18px; padding: 14px; border: 1px solid var(--line); border-radius: 22px; background: var(--white); }
.voice-card > img, .voice-placeholder { width: 120px; height: 120px; border-radius: 15px; object-fit: cover; background: #e8c4af; }
.voice-placeholder { position: relative; }
.voice-placeholder::after { content: ""; position: absolute; inset: 38px; border-radius: 50%; background: var(--rose); }
.voice-card h2 { font-size: 18px; }
.voice-card p { margin-bottom: 10px; color: var(--muted); font-size: 14px; line-height: 1.6; }
audio { display: block; width: 100%; max-width: 360px; height: 38px; }
.audio-error { color: var(--rose-deep) !important; }
.letter { padding: 25px 24px 20px; border-left: 4px solid #dda198; background: var(--white); box-shadow: 0 8px 22px rgba(95, 66, 60, .05); }
.letter h2 { font-size: 20px; }
.letter p { color: var(--muted); white-space: normal; }
.letter p:last-of-type { margin-bottom: 12px; }

.back-link { display: inline-block; margin-bottom: 24px; color: var(--muted); font-size: 14px; text-decoration: none; }
.comfort-page { max-width: 560px; margin: 0 auto; padding-top: 10px; text-align: center; }
.comfort-copy { margin: 0 auto 24px; max-width: 340px; color: var(--muted); }
.breathing-wrap { min-height: 225px; display: grid; place-items: center; position: relative; }
.breathing-orb { width: 116px; height: 116px; border-radius: 50%; background: #efcec5; box-shadow: 0 0 0 25px #f8e7df, 0 0 0 48px #fcf0eb; }
.breathing-wrap p { position: absolute; margin: 0; color: var(--rose-deep); font-size: 17px; }
.breathing-wrap.is-breathing .breathing-orb { animation: breathe 8s ease-in-out infinite; }
.breathing-button { padding: 12px 23px; border: 1px solid #c98078; border-radius: 999px; background: var(--white); color: var(--rose-deep); cursor: pointer; }
.comfort-message { margin: 33px 0 20px; padding: 22px; border-radius: 22px; background: #f8e7df; text-align: left; }
.comfort-message p { margin: 0; color: var(--ink); }
.comfort-audio { padding: 22px; border: 1px solid var(--line); border-radius: 22px; background: var(--white); text-align: left; }
.comfort-audio h2 { font-size: 18px; }
.comfort-audio > p { color: var(--muted); font-size: 14px; }
@keyframes breathe { 0%, 100% { transform: scale(.78); } 50% { transform: scale(1.18); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; } }
@media (max-width: 520px) { .site-header { padding: 17px 18px 12px; } .site-header nav { gap: 10px; } .site-header nav a { font-size: 13px; } .site-main { padding: 16px 18px 44px; } .home-actions { gap: 9px; } .action-tile { min-height: 157px; padding: 11px; border-radius: 18px; } .tile-art { height: 65px; } .action-tile strong { font-size: 13px; } .action-tile small { font-size: 11px; } .photo-grid { grid-template-columns: 1fr; } .photo-card img { aspect-ratio: 1.2 / 1; } .voice-card { grid-template-columns: 88px 1fr; gap: 13px; } .voice-card > img, .voice-placeholder { width: 88px; height: 88px; } .voice-placeholder::after { inset: 27px; } }
