:root {
  --color-cream: #fbf6ee;
  --color-cream-deep: #f4eadf;
  --color-surface: #fffdf9;
  --color-cocoa: #4d382e;
  --color-muted: #92837a;
  --color-peach: #dfa08e;
  --color-peach-soft: #f7dfd6;
  --color-dusty-pink: #d9988e;
  --color-sage: #9aaa88;
  --color-line: rgba(122, 91, 73, .13);
  --space-1: 6px;
  --space-2: 10px;
  --space-3: 16px;
  --space-4: 24px;
  --radius-small: 18px;
  --radius-card: 26px;
  --radius-sheet: 32px;
  --shadow-soft: 0 14px 34px rgba(91, 62, 46, .075);
  --shadow-float: 0 22px 58px rgba(85, 55, 40, .13);
  --motion-fast: 180ms;
  --bg: #fbf6ee;
  --card: rgba(255, 253, 249, .92);
  --ink: #43352f;
  --muted: #92837a;
  --line: rgba(122, 91, 73, .13);
  --peach: #dfa08e;
  --peach-soft: #f7dfd6;
  --sage: #9aaa88;
  --shadow: var(--shadow-soft);
  --universe-bg: linear-gradient(155deg, #fffaf3 0%, #fbf5ec 48%, #f7eee4 100%);
  --universe-card: #fffdf9;
  --universe-primary: #dfa08e;
  --universe-motion: 1;
}
html,body { touch-action:manipulation; }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
.access-gate { position: fixed; inset: 0; z-index: 9999; display: grid; place-items: center; padding: 24px; background: #faf8f4; color: #5b3a28; }
.access-card { width: min(100%, 360px); padding: 34px 28px; border: 1px solid rgba(138,93,62,.12); border-radius: 28px; background: rgba(255,255,255,.74); box-shadow: 0 20px 60px rgba(117,78,53,.10); text-align: center; }
.access-heart { display: grid; width: 54px; height: 54px; margin: 0 auto 16px; place-items: center; border-radius: 50%; background: #fbded6; color: #d97868; font-size: 24px; }
.access-card h1 { margin: 0; font-size: 30px; }
.access-card p { margin: 9px 0 22px; color: #947363; }
.access-card input { width: 100%; height: 50px; padding: 0 16px; border: 1px solid #eadbd2; border-radius: 16px; background: #fffdfb; color: #5b3a28; font-size: 18px; text-align: center; outline: none; }
.access-card input:focus { border-color: #dfa99b; box-shadow: 0 0 0 3px rgba(223,169,155,.18); }
.access-card button { width: 100%; height: 50px; margin-top: 14px; border: 0; border-radius: 16px; background: #e7a291; color: #fff; font-size: 16px; font-weight: 700; }
.access-card small { display: block; min-height: 20px; margin-top: 12px; color: #c55f5f; }
html, body { margin: 0; min-height: 100%; background: #eeece8; color: var(--ink); font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", sans-serif; }
button { min-height: 44px; font: inherit; color: inherit; touch-action: manipulation; }
button:focus-visible { outline: 3px solid rgba(233, 165, 143, .45); outline-offset: 3px; }

.app-shell { position: relative; width: min(100%, 430px); min-height: 100dvh; margin: 0 auto; overflow: hidden; background: var(--universe-bg); box-shadow: 0 0 40px rgba(0,0,0,.08); transition:background .45s ease; }
.screen { display: none; height: 100dvh; padding: max(16px, env(safe-area-inset-top)) 18px calc(84px + env(safe-area-inset-bottom)); overflow: hidden; }
.screen.active { display: block; }
#recent-screen { overflow-x:hidden; overflow-y:auto; }
#recent-screen { overflow-y: auto; }

.hero { position: relative; height: 128px; display: flex; align-items: flex-start; }
.hero-copy { position: relative; z-index: 2; padding-top: 9px; max-width: 72%; }
.hero h1 { margin: 0; font-size: 34px; line-height: 1.05; letter-spacing: .07em; font-weight: 650; }
.english-title { margin: 5px 0 0; font-size: 10px; letter-spacing: .22em; font-weight: 600; }
.slogan { margin: 17px 0 0; font-size: 11px; line-height: 1.4; white-space: nowrap; }

.reference-mark { position: absolute; right: -6px; top: -8px; width: 126px; height: 126px; overflow: hidden; mix-blend-mode: multiply; opacity: .98; pointer-events: none; }
.reference-mark canvas { width: 100%; height: 100%; display: block; }

.universe-mood-card { position:relative; min-height:142px; margin:0 0 12px; padding:22px 138px 20px 18px; overflow:hidden; border:1px solid rgba(222,207,198,.65); border-radius:22px; background:linear-gradient(135deg,#f7e6e1,#f8efeb); box-shadow:0 10px 26px rgba(92,72,61,.07); transition:background .45s ease,box-shadow .45s ease; }
.universe-mood-copy { position:relative; z-index:2; }
.universe-mood-copy small { color:#8f7468; font-size:11px; letter-spacing:.08em; }
.universe-mood-copy h2 { margin:8px 0 9px; color:#563e33; font-size:19px; line-height:1.35; font-weight:650; }
.universe-mood-copy p { margin:0; color:#78645a; font-size:12px; line-height:1.65; }
.universe-mood-card>img { position:absolute; right:8px; bottom:3px; width:132px; height:132px; object-fit:contain; mix-blend-mode:multiply; }
.home-intimacy-row { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin:0 0 12px; }
.home-intimacy-row button { width:100%; min-width:0; height:82px; margin:0; padding:8px; display:flex; align-items:center; justify-content:center; gap:7px; border-radius:18px; font-size:13px; }
.home-intimacy-row button strong { font-weight:620; }
.mailbox-entry-button span { width:47px; height:47px; display:grid; place-items:center; overflow:hidden; }
.mailbox-entry-button span img { width:66px; height:66px; object-fit:contain; mix-blend-mode:multiply; }
.home-intimacy-row .hug-button span { display:grid; width:40px; height:40px; place-items:center; border-radius:50%; background:#fae0d8; font-size:21px; }
.feed { display: grid; gap: 8px; }
.recent-group { display: grid; gap: 0; }
.card { position: relative; width: 100%; min-height: 102px; height:auto; border: 1px solid rgba(229, 220, 212, .82); border-radius: 20px; padding: 13px 86px 14px 60px; text-align: left; background: var(--card); box-shadow: 0 8px 20px rgba(92,72,61,.065); overflow: hidden; cursor: pointer; transition: transform .18s ease, box-shadow .18s ease; }
.card:active { transform: scale(.985); box-shadow: 0 5px 14px rgba(92,72,61,.07); }
.memory-card { background: linear-gradient(135deg, rgba(255,255,255,.92), rgba(250,234,227,.68)); }
.todo-card { background: linear-gradient(135deg, rgba(255,255,255,.92), rgba(250,244,219,.66)); }
.promise-card { background: linear-gradient(135deg, rgba(255,255,255,.92), rgba(231,239,225,.66)); }
.capsule-card { background: linear-gradient(135deg, rgba(255,255,255,.94), rgba(244,237,228,.68)); }

.gesture-icon { position: absolute; left: 12px; top: 12px; width: 42px; height: 42px; border-radius: 50%; }
.card-copy { display: flex; flex-direction: column; min-width: 0; }
.card-copy small { font-size: 11px; color: #6f625b; margin-bottom: 8px; }
.card-copy strong { max-width:100%; font-size:15px; line-height:1.45; font-weight:580; white-space:normal; overflow-wrap:anywhere; word-break:break-word; }
.card-copy > span { max-width:100%; margin-top:8px; color:var(--muted); font-size:11px; line-height:1.5; white-space:normal; overflow-wrap:anywhere; word-break:break-word; }
.card-copy .green, .green { color: #7f996b; font-weight: 580; }
.progress-dot { display: inline-block; width: 46px; height: 5px; border-radius: 9px; background: #e5ded3; vertical-align: middle; }
.card-visual { position: absolute; right: 13px; top: 17px; width: 68px; height: 68px; display: grid; place-items: center; border-radius: 18px; font-size: 30px; background: rgba(255,255,255,.66); border: 1px solid rgba(229,220,212,.72); }
.card-visual img,.card-visual video { width:100%; height:100%; object-fit:cover; border-radius:inherit; }
.home-memory-stack { position:relative; width:100%; height:100%; display:block; }
.home-memory-stack img { position:absolute; inset:0; transform:translate(calc((var(--stack-index) - 1) * 4px),calc((var(--stack-index) - 1) * 3px)) rotate(calc((var(--stack-index) - 1) * 3deg)); border:2px solid rgba(255,255,255,.88); box-shadow:0 3px 8px rgba(77,57,45,.12); }
.home-memory-stack b { position:absolute; z-index:4; right:4px; bottom:4px; padding:3px 6px; border-radius:999px; background:rgba(64,48,40,.72); color:#fff; font-size:8px; font-weight:600; }
.missing-media-placeholder { width:100%; height:100%; min-height:72px; padding:9px; display:grid; place-items:center; border-radius:inherit; background:#f4ede7; color:#9a8175; font-size:11px; line-height:1.4; text-align:center; }
.detail-gallery>.missing-media-placeholder,#memory-detail-content>.missing-media-placeholder { min-height:220px; border-radius:22px; }
.recent-toggle::after { content: "⌄"; position: absolute; right: 8px; bottom: 5px; color: #ab9d94; font-size: 12px; transition: transform var(--motion-fast) ease; }
.recent-toggle[aria-expanded="true"]::after { transform: rotate(180deg); }
.recent-list { margin: -9px 7px 4px; padding: 13px 8px 5px; border: 1px solid rgba(231,222,214,.82); border-top: 0; border-radius: 0 0 18px 18px; background: rgba(255,253,249,.82); box-shadow: 0 8px 18px rgba(92,72,61,.045); }
.recent-row { width: 100%; min-height: 52px; padding: 7px 6px; display: grid; grid-template-columns: 34px 1fr 18px; align-items: center; gap: 8px; border: 0; border-bottom: 1px solid #eee7e1; background: transparent; text-align: left; }
.recent-row:last-child { border-bottom: 0; }
.recent-row > span { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 10px; background: #f6eee7; font-size: 14px; }
.recent-row div { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.recent-row strong { overflow:visible; color:#5b4a41; font-size:12px; line-height:1.45; font-weight:580; white-space:normal; overflow-wrap:anywhere; word-break:break-word; }
.recent-row small { color: #9a8c83; font-size: 10px; }
.recent-row i { color: #b4a69d; font-style: normal; }
.recent-empty { margin: 7px; color: #9a8c83; font-size: 11px; text-align: center; }

.hug-button { display: block; min-width: 160px; height: 38px; margin: 10px auto 0; border: 1px solid var(--universe-primary); border-radius: 999px; background: #fff4ef; color: #6d4b41; box-shadow: 0 5px 12px rgba(176,111,86,.08); cursor: pointer; font-size: 14px; }
.hug-button span { color: #dc796f; margin-right: 8px; }
.mailbox-entry-button { display:block; min-width:180px; height:42px; margin:10px auto 0; border:1px solid #e8c1b3; border-radius:999px; background:#fffaf5; color:#6d4b41; box-shadow:0 5px 14px rgba(176,111,86,.08); font-size:14px; }
.mailbox-entry-button span { margin-right:8px; }
.daily-memory-visit { margin:0 0 16px; padding:18px; border:1px solid #eaded4; border-radius:24px; background:linear-gradient(145deg,#fffaf5,#fbf5ef); box-shadow:0 9px 22px rgba(91,67,52,.07); }
.daily-visit-copy small { color:#b18470; font-size:11px; letter-spacing:.12em; }
.daily-visit-copy h3 { margin:7px 0 6px; color:#563f34; font-size:18px; }
.daily-visit-copy p { margin:0; color:#88766c; font-size:13px; line-height:1.65; }
.daily-visit-memory { display:grid; grid-template-columns:86px 1fr; gap:14px; align-items:center; margin:15px 0; padding:12px; border-radius:18px; background:rgba(255,255,255,.68); }
.daily-visit-thumb { width:86px; height:86px; display:grid; place-items:center; overflow:hidden; border-radius:15px; background:#f5ede7; font-size:30px; }
.daily-visit-thumb img,.daily-visit-thumb video { width:100%; height:100%; object-fit:cover; }
.daily-visit-memory strong,.daily-visit-memory span { display:block; }
.daily-visit-memory span { margin-top:5px; color:#a08c80; font-size:11px; }
.daily-visit-memory p { margin:8px 0 0; color:#75655c; font-size:12px; line-height:1.5; }
.daily-visit-actions { display:grid; grid-template-columns:1fr 1fr; gap:9px; }
.daily-visit-actions button { min-height:42px; border:1px solid #ead9cf; border-radius:14px; background:#fffaf6; color:#765b4d; }
.daily-visit-actions .primary { background:#f4c6b6; border-color:#edaf98; }
.mailbox-flow { position:fixed; z-index:45; inset:0; width:min(100%,430px); margin:auto; overflow-y:auto; background:linear-gradient(160deg,#fcfaf6,#fff9f2 58%,#fbf8f1); color:#4a382e; }
.mailbox-body { padding:20px 20px calc(32px + env(safe-area-inset-bottom)); }
.mailbox-intro { margin:0 0 15px; color:#79685f; }
.mail-compose { padding:17px; }
.mail-compose label { display:block; margin:0 0 13px; color:#715b4f; font-size:12px; }
.mail-compose input,.mail-compose textarea { width:100%; margin-top:7px; border:1px solid #eadfd8; border-radius:14px; padding:12px; background:#fffdf9; color:#4f3d34; font:inherit; box-sizing:border-box; }
.mail-compose textarea { min-height:120px; resize:vertical; }
.letter-send-button,.letter-keep-button { width:100%; min-height:48px; border:1px solid #eaa88f; border-radius:999px; background:#f5c5b4; color:#5b4237; font-size:15px; }
.letter-send-button:disabled { opacity:.5; }
.letter-limit-copy { margin:10px 0 0; color:#a06d60; font-size:12px; line-height:1.5; }
.letter-tabs { margin:18px 0 13px; }
.letter-group h3 { margin:18px 4px 8px; font-size:13px; color:#8a7568; }
.letter-card { width:100%; display:grid; grid-template-columns:42px 1fr; gap:10px; margin-bottom:9px; padding:14px; border:1px solid #eadfd7; border-radius:18px; background:#fffdf9; text-align:left; color:#59453b; }
.letter-card>span { font-size:25px; }
.letter-card strong,.letter-card small,.letter-card p { display:block; }
.letter-card small { margin-top:5px; color:#a08b7f; font-size:11px; }
.letter-card p { margin:7px 0 0; color:#74645b; font-size:12px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.letter-popup,.letter-detail { position:fixed; z-index:90; inset:0; display:grid; place-items:center; padding:22px; background:rgba(72,54,44,.28); backdrop-filter:blur(7px); }
.letter-popup-card,.letter-detail article { position:relative; width:min(100%,370px); padding:28px 22px 22px; border:1px solid #ecded4; border-radius:28px; background:#fffaf5; box-shadow:0 24px 60px rgba(75,52,40,.19); text-align:center; }
.letter-popup-close { position:absolute; right:14px; top:14px; width:38px; height:38px; border:0; border-radius:50%; background:#f5eee8; font-size:24px; }
.letter-envelope { display:block; width:108px; height:108px; margin:0 auto -3px; object-fit:contain; mix-blend-mode:multiply; }
.letter-popup-card p { margin:10px 0 6px; color:#735c4f; }
.letter-popup-card small { color:#a18474; }
.letter-popup-card h3 { margin:12px 0 22px; color:#543d32; }
.letter-popup-actions { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.letter-popup-actions button { min-height:44px; border:1px solid #ead9cf; border-radius:14px; background:#fff; color:#74594b; }
.letter-popup-actions .primary { background:#f4c4b2; border-color:#eca990; }
.letter-detail article { text-align:left; }
.letter-detail article>span { display:block; text-align:center; font-size:42px; }
.letter-detail h2 { margin:16px 0; text-align:center; color:#533d33; }
.letter-detail p { min-height:120px; white-space:pre-wrap; color:#604b40; line-height:1.85; }
.letter-detail footer { margin:20px 0; white-space:pre-line; color:#998174; text-align:right; line-height:1.7; }
.notification-button { position:absolute; z-index:2; top:10px; right:10px; min-height:34px; padding:0 12px; border:1px solid #eadfd5; border-radius:999px; background:rgba(255,252,248,.94); color:#765f52; box-shadow:0 5px 14px rgba(90,65,51,.07); font-size:12px; }
.notification-button.enabled { color:#667a55; background:#f2f6ec; }

body.skin-care { --universe-bg:linear-gradient(160deg,#fcfaf7,#f5f3fb 58%,#fbf8f4);--universe-primary:#c8b8db;--universe-motion:.65; }
body.skin-care .universe-mood-card { background:linear-gradient(135deg,#e9e8fb,#dfe3fa); }
body.skin-care .hug-button { border-color:#e3a998;background:#f9dcd3;box-shadow:0 10px 24px rgba(207,130,111,.17); }
body.skin-care * { animation-duration:calc(var(--universe-motion) * 1s); }
body.skin-sweet { --universe-bg:linear-gradient(155deg,#fffaf7,#fff4f4 58%,#faf6f1);--universe-primary:#eea4b6; }
body.skin-sweet .universe-mood-card { background:linear-gradient(135deg,#fde8e2,#f9ded9); }
body.skin-sweet .mailbox-entry-button { border-color:#ecad9e;background:#fff0e9;box-shadow:0 10px 24px rgba(210,130,110,.15); }
body.skin-starlight { --universe-bg:linear-gradient(155deg,#fffaf0,#fff6df 58%,#fbf8f1);--universe-primary:#e8c167; }
body.skin-starlight .universe-mood-card { background:linear-gradient(135deg,#fff1d7,#f9e7c8);box-shadow:0 10px 28px rgba(220,175,84,.15); }
body.skin-starlight .memory-card,body.skin-starlight .capsule-card { box-shadow:0 10px 24px rgba(213,173,91,.14);border-color:rgba(226,194,123,.62); }
body.skin-quiet { --universe-bg:linear-gradient(155deg,#f8f5f1,#f1edeb 58%,#f7f4f0);--universe-primary:#d1c3b8;--universe-motion:.5; }
body.skin-quiet .universe-mood-card { background:linear-gradient(135deg,#eee9f2,#e8e4ed);box-shadow:none; }
body.skin-quiet * { animation-duration:calc(var(--universe-motion) * 1s); }
.adult-dice-entry.mood-muted { opacity:.55;box-shadow:none; }

.tab-bar { position: fixed; z-index: 10; left: 50%; bottom: 0; transform: translateX(-50%); width: min(100%, 430px); height: calc(72px + env(safe-area-inset-bottom)); padding: 6px 12px env(safe-area-inset-bottom); display: grid; grid-template-columns: repeat(4, 1fr); background: rgba(253,251,248,.95); border-top: 1px solid rgba(224,216,208,.8); backdrop-filter: blur(18px); }
.tab { border: 0; background: none; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 4px; color: #897a72; cursor: pointer; }
.tab em { font-size: 12px; font-style: normal; }
.tab.active { color: #68564d; }
.tab.active::after { content: ""; width: 18px; height: 3px; border-radius: 5px; background: var(--sage); }
.mascot { position: relative; width: 30px; height: 30px; color: currentColor; display: block; transform: scale(.88); transform-origin: center; }
.mascot::before, .mascot::after, .mascot i::before, .mascot i::after { content: ""; position: absolute; box-sizing: border-box; border: 1.5px solid currentColor; }
.avocado::before { width: 23px; height: 30px; left: 6px; top: 2px; border-radius: 52% 52% 48% 48% / 68% 68% 36% 36%; transform: rotate(4deg); }
.avocado::after { width: 10px; height: 10px; border-radius: 50%; left: 13px; top: 17px; background: #eec1a5; }
.cow::before { width: 25px; height: 24px; left: 5px; top: 7px; border-radius: 46%; }
.cow::after { width: 7px; height: 7px; left: 2px; top: 6px; border-radius: 80% 20%; box-shadow: 23px 0 0 -1px #fbfaf7, 23px 0 0 0 currentColor; transform: rotate(25deg); }
.cow i::before { width: 13px; height: 8px; left: 11px; top: 20px; border-radius: 50%; }
.giraffe::before { width: 14px; height: 25px; left: 11px; top: 7px; border-radius: 45% 45% 38% 38%; }
.giraffe::after { width: 10px; height: 4px; left: 13px; top: 3px; border-radius: 50%; box-shadow: -5px -1px 0 -1px #fbfaf7, -5px -1px 0 0 currentColor, 5px -1px 0 -1px #fbfaf7, 5px -1px 0 0 currentColor; }
.giraffe i::before { width: 3px; height: 3px; border-radius: 50%; left: 15px; top: 13px; background: currentColor; box-shadow: 5px 0 currentColor, 1px 7px currentColor, 6px 10px currentColor; border: 0; }
.bear::before { width: 26px; height: 25px; left: 4px; top: 7px; border-radius: 48%; }
.bear::after { width: 8px; height: 8px; left: 3px; top: 4px; border-radius: 50%; background: #fbfaf7; box-shadow: 21px 0 0 -1px #fbfaf7, 21px 0 0 0 currentColor; }
.bear i::before { width: 10px; height: 7px; left: 12px; top: 20px; border-radius: 50%; }
.bear i::after { width: 2px; height: 2px; left: 12px; top: 15px; border: 0; border-radius: 50%; background: currentColor; box-shadow: 8px 0 currentColor; }
.strawberry-bear::before { background: rgba(240,174,167,.18); }
.strawberry-bear i::before { background: rgba(239,154,147,.22); }

.placeholder-screen { padding-top: max(80px, env(safe-area-inset-top)); text-align: center; }
.placeholder-screen h2 { font-size: 34px; margin: 0 0 12px; }
.placeholder-screen p { color: var(--muted); }
.segmented { display: flex; padding: 4px; margin: 30px auto 20px; max-width: 320px; border-radius: 16px; background: #eee9e4; }
.segmented button { flex: 1; border: 0; border-radius: 12px; padding: 10px; background: transparent; }
.segmented .selected { background: white; box-shadow: 0 3px 8px rgba(0,0,0,.05); }

.sheet-backdrop { position: fixed; z-index: 20; inset: 0; background: rgba(55,45,40,.24); backdrop-filter: blur(3px); }
.bottom-sheet { position: fixed; z-index: 21; left: 50%; bottom: 0; transform: translateX(-50%); width: min(100%, 430px); padding: 12px 22px calc(24px + env(safe-area-inset-bottom)); border-radius: 28px 28px 0 0; background: #fffdfb; box-shadow: 0 -12px 35px rgba(45,35,30,.12); }
.sheet-handle { width: 42px; height: 5px; margin: 0 auto 20px; border-radius: 8px; background: #ded7d1; }
.sheet-close { position: absolute; right: 18px; top: 17px; width: 34px; height: 34px; border: 0; border-radius: 50%; background: #f4f0ec; font-size: 24px; color: #776b65; }
.bottom-sheet h2 { margin: 0; font-size: 26px; }
.bottom-sheet > p { margin: 7px 0 18px; color: var(--muted); }
.comfort-list { display: grid; gap: 9px; }
.comfort-list button { display: flex; justify-content: space-between; align-items: center; min-height: 52px; border: 1px solid var(--line); border-radius: 17px; padding: 0 16px; text-align: left; background: #fbf8f5; cursor: pointer; }
.comfort-list button span { color: #aa9b92; font-size: 22px; }
.comfort-list .urgent { color: #9e514d; background: #fff3f1; border-color: #f1d2cd; }
.toast { position: fixed; z-index: 30; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(310px, calc(100% - 48px)); padding: 18px 20px; border-radius: 18px; background: rgba(56,47,42,.92); color: white; text-align: center; box-shadow: 0 18px 40px rgba(0,0,0,.18); }
[hidden] { display: none !important; }

.hug-flow { position: fixed; z-index: 40; inset: 0; width: min(100%, 430px); margin: 0 auto; overflow-y: auto; background: linear-gradient(160deg,#fcfaf6,#fff9f2 58%,#fbf8f1); color: #4a382e; }
.hug-header { position: sticky; z-index: 3; top: 0; height: calc(72px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 18px 0; display: grid; grid-template-columns: 48px 1fr 58px; align-items: center; background: rgba(252,250,246,.9); backdrop-filter: blur(14px); }
.hug-header h2 { margin: 0; text-align: center; font-size: 20px; font-weight: 560; }
.hug-back { width: 42px; height: 42px; border: 1px solid #eadfd5; border-radius: 50%; background: #fffaf4; color: #765640; font-size: 25px; box-shadow: 0 6px 14px rgba(92,72,61,.07); }
.mini-mark { width: 58px; height: 58px; }
.home-mark-button { width:58px; height:58px; padding:0; border:0; background:transparent; border-radius:14px; }
.hug-page { display: none; min-height: calc(100dvh - 72px - env(safe-area-inset-top)); padding: 20px 22px calc(28px + env(safe-area-inset-bottom)); }
.hug-page.active { display: flex; flex-direction: column; }
.hug-intro { margin: 6px 0 4px; font-size: 15px; line-height: 1.6; }
.hug-intro strong { font-size: 17px; font-weight: 600; }
.hug-intro p { margin: 5px 0 0; color: #796a61; }
.hug-art { display: block; width: 100%; animation: gentle-breathe 3.8s ease-in-out infinite; }
.hug-illustration { position:relative; overflow:hidden; flex:0 0 auto; }
.hug-illustration img { position:absolute; max-width:none; height:auto; }
.petting-art { aspect-ratio:430/272; margin: 8px auto; }
.petting-art img { width:336.744%; left:-47.674%; top:-94.853%; }
.message-art { width:88%; margin:-4px auto 2px; }
.action-art { margin:30px auto 8px; }
.call-art { aspect-ratio:440/350; }
.call-art img { width:329.091%; left:-39.773%; top:-70%; }
.find-art { aspect-ratio:420/355; }
.find-art img { width:344.762%; left:-46.429%; top:-66.197%; }
.waiting-art { aspect-ratio:430/365; margin:8px auto 0; }
.waiting-art img { width:336.744%; left:-193.023%; top:-50.685%; }
@keyframes gentle-breathe { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
.hug-primary-options { display: grid; gap: 10px; margin-top: auto; }
.hug-primary-options button { min-height: 58px; border: 1px solid #ecdcd1; border-radius: 20px; padding: 0 18px; display: flex; align-items: center; justify-content: space-between; background: rgba(255,250,245,.95); color: #574238; font-size: 16px; box-shadow: 0 7px 16px rgba(108,78,58,.06); }
.hug-primary-options button span { color: #c89a80; font-size: 22px; }
.message-block h3 { margin: 3px 0 0; font-size: 17px; font-weight: 600; }
.selection-hint { margin: 4px 0 12px; color: #95847a; font-size: 12px; }
.feeling-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.feeling-grid button { position: relative; min-height: 82px; border: 1px solid #eadfd5; border-radius: 20px; background: rgba(255,252,248,.92); color: #5c493f; box-shadow: 0 7px 15px rgba(90,65,51,.05); }
.feeling-grid button i { display: none; position: absolute; right: 8px; top: 8px; width: 22px; height: 22px; border-radius: 50%; place-items: center; background: #e99274; color: white; font-style: normal; font-size: 13px; }
.feeling-grid button.selected { border-color: #efae96; background: #fbe1d7; }
.feeling-grid button.selected i { display: grid; }
.flow-main-button { width: 100%; min-height: 58px; margin-top: auto; border: 1px solid #efad94; border-radius: 999px; background: #f8cdbd; color: #5a4035; font-size: 17px; box-shadow: 0 9px 20px rgba(183,112,81,.12); }
.centered-flow { align-items: center; text-align: center; }
.flow-copy { margin: 18px 0 22px; line-height: 1.8; color: #745d50; }
.flow-copy p { margin: 0; }
.flow-copy strong { font-weight: 540; }
.flow-copy h3 { font-size: 27px; margin: 0; font-weight: 600; letter-spacing: .05em; }
.waiting-page { align-items: center; text-align: center; }
.waiting-copy { margin: 8px auto 18px; }
.waiting-copy h3 { margin: 0 0 17px; font-size: 26px; font-weight: 600; }
.waiting-copy p { white-space: pre-line; margin: 0; color: #806a5d; line-height: 1.9; font-size: 15px; }
.waiting-copy span { display: block; margin-top: 16px; color: #efa27f; }
.memory-secondary { width: 100%; min-height: 57px; margin-top: auto; border: 1px solid #eadfd3; border-radius: 999px; background: #fffaf5; color: #664d3f; font-size: 16px; box-shadow: 0 7px 16px rgba(86,62,48,.06); }
.memory-secondary span { display: inline-grid; place-items: center; width: 28px; height: 28px; margin-right: 12px; border-radius: 8px; background: #ed9b78; color: white; }
.comfort-memories { display: grid; gap: 12px; margin-top: 24px; }
.comfort-memories article { min-height: 96px; padding: 14px 18px; display: flex; align-items: center; gap: 16px; border: 1px solid #eadfd5; border-radius: 22px; background: rgba(255,252,248,.92); box-shadow: 0 8px 18px rgba(90,65,51,.06); }
.comfort-memories article > span { width: 60px; height: 60px; display: grid; place-items: center; border-radius: 18px; background: #fff5ed; font-size: 30px; }
.comfort-memories article > span img,.comfort-memories article > span video { width:100%; height:100%; object-fit:cover; border-radius:inherit; }
.comfort-memories div { display: flex; flex-direction: column; gap: 6px; text-align: left; }
.comfort-memories small { color: #97877d; }
.comfort-memories strong { font-size: 17px; font-weight: 570; }

.feature-screen { overflow-y: auto; padding-top: max(28px,env(safe-area-inset-top)); background: linear-gradient(165deg,#fcfaf7,#f8f5f1); }
.feature-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 18px; }
.feature-header h2 { margin: 0; font-size: 29px; letter-spacing: .02em; }
.feature-header p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.record-button,.section-toolbar button { border: 1px solid #eadfd6; border-radius: 14px; padding: 9px 12px; background: #fffaf6; color: #6b5448; }
.season-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 12px; scrollbar-width: none; }
.season-tabs::-webkit-scrollbar { display:none; }
.season-tabs button { flex: 0 0 auto; border: 1px solid #e8e0d9; border-radius: 999px; padding: 8px 12px; background: #fffdfa; color: #83766e; font-size: 12px; }
.season-tabs button.selected { background: #e8f1df; border-color: #d7e7ca; color: #648251; }
.memory-list { display: grid; gap: 11px; padding-bottom: 16px; }
.memory-item { position: relative; min-height: 116px; padding: 14px 14px 14px 112px; border: 1px solid #e8e0d9; border-radius: 22px; background: rgba(255,255,255,.84); box-shadow: 0 8px 20px rgba(88,66,54,.06); text-align: left; }
.memory-thumb { position: absolute; left: 13px; top: 13px; width: 86px; height: 88px; display: grid; place-items: center; overflow: hidden; border-radius: 17px; background: #f8eee5; font-size: 34px; }
.memory-thumb img,.memory-thumb video { width:100%; height:100%; object-fit:cover; }
.recent-row > span { overflow:hidden; }
.recent-row > span img,.recent-row > span video { width:100%; height:100%; object-fit:cover; border-radius:inherit; }
.memory-item small { color:#9b8c82; font-size:11px; }
.memory-item h3 { margin:8px 0 6px; font-size:16px; }
.memory-item p { margin:0; color:#776a62; font-size:12px; line-height:1.45; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.season-badge { position:absolute; right:12px; top:12px; font-size:11px; color:#7e9270; }
.together-hub{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:4px 0 22px}
.together-hub-card{position:relative;display:flex;min-width:0;min-height:132px;padding:17px 15px;border:1px solid rgba(123,91,72,.09);border-radius:25px;background:linear-gradient(145deg,rgba(255,253,250,.98),rgba(248,239,231,.88));box-shadow:0 11px 28px rgba(85,59,43,.06);text-align:left;flex-direction:column;align-items:flex-start;justify-content:flex-end;color:#564036;overflow:hidden}
.together-hub-card::after{content:"";position:absolute;width:88px;height:88px;right:-24px;top:-25px;border-radius:50%;background:rgba(239,184,158,.14)}
.together-hub-card.bet{background:linear-gradient(145deg,rgba(255,253,250,.98),rgba(239,243,230,.9))}
.together-hub-card.bet::after{background:rgba(170,192,145,.16)}
.together-hub-card.selected{border-color:rgba(221,151,122,.42);box-shadow:0 14px 32px rgba(188,119,91,.12),inset 0 0 0 1px rgba(255,255,255,.6)}
.together-hub-card.bet.selected{border-color:rgba(142,169,111,.42);box-shadow:0 14px 32px rgba(107,137,80,.11),inset 0 0 0 1px rgba(255,255,255,.6)}
.together-hub-icon{position:absolute;z-index:1;left:15px;top:15px;display:grid;place-items:center;width:40px;height:40px;border-radius:15px;background:#fff7f2;color:#bc7961;font-size:22px;box-shadow:0 6px 16px rgba(111,73,51,.07)}
.together-hub-card.bet .together-hub-icon{background:#f4f7ed;color:#7f9b65}
.together-hub-card strong{position:relative;z-index:1;font-size:18px;letter-spacing:.03em}
.together-hub-card small{position:relative;z-index:1;display:block;max-width:100%;margin-top:5px;color:#9b8c82;font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.together-hub-card:active{transform:scale(.985)}
.together-pane { display:none; }
.together-pane.active { display:block; }
.section-toolbar { display:flex; align-items:center; justify-content:space-between; margin-bottom:12px; }
.section-toolbar h3 { margin:0; font-size:18px; }
.todo-list,.bet-list { display:grid; gap:11px; padding-bottom:16px; }
.todo-item { width:100%; display:flex; align-items:center; gap:12px; min-height:72px; padding:12px 14px; border:1px solid #e8e0d9; border-radius:18px; background:#fffdfa; text-align:left; }
.todo-check { width:30px; height:30px; flex:0 0 auto; border:1.5px solid #cdbdaf; border-radius:50%; background:white; }
.todo-item.done .todo-check { background:#9caf89; border-color:#9caf89; color:white; }
.todo-item.done strong { text-decoration:line-through; color:#a59a93; }
.todo-item .todo-main { display:flex; flex-direction:column; gap:5px; }
.todo-item small { color:#a0958e; }
.bet-card { position:relative; width:100%; padding:15px; border:1px solid #e8e0d9; border-radius:20px; background:#fffdfa; box-shadow:0 7px 18px rgba(82,61,49,.05); text-align:left; }
.bet-card h4 { margin:5px 0 12px; font-size:16px; }
.status-pill { display:inline-block; border-radius:999px; padding:4px 8px; font-size:10px; }
.status-active { background:#def0d5; color:#4f8b48; }
.status-ended { background:#ffe7cd; color:#dc8a44; }
.status-settled { background:#e6e3e1; color:#79716c; }
.bet-lines { display:grid; gap:7px; font-size:12px; color:#675850; }
.bet-lines b { display:inline-block; min-width:54px; color:#8d7d73; font-weight:500; }
.bet-card-footer { display:flex; align-items:center; justify-content:space-between; margin-top:12px; padding-top:10px; border-top:1px solid #eee7e1; }
.bet-card-footer i,.item-chevron { color:#a99b92; font-style:normal; font-size:12px; }
.bet-card-footer button { border:0; border-radius:12px; padding:8px 12px; background:#f4e6dc; color:#795445; }
.winner { color:#dc7d55; font-weight:600; font-size:12px; }
.empty-state { padding:36px 20px; text-align:center; color:#9b8d84; }
.modal-backdrop { position:fixed; z-index:60; inset:0; background:rgba(48,38,33,.28); backdrop-filter:blur(3px); }
.action-sheet,.form-modal,.detail-modal { position:fixed; z-index:61; left:50%; transform:translateX(-50%); width:min(calc(100% - 28px),402px); background:#fffdfb; box-shadow:0 18px 50px rgba(56,41,34,.18); }
.action-sheet { bottom:calc(12px + env(safe-area-inset-bottom)); padding:12px 16px 16px; border-radius:26px; }
.action-sheet h3 { margin:8px 4px 13px; }
.action-sheet > button { width:100%; min-height:50px; margin-top:8px; border:1px solid #ede4dd; border-radius:16px; background:#fffaf6; text-align:left; padding:0 16px; }
.action-sheet .sheet-cancel { text-align:center; color:#9a8b82; }
.form-modal { top:50%; transform:translate(-50%,-50%); max-height:calc(100dvh - 36px); overflow-y:auto; padding:22px; border-radius:24px; }
.form-modal h3 { margin:0 0 18px; font-size:22px; }
.form-modal > p { color:#877970; }
.form-modal label { display:flex; flex-direction:column; gap:7px; margin-top:12px; font-size:12px; color:#71625a; }
.form-modal input,.form-modal textarea { width:100%; border:1px solid #e8dfd8; border-radius:14px; padding:12px; background:#fcfaf8; font:inherit; color:#44372f; }
.form-modal select { width:100%; border:1px solid #e8dfd8; border-radius:14px; padding:12px; background:#fcfaf8; font:inherit; color:#44372f; }
.form-modal textarea { min-height:110px; resize:vertical; }
.modal-actions { display:flex; gap:10px; margin-top:20px; }
.modal-actions button { flex:1; min-height:46px; border:1px solid #e6ddd6; border-radius:14px; background:#fffaf6; }
.modal-actions .primary { background:#9b897e; color:white; border-color:#9b897e; }
.detail-modal { top:50%; transform:translate(-50%,-50%); max-height:calc(100dvh - 36px); overflow-y:auto; padding:18px; border-radius:24px; }
.detail-close { float:right; width:34px; height:34px; border:0; border-radius:50%; background:#f2ece7; font-size:22px; }
.detail-media { width:100%; max-height:55dvh; object-fit:contain; border-radius:18px; background:#f5f0ec; }
.detail-gallery { display:grid; gap:10px; }
.detail-gallery .detail-media { display:block; width:100%; max-height:none; }
.media-upload-progress { margin:14px 0 2px; }
.media-upload-progress > div { height:9px; overflow:hidden; border-radius:999px; background:#f0e7e0; }
.media-upload-progress > div span { display:block; width:0; height:100%; border-radius:inherit; background:linear-gradient(90deg,#eeb7a7,#e4937e); transition:width .18s ease; }
.media-upload-progress small { display:block; margin-top:7px; color:#8b7468; text-align:center; font-size:11px; }
.detail-modal h3 { margin:18px 0 8px; font-size:22px; }
.detail-meta { color:#978a81; font-size:12px; line-height:1.7; }
.detail-content { line-height:1.8; color:#66554b; }
.detail-kicker { display:inline-block; margin:8px 0 4px; padding:5px 9px; border-radius:999px; background:#edf2e8; color:#667b59; font-size:11px; }
.detail-lines { display:grid; gap:9px; margin:18px 0; padding:15px; border-radius:18px; background:#faf6f2; }
.detail-lines p { display:grid; grid-template-columns:72px 1fr; gap:8px; margin:0; color:#66564d; font-size:13px; line-height:1.5; }
.detail-lines b { color:#99887e; font-weight:500; }
.detail-actions { display:grid; gap:9px; margin-top:20px; }
.primary-detail-button,.danger-button { width:100%; min-height:48px; border-radius:15px; }
.primary-detail-button { border:1px solid #eba98f; background:#f7cdbc; color:#68483b; }
.danger-button { margin-top:16px; border:1px solid #efd8d2; background:#fff8f6; color:#af665b; }
.detail-actions .danger-button { margin-top:0; }
.confirm-modal .primary { background:#bb7466; border-color:#bb7466; }
.settle-options { display:grid; gap:10px; margin:18px 0; }
.settle-options button { min-height:48px; border-radius:14px; border:1px solid #e5ddd6; background:#fffaf6; }
.settle-options button:nth-child(1){border-color:#b8d8ae;background:#eff8eb;color:#4c8545}.settle-options button:nth-child(2){border-color:#f1c0b7;background:#fff0ed;color:#c45f54}.settle-options button:nth-child(3){border-color:#efd3a7;background:#fff7e9;color:#b47b30}
.sheet-cancel { width:100%; min-height:44px; border:0; background:transparent; color:#9d8f87; }
.plan-categories { display:flex; gap:6px; overflow-x:auto; padding:1px 0 16px; scrollbar-width:none; }
.plan-categories::-webkit-scrollbar{display:none}.plan-categories button{flex:0 0 auto;border:1px solid #e6ddd5;border-radius:999px;padding:8px 14px;background:#fffdfa;color:#84766d}.plan-categories button.selected{background:#e8f1df;border-color:#d4e4c7;color:#5d7e4e}
.plan-status-filter { display:flex; gap:8px; margin:-5px 0 16px; }
.plan-status-filter button { min-height:36px; padding:0 15px; border:1px solid #e7ded7; border-radius:999px; background:#fffdfa; color:#92847b; font-size:12px; }
.plan-status-filter button.selected { border-color:#e8b7a4; background:#fff0e9; color:#8a5a49; box-shadow:0 5px 12px rgba(153,91,68,.06); }
.todo-category { display:inline-block; width:max-content; border-radius:999px; padding:3px 8px; background:#f0ebe6; color:#897a70; font-size:10px; }
.todo-item.done .todo-category{background:#e5eee0;color:#688258}.todo-item .todo-check{font-size:14px}.todo-item .todo-main{flex:1}.todo-item .todo-status{font-size:10px;text-transform:uppercase;letter-spacing:.08em}
.capsule-list { display:grid; gap:12px; padding-bottom:16px; }
.capsule-card-item { position:relative; min-height:145px; padding:18px; border:1px solid #e7ded6; border-radius:24px; background:linear-gradient(145deg,#fffdfa,#f8eee7); box-shadow:0 9px 22px rgba(82,61,49,.06); cursor:pointer; }
.capsule-delete-button { position:absolute; right:12px; top:10px; width:34px; height:34px; min-height:34px; padding:0; border:0; border-radius:50%; background:#fff8f5; color:#b8796d; font-size:19px; }
.capsule-card-item h3{margin:10px 0 8px;font-size:18px}.capsule-card-item p{margin:0;color:#786a61;font-size:12px;line-height:1.6}.capsule-card-item footer{display:flex;justify-content:space-between;align-items:center;margin-top:16px}.capsule-card-item footer small{color:#9a8d84}.capsule-card-item button{border:1px solid #efb8a4;border-radius:14px;padding:8px 14px;background:#fbe2d8;color:#8b5846}.capsule-status{display:inline-block;border-radius:999px;padding:5px 9px;font-size:10px}.capsule-locked{background:#ece6e1;color:#766b64}.capsule-ready{background:#ffe6cf;color:#c87c3b}.capsule-opened{background:#e3efdd;color:#5d8052}
.capsule-opening { position:fixed; z-index:80; inset:0; width:min(100%,430px); margin:0 auto; background:radial-gradient(circle at 50% 40%,#fff9e9,#fbf4ed 60%,#f8f4ef); overflow:hidden; }
.capsule-stage{position:relative;height:100%;padding:calc(70px + env(safe-area-inset-top)) 28px calc(40px + env(safe-area-inset-bottom));display:flex;flex-direction:column;align-items:center;text-align:center;overflow-y:auto}.capsule-stage .detail-close{position:fixed;z-index:2;right:max(20px,calc((100vw - 430px)/2 + 20px));top:calc(18px + env(safe-area-inset-top))}.sealed-capsule{display:grid;place-items:center;flex:0 0 auto;width:150px;height:150px;margin:7vh 0 28px;border-radius:50%;font-size:72px;background:rgba(255,255,255,.64);box-shadow:0 0 0 12px rgba(255,220,183,.18),0 0 55px rgba(255,183,118,.35);animation:capsule-unseal 1.4s ease both}.opening-kicker{color:#a98d7c;opacity:0;animation:line-reveal .7s .8s forwards}.capsule-stage>h2{font-size:26px;opacity:0;animation:line-reveal .7s 1.1s forwards}.opening-content{width:100%;white-space:pre-line;line-height:1.9;color:#655249;opacity:0;animation:line-reveal .8s 1.45s forwards}.capsule-replies{width:100%;margin:28px 0 8px;padding:22px 18px;border:1px solid rgba(137,101,79,.1);border-radius:24px;background:rgba(255,253,250,.78);box-shadow:0 12px 30px rgba(94,62,43,.06);text-align:left;opacity:0;animation:line-reveal .8s 1.7s forwards}.capsule-replies h3{margin:0 0 15px;font-size:16px;color:#5f473b}.capsule-reply{padding:13px 0;border-bottom:1px solid rgba(137,101,79,.1)}.capsule-reply:last-child{border-bottom:0}.capsule-reply strong{font-size:12px;color:#a06f5c}.capsule-reply p{margin:6px 0;white-space:pre-line;line-height:1.7;color:#665248}.capsule-reply small,.capsule-replies-empty,.capsule-reply-note{color:#9a8b82;font-size:11px}.capsule-reply-form{display:grid;gap:10px;margin-top:16px}.capsule-reply-form textarea{min-height:92px;padding:14px;border:1px solid rgba(126,92,72,.13);border-radius:18px;background:#fffdfa;color:#5f4a40;resize:none}.capsule-reply-form button{min-height:46px;border:0;border-radius:999px;background:linear-gradient(135deg,#f5c8b7,#e9a58f);color:#684a3d}.capsule-reply-note{text-align:center;margin:14px 0 0}@keyframes capsule-unseal{0%{transform:scale(.82);filter:brightness(.88)}45%{transform:scale(1.08) rotate(-2deg);filter:brightness(1.1)}100%{transform:scale(1);filter:brightness(1)}}@keyframes line-reveal{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}

.capsule-reply-form{display:flex;flex-direction:column;gap:12px;margin-top:18px}
.capsule-reply-form textarea{display:block;width:100%;min-height:104px;padding:15px 16px;border:1px solid rgba(126,92,72,.12);border-radius:20px;background:rgba(255,253,250,.94);box-shadow:inset 0 1px 0 rgba(255,255,255,.85),0 6px 18px rgba(91,61,43,.04);color:#5f4a40;font:inherit;line-height:1.65;resize:none;outline:0}
.capsule-reply-form textarea:focus{border-color:rgba(222,154,128,.55);box-shadow:0 0 0 4px rgba(239,178,153,.12),0 8px 22px rgba(91,61,43,.05)}
.capsule-reply-form button,.capsule-reply-form button.primary{display:flex;align-items:center;justify-content:center;width:100%;min-height:50px;margin:0;padding:0 22px;border:1px solid rgba(210,137,109,.18);border-radius:999px;background:linear-gradient(135deg,#f5c8b7 0%,#edae97 52%,#e99c84 100%);box-shadow:0 10px 22px rgba(198,122,94,.18),inset 0 1px 0 rgba(255,255,255,.48);color:#68483b;font:600 14px/1 system-ui,-apple-system,"PingFang SC",sans-serif;letter-spacing:.04em;appearance:none;-webkit-appearance:none}
.capsule-reply-form button:active{transform:translateY(1px);box-shadow:0 5px 12px rgba(198,122,94,.15)}
.capsule-reply-form button:disabled{opacity:.55}

@media (max-height: 760px) {
  .hug-page { padding-top: 12px; }
  .petting-art { max-height: 250px; }
  .action-art { max-height: 300px; margin-top: 10px; }
  .waiting-art { max-height: 275px; }
}

/* v4 unified components */
.icon-button { width: 44px; height: 44px; min-height: 44px; padding: 0; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: rgba(255,253,249,.9); box-shadow: 0 6px 14px rgba(92,72,61,.06); font-size: 20px; }
.primary-button,.secondary-button,.memory-save-button { width: 100%; min-height: 52px; border-radius: var(--radius-small); padding: 0 18px; }
.primary-button { border: 1px solid #e7a58e; background: #f5c7b6; color: #5e4237; box-shadow: 0 9px 20px rgba(183,112,81,.1); }
.secondary-button { border: 1px solid var(--line); background: var(--color-surface); color: #65534a; }
.secondary-button.compact { width: auto; min-height: 42px; padding: 0 14px; }
.memory-save-button { border: 0; background: transparent; color: #8d7164; text-decoration: underline; text-underline-offset: 4px; }
.memory-save-button:disabled { opacity: .42; text-decoration: none; }
.soft-card { border: 1px solid rgba(231,222,214,.9); border-radius: var(--radius-card); background: rgba(255,253,249,.9); box-shadow: var(--shadow-soft); }

.moon-entry { font-size: 19px; }
.moon-flow { position: fixed; z-index: 45; inset: 0; width: min(100%,430px); margin: 0 auto; overflow-y: auto; background: linear-gradient(160deg,#fcfaf6,#fff9f3 55%,#f5f7ef); color: var(--color-cocoa); }
.page-header { position: sticky; z-index: 4; top: 0; min-height: calc(78px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 18px 10px; display: grid; grid-template-columns: 48px 1fr 48px; align-items: center; gap: 10px; background: rgba(252,250,246,.91); backdrop-filter: blur(16px); }
.page-header h2 { margin: 0; text-align: center; font-size: 21px; font-weight: 620; }
.page-header p { margin: 3px 0 0; text-align: center; color: var(--muted); font-size: 11px; }
.moon-page { display: none; min-height: calc(100dvh - 78px - env(safe-area-inset-top)); padding: 18px 20px calc(28px + env(safe-area-inset-bottom)); }
.moon-page.active { display: block; }
.moon-eyebrow { margin: 7px 2px 14px; color: #89796f; font-size: 13px; }
.moon-weather-strip{display:grid;grid-template-columns:repeat(5,1fr);gap:6px;margin:0 0 14px;padding:7px;border:1px solid rgba(123,91,72,.08);border-radius:22px;background:rgba(255,253,249,.72);box-shadow:0 8px 22px rgba(83,59,44,.04)}
.moon-weather-strip>span{display:flex;min-width:0;min-height:55px;border-radius:16px;flex-direction:column;align-items:center;justify-content:center;gap:3px;color:#9b8d84;font-size:20px;transition:.18s ease}
.moon-weather-strip small{font-size:9px;white-space:nowrap}
.moon-weather-strip>span.active{background:linear-gradient(145deg,#fff7ef,#f4eadf);box-shadow:0 6px 15px rgba(120,81,56,.08);color:#6c5549;transform:translateY(-1px)}
.moon-status-card { min-height: 210px; padding: 24px 22px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; background: linear-gradient(145deg,rgba(255,253,249,.94),rgba(247,239,229,.88)); }
.moon-status-icon { width: 86px; height: 86px; display: grid; place-items: center; border-radius: 50%; background: linear-gradient(145deg,#fff9ed,#f4eadc); box-shadow: inset 0 0 0 1px rgba(229,215,202,.8),0 8px 18px rgba(92,72,61,.07); font-size: 42px; }
.moon-status-card h3 { margin: 15px 0 8px; font-size: 25px; font-weight: 630; }
.moon-status-card p { max-width: 300px; margin: 0; color: #75645b; font-size: 14px; line-height: 1.75; }
.care-section { margin: 22px 0 20px; }
.care-section h3 { margin: 0 0 11px; font-size: 15px; font-weight: 600; }
.care-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.care-chips span { min-height: 35px; padding: 8px 12px; border-radius: 999px; background: #edf2e8; color: #637456; font-size: 12px; }
.moon-actions { display: grid; gap: 10px; }
.privacy-note { margin: 12px 0 0; text-align: center; color: #a09389; font-size: 10px; }
.section-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin: 8px 0 18px; }
.section-title-row h3 { margin: 0; font-size: 20px; }
.section-title-row p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.cycle-history { display: grid; gap: 11px; }
.cycle-card { min-height: 78px; padding: 14px 15px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cycle-card div { display: flex; flex-direction: column; gap: 7px; }
.cycle-card strong { font-size: 14px; }
.cycle-card div span { color: #9b7466; font-size: 12px; }
.cycle-card button { flex: 0 0 auto; border: 1px solid #efc2b2; border-radius: 13px; padding: 0 11px; background: #fff0e9; color: #8b5e4c; font-size: 11px; }
.cycle-card .cycle-actions { display:flex; flex-direction:row; align-items:center; gap:8px; }
.cycle-card .cycle-actions .cycle-delete { color:#a96561; background:#fff7f5; border-color:#efd8d3; }
.cycle-done { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: #e7f0e1; color: #728b62; }
.moon-empty span { display: block; margin-bottom: 8px; font-size: 35px; }
.moon-empty strong { display: block; color: #6d5b52; }
.moon-empty p { margin: 7px 0 0; font-size: 12px; }

.adult-dice-entry{width:100%;min-height:76px;margin-top:14px;padding:11px 15px;border:1px solid rgba(216,188,166,.48);border-radius:23px;background:linear-gradient(145deg,rgba(255,253,249,.96),rgba(246,239,225,.9));color:#725346;box-shadow:0 11px 26px rgba(92,72,61,.07);display:grid;grid-template-columns:46px 1fr 18px;align-items:center;gap:12px;text-align:left}
.adult-dice-entry .adult-entry-icon{display:grid;place-items:center;width:46px;height:46px;margin:0;border-radius:17px;background:#eef2df;box-shadow:inset 0 0 0 1px rgba(125,148,95,.12);font-size:25px}
.adult-entry-copy{display:flex;min-width:0;flex-direction:column;gap:4px}
.adult-entry-copy strong{font-size:14px;color:#5d463b}
.adult-entry-copy small{font-size:10px;color:#9b8a80;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.adult-dice-entry i{font-style:normal;color:#ad9b90;font-size:20px}
.adult-dice-flow { position: fixed; z-index: 72; inset: 0; width: min(100%,430px); margin: 0 auto; overflow-y: auto; background: linear-gradient(160deg,#fcfaf6,#fff8f1 56%,#f7f4ed); color: #513d32; }
.adult-dice-header { position: sticky; z-index: 3; top: 0; min-height: calc(68px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 18px 8px; display: flex; align-items: center; justify-content: space-between; background: rgba(252,250,246,.92); backdrop-filter: blur(16px); }
.adult-dice-header div { display:flex; align-items:center; gap:9px; }
.adult-dice-header div span { font-size:25px; }
.adult-dice-header strong { font-size:17px; font-weight:630; }
.adult-dice-header button,.adult-card-close { width:38px; height:38px; border:1px solid #eadfd5; border-radius:50%; background:#fffaf5; color:#74594c; font-size:23px; }
.adult-dice-body { min-height: calc(100dvh - 68px - env(safe-area-inset-top)); padding: 18px 20px calc(28px + env(safe-area-inset-bottom)); }
.adult-dice-intro{display:flex;align-items:center;gap:15px;margin:0 0 22px;padding:18px;border:1px solid rgba(224,201,182,.64);border-radius:26px;background:linear-gradient(145deg,rgba(255,253,249,.98),rgba(250,234,224,.88));box-shadow:0 14px 32px rgba(98,64,46,.07)}
.adult-dice-intro>span{display:grid;place-items:center;flex:0 0 auto;width:62px;height:62px;border-radius:22px;background:#eef1da;font-size:34px;box-shadow:inset 0 0 0 1px rgba(125,148,95,.12)}
.adult-dice-intro small{color:#ad8a79;font-size:10px;letter-spacing:.12em}.adult-dice-intro h2{margin:4px 0;font-size:17px;line-height:1.35}.adult-dice-intro p{margin:0;color:#8c786d;font-size:11px}
.adult-control-label{margin:18px 2px 9px;color:#766157;font-size:12px;font-weight:600}
.adult-levels { display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:0 0 20px; }
.adult-levels button {display:flex;width:100%;height:58px;border:1px solid #e6d9cf;border-radius:19px;background:#fffdf9;font-size:22px;align-items:center;justify-content:center;gap:8px;color:#6d5145}
.adult-levels button small{font-size:12px;font-weight:600}
.adult-levels button.selected { border-color:#efb6a5; background:#f9ddd4; box-shadow:0 6px 16px rgba(211,139,117,.12); }
.adult-categories { display:flex; flex-wrap:wrap; justify-content:center; gap:9px; }
.adult-categories button { min-width:66px; min-height:37px; padding:7px 13px; border:1px solid #e6dbd2; border-radius:999px; background:#fffdf9; color:#6e584d; font-size:13px; }
.adult-categories button.selected { border-color:#efb7a5; background:#f9ddd4; color:#674438; }
.adult-usage { min-height:22px; margin:18px 0 10px; text-align:center; color:#806c61; font-size:12px; }
.adult-roll-button,.adult-reroll-button { width:100%; min-height:52px; border:0; border-radius:18px; background:#edaa98; color:#583b30; box-shadow:0 10px 22px rgba(202,126,104,.16); font-size:16px; font-weight:650; transition:transform .16s ease,opacity .16s ease; }
.adult-roll-button:active,.adult-reroll-button:active { transform:scale(.98); }
.adult-roll-button:disabled,.adult-reroll-button:disabled { opacity:.42; box-shadow:none; }
.adult-meet-animation { position:relative; height:230px; margin-top:20px; display:flex; align-items:center; justify-content:center; overflow:hidden; border:1px solid #eee2d8; border-radius:28px; background:linear-gradient(145deg,#fffdf9,#fff2e8); }
.adult-meet-animation span { position:absolute; font-size:64px; filter:drop-shadow(0 8px 10px rgba(80,58,45,.08)); }
.adult-meet-animation .meet-avocado { left:18%; animation:adult-avocado-meet 1.7s ease both; }
.adult-meet-animation .meet-cow { right:18%; animation:adult-cow-meet 1.7s ease both; }
.adult-meet-animation i { color:#e99382; font-size:27px; font-style:normal; opacity:0; animation:adult-heart-pop 1.7s ease both; }
@keyframes adult-avocado-meet { 0%{transform:translateX(-150px) rotate(-8deg);opacity:0} 65%,85%{transform:translateX(34px) rotate(3deg);opacity:1} 100%{transform:translateX(28px);opacity:1} }
@keyframes adult-cow-meet { 0%{transform:translateX(150px) rotate(8deg);opacity:0} 65%,85%{transform:translateX(-34px) rotate(-3deg);opacity:1} 100%{transform:translateX(-28px);opacity:1} }
@keyframes adult-heart-pop { 0%,58%{transform:scale(.2) translateY(14px);opacity:0} 74%{transform:scale(1.25) translateY(-6px);opacity:1} 100%{transform:scale(1) translateY(-18px);opacity:1} }
.adult-game-card { position:relative; margin-top:20px; padding:20px; border:1px solid rgba(235,216,202,.88); border-radius:28px; background:linear-gradient(155deg,#fffdf9,#fff2e9 52%,#fffaf5); box-shadow:0 18px 42px rgba(91,65,51,.12); animation:adult-card-in .45s cubic-bezier(.2,.8,.2,1) both; }
@keyframes adult-card-in { from{transform:translateY(18px) scale(.96);opacity:0} to{transform:none;opacity:1} }
.adult-card-close { position:absolute; top:14px; right:14px; z-index:2; width:34px; height:34px; font-size:20px; }
.adult-card-tags { display:flex; align-items:center; gap:8px; padding-right:42px; }
.adult-card-tags span { min-height:32px; padding:6px 12px; display:grid; place-items:center; border-radius:999px; background:rgba(255,255,255,.74); border:1px solid #eadcd1; color:#76594b; font-size:13px; }
.adult-card-illustration { height:245px; margin:14px 0 12px; display:grid; place-items:center; overflow:hidden; border-radius:22px; background:rgba(255,253,249,.7); }
.adult-card-illustration svg { width:100%; height:100%; }
.adult-fire-button{min-height:84px;border-radius:28px;background:radial-gradient(circle at 50% 32%,#ffcf8c,#ef7f63 60%,#d85e50);color:#fff;font-size:39px;box-shadow:0 18px 38px rgba(208,91,67,.26)}
.adult-illustration-tile{display:block;width:100%;height:auto;background:#fffaf3}
.adult-biu-orbit{position:relative;display:grid;place-items:center;width:190px;height:190px;border:1px solid rgba(223,140,112,.28);border-radius:50%;background:radial-gradient(circle,#fff7ef 34%,#f8d9cc 70%,transparent 71%);animation:adult-biu-in .55s cubic-bezier(.2,.8,.2,1) both}.adult-biu-orbit span{font-size:68px}.adult-biu-orbit i{position:absolute;width:10px;height:10px;border-radius:50%;background:#ed947d}.adult-biu-orbit i:nth-child(2){left:18px;top:75px}.adult-biu-orbit i:nth-child(3){right:28px;top:35px}.adult-biu-orbit i:nth-child(4){right:22px;bottom:45px}@keyframes adult-biu-in{from{transform:scale(.55) rotate(-14deg);opacity:0}to{transform:none;opacity:1}}
.adult-game-card h3:empty,.adult-game-card>p:empty{display:none}.adult-game-card:has(.adult-illustration-tile){padding:14px}.adult-game-card:has(.adult-illustration-tile) .adult-card-illustration{height:auto;margin:32px 0 14px}
.adult-game-card h3 { margin:0; text-align:center; font-size:27px; font-weight:680; letter-spacing:.02em; }
.adult-game-card > p { min-height:44px; margin:10px auto 18px; text-align:center; color:#785f54; font-size:14px; line-height:1.65; }

@media (max-height: 720px) {
  .moon-status-card { min-height: 175px; padding: 18px; }
  .moon-status-icon { width: 68px; height: 68px; font-size: 34px; }
  .moon-status-card h3 { margin-top: 10px; }
  .care-section { margin: 15px 0; }
}

@media (max-width: 360px) {
  .screen { padding-left: 12px; padding-right: 12px; }
  .hero { height: 118px; }
  .hero h1 { font-size: 30px; }
  .reference-mark { right: -13px; transform: scale(.88); }
  .card { min-height:96px; height:auto; padding-right:78px; padding-left:56px; }
  .card-visual { right: 10px; width: 62px; height: 62px; }
  .card-copy strong { font-size: 14px; }
}

/* SOYA V7 · global cream premium foundation */
html,
body {
  background:
    radial-gradient(circle at 18% 8%, rgba(255, 252, 247, .96), transparent 34%),
    linear-gradient(145deg, #eee7df 0%, #f5eee7 52%, #ebe4dc 100%);
  color: var(--ink);
}

body {
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.app-shell,
.mailbox-flow,
.hug-flow,
.moon-flow,
.adult-dice-flow,
.capsule-opening {
  background: var(--universe-bg);
}

.app-shell {
  box-shadow: 0 0 0 1px rgba(104, 75, 59, .04), 0 28px 80px rgba(64, 45, 35, .13);
}

.screen {
  padding-left: 20px;
  padding-right: 20px;
}

/* Shared cards */
.card,
.soft-card,
.memory-item,
.todo-item,
.bet-card,
.capsule-card-item,
.daily-memory-visit,
.letter-card,
.mail-compose,
.cycle-card,
.adult-game-card {
  border-color: var(--color-line);
  border-radius: var(--radius-card);
  background: linear-gradient(145deg, rgba(255, 254, 251, .97), rgba(255, 250, 244, .88));
  box-shadow: var(--shadow-soft);
}

.card,
.memory-item,
.todo-item,
.bet-card,
.capsule-card-item,
.letter-card,
.cycle-card {
  transition: transform var(--motion-fast) ease, box-shadow var(--motion-fast) ease, border-color var(--motion-fast) ease;
}

.card:active,
.memory-item:active,
.todo-item:active,
.bet-card:active,
.letter-card:active,
.cycle-card:active {
  transform: scale(.985);
  box-shadow: 0 8px 20px rgba(91, 62, 46, .065);
}

.memory-card {
  background: linear-gradient(140deg, rgba(255, 254, 251, .98), rgba(248, 226, 218, .72));
}

.todo-card {
  background: linear-gradient(140deg, rgba(255, 254, 251, .98), rgba(248, 239, 215, .72));
}

.promise-card {
  background: linear-gradient(140deg, rgba(255, 254, 251, .98), rgba(231, 239, 226, .74));
}

.capsule-card {
  background: linear-gradient(140deg, rgba(255, 254, 251, .98), rgba(242, 232, 224, .76));
}

/* Shared controls */
button,
input,
textarea,
select {
  font: inherit;
}

button {
  transition: transform var(--motion-fast) ease, box-shadow var(--motion-fast) ease, opacity var(--motion-fast) ease, background var(--motion-fast) ease;
}

button:active:not(:disabled) {
  transform: scale(.98);
}

button:disabled {
  cursor: default;
  opacity: .46;
  box-shadow: none;
}

.primary-button,
.secondary-button,
.primary-detail-button,
.danger-button,
.letter-send-button,
.letter-keep-button,
.flow-main-button,
.memory-secondary,
.adult-roll-button,
.adult-reroll-button,
.modal-actions button,
.action-sheet > button,
.section-toolbar button,
.record-button,
.plan-categories button,
.plan-status-filter button,
.segmented button {
  border-radius: 999px;
}

.primary-button,
.primary-detail-button,
.flow-main-button,
.letter-send-button,
.adult-roll-button,
.adult-reroll-button,
.modal-actions .primary {
  border-color: rgba(196, 119, 98, .28);
  background: linear-gradient(135deg, #f2c2b2, #e7a08e);
  color: #563a30;
  box-shadow: 0 10px 24px rgba(181, 104, 82, .14);
}

.secondary-button,
.memory-secondary,
.action-sheet > button,
.modal-actions button:not(.primary),
.record-button,
.section-toolbar button {
  border-color: var(--color-line);
  background: rgba(255, 253, 249, .9);
  color: #685249;
}

input,
textarea,
select,
.form-modal input,
.form-modal textarea,
.form-modal select,
.mail-compose input,
.mail-compose textarea,
.access-card input {
  border: 1px solid var(--color-line);
  border-radius: 18px;
  background: rgba(255, 253, 249, .9);
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .82);
  outline: none;
}

input:focus,
textarea:focus,
select:focus,
.form-modal input:focus,
.form-modal textarea:focus,
.form-modal select:focus,
.mail-compose input:focus,
.mail-compose textarea:focus {
  border-color: rgba(210, 143, 124, .68);
  box-shadow: 0 0 0 4px rgba(226, 165, 148, .13);
}

input::placeholder,
textarea::placeholder {
  color: #b5a69d;
}

/* Page headers */
.feature-header,
.page-header,
.hug-header,
.adult-dice-header {
  border-bottom: 1px solid rgba(121, 89, 71, .07);
  background: rgba(252, 247, 240, .84);
  box-shadow: 0 8px 24px rgba(84, 58, 43, .035);
  backdrop-filter: blur(20px) saturate(1.12);
  -webkit-backdrop-filter: blur(20px) saturate(1.12);
}

.feature-header {
  margin: -2px -2px 20px;
  padding: 4px 2px 12px;
}

.feature-header h2,
.page-header h2,
.hug-header h2,
.adult-dice-header strong {
  color: #49372f;
  font-weight: 650;
  letter-spacing: .01em;
}

.feature-header p,
.page-header p {
  color: var(--muted);
}

.icon-button,
.hug-back,
.home-mark-button {
  border-color: var(--color-line);
  background: rgba(255, 253, 249, .76);
  color: #7a6054;
  box-shadow: 0 7px 18px rgba(82, 57, 43, .055);
}

/* Modal and overlay system */
.modal-backdrop,
.sheet-backdrop,
.letter-popup,
.letter-detail {
  background: rgba(69, 50, 40, .24);
  backdrop-filter: blur(9px) saturate(.92);
  -webkit-backdrop-filter: blur(9px) saturate(.92);
}

.action-sheet,
.form-modal,
.detail-modal,
.bottom-sheet,
.letter-popup-card,
.letter-detail article {
  border: 1px solid rgba(126, 92, 73, .11);
  border-radius: var(--radius-sheet);
  background: linear-gradient(155deg, rgba(255, 254, 251, .985), rgba(252, 244, 236, .965));
  box-shadow: var(--shadow-float);
}

.action-sheet {
  border-radius: var(--radius-sheet) var(--radius-sheet) 24px 24px;
}

.form-modal h3,
.detail-modal h3,
.action-sheet h3 {
  color: #49372f;
  font-weight: 660;
  letter-spacing: .01em;
}

.detail-close,
.letter-popup-close,
.adult-card-close,
#close-capsule-opening {
  width: 34px;
  height: 34px;
  min-height: 34px;
  border: 1px solid rgba(125, 91, 72, .07);
  border-radius: 50%;
  background: rgba(244, 237, 230, .64);
  color: rgba(87, 66, 55, .56);
  box-shadow: none;
  font-size: 20px;
  font-weight: 400;
}

.detail-close:active,
.letter-popup-close:active,
.adult-card-close:active,
#close-capsule-opening:active {
  background: rgba(239, 228, 219, .84);
  color: rgba(87, 66, 55, .76);
}

/* Bottom navigation */
.tab-bar {
  height: calc(76px + env(safe-area-inset-bottom));
  padding: 7px 14px env(safe-area-inset-bottom);
  border-top: 1px solid rgba(111, 81, 64, .09);
  background: rgba(255, 251, 246, .9);
  box-shadow: 0 -12px 34px rgba(78, 54, 42, .065);
  backdrop-filter: blur(22px) saturate(1.15);
  -webkit-backdrop-filter: blur(22px) saturate(1.15);
}

.tab {
  gap: 3px;
  color: #9a8980;
}

.tab em {
  font-size: 11px;
  font-weight: 540;
  letter-spacing: .04em;
}

.tab.active {
  color: #604b42;
}

.tab.active::after {
  width: 16px;
  height: 3px;
  background: #a2af8f;
  box-shadow: 0 2px 6px rgba(119, 139, 94, .2);
}

.mascot {
  transform: scale(.84);
  opacity: .9;
}

.tab.active .mascot {
  opacity: 1;
}

.segmented {
  border: 1px solid rgba(117, 85, 68, .07);
  background: rgba(235, 226, 218, .72);
}

.segmented .selected {
  background: rgba(255, 253, 250, .96);
  box-shadow: 0 5px 14px rgba(79, 55, 42, .07);
}

@media (min-width: 431px) {
  .app-shell,
  .mailbox-flow,
  .hug-flow,
  .moon-flow,
  .adult-dice-flow,
  .capsule-opening,
  .tab-bar {
    border-left: 1px solid rgba(107, 77, 60, .06);
    border-right: 1px solid rgba(107, 77, 60, .06);
  }
}

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

/* SOYA V7 · Phase 2 record and Today Echo */
#memory-screen .feature-header {
  margin-bottom: 16px;
}

.daily-memory-visit {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin: 0 0 18px;
  padding: 22px 18px 18px;
  border: 1px solid rgba(232, 199, 177, .62);
  border-radius: 28px;
  background:
    radial-gradient(circle at 84% 18%, rgba(255, 255, 255, .96) 0 5%, transparent 12%),
    radial-gradient(circle at 75% 42%, rgba(255, 255, 255, .74) 0 8%, transparent 18%),
    linear-gradient(145deg, rgba(255, 251, 244, .98), rgba(255, 238, 218, .86));
  box-shadow: 0 15px 36px rgba(115, 77, 52, .09), inset 0 1px rgba(255, 255, 255, .9);
}

.daily-memory-visit.echo-arrive {
  animation: echo-arrive .85s cubic-bezier(.2,.7,.25,1) both;
}

.echo-bubble {
  position: absolute;
  z-index: -1;
  display: block;
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.98), rgba(255,248,235,.24) 58%, rgba(226,179,142,.12));
  box-shadow: inset -4px -5px 12px rgba(235,190,154,.12), 0 4px 14px rgba(141,96,64,.06);
}
.echo-bubble-one { width: 64px; height: 64px; right: -12px; top: 54px; }
.echo-bubble-two { width: 28px; height: 28px; right: 54px; top: 8px; }
.echo-sparkle { position: absolute; right: 17px; top: 17px; color: #d9a46d; font-size: 20px; }

.daily-visit-copy small { color: #bd8465; letter-spacing: .08em; }
.daily-visit-copy h3 { margin: 8px 0 6px; color: #49352c; font-size: 21px; line-height: 1.25; }
.daily-visit-copy p { max-width: 300px; color: #877266; }
.daily-visit-memory { position: relative; z-index: 1; grid-template-columns: 94px 1fr; margin: 17px 0 14px; padding: 12px; border: 1px solid rgba(255,255,255,.86); border-radius: 22px; background: rgba(255,255,255,.68); box-shadow: 0 8px 20px rgba(99,68,48,.055); backdrop-filter: blur(6px); }
.daily-visit-thumb { width: 94px; height: 94px; border-radius: 18px; background: linear-gradient(145deg,#fbf1e7,#f5e6d8); }
.daily-visit-memory strong { color: #523b30; font-size: 15px; }
.daily-visit-memory p { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.echo-video-thumb { position: relative; width: 100%; height: 100%; display: block; }
.echo-video-thumb video { width: 100%; height: 100%; object-fit: cover; }
.echo-video-thumb i { position: absolute; left: 50%; top: 50%; width: 30px; height: 30px; display: grid; place-items: center; transform: translate(-50%,-50%); border-radius: 50%; background: rgba(255,252,247,.84); color: #a76550; font-size: 12px; font-style: normal; }
.echo-text-thumb { color: #b17d67; font-size: 26px; }
.daily-visit-status { margin: -3px 4px 10px; color: #aa7c68; font-size: 11px; text-align: center; }
.daily-visit-actions { display: block; }
.daily-visit-actions .primary { width: 100%; min-height: 48px; border: 1px solid rgba(226,178,150,.72); border-radius: 999px; background: rgba(255,252,247,.76); color: #a66549; box-shadow: 0 8px 18px rgba(132,83,56,.07); font-size: 14px; }
.daily-visit-actions .primary span { float: right; margin-right: 12px; }

.memory-list { gap: 13px; }
.memory-item { min-height: 126px; padding: 14px 14px 14px 128px; border: 1px solid rgba(225,214,204,.86); border-radius: 25px; background: rgba(255,253,249,.94); box-shadow: 0 10px 25px rgba(83,58,44,.065); }
.memory-thumb { left: 13px; top: 13px; width: 100px; height: calc(100% - 26px); border-radius: 19px; background: linear-gradient(145deg,#faf0e6,#f4e5d8); }
.memory-item h3 { color: #49372f; font-size: 16px; }
.memory-item small { color: #9e8b7f; }
.memory-item p { color: #7b685e; }
.season-badge { top: 12px; right: 13px; background: transparent; color: #87926f; }

.detail-gallery { display: flex; gap: 10px; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; overscroll-behavior-inline: contain; scrollbar-width: none; }
.detail-gallery::-webkit-scrollbar { display: none; }
.detail-gallery .detail-media { flex: 0 0 100%; width: 100%; scroll-snap-align: center; }
.detail-media { max-height: 58dvh; border-radius: 22px; object-fit: contain; background: #f4eee8; }

.memory-edit-panel { margin-top: 18px; padding: 14px; border: 1px solid #eadfd6; border-radius: 20px; background: rgba(255,252,248,.75); }
.memory-edit-panel summary { color: #8c6d5f; cursor: pointer; font-size: 13px; }
.memory-edit-panel label { display: block; margin-top: 12px; color: #89756a; font-size: 11px; }
.memory-edit-panel input,.memory-edit-panel textarea { width: 100%; margin-top: 6px; box-sizing: border-box; }
.memory-lock-note { margin: 18px 0 0; padding: 12px 14px; border-radius: 15px; background: #f7f1eb; color: #9b8a80; font-size: 11px; text-align: center; }

.memory-discussion { margin: 24px -22px -24px; padding: 18px 22px calc(24px + env(safe-area-inset-bottom)); border-top: 1px solid #eee3da; border-radius: 26px 26px 0 0; background: linear-gradient(180deg,#fffaf5,#fbf4ed); }
.memory-discussion-heading small { color: #684c3f; font-size: 15px; font-weight: 650; }
.memory-discussion-heading p { margin: 5px 0 13px; color: #9b897e; font-size: 11px; }
#memory-comment-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: end; }
#memory-comment-form textarea { min-height: 48px; max-height: 112px; resize: vertical; }
#memory-comment-form button { min-width: 70px; min-height: 48px; border: 0; border-radius: 999px; background: #efb7a3; color: #62463b; }
.memory-comment-list { display: grid; gap: 10px; margin-top: 15px; }
.memory-comment { position: relative; padding: 13px 14px; border: 1px solid #eee2d9; border-radius: 17px; background: rgba(255,255,255,.68); }
.memory-comment div { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.memory-comment strong { color: #674c40; font-size: 12px; }
.memory-comment small { color: #ad9d92; font-size: 9px; }
.memory-comment p { margin: 8px 0 0; color: #705d53; font-size: 13px; line-height: 1.6; }
.memory-comment button { position: absolute; right: 10px; bottom: 8px; border: 0; background: transparent; color: #ba8275; font-size: 9px; }
.memory-comments-empty { margin: 10px 0 0; color: #aa9a90; font-size: 11px; text-align: center; }

@keyframes echo-arrive { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

@media (prefers-reduced-motion: reduce) { .daily-memory-visit.echo-arrive { animation: none; } }

/* SOYA V7 · Phase 3 DouNai Mailbox */
.mailbox-entry-button { position: relative; }
.mailbox-unread-badge { position: absolute; right: 8px; top: 7px; min-width: 18px; height: 18px; padding: 0 5px; display: grid; place-items: center; box-sizing: border-box; border: 2px solid #fff9f3; border-radius: 999px; background: #e9756f; color: #fff; font-size: 9px; font-style: normal; }
.mailbox-header { grid-template-columns: 46px 1fr 46px; }
.mailbox-compose-toggle { color: #a36752; font-size: 24px; font-weight: 350; }
.mailbox-body { padding: 24px 20px calc(38px + env(safe-area-inset-bottom)); }
.mailbox-intro { margin: 4px 2px 18px; color: #78675e; font-size: 15px; line-height: 1.6; }

.mail-compose { margin-bottom: 18px; padding: 18px; border-radius: 25px; animation: mail-compose-in .3s ease both; }
.mail-compose-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 15px; }
.mail-compose-heading small,.mail-compose-heading strong { display: block; }
.mail-compose-heading small { color: #a87460; font-size: 16px; font-weight: 650; }
.mail-compose-heading strong { margin-top: 5px; color: #a19288; font-size: 10px; font-weight: 450; }
.mail-compose-heading button { width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: 50%; background: #f6eee8; color: #a39186; font-size: 19px; }
.mail-compose select { width: 100%; margin-top: 7px; padding: 12px; border: 1px solid #eadfd8; border-radius: 15px; background: #fffdf9; color: #4f3d34; }

.letter-tabs { position: sticky; z-index: 2; top: calc(74px + env(safe-area-inset-top)); margin: 0 0 17px; padding: 4px; background: rgba(239,233,228,.88); backdrop-filter: blur(12px); }
.letter-tabs button { position: relative; }
.letter-tabs button i { position: absolute; right: calc(50% - 38px); top: 8px; width: 7px; height: 7px; border-radius: 50%; background: #e8736d; box-shadow: 0 0 0 2px #fff8f1; }
.letter-group { margin-bottom: 21px; }
.letter-group h3 { margin: 0 5px 9px; color: #a18d80; font-size: 11px; font-weight: 550; letter-spacing: .08em; }
.letter-card { position: relative; min-height: 75px; grid-template-columns: 44px 1fr; align-items: center; padding: 13px 42px 13px 13px; border-radius: 20px; background: linear-gradient(145deg,rgba(255,254,251,.98),rgba(255,248,241,.9)); }
.letter-card.unread { border-color: rgba(230,174,151,.72); box-shadow: 0 10px 25px rgba(170,100,77,.09); }
.letter-envelope-icon { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid #efc7b7; border-radius: 14px; background: #fff0e8; color: #d98b70; font-size: 23px; }
.letter-card strong { overflow: hidden; color: #553f34; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.letter-card small { margin-top: 7px; color: #a08e82; font-size: 10px; }
.letter-unread-dot { position: absolute; right: 17px; top: 50%; width: 8px; height: 8px; transform: translateY(-50%); border-radius: 50%; background: #e8736d; box-shadow: 0 0 0 4px rgba(232,115,109,.08); }

.letter-list .empty-state { padding: 72px 18px; border: 1px dashed #eaded5; border-radius: 24px; background: rgba(255,253,249,.48); }
.letter-list .empty-state span { display: block; margin-bottom: 10px; font-size: 32px; }
.letter-list .empty-state strong { display: block; color: #6f5a4f; }
.letter-list .empty-state p { margin: 7px 0 0; color: #a09085; font-size: 11px; }

.letter-detail article { padding: 36px 28px 26px; border-radius: 30px; background: linear-gradient(155deg,#fffdf9,#fff7ef); }
.letter-detail article > span { color: #df9275; font-size: 34px; }
.letter-detail h2 { margin: 18px 0 20px; font-size: 23px; }
.letter-detail p { min-height: 150px; margin: 0; color: #59463c; font-size: 14px; line-height: 2; }
.letter-detail footer { padding-top: 17px; border-top: 1px solid #eee1d7; }
.letter-keep-button { background: #f4c1ae; }

@keyframes mail-compose-in { from { opacity: 0; transform: translateY(-7px); } to { opacity: 1; transform: translateY(0); } }

/* SOYA V7 · Phase 7 Gedi */
.gedi-sprite { --sheet-width:1226; --sheet-height:920; --crop-x:29; --crop-y:145; --crop-width:210; --crop-height:278; position:relative; display:block; overflow:hidden; aspect-ratio:var(--crop-width) / var(--crop-height); }
.gedi-sprite > .gedi-sprite-image { position:absolute; z-index:0; left:calc(var(--crop-x) / var(--crop-width) * -100%); top:calc(var(--crop-y) / var(--crop-height) * -100%); width:calc(var(--sheet-width) / var(--crop-width) * 100%); max-width:none; height:auto; pointer-events:none; user-select:none; }
.gedi-sprite[data-gedi-rain-composite="true"] > .gedi-sprite-image { inset:0; width:100%; height:100%; object-fit:contain; }
.gedi-nest-entry { position:fixed; z-index:8; left:50%; bottom:calc(70px + env(safe-area-inset-bottom)); width:156px; height:186px; padding:0; overflow:visible; transform:translateX(-50%); border:0; background:transparent; filter:drop-shadow(0 10px 11px rgba(65,48,40,.18)); touch-action:pan-y; cursor:grab; user-select:none; -webkit-user-select:none; }
.gedi-nest-entry.is-dragging { cursor:grabbing; }
.gedi-entry-sprite { position:absolute; left:10px; bottom:0; width:136px; background:transparent; }
.gedi-entry-bubble { position:absolute; z-index:3; left:94px; bottom:145px; width:max-content; max-width:min(210px,55vw); padding:7px 10px; border:1px solid rgba(224,198,177,.82); border-radius:17px 17px 17px 6px; background:rgba(255,251,245,.96); color:#80675a; font-size:9px; line-height:1.45; white-space:normal; overflow-wrap:anywhere; box-shadow:0 5px 12px rgba(98,72,56,.09); opacity:1; transform:none; transition:.25s ease; }
.gedi-nest-entry.has-gift .gedi-entry-bubble { border-color:#e8b18f; background:#fff2e8; color:#765044; box-shadow:0 8px 20px rgba(196,124,88,.16); }
.gedi-entry-sprite { transition:opacity .16s ease; }
.gedi-entry-motion-layer { position:absolute; left:10px; bottom:0; width:136px; pointer-events:none; }
.gedi-entry-head-layer { z-index:2; clip-path:ellipse(46% 38% at 50% 34%); transform-origin:50% 38%; animation:gedi-head-look 4.8s ease-in-out infinite; }
.gedi-entry-tail-layer { z-index:1; clip-path:polygon(55% 44%,100% 44%,100% 100%,58% 100%); transform-origin:76% 76%; animation:gedi-tail-wag 3.6s ease-in-out infinite; }
.gedi-entry-sprite { z-index:0; animation:gedi-body-breathe 3.2s ease-in-out infinite; }

.gedi-flow { position:fixed; z-index:24; inset:0; overflow-y:auto; overscroll-behavior:contain; background:radial-gradient(circle at 50% 18%,rgba(243,217,194,.5),transparent 35%),linear-gradient(180deg,#fdf9f3,#f7efe6); color:#4e3b31; }
.gedi-header { grid-template-columns:46px 1fr 46px; background:rgba(255,251,246,.82); backdrop-filter:blur(16px); }
.gedi-header div { align-self:center; }
.gedi-body { width:min(100%,520px); margin:0 auto; padding:20px 18px calc(40px + env(safe-area-inset-bottom)); }
.gedi-stage { position:relative; min-height:410px; padding:12px 18px 22px; overflow:hidden; text-align:center; background:radial-gradient(circle at 50% 30%,rgba(255,255,255,.7),rgba(255,247,238,.45) 56%,rgba(243,224,207,.5)); transition:background .55s ease; }
.gedi-stage.scene-active { background:linear-gradient(150deg,var(--scene-top,#f7e7da),#fff8ef 46%,var(--scene-bottom,#ead6c4)); background-size:180% 180%; animation:gedi-background-shift 3.2s ease-in-out infinite alternate; }
.gedi-stage.scene-active::after { content:var(--scene-mark,"☁"); position:absolute; z-index:0; right:8%; top:19%; color:rgba(255,255,255,.72); font-size:58px; animation:gedi-scene-drift 4.5s ease-in-out infinite alternate; }
.gedi-scene-art { position:absolute; z-index:0; inset:0; overflow:hidden; border-radius:inherit; pointer-events:none; opacity:0; transition:opacity .45s ease; }
.gedi-stage.scene-active .gedi-scene-art { opacity:1; }
.gedi-scene-svg { width:100%; height:100%; display:block; }
.gedi-scene-svg .scene-clouds { animation:gedi-svg-clouds 8s ease-in-out infinite alternate; }
.gedi-scene-svg .scene-water { animation:gedi-svg-water 2.8s ease-in-out infinite alternate; }
.gedi-scene-svg .scene-cable-car { animation:gedi-svg-cable 4s ease-in-out infinite alternate; }
.gedi-scene-svg .scene-light { animation:gedi-svg-light 4s ease-in-out infinite alternate; transform-origin:606px 140px; }
.gedi-scene-svg .scene-windmill,.gedi-scene-svg .scene-wheel { animation:gedi-svg-spin 8s linear infinite; transform-box:fill-box; transform-origin:center; }
.gedi-scene-svg .scene-lanterns,.gedi-scene-svg .scene-stars,.gedi-scene-svg .scene-fireflies { animation:gedi-svg-glow 1.8s ease-in-out infinite alternate; }
.gedi-scene-svg .scene-boat,.gedi-scene-svg .scene-balloon { animation:gedi-svg-float 3s ease-in-out infinite alternate; }
.gedi-scene-svg .scene-petals,.gedi-scene-svg .scene-snow,.gedi-scene-svg .scene-rain { animation:gedi-svg-fall 4s linear infinite; }
.gedi-scene-svg .scene-bath-bubbles,.gedi-scene-svg .scene-steam,.gedi-scene-svg .scene-smoke { animation:gedi-svg-rise 2.8s ease-in-out infinite; }
.gedi-scene-label { position:absolute; z-index:4; left:50%; bottom:118px; min-width:92px; padding:5px 11px; transform:translateX(-50%); border-radius:999px; background:rgba(255,251,245,.76); color:#795f51; font-size:9px; opacity:0; transition:.3s ease; }
.gedi-stage.scene-active .gedi-scene-label { opacity:1; }
.gedi-stage::before { content:""; position:absolute; left:13%; right:13%; bottom:115px; height:36px; border-radius:50%; background:rgba(110,82,65,.09); filter:blur(12px); }
.gedi-main-sprite { z-index:1; width:min(82%,325px); margin:5px auto -30px; filter:drop-shadow(0 18px 18px rgba(57,45,38,.12)); transform-origin:50% 80%; animation:gedi-breathe 3.2s ease-in-out infinite; }
.gedi-head-status { position:absolute; z-index:4; left:50%; top:18px; width:max-content; max-width:78%; padding:7px 13px; transform:translateX(-50%); border:1px solid rgba(224,196,176,.82); border-radius:18px 18px 18px 7px; background:rgba(255,251,245,.94); color:#8a6858; box-shadow:0 8px 18px rgba(88,61,47,.08); font-size:10px; line-height:1.45; white-space:normal; overflow-wrap:anywhere; }
.gedi-aura { position:absolute; z-index:3; inset:38px 10% 110px; pointer-events:none; }
.gedi-aura i { position:absolute; display:block; opacity:0; }
.gedi-aura i:nth-child(1){left:12%;top:25%}.gedi-aura i:nth-child(2){right:10%;top:18%}.gedi-aura i:nth-child(3){left:21%;bottom:16%}.gedi-aura i:nth-child(4){right:20%;bottom:12%}.gedi-aura i:nth-child(5){left:45%;top:4%}.gedi-aura i:nth-child(6){right:40%;bottom:2%}
.gedi-state-copy { position:relative; z-index:1; }
.gedi-state-copy small { color:#b08a70; font-size:10px; letter-spacing:.12em; }
.gedi-state-copy h2 { margin:7px 0 6px; color:#49372e; font-size:24px; }
.gedi-state-copy p { max-width:340px; margin:0 auto; color:#87736a; font-size:12px; line-height:1.7; }
.gedi-care-card { margin:13px 0 15px; padding:14px; border:1px solid rgba(229,210,194,.9); border-radius:22px; background:rgba(255,253,249,.88); box-shadow:0 10px 24px rgba(83,60,46,.055); }
.gedi-vitals { display:grid; grid-template-columns:repeat(4,1fr); gap:8px; }
.gedi-vital { min-width:0; }
.gedi-vital span { display:flex; align-items:center; justify-content:center; gap:4px; color:#7d675c; font-size:9px; }
.gedi-vital i { position:relative; display:block; height:7px; margin-top:7px; overflow:hidden; border-radius:999px; background:#eee1d7; }
.gedi-vital i::after { content:""; position:absolute; inset:0 auto 0 0; width:42%; border-radius:inherit; background:#d9c8bb; transition:width .55s ease,background .55s ease; }
.gedi-vital.active span { color:#9b6b55; font-weight:750; }
.gedi-vital.active i::after { width:100%; background:linear-gradient(90deg,#e6aa88,#96ad7f); }
.gedi-daily-quest { margin-top:12px; padding:12px 13px; border-radius:18px; background:linear-gradient(135deg,#fff4ea,#f6efe5); text-align:left; }
.gedi-daily-quest small,.gedi-daily-quest strong { display:block; }
.gedi-daily-quest small { color:#b28b73; font-size:9px; letter-spacing:.08em; }
.gedi-daily-quest strong { margin-top:4px; color:#59443a; font-size:14px; }
.gedi-daily-quest p { margin:5px 0 0; color:#927d72; font-size:11px; line-height:1.55; }
.gedi-action-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; margin:15px 0 8px; }
.gedi-action-grid button { min-width:0; min-height:67px; display:grid; place-items:center; align-content:center; gap:4px; padding:7px 2px; border:1px solid rgba(229,209,193,.92); border-radius:18px; background:rgba(255,253,249,.94); color:#6b5549; box-shadow:0 8px 18px rgba(78,56,44,.06); }
.gedi-action-grid button:active { transform:scale(.96); }
.gedi-action-grid button:disabled { opacity:.42; transform:none; box-shadow:none; }
.gedi-action-grid span { width:27px; height:27px; display:grid; place-items:center; border-radius:50%; background:#f7e8db; color:#a87961; font-size:16px; }
.gedi-action-grid strong { max-width:100%; overflow:hidden; font-size:9px; font-weight:600; text-overflow:ellipsis; white-space:nowrap; }
.gedi-action-grid.is-collapsed .gedi-extra-action{display:none}.gedi-more-actions{display:block;margin:0 auto 12px;padding:7px 12px;border:0;background:transparent;color:#9a8172;font-size:10px}.gedi-world-entry{display:grid;grid-template-columns:34px 1fr auto;align-items:center;gap:10px;width:100%;margin:5px 0 15px;padding:12px 14px;border:1px solid #e5d8cc;border-radius:8px;background:#fffdf9;color:#614d42;text-align:left}.gedi-world-entry>span{display:grid;place-items:center;width:32px;height:32px;border-radius:50%;background:#f2e6d8;color:#9b704e}.gedi-world-entry strong{font-size:12px}.gedi-world-entry i{color:#a48c7c;font-size:20px;font-style:normal}.gedi-world-header{display:grid;grid-template-columns:34px 1fr;align-items:center;gap:8px;margin-bottom:10px}.gedi-world-header button{width:32px;height:32px;border:1px solid #e2d4c8;border-radius:50%;background:#fff;color:#745e51}.gedi-world-header strong{font-size:15px}
.gedi-choice-panel { margin:10px 0 15px; padding:14px; }
.gedi-panel-heading { display:flex; align-items:flex-start; justify-content:space-between; margin-bottom:12px; }
.gedi-panel-heading small,.gedi-panel-heading strong { display:block; }
.gedi-panel-heading small { color:#b18a73; font-size:9px; }
.gedi-panel-heading strong { margin-top:3px; color:#59443a; font-size:14px; }
.gedi-panel-heading button { width:31px; height:31px; border:0; border-radius:50%; background:#f4ede7; color:#a18e82; font-size:17px; }
.gedi-choice-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; }
.gedi-choice-grid button { min-width:0; padding:7px 5px 9px; overflow:hidden; border:1px solid #eee0d5; border-radius:16px; background:#fffaf5; color:#6c584d; }
.gedi-choice-sprite { width:64px; margin:-4px auto -6px; }
.gedi-choice-grid strong { display:block; overflow:hidden; font-size:9px; font-weight:550; text-overflow:ellipsis; white-space:nowrap; }
.gedi-locked-heading { margin:18px 2px 10px; padding-top:14px; border-top:1px solid #eee2d8; }
.gedi-locked-heading small,.gedi-locked-heading strong { display:block; }
.gedi-locked-heading small { color:#b49b8c; font-size:9px; }
.gedi-locked-heading strong { margin-top:4px; color:#89786e; font-size:11px; font-weight:500; }
.gedi-locked-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; }
.gedi-locked-item { position:relative; min-height:72px; display:grid; place-items:center; align-content:center; gap:4px; padding:8px 4px; border:1px solid #e8e2dc; border-radius:15px; background:#f1efec; color:#aaa19b; filter:grayscale(1); }
.gedi-locked-item span { font-size:23px; opacity:.5; }
.gedi-locked-item strong { font-size:8px; font-weight:550; }
.gedi-locked-item i { position:absolute; right:6px; top:5px; font-size:10px; font-style:normal; }
.gedi-companion-grid { display:grid; grid-template-columns:1fr 1fr; gap:9px; }
.gedi-companion-grid button { min-height:52px; border:1px solid #eadbd0; border-radius:17px; background:#fffaf5; color:#70594d; }
.gedi-companion-grid button.selected,.gedi-walk-destinations button.selected { border-color:#e8ae91; background:#f9dfd1; box-shadow:0 6px 14px rgba(199,127,91,.12); }
.gedi-walk-label { margin:14px 2px 8px; color:#7a6256; font-size:11px; font-weight:650; }
.gedi-walk-destinations { display:flex; gap:7px; padding:1px 0 9px; overflow-x:auto; scroll-snap-type:x proximity; scrollbar-width:none; }
.gedi-walk-destinations::-webkit-scrollbar { display:none; }
.gedi-walk-destinations button { flex:0 0 auto; min-height:35px; padding:7px 12px; border:1px solid #eadfd6; border-radius:999px; background:#fffaf5; color:#7a6256; font-size:10px; scroll-snap-align:start; }
.gedi-feedback { min-height:18px; margin:16px 0 0; color:#a9745d; font-size:11px; text-align:center; }

.gedi-action-prop,.gedi-action-hand,.gedi-action-zzz,.gedi-action-gift,.gedi-motion-track { position:absolute; z-index:5; pointer-events:none; opacity:0; }
.gedi-action-prop { left:10%; bottom:40%; font-size:42px; filter:drop-shadow(0 7px 8px rgba(77,53,40,.12)); }
.gedi-action-hand { left:50%; top:3%; font-size:56px; transform:translate(-50%,-90px); }
.gedi-action-zzz { right:15%; top:24%; color:#8b7998; font-size:24px; font-weight:700; letter-spacing:.12em; }
.gedi-action-gift { right:12%; bottom:36%; font-size:38px; }
.gedi-motion-track { z-index:2; left:13%; right:13%; bottom:116px; height:76px; }
.gedi-motion-track i { position:absolute; bottom:0; display:block; width:24px; height:10px; border-radius:50%; background:rgba(101,78,62,.18); transform:rotate(-12deg) scale(.4); opacity:0; }
.gedi-motion-track i:nth-child(1){left:18%}.gedi-motion-track i:nth-child(2){left:34%;bottom:13px}.gedi-motion-track i:nth-child(3){left:52%}.gedi-motion-track i:nth-child(4){left:70%;bottom:12px}
.gedi-flow[data-phase="ready"] .gedi-main-sprite { animation:gedi-anticipate .42s cubic-bezier(.32,.7,.2,1) both; }
.gedi-flow[data-sequence="feed"] .gedi-action-prop { animation:gedi-prop-feed 1.15s cubic-bezier(.3,.7,.2,1) forwards; }
.gedi-flow[data-sequence="pet"] .gedi-action-hand { animation:gedi-hand-pet 1.45s ease-in-out forwards; }
.gedi-flow[data-sequence="sleep"] .gedi-action-zzz { animation:gedi-zzz 1.8s .55s ease-in-out infinite; }
.gedi-flow[data-sequence="hug"] .gedi-action-hand { opacity:1; font-size:0; }
.gedi-flow[data-sequence="hug"] .gedi-action-hand::before { content:"🫂"; font-size:64px; animation:gedi-hug-arrive 1.2s ease forwards; }
.gedi-flow[data-sequence="outing"] .gedi-action-prop { bottom:37%; font-size:62px; animation:gedi-vehicle 3s ease-in-out forwards; }
.gedi-flow[data-sequence="outing"] .gedi-action-prop[data-kind="friend"] { left:16%; bottom:35%; font-size:68px; animation:gedi-friend-join 3s ease-in-out forwards; }
.gedi-flow[data-sequence="walk"] .gedi-action-prop { animation:gedi-walk-pair 1.8s ease-in-out forwards; }
.gedi-flow[data-sequence="walk"] .gedi-motion-track,.gedi-flow[data-sequence="outing"] .gedi-motion-track { opacity:1; }
.gedi-flow[data-sequence="walk"] .gedi-motion-track i,.gedi-flow[data-sequence="outing"] .gedi-motion-track i { animation:gedi-footprint-pop 1.6s ease-in-out infinite; }
.gedi-flow[data-sequence="walk"] .gedi-motion-track i:nth-child(2),.gedi-flow[data-sequence="outing"] .gedi-motion-track i:nth-child(2){animation-delay:.18s}
.gedi-flow[data-sequence="walk"] .gedi-motion-track i:nth-child(3),.gedi-flow[data-sequence="outing"] .gedi-motion-track i:nth-child(3){animation-delay:.36s}
.gedi-flow[data-sequence="walk"] .gedi-motion-track i:nth-child(4),.gedi-flow[data-sequence="outing"] .gedi-motion-track i:nth-child(4){animation-delay:.54s}
.gedi-flow[data-sequence="bath"] .gedi-aura i { width:14px;height:14px;border:2px solid #c7ddec;border-radius:50%;opacity:.8;animation:gedi-bubble 1.4s ease-in infinite; }
.gedi-flow[data-sequence="stars"] .gedi-stage { background:radial-gradient(circle at 50% 35%,#53617a,#20293c 72%); transition:background .6s ease; }
.gedi-flow[data-sequence="stars"] .gedi-aura i::before { content:"✦"; color:#ffe2a3; font-size:20px; }
.gedi-flow[data-sequence="stars"] .gedi-aura i { opacity:.9; animation:gedi-star 1.1s ease-in-out infinite alternate; }
.gedi-flow[data-sequence="idle"] .gedi-stage::after { content:"☁︎   ·   ☁︎"; position:absolute; left:0; right:0; top:30%; color:rgba(189,174,164,.55); font-size:30px; animation:gedi-clouds 5s linear infinite; }
.gedi-flow[data-sequence="feed"][data-phase="action"] .gedi-main-sprite { animation:gedi-lean-to-food .95s cubic-bezier(.3,.8,.2,1) both; }
.gedi-flow[data-sequence="feed"][data-phase="result"] .gedi-main-sprite { animation:gedi-chew-real .82s steps(4,end) 2; }
.gedi-flow[data-sequence="pet"][data-phase="action"] .gedi-main-sprite { animation:gedi-pet-real 1.2s ease-in-out both; }
.gedi-flow[data-sequence="hug"][data-phase="action"] .gedi-main-sprite { animation:gedi-hug-real 1.05s cubic-bezier(.28,.75,.24,1) both; }
.gedi-flow[data-sequence="sleep"][data-phase="action"] .gedi-main-sprite { animation:gedi-curl-down .95s ease-in both; }
.gedi-flow[data-sequence="bath"][data-phase="action"] .gedi-main-sprite { animation:gedi-shower-shake 1.1s ease-in-out both; }
.gedi-flow[data-sequence="bath"][data-phase="result"] .gedi-main-sprite { animation:gedi-fluff-real .82s cubic-bezier(.2,.8,.2,1) 2; }
.gedi-flow[data-sequence="stars"][data-phase="action"] .gedi-main-sprite { animation:gedi-stargaze-real 1.6s ease-in-out both; }
.gedi-flow[data-sequence="idle"][data-phase="action"] .gedi-main-sprite { animation:gedi-settle-real 1.8s ease-in-out both; }
.gedi-flow[data-sequence="dress"][data-phase="action"] .gedi-main-sprite { animation:gedi-dress-turn .9s cubic-bezier(.3,.8,.2,1) both; }
.gedi-flow[data-sequence="outing"][data-phase="action"] .gedi-main-sprite { animation:gedi-leave-home-real 2.35s cubic-bezier(.35,.72,.25,1) forwards; }
.gedi-flow[data-sequence="walk"][data-phase="action"] .gedi-main-sprite { animation:gedi-walk-out-real 2.05s cubic-bezier(.35,.72,.25,1) forwards; }
.gedi-flow[data-sequence="outing"][data-phase="result"] .gedi-main-sprite,.gedi-flow[data-sequence="walk"][data-phase="result"] .gedi-main-sprite { animation:gedi-return-pop .72s cubic-bezier(.18,.9,.26,1.2) both; }
.gedi-flow[data-sequence="dress"] .gedi-aura i::before { content:"✦"; color:#e5b873; font-size:18px; }
.gedi-flow[data-sequence="dress"] .gedi-aura i { opacity:.9; animation:gedi-star 1s ease-in-out infinite alternate; }
.gedi-flow[data-sequence="feed"] .gedi-stage.scene-active::after { content:"♨  ·  ♨"; left:0; right:0; top:25%; color:rgba(255,255,255,.7); animation:gedi-steam 2.1s ease-in-out infinite; }
.gedi-flow[data-sequence="pet"] .gedi-stage.scene-active::after { content:"♡   ♡   ♡"; left:0; right:0; top:23%; color:rgba(218,145,133,.65); animation:gedi-heart-room 2.2s ease-in-out infinite; }
.gedi-flow[data-sequence="sleep"] .gedi-stage.scene-active::after { content:"☾   ·   z Z"; left:0; right:0; top:19%; color:rgba(255,231,171,.72); animation:gedi-night-drift 3.6s ease-in-out infinite; }
.gedi-flow[data-sequence="hug"] .gedi-stage.scene-active::after { content:"♥   ♡   ♥"; left:0; right:0; top:22%; color:rgba(225,139,128,.68); animation:gedi-heart-room 1.7s ease-in-out infinite; }
.gedi-flow[data-sequence="outing"] .gedi-stage.scene-active::after { content:"☁        ☁"; left:-20%; right:-20%; top:17%; color:rgba(255,255,255,.72); animation:gedi-landscape-pass 2.5s linear infinite; }
.gedi-flow[data-sequence="bath"] .gedi-stage.scene-active::after { content:"○  ◌   ○   ◌"; left:0; right:0; top:20%; color:rgba(255,255,255,.74); animation:gedi-bath-background 2.4s ease-in-out infinite; }
.gedi-flow[data-sequence="walk"] .gedi-stage.scene-active::after { content:"•  •   •  •"; left:0; right:0; top:63%; color:rgba(117,91,70,.32); animation:gedi-footsteps 1.5s linear infinite; }
.gedi-flow[data-sequence="dress"] .gedi-stage.scene-active::after { content:"✦  ♢  ✦"; left:0; right:0; top:20%; color:rgba(224,176,102,.72); animation:gedi-star 1.3s ease-in-out infinite alternate; }
.gedi-flow[data-sequence="walk"][data-scene="海边走走"] .gedi-stage { background:linear-gradient(180deg,#dcecf0 0 48%,#f1dfbf 49% 100%); }
.gedi-flow[data-sequence="walk"][data-scene="花园走走"] .gedi-stage { background:linear-gradient(180deg,#edf2df 0 52%,#d9e2c2 53% 100%); }
.gedi-flow[data-sequence="walk"][data-scene="树林走走"] .gedi-stage { background:linear-gradient(180deg,#dce5d5 0 50%,#c8b89d 51% 100%); }
.gedi-flow[data-sequence="walk"][data-scene="月亮下面慢慢走"] .gedi-stage { background:linear-gradient(180deg,#3f4962 0 55%,#778071 56% 100%); }
.gedi-away .gedi-main-sprite { opacity:.12; }
.gedi-away .gedi-stage::after { content:"盖迪不在家，出去玩啦"; position:absolute; z-index:2; left:50%; top:43%; width:80%; transform:translate(-50%,-50%); color:#826b5f; font-size:16px; font-weight:650; }
.gedi-is-moving .gedi-main-sprite { animation:gedi-happy .62s ease; }
.gedi-flow[data-effect="sleep"] .gedi-main-sprite { animation:gedi-sleep 3.6s ease-in-out infinite; }
.gedi-flow[data-effect="pet"] .gedi-main-sprite { animation:gedi-pet .85s ease-in-out 2; }
.gedi-flow[data-effect="hug"] .gedi-main-sprite { animation:gedi-hug .9s ease-in-out 2; }
.gedi-flow[data-effect="outing"] .gedi-main-sprite { animation:gedi-outing .65s ease-in-out 3; }
.gedi-flow[data-effect="bath"] .gedi-main-sprite { animation:gedi-fluff 1s ease-in-out 2; }
.gedi-flow[data-effect="feed"] .gedi-main-sprite { animation:gedi-chew .48s ease-in-out 4; }
.gedi-flow[data-effect="stars"] .gedi-main-sprite { animation:gedi-look-up 1.8s ease-in-out infinite alternate; }
.gedi-flow[data-effect="idle"] .gedi-main-sprite { animation:gedi-idle 4.2s ease-in-out infinite; }
.gedi-flow[data-effect="walk"] .gedi-main-sprite { animation:gedi-walk .48s ease-in-out 5; }
.gedi-flow[data-effect="warm"] .gedi-main-sprite { animation:gedi-warm 2.4s ease-in-out infinite; }
.gedi-flow[data-effect="bath"] .gedi-aura i { width:14px;height:14px;border:2px solid #c7ddec;border-radius:50%;opacity:.8;animation:gedi-bubble 2.2s ease-in infinite; }
.gedi-flow[data-effect="outing"] .gedi-aura i { width:7px;height:11px;border-radius:70% 30% 60% 40%;background:#a9cbe1;opacity:.75;animation:gedi-sweat 1.5s ease-out infinite; }
.gedi-flow[data-effect="hug"] .gedi-aura i::before { content:"♥"; color:#e9a58d; font-size:19px; }
.gedi-flow[data-effect="hug"] .gedi-aura i { opacity:.8;animation:gedi-heart 1.8s ease-out infinite; }
.gedi-flow[data-effect="stars"] .gedi-aura i::before { content:"✦"; color:#e8bd6f; font-size:18px; }
.gedi-flow[data-effect="stars"] .gedi-aura i { opacity:.8;animation:gedi-star 1.6s ease-in-out infinite alternate; }
.gedi-flow.gedi-rain-outfit .gedi-aura i { width:6px;height:12px;border-radius:60% 40% 65% 35%;background:#9fbfd9;opacity:.75;animation:gedi-rain 1.4s linear infinite; }

@keyframes gedi-peek { 0%,72%,100% { transform:translateY(17px); } 80%,92% { transform:translateY(0); } 86% { transform:translateY(-3px); } }
@keyframes gedi-head-look { 0%,38%,100%{transform:rotate(0)}46%{transform:rotate(-2.6deg) translateX(-1px)}58%{transform:rotate(2deg) translateX(1px)}68%{transform:rotate(0)} }
@keyframes gedi-tail-wag { 0%,62%,100%{transform:rotate(0)}70%{transform:rotate(4deg)}78%{transform:rotate(-4deg)}86%{transform:rotate(3deg)}94%{transform:rotate(0)} }
@keyframes gedi-body-breathe { 0%,100%{transform:scale(1)}50%{transform:scale(1.008,.994)} }
@keyframes gedi-happy { 0%,100% { transform:translateY(0) scale(1); } 45% { transform:translateY(-11px) scale(1.025); } }
@keyframes gedi-breathe { 0%,100%{transform:translateY(0) scale(1)}50%{transform:translateY(-3px) scale(1.012,.995)} }
@keyframes gedi-sleep { 0%,100%{transform:translateY(2px) scale(1,.985)}50%{transform:translateY(0) scale(1.018,1)} }
@keyframes gedi-pet { 0%,100%{transform:rotate(0)}45%{transform:rotate(-2.4deg) translateY(2px)} }
@keyframes gedi-hug { 0%,100%{transform:scale(1)}45%{transform:scale(1.045,.97) rotate(1.2deg)} }
@keyframes gedi-outing { 0%,100%{transform:translate(0,0) rotate(0)}30%{transform:translate(-3px,-5px) rotate(-1.5deg)}70%{transform:translate(3px,-2px) rotate(1.5deg)} }
@keyframes gedi-fluff { 0%,100%{transform:scale(1)}35%{transform:scale(1.035,.98) rotate(-1deg)}70%{transform:scale(.99,1.03) rotate(1deg)} }
@keyframes gedi-chew { 0%,100%{transform:scale(1)}50%{transform:scale(1.018,.988) translateY(2px)} }
@keyframes gedi-look-up { from{transform:translateY(0) rotate(-.8deg)}to{transform:translateY(-4px) rotate(1deg)} }
@keyframes gedi-idle { 0%,100%{transform:translateY(0) rotate(0)}50%{transform:translateY(3px) rotate(-.7deg)} }
@keyframes gedi-walk { 0%,100%{transform:translateX(0) rotate(0)}35%{transform:translateX(-4px) rotate(-1.5deg)}70%{transform:translateX(4px) rotate(1.5deg)} }
@keyframes gedi-warm { 0%,100%{filter:drop-shadow(0 18px 18px rgba(57,45,38,.12))}50%{filter:drop-shadow(0 15px 20px rgba(226,157,111,.34))} }
@keyframes gedi-bubble { 0%{transform:translateY(35px) scale(.55);opacity:0}30%{opacity:.8}100%{transform:translateY(-42px) scale(1.15);opacity:0} }
@keyframes gedi-sweat { 0%{transform:translateY(-8px);opacity:0}30%{opacity:.8}100%{transform:translateY(30px);opacity:0} }
@keyframes gedi-heart { 0%{transform:translateY(18px) scale(.7);opacity:0}35%{opacity:.85}100%{transform:translateY(-35px) scale(1.1);opacity:0} }
@keyframes gedi-star { from{transform:scale(.65) rotate(-8deg);opacity:.35}to{transform:scale(1.12) rotate(8deg);opacity:1} }
@keyframes gedi-rain { from{transform:translateY(-20px);opacity:0}20%{opacity:.75}to{transform:translateY(45px);opacity:0} }
@keyframes gedi-prop-feed { 0%{opacity:0;transform:translate(-35px,40px) scale(.55) rotate(-12deg)}25%{opacity:1}72%{opacity:1;transform:translate(115px,-8px) scale(.85) rotate(3deg)}100%{opacity:0;transform:translate(145px,-4px) scale(.35)} }
@keyframes gedi-hand-pet { 0%{opacity:0;transform:translate(-50%,-90px)}22%{opacity:1}48%,72%{opacity:1;transform:translate(-50%,86px) rotate(-4deg)}60%{transform:translate(-50%,75px) rotate(4deg)}100%{opacity:0;transform:translate(-50%,28px)} }
@keyframes gedi-zzz { 0%{opacity:0;transform:translate(0,12px) scale(.7)}40%{opacity:1}100%{opacity:0;transform:translate(18px,-25px) scale(1.15)} }
@keyframes gedi-hug-arrive { 0%{opacity:0;transform:translateY(-80px) scale(.5)}45%{opacity:1;transform:translateY(80px) scale(1)}100%{opacity:0;transform:translateY(72px) scale(1.1)} }
@keyframes gedi-vehicle { 0%{opacity:0;transform:translate(-40px,30px) scale(.5)}28%{opacity:1}70%{opacity:1;transform:translate(105px,0) scale(1)}100%{opacity:0;transform:translate(260px,-10px) scale(.8)} }
@keyframes gedi-friend-join { 0%{opacity:0;transform:translate(-65px,18px) scale(.65)}25%{opacity:1;transform:translate(35px,0) scale(1)}72%{opacity:1;transform:translate(105px,-3px) scale(1.02)}100%{opacity:0;transform:translate(235px,-6px) scale(.85)} }
@keyframes gedi-walk-pair { 0%{opacity:0;transform:translate(-25px,20px)}30%,75%{opacity:1}100%{opacity:0;transform:translate(230px,0)} }
@keyframes gedi-leave-home { 0%,25%{transform:translateX(0) rotate(0);opacity:1}55%{transform:translateX(12px) rotate(2deg);opacity:1}100%{transform:translateX(340px) rotate(4deg);opacity:0} }
@keyframes gedi-walk-out { 0%,20%{transform:translateX(0);opacity:1}50%{transform:translateX(18px) translateY(-4px);opacity:1}100%{transform:translateX(300px);opacity:0} }
@keyframes gedi-anticipate { 0%{transform:translateY(0) scale(1)}55%{transform:translateY(8px) scale(1.035,.955)}100%{transform:translateY(0) scale(.985,1.015)} }
@keyframes gedi-lean-to-food { 0%{transform:translate(0,0) rotate(0) scale(1)}35%{transform:translate(-22px,8px) rotate(-4deg) scale(1.02,.97)}70%{transform:translate(18px,3px) rotate(3deg) scale(.99,1.02)}100%{transform:translate(4px,0) rotate(0) scale(1)} }
@keyframes gedi-chew-real { 0%{transform:translateY(0) scale(1)}25%{transform:translateY(2px) scale(1.025,.982)}50%{transform:translateY(0) scale(.992,1.015)}75%{transform:translateY(2px) scale(1.018,.988)}100%{transform:translateY(0) scale(1)} }
@keyframes gedi-pet-real { 0%{transform:rotate(0) translateY(0)}24%{transform:rotate(-3deg) translateY(8px) scale(1.01,.98)}52%{transform:rotate(2deg) translateY(5px) scale(1.02,.975)}76%{transform:rotate(-1deg) translateY(6px) scale(1.01,.985)}100%{transform:rotate(0) translateY(0) scale(1)} }
@keyframes gedi-hug-real { 0%{transform:scale(1) translateY(0)}32%{transform:scale(1.075,.93) translateY(12px)}58%{transform:scale(.965,1.045) translateY(-5px)}78%{transform:scale(1.035,.975) translateY(3px)}100%{transform:scale(1) translateY(0)} }
@keyframes gedi-curl-down { 0%{transform:translateY(0) rotate(0) scale(1)}50%{transform:translateY(16px) rotate(-2deg) scale(1.04,.9)}100%{transform:translateY(24px) rotate(0) scale(1.08,.86);filter:drop-shadow(0 8px 12px rgba(57,45,38,.1))} }
@keyframes gedi-shower-shake { 0%,100%{transform:translateX(0) rotate(0) scale(1)}16%{transform:translateX(-7px) rotate(-2deg) scale(.99,1.02)}32%{transform:translateX(8px) rotate(2deg) scale(1.02,.98)}48%{transform:translateX(-5px) rotate(-1.4deg)}64%{transform:translateX(5px) rotate(1.4deg)}80%{transform:translateX(-2px) rotate(-.6deg)} }
@keyframes gedi-fluff-real { 0%{transform:scale(.98,1.04)}35%{transform:scale(1.07,.95) rotate(-1.5deg)}65%{transform:scale(.975,1.06) rotate(1.2deg)}100%{transform:scale(1)} }
@keyframes gedi-stargaze-real { 0%{transform:translateY(0) rotate(0)}35%{transform:translateY(-8px) rotate(-3deg)}72%{transform:translateY(-11px) rotate(2deg)}100%{transform:translateY(-7px) rotate(.8deg)} }
@keyframes gedi-settle-real { 0%{transform:translateY(0) rotate(0)}35%{transform:translateY(13px) rotate(-1.5deg) scale(1.025,.97)}70%{transform:translateY(9px) rotate(.8deg) scale(.99,1.01)}100%{transform:translateY(12px) rotate(0) scale(1)} }
@keyframes gedi-dress-turn { 0%{transform:perspective(420px) rotateY(0) translateY(0)}45%{transform:perspective(420px) rotateY(28deg) translateY(-6px) scale(.98,1.02)}72%{transform:perspective(420px) rotateY(-16deg) translateY(2px) scale(1.02,.98)}100%{transform:perspective(420px) rotateY(0) translateY(0) scale(1)} }
@keyframes gedi-leave-home-real { 0%{transform:translate(0,0) rotate(0) scale(1);opacity:1}18%{transform:translate(-14px,7px) rotate(-3deg) scale(1.04,.94);opacity:1}34%{transform:translate(32px,-14px) rotate(3deg) scale(.98,1.04)}52%{transform:translate(96px,8px) rotate(-2deg) scale(1.02,.97)}72%{transform:translate(190px,-10px) rotate(3deg) scale(.98,1.02);opacity:.95}100%{transform:translate(350px,16px) rotate(5deg) scale(.82);opacity:0} }
@keyframes gedi-walk-out-real { 0%{transform:translate(0,0) rotate(0);opacity:1}16%{transform:translate(-8px,6px) rotate(-2deg) scale(1.02,.96)}32%{transform:translate(35px,-8px) rotate(2deg) scale(.98,1.03)}48%{transform:translate(78px,6px) rotate(-1.5deg) scale(1.02,.97)}64%{transform:translate(122px,-8px) rotate(2deg) scale(.99,1.02)}82%{transform:translate(210px,4px) rotate(-1deg);opacity:.9}100%{transform:translate(320px,10px) rotate(3deg) scale(.88);opacity:0} }
@keyframes gedi-return-pop { 0%{transform:translateY(20px) scale(.82);opacity:0}55%{transform:translateY(-8px) scale(1.05,.96);opacity:1}78%{transform:translateY(4px) scale(.985,1.018)}100%{transform:translateY(0) scale(1);opacity:1} }
@keyframes gedi-footprint-pop { 0%{transform:translateY(14px) rotate(-12deg) scale(.35);opacity:0}30%{opacity:.55}56%{transform:translateY(0) rotate(-12deg) scale(1);opacity:.42}100%{transform:translateY(-4px) rotate(-12deg) scale(.85);opacity:0} }
@keyframes gedi-clouds { from{transform:translateX(-45px)}to{transform:translateX(45px)} }
@keyframes gedi-scene-drift { from{transform:translate(-10px,3px) rotate(-4deg);opacity:.45}to{transform:translate(8px,-8px) rotate(4deg);opacity:.9} }
@keyframes gedi-background-shift { from{background-position:0% 25%}to{background-position:100% 75%} }
@keyframes gedi-steam { 0%,100%{transform:translateY(18px);opacity:.25}50%{transform:translateY(-18px);opacity:.85} }
@keyframes gedi-heart-room { 0%,100%{transform:translateY(12px) scale(.82);opacity:.3}50%{transform:translateY(-12px) scale(1.08);opacity:.9} }
@keyframes gedi-night-drift { 0%,100%{transform:translate(-14px,10px);opacity:.4}50%{transform:translate(18px,-12px);opacity:1} }
@keyframes gedi-landscape-pass { from{transform:translateX(-35%)}to{transform:translateX(35%)} }
@keyframes gedi-bath-background { 0%,100%{transform:translateY(30px) scale(.8);opacity:.2}50%{transform:translateY(-18px) scale(1.08);opacity:.95} }
@keyframes gedi-footsteps { from{transform:translateX(-38px)}to{transform:translateX(38px)} }
@keyframes gedi-svg-clouds { from{transform:translateX(-22px)}to{transform:translateX(28px)} }
@keyframes gedi-svg-water { from{transform:translateX(-18px)}to{transform:translateX(18px)} }
@keyframes gedi-svg-cable { from{transform:translate(-75px,-18px)}to{transform:translate(65px,15px)} }
@keyframes gedi-svg-light { from{transform:rotate(-8deg);opacity:.25}to{transform:rotate(11deg);opacity:.62} }
@keyframes gedi-svg-spin { to{transform:rotate(360deg)} }
@keyframes gedi-svg-glow { from{opacity:.35}to{opacity:1} }
@keyframes gedi-svg-float { from{transform:translate(-8px,5px)}to{transform:translate(12px,-8px)} }
@keyframes gedi-svg-fall { from{transform:translateY(-35px)}to{transform:translateY(55px)} }
@keyframes gedi-svg-rise { from{transform:translateY(28px);opacity:.25}to{transform:translateY(-24px);opacity:.9} }
@media (prefers-reduced-motion:reduce) { .gedi-nest-entry .gedi-sprite,.gedi-is-moving .gedi-main-sprite,.gedi-flow .gedi-main-sprite,.gedi-motion-track i,.gedi-action-prop,.gedi-action-hand,.gedi-action-zzz,.gedi-action-gift { animation:none!important; } }
/* V7 final UI: recent memories, together categories, capsule ritual */
.recent-memory-strip{display:flex;gap:12px;margin:-5px 0 9px;padding:10px 3px 12px;overflow-x:auto;scroll-snap-type:x mandatory;border:0;border-radius:0;background:transparent;box-shadow:none;scrollbar-width:none;-webkit-overflow-scrolling:touch}
.recent-memory-strip::-webkit-scrollbar{display:none}
.recent-memory-card{flex:0 0 132px;scroll-snap-align:start;display:flex;min-width:0;padding:0 0 11px;overflow:hidden;flex-direction:column;gap:7px;border:1px solid rgba(226,211,199,.9);border-radius:20px;background:rgba(255,253,249,.96);box-shadow:0 9px 22px rgba(83,60,46,.08);text-align:left}
.recent-memory-thumb{display:block;width:100%;height:104px;overflow:hidden;background:linear-gradient(145deg,#f7e8dd,#eee8df);font-size:32px}
.recent-memory-thumb img,.recent-memory-thumb video{width:100%;height:100%;display:block;object-fit:cover}
.recent-memory-card strong{padding:0 11px;color:#513e34;font-size:12px;line-height:1.4;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.recent-memory-card small{padding:0 11px;color:#a08e82;font-size:9px}
.todo-category-icon{position:relative;display:grid;place-items:center;width:44px;height:44px;flex:0 0 44px;border:1px solid #e5d8ca;border-radius:50%;background:linear-gradient(145deg,#fff,#f6ede5);font-size:20px;box-shadow:0 5px 13px rgba(91,65,50,.07)}
.todo-category-icon i{position:absolute;right:-2px;bottom:-2px;display:grid;place-items:center;width:17px;height:17px;border-radius:50%;background:#91a77b;color:#fff;font-size:9px;font-style:normal}
.todo-item.done .todo-category-icon{filter:saturate(.75);opacity:.78}
.capsule-screen{background:radial-gradient(circle at 82% 8%,rgba(243,210,160,.22),transparent 30%),linear-gradient(165deg,#fffaf1,#f8f2eb 68%,#f5f0eb)}
.capsule-list{position:relative;padding:8px 0 26px 28px}
.capsule-list::before{content:"";position:absolute;left:9px;top:29px;bottom:42px;width:1px;background:linear-gradient(#e5c796,#d8c7ba 75%,transparent)}
.capsule-timeline-item{position:relative;margin-bottom:15px}.capsule-timeline-dot{position:absolute;left:-24px;top:50%;width:11px;height:11px;border:3px solid #fff8ef;border-radius:50%;background:#d9ad6e;box-shadow:0 0 0 1px #d8c2aa,0 0 14px rgba(213,168,99,.35)}
.capsule-card-item{display:grid;grid-template-columns:70px 1fr auto;align-items:center;gap:12px;min-height:128px;padding:15px;border-color:rgba(210,185,157,.5);background:linear-gradient(145deg,rgba(255,254,251,.98),rgba(247,238,228,.96));box-shadow:0 12px 28px rgba(101,71,48,.08),inset 0 0 0 1px rgba(255,255,255,.7)}
.capsule-mini-dome{position:relative;display:grid;place-items:center;width:68px;height:82px;border:1px solid rgba(215,183,137,.55);border-radius:35px 35px 17px 17px;background:radial-gradient(circle at 42% 30%,rgba(255,255,255,.95),rgba(236,220,202,.65) 55%,rgba(205,178,146,.24));box-shadow:inset 7px 5px 14px rgba(255,255,255,.7),0 8px 18px rgba(122,87,58,.1)}
.capsule-mini-dome::after{content:"";position:absolute;left:8px;right:8px;bottom:6px;height:9px;border-radius:999px;background:linear-gradient(90deg,#b98b58,#e1bd82,#aa7848)}.capsule-mini-dome span{font-size:25px;filter:sepia(.28)}
.capsule-card-copy{min-width:0}.capsule-card-copy h3{margin:7px 0 5px}.capsule-card-copy p{margin-bottom:6px}.capsule-card-copy small{color:#9e8a7c;font-size:9px}.capsule-card-item footer{align-self:end;margin:0}.capsule-card-item footer span{color:#a6978d;font-size:9px}.capsule-card-item footer button{white-space:nowrap;padding:7px 9px}
.capsule-empty{padding:45px 18px;display:grid;justify-items:center;gap:10px;text-align:center;color:#806c60}.capsule-empty p{margin:0;color:#a29084;font-size:12px}
#capsule-modal.capsule-create-modal{position:fixed;z-index:75;inset:0;left:50%;top:0;transform:translateX(-50%);width:min(100%,430px);max-height:none;height:100dvh;padding:0 22px calc(30px + env(safe-area-inset-bottom));overflow-y:auto;border-radius:0;background:radial-gradient(circle at 75% 12%,rgba(248,216,166,.3),transparent 27%),linear-gradient(165deg,#fffaf1,#f8f1e9);box-shadow:none}
.capsule-create-header{display:grid;grid-template-columns:46px 1fr 46px;align-items:center;padding:calc(16px + env(safe-area-inset-top)) 0 8px;text-align:center}.capsule-create-header h3{margin:0;font-size:25px}.capsule-create-header p{margin:5px 0 0;color:#a08a7b;font-size:11px}.capsule-back{width:42px;height:42px;border:1px solid #eadcca;border-radius:50%;background:rgba(255,253,249,.82);color:#846a58;font-size:22px}
.capsule-create-hero{position:relative;height:210px;margin:3px -2px 8px;display:grid;place-items:center;overflow:hidden}.capsule-glass-dome{position:relative;z-index:2;display:grid;place-items:center;width:112px;height:138px;border:2px solid rgba(214,173,112,.56);border-radius:56px 56px 27px 27px;background:radial-gradient(circle at 38% 25%,rgba(255,255,255,.95),rgba(249,224,179,.4) 50%,rgba(203,157,91,.16));box-shadow:inset 12px 8px 20px rgba(255,255,255,.88),0 20px 35px rgba(166,111,46,.18)}
.capsule-glass-dome::after{content:"SOYA UNIVERSE";position:absolute;left:-12px;right:-12px;bottom:-10px;padding:7px 0;border-radius:999px;background:linear-gradient(90deg,#a8753f,#e0b56f,#9d6938);color:#fff7e9;font-size:7px;letter-spacing:.16em;text-align:center}.capsule-glass-dome span{font-size:40px;color:#b9824f}.capsule-orbit{position:absolute;border:1px solid rgba(203,155,89,.45);border-radius:50%;transform:rotate(-18deg)}.orbit-one{width:250px;height:92px}.orbit-two{width:185px;height:62px;transform:rotate(28deg)}.capsule-create-hero>b{position:absolute;color:#d2a65e}.capsule-create-hero>b:nth-last-child(2){left:19%;top:35%}.capsule-create-hero>b:last-child{right:18%;bottom:28%;font-size:28px}
.capsule-field-card,.capsule-time-card{display:grid;grid-template-columns:38px 1fr;gap:11px;align-items:start;margin-top:10px;padding:14px;border:1px solid rgba(218,195,170,.56);border-radius:20px;background:rgba(255,253,249,.86);box-shadow:0 8px 20px rgba(102,71,48,.05)}.capsule-field-icon{display:grid;place-items:center;width:34px;height:34px;border-radius:50%;background:#fbefdd;color:#ad7849;font-size:16px}
.capsule-create-modal label{margin:0;font-size:12px}.capsule-create-modal input,.capsule-create-modal textarea,.capsule-create-modal select{margin-top:5px;padding:5px 0 0;border:0;border-radius:0;background:transparent}.capsule-create-modal textarea{min-height:96px}.capsule-content-field{min-height:150px}.capsule-time-card{position:relative;min-height:92px;overflow:hidden}.capsule-time-orbit{position:absolute;right:-16px;bottom:-27px;width:112px;height:76px;border:1px solid rgba(203,155,89,.28);border-radius:50%;transform:rotate(-13deg)}.capsule-time-orbit i{position:absolute;width:7px;height:7px;border-radius:50%;background:#d0a15f}.capsule-time-orbit i:nth-child(1){left:12px;top:25px}.capsule-time-orbit i:nth-child(2){right:22px;top:6px}.capsule-time-orbit i:nth-child(3){right:10px;bottom:13px}.capsule-lock-note{margin:17px 4px 12px!important;color:#9b806e!important;font-size:10px;text-align:center}.capsule-seal-button{width:100%;min-height:54px;border:0;border-radius:999px;background:linear-gradient(90deg,#b68247,#e0b86f,#a9723d);color:#fff8ea;font-size:16px;box-shadow:0 12px 25px rgba(164,109,54,.25)}

.gedi-world{margin:14px 0 18px}.gedi-wish,.gedi-personality{padding:15px 16px;border:1px solid #e6d9ca;border-radius:8px;background:#fffdf9}.gedi-wish{border-left:4px solid #cc956a}.gedi-wish.fulfilled{border-left-color:#77936d;background:#f7faf3}.gedi-wish small,.gedi-personality small{display:block;color:#9d8778;font-size:9px}.gedi-wish strong,.gedi-personality strong{display:block;margin-top:5px;color:#59443a;font-size:15px}.gedi-wish p,.gedi-personality p{margin:5px 0 0;color:#8c776a;font-size:11px;line-height:1.55}.gedi-personality{margin-top:8px}.gedi-personality p{padding-top:8px;border-top:1px dashed #e4d4c4;color:#a16d4f}.gedi-world-tabs{display:grid;grid-template-columns:repeat(3,1fr);gap:4px;margin:12px 0 9px;padding:4px;border:1px solid #e4d7cb;border-radius:8px;background:#f5eee8}.gedi-world-tabs button{min-height:36px;border:0;border-radius:6px;background:transparent;color:#8c776b;font-size:11px}.gedi-world-tabs button.selected{background:#fff;color:#543f35;box-shadow:0 2px 8px rgba(85,60,46,.08)}.gedi-world-panel{display:grid;gap:9px}.gedi-diary{padding:16px;border:1px solid #e6d8ca;border-radius:8px;background:#fffdf9;box-shadow:0 7px 18px rgba(87,61,45,.05)}.gedi-diary>small{color:#a08a7b;font-size:9px}.gedi-diary h3{margin:7px 0 7px;font-size:17px}.gedi-diary>p{margin:0;color:#705c50;font-size:12px;line-height:1.75}.gedi-diary footer{margin-top:10px;color:#a47452;font-size:10px}.gedi-diary-choice{margin-top:12px;padding-top:11px;border-top:1px dashed #dfd0c2}.gedi-diary-choice strong{display:block;margin-bottom:8px;font-size:11px}.gedi-diary-choice button{margin:0 6px 5px 0;padding:8px 10px;border:1px solid #d9c4b1;border-radius:6px;background:#fff8f0;color:#6f5545;font-size:10px}.gedi-diary-choice p{margin:0;color:#8d7668;font-size:10px}.gedi-collection-item{display:grid;grid-template-columns:34px 1fr auto;gap:10px;align-items:center;padding:12px;border-bottom:1px solid #eadfd4}.gedi-collection-item>span{display:grid;place-items:center;width:32px;height:32px;border-radius:50%;background:#f2e4d4;color:#9b704e}.gedi-collection-item strong,.gedi-collection-item small{display:block}.gedi-collection-item small{margin-top:3px;color:#9a8679;font-size:9px}.gedi-collection-item i{color:#a47655;font-size:10px;font-style:normal}.gedi-month-card{min-height:180px;padding:24px;border:1px solid #dbc7ac;border-radius:8px;background:linear-gradient(145deg,#fffaf0,#f2e5d3);box-shadow:inset 6px 0 #b48257}.gedi-month-card h3{margin:12px 0 18px;font-size:22px}.gedi-month-card p{color:#806b5c;font-size:11px;line-height:1.7}.gedi-world-empty{padding:28px 14px;color:#9c887b;font-size:11px;text-align:center}
.gedi-cece-entry{display:grid;grid-template-columns:58px 1fr auto;align-items:center;gap:13px;width:100%;margin:18px 0 30px;padding:15px 18px;border:1px solid #e6cfea;border-radius:24px;background:linear-gradient(135deg,#fff9ff,#f7edf8);color:#5f465b;text-align:left;box-shadow:0 10px 25px rgba(106,74,104,.07)}
.gedi-cece-entry-icon{display:grid;place-items:center;width:50px;height:50px;border-radius:18px;background:linear-gradient(145deg,#efd9f4,#d7aee1);font-size:24px}.gedi-cece-entry strong{display:block;font-size:18px}.gedi-cece-entry small{display:block;margin-top:5px;color:#9b8196;font-size:11px}.gedi-cece-entry i{font-size:30px;font-style:normal;color:#a98ba5}
.gedi-cece-flow{position:fixed;z-index:68;inset:0;left:50%;transform:translateX(-50%);width:min(100%,430px);height:100dvh;overflow-y:auto;background:radial-gradient(circle at 85% 8%,rgba(216,183,225,.18),transparent 27%),#fbf5ed;color:#513f37}
.gedi-cece-header{position:sticky;z-index:3;top:0;display:grid;grid-template-columns:48px 1fr 48px;align-items:center;padding-top:calc(13px + env(safe-area-inset-top));background:rgba(255,250,244,.92);backdrop-filter:blur(16px);text-align:center}.gedi-cece-header h2{margin:0;font-size:22px}
.gedi-cece-body{padding:20px 22px calc(35px + env(safe-area-inset-bottom))}.gedi-cece-tabs{display:grid;grid-template-columns:1fr 1fr;padding:5px;border:1px solid #eadbd0;border-radius:22px;background:#f4eae4}.gedi-cece-tabs button{height:50px;border:0;border-radius:18px;background:transparent;color:#9e8276;font-weight:700}.gedi-cece-tabs button.active{background:#fff;color:#513f37;box-shadow:0 5px 15px rgba(88,61,49,.08)}
.gedi-fortune-card{position:relative;min-height:250px;margin-top:15px;padding:24px 22px;border-radius:31px;background:linear-gradient(135deg,#5d587f,#b37e91);color:#fff;overflow:hidden}.gedi-fortune-card::after{content:"✦";position:absolute;right:25px;top:52px;color:#ebcf9e;font-size:46px}.gedi-profile-tags{display:flex;gap:7px;overflow-x:auto;scrollbar-width:none}.gedi-profile-tags span{flex:0 0 auto;max-width:220px;padding:7px 10px;border:1px solid rgba(255,255,255,.25);border-radius:999px;background:rgba(255,255,255,.08);font-size:9px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.gedi-fortune-card>small{display:block;margin-top:28px;letter-spacing:.13em}.gedi-fortune-card h3{max-width:310px;margin:14px 0 12px;font-size:30px;line-height:1.28}.gedi-fortune-card p{margin:0;color:#f7eff2;font-size:13px}
.gedi-lucky-grid{display:grid;grid-template-columns:1fr 1fr;gap:13px;margin-top:15px}.gedi-lucky-grid article{min-height:150px;padding:20px 16px;border:1px solid #ead8ca;border-radius:28px;background:#fffdf9}.gedi-lucky-grid small{color:#b08878}.gedi-color-line{display:flex;align-items:center;gap:10px;margin-top:15px}.gedi-color-line i{width:34px;height:34px;border-radius:50%;background:#d9d1cc;box-shadow:0 0 0 6px #f3ece8}.gedi-color-line strong,.gedi-number{font-size:23px}.gedi-number{display:block;margin-top:14px}.gedi-lucky-grid p{margin:11px 0 0;color:#a18d83;font-size:10px;line-height:1.5}
.gedi-ask-card{margin-top:18px;padding:22px 18px 24px;border:1px solid #ead8ca;border-radius:30px;background:#fffdf9}.gedi-ask-card h3{margin:0;font-size:21px}.gedi-ask-card>p{margin:8px 0 17px;color:#9b8276;font-size:12px}.gedi-ask-card textarea{display:block;width:100%;height:126px;max-height:180px;padding:14px;border:1px solid #ead9ce;border-radius:22px;background:#fffaf6;resize:none;overflow-y:auto;font:inherit;color:#513f37}.gedi-ask-card>button{width:100%;height:58px;margin-top:14px;border:0;border-radius:21px;background:linear-gradient(90deg,#997594,#bc8298);color:#fff;font-size:16px;font-weight:800}.gedi-ask-card>button:disabled{opacity:.65}.gedi-answer{max-height:190px;margin-top:14px;padding:16px;border-radius:20px;background:#f6edf7;overflow-y:auto}.gedi-answer p{margin:0;color:#5d4857;line-height:1.7;white-space:pre-wrap}.gedi-answer small{display:block;margin-top:10px;color:#aa8ba3;font-size:9px}
