/* 아하브 마음일기 */
:root {
  --bg: #FCF7F2; --surface: #FFFFFF; --sunk: #F6ECE2; --ink: #2B1A10; --muted: #79604F; --line: #EEDFD1;
  --accent: #D9692C; --accent-2: #F08A4B; --accent-ink: #FFFFFF; --accent-soft: #FCE9DC;
  --in: #1C6FD1; --out: #D6402F; --gold: #E0A92E; --ok: #0F7B5F; --bad: #C2362B; --new: #E8590C; --hl: #FFF4D1;
  --shadow: 0 1px 2px rgba(43,26,16,.04), 0 8px 24px rgba(43,26,16,.06);
  --hero: radial-gradient(120% 120% at 100% 0%, #FFD29E 0%, transparent 55%), linear-gradient(135deg, #7A3410 0%, #D9692C 60%, #F6B26B 100%);
  --hero-shadow: 0 12px 32px rgba(217,105,44,.28); --hero-ink: #8A3B12;
  --m1: #6B7BD6; --m2: #8FA3C7; --m3: #C2B280; --m4: #F2A93B; --m5: #F06A4B;
  --font-ui: "Pretendard", "IBM Plex Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif; --radius: 18px;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #17110C; --surface: #221913; --sunk: #2E231A; --ink: #F6ECE3; --muted: #C4AA96; --line: #3E2F23;
  --accent: #FFA066; --accent-2: #F08A4B; --accent-ink: #2A1205; --accent-soft: #46291A; --hl: #3D3418;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25);
} }
.daynav { display: flex; align-items: center; justify-content: space-between; margin: 14px 0 8px; }
.daynav b { font-size: 17px; }
.daynav button { border: 1px solid var(--line); background: var(--surface); width: 38px; height: 38px; border-radius: 12px; font-size: 18px; }
.daynav button:disabled { opacity: .3; }
.moods { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.moods button { border: 2px solid var(--line); background: var(--surface); border-radius: 16px; padding: 8px 0 6px; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11.5px; color: var(--muted); transition: transform .12s; }
.moods button span { font-size: 32px; line-height: 1.15; }
.moods button.on { border-color: var(--mc); background: color-mix(in srgb, var(--mc) 14%, var(--surface)); color: var(--ink); font-weight: 800; transform: translateY(-2px); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags button { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 12px; font-size: 14px; }
.tags button.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 700; }
.qbox { background: var(--sunk); border-radius: 14px; padding: 12px 14px; }
.qbox .q { font-weight: 800; margin: 0 0 8px; display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal .dh { text-align: center; font-size: 12px; color: var(--muted); font-weight: 700; padding: 4px 0; }
.cal button { min-width: 0; overflow: hidden; aspect-ratio: 1 / 1.1; border: 1px solid var(--line); background: var(--surface); border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0; font-size: 11px; color: var(--muted); gap: 1px; }
.cal button span { font-size: 21px; line-height: 1.1; }
.cal button.today { border-color: var(--accent); border-width: 2px; }
.cal button.has { background: color-mix(in srgb, var(--mc) 12%, var(--surface)); color: var(--ink); }
.cal button.out { visibility: hidden; }
.cal button:disabled { opacity: .35; }
.entry { border-top: 1px solid var(--line); padding: 12px 0; }
.entry:first-child { border-top: 0; padding-top: 0; }
.entry .eh { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); font-weight: 700; }
.entry .eh span { font-size: 22px; }
.entry .el { font-size: 16.5px; font-weight: 700; margin: 4px 0 2px; }
.entry p { margin: 4px 0 0; white-space: pre-wrap; font-size: 15px; }
.entry .et { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.entry img { width: 100%; max-height: 320px; object-fit: cover; border-radius: 12px; margin-top: 8px; display: block; }
.chart { width: 100%; height: 170px; display: block; }
.chart text { font-size: 10px; fill: var(--muted); }
.dist { display: flex; height: 26px; border-radius: 10px; overflow: hidden; margin: 6px 0; }
.dist i { display: block; height: 100%; }
.lockscr { position: fixed; inset: 0; z-index: 50; background: var(--bg); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 24px; }
.lockscr .dots { display: flex; gap: 14px; margin: 8px 0 10px; }
.lockscr .dots i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--accent); display: block; }
.lockscr .dots i.f { background: var(--accent); }
.pad { display: grid; grid-template-columns: repeat(3, 72px); gap: 12px; }
.pad button { height: 64px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); font-size: 24px; font-weight: 700; box-shadow: var(--shadow); }
.pad button.e { border: 0; background: none; box-shadow: none; font-size: 15px; color: var(--muted); }
.shake { animation: sh .35s; } @keyframes sh { 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }
.photo-prev { position: relative; margin-top: 10px; }
.photo-prev img { width: 100%; max-height: 280px; object-fit: cover; border-radius: 12px; display: block; }
.photo-prev button { position: absolute; top: 8px; right: 8px; }
.care { background: color-mix(in srgb, var(--in) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--in) 30%, transparent); border-radius: 14px; padding: 12px 14px; font-size: 14.5px; margin-bottom: 12px; }
.streakline { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.streakline span { background: rgba(255,255,255,.16); border-radius: 999px; padding: 4px 10px; font-size: 13px; font-weight: 700; }
