/* 윤슬이의 추억 — 둥글둥글 알록달록, 물방울(버블) 가득한 앨범 */
:root {
  --bg: #fffaf3;
  --paper: #ffffff;
  --ink: #4d3b4a;
  --ink-soft: #9b8996;
  --line: #f5e8ee;
  --h1: #ff8fab; --h1s: #ffe4eb; --h1d: #e4517b; /* 딸기 */
  --h2: #ffa37d; --h2s: #ffe9dd; --h2d: #e56a3f; /* 살구 */
  --h3: #ffd15c; --h3s: #fff5d1; --h3d: #b47a00; /* 레몬 */
  --h4: #7edcb2; --h4s: #e0f8ec; --h4d: #23976a; /* 민트 */
  --h5: #7ccaf3; --h5s: #e0f2fd; --h5d: #2384bd; /* 하늘 */
  --h6: #bba5f3; --h6s: #eee8fe; --h6d: #7555cf; /* 라일락 */
  --shadow: 0 10px 26px rgba(160, 110, 140, 0.18);
  --shadow-s: 0 4px 12px rgba(160, 110, 140, 0.16);
  --f-logo: 'Bagel Fat One', 'Jua', sans-serif;
  --f-ui: 'Jua', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  --f-hand: 'Gaegu', 'Jua', sans-serif;
  --gap: 8px;
  --tile-r: 20px;
  --dock-h: 0px;
}
.hue1 { --c: var(--h1); --cs: var(--h1s); --cd: var(--h1d); }
.hue2 { --c: var(--h2); --cs: var(--h2s); --cd: var(--h2d); }
.hue3 { --c: var(--h3); --cs: var(--h3s); --cd: var(--h3d); }
.hue4 { --c: var(--h4); --cs: var(--h4s); --cd: var(--h4d); }
.hue5 { --c: var(--h5); --cs: var(--h5s); --cd: var(--h5d); }
.hue6 { --c: var(--h6); --cs: var(--h6s); --cd: var(--h6d); }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: #f7b8cb var(--bg); }
html.lock, html.lock body { overflow: hidden; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-ui);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}
/* 바탕에 깔린 큰 물방울들 (고정된 한 장의 그림이라 스크롤에 부담이 없다) */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 5% 30%, rgba(255, 143, 171, 0.13) 0 110px, transparent 111px),
    radial-gradient(circle at 96% 22%, rgba(124, 202, 243, 0.15) 0 150px, transparent 151px),
    radial-gradient(circle at 88% 78%, rgba(255, 209, 92, 0.16) 0 120px, transparent 121px),
    radial-gradient(circle at 10% 86%, rgba(126, 220, 178, 0.15) 0 140px, transparent 141px),
    radial-gradient(circle at 48% 55%, rgba(187, 165, 243, 0.1) 0 90px, transparent 91px),
    radial-gradient(circle at 70% 48%, rgba(255, 163, 125, 0.1) 0 60px, transparent 61px);
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
svg.ic { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
svg.ic.fill { fill: currentColor; stroke: none; }

/* ── 머리: 물방울이 둥실둥실 ─────────────────────────── */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(600px 300px at 85% -10%, rgba(255, 209, 92, 0.75), transparent 70%),
    radial-gradient(520px 320px at 0% 0%, rgba(255, 143, 171, 0.5), transparent 70%),
    radial-gradient(500px 300px at 50% 120%, rgba(124, 202, 243, 0.6), transparent 70%),
    linear-gradient(180deg, #ffe9f0 0%, #fff3d6 55%, #e3f6fb 100%);
  padding: 34px 0 84px;
  border-radius: 0 0 46px 46px;
}
.bub {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--s);
  height: var(--s);
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 26%, rgba(255, 255, 255, 0.95) 0 7%, rgba(255, 255, 255, 0) 16%),
    radial-gradient(circle at 68% 76%, rgba(255, 255, 255, 0.5) 0 4%, rgba(255, 255, 255, 0) 12%),
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.05) 40%, var(--c) 100%);
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.7), 0 6px 14px rgba(160, 110, 140, 0.1);
  opacity: 0.8;
  animation: float var(--d, 7s) ease-in-out var(--w, 0s) infinite alternate;
  pointer-events: none;
}
@keyframes float { from { transform: translate3d(0, 0, 0) scale(1); } to { transform: translate3d(var(--dx, 8px), -22px, 0) scale(1.06); } }
.hero-in { position: relative; z-index: 2; display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 16px; }
.face { position: relative; display: block; width: 108px; height: 108px; flex: none; border-radius: 50%; background: #ffb3c6; box-shadow: 0 0 0 5px #fff, 0 0 0 9px rgba(255, 255, 255, 0.45), 0 14px 26px rgba(228, 81, 123, 0.3); animation: bob 5s ease-in-out infinite; }
.face img { display: block; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.face::before { content: ''; position: absolute; right: -6px; bottom: 4px; width: 22px; height: 22px; border-radius: 50%; background: radial-gradient(circle at 32% 28%, #fff 0 18%, rgba(255, 255, 255, 0) 30%), var(--h5); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.8), -30px -92px 0 -6px var(--h3); pointer-events: none; }
.logo { margin: 0; font-family: var(--f-logo); font-weight: 400; font-size: clamp(38px, 7vw, 64px); line-height: 1.08; letter-spacing: 0.01em; white-space: nowrap; }
.logo span { display: inline-block; color: var(--c); text-shadow: 3px 0 0 #fff, -3px 0 0 #fff, 0 3px 0 #fff, 0 -3px 0 #fff, 2px 2px 0 #fff, -2px 2px 0 #fff, 2px -2px 0 #fff, -2px -2px 0 #fff, 0 7px 0 rgba(77, 59, 74, 0.1); transform: rotate(var(--r, 0deg)) translateY(var(--ty, 0)); transition: transform 0.25s cubic-bezier(0.3, 1.8, 0.5, 1); }
.logo span.sp { width: 0.22em; }
.logo:hover span { transform: rotate(calc(var(--r, 0deg) * -1)) translateY(-4px); }
.tagline { margin: 10px 0 0 4px; font-family: var(--f-hand); font-weight: 700; font-size: clamp(17px, 2.6vw, 22px); color: #a56d86; }
.hero-side { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.age { display: inline-flex; align-items: baseline; gap: 8px; background: rgba(255, 255, 255, 0.88); border-radius: 999px; padding: 8px 20px 9px; font-size: 18px; color: var(--ink); transform: rotate(-2deg); box-shadow: var(--shadow-s), inset 0 0 0 3px var(--h1s); }
.age b { font-family: var(--f-logo); font-weight: 400; font-size: 28px; color: var(--h1d); line-height: 1; }
.age small { font-size: 15px; color: var(--h5d); }
.stats { display: inline-flex; gap: 6px; }
.stats span { background: rgba(255, 255, 255, 0.8); border-radius: 999px; padding: 4px 13px; font-size: 14px; color: #8a6f80; box-shadow: var(--shadow-s); }
.stats b { font-weight: 400; color: var(--h2d); }
.hero-tools { position: absolute; z-index: 3; top: 12px; right: 16px; display: flex; align-items: center; gap: 6px; }
.me { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px 0 6px; border-radius: 999px; background: rgba(255, 255, 255, 0.85); font-size: 14px; color: #8a6f80; box-shadow: var(--shadow-s); }
.me i { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-style: normal; color: #fff; background: var(--h6); font-size: 13px; }
.iconbtn { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, 0.85); color: #a56d86; font-size: 17px; box-shadow: var(--shadow-s); transition: transform 0.2s cubic-bezier(0.3, 1.8, 0.5, 1); }
.iconbtn:hover { transform: scale(1.12); }
.iconbtn.spin svg { animation: spin 1.1s linear infinite; }
.hero-water { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: 70px; z-index: 1; display: block; }
.glint { position: absolute; z-index: 1; width: var(--s, 14px); height: var(--s, 14px); background: #fff; clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%); animation: twinkle var(--d, 3.2s) ease-in-out var(--w, 0s) infinite; opacity: 0; }
.glint.gold { background: #ffcf4d; }

@keyframes twinkle { 0%, 100% { opacity: 0; transform: scale(0.3) rotate(0deg); } 45% { opacity: 1; transform: scale(1) rotate(25deg); } 60% { opacity: 0.85; transform: scale(0.85) rotate(35deg); } }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-6px) rotate(3deg); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes rise { from { opacity: 0; transform: translateY(16px) scale(0.96); } to { opacity: 1; transform: none; } }
@keyframes pop { 0% { transform: scale(0.4); } 55% { transform: scale(1.25); } 100% { transform: scale(1); } }
@keyframes fade { from { opacity: 0; } }
.hero .brand, .hero .hero-side { animation: rise 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.hero .hero-side { animation-delay: 0.12s; }

/* ── 고르는 막대 ─────────────────────────── */
.bar { position: sticky; top: 0; z-index: 30; }
.bar::before { content: ''; position: absolute; inset: 0; z-index: -1; background: rgba(255, 250, 243, 0.88); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.bar-in { display: flex; align-items: center; gap: 12px; padding-top: 12px; padding-bottom: 10px; }
.seg { display: inline-flex; background: var(--paper); border-radius: 999px; padding: 5px; box-shadow: var(--shadow-s); flex: none; }
.seg button { font-size: 16px; padding: 5px 17px 6px; border-radius: 999px; color: var(--ink-soft); transition: color 0.15s, background 0.2s, transform 0.2s cubic-bezier(0.3, 1.8, 0.5, 1); white-space: nowrap; }
.seg button:hover { transform: scale(1.06); }
.seg button[aria-pressed='true'] { background: linear-gradient(180deg, #ffa5bb, var(--h1)); color: #fff; box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.45), 0 4px 10px rgba(228, 81, 123, 0.35); }
.seg button[data-mode='month'][aria-pressed='true'] { background: linear-gradient(180deg, #96d6f6, var(--h5)); box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.45), 0 4px 10px rgba(35, 132, 189, 0.32); }
.seg button[data-mode='year'][aria-pressed='true'] { background: linear-gradient(180deg, #cdbcf7, var(--h6)); box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.45), 0 4px 10px rgba(117, 85, 207, 0.32); }
.pills { display: flex; gap: 8px; margin-left: auto; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px 7px 11px; border-radius: 999px; background: var(--paper); box-shadow: var(--shadow-s); color: var(--ink-soft); font-size: 14.5px; white-space: nowrap; transition: transform 0.2s cubic-bezier(0.3, 1.8, 0.5, 1), background 0.2s, color 0.2s; }
.pill svg { color: var(--cd); }
.pill i { font-style: normal; font-size: 12.5px; opacity: 0.75; }
.pill em { font-style: normal; }
.pill:hover { transform: translateY(-2px) scale(1.04); }
.pill[aria-pressed='true'] { background: var(--cs); box-shadow: inset 0 0 0 2.5px var(--c), 0 4px 10px rgba(160, 110, 140, 0.14); color: var(--cd); }
.bar-tools { display: flex; gap: 8px; flex: none; }
.toolbtn { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px; border-radius: 999px; background: var(--paper); box-shadow: var(--shadow-s); color: #a56d86; font-size: 14.5px; white-space: nowrap; transition: transform 0.2s cubic-bezier(0.3, 1.8, 0.5, 1); }
.toolbtn:hover { transform: translateY(-2px) scale(1.04); }
.toolbtn svg { color: var(--h4d); }
.scope { display: flex; align-items: center; gap: 8px; padding-bottom: 10px; }
.scope .where { font-family: var(--f-logo); font-size: 24px; padding: 0 6px; color: var(--h2d); white-space: nowrap; }
.scope .nav { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--paper); box-shadow: var(--shadow-s); color: #a56d86; flex: none; }
.scope .nav:disabled { opacity: 0.35; cursor: default; }
.scope .crumb { font-size: 13.5px; color: var(--ink-soft); padding: 6px 13px; border-radius: 999px; background: var(--paper); box-shadow: var(--shadow-s); white-space: nowrap; }
.scope .crumb:hover { color: var(--h1d); }
.scope .sp { flex: 1; }
.scope .agechip { font-family: var(--f-hand); font-weight: 700; font-size: 17px; color: var(--h5d); background: var(--h5s); border-radius: 999px; padding: 2px 13px 3px; white-space: nowrap; }
.scope .agechip.star { background: linear-gradient(180deg, #ffe08a, var(--h3)); color: #7a5200; }

/* ── 날짜별: 사진 타일 ─────────────────────────── */
main { padding-top: 10px; padding-bottom: calc(70px + var(--dock-h)); min-height: 60vh; }
#timeline { position: relative; contain: layout style; }
.dayhead { position: absolute; left: 0; right: 0; height: 62px; display: flex; align-items: center; gap: 9px; padding-top: 14px; white-space: nowrap; }
.dayhead .date { font-size: 19px; line-height: 1; color: var(--cd); background: var(--cs); border-radius: 999px; padding: 8px 16px 9px; cursor: pointer; box-shadow: inset 0 0 0 2px #fff, 0 3px 8px rgba(160, 110, 140, 0.12); transition: transform 0.2s cubic-bezier(0.3, 1.8, 0.5, 1); }
.dayhead .date:hover { transform: scale(1.06) rotate(-1.5deg); }
.dayhead .dow { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 13.5px; color: #fff; background: var(--c); flex: none; }
.dayhead .lead { flex: 1; min-width: 8px; height: 6px; background: radial-gradient(circle, #f3dbe5 0 2.2px, transparent 2.6px) left center / 14px 6px repeat-x; }
.dayhead .agechip { font-family: var(--f-hand); font-weight: 700; font-size: 17px; color: var(--h5d); background: var(--h5s); border-radius: 999px; padding: 2px 13px 3px; }
.dayhead .agechip.star { background: linear-gradient(180deg, #ffe08a, var(--h3)); color: #7a5200; box-shadow: 0 3px 0 #eeb93a; }
.dayhead .cnt { font-size: 12.5px; color: var(--ink-soft); }
.row { position: absolute; left: 0; right: 0; display: grid; gap: var(--gap); }
.tile { position: relative; display: block; border-radius: var(--tile-r); overflow: hidden; background: var(--cs, #ffe9dd); transform: translateZ(0); transition: transform 0.22s cubic-bezier(0.3, 1.6, 0.5, 1), box-shadow 0.2s; }
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.28s; -webkit-user-drag: none; user-select: none; }
.tile img.ok { opacity: 1; }
.tile img.now { transition: none; }
.tile .dur { position: absolute; left: 7px; top: 7px; display: inline-flex; align-items: center; gap: 3px; padding: 2px 9px 2px 7px; border-radius: 999px; background: rgba(77, 59, 74, 0.62); color: #fff; font-size: 12px; line-height: 1.5; }
.tile .dur svg { width: 9px; height: 9px; fill: #fff; }
.tile .hrt { position: absolute; right: 7px; top: 7px; width: 24px; height: 24px; display: none; filter: drop-shadow(0 1px 2px rgba(120, 30, 60, 0.45)); }
.tile.fav .hrt { display: block; }
.tile .hrt svg { width: 100%; height: 100%; fill: #ff6f96; stroke: #fff; stroke-width: 2; }
.tile .memo { position: absolute; left: 5px; right: 5px; bottom: 5px; display: flex; align-items: center; gap: 4px; padding: 2px 9px 2px 3px; border-radius: 999px; background: rgba(255, 255, 255, 0.93); color: var(--ink); font-family: var(--f-hand); font-weight: 700; font-size: 14.5px; line-height: 1.35; text-align: left; box-shadow: 0 2px 6px rgba(77, 59, 74, 0.2); }
.tile .memo .fl { width: 20px; height: 20px; flex: none; }
.tile .memo span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.tile.fresh::after { content: ''; position: absolute; left: 50%; top: 50%; width: 26px; height: 26px; margin: -13px; background: #fff; clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%); animation: twinkle 2.4s ease-in-out 3; pointer-events: none; }
.tile.broken::before { content: '🫧'; position: absolute; inset: 0; display: grid; place-items: center; font-size: 24px; opacity: 0.75; }
@media (hover: hover) {
  .tile:hover { transform: translateZ(0) scale(1.05) rotate(-1deg); box-shadow: var(--shadow); z-index: 2; }
}
.tile:focus-visible, .mcard:focus-visible, .ycard:focus-visible, .ncard:focus-visible { outline: 3px solid var(--h1); outline-offset: 3px; }
svg.fl { display: inline-block; vertical-align: middle; }

/* ── 월별·연도별: 물방울 카드 ─────────────────────────── */
#cards { padding-top: 6px; }
.yhead { display: flex; align-items: center; gap: 12px; margin: 30px 2px 18px; }
.yhead:first-child { margin-top: 14px; }
.yhead h2 { margin: 0; font-family: var(--f-logo); font-weight: 400; font-size: 30px; color: #fff; background: linear-gradient(180deg, var(--c), var(--cd)); border-radius: 999px; padding: 3px 22px 5px; box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.35), var(--shadow-s); cursor: pointer; }
.yhead span { font-family: var(--f-hand); font-weight: 700; font-size: 19px; color: #a56d86; }
.yhead::after { content: ''; flex: 1; height: 6px; background: radial-gradient(circle, #f3dbe5 0 2.2px, transparent 2.6px) left center / 14px 6px repeat-x; }
.mgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 26px 22px; }
.mcard, .ycard, .ncard { position: relative; display: block; text-align: left; background: var(--paper); border-radius: 30px; padding: 10px 10px 14px; box-shadow: var(--shadow), inset 0 0 0 3px var(--cs); transition: transform 0.25s cubic-bezier(0.3, 1.7, 0.5, 1), box-shadow 0.2s; animation: rise 0.5s both; animation-delay: calc(var(--i, 0) * 35ms); }
.mcard:hover, .ycard:hover, .ncard:hover { transform: translateY(-7px) scale(1.025) rotate(-0.6deg); box-shadow: 0 18px 36px rgba(160, 110, 140, 0.26), inset 0 0 0 3px var(--c); z-index: 2; }
.mbub { position: absolute; z-index: 2; left: -8px; top: -12px; min-width: 62px; height: 62px; padding: 0 10px; border-radius: 999px; display: grid; place-items: center; font-family: var(--f-logo); font-size: 23px; color: #fff; background: radial-gradient(circle at 30% 24%, rgba(255, 255, 255, 0.7) 0 9%, rgba(255, 255, 255, 0) 22%), linear-gradient(180deg, var(--c), var(--cd)); box-shadow: 0 6px 14px rgba(160, 110, 140, 0.3), inset 0 0 0 3px rgba(255, 255, 255, 0.55); transform: rotate(-8deg); }
.cover { display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; gap: 5px; aspect-ratio: 4 / 3; border-radius: 22px; overflow: hidden; background: var(--cs); }
.cover span { position: relative; background: var(--cs, #ffe9dd); overflow: hidden; }
.cover span:first-child { grid-row: 1 / 3; }
.cover.one { grid-template-columns: 1fr; }
.cover.two { grid-template-rows: 1fr; grid-template-columns: 1fr 1fr; }
.cover.two span:first-child { grid-row: auto; }
.cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.3s; }
.cover img.ok { opacity: 1; }
.mcap { display: flex; align-items: center; gap: 6px; padding: 11px 6px 0; flex-wrap: wrap; }
.mcap em { font-style: normal; font-family: var(--f-hand); font-weight: 700; font-size: 17px; color: var(--cd); background: var(--cs); border-radius: 999px; padding: 1px 12px 2px; }
.mcap small { font-size: 13px; color: var(--ink-soft); margin-left: auto; }
.ygrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 34px 28px; padding-top: 22px; }
.ycard { border-radius: 36px; padding: 12px 12px 16px; animation-delay: calc(var(--i, 0) * 60ms); }
.ycard .cover { aspect-ratio: 3 / 2; grid-template-columns: 2fr 1fr 1fr; border-radius: 26px; }
.ycard .cover.one { grid-template-columns: 1fr; }
.ycard .cover.two { grid-template-columns: 1fr 1fr; }
.ycard .cover.three { grid-template-columns: 2fr 1fr; }
.ycard .mbub { min-width: 0; height: 54px; padding: 0 22px; font-size: 28px; left: -6px; top: -16px; }

/* ── 메모 모아보기 ─────────────────────────── */
.ngrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 24px 20px; padding-top: 14px; align-items: start; }
.ncard { padding: 10px 10px 12px; cursor: pointer; }
.ncard .shot { position: relative; aspect-ratio: 4 / 3; border-radius: 22px; overflow: hidden; background: var(--cs); }
.ncard .shot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.3s; }
.ncard .shot img.ok { opacity: 1; }
.ncard .shot .dur { position: absolute; left: 8px; top: 8px; display: inline-flex; align-items: center; gap: 3px; padding: 2px 9px 2px 7px; border-radius: 999px; background: rgba(77, 59, 74, 0.62); color: #fff; font-size: 12px; }
.ncard .shot .dur svg { width: 9px; height: 9px; fill: #fff; }
.ncard .when { display: flex; align-items: center; gap: 6px; padding: 9px 6px 2px; font-size: 13.5px; color: var(--cd); }
.ncard .when em { font-style: normal; font-family: var(--f-hand); font-weight: 700; font-size: 15.5px; color: var(--h5d); margin-left: auto; }
.notes { list-style: none; margin: 0; padding: 0; }
.note { display: flex; align-items: flex-start; gap: 7px; padding: 6px 4px 0; }
.note .fl { width: 28px; height: 28px; flex: none; margin-top: 1px; animation: pop 0.4s both; }
.note p { margin: 0; min-width: 0; flex: 1; font-family: var(--f-hand); font-weight: 700; font-size: 18px; line-height: 1.3; color: var(--ink); word-break: break-word; }
.note p small { display: block; font-family: var(--f-ui); font-weight: 400; font-size: 11.5px; color: var(--ink-soft); margin-top: 1px; }
.note .x { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; color: var(--ink-soft); font-size: 13px; flex: none; }
.note .x:hover { background: var(--h1s); color: var(--h1d); }

.empty { text-align: center; padding: 70px 20px 40px; font-family: var(--f-hand); font-weight: 700; font-size: 23px; color: #a56d86; }
.empty .face { margin: 0 auto 14px; width: 96px; height: 96px; }
.empty .big { font-size: 50px; display: block; margin-bottom: 6px; animation: bob 4s ease-in-out infinite; }
.empty small { display: block; font-family: var(--f-ui); font-weight: 400; font-size: 14px; color: var(--ink-soft); margin-top: 6px; }

/* 스크롤할 때 지금 어느 달인지 알려 주는 말풍선 */
.bubble { position: fixed; z-index: 25; right: 14px; top: 50%; transform: translateY(-50%) scale(0.8); opacity: 0; pointer-events: none; font-family: var(--f-logo); font-size: 18px; background: linear-gradient(180deg, #ffa5bb, var(--h1)); color: #fff; border-radius: 999px; padding: 6px 18px 8px; box-shadow: 0 8px 18px rgba(228, 81, 123, 0.35), inset 0 2px 0 rgba(255, 255, 255, 0.45); transition: opacity 0.2s, transform 0.25s cubic-bezier(0.3, 1.8, 0.5, 1); }
.bubble.on { opacity: 1; transform: translateY(-50%) scale(1); }

.toast { position: fixed; z-index: 160; left: 50%; bottom: calc(24px + var(--dock-h)); transform: translate(-50%, 30px) scale(0.9); opacity: 0; pointer-events: none; background: var(--ink); color: #fffaf3; font-size: 15.5px; border-radius: 999px; padding: 10px 22px; box-shadow: 0 10px 24px rgba(77, 59, 74, 0.3); transition: transform 0.35s cubic-bezier(0.3, 1.7, 0.5, 1), opacity 0.3s; white-space: nowrap; }
.toast.on { opacity: 1; transform: translate(-50%, 0) scale(1); }

/* ── 달력 ─────────────────────────── */
.sheet-bg { position: fixed; inset: 0; z-index: 70; background: rgba(77, 59, 74, 0.4); display: grid; place-items: center; padding: 16px; animation: fade 0.18s both; }
.cal { width: min(400px, 100%); background: var(--paper); border-radius: 38px; padding: 20px 20px 22px; box-shadow: 0 24px 60px rgba(77, 59, 74, 0.3), inset 0 0 0 4px var(--h5s); animation: rise 0.3s cubic-bezier(0.3, 1.5, 0.5, 1) both; }
.cal-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.cal-head .ttl { flex: 1; text-align: center; font-family: var(--f-logo); font-size: 24px; color: var(--h5d); }
.cal-head button { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--h5s); color: var(--h5d); transition: transform 0.2s cubic-bezier(0.3, 1.8, 0.5, 1); }
.cal-head button:hover { transform: scale(1.12); }
.cal-head button:disabled { opacity: 0.35; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-grid .wd { text-align: center; font-size: 12.5px; color: var(--ink-soft); padding: 4px 0; }
.cal-grid .wd:first-child { color: var(--h1d); }
.cal-grid .wd:last-child { color: var(--h5d); }
.cday { position: relative; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; font-size: 15px; color: #d3c3cd; overflow: hidden; }
.cday.has { color: #fff; background: var(--c, var(--h2)); cursor: pointer; box-shadow: var(--shadow-s), inset 0 0 0 2px #fff; transition: transform 0.2s cubic-bezier(0.3, 1.8, 0.5, 1); }
.cday.has:hover { transform: scale(1.16); z-index: 1; }
.cday.has img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.3s; border-radius: 50%; }
.cday.has img.ok { opacity: 1; }
.cday.has span { position: relative; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7), 0 0 8px rgba(0, 0, 0, 0.4); }
.cday.today { outline: 3px solid var(--h1); outline-offset: 1px; }
.cday.sel { outline: 3px solid var(--h5d); outline-offset: 1px; }
.cal-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; font-size: 13px; color: var(--ink-soft); }
.cal-foot button { font-size: 14.5px; color: #fff; background: linear-gradient(180deg, #ffa5bb, var(--h1)); border-radius: 999px; padding: 6px 16px 7px; box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.45), 0 4px 10px rgba(228, 81, 123, 0.3); }

/* ── 크게 보기 ─────────────────────────── */
.viewer { position: fixed; inset: 0; z-index: 100; background: rgb(40, 28, 38); color: #fffaf3; touch-action: none; user-select: none; -webkit-user-select: none; animation: fade 0.18s both; }
.v-stage { position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden; }
.v-media { position: relative; display: grid; place-items: center; will-change: transform; }
.v-media.anim { transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.22s; }
.v-media { overflow: hidden; }
.v-media > img, .v-media > video { position: absolute; inset: 0; display: block; width: 100%; height: 100%; -webkit-user-drag: none; }
.v-media .lo { object-fit: cover; filter: blur(14px); transform: scale(1.06); }
.v-media .hi { object-fit: contain; opacity: 0; transition: opacity 0.25s; }
.v-media .hi.ok { opacity: 1; }
.v-media video { background: transparent; outline: none; }
.v-top { position: absolute; left: 0; right: 0; top: 0; z-index: 3; display: flex; align-items: center; gap: 8px; padding: calc(10px + env(safe-area-inset-top)) 12px 30px; background: linear-gradient(180deg, rgba(40, 28, 38, 0.8), transparent); transition: opacity 0.2s; }
.viewer.bare .v-top, .viewer.bare .v-arrow, .viewer.bare .v-count, .viewer.bare .v-peek { opacity: 0; pointer-events: none; }
.v-btn { position: relative; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-size: 20px; color: #fffaf3; background: rgba(255, 250, 243, 0.14); transition: background 0.15s, transform 0.2s cubic-bezier(0.3, 1.8, 0.5, 1); flex: none; }
.v-btn:hover { background: rgba(255, 250, 243, 0.26); transform: scale(1.1); }
.v-btn.fav.on { color: #ff7da0; }
.v-btn.fav.on svg { fill: #ff7da0; animation: pop 0.35s; }
.v-btn .n { position: absolute; right: -2px; top: -2px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 999px; background: var(--h3); color: #6b4700; font-size: 11.5px; line-height: 18px; text-align: center; }
.v-info { flex: 1; min-width: 0; padding-left: 4px; }
.v-info .d { font-size: 17px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v-info .a { font-family: var(--f-hand); font-weight: 700; font-size: 15.5px; color: #ffc6d5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v-arrow { position: absolute; z-index: 3; top: 50%; margin-top: -27px; width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; font-size: 24px; color: #fffaf3; background: rgba(255, 250, 243, 0.14); transition: background 0.15s, opacity 0.2s, transform 0.2s cubic-bezier(0.3, 1.8, 0.5, 1); }
.v-arrow:hover { background: rgba(255, 250, 243, 0.28); transform: scale(1.1); }
.v-arrow.prev { left: 14px; }
.v-arrow.next { right: 14px; }
.v-arrow:disabled { opacity: 0.2; }
.v-count { position: absolute; z-index: 3; left: 50%; bottom: calc(12px + env(safe-area-inset-bottom)); transform: translateX(-50%); font-size: 13px; color: #ffc6d5; background: rgba(40, 28, 38, 0.55); border-radius: 999px; padding: 2px 13px; pointer-events: none; transition: opacity 0.2s; }
.viewer.isvideo .v-count { bottom: auto; top: calc(66px + env(safe-area-inset-top)); }
/* 사진 아래에 살짝 보이는 메모 한 줄 */
.v-peek { position: absolute; z-index: 3; left: 50%; bottom: calc(44px + env(safe-area-inset-bottom)); transform: translateX(-50%); max-width: min(92vw, 520px); display: flex; align-items: center; gap: 7px; background: rgba(255, 255, 255, 0.95); color: var(--ink); border-radius: 999px; padding: 5px 16px 5px 6px; font-family: var(--f-hand); font-weight: 700; font-size: 18px; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3); transition: opacity 0.2s, transform 0.2s cubic-bezier(0.3, 1.8, 0.5, 1); }
.v-peek:hover { transform: translateX(-50%) scale(1.04); }
.v-peek .fl { width: 28px; height: 28px; flex: none; }
.v-peek span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.v-peek b { font-family: var(--f-ui); font-weight: 400; font-size: 12px; color: var(--h6d); background: var(--h6s); border-radius: 999px; padding: 1px 8px; flex: none; }
.viewer.isvideo .v-peek { bottom: auto; top: calc(96px + env(safe-area-inset-top)); }
/* 메모 쓰는 창 */
.v-notes { position: absolute; z-index: 6; left: 50%; bottom: 0; transform: translateX(-50%); width: min(560px, 100%); max-height: 70dvh; display: flex; flex-direction: column; background: var(--paper); color: var(--ink); border-radius: 34px 34px 0 0; padding: 14px 16px calc(14px + env(safe-area-inset-bottom)); box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.35); animation: sheet 0.3s cubic-bezier(0.3, 1.3, 0.5, 1) both; touch-action: pan-y; user-select: text; -webkit-user-select: text; }
@keyframes sheet { from { transform: translate(-50%, 100%); } }
.v-notes h3 { margin: 0 0 4px; display: flex; align-items: center; gap: 8px; font-family: var(--f-logo); font-weight: 400; font-size: 21px; color: var(--h6d); }
.v-notes h3 button { margin-left: auto; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--h6s); color: var(--h6d); font-size: 15px; }
.v-notes .notes { overflow-y: auto; padding-bottom: 8px; min-height: 30px; }
.v-notes .none { font-family: var(--f-hand); font-weight: 700; font-size: 18px; color: var(--ink-soft); padding: 10px 6px 12px; }
.v-notes form { display: flex; gap: 8px; align-items: center; padding-top: 6px; }
.v-notes input { flex: 1; min-width: 0; height: 46px; border: 0; outline: 0; border-radius: 999px; background: var(--h6s); padding: 0 18px; font-family: var(--f-hand); font-weight: 700; font-size: 19px; }
.v-notes input:focus { box-shadow: inset 0 0 0 2.5px var(--h6); }
.v-notes form button { height: 46px; padding: 0 20px; border-radius: 999px; color: #fff; background: linear-gradient(180deg, #cdbcf7, var(--h6)); box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.45), 0 4px 10px rgba(117, 85, 207, 0.3); font-size: 15.5px; flex: none; }
.v-notes form button:disabled { opacity: 0.5; }
.v-wait { position: absolute; z-index: 2; left: 50%; top: 50%; width: 76px; height: 76px; margin: -38px 0 0 -38px; pointer-events: none; display: none; }
.v-wait.on { display: block; }
.v-wait svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.v-wait circle { fill: none; stroke-width: 6; }
.v-wait .bg { stroke: rgba(255, 250, 243, 0.25); }
.v-wait .fg { stroke: var(--h3); stroke-linecap: round; stroke-dasharray: 201; stroke-dashoffset: 201; transition: stroke-dashoffset 0.15s linear; }
.v-wait.spin svg { animation: spin 0.9s linear infinite; }
.v-wait.spin .fg { stroke-dashoffset: 150; }
.v-play { position: absolute; z-index: 2; left: 50%; top: 50%; width: 88px; height: 88px; margin: -44px 0 0 -44px; border-radius: 50%; background: linear-gradient(180deg, #ffa5bb, var(--h1)); color: #fff; display: grid; place-items: center; box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35), inset 0 3px 0 rgba(255, 255, 255, 0.45); }
.v-play svg { width: 34px; height: 34px; fill: #fff; margin-left: 5px; }
.v-msg { position: absolute; z-index: 4; left: 50%; bottom: 100px; transform: translateX(-50%); width: max-content; max-width: min(92vw, 420px); text-align: center; background: rgba(40, 28, 38, 0.9); border-radius: 26px; padding: 14px 20px; font-size: 14px; box-shadow: inset 0 0 0 2px rgba(255, 198, 213, 0.5); }
.v-msg a { color: var(--h3); }
.burst { position: absolute; z-index: 5; left: 50%; top: 50%; width: 120px; height: 120px; margin: -60px 0 0 -60px; pointer-events: none; animation: burst 0.75s cubic-bezier(0.2, 0.9, 0.3, 1) both; }
.burst svg { width: 100%; height: 100%; fill: #ff7da0; stroke: #fff; stroke-width: 1.2; }
@keyframes burst { 0% { transform: scale(0.2); opacity: 0; } 30% { transform: scale(1.15); opacity: 1; } 60% { transform: scale(0.95); opacity: 1; } 100% { transform: scale(1.3) translateY(-30px); opacity: 0; } }

/* ── 로그인 ─────────────────────────── */
.login { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px; position: relative; overflow: hidden; background: radial-gradient(700px 400px at 90% -10%, rgba(255, 209, 92, 0.7), transparent 70%), radial-gradient(600px 420px at 0% 0%, rgba(255, 143, 171, 0.5), transparent 70%), radial-gradient(700px 420px at 50% 115%, rgba(124, 202, 243, 0.65), transparent 70%), linear-gradient(180deg, #ffe9f0, #fff3d6 55%, #e3f6fb); }
.login-card { position: relative; z-index: 2; width: min(400px, 100%); background: rgba(255, 255, 255, 0.92); border-radius: 44px; padding: 34px 30px 30px; text-align: center; box-shadow: 0 24px 60px rgba(160, 110, 140, 0.28), inset 0 0 0 4px #fff; animation: rise 0.6s cubic-bezier(0.3, 1.4, 0.5, 1) both; }
.login-card .face { margin: 0 auto 14px; width: 132px; height: 132px; }
.login-card .logo { font-size: 42px; }
.login-card p { margin: 8px 0 22px; font-family: var(--f-hand); font-weight: 700; font-size: 19px; color: #a56d86; }
.login-card label { display: block; text-align: left; font-size: 13.5px; color: var(--ink-soft); margin: 0 0 12px; }
.login-card input { display: block; width: 100%; height: 52px; margin-top: 5px; border: 0; outline: 0; border-radius: 999px; background: #fff3f6; padding: 0 22px; font-size: 17px; box-shadow: inset 0 0 0 2.5px var(--h1s); transition: box-shadow 0.15s; }
.login-card input:focus { box-shadow: inset 0 0 0 3px var(--h1); }
.login-card label:nth-of-type(2) input { background: #eff8fe; box-shadow: inset 0 0 0 2.5px var(--h5s); }
.login-card label:nth-of-type(2) input:focus { box-shadow: inset 0 0 0 3px var(--h5); }
.login-card button { width: 100%; height: 54px; margin-top: 8px; border-radius: 999px; font-size: 19px; color: #fff; background: linear-gradient(180deg, #ffa5bb, var(--h1)); box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.45), 0 8px 18px rgba(228, 81, 123, 0.35); transition: transform 0.2s cubic-bezier(0.3, 1.8, 0.5, 1); }
.login-card button:hover { transform: scale(1.03); }
.login-card button:disabled { opacity: 0.6; }
.login-card .err { min-height: 22px; margin: 12px 0 0; font-family: var(--f-ui); font-weight: 400; font-size: 14px; color: var(--h1d); }

/* ── 작은 화면 ─────────────────────────── */
@media (max-width: 900px) {
  :root { --dock-h: 70px; }
  .pills { position: fixed; z-index: 40; left: 50%; bottom: calc(10px + env(safe-area-inset-bottom)); transform: translateX(-50%); margin: 0; gap: 0; padding: 5px; background: rgba(255, 255, 255, 0.96); border-radius: 999px; box-shadow: 0 10px 28px rgba(120, 80, 110, 0.3); }
  .pill { flex-direction: column; gap: 0; padding: 6px 0 4px; width: 62px; justify-content: center; box-shadow: none; background: none; font-size: 11.5px; }
  .pill svg { width: 21px; height: 21px; }
  .pill i, .pill em { display: none; }
  .pill:hover { transform: none; }
  .pill[aria-pressed='true'] { box-shadow: none; background: var(--cs); }
  .bar-tools { margin-left: auto; }
}
@media (max-width: 560px) {
  :root { --gap: 5px; --tile-r: 14px; }
  .wrap { padding: 0 12px; }
  .hero { padding: 54px 0 66px; border-radius: 0 0 34px 34px; }
  .brand { gap: 10px; }
  .face { width: 76px; height: 76px; box-shadow: 0 0 0 4px #fff, 0 10px 20px rgba(228, 81, 123, 0.28); }
  .hero-in { align-items: flex-start; flex-direction: column; gap: 14px; }
  .age { font-size: 16px; padding: 6px 16px 7px; }
  .age b { font-size: 24px; }
  .seg button { padding: 5px 13px 6px; font-size: 15px; }
  .toolbtn span { display: none; }
  .toolbtn { padding: 0; width: 38px; justify-content: center; }
  .dayhead { height: 56px; gap: 6px; }
  .dayhead .date { font-size: 16.5px; padding: 7px 13px 8px; }
  .dayhead .dow { width: 27px; height: 27px; font-size: 12.5px; }
  .dayhead .cnt { display: none; }
  .dayhead .agechip { font-size: 15px; padding: 2px 10px 3px; }
  .tile .memo { font-size: 13px; padding: 1px 7px 1px 2px; left: 3px; right: 3px; bottom: 3px; }
  .tile .memo .fl { width: 17px; height: 17px; }
  .mgrid { grid-template-columns: repeat(2, 1fr); gap: 24px 14px; }
  .mbub { min-width: 52px; height: 52px; font-size: 19px; }
  .mcap small { flex-basis: 100%; margin-left: 4px; }
  .ygrid { grid-template-columns: 1fr; }
  .ngrid { grid-template-columns: 1fr; }
  .yhead h2 { font-size: 25px; }
  .v-arrow { display: none; }
  .bubble { right: 8px; }
  .pill { width: 58px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
