/* 집중 페이지 전용 — 포인트 색: 장작 주황 */
.focus { --accent: #f2774b; --accent-soft: #fde3d7; }
.small { font-size: 13px; margin: 12px 0 0; }

.grid {
  display: grid; gap: 18px;
  grid-template-columns: 1.15fr 1fr;
  grid-template-areas:
    "timer today"
    "timer sound"
    "month share";
}
.timer-card { grid-area: timer; display: flex; flex-direction: column; }
.today-card { grid-area: today; }
.sound-card { grid-area: sound; }
.month-card { grid-area: month; }
.share-card { grid-area: share; }

/* 타이머 */
.mode-tabs { display: inline-flex; background: var(--bg); border-radius: 999px; padding: 4px; align-self: flex-start; }
.tab {
  border: 0; background: transparent; padding: 7px 14px; border-radius: 999px;
  font-weight: 700; font-size: 14px; color: var(--ink-soft); cursor: pointer;
}
.tab.on { background: var(--paper); color: var(--ink); box-shadow: 0 1px 4px rgba(0,0,0,.08); }

.stage { text-align: center; padding: 18px 0 6px; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; }
/* 책벌레 장면 */
.scene { position: relative; width: min(100%, 360px); aspect-ratio: 520 / 414; display: grid; place-items: end center; }
.scene img { width: 100%; height: auto; transform-origin: 50% 100%; user-select: none; -webkit-user-drag: none; }
.scene.nibble img { animation: munch .5s ease-in-out infinite; }
.scene.sleep img { animation: breathe 3.2s ease-in-out infinite; }
.scene.cheer img { animation: hop .55s ease-in-out 4; }
.scene.read img { animation: breathe 4s ease-in-out infinite; }
@keyframes munch { 50% { transform: scale(1.02, .975); } }
@keyframes breathe { 50% { transform: scale(1.012, .99); } }
@keyframes hop { 50% { transform: translateY(-14px); } }
.fx { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.crumb { position: absolute; width: 6px; height: 6px; border-radius: 2px; background: #fff3dc; border: 1.5px solid #2b2622; animation: crumb 1s ease-in forwards; }
@keyframes crumb { to { transform: translate(var(--dx), 70px) rotate(160deg); opacity: 0; } }
.drop { position: absolute; top: -20px; width: 13px; height: 17px; background: #bfe6f2; border: 2px solid #2b2622;
  border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%; animation: fall linear forwards; }
.drop::before { content: ""; position: absolute; left: 50%; top: -8px; width: 7px; height: 9px; margin-left: -3.5px; background: inherit; border: inherit; border-bottom: 0; border-radius: 50% 50% 0 0; }
@keyframes fall { to { transform: translateY(330px); } }
@media (prefers-reduced-motion: reduce) { .scene img, .crumb, .drop { animation: none !important; } }
.time {
  font-size: clamp(64px, 11vw, 104px); font-weight: 800; letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums; line-height: 1; margin-top: 14px;
}
.ring { width: min(320px, 80%); height: 16px; background: var(--book, #8aa98f); border: 2.5px solid #2b2622; border-radius: 4px; margin: 14px auto 0; overflow: hidden; position: relative; }
.ring::before { content: ""; position: absolute; inset: 3px 0 auto; height: 3px; background: #fff3dc; opacity: .8; }
.ring-fill { height: 100%; width: 0%; background: var(--paper); position: relative; transition: width .5s linear; }
.ring-fill::after { content: ""; position: absolute; right: -6px; top: 0; bottom: 0; width: 10px;
  background: radial-gradient(circle at 0 50%, var(--paper) 4px, transparent 4.5px) 0 0 / 10px 7px repeat-y; }
.break-mode .ring { --book: #bfe6d3; }
.status { color: var(--ink-soft); margin: 14px 0 0; min-height: 1.5em; }

.controls { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 10px; }
.controls .btn { min-width: 104px; }
#doneBtn:not(:disabled) { animation: nudge 1.4s ease-in-out infinite; }
@keyframes nudge { 50% { transform: scale(1.05); } }

.quote {
  margin-top: 18px; background: var(--bg); border-radius: 14px; padding: 16px 18px; text-align: left;
}
.q-en { font-size: 17px; font-weight: 700; margin: 0; letter-spacing: -0.01em; }
.q-ko { margin: 6px 0 0; }
.q-by { margin: 8px 0 0; font-size: 12px; color: var(--ink-soft); }

/* 소리 */
.mixer { display: grid; grid-template-columns: 28px 1fr 1.3fr; align-items: center; gap: 8px; padding: 8px 0; }
.mixer .ico { font-size: 20px; }
.mixer .name { font-weight: 600; font-size: 14px; }
input[type="range"] { accent-color: var(--accent); width: 100%; }

/* 오늘의 책장 */
.shelf { display: grid; grid-template-columns: repeat(6, 1fr); column-gap: 8px; }
.slot { height: 74px; display: flex; align-items: flex-end; justify-content: center; border-bottom: 7px solid #d8b892; margin-bottom: 10px; padding: 0 2px; }
.bk {
  width: 78%; border: 2px solid #3a2b2e; border-radius: 4px 4px 2px 2px; position: relative;
  background: var(--c); box-shadow: inset -5px 0 0 var(--d);
}
.bk::before, .bk::after { content: ""; position: absolute; left: 0; right: 5px; height: 3px; background: var(--d); }
.bk::before { top: 18%; } .bk::after { top: 26%; }
.bk.empty { border: 2px dashed #e2d7c4; background: transparent; box-shadow: none; height: 62%; }
.bk.empty::before, .bk.empty::after { display: none; }
.bk.pop { animation: drop .5s cubic-bezier(.3,1.4,.5,1); }
@keyframes drop { from { transform: translateY(-30px); opacity: 0; } }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 16px 0 12px; }
.stats div { background: var(--bg); border-radius: 12px; padding: 10px; text-align: center; }
.stats b { display: block; font-size: 20px; letter-spacing: -0.02em; }
.stats span { font-size: 12px; color: var(--ink-soft); }
.memo {
  width: 100%; border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--paper);
}
.memo:focus { outline: none; border-color: var(--accent); }

/* 이번 달 */
.month { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.month .dow { font-size: 11px; color: var(--ink-soft); text-align: center; }
.day {
  aspect-ratio: 1; border-radius: 7px; font-size: 11px; display: flex; align-items: flex-end; justify-content: flex-end;
  padding: 3px 5px; color: var(--ink-soft);
}
.day.today { outline: 2px solid var(--ink); outline-offset: 1px; }
.l0 { background: #f3ede3; } .l1 { background: #fcd6c4; } .l2 { background: #f9ab89; }
.l3 { background: #f2774b; color: #fff; } .l4 { background: #c9532b; color: #fff; }
.legend { display: flex; align-items: center; gap: 4px; justify-content: flex-end; margin-top: 10px; font-size: 11px; color: var(--ink-soft); }
.legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }

/* 인증 카드 */
.share-row { display: flex; gap: 8px; flex-wrap: wrap; }
.card-preview { width: 100%; margin-top: 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); }

/* 설명 글 */
.about { max-width: 680px; margin: 48px auto 0; color: var(--ink-soft); }
.about h2 { color: var(--ink); font-size: 20px; }

@media (max-width: 640px) { .stats b { font-size: 16px; } }
@media (max-width: 860px) {
  .grid { grid-template-columns: 1fr; grid-template-areas: "timer" "today" "sound" "month" "share"; }
}
