/* 토랭 · Apple 벤토 시안(LApple)을 옮긴 스타일. 색은 토큰으로만 쓴다. */
:root {
  --bg: #F2F2F7; --card: #FFFFFF; --fill: #E5E5EA; --sep: #E5E5EA; --pop: #FFFFFF;
  --ink: #111114; --ink2: #636366; --ink3: #6E6E73; --chev: #AEAEB2;
  --accent: #F26B1D; --accent-ink: #A84A0D; --on-accent: #1A0E05; --torin: #D1D1D6; --accent-tint: #FDE9DD;
  --danger: #C62828; --on-danger: #FFFFFF;
  --banana: #F6BF26; --on-banana: #1A0E05; --on-cal: #FFFFFF;
  --cal-blue: #2B6CB0; --cal-blue-ink: #1D5FA3; --cal-blue-tint: #E2EEFA;
  --cal-red: #C94540; --cal-red-ink: #B23A36; --cal-red-tint: #FBE5E4;
  --dday-orange: #C2510A; --dday-red: #D32F2F; --dday-orange-on-banana: #8A3B06; --dday-red-on-banana: #A31515;
  --r: 16px; --r-s: 10px;
  --tab: rgba(249,249,249,0.88); --band: rgba(246,246,248,0.82);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000; --card: #1C1C1E; --fill: #2C2C2E; --sep: #38383A; --pop: #2C2C2E;
    --ink: #F5F5F7; --ink2: #AEAEB2; --ink3: #98989D; --chev: #636366;
    --accent: #FF8A3D; --accent-ink: #FFA867; --on-accent: #1A0E05; --torin: #48484A; --accent-tint: #3E2D23;
    --danger: #FF6B6B; --on-danger: #1A0E05; --tab: rgba(28,28,30,0.88); --band: rgba(44,44,46,0.78);
    --banana: #E9B526; --on-banana: #1A0E05; --on-cal: #0B0B0C;
    --cal-blue: #5AA2EC; --cal-blue-ink: #8CC0F5; --cal-blue-tint: #15283D;
    --cal-red: #EE7470; --cal-red-ink: #F7A19E; --cal-red-tint: #3A1817;
    --dday-orange: #FF8A3D; --dday-red: #FF6B6B; --dday-orange-on-banana: #7A3200; --dday-red-on-banana: #8E1010;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body {
  font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', sans-serif;
  -webkit-font-smoothing: antialiased; font-size: 15px; line-height: 1.45;
}
a { color: var(--accent-ink); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
.num { font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 2px; }

.page { position: relative; max-width: 560px; margin: 0 auto; padding: calc(env(safe-area-inset-top, 0px) + 20px) 16px calc(env(safe-area-inset-bottom, 0px) + 110px); }
/* 홈 위쪽 계절 배경(겨울 · 까치밥): 차가운 겨울 하늘에 오른쪽 위에서 들어온 감나무 가지, 눈 얹힌 감 세 알, 가는 눈.
   위에서 물들었다 아래로 원래 배경에 스민다 */
.season { position: absolute; top: 0; left: 0; right: 0; height: 330px; pointer-events: none; overflow: hidden;
  background: linear-gradient(180deg, #D0DCE6 0%, #E1E8EE 45%, var(--bg) 100%);
  -webkit-mask-image: linear-gradient(#000 45%, transparent); mask-image: linear-gradient(#000 45%, transparent); }
.season-in { position: relative; max-width: 560px; height: 100%; margin: 0 auto; }
/* 가지는 오른쪽 위 구석에 붙인다: 화면 폭이 달라도 감이 제목 오른쪽 빈자리에 달리고 알림 종을 가리지 않는다 */
.season .branch { position: absolute; top: 0; right: 0; width: 250px; height: 112px; overflow: visible; }
.season .wood { fill: #4A413C; }
.season .snowcap { fill: #FFFFFF; }
.season .pm-shade { fill: #CB5515; }
.season .pm-body { fill: #EE7326; }
.season .pm-hi { fill: #F9A066; opacity: .9; }
.season .pm-calyx { fill: #4C4130; }
/* 감은 꼭지를 축으로 바람에 살짝 흔들린다. transform 만 움직여 GPU 가 그린다 */
.season .pm { animation: pm-sway 6.5s ease-in-out infinite alternate; }
.season .p1 { transform-origin: 162.5px 39.8px; }
.season .p2 { transform-origin: 126.5px 29px; animation-duration: 5.6s; animation-delay: -2s; }
.season .p3 { transform-origin: 56px 21px; animation-duration: 7.2s; animation-delay: -4s; }
@keyframes pm-sway { from { transform: rotate(-2.4deg); } to { transform: rotate(2.4deg); } }
/* 눈: 크기마다 떨어지는 빠르기가 다르고(먼 눈 17초, 가까운 눈 11.5초 안팎), 자리·박자는 황금비로 흩어 줄 맞춰 떨어지지 않는다.
   밝은 하늘에 흰 눈이 묻히지 않게 아주 옅은 테두리 */
.season .snow { position: absolute; inset: 0; }
.season .flake { position: absolute; top: 0; border-radius: 50%; background: #FFFFFF; box-shadow: 0 0 1.2px rgba(70, 92, 118, .32);
  will-change: transform, translate;
  animation: snow-fall calc(var(--base) * var(--k)) linear calc(var(--base) * var(--p) * -1) infinite,
             snow-sway var(--sd) ease-in-out calc(var(--base) * var(--p) * -1) infinite alternate; }
.season .s1 { width: 2.6px; height: 2.6px; opacity: .5; --base: 17s; --sw: 4px; }
.season .s2 { width: 4.6px; height: 4.6px; opacity: .75; --base: 11.5s; --sw: 7px; }
@keyframes snow-fall { from { translate: 0 -14px; } to { translate: var(--dx) 336px; } }
@keyframes snow-sway { from { transform: translateX(calc(var(--sw) * -1)); } to { transform: translateX(var(--sw)); } }
.season .flake:nth-child(1) { left: 75.5%; --k: 0.972; --p: 0.618; --sd: 3.8s; --dx: 15px; }
.season .flake:nth-child(2) { left: 51.0%; --k: 1.063; --p: 0.236; --sd: 4.4s; --dx: 22px; }
.season .flake:nth-child(3) { left: 26.5%; --k: 0.915; --p: 0.854; --sd: 5.0s; --dx: 29px; }
.season .flake:nth-child(4) { left: 2.0%; --k: 1.007; --p: 0.472; --sd: 5.6s; --dx: 14px; }
.season .flake:nth-child(5) { left: 77.4%; --k: 1.098; --p: 0.090; --sd: 3.2s; --dx: 21px; }
.season .flake:nth-child(6) { left: 52.9%; --k: 0.950; --p: 0.708; --sd: 3.8s; --dx: 28px; }
.season .flake:nth-child(7) { left: 28.4%; --k: 1.042; --p: 0.326; --sd: 4.4s; --dx: 13px; }
.season .flake:nth-child(8) { left: 3.9%; --k: 0.893; --p: 0.944; --sd: 5.0s; --dx: 20px; }
.season .flake:nth-child(9) { left: 79.4%; --k: 0.985; --p: 0.562; --sd: 5.6s; --dx: 27px; }
.season .flake:nth-child(10) { left: 54.9%; --k: 1.077; --p: 0.180; --sd: 3.2s; --dx: 12px; }
.season .flake:nth-child(11) { left: 30.4%; --k: 0.928; --p: 0.798; --sd: 3.8s; --dx: 19px; }
.season .flake:nth-child(12) { left: 5.9%; --k: 1.020; --p: 0.416; --sd: 4.4s; --dx: 26px; }
.season .flake:nth-child(13) { left: 81.3%; --k: 1.112; --p: 0.034; --sd: 5.0s; --dx: 11px; }
.season .flake:nth-child(14) { left: 56.8%; --k: 0.963; --p: 0.652; --sd: 5.6s; --dx: 18px; }
.season .flake:nth-child(15) { left: 32.3%; --k: 1.055; --p: 0.271; --sd: 3.2s; --dx: 25px; }
.season .flake:nth-child(16) { left: 7.8%; --k: 0.907; --p: 0.889; --sd: 3.8s; --dx: 10px; }
.season .flake:nth-child(17) { left: 83.3%; --k: 0.998; --p: 0.507; --sd: 4.4s; --dx: 17px; }
.season .flake:nth-child(18) { left: 58.8%; --k: 1.090; --p: 0.125; --sd: 5.0s; --dx: 24px; }
.season .flake:nth-child(19) { left: 34.3%; --k: 0.942; --p: 0.743; --sd: 5.6s; --dx: 9px; }
.season .flake:nth-child(20) { left: 9.8%; --k: 1.033; --p: 0.361; --sd: 3.2s; --dx: 16px; }
/* 「동작 줄이기」면 눈은 흩어진 자리에, 감은 그 자리에 멈춘다 */
@media (prefers-reduced-motion: reduce) { .season .flake, .season .pm { animation-play-state: paused; } }
@media (prefers-color-scheme: dark) {
  .season { background: linear-gradient(180deg, #17202A 0%, #0F151C 45%, var(--bg) 100%); }
  .season .wood { fill: #07080A; }
  .season .snowcap { fill: #C9D3DC; }
  .season .pm-shade { fill: #9A4118; }
  .season .pm-body { fill: #CD5E26; }
  .season .pm-hi { fill: #E07D45; opacity: .6; }
  .season .pm-calyx { fill: #1E1914; }
  .season .flake { box-shadow: none; }
}
.top { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; min-height: 59px; }
.top .eyebrow { font-size: 13px; font-weight: 600; color: var(--ink2); }
.top h1 { margin: 0; font-size: 30px; line-height: 38px; font-weight: 800; letter-spacing: -0.02em; white-space: nowrap;
  background: linear-gradient(100deg, var(--ink) 30%, var(--accent) 115%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.toolbar { display: flex; gap: 8px; }
.round { width: 36px; height: 36px; border-radius: 18px; border: 0; background: var(--fill); color: var(--accent-ink); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.round.solid { background: var(--accent); color: var(--on-accent); }
.back { display: inline-flex; align-items: center; gap: 2px; height: 44px; font-size: 17px; }

.section { margin-top: 24px; display: flex; flex-direction: column; gap: 8px; }
.section-h { display: flex; align-items: center; justify-content: space-between; min-height: 28px; }
/* 소제목: 연한 주황 알약 라벨, 오른쪽엔 회색 개수(.cnt). 카드 머리 안에서는 조금 작게(.title-pill) */
.section-h h2, .title-pill { display: inline-flex; align-items: center; height: 32px; margin: 0; padding: 0 14px; border-radius: 16px; background: var(--accent-tint); color: var(--accent-ink); font-size: 16px; font-weight: 800; letter-spacing: -0.01em; }
.gcard-h .title-pill { height: 28px; margin: -3px 0; padding: 0 12px; border-radius: 14px; font-size: 14px; }
.section-h .cnt { font-size: 13px; font-weight: 600; color: var(--ink3); font-variant-numeric: tabular-nums; }
.section-h a, .linkbtn { font-size: 16px; font-weight: 500; color: var(--accent-ink); background: none; border: 0; padding: 8px; margin: -8px; cursor: pointer; }

.card { background: var(--card); border-radius: var(--r); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tile { background: var(--card); border-radius: var(--r); padding: 14px 16px; display: flex; flex-direction: column; color: var(--ink); min-height: 84px; }
.tile .label { display: flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 700; color: var(--accent-ink); }
.big { font-size: 30px; line-height: 34px; font-weight: 800; letter-spacing: -0.04em; }
.mid { font-size: 28px; line-height: 34px; font-weight: 800; }
.muted { color: var(--ink2); font-size: 13px; }
.bar { height: 4px; border-radius: 2px; background: var(--fill); overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--accent); border-radius: 2px; }

/* 홈 「N년 전 오늘」(최대 3년 전): 사진 앱처럼 다음 카드가 살짝 보이는 선반 + 아래 페이지 점(home.html) */
.memories { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 16px; margin: 12px -16px 0; padding: 0 16px; scrollbar-width: none; }
.memories::-webkit-scrollbar { display: none; }
.memory { flex: 0 0 calc(100% - 34px); height: 116px; border-radius: var(--r); position: relative; overflow: hidden; scroll-snap-align: start; background: #34402F; color: #fff; }
.memory:only-child { flex-basis: 100%; }
.memory img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.memory .shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 30%, rgba(0,0,0,0.6) 100%); }
.memory .cap { position: absolute; left: 14px; right: 14px; bottom: 11px; display: flex; flex-direction: column; }
.memory .cap .when { font-size: 11px; line-height: 15px; font-weight: 700; letter-spacing: 0.02em; color: rgba(255,255,255,0.85); }
.memory .cap b { font-size: 17px; line-height: 22px; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.memory .cap .num { font-size: 12px; line-height: 16px; color: rgba(255,255,255,0.78); }
.mem-dots { display: flex; justify-content: center; gap: 0; margin: 0 0 -10px; } /* 아래 -10px: 누르는 여백만큼 당겨 다음 칸과의 간격은 그대로 */
.mem-dots button { display: flex; padding: 10px 6px; border: 0; background: none; cursor: pointer; } /* 점은 6px 이지만 누르는 영역은 18×26 */
.mem-dots span { width: 6px; height: 6px; border-radius: 3px; background: var(--ink); opacity: .22; }
.mem-dots [aria-current="true"] span { width: 18px; opacity: .85; }
@media (prefers-reduced-motion: no-preference) { .mem-dots span { transition: width .35s cubic-bezier(.32,.72,0,1), opacity .35s; } }

.list { background: var(--card); border-radius: var(--r); overflow: hidden; }
.row { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 8px 14px 8px 12px; color: var(--ink); position: relative; }
.row + .row::before { content: ""; position: absolute; top: 0; right: 0; left: 64px; height: 1px; background: var(--sep); }
.thumb { width: 40px; height: 40px; border-radius: 8px; background: var(--fill); object-fit: cover; flex: none; }
.row .main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.row .t { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .s { font-size: 13px; color: var(--ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-line { display: flex; align-items: center; gap: 6px; min-width: 0; }
.t-line > :first-child { min-width: 0; }
.cbadge { margin-left: auto; flex: none; font-size: 11px; font-weight: 700; line-height: 20px; padding: 0 7px; border-radius: 10px; background: var(--fill); color: var(--accent-ink); }
.chev { color: var(--chev); flex: none; }
.av { width: 24px; height: 24px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; flex: none; background: var(--torin); color: var(--ink); }
.av.rang { background: var(--accent); color: var(--on-accent); }

.search { display: flex; align-items: center; gap: 6px; height: 36px; padding: 0 10px; border-radius: 10px; background: var(--fill); margin-top: 8px; }
.search input { flex: 1; border: 0; background: transparent; outline: none; font-size: 17px; min-width: 0; }
.seg { display: flex; padding: 2px; border-radius: 9px; background: var(--fill); margin-top: 12px; }
.seg a { flex: 1; text-align: center; height: 28px; line-height: 28px; border-radius: 7px; font-size: 13px; font-weight: 500; color: var(--ink); }
.seg a[aria-current="true"] { background: var(--card); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,0.12); }
.chips { display: flex; gap: 8px; overflow-x: auto; margin: 12px -16px 0; padding: 0 16px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; height: 32px; padding: 0 12px; border-radius: 16px; background: var(--card); color: var(--ink); font-size: 14px; font-weight: 500; display: inline-flex; align-items: center; gap: 4px; border: 0; }
.chip.on { background: var(--accent); color: var(--on-accent); font-weight: 700; }
select.chip { appearance: none; -webkit-appearance: none; field-sizing: content; max-width: 160px; padding-right: 12px; cursor: pointer; }

.group-h { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 2; background: var(--bg); padding: 16px 0 8px; font-size: 20px; font-weight: 700; display: flex; justify-content: space-between; align-items: baseline; }
.entry-card { display: block; background: var(--card); border-radius: var(--r); overflow: hidden; color: var(--ink); margin-bottom: 8px; }
.mosaic { display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 2px; height: 200px; overflow: hidden; }
.mosaic img { width: 100%; height: 100%; min-height: 0; object-fit: cover; background: var(--fill); display: block; }
.mosaic img:first-child { grid-row: span 2; }
.mosaic.one { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr); }
.mosaic.two { grid-template-columns: 1fr 1fr; grid-template-rows: minmax(0, 1fr); }
.mosaic.two img:first-child, .mosaic.one img:first-child { grid-row: auto; }
.entry-card .body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 2px; }

.hero { margin: calc(-20px - env(safe-area-inset-top, 0px)) -16px 0; height: 46vh; max-height: 420px; min-height: 260px; position: relative; background: var(--fill); overflow: hidden; }
.hero .slides { display: flex; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.hero .slides::-webkit-scrollbar { display: none; }
.hero .slides a { flex: 0 0 100%; scroll-snap-align: start; }
.hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero .bar-top { position: absolute; left: 0; right: 0; top: 0; padding: calc(env(safe-area-inset-top, 0px) + 8px) 12px 0; display: flex; justify-content: space-between; }
.glass { width: 36px; height: 36px; border-radius: 18px; background: rgba(30,30,30,0.45); color: #fff; display: inline-flex; align-items: center; justify-content: center; border: 0; cursor: pointer; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.sheet { position: relative; margin: -24px -16px 0; padding: 20px 16px 0; background: var(--bg); border-radius: 22px 22px 0 0; }
/* 띄어쓰기 없는 긴 낱말·주소도 화면 폭 안에서 끊는다(휴대폰에서 가로로 넓어지지 않게) */
.sheet, h1 { overflow-wrap: anywhere; }
.sheet h1 { margin: 4px 0 0; font-size: 26px; line-height: 32px; letter-spacing: -0.02em; }
.actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 16px; }
.actions form { display: contents; }
.action { background: var(--card); border-radius: 12px; height: 60px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 12px; color: var(--accent-ink); border: 0; cursor: pointer; }
.meta { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--sep); border-radius: var(--r); overflow: hidden; margin-top: 12px; }
.meta div { background: var(--card); padding: 10px 14px; display: flex; flex-direction: column; min-width: 0; }
.meta b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prose { white-space: pre-wrap; font-size: 16px; line-height: 1.7; margin: 16px 2px 0; }
.photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.photos img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; background: var(--fill); }
/* 기록 작성 「사진 순서」: 누른 차례 번호(1번이 목록 카드에서 크게). 지울 사진은 흐리게 */
.photo-order[hidden] { display: none; }
.ptile { position: relative; }
.ptile button { display: block; width: 100%; padding: 0; border: 0; border-radius: 8px; background: none; cursor: pointer; }
.ptile img { display: block; }
.ptile button[aria-pressed="true"] img { outline: 3px solid var(--accent); outline-offset: -3px; }
.ptile button:disabled img { opacity: .35; }
.pnum { position: absolute; left: 6px; top: 6px; min-width: 26px; height: 26px; padding: 0 7px; border-radius: 13px; background: var(--accent); color: var(--on-accent); font-size: 14px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.pnum:empty { display: none; }
.ptile input { position: absolute; right: 6px; top: 6px; width: 22px; height: 22px; }
.comment { display: flex; gap: 10px; padding: 12px 14px; position: relative; }
.comment + .comment::before { content: ""; position: absolute; top: 0; right: 0; left: 48px; height: 1px; background: var(--sep); }
.composer { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; padding: 8px 12px calc(env(safe-area-inset-bottom, 0px) + 8px); background: var(--tab); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border-top: 0.5px solid var(--sep); }
.composer form { max-width: 560px; margin: 0 auto; display: flex; gap: 8px; align-items: center; }
.composer input { flex: 1; height: 36px; border-radius: 18px; border: 1px solid var(--sep); background: var(--card); padding: 0 14px; min-width: 0; }

.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; background: var(--tab); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border-top: 0.5px solid var(--sep); padding-bottom: env(safe-area-inset-bottom, 0px); }
.tabbar nav { max-width: 560px; margin: 0 auto; display: flex; }
.tabbar a { flex: 1; height: 49px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--ink2); font-size: 11px; font-weight: 500; }
.tabbar a[aria-current="page"] { color: var(--accent-ink); font-weight: 600; }
.tabbar a[aria-current="page"] svg .f { fill: currentColor; } /* 고른 탭은 아이콘을 채운다 */

.form { display: flex; flex-direction: column; gap: 16px; margin-top: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .field > .lbl { font-size: 13px; font-weight: 600; color: var(--ink2); padding-left: 4px; }
.input, .field input[type=text], .field input[type=date], .field input[type=number], .field input[type=password], .field textarea, .field select {
  width: 100%; border: 0; border-radius: 12px; background: var(--card); padding: 12px 14px; font-size: 16px; outline: none;
}
.field textarea { resize: vertical; line-height: 1.6; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pills label { cursor: pointer; }
.pills input { position: absolute; opacity: 0; }
.pills span { display: inline-flex; height: 34px; align-items: center; padding: 0 14px; border-radius: 17px; background: var(--card); font-size: 14px; font-weight: 500; }
.pills input:checked + span { background: var(--accent); color: var(--on-accent); font-weight: 700; }
.pills input:focus-visible + span { outline: 2px solid var(--accent-ink); }
.btn { height: 50px; border-radius: 14px; border: 0; background: var(--accent); color: var(--on-accent); font-size: 17px; font-weight: 700; cursor: pointer; width: 100%; }
.btn.ghost { background: var(--card); color: var(--danger); }
form[aria-busy="true"] button { opacity: .55; pointer-events: none; }  /* 저장하는 동안 한 번 더 누르지 않게 */
.errors { color: var(--danger); font-size: 14px; }
.toast { margin-top: 12px; padding: 10px 14px; border-radius: 12px; background: var(--card); font-size: 14px; }
.toast[data-level="error"] { color: var(--danger); box-shadow: inset 0 0 0 1px var(--danger); }
/* 기록 상세의 사진 띠는 화면 맨 위로 당겨 올리는데(.hero 음수 margin), 저장 뒤 토스트가 있으면 그 밑에 깔리지 않게 */
.toast + .hero { margin-top: 12px; }
/* 사람 태그의 「지우기」 확인 카드는 목록 밖으로 나와야 보인다 */
.list:has(details[open]) { overflow: visible; }
/* 줄 안의 팝업(details)이 열려 있으면 그 줄을 다음 줄보다 위에 두고 눌림 효과를 끈다.
   눌림 효과의 transform 이 팝업을 다음 줄 밑으로 깔아서, 「지우기」를 누르면 아래 줄이 눌렸다(사람 태그 지우기) */
.row:has(details[open]) { z-index: 3; }
.row:has(details[open]):active { transform: none; }
.empty { padding: 32px 16px; text-align: center; color: var(--ink2); }

.cal { background: var(--card); border-radius: var(--r); padding: 12px; margin-top: 12px; }
.cal table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.cal th { font-size: 12px; color: var(--ink3); font-weight: 500; padding-bottom: 6px; }
.cal td { height: 52px; vertical-align: top; text-align: center; font-size: 13px; padding: 2px; }
.cal td a { display: block; height: 100%; border-radius: 8px; color: var(--ink); }
.cal td.has a { background: var(--accent); color: var(--on-accent); font-weight: 700; }
/* 최근 12개월: 막대 위에 그달 기록 수, 막대 아래에 달. 위쪽 18px 은 가장 높은 막대의 숫자 자리 */
.chart { display: flex; align-items: flex-end; gap: 4px; height: 90px; padding-top: 18px; }
.chart span { position: relative; flex: 1; background: var(--fill); border-radius: 3px; min-height: 3px; }
.chart span.now { background: var(--accent); }
.chart b { position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); padding-bottom: 3px; font-size: 12px; line-height: 15px; font-weight: 700; color: var(--ink); white-space: nowrap; }
.chart .zero b { font-weight: 500; color: var(--ink3); }
.chart .now b { color: var(--accent-ink); }
.chart-months { display: flex; gap: 4px; margin-top: 6px; }
.chart-months span { flex: 1; min-width: 0; text-align: center; font-size: 11px; line-height: 14px; color: var(--ink2); white-space: nowrap; }
.chart-months .now { font-weight: 700; color: var(--accent-ink); }
.chart-months i { font-style: normal; }
@media (max-width: 389px) { .chart-months span { font-size: 10px; } }
@media (max-width: 359px) { .chart-months i { display: none; } } /* 아주 좁은 폰은 「11월」이 막대 폭보다 넓어 달 숫자만 */
.check { width: 26px; height: 26px; border-radius: 13px; border: 2px solid var(--chev); background: transparent; cursor: pointer; flex: none; display: inline-flex; align-items: center; justify-content: center; color: var(--on-accent); }
.check.on { background: var(--accent); border-color: var(--accent); }
.done .t { text-decoration: line-through; color: var(--ink3); }
details.add { margin-top: 12px; }
details.add summary { list-style: none; cursor: pointer; }
details.add summary::-webkit-details-marker { display: none; }
@media (prefers-reduced-motion: no-preference) { .row, .tile, .entry-card, .action { transition: transform .2s cubic-bezier(.32,.72,0,1); } .row:active, .tile:active, .entry-card:active { transform: scale(0.98); } }

/* 알림 · 답글 · 사람 태그 */
.bell { position: relative; display: inline-flex; width: 36px; height: 36px; align-items: center; justify-content: center; color: var(--ink); }
.bell .badge { position: absolute; top: -2px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--danger); color: var(--on-danger); font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; border: 2px solid var(--bg); }
.comment.reply { padding-left: 52px; background: color-mix(in srgb, var(--fill) 35%, var(--card)); }
.comment.reply + .comment.reply::before, .comment + .comment.reply::before { left: 52px; }
.tagbox { background: var(--card); border-radius: 12px; padding: 8px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; position: relative; }
.tagbox input { flex: 1; min-width: 120px; border: 0; background: transparent; outline: none; font-size: 16px; padding: 6px; }
.tagchip { display: inline-flex; align-items: center; gap: 4px; height: 30px; padding: 0 6px 0 12px; border-radius: 15px; background: var(--accent); color: var(--on-accent); font-size: 14px; font-weight: 600; }
.tagchip button { border: 0; background: transparent; color: inherit; width: 22px; height: 22px; border-radius: 11px; cursor: pointer; font-size: 16px; line-height: 1; }
.suggest { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 4; background: var(--card); border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.14); overflow: hidden; }
.suggest button { display: block; width: 100%; text-align: left; border: 0; background: transparent; padding: 12px 14px; font-size: 16px; cursor: pointer; }
.suggest button[aria-selected="true"], .suggest button:hover { background: var(--fill); }

/* 기분 이모지 · 캘린더 제목 · 사진 크게 보기 · 알림 팝업 · D-day 탭 */
.mood { font-size: 22px; line-height: 1; width: 28px; text-align: center; flex: none; }
.emoji-pill { font-size: 22px; padding: 0 12px !important; }
.cal td a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 2px 1px; overflow: hidden; }
.cal-title { display: block; width: 100%; font-size: 9.5px; line-height: 1.2; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -0.02em; }
.lightbox { position: fixed; inset: 0; z-index: 20; background: rgba(0,0,0,.92); display: flex; align-items: center; justify-content: center; cursor: zoom-out; touch-action: pinch-zoom; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lightbox[hidden] { display: none; }
.lightbox .num { position: absolute; top: calc(env(safe-area-inset-top, 0px) + 8px); left: 50%; transform: translateX(-50%); width: auto; padding: 0 12px; font-size: 13px; }
.lightbox .num[hidden] { display: none; }
.notes-pop { position: fixed; right: 16px; top: calc(env(safe-area-inset-top, 0px) + 76px); z-index: 10; width: min(340px, calc(100vw - 32px)); background: var(--card); border-radius: 16px; box-shadow: 0 12px 32px rgba(0,0,0,.18); overflow: hidden; }
.notes-pop[hidden] { display: none; }
[data-notification-id][hidden], [data-notification-empty][hidden], [data-notification-none][hidden], [data-notification-more][hidden] { display: none; }
.notes-refresh { display: inline-flex; align-items: center; min-height: 44px; }
.notes-pop .row { min-height: 56px; }
.notes-pop .row .t { white-space: normal; font-size: 14px; }
.notes-pop .row .s { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.bell-wrap { position: relative; }
.bell { border: 0; background: transparent; cursor: pointer; padding: 0; }
.bell { width: 44px; height: 44px; }
.notes-all { display: flex; min-height: 48px; align-items: center; justify-content: center; padding: 12px 16px; border-top: 1px solid var(--sep); font-size: 14px; font-weight: 600; }
/* 휴대폰 알림 설정: 권한·연결·수신 상태를 색에만 의존하지 않고 글로 알린다. */
.push-settings { margin-top: 16px; }
.push-accordion > summary { position: static; min-height: 48px; align-items: center; list-style: none; cursor: pointer; }
.push-accordion > summary::-webkit-details-marker { display: none; }
.push-accordion > summary:focus-visible { outline-offset: -3px; }
.push-accordion:not([open]) > summary { border-bottom: 0; }
.push-accordion-title { margin: 0; font: inherit; }
.push-accordion-icons { display: flex; align-items: center; gap: 12px; }
.push-accordion-chevron { display: flex; color: var(--ink2); transform: rotate(90deg); }
.push-accordion[open] > summary .push-accordion-chevron { transform: rotate(270deg); }
.push-settings-body { padding: 16px; }
.push-intro { margin: 0 0 12px; font-size: 15px; font-weight: 600; }
.push-events { margin: 0; padding-left: 20px; font-size: 14px; line-height: 1.7; }
.push-hint { margin: 8px 0 0; color: var(--ink2); font-size: 13px; }
.push-status { margin: 16px 0 12px; color: var(--ink2); font-size: 14px; line-height: 1.5; }
.push-settings[data-push-state="enabled"] .push-status { color: var(--accent-ink); font-weight: 600; }
.push-toggle { min-height: 48px; height: auto; padding: 12px; font-size: 16px; }
.push-toggle.push-off { background: var(--fill); color: var(--ink); }
.push-toggle:disabled { background: var(--fill); color: var(--ink2); cursor: default; }
.push-help { margin-top: 8px; font-size: 13px; color: var(--ink2); }
.push-help summary { min-height: 44px; padding: 12px 0; cursor: pointer; color: var(--accent-ink); font-weight: 600; }
.push-help p { margin: 4px 0 12px; line-height: 1.6; }
.dtabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
.dtabs::-webkit-scrollbar { display: none; }
.dtabs .chip { padding: 0 11px; }
/* D-day 「관리」 뱃지 */
.section-h a.badge-btn { height: 28px; padding: 0 12px; margin: 0; border-radius: 14px; background: var(--fill); color: var(--accent-ink); font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; }
.section-h a.badge-btn.on { background: var(--accent); color: var(--on-accent); }
/* 모음 · 기록 찾기 */
.found-by { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.found-by .chip { height: 28px; font-size: 13px; max-width: 100%; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; display: inline-block; line-height: 28px; }
.find-top { display: flex; flex-direction: column; gap: 4px; padding: 16px; margin-top: 12px; color: var(--ink); }
.find-top .label { font-size: 13px; font-weight: 700; color: var(--accent-ink); }
/* 기록 상세: 잘린 장소·함께 값을 눌러 전체 보기 */
.meta b.more { cursor: pointer; }
.meta-pop { max-height: 50vh; overflow: auto; position: fixed; z-index: 10; max-width: min(320px, calc(100vw - 32px)); padding: 10px 14px; border-radius: 12px; background: var(--pop); color: var(--ink); box-shadow: 0 10px 28px rgba(0,0,0,.18), 0 0 0 1px var(--sep); display: flex; flex-direction: column; gap: 2px; }
.meta-pop[hidden] { display: none; }
.meta-pop .lbl { font-size: 12px; color: var(--ink2); }
.meta-pop .txt { font-size: 15px; font-weight: 600; line-height: 1.45; word-break: keep-all; overflow-wrap: anywhere; }
/* 장소 관리: 목록이 길어 저장 버튼을 탭바 위에 붙여 둔다 */
.place-row { cursor: pointer; }
.place-row[hidden] { display: none; }
.save-bar { position: sticky; bottom: calc(env(safe-area-inset-bottom, 0px) + 61px); margin-top: 12px; z-index: 4; }
.ai-answer { display: flex; flex-direction: column; gap: 6px; padding: 16px; margin-top: 12px; }
.ai-answer .label { font-size: 13px; font-weight: 700; color: var(--accent-ink); }
.ai-answer p { margin: 0; font-size: 16px; line-height: 1.6; }
.ai-wait { margin: 8px 4px 0; font-weight: 600; color: var(--accent-ink); animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .ai-wait { animation: none; } }
#find-results.waiting { opacity: .35; pointer-events: none; transition: opacity .2s; }
.card.notice { padding: 14px 16px; color: var(--ink); line-height: 1.5; }
/* 관리: 고르기 목록·합치기 */
.pick-row { cursor: pointer; }
.pick-row input[type=checkbox] { width: 22px; height: 22px; flex: none; accent-color: var(--accent); }
.merge-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; background: var(--bg); padding: 8px 0; }
.merge-picked { flex: 1 0 100%; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.merge-picked::-webkit-scrollbar { display: none; }
.merge-picked[hidden] { display: none; }
.merge-bar input[type=text] { flex: 1; min-width: 0; height: 44px; border: 0; border-radius: 12px; padding: 0 12px; background: var(--card); color: var(--ink); font-size: 16px; }
.merge-bar .btn { width: auto; padding: 0 18px; flex: none; }
.merge-bar .btn:disabled { opacity: .45; }
.tag-edit { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.tag-name { flex: 1; min-width: 0; border: 0; background: transparent; font-size: 16px; font-weight: 600; padding: 6px 0; color: var(--ink); }
.tag-alias { flex: 1; min-width: 0; height: 32px; border: 0; border-radius: 8px; padding: 0 10px; background: var(--fill); color: var(--ink); font-size: 14px; }
.find-hint { margin: 8px 4px 0; line-height: 1.6; }
.ask-ai { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; padding: 12px 14px; border-radius: var(--r); background: var(--card); }
.ask-ai .muted { min-width: 0; font-size: 14px; word-break: keep-all; } /* 낱말 가운데서 줄이 끊기지 않게 */
.ask-ai-btn { width: auto; flex: none; height: 40px; padding: 0 16px; font-size: 15px; }
/* 「토랭AI에게 물어보기」 창: 찾았던 말을 불러와 고쳐 묻는다. 휴대폰 자판에 가리지 않게 화면 위쪽에.
   창 안 여백은 form 에 둔다(창 자체를 누른 것은 창 밖을 누른 것으로 보고 닫는다) */
.ask-pop { width: min(420px, calc(100vw - 32px)); max-width: none; margin: calc(env(safe-area-inset-top, 0px) + 72px) auto auto; padding: 0; border: 0; border-radius: var(--r); background: var(--card); color: var(--ink); box-shadow: 0 12px 32px rgba(0,0,0,.18); }
.ask-pop::backdrop { background: rgba(0,0,0,.4); }
.ask-pop form { display: flex; flex-direction: column; gap: 8px; padding: 16px; }
.ask-pop b { font-size: 17px; }
.ask-pop .muted { word-break: keep-all; }
.ask-pop textarea { width: 100%; border: 0; border-radius: 12px; background: var(--fill); color: var(--ink); padding: 12px 14px; font: inherit; font-size: 16px; line-height: 1.5; resize: none; outline: none; }
.ask-pop .btns { display: flex; gap: 8px; margin-top: 4px; }
.ask-pop .btns .btn { height: 44px; font-size: 16px; }
.ask-pop .btns .cancel { background: var(--fill); color: var(--ink); }
.find-back { display: inline-block; margin: 12px 4px 0; }
/* 쪽 나누기: 10개씩, 번호는 7개까지 */
.pager { display: flex; justify-content: center; align-items: center; gap: 4px; margin: 14px 0 4px; }
.pager a, .pager span { min-width: 34px; height: 34px; padding: 0 6px; border-radius: 17px; display: inline-flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 600; color: var(--ink2); font-variant-numeric: tabular-nums; }
.pager .on { background: var(--accent); color: var(--on-accent); }
.pager .off { opacity: .3; }
/* 묶음 카드: 위에 반투명 띠(스크롤하면 위에 붙음) + 목록. 기록 탭의 달, 위시 중요도, 댓글 등 */
.gcard { background: var(--card); border-radius: var(--r); overflow: clip; }
.gcard + .gcard { margin-top: 12px; }
.gcard-h { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 2; margin: 0; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 10px 14px; background: var(--band); -webkit-backdrop-filter: saturate(180%) blur(18px); backdrop-filter: saturate(180%) blur(18px); border-bottom: 0.5px solid var(--sep); font-size: 15px; font-weight: 700; }
.gcard-h .cnt { font-size: 12px; font-weight: 600; color: var(--ink3); font-variant-numeric: tabular-nums; }
.gcard-h a { font-size: 14px; font-weight: 600; color: var(--accent-ink); }
.gcard .list { border-radius: 0; background: transparent; }
.gcard .entry-card { border-radius: 0; margin: 0; }
.gcard .entry-card + .row::before { display: none; }
.gcard .entry-card + .row { border-top: 0.5px solid var(--sep); }
/* 기록 탭: 한 해씩 */
.yearbar { display: flex; align-items: center; gap: 8px; margin: 28px 0 12px; padding-top: 18px; border-top: 0.5px solid var(--sep); }
/* 연도는 소제목과 같은 알약 */
.yearbar select { appearance: none; -webkit-appearance: none; border: 0; height: 36px; border-radius: 18px; background-color: var(--accent-tint); color: var(--accent-ink); font: inherit; font-size: 18px; font-weight: 800; padding: 0 30px 0 14px; background-image: linear-gradient(45deg, transparent 50%, var(--ink3) 50%), linear-gradient(135deg, var(--ink3) 50%, transparent 50%); background-position: right 15px center, right 10px center; background-size: 5px 5px; background-repeat: no-repeat; }
.yearbar .cnt { font-size: 13px; font-weight: 600; color: var(--ink3); }
.yearbar .yearnav { margin-left: auto; display: flex; gap: 6px; }
.yearbar .off { opacity: .3; pointer-events: none; }
/* 기록 탭 위쪽 도구(검색·보기 방식·필터)를 한 카드로 묶어 아래 목록과 나눈다 */
.toolbox { background: var(--card); border-radius: var(--r); padding: 12px; margin-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.toolbox .search, .toolbox .seg { margin-top: 0; }
.toolbox .chips { margin: 0 -12px; padding: 0 12px; }
.toolbox .chip { background: var(--fill); }
.toolbox .chip.on { background: var(--accent); }
.toolbox-back { align-self: flex-start; margin: 0; padding: 2px 4px; font-size: 15px; }
.toolbox + .gcard, .toolbox + .cal, .toolbox + .card { margin-top: 24px; }
/* 통계 · AI 월간 회고: 처음엔 달 제목만, 머리 줄을 누르면 펼친다(collections.html) */
.recap + .recap { margin-top: 10px; }
.recap summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 16px; }
.recap summary::-webkit-details-marker { display: none; }
.recap[open] summary { padding-bottom: 6px; }
.recap .chev { display: flex; }
.recap[open] .chev svg { transform: rotate(90deg); }
@media (prefers-reduced-motion: no-preference) { .recap .chev svg { transition: transform .2s cubic-bezier(.32,.72,0,1); } }
.recap h3 { margin: 0; font-size: 15px; color: var(--accent-ink); }
.recap p { margin: 0; padding: 0 16px 14px; line-height: 1.6; color: var(--ink); }
.recap-pick { display: flex; gap: 6px; }
.recap-pick select { height: 30px; padding: 0 10px; border: 0; border-radius: 15px; background: var(--fill); color: var(--ink); font-size: 14px; font-weight: 600; }
/* D-day 「수정」: 그 줄에서 날짜만 다시 고른다(처음엔 오늘) */
.row.fixing { align-items: flex-start; background: color-mix(in srgb, var(--accent) 8%, var(--card)); }
.fix { display: flex; gap: 8px; align-items: center; margin-top: 6px; }
.fix input[type=date] { flex: 1; min-width: 0; height: 40px; border: 0; border-radius: 10px; padding: 0 10px; background: var(--card); box-shadow: inset 0 0 0 1.5px var(--accent); font-size: 16px; }
.fix .btn { width: auto; flex: none; height: 40px; padding: 0 16px; border-radius: 10px; font-size: 15px; }
/* 홈 「고정됨」 일정 칸(구글 캘린더 색): 바나나 = 함께하는 일정, 파랑 = 랭이, 빨강 = 토린.
   칸 높이는 날짜 칸(51px)에 맞춘다 — 같은 날 2건이면 글씨를 줄이고, 3건부터는 「+N」 팝업 */
.tile.sched { position: relative; min-width: 0; } /* 긴 제목이 칸(격자)을 넓히지 않게 */
.tile.sched:active { transform: none; } /* 링크가 아니다. 눌림 효과가 있으면 팝업 안을 누를 때 팝업이 옆 칸 뒤로 숨는다 */
.tile.sched.together { background: var(--banana); color: var(--on-banana); }
.sched.together .label { color: inherit; }
.sched.rang .label { color: var(--cal-blue-ink); }
.sched.torin .label { color: var(--cal-red-ink); }
.sched-dot { flex: none; width: 8px; height: 8px; border-radius: 4px; }
.sched.rang .sched-dot { background: var(--cal-blue); }
.sched.torin .sched-dot { background: var(--cal-red); }
.c-row { display: flex; gap: 8px; align-items: flex-start; margin-top: 8px; min-width: 0; }
.datebox { flex: none; width: 38px; height: 51px; border-radius: 10px; background: var(--card); color: var(--ink); display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; }
.datebox .m { font-size: 10px; font-weight: 700; color: var(--accent-ink); }
.datebox .d { font-size: 20px; font-weight: 800; letter-spacing: -0.03em; }
.datebox .w { font-size: 10px; font-weight: 600; color: var(--ink2); }
.sched.rang .datebox { background: var(--cal-blue-tint); }
.sched.rang .datebox .m { color: var(--cal-blue-ink); }
.sched.torin .datebox { background: var(--cal-red-tint); }
.sched.torin .datebox .m { color: var(--cal-red-ink); }
.c-main { flex: 1; min-width: 0; height: 51px; display: flex; flex-direction: column; justify-content: space-between; }
.c-main .ev { display: flex; align-items: center; gap: 4px; min-width: 0; font-size: 14px; line-height: 19px; font-weight: 700; }
.c-main.multi .ev { font-size: 12.5px; line-height: 15px; }
.c-cd-row { display: flex; align-items: center; justify-content: space-between; gap: 4px; min-width: 0; }
.c-cd { font-size: 20px; line-height: 26px; font-weight: 800; white-space: nowrap; }
.c-main.multi .c-cd { font-size: 18px; line-height: 20px; }
/* 다가오면: D-5~3 주황, D-2~「오늘!」 빨강(바나나 칸은 노란 바탕에서 보이게 짙게) */
.sched .tone-orange { color: var(--dday-orange); }
.sched .tone-red { color: var(--dday-red); }
.sched.together .c-cd.tone-orange { color: var(--dday-orange-on-banana); }
.sched.together .c-cd.tone-red { color: var(--dday-red-on-banana); }
.sched .n { flex: none; width: 15px; height: 15px; border-radius: 8px; font-size: 10px; line-height: 15px; font-weight: 800; text-align: center; background: var(--card); color: var(--ink); }
.sched.rang .n { background: var(--cal-blue-tint); color: var(--cal-blue-ink); }
.sched.torin .n { background: var(--cal-red-tint); color: var(--cal-red-ink); }
.sched.together .ev-pop .n { background: var(--banana); color: var(--on-banana); }
.c-empty { margin-top: 8px; font-size: 15px; line-height: 20px; font-weight: 700; color: var(--ink2); }
.sched.together .c-empty { color: inherit; }
/* 긴 제목: 칸을 넘칠 때만 전광판처럼 흐른다(.run 은 home.html 이 붙인다. 「동작 줄이기」면 … 로 자름) */
.mq { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; }
.mq-in { display: block; overflow: hidden; text-overflow: ellipsis; }
.mq.run { -webkit-mask-image: linear-gradient(90deg, transparent, #000 3px, #000 calc(100% - 10px), transparent); mask-image: linear-gradient(90deg, transparent, #000 3px, #000 calc(100% - 10px), transparent); }
.mq.run .mq-in { display: inline-flex; overflow: visible; animation: mq var(--mq-dur, 8s) linear infinite; }
.mq.run .mq-t { padding-right: 28px; }
@keyframes mq { 0%, 15% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
.sched-more { flex: none; position: relative; z-index: 2; height: 22px; min-width: 26px; padding: 0 6px; border: 0; border-radius: 11px; font-size: 12px; font-weight: 800; cursor: pointer; background: var(--on-banana); color: var(--banana); }
.sched-more::after { content: ""; position: absolute; inset: -8px -6px; } /* 손가락으로 누르기 쉽게 */
.sched.rang .sched-more { background: var(--cal-blue); color: var(--on-cal); }
.sched.torin .sched-more { background: var(--cal-red); color: var(--on-cal); }
.ev-pop { position: absolute; z-index: 6; top: calc(100% + 6px); left: 0; width: min(260px, calc(100vw - 32px)); padding: 10px 12px 12px; border-radius: 14px; background: var(--pop); color: var(--ink); box-shadow: 0 12px 32px rgba(0,0,0,.18), 0 0 0 1px var(--sep); }
.ev-pop[hidden] { display: none; }
.ev-pop.right { left: auto; right: 0; }
.ev-pop-h { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--sep); }
.ev-pop-h b { font-size: 14px; }
.ev-pop-h span { font-size: 13px; font-weight: 800; color: var(--ink2); }
.ev-pop ol { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ev-pop li { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; line-height: 19px; font-weight: 600; word-break: keep-all; overflow-wrap: anywhere; }
.ev-pop li .n { margin-top: 2px; }
/* 칸을 누르면 그다음 날 일정(home.html). 칸 전체를 덮는 단추 — 「+N」·팝업만 그 위에 */
.sched-tap { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; padding: 0; border: 0; border-radius: inherit; background: none; cursor: pointer; touch-action: manipulation; }
.sched-day[hidden], .ev-next[hidden] { display: none; }
.sched-day.c-empty { min-height: 51px; } /* 「다음 일정 없음」에서도 칸 높이가 그대로 */
.ev-none { margin: 8px 0 0; font-size: 14px; line-height: 19px; font-weight: 600; color: var(--ink2); }
.ev-next { display: flex; align-items: center; justify-content: center; gap: 2px; width: 100%; height: 36px; margin-top: 10px; border: 0; border-radius: 10px; background: var(--banana); color: var(--on-banana); font-size: 14px; font-weight: 700; cursor: pointer; touch-action: manipulation; }
.sched.rang .ev-next { background: var(--cal-blue-tint); color: var(--cal-blue-ink); }
.sched.torin .ev-next { background: var(--cal-red-tint); color: var(--cal-red-ink); }
