/* Interactive app demo inside the hero phone.
   The app is laid out at iPhone size (390×844) and scaled to fit the frame,
   so every measurement below matches the real Flutter screens. */

/* clip-path, not just overflow: the tab bar's backdrop blur escapes a plain rounded overflow clip. */
.screen { --sr: 36px; position: relative; width: 100%; aspect-ratio: 390 / 844; border-radius: var(--sr); overflow: hidden; clip-path: inset(0 round var(--sr)); isolation: isolate; background: #FBF7F0; }
.demo-fallback { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.screen.ready .demo-fallback { display: none; }
.demo-hint { margin: 22px 0 0; text-align: center; font-size: 14px; font-weight: 600; color: var(--muted); }
.demo-controls { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 12px; }
.demo-theme { display: flex; width: max-content; margin: 0; padding: 3px; gap: 2px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }
.demo-theme button {
  display: flex; align-items: center; gap: 6px; border: 0; background: none; cursor: pointer;
  font: 600 14px/1 var(--body); color: var(--muted); padding: 8px 14px; border-radius: 999px; transition: background 0.2s, color 0.2s;
}
.demo-theme button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.demo-theme button[aria-pressed='true'] { background: #FBF7F0; color: #1F2933; }
.demo-theme button[data-demo-theme='dark'][aria-pressed='true'] { background: #000; color: #fff; }
.demo-theme button:focus-visible { outline: 3px solid var(--brand-ink); outline-offset: 2px; }
.screen.dark { background: #000; }

.d-app {
  --ground: #FBF7F0; --surface: #FFFFFF; --surface2: #F2F2F7; --label: #000000;
  --secondary: rgba(60, 60, 67, 0.6); --tertiary: rgba(60, 60, 67, 0.3); --fill: rgba(118, 118, 128, 0.12);
  --sep: rgba(60, 60, 67, 0.16); --brand: #2F6B4F; --brand-fill: #2F6B4F; --clay: #C2410C; --clay-tint: rgba(194, 65, 12, 0.12);
  --green: #1F6B32; --grey3: #C7C7CC; --paper: #FFFDF8; --ink: #292524; --edge: #ECE4D8; --passport: #F6F1EA;
  --memory: #1E3A8A; --land: #F1EDE4; --block: #E9E3D8; --park: #CFE3C1; --water: #AAD3E9; --road: #FFFFFF;
  --map-label: #857C6E; --tabbar: rgba(249, 249, 249, 0.94); --stack1: #E5E5EA; --stack2: #D8D8DE;
  position: absolute; top: 0; left: 0; width: 390px; height: 844px; transform-origin: 0 0;
  background: var(--ground); color: var(--label); overflow: hidden; text-align: left;
  font: 17px/1.3 -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; user-select: none;
}
/* Dark appearance, switched by the Light/Dark control under the phone. */
.d-app.dark {
  --ground: #000000; --surface: #1C1C1E; --surface2: #2C2C2E; --label: #FFFFFF;
  --secondary: rgba(235, 235, 245, 0.6); --tertiary: rgba(235, 235, 245, 0.3); --fill: rgba(118, 118, 128, 0.24);
  --sep: rgba(84, 84, 88, 0.6); --brand: #8CC7A1; --clay-tint: rgba(232, 116, 59, 0.2); --green: #30D158; --grey3: #48484A;
  --paper: #2A2724; --ink: #F2EEE8; --edge: #3D3833; --passport: #26231F; --memory: #8AB4FF;
  --land: #1D2023; --block: #24282C; --park: #23382A; --water: #1E3A4D; --road: #34383D; --map-label: #9AA0A6;
  --tabbar: rgba(22, 22, 24, 0.94); --stack1: #2C2C2E; --stack2: #232325;
}
/* Low-specificity reset so every component's own button styles win. */
:where(.d-app) button { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; }
.d-app button:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.d-app input { font: inherit; }
.d-app svg { display: block; }
.d-ico { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.d-ico.solid { fill: currentColor; stroke: none; }

/* Status bar and island */
.d-status { position: absolute; z-index: 30; top: 0; left: 0; right: 0; height: 54px; display: flex; align-items: center; justify-content: space-between; padding: 6px 34px 0 46px; font-size: 17px; font-weight: 600; pointer-events: none; }
.d-status .d-sig { display: flex; gap: 6px; align-items: center; }
.d-island { position: absolute; z-index: 31; top: 11px; left: 50%; width: 124px; height: 36px; margin-left: -62px; border-radius: 20px; background: #000; pointer-events: none; }

/* Views */
.d-view { position: absolute; inset: 0 0 83px 0; display: none; }
.d-view.on { display: block; animation: d-fade 0.25s ease-out; }
.d-scroll { position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden; scrollbar-width: none; }
.d-scroll::-webkit-scrollbar { display: none; }

/* Tab bar */
.d-tabbar { position: absolute; z-index: 20; left: 0; right: 0; bottom: 0; height: 83px; display: flex; padding: 7px 8px 0; background: var(--tabbar); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-top: 0.5px solid var(--sep); }
.d-tab { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 10.5px; font-weight: 500; color: #8E8E93; }
.d-tab .d-ico { font-size: 26px; stroke-width: 1.7; }
.d-tab.on { color: var(--brand); }
.d-home { position: absolute; z-index: 21; bottom: 8px; left: 50%; width: 136px; height: 5px; margin-left: -68px; border-radius: 3px; background: var(--label); pointer-events: none; }

/* Toast and stamp overlay */
.d-toast { position: absolute; z-index: 40; left: 50%; bottom: 100px; transform: translate(-50%, 12px); background: #1C1C1E; color: #fff; font-size: 15px; font-weight: 600; padding: 11px 18px; border-radius: 999px; white-space: nowrap; opacity: 0; transition: opacity 0.2s, transform 0.25s; pointer-events: none; }
.d-toast.on { opacity: 1; transform: translate(-50%, 0); }
.d-stamp-fx { position: absolute; z-index: 45; inset: 0; display: grid; place-items: center; pointer-events: none; }
.d-stamp-fx .d-bigstamp { width: 190px; height: 190px; border-radius: 50%; border: 4px solid var(--c, #C2410C); color: var(--c, #C2410C); display: grid; place-items: center; text-align: center; padding: 8px; background: rgba(255, 255, 255, 0.85); box-shadow: inset 0 0 0 6px rgba(255, 255, 255, 0.85), inset 0 0 0 8px var(--c, #C2410C); animation: d-stamp 1.6s cubic-bezier(0.2, 1.2, 0.3, 1) forwards; }
.d-bigstamp b { display: block; font-size: 15px; letter-spacing: 3px; font-weight: 900; }
.d-bigstamp span { display: block; font-size: 19px; font-weight: 800; margin: 4px 0; line-height: 1.15; }
.d-bigstamp small { font-size: 12px; font-weight: 800; letter-spacing: 1.5px; }

/* Shared bits */
.d-h2 { font-size: 22px; font-weight: 700; letter-spacing: -0.3px; }
.d-foot { font-size: 13px; color: var(--secondary); }
.d-row-head { display: flex; align-items: baseline; justify-content: space-between; margin: 26px 0 12px; }
.d-link { color: var(--brand); font-size: 17px; }
.d-spinner { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid var(--fill); border-top-color: var(--secondary); animation: d-spin 0.8s linear infinite; flex: none; }

/* ---------- Now ---------- */
.d-now { padding: 62px 20px 28px; }
.d-caps { font-size: 13px; font-weight: 600; letter-spacing: 0.5px; color: var(--secondary); text-transform: uppercase; }
.d-hello { display: flex; align-items: center; gap: 12px; margin-top: 2px; }
.d-hello h3 { font-size: 34px; font-weight: 700; letter-spacing: -0.5px; margin: 0; }
.d-weather { display: flex; align-items: center; gap: 6px; font-size: 17px; font-weight: 600; }
.d-weather .d-ico { color: var(--brand); font-size: 22px; }
.d-weather span { color: var(--secondary); font-weight: 400; }
.d-deck { position: relative; height: 470px; }
.d-stack { position: absolute; left: 12px; right: 12px; bottom: 0; height: 30px; border-radius: 0 0 22px 22px; background: var(--stack1); }
.d-stack.two { left: 26px; right: 26px; bottom: -10px; background: var(--stack2); z-index: -1; }
.d-card { position: absolute; inset: 0 0 18px 0; background: var(--surface); border-radius: 22px; overflow: hidden; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06), 0 10px 24px rgba(0, 0, 0, 0.08); transition: transform 0.35s cubic-bezier(0.3, 0.7, 0.4, 1), opacity 0.35s; }
.d-card.in { animation: d-card-in 0.35s cubic-bezier(0.2, 1, 0.3, 1); }
.d-card.out-left { transform: translateX(-125%) rotate(-14deg); opacity: 0; }
.d-card.out-right { transform: translateX(125%) rotate(14deg); opacity: 0; }
.d-cardmap { position: relative; height: 140px; overflow: hidden; }
.d-cardmap > svg { width: 100%; height: 100%; }
.d-badge { position: absolute; top: 12px; left: 12px; color: #fff; font-size: 13px; font-weight: 800; letter-spacing: 1.2px; padding: 5px 10px; border-radius: 999px; background: var(--c); }
.d-walkpill .d-ico { font-size: 15px; }
.d-walkpill { position: absolute; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 3px; background: var(--surface); padding: 4px 9px; border-radius: 999px; font-size: 14px; font-weight: 600; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2); }
.d-cardbody { padding: 16px 18px 18px; }
.d-cardbody h4 { margin: 0; font-size: 24px; font-weight: 700; letter-spacing: -0.3px; }
.d-open { margin-top: 4px; font-size: 16px; color: var(--secondary); }
.d-open b { color: var(--green); font-weight: 600; }
.d-open b::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--green); margin: 0 6px 1px 0; }
.d-why { margin: 10px 0 0; font-size: 17px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.d-actions { position: absolute; left: 18px; right: 18px; bottom: 18px; display: flex; gap: 12px; }
.d-round { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-size: 22px; flex: none; }
.d-round.skip { background: var(--fill); color: var(--secondary); }
.d-round.save { background: var(--clay-tint); color: var(--clay); }
.d-round.save.on .d-ico { fill: currentColor; }
.d-go { flex: 1; height: 52px; border-radius: 26px; background: var(--clay); color: #fff; font-size: 18px; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 8px; }
.d-go:active, .d-round:active { transform: scale(0.96); }
.d-done { position: absolute; inset: 0 0 18px 0; background: var(--surface); border-radius: 22px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px; gap: 8px; }
.d-done img { width: 110px; }
.d-pillbtn { margin-top: 8px; background: var(--brand-fill); color: #fff; font-weight: 600; padding: 12px 22px; border-radius: 24px; }
.d-chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -20px; padding: 0 20px; }
.d-chips::-webkit-scrollbar { display: none; }
.d-chip { flex: none; height: 44px; padding: 0 18px; border-radius: 22px; border: 1.5px solid var(--sep); background: var(--surface); font-size: 17px; font-weight: 600; }
.d-chip.on { background: var(--brand-fill); border-color: var(--brand-fill); color: #fff; }
.d-seg { display: flex; gap: 8px; }
.d-seg button { flex: 1; height: 40px; border-radius: 12px; background: var(--surface); font-size: 15px; font-weight: 600; }
.d-seg button.on { background: var(--label); color: var(--ground); }
.d-list { margin-top: 10px; background: var(--surface); border-radius: 16px; overflow: hidden; }
.d-li { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 14px 12px 16px; text-align: left; }
.d-li + .d-li { box-shadow: inset 0 0.5px 0 var(--sep); }
.d-li div { flex: 1; min-width: 0; }
.d-li strong { display: block; font-size: 17px; font-weight: 600; }
.d-li small { display: block; margin-top: 2px; font-size: 13px; color: var(--secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d-li .d-ico { color: var(--tertiary); font-size: 18px; flex: none; }

/* ---------- Map ---------- */
.d-mapwrap { position: absolute; inset: 0; overflow: hidden; }
.d-mapwrap > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.d-layers { position: absolute; z-index: 5; top: 62px; left: 0; right: 0; display: flex; gap: 8px; overflow-x: auto; padding: 0 12px 8px; scrollbar-width: none; }
.d-layers::-webkit-scrollbar { display: none; }
.d-layers button { flex: none; height: 40px; padding: 0 16px; border-radius: 20px; background: var(--surface); font-size: 15px; font-weight: 600; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.14); }
.d-layers button.on { background: var(--brand-fill); color: #fff; }
.d-pin { position: absolute; z-index: 3; transform: translate(-50%, -100%); transition: transform 0.2s; }
.d-pin i { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50% 50% 50% 4px; transform: rotate(-45deg); background: var(--c); border: 2.5px solid #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3); font-style: normal; }
.d-pin i span { transform: rotate(45deg); font-size: 16px; line-height: 1; }
.d-pin.sel { transform: translate(-50%, -100%) scale(1.3); z-index: 4; }
.d-pin.drop { animation: d-drop 0.4s cubic-bezier(0.2, 1.4, 0.4, 1) backwards; }
.d-me { position: absolute; z-index: 2; width: 20px; height: 20px; margin: -10px 0 0 -10px; border-radius: 50%; background: #0A84FF; border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3); }
.d-me::after { content: ''; position: absolute; inset: -14px; border-radius: 50%; background: rgba(10, 132, 255, 0.22); animation: d-pulse 2s ease-out infinite; }
.d-base { position: absolute; z-index: 2; transform: translate(-50%, -50%); width: 32px; height: 32px; border-radius: 10px; background: var(--label); color: var(--ground); display: grid; place-items: center; font-size: 17px; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3); }
.d-checkin { position: absolute; z-index: 5; left: 16px; bottom: 16px; height: 48px; padding: 0 18px; border-radius: 24px; background: var(--clay); color: #fff; font-size: 17px; font-weight: 600; display: flex; align-items: center; gap: 8px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2); }
.d-checkin .d-ico { font-size: 20px; }
.d-recenter { position: absolute; z-index: 5; right: 16px; bottom: 16px; width: 48px; height: 48px; border-radius: 50%; background: var(--surface); color: var(--brand); display: grid; place-items: center; font-size: 20px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18); }
.d-sheet { position: absolute; z-index: 6; left: 12px; right: 12px; bottom: 12px; background: var(--surface); border-radius: 22px; padding: 14px 8px 14px 18px; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2); animation: d-up 0.3s cubic-bezier(0.2, 1, 0.3, 1); }
.d-sheet-top { display: flex; align-items: flex-start; }
.d-sheet h4 { flex: 1; margin: 4px 0 0; font-size: 22px; font-weight: 700; }
.d-x { width: 44px; height: 44px; display: grid; place-items: center; color: var(--grey3); font-size: 28px; flex: none; }
.d-sheet p { margin: 6px 10px 0 0; font-size: 17px; line-height: 1.35; }
.d-sheet .d-meta { margin: 0; font-size: 15px; color: var(--secondary); }
.d-sheet .d-go { width: calc(100% - 10px); margin-top: 12px; height: 48px; font-size: 17px; flex: none; }
.d-two { display: flex; gap: 8px; margin: 8px 10px 0 0; }
.d-tinted { flex: 1; height: 44px; border-radius: 22px; background: var(--clay-tint); color: var(--clay); font-weight: 600; font-size: 16px; display: flex; align-items: center; justify-content: center; gap: 6px; }
.d-tinted.done { opacity: 0.55; }
.d-tinted .d-ico { font-size: 18px; }
.d-tinted.on .d-ico { fill: currentColor; }

/* Check-in picker */
.d-modal { position: absolute; z-index: 35; inset: 0; background: rgba(0, 0, 0, 0.35); display: flex; align-items: flex-end; animation: d-fade 0.2s; }
.d-modal-card { width: 100%; background: var(--ground); border-radius: 14px 14px 0 0; padding: 10px 16px 40px; animation: d-up 0.3s cubic-bezier(0.2, 1, 0.3, 1); }
.d-grab { width: 36px; height: 5px; border-radius: 3px; background: var(--grey3); margin: 0 auto 12px; }
.d-modal-card h4 { margin: 0 0 4px; font-size: 20px; font-weight: 700; text-align: center; }
.d-modal-card .d-foot { text-align: center; margin-bottom: 12px; }
.d-modal-card .d-list { margin: 0 0 12px; }
.d-cancel { width: 100%; height: 50px; border-radius: 14px; background: var(--surface); color: var(--brand); font-weight: 600; }

/* ---------- Ask ---------- */
.d-nav { position: absolute; z-index: 5; top: 0; left: 0; right: 0; height: 98px; padding-top: 54px; display: flex; flex-direction: column; align-items: center; justify-content: center; background: color-mix(in srgb, var(--ground) 88%, transparent); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); box-shadow: 0 0.5px 0 var(--sep); }
.d-nav b { font-size: 17px; font-weight: 600; }
.d-nav small { font-size: 13px; color: var(--secondary); }
.d-nav .d-more { position: absolute; right: 12px; bottom: 7px; width: 32px; height: 32px; display: grid; place-items: center; color: var(--brand); font-size: 24px; }
.d-msgs { position: absolute; inset: 98px 0 128px 0; overflow-y: auto; padding: 12px 16px 16px; scrollbar-width: none; }
.d-msgs::-webkit-scrollbar { display: none; }
.d-empty { min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 0 18px; }
.d-empty img { width: 100px; }
.d-empty h4 { margin: 12px 0 8px; font-size: 22px; font-weight: 700; }
.d-empty p { margin: 0; color: var(--secondary); font-size: 17px; line-height: 1.35; }
.d-empty small { display: block; margin-top: 16px; color: var(--tertiary); font-size: 13px; }
.d-user { display: flex; justify-content: flex-end; padding: 14px 0 6px 48px; animation: d-up 0.25s ease-out; }
.d-user span { background: var(--fill); border-radius: 20px; padding: 9px 14px; font-size: 17px; }
.d-reply { padding: 6px 0; font-size: 17px; line-height: 1.38; }
.d-thinking { display: flex; align-items: center; gap: 10px; padding: 10px 0; color: var(--secondary); font-size: 15px; }
.d-cards { display: flex; gap: 10px; overflow-x: auto; margin: 12px -16px 0; padding: 0 16px 4px; scrollbar-width: none; }
.d-cards::-webkit-scrollbar { display: none; }
.d-pcard { flex: none; width: 260px; background: var(--surface2); border-radius: 18px; padding: 14px 14px 8px; animation: d-up 0.3s ease-out backwards; }
.d-pcard strong { display: block; font-size: 17px; font-weight: 600; }
.d-pcard small { display: block; font-size: 13px; color: var(--secondary); margin-top: 2px; }
.d-pcard p { margin: 6px 0 0; font-size: 15px; line-height: 1.33; }
.d-pcard-a { display: flex; justify-content: space-between; align-items: center; margin-top: 4px; }
.d-pcard-a button { height: 40px; display: flex; align-items: center; gap: 6px; font-size: 16px; }
.d-pcard-a button:first-child { color: var(--clay); font-weight: 600; }
.d-pcard-a button:last-child { color: var(--secondary); }
.d-askbar { position: absolute; z-index: 5; left: 0; right: 0; bottom: 0; background: color-mix(in srgb, var(--ground) 88%, transparent); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); box-shadow: 0 -0.5px 0 var(--sep); }
.d-quick { display: flex; gap: 8px; overflow-x: auto; padding: 10px 16px 6px; scrollbar-width: none; }
.d-quick::-webkit-scrollbar { display: none; }
.d-quick button { flex: none; height: 44px; padding: 0 16px; border-radius: 22px; background: var(--fill); font-size: 15px; }
.d-quick button.hero { background: var(--clay); color: #fff; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.d-quick button:disabled { opacity: 0.5; }
.d-compose { display: flex; align-items: center; gap: 4px; padding: 4px 8px 10px 16px; }
.d-compose input { flex: 1; min-width: 0; height: 40px; border: 0; border-radius: 20px; background: var(--fill); color: var(--label); padding: 0 14px; font-size: 17px; outline: none; }
.d-compose input::placeholder { color: var(--tertiary); }
.d-send { width: 44px; height: 44px; display: grid; place-items: center; font-size: 34px; color: var(--grey3); }
.d-send.can { color: var(--clay); }

/* ---------- Journal ---------- */
.d-jmap { position: absolute; left: 0; right: 0; top: 0; height: 330px; overflow: hidden; }
.d-jmap > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.d-jtop { position: absolute; z-index: 5; top: 62px; left: 12px; right: 12px; display: flex; gap: 8px; }
.d-jtop .d-fchip { height: 40px; padding: 0 16px; border-radius: 20px; background: var(--surface); font-size: 15px; font-weight: 600; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); }
.d-jtop .d-fchip.on { background: var(--brand-fill); color: #fff; }
.d-jtop .d-more { margin-left: auto; width: 40px; height: 40px; border-radius: 50%; background: var(--surface); color: var(--brand); display: grid; place-items: center; font-size: 22px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); }
.d-npin { position: absolute; z-index: 3; width: 30px; height: 30px; margin: -15px 0 0 -15px; border-radius: 50%; background: #6E6E73; color: #fff; font-size: 14px; font-weight: 800; display: grid; place-items: center; border: 2.5px solid #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3); transition: transform 0.2s; }
.d-npin.been { background: var(--brand-fill); }
.d-npin.sel { background: var(--label); color: var(--ground); transform: scale(1.25); z-index: 4; }
.d-jsheet { position: absolute; z-index: 6; left: 0; right: 0; top: 306px; bottom: 0; background: var(--ground); border-radius: 20px 20px 0 0; box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.12); }
.d-jsheet .d-scroll { padding: 8px 16px 24px; }
.d-jsheet .d-grab { margin: 0 auto 10px; }
.d-post { background: var(--paper); border: 1px solid var(--edge); border-radius: 20px; padding: 16px 16px 12px; }
.d-post-top { display: flex; gap: 10px; }
.d-post-top > div:first-child { flex: 1; }
.d-dateline { font-size: 12px; font-weight: 800; letter-spacing: 1.2px; color: var(--brand); }
.d-post h4 { margin: 6px 0 0; font: 700 23px/1.2 Georgia, 'Times New Roman', serif; color: var(--ink); }
.d-post p { margin: 8px 0 0; font: 17px/1.45 Georgia, 'Times New Roman', serif; color: var(--ink); }
.d-daystamp { width: 54px; height: 64px; padding: 3px; border: 2px solid var(--c); border-radius: 6px; transform: rotate(4deg); flex: none; }
.d-daystamp div { height: 100%; border-radius: 3px; background: var(--c); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.d-daystamp small { font-size: 9px; font-weight: 800; letter-spacing: 1px; }
.d-daystamp b { font-size: 22px; line-height: 1; font-weight: 800; }
.d-post-foot { display: flex; align-items: center; margin-top: 10px; }
.d-post-foot .d-foot { flex: 1; }
.d-copy { height: 36px; padding: 0 12px; border-radius: 18px; background: var(--clay-tint); color: var(--clay); font-size: 13px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.d-stop { display: flex; align-items: center; gap: 10px; min-height: 64px; padding: 8px 10px 8px 8px; background: var(--surface); border-radius: 16px; border: 2px solid transparent; margin-top: 8px; width: 100%; text-align: left; }
.d-stop.sel { border-color: var(--brand); }
.d-stop .d-num { width: 32px; height: 32px; border-radius: 50%; background: #6E6E73; color: #fff; display: grid; place-items: center; font-size: 15px; font-weight: 800; flex: none; }
.d-stop.been .d-num { background: var(--brand-fill); }
.d-stop.sel .d-num { background: var(--label); color: var(--ground); }
.d-stop > div { flex: 1; min-width: 0; }
.d-stop strong { display: block; font-size: 17px; font-weight: 600; }
.d-stop small { display: block; font-size: 13px; color: var(--secondary); margin-top: 2px; }
.d-been { height: 40px; padding: 0 12px; border-radius: 20px; background: var(--brand-fill); color: #fff; font-size: 13px; font-weight: 700; flex: none; }
.d-placestamp { width: 50px; height: 50px; border-radius: 50%; padding: 2px; border: 1.5px solid var(--c); transform: rotate(-10deg); flex: none; }
.d-placestamp div { width: 100%; height: 100%; border-radius: 50%; border: 1.5px solid var(--c); color: var(--c); display: grid; place-items: center; text-align: center; font-size: 9px; font-weight: 800; letter-spacing: 0.6px; line-height: 1.1; }
.d-placestamp.new { animation: d-thunk 0.5s cubic-bezier(0.2, 1.4, 0.4, 1); }
.d-passport { margin-top: 20px; background: var(--passport); border-radius: 20px; padding: 14px 14px 12px; }
.d-pp-top { display: flex; align-items: center; gap: 12px; }
.d-ring { position: relative; width: 52px; height: 52px; flex: none; }
.d-ring svg { width: 52px; height: 52px; transform: rotate(-90deg); }
.d-ring circle { fill: none; stroke-width: 5; }
.d-ring .t { stroke: var(--fill); }
.d-ring .p { stroke: var(--brand); stroke-linecap: round; transition: stroke-dashoffset 0.6s ease-out; }
.d-ring b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 15px; }
.d-pp-top small { display: block; font-size: 12px; font-weight: 800; letter-spacing: 1.2px; color: var(--secondary); }
.d-pp-top strong { font-size: 17px; font-weight: 600; }
.d-badges { display: flex; gap: 8px; margin-top: 12px; }
.d-badges div { flex: 1; background: var(--surface); border-radius: 14px; padding: 10px; font-size: 13px; }
.d-badges .d-ico { font-size: 22px; color: var(--secondary); margin-bottom: 4px; }
.d-badges b { display: block; font-weight: 700; }
.d-badges span { color: var(--secondary); font-weight: 600; }
.d-badges .earned .d-ico, .d-badges .earned span { color: var(--green); }
.d-want { display: flex; align-items: center; gap: 10px; background: var(--surface); border-radius: 18px; padding: 12px 12px 12px 16px; margin-top: 8px; animation: d-up 0.3s ease-out; }
.d-want div { flex: 1; min-width: 0; }
.d-want strong { display: block; font-size: 15px; font-weight: 600; }
.d-want small { font-size: 13px; color: var(--secondary); }
.d-want button { height: 36px; padding: 0 14px; border-radius: 18px; background: var(--clay); color: #fff; font-size: 14px; font-weight: 600; }
.d-mem { display: flex; gap: 10px; align-items: center; background: var(--surface); border-radius: 12px; padding: 11px 12px; margin-top: 8px; font-size: 15px; }
.d-mem i { width: 8px; height: 8px; border-radius: 50%; background: var(--memory); flex: none; }

@keyframes d-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes d-up { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes d-card-in { from { transform: translateY(14px) scale(0.95); opacity: 0.4; } to { transform: none; opacity: 1; } }
@keyframes d-spin { to { transform: rotate(360deg); } }
@keyframes d-pulse { 0% { transform: scale(0.4); opacity: 1; } 100% { transform: scale(1.5); opacity: 0; } }
@keyframes d-drop { from { transform: translate(-50%, -160%); opacity: 0; } to { transform: translate(-50%, -100%); opacity: 1; } }
@keyframes d-thunk { 0% { transform: scale(2.2) rotate(-30deg); opacity: 0; } 100% { transform: rotate(-10deg); opacity: 1; } }
@keyframes d-stamp {
  0% { transform: scale(2.4) rotate(-35deg); opacity: 0; }
  25% { transform: scale(0.95) rotate(-12deg); opacity: 1; }
  32% { transform: scale(1) rotate(-12deg); }
  80% { transform: scale(1) rotate(-12deg); opacity: 1; }
  100% { transform: scale(1) rotate(-12deg); opacity: 0; }
}

/* ---------- Foldable (opened flat) ---------- */
.phone.fold { border-radius: 30px; padding: 9px; }
.phone.fold .screen { --sr: 22px; }
.phone.fold::after {
  content: ''; position: absolute; z-index: 3; top: 9px; bottom: 9px; left: 50%; width: 14px; margin-left: -7px; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.07) 40%, rgba(255, 255, 255, 0.1) 60%, transparent);
}
.hero-art.fold { width: min(500px, 92vw); }
.hero-art.fold .coco-pal { width: 26%; left: -22%; bottom: 4%; }
@media (max-width: 480px) {
  .hero-art.fold { width: 80vw; margin-left: 15vw; }
  .hero-art.fold .coco-pal { width: 24%; left: -20%; }
}
.d-app.fold .d-island { width: 13px; height: 13px; margin-left: -6.5px; top: 20px; border-radius: 50%; }
.d-app.fold .d-status { padding: 6px 30px 0; }
.d-app.fold .d-now { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.d-app.fold .d-now-b { padding-top: 84px; }
.d-app.fold .d-now-b > .d-row-head:first-child { margin-top: 0; }
.d-app.fold .d-chips { margin: 0; padding: 0; flex-wrap: wrap; }
.d-app.fold .d-msgs { padding-left: 90px; padding-right: 90px; }
.d-app.fold .d-quick, .d-app.fold .d-compose { padding-left: 90px; padding-right: 90px; }
.d-app.fold .d-cards { margin: 12px -90px 0; padding: 0 90px 4px; }
.d-app.fold .d-sheet { right: auto; width: 390px; }
.d-app.fold .d-jmap { right: 50%; height: 100%; }
.d-app.fold .d-jtop { right: calc(50% + 12px); }
.d-app.fold .d-jsheet { left: 50%; top: 0; border-radius: 0; box-shadow: -0.5px 0 0 var(--sep); }
.d-app.fold .d-jsheet .d-scroll { padding-top: 62px; }
.d-app.fold .d-jsheet .d-grab { display: none; }
.d-app.fold .d-modal { align-items: center; justify-content: center; }
.d-app.fold .d-modal-card { width: 420px; border-radius: 16px; padding-bottom: 16px; }
