/* 독서 로그 캘린더 — 기본(3D)은 둥근 카드, .pixel 은 계단형 픽셀 테두리 */
.rl {
  --paper: #fbf1df; --paper2: #f3e2c4; --ink: #4a2f22; --muted: #9a7a62;
  --accent: #e8a33d; --red: #c0453a; --blue: #5b7fb0;
  --h1: #f8e2b8; --h2: #f0c77c; --h3: #e2a145;
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 12px;
  background: rgba(20, 10, 6, .55); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  animation: rl-fade .2s ease;
}
@keyframes rl-fade { from { opacity: 0; } }
.rl-card {
  position: relative; width: min(520px, 96vw); max-height: calc(100vh - 24px); overflow: auto;
  background: var(--paper); color: var(--ink); padding: 18px 20px 16px; text-align: left;
  border-radius: 22px; box-shadow: 0 24px 60px rgba(0,0,0,.5), inset 0 0 0 5px var(--paper2);
}
.rl button { font: inherit; color: inherit; cursor: pointer; }
.rl h3, .rl h4, .rl-nav span, .rl-stats em, .rl-book { font-family: 'Jua', sans-serif; font-weight: 400; }
.rl h3 { margin: 0 0 10px; font-size: 20px; text-align: center; }
.rl-x { position: absolute; top: 10px; right: 12px; width: 30px; height: 30px; border: 0; background: none; font-size: 22px; line-height: 1; color: var(--muted); }
.rl-x:hover { color: var(--ink); }

.rl-nav { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 8px; }
.rl-nav span { font-size: 17px; min-width: 110px; text-align: center; }
.rl-nav button { width: 30px; height: 30px; border: 0; border-radius: 50%; background: var(--paper2); font-size: 18px; line-height: 1; }
.rl-nav button:hover { background: var(--h1); }

.rl-banks { display: flex; align-items: center; justify-content: center; gap: 12px; white-space: nowrap; margin: -6px 0 8px; }
.rl-bank { text-align: center; margin: 0; font-size: 13px; color: var(--muted); }
.rl-bank small { display: block; font-size: 12px; opacity: .8; margin-top: 1px; }
.rl-nobook { font-family: 'Pretendard Variable', Pretendard, sans-serif; font-size: 14px; color: var(--muted); }
.rl-bank b { font-family: 'Jua', sans-serif; font-weight: 400; font-size: 17px; color: var(--ink); margin: 0 2px; }
.rl-earn { margin-left: 6px; font-family: 'Pretendard Variable', Pretendard, sans-serif; font-size: 12px; font-weight: 700; color: #a0612c; background: #fff1d6; padding: 1px 7px; border-radius: 999px; vertical-align: 2px; }
.rl-stats { display: flex; justify-content: center; gap: 8px; margin-bottom: 12px; font-size: 13px; color: var(--muted); }
.rl-stats span { background: #fff8ec; padding: 4px 11px; border-radius: 999px; }
.rl-stats em { font-style: normal; font-size: 16px; color: var(--ink); margin: 0 1px; }

.rl-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.rl-dow { text-align: center; font-size: 12px; color: var(--muted); padding-bottom: 2px; }
.rl-dow.sun, .rl-cell.sun b { color: var(--red); }
.rl-dow.sat, .rl-cell.sat b { color: var(--blue); }
.rl-cell {
  position: relative; min-width: 0; aspect-ratio: 1 / .92; border: 0; border-radius: 10px; padding: 4px 4px 3px;
  background: #fff8ec; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; text-align: left; overflow: hidden;
}
.rl-cell.empty { background: none; }
.rl-cell b { font-size: 12px; font-weight: 600; line-height: 1; }
.rl-cell:hover { filter: brightness(.97); }
.rl-cell.h1 { background: var(--h1); }
.rl-cell.h2 { background: var(--h2); }
.rl-cell.h3 { background: var(--h3); }
.rl-cell.today { box-shadow: inset 0 0 0 2px var(--accent); }
.rl-cell.sel { box-shadow: inset 0 0 0 2px var(--ink); }
.rl-acorn { font-size: 13px; line-height: 1.1; }
.rl-acorn i:not(.px) { font-style: normal; font-size: 12px; margin-left: 1px; }
.rl-t { width: 100%; font-size: 12px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: .85; }

.rl-detail { margin-top: 12px; padding-top: 10px; border-top: 2px dashed var(--paper2); min-height: 64px; }
.rl h4 { margin: 0 0 6px; font-size: 15px; }
.rl ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.rl li { background: #fff8ec; border-radius: 12px; padding: 8px 11px; }
.rl-book { font-size: 15px; display: flex; align-items: center; gap: 6px; }
.rl-live { font-family: inherit; font-size: 12px; background: #8fb59a; color: #fff; padding: 1px 6px; border-radius: 999px; }
.rl-times { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--muted); margin-top: 3px; }
.rl-times b { color: var(--ink); font-variant-numeric: tabular-nums; }
.rl-none { margin: 6px 0; font-size: 13px; color: var(--muted); text-align: center; }

@media (max-width: 420px) { .rl-t { display: none; } .rl-stats { flex-wrap: wrap; } }

/* ------------------------------------------------ 픽셀 버전 */
.rl.pixel { --paper: #f6ead3; --paper2: #ead6b2; --ink: #2b1c17; --muted: #6b4a36; --accent: #d9a441; --red: #b84a3e; --blue: #4f6b93;
  --h1: #f2d9a4; --h2: #e7b866; --h3: #d18e3c; animation: rl-fade .2s steps(3); }
.rl.pixel .rl-card { border-radius: 0; margin: 4px;
  box-shadow: 0 -4px 0 0 var(--ink), 0 4px 0 0 var(--ink), -4px 0 0 0 var(--ink), 4px 0 0 0 var(--ink), inset 0 -6px 0 0 var(--paper2), 0 12px 0 0 rgba(0,0,0,.35); }
.rl.pixel .rl-nav button, .rl.pixel .rl-stats span, .rl.pixel .rl-cell, .rl.pixel li, .rl.pixel .rl-live, .rl.pixel .rl-earn { border-radius: 0; }
.rl.pixel .rl-nav button { box-shadow: 0 -2px 0 0 var(--ink), 0 2px 0 0 var(--ink), -2px 0 0 0 var(--ink), 2px 0 0 0 var(--ink); }
.rl.pixel .rl-cell:not(.empty) { box-shadow: 0 0 0 1px rgba(43,28,23,.18); }
.rl.pixel .rl-cell.today { box-shadow: inset 0 0 0 2px var(--accent2, #b84a3e); }
.rl.pixel .rl-cell.sel { box-shadow: inset 0 0 0 3px var(--ink); }
.rl.pixel li { box-shadow: 0 -2px 0 0 var(--paper2), 0 2px 0 0 var(--paper2), -2px 0 0 0 var(--paper2), 2px 0 0 0 var(--paper2); }

/* 픽셀 도토리 아이콘 (12×13) */
.rl .px { height: 1.3em; vertical-align: -0.3em; }
.rl-heartbank { margin-top: 0; }
.rl-hearts { margin: 0 0 8px; font-size: 13px; color: var(--muted); }
.rl-hearts b { color: #c9566e; font-size: 15px; margin: 0 2px; }
.rl-hearts small { display: block; font-size: 12px; opacity: .85; margin-top: 2px; word-break: keep-all; }
