/* WhyDiary — one design system: tokens first, components use only tokens. */
:root {
  /* color */
  --w-app: #3f7f95;
  --bg: #fafafa;
  --card: #fff;
  --surface: #f1f1ef;        /* inputs, secondary buttons, empty slots */
  --surface-2: #e7e7e4;      /* hover of surface */
  --ink: #111;
  --ink-2: #3a3a3a;
  --muted: #7d7d78;
  --line: #e9e9e5;
  --teal: #3f7f95;
  --teal-soft: #e6f0f2;
  --danger: #d93f3f;
  --heart: #e5383b;

  /* type */
  --font: var(--w-font);
  --fs-xs: 12px; --fs-sm: 13px; --fs-md: 15px; --fs-lg: 17px; --fs-xl: 22px; --fs-2xl: 28px;

  /* space · radius · elevation */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px;
  --r-card: 24px; --r-media: 14px; --r-sm: 10px; --r-pill: 999px;
  --shadow-sm: var(--w-sh-1);
  --shadow-md: var(--w-sh-1);
  --shadow-lg: var(--w-sh-pop);
  --ring: 0 0 0 3px rgba(63, 127, 149, .28);

  --header-h: 72px;
  --feed-w: 600px;
  --wide-w: 760px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: var(--fs-md); line-height: 1.5; min-height: 100vh; -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
:focus-visible { outline: none; box-shadow: var(--ring); }
.ico { display: inline-flex; }
.ico svg { width: 1em; height: 1em; fill: currentColor; }
.ico svg[fill="none"] { fill: none; }

/* ---------- buttons (primary / secondary / text) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  height: 40px; padding: 0 18px; border: 0; border-radius: var(--r-pill);
  background: var(--ink); color: #fff; font-size: var(--fs-sm); font-weight: 600; white-space: nowrap;
  transition: background .15s, color .15s, opacity .15s;
}
.btn:hover { background: #2b2b2b; }
.btn:disabled { opacity: .5; cursor: default; }
.btn.sm { height: 36px; padding: 0 14px; }
.btn.secondary { background: var(--surface); color: var(--ink); }
.btn.secondary:hover { background: var(--surface-2); }
.btn.text { background: none; color: var(--muted); padding: 0 8px; }
.btn.text:hover { color: var(--ink); }

.icon-btn {
  width: 40px; height: 40px; flex: none; border: 0; border-radius: 50%; padding: 0;
  background: none; color: var(--ink-2); display: grid; place-items: center; transition: background .15s, color .15s;
}
.icon-btn:hover { background: var(--surface); color: var(--ink); }
.icon-btn.primary { background: var(--ink); color: #fff; }
.icon-btn.primary:hover { background: #2b2b2b; }
.icon-btn.sm { width: 32px; height: 32px; }
.icon-btn .ico svg { width: 18px; height: 18px; }

/* chips + segmented control share one look */
.seg { display: inline-flex; gap: 2px; padding: 3px; background: var(--surface); border-radius: var(--r-pill); }
.seg button {
  height: 30px; padding: 0 14px; border: 0; border-radius: var(--r-pill); background: none;
  color: var(--muted); font-size: var(--fs-sm); font-weight: 600; transition: background .15s, color .15s;
}
.seg button:hover { color: var(--ink); }
.seg button[aria-checked="true"], .seg button[aria-pressed="true"] { background: var(--card); color: var(--ink); box-shadow: var(--shadow-sm); }

/* ---------- top bar (공통 헤더 wae.css .w-header) ---------- */
.topbar { position: sticky; top: 0; z-index: 40; background: var(--bg); border-bottom: 1px solid transparent; transition: border-color .2s; }
.topbar.scrolled { border-bottom-color: var(--line); }
.account { position: relative; display: flex; align-items: center; }
.bell-wrap { position: relative; display: flex; }
.bell.unread::after { content: ''; position: absolute; top: 7px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--heart); box-shadow: 0 0 0 2px #fff; }

/* popovers: account menu, entry menu, notifications */
.menu, .notif-panel { position: absolute; background: var(--card); border-radius: 16px; box-shadow: var(--shadow-lg); padding: 6px; z-index: 50; border: 1px solid var(--line); }
.menu { right: 0; top: calc(100% + 8px); min-width: 180px; }
.menu a, .menu button { display: block; width: 100%; text-align: left; padding: 9px 12px; border: 0; background: none; border-radius: var(--r-sm); font-size: var(--fs-sm); font-weight: 500; }
.menu a:hover, .menu button:hover { background: var(--surface); }
.menu .danger { color: var(--danger); }
.menu .who { padding: 8px 12px 10px; font-size: var(--fs-xs); color: var(--muted); border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.notif-panel { right: 0; top: calc(100% + 8px); width: min(340px, calc(100vw - 32px)); max-height: 70vh; overflow-y: auto; }
.notif-title { font-weight: 700; font-size: var(--fs-md); padding: 8px 10px 8px; }
.notif { display: flex; gap: var(--s3); align-items: center; padding: 8px 10px; border-radius: var(--r-sm); font-size: var(--fs-sm); line-height: 1.4; }
.notif:hover { background: var(--surface); }
.notif.new { background: var(--teal-soft); }
.notif small { display: block; color: var(--muted); font-size: var(--fs-xs); margin-top: 2px; }
.notif-empty { padding: 20px 10px; color: var(--muted); font-size: var(--fs-sm); text-align: center; }

/* ---------- avatars: same treatment everywhere ---------- */
.avatar {
  border-radius: 50%; object-fit: cover; flex: none; display: inline-grid; place-items: center;
  color: #fff; font-weight: 700; background: var(--surface-2); overflow: hidden; line-height: 1;
  box-shadow: 0 0 0 2px var(--card), var(--shadow-sm);
}

/* ---------- layout ---------- */
main { padding: var(--s4) var(--s4) 96px; }
.feed { max-width: var(--feed-w); margin: 0 auto; }
.feed.rest { margin-top: var(--s6); }
.feed-label { text-align: center; color: var(--muted); font-size: var(--fs-sm); font-weight: 500; margin: 0 0 var(--s4); }
.empty, .error-box { text-align: center; color: var(--muted); padding: 72px var(--s4); font-size: var(--fs-md); }
.back { display: inline-flex; align-items: center; gap: var(--s2); height: 36px; font-size: var(--fs-sm); font-weight: 600; color: var(--ink-2); margin-bottom: var(--s2); }
.back:hover { color: var(--ink); }
.back .ico svg { width: 18px; height: 18px; fill: none; }

/* ---------- entry card ---------- */
.entry { position: relative; background: var(--card); border-radius: var(--r-card); box-shadow: var(--shadow-md); padding: 44px var(--s5) var(--s4); margin: 40px 0 var(--s5); }
.e-author { position: absolute; left: 50%; top: -24px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: var(--fs-sm); font-weight: 600; white-space: nowrap; }
.e-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); margin-top: var(--s3); }
.e-headtext { min-width: 0; }
.e-day { display: flex; align-items: baseline; gap: var(--s2); font-size: var(--fs-sm); color: var(--ink-2); }
.e-day b { font-weight: 700; color: var(--ink); }
.e-date { color: var(--muted); font-size: var(--fs-xs); font-weight: 500; }
.e-title { margin: 2px 0 0; font-size: var(--fs-xl); font-weight: 700; letter-spacing: -.02em; line-height: 1.3; word-break: break-word; }
.e-title a:hover { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.e-mood .face svg { width: 30px; height: 30px; display: block; }
.face svg { display: block; }

.e-photos { display: grid; gap: var(--s2); margin-top: var(--s4); }
.e-photos.n-1 { grid-template-columns: 1fr; }
.e-photos.n-2 { grid-template-columns: repeat(2, 1fr); }
.e-photos.n-3 { grid-template-columns: repeat(3, 1fr); }
.e-photo { border: 0; padding: 0; background: var(--surface); border-radius: var(--r-media); overflow: hidden; aspect-ratio: 1; display: block; }
.e-photos.n-1 .e-photo { aspect-ratio: 4 / 3; }
.e-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.e-photo:hover img { transform: scale(1.03); }

.e-body { margin: var(--s4) 0 0; font-size: var(--fs-md); line-height: 1.65; color: var(--ink-2); white-space: pre-wrap; word-break: break-word; }

.e-body.clamp { display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.read-more { display: inline-block; margin-top: var(--s1); padding: 4px 0; border: 0; background: none; color: var(--ink); font-size: var(--fs-sm); font-weight: 600; }
.read-more:hover { text-decoration: underline; text-underline-offset: 3px; }
.stat-btn { border: 0; background: none; padding: 2px 4px; margin: -2px -4px; border-radius: 6px; color: inherit; font: inherit; display: inline-flex; align-items: center; gap: 6px; }
.stat-btn:hover { background: var(--surface); color: var(--ink); }
.people { display: flex; flex-direction: column; gap: 2px; max-height: 60vh; overflow-y: auto; margin: 0 -8px; }
.person { display: flex; align-items: center; gap: var(--s3); padding: 8px; border-radius: var(--r-sm); }
.person:hover { background: var(--surface); }
.person-name { flex: 1; min-width: 0; font-weight: 600; font-size: var(--fs-md); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person small { color: var(--muted); font-size: var(--fs-xs); }
.people-empty { color: var(--muted); font-size: var(--fs-sm); margin: var(--s2) 8px; }
.e-stats { display: flex; align-items: center; gap: var(--s4); margin-top: var(--s4); padding-top: var(--s3); border-top: 1px solid var(--line); font-size: var(--fs-sm); color: var(--muted); min-height: 44px; }
.stat, .like-btn { display: inline-flex; align-items: center; gap: 6px; }
.stat .ico svg { width: 16px; height: 16px; }
.like-btn { border: 0; background: none; padding: 0; color: var(--muted); font-size: var(--fs-sm); }
.like-btn .ico svg { width: 18px; height: 18px; fill: #cfcfca; transition: transform .15s, fill .15s; }
.like-btn:hover .ico svg { fill: #b5b5b0; }
.like-btn[aria-pressed="true"] { color: var(--ink-2); }
.like-btn[aria-pressed="true"] .ico svg { fill: var(--heart); }
.like-btn:active .ico svg { transform: scale(1.25); }
.e-more { position: relative; margin-left: auto; }
.e-more .icon-btn { color: var(--muted); }
.e-menu { min-width: 140px; }

/* comments */
.e-comments:not(:empty) { margin-top: var(--s2); }
.comment { display: flex; gap: var(--s3); padding: var(--s2) 0; }
.comment.reply { margin-left: 40px; }
.c-avatar { flex: none; padding-top: 2px; }
.comment > div { min-width: 0; flex: 1; }
.c-name { font-size: var(--fs-xs); font-weight: 600; color: var(--ink); }
.c-name small { color: var(--muted); font-weight: 400; margin-left: 6px; }
.c-text { font-size: var(--fs-sm); line-height: 1.5; color: var(--ink-2); word-break: break-word; overflow-wrap: anywhere; }
.c-actions { display: flex; gap: var(--s3); margin-top: 2px; }
.c-actions button { border: 0; background: none; padding: 0; font-size: var(--fs-xs); font-weight: 600; color: var(--muted); }
.c-actions button:hover { color: var(--ink); }
.no-comments { color: var(--muted); font-size: var(--fs-sm); margin: var(--s2) 0; }
.compose { margin-top: var(--s2); }
.compose input { width: 100%; height: 40px; border: 0; background: var(--surface); border-radius: var(--r-pill); padding: 0 var(--s4); font-size: var(--fs-sm); outline: none; }
.compose input:focus { box-shadow: var(--ring); background: var(--card); }
.replying { display: flex; justify-content: space-between; align-items: center; font-size: var(--fs-xs); color: var(--muted); padding: 0 var(--s2) 6px; }
.replying button { border: 0; background: none; color: var(--muted); }
.see-more { display: block; margin: var(--s1) 0 0; padding: 6px 0; border: 0; background: none; color: var(--muted); font-size: var(--fs-sm); font-weight: 600; }
.see-more:hover { color: var(--ink); }

/* ---------- profile ---------- */
.profile { text-align: center; padding-top: var(--s4); display: flex; flex-direction: column; align-items: center; }
.p-avatar { position: relative; display: inline-block; }
.p-avatar .avatar { box-shadow: 0 0 0 3px var(--card), var(--shadow-md); }
.profile h1 { font-size: var(--fs-2xl); font-weight: 800; letter-spacing: -.02em; line-height: 1.2; margin: var(--s4) 0 0; }
.profile .bio { font-size: var(--fs-md); line-height: 1.5; white-space: pre-line; color: var(--ink-2); margin: var(--s1) auto 0; max-width: 440px; }
.p-counts { font-size: var(--fs-sm); color: var(--muted); margin: var(--s2) 0 0; }
.p-counts b { color: var(--ink); font-weight: 600; }
.follow-btn { margin-top: var(--s4); min-width: 120px; }
.follow-btn[aria-pressed="true"] { background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.follow-btn[aria-pressed="true"]:hover { background: var(--surface); }
.tabs-row { max-width: var(--wide-w); margin: var(--s6) auto var(--s4); }
.profile-body { max-width: var(--wide-w); margin: 0 auto; }

/* tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: var(--s3); }
.tile { position: relative; aspect-ratio: 1; border-radius: 16px; overflow: hidden; background: #333; color: #fff; box-shadow: var(--shadow-md); display: block; transition: transform .2s, box-shadow .2s; }
.tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tile::after { content: ''; position: absolute; inset: 0; background: linear-gradient(rgba(0,0,0,.32), rgba(0,0,0,.12) 45%, rgba(0,0,0,.5)); }
.tile > span { position: absolute; z-index: 1; }
.tile-day { left: 12px; top: 8px; font-size: 32px; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.tile-title { left: 12px; right: 12px; top: 50%; transform: translateY(-50%); text-align: center; font-size: var(--fs-lg); font-weight: 700; line-height: 1.2; text-transform: uppercase; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; text-shadow: 0 1px 6px rgba(0,0,0,.35); }
.tile-stats { left: 12px; bottom: 10px; display: flex; gap: var(--s2); font-size: var(--fs-xs); font-weight: 500; }
.tile-stats > span { display: inline-flex; align-items: center; gap: 3px; }
.tile-stats svg { width: 12px; height: 12px; fill: #fff; }
.no-photo.mood-1 { background: linear-gradient(135deg, #b8322b, #e86b4a); }
.no-photo.mood-2 { background: linear-gradient(135deg, #c96a26, #f0a65a); }
.no-photo.mood-3 { background: linear-gradient(135deg, #a8871e, #e2c556); }
.no-photo.mood-4 { background: linear-gradient(135deg, #5f8f2a, #a4cf63); }
.no-photo.mood-5 { background: linear-gradient(135deg, #2c6e2a, #5ead57); }

/* calendar */
.cal { background: var(--card); border-radius: var(--r-card); box-shadow: var(--shadow-md); padding: var(--s4) var(--s5) var(--s5); }
.cal-head { display: flex; align-items: center; justify-content: space-between; font-weight: 700; font-size: var(--fs-lg); padding-bottom: var(--s3); }
.cal-head button { width: 36px; height: 36px; border: 0; border-radius: 50%; background: none; color: var(--ink-2); font-size: 22px; line-height: 1; }
.cal-head button:hover { background: var(--surface); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-wd { text-align: center; font-size: var(--fs-xs); font-weight: 600; color: var(--muted); padding-bottom: var(--s1); }
.cal-cell { position: relative; aspect-ratio: 1; border-radius: var(--r-sm); background: var(--surface); overflow: hidden; }
.cal-cell.blank { background: none; }
.cal-cell.today { box-shadow: inset 0 0 0 2px var(--teal); }
.cal-cell img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cal-cell.has { color: #fff; transition: transform .15s; }
.cal-cell.has::after { content: ''; position: absolute; inset: 0; background: rgba(0,0,0,.28); }
.cal-d { position: absolute; left: 7px; top: 5px; font-size: 11px; font-weight: 600; z-index: 1; color: var(--muted); }
.cal-cell.has .cal-d { color: #fff; }
.cal-n { position: absolute; inset: 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; align-content: center; gap: 2px 6px; padding: 14px 4px 4px; font-size: 18px; font-weight: 800; z-index: 1; }
.cal-n a { line-height: 1.1; border-radius: 6px; padding: 0 2px; }
.cal-n a:hover { background: rgba(255,255,255,.25); }
.cal-cell.many .cal-n { font-size: 13px; }

/* ---------- composer ---------- */
.composer { background: var(--card); border-radius: var(--r-card); box-shadow: var(--shadow-md); padding: var(--s5); }
.c-day { margin-bottom: var(--s3); font-size: var(--fs-md); }
.c-top { display: flex; gap: var(--s3); align-items: center; }
.c-title { flex: 1; min-width: 0; height: 44px; border: 0; background: var(--surface); border-radius: var(--r-pill); padding: 0 var(--s4); font-size: var(--fs-lg); font-weight: 700; outline: none; }
.c-title::placeholder { color: #a5a5a0; font-weight: 600; }
.c-title:focus, .c-body:focus { box-shadow: var(--ring); background: var(--card); }
.c-moods { display: flex; gap: 2px; }
.c-mood { width: 36px; height: 36px; border: 0; background: none; padding: 0; border-radius: 50%; display: grid; place-items: center; transition: transform .12s, background .12s; }
.c-mood svg { width: 28px; height: 28px; }
.c-mood:hover { background: var(--surface); }
.c-mood[aria-checked="true"] { transform: scale(1.12); }
.c-slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s2); margin-top: var(--s4); }
.c-slot { position: relative; aspect-ratio: 1; border-radius: var(--r-media); background: var(--surface); overflow: hidden; }
.c-slot:not(.filled) { box-shadow: inset 0 0 0 1.5px #d8d8d3; }
.c-slot.loading { opacity: .5; }
.c-add { width: 100%; height: 100%; border: 0; background: none; color: var(--muted); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; font-size: var(--fs-sm); font-weight: 600; transition: color .15s, background .15s; }
.c-add .ico svg { width: 26px; height: 26px; }
.c-add:hover { color: var(--ink); background: var(--surface-2); }
.c-slot img { width: 100%; height: 100%; object-fit: cover; cursor: pointer; }
.c-remove { position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(17,17,17,.6); color: #fff; font-size: 12px; display: grid; place-items: center; }
.c-remove:hover { background: rgba(17,17,17,.8); }
.c-body { display: block; width: 100%; min-height: 200px; margin-top: var(--s4); border: 0; background: var(--surface); border-radius: var(--r-media); padding: var(--s4); font-size: var(--fs-md); line-height: 1.65; resize: vertical; outline: none; }
.c-body::placeholder { color: #a5a5a0; }

/* ---------- modals ---------- */
.overlay { position: fixed; inset: 0; background: rgba(17,17,17,.4); display: grid; place-items: center; padding: var(--s4); z-index: 60; animation: fade .15s ease; }
.modal { background: var(--card); width: min(420px, 100%); max-height: 92vh; overflow-y: auto; border-radius: var(--r-card); padding: var(--s5); box-shadow: var(--shadow-lg); animation: pop .18s ease; }
.modal.wide { width: min(460px, 100%); }
.modal h2 { margin: 0 0 var(--s4); font-size: var(--fs-xl); font-weight: 800; letter-spacing: -.02em; }
.settings h3 { margin: var(--s5) 0 var(--s2); font-size: var(--fs-sm); font-weight: 700; color: var(--ink-2); }
.settings h2 + h3 { margin-top: 0; }
.set-row { display: flex; align-items: center; gap: var(--s4); margin-bottom: var(--s4); }
.set-actions { display: flex; align-items: center; gap: var(--s1); }
.set-hint { font-size: var(--fs-xs); color: var(--muted); margin: var(--s2) 0 0; }
.field { display: block; margin-bottom: var(--s3); }
.field > span { display: block; font-size: var(--fs-xs); font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.field input, .field textarea { width: 100%; border: 0; background: var(--surface); border-radius: var(--r-sm); padding: 10px 14px; font-size: var(--fs-md); outline: none; resize: vertical; }
.field input:focus, .field textarea:focus { box-shadow: var(--ring); background: var(--card); }
.row { display: flex; gap: var(--s2); justify-content: flex-end; margin-top: var(--s4); }
.form-error { color: var(--danger); font-size: var(--fs-sm); min-height: 18px; margin: var(--s2) 0 0; }
.composer .form-error { text-align: center; }
.hint { font-size: var(--fs-sm); color: var(--muted); margin: 0 0 var(--s4); }
.google-slot { display: flex; justify-content: center; }
.google-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 44px; border: 1px solid var(--line); background: var(--card); border-radius: var(--r-pill); font-size: var(--fs-md); font-weight: 600; color: #3c4043; transition: background .15s; }
.google-btn:hover { background: var(--surface); }
.google-btn:disabled { opacity: .6; }

/* photo viewer */
.modal.viewer-modal { width: auto; max-width: 94vw; padding: 0; background: none; box-shadow: none; overflow: visible; border-radius: 0; }
.viewer { position: relative; }
.viewer img { max-width: 94vw; max-height: 86vh; border-radius: var(--r-media); box-shadow: var(--shadow-lg); }
.viewer-nav, .viewer-close { position: absolute; border: 0; background: rgba(255,255,255,.92); width: 40px; height: 40px; border-radius: 50%; font-size: 24px; line-height: 1; display: grid; place-items: center; box-shadow: var(--shadow-md); }
.viewer-nav { top: 50%; transform: translateY(-50%); }
.viewer-nav.prev { left: 12px; }
.viewer-nav.next { right: 12px; }
.viewer-close { top: 12px; right: 12px; font-size: 14px; }
.viewer-count { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); background: rgba(17,17,17,.6); color: #fff; font-size: var(--fs-xs); padding: 3px 10px; border-radius: var(--r-pill); }
.viewer-count:empty { display: none; }

#toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 16px); background: var(--ink); color: #fff; font-size: var(--fs-sm); font-weight: 500; padding: 11px 18px; border-radius: var(--r-pill); box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none; transition: .2s; z-index: 80; max-width: 90vw; text-align: center; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(.98); } }

/* ---------- small screens ---------- */
@media (max-width: 560px) {
  :root { --header-h: 60px; }
  main { padding: var(--s2) var(--s3) 80px; }
  .entry { padding: 40px var(--s4) var(--s3); border-radius: 20px; margin-top: 36px; }
  .composer, .cal { padding: var(--s4); border-radius: 20px; }
  .e-title { font-size: 20px; }
  .e-photos, .c-slots { gap: 6px; }
  .e-photo, .c-slot { border-radius: var(--r-sm); }
  .c-top { flex-direction: column; align-items: stretch; }
  .c-moods { justify-content: center; }
  .c-add span { display: none; }
  .tiles { grid-template-columns: repeat(2, 1fr); gap: var(--s2); }
  .tile-title { font-size: var(--fs-md); }
  .cal-grid { gap: 4px; }
  .cal-n { font-size: 14px; }
  .tabs-row { margin-top: var(--s5); }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
