/* 학습계획 (#/plan) — 손그림 칠판 · 단청 주홍 톤(한국사). plan.js 와 짝 (공인중개사 land/assets/plan.css 를 한국사 색으로) */
:root {
  --pl-ink: #3a2f28;
  --pl-board-1: #2f4b3f; --pl-board-2: #22382f; --pl-board-3: #1b2c25;
  --pl-frame: #9a6a3c;
  --pl-chalk: #f3f6f1; --pl-chalk-y: #ffe27a;
  --pl-bub: #ffffff; --pl-bub-line: #3a2f28;
  --pl-me: #c24a1f;                       /* 흰 글자를 얹는 주홍(대비 4.9) */
  --pl-acc: #d9582b; --pl-acc-ink: #b8431c; --pl-soft: #fff0e8;   /* 단청 주홍 · 글자용 · 옅은 바탕 */
  --pl-paper: #fffdf6;
  --pl-o: #10915a; --pl-d: #d98a00; --pl-x: #d93a3f;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --pl-bub: #1e242c; --pl-bub-line: #5b6676; --pl-paper: #1a1f26; --pl-me: #b8431c; --pl-acc: #ff8a4c; --pl-acc-ink: #ffa46e; --pl-soft: #3a1d10; --pl-o: #3ccf8e; --pl-d: #f0b35a; --pl-x: #ff6b6f; }
}
:root[data-theme="dark"] { --pl-bub: #1e242c; --pl-bub-line: #5b6676; --pl-paper: #1a1f26; --pl-me: #b8431c; --pl-acc: #ff8a4c; --pl-acc-ink: #ffa46e; --pl-soft: #3a1d10; --pl-o: #3ccf8e; --pl-d: #f0b35a; --pl-x: #ff6b6f; }

/* ---------- 헤더 버튼 (PC) ---------- */
.plan-pill { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 13px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--pl-acc) 40%, var(--line)); background: var(--pl-soft); color: var(--pl-acc-ink); font-size: 13px; font-weight: 800; white-space: nowrap; margin-right: 6px; }
.plan-pill svg { width: 17px; height: 17px; }
.plan-pill:hover, .plan-pill.on { background: var(--pl-me); border-color: var(--pl-me); color: #fff; }

/* ---------- 선생님 얼굴 ---------- */
.pl-av { flex: none; width: 46px; height: 46px; border-radius: 50%; overflow: hidden; background: #fbeee4; border: 2.5px solid var(--pl-ink); display: grid; place-items: center; box-shadow: 0 2px 0 rgba(58, 47, 40, .18); }
.pl-av .pl-tch { width: 100%; height: 100%; display: block; }
.pl-av .scene .sc { opacity: 1; }
.pl-tch-fb svg { width: 24px; height: 24px; }

/* ---------- 칠판 머리 ---------- */
.pl-board {
  position: relative; display: flex; align-items: center; gap: 18px; margin: 4px 0 18px; padding: 24px 28px 26px; overflow: hidden;
  background: radial-gradient(circle at 30% 20%, var(--pl-board-1), var(--pl-board-2) 60%, var(--pl-board-3));
  border: 10px solid var(--pl-frame); border-radius: 14px; color: var(--pl-chalk);
  box-shadow: 0 0 0 2.5px var(--pl-ink), inset 0 0 0 2px rgba(40, 28, 18, .7), inset 0 0 50px rgba(0, 0, 0, .4), 0 10px 0 -4px rgba(20, 30, 40, .12);
}
.pl-board::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(55% 22% at 28% 92%, rgba(255, 255, 255, .08), transparent 70%), radial-gradient(circle at 12% 30%, rgba(255, 255, 255, .2) 0 1px, transparent 1.6px), radial-gradient(circle at 70% 60%, rgba(255, 255, 255, .16) 0 1px, transparent 1.6px);
  background-size: 100% 100%, 90px 70px, 130px 104px;
}
/* 칠판 윗테: 단청 띠 (머리 띠와 같은 무늬) */
.pl-board::after { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 6px; pointer-events: none; background: #17806b url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='6' viewBox='0 0 48 6'%3E%3Crect width='48' height='6' fill='%2317806b'/%3E%3Crect x='10' width='12' height='6' fill='%23d9582b'/%3E%3Crect x='26' width='12' height='6' fill='%232b4fb3'/%3E%3Cpath d='M9.5 0V6M22.5 0V6M25.5 0V6M38.5 0V6' stroke='%23f7f0dc' stroke-width='1'/%3E%3Cpath d='M16 .7L18.6 3L16 5.3L13.4 3Z' fill='%23f2c14e'/%3E%3Ccircle cx='32' cy='3' r='1.3' fill='%23f7f0dc'/%3E%3Cpath d='M2 3H7M41 3H46' stroke='%2385d0b4' stroke-width='1' stroke-dasharray='1.5 1'/%3E%3C/svg%3E") 0 0 / 48px 6px repeat-x; }
.pl-board-in { position: relative; flex: 1; min-width: 0; }
.pl-chalk-date { position: absolute; top: -12px; right: 0; font-family: Gaegu, 'Nanum Pen Script', cursive; font-size: 17px; font-weight: 700; color: rgba(243, 246, 241, .66); }
.pl-kick { display: inline-flex; align-items: center; gap: 6px; font-family: Gaegu, 'Nanum Pen Script', cursive; font-size: 19px; font-weight: 700; color: var(--pl-chalk-y); }
.pl-kick svg { width: 18px; height: 18px; }
.pl-board h1 { margin: 4px 0 6px; font-size: 30px; font-weight: 900; letter-spacing: -0.035em; color: #f6f8f3; text-shadow: 0 1px 2px rgba(0, 0, 0, .35); }
.pl-board h1 em { font-style: normal; color: var(--pl-chalk-y); position: relative; white-space: nowrap; }
.pl-board h1 em::after { content: ''; position: absolute; left: -2px; right: -4px; bottom: -6px; height: 9px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 10' preserveAspectRatio='none'%3E%3Cpath d='M3 6 C40 2 72 9 112 5 S172 3 197 6' fill='none' stroke='%23ffe27a' stroke-width='3' stroke-linecap='round' opacity='.8'/%3E%3C/svg%3E") center / 100% 100% no-repeat; }
.pl-board p { margin: 0; font-size: 14.5px; color: rgba(243, 246, 241, .86); max-width: 44em; }
.pl-dd { position: relative; flex: none; display: grid; justify-items: center; gap: 0; min-width: 104px; padding: 10px 12px 9px; border-radius: 10px; background: #fffdf6; color: #2a2118; border: 2.5px solid var(--pl-ink); transform: rotate(2deg); box-shadow: 3px 4px 0 rgba(0, 0, 0, .25); }
.pl-dd em { font-style: normal; font-size: 11.5px; font-weight: 800; color: #fff; background: #e05252; border-radius: 6px; padding: 1px 8px; }
.pl-dd b { font-size: 28px; font-weight: 900; letter-spacing: -0.04em; line-height: 1.2; }
.pl-dd small { font-size: 12px; font-weight: 700; color: #48566a; }
.pl-eraser { position: absolute; right: 26px; bottom: -2px; width: 54px; height: 12px; border-radius: 3px 3px 0 0; background: linear-gradient(#5d6b7c 0 45%, #d8d4c8 45%); border: 2px solid var(--pl-ink); border-bottom: 0; }
.pl-chalk { position: absolute; right: 92px; bottom: -1px; width: 26px; height: 6px; border-radius: 3px; background: #fff; border: 1.5px solid var(--pl-ink); }

.pl-wrap { max-width: 760px; margin: 0 auto; }
.pl-note { margin: 10px 4px 0; font-size: 12.5px; color: var(--muted); }

/* ---------- 채팅 ---------- */
.pl-chat { position: relative; background: var(--pl-paper); border: 2px solid var(--pl-bub-line); border-radius: 18px 22px 16px 20px; padding: 16px 14px 12px; box-shadow: 4px 5px 0 color-mix(in srgb, var(--pl-ink) 14%, transparent); }
.pl-log { display: flex; flex-direction: column; gap: 12px; }
.pl-msg { display: flex; gap: 10px; align-items: flex-start; min-width: 0; }
.pl-msg.u { justify-content: flex-end; }
.pl-bub { position: relative; min-width: 0; max-width: 86%; padding: 11px 14px; border-radius: 16px 18px 18px 6px; font-size: 15px; line-height: 1.68; background: var(--pl-bub); border: 2px solid var(--pl-bub-line); color: var(--text); overflow-wrap: anywhere; animation: plIn .22s ease-out; }
.pl-msg.u .pl-bub { background: var(--pl-me); border-color: color-mix(in srgb, var(--pl-me) 70%, #000); color: #fff; border-radius: 18px 16px 6px 18px; font-weight: 600; }
.pl-bub small { display: block; margin-top: 4px; font-size: 13px; color: var(--muted); }
.pl-bub b { color: inherit; }
.pl-msg.t .pl-bub b { color: var(--pl-acc-ink); }
.pl-src { display: inline-block; margin-left: 6px; padding: 0 7px; border-radius: 99px; font-style: normal; font-size: 11px; font-weight: 700; color: var(--muted); background: var(--surface-2); vertical-align: 1px; }
.pl-src.ai { color: #7a4de0; background: color-mix(in srgb, #7a4de0 12%, transparent); }
@keyframes plIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.pl-dots { display: inline-flex; gap: 4px; padding: 4px 2px; }
.pl-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: plDot 1s infinite ease-in-out; }
.pl-dots i:nth-child(2) { animation-delay: .15s; } .pl-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes plDot { 0%, 80%, 100% { opacity: .3; transform: none; } 40% { opacity: 1; transform: translateY(-3px); } }
.pl-chat.busy .pl-form { opacity: .7; }
.pl-chat.busy .pl-send { pointer-events: none; }

.pl-quick { display: flex; flex-wrap: wrap; gap: 7px; margin: 12px 0 0 56px; }
.pl-quick:empty { display: none; }
.pl-quick.in { margin: 10px 0 0; }
.pl-qb { display: inline-flex; align-items: center; gap: 5px; min-height: 36px; padding: 6px 13px; border-radius: 999px; border: 2px solid var(--pl-me); background: var(--surface); color: var(--pl-acc-ink); font-size: 13.5px; font-weight: 800; line-height: 1.3; text-align: left; }
.pl-qb:hover { background: var(--pl-soft); }
.pl-qb.main { background: var(--pl-me); color: #fff; box-shadow: 0 3px 0 color-mix(in srgb, var(--pl-me) 55%, #000); }
.pl-qb.main:hover { filter: brightness(1.06); }
.pl-qb svg { width: 16px; height: 16px; }
.pl-dw { display: inline-flex; gap: 4px; padding: 3px; border-radius: 12px; background: var(--surface-2); }
.pl-dwb { width: 36px; height: 32px; border-radius: 9px; font-weight: 800; font-size: 14px; color: var(--muted); }
.pl-dwb.on { background: var(--pl-me); color: #fff; }
.pl-date { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.pl-date input { height: 36px; padding: 0 10px; border-radius: 10px; border: 2px solid var(--line-2); background: var(--surface); color: var(--text); font: inherit; }
.pl-bub .pl-date { margin-top: 8px; }

.pl-form { display: flex; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 2px dashed color-mix(in srgb, var(--pl-bub-line) 35%, transparent); }
.pl-in { flex: 1; min-width: 0; height: 46px; padding: 0 15px; border-radius: 14px; border: 2px solid var(--line-2); background: var(--surface); color: var(--text); font: inherit; font-size: 15.5px; }
.pl-in:focus { outline: none; border-color: var(--pl-me); box-shadow: 0 0 0 3px color-mix(in srgb, var(--pl-me) 22%, transparent); }
.pl-send { flex: none; width: 46px; height: 46px; border-radius: 14px; background: var(--pl-me); color: #fff; display: grid; place-items: center; }
.pl-send svg { width: 22px; height: 22px; }

/* ---------- 계획 미리보기 ---------- */
.pl-pv { margin: 10px 0 6px; padding: 12px 12px 10px; border-radius: 12px; background: var(--surface-2); border: 1.5px dashed var(--line-2); color: var(--text); font-weight: 400; }
.pl-pv-h { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.pl-pv-h b { font-size: 15.5px; color: var(--text) !important; }
.pl-pv-h span { font-size: 13px; color: var(--muted); }
.pl-pv-st { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.pl-pv-st li { display: grid; justify-items: center; padding: 7px 4px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); text-align: center; }
.pl-pv-st b { font-size: 20px; font-weight: 900; color: var(--pl-acc-ink) !important; line-height: 1.2; }
.pl-pv-st span { font-size: 11.5px; color: var(--muted); line-height: 1.3; }
.pl-pv-warn, .pl-pv-ok { display: flex; gap: 8px; margin: 10px 0 0; padding: 9px 11px; border-radius: 10px; font-size: 13.5px; line-height: 1.6; }
.pl-pv-warn { background: var(--warn-soft); color: var(--text-2); }
.pl-pv-ok { background: var(--ok-soft); color: var(--text-2); }
.pl-pv-warn svg, .pl-pv-ok svg { flex: none; width: 17px; height: 17px; margin-top: 3px; color: var(--warn); }
.pl-pv-ok svg { color: var(--ok); }
.pl-pv-ord { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; margin-top: 10px; font-size: 12.5px; }
.pl-pv-ord em { font-style: normal; color: var(--muted); font-weight: 700; margin-right: 2px; }
.pl-pv-ord span { padding: 2px 9px; border-radius: 99px; background: color-mix(in srgb, var(--c) 14%, var(--surface)); color: var(--text); font-weight: 700; border: 1px solid color-mix(in srgb, var(--c) 40%, transparent); }
.pl-pv-ord span.off { background: none; border-style: dashed; border-color: var(--line-2); color: var(--muted); }
.pl-pv-days { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 4px; font-size: 13.5px; }
.pl-pv-days li { display: grid; grid-template-columns: 62px minmax(0, 1fr); gap: 6px; align-items: baseline; padding: 5px 8px; border-radius: 8px; background: var(--surface); }
.pl-pv-days em { font-style: normal; font-weight: 800; color: var(--text-2); }
.pl-pv-days span { min-width: 0; color: var(--text); }
.pl-pv-days small { display: inline; color: var(--muted); font-size: 12px; margin: 0; }
.pl-k { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; background: var(--c, var(--pl-acc)); }
.pl-k.r { background: #7a4de0; } .pl-k.f { background: #e0620d; } .pl-k.e { background: #e05252; }

.pl-ordp { display: grid; gap: 5px; margin: 10px 0 8px; }
.pl-or { display: grid; grid-template-columns: 24px minmax(0, 1fr) 32px 32px auto; gap: 5px; align-items: center; padding: 6px 8px; border-radius: 10px; background: var(--surface); border: 1.5px solid color-mix(in srgb, var(--c) 45%, var(--line)); color: var(--text); }
.pl-or .n { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--c); color: #fff; font-size: 12px; font-weight: 800; }
.pl-or b { font-size: 13.5px; color: var(--text) !important; min-width: 0; }
.pl-or button { height: 30px; border-radius: 8px; background: var(--surface-2); font-size: 12px; font-weight: 800; color: var(--text-2); }
.pl-or button:disabled { opacity: .35; cursor: default; }
.pl-or .tg { padding: 0 9px; }
.pl-or.off { opacity: .55; border-style: dashed; }
.pl-or.off b { text-decoration: line-through; }

.pl-diff { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 4px; font-size: 13.5px; }
.pl-diff li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 10px; border-radius: 8px; background: var(--surface-2); }
.pl-diff em { font-style: normal; color: var(--muted); }
.pl-mini { display: grid; gap: 6px; margin-top: 8px; }

/* ---------- 오늘 할 일 ---------- */
.pl-sec { margin-top: 24px; }
.pl-sec-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 0 2px 10px; }
.pl-sec-h h2 { display: inline-flex; align-items: center; gap: 7px; font-size: 19px; font-weight: 900; }
.pl-sec-h h2 svg { width: 20px; height: 20px; color: var(--pl-acc-ink); }
.pl-sec-h span { font-size: 12.5px; color: var(--muted); }
.pl-tasks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.pl-tasks.sm { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 8px; }
.pl-task { position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 11px; align-items: center; padding: 13px 14px; border-radius: 16px 18px 14px 17px; background: var(--surface); border: 2px solid var(--pl-bub-line); color: var(--text); box-shadow: 3px 4px 0 color-mix(in srgb, var(--pl-ink) 12%, transparent); transition: transform .12s ease; }
a.pl-task:hover { transform: translateY(-2px); border-color: var(--pl-me); }
.pl-task.big { padding: 16px 16px; }
.pl-tk-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--pl-soft); color: var(--pl-acc-ink); }
.pl-tk-ic svg { width: 21px; height: 21px; }
.pl-tk-tx { min-width: 0; display: grid; }
.pl-tk-tx b { font-size: 15px; font-weight: 800; line-height: 1.35; }
.pl-tk-tx small { font-size: 12.5px; color: var(--muted); line-height: 1.45; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.pl-tk-st { display: grid; place-items: center; color: var(--muted); }
.pl-tk-st svg { width: 18px; height: 18px; }
.pl-tk-st em { font-style: normal; font-size: 12.5px; font-weight: 800; color: var(--pl-acc-ink); background: var(--pl-soft); padding: 2px 8px; border-radius: 99px; }
.pl-ck { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--pl-o); color: #fff; }
.pl-ck svg { width: 18px; height: 18px; stroke-width: 3; }
.pl-task.done { background: color-mix(in srgb, var(--pl-o) 7%, var(--surface)); border-color: color-mix(in srgb, var(--pl-o) 55%, var(--pl-bub-line)); }
.pl-task.done .pl-tk-tx b { text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--pl-o) 70%, transparent); text-decoration-thickness: 2px; }
.pl-task.done .pl-tk-ic { background: color-mix(in srgb, var(--pl-o) 14%, transparent); color: var(--pl-o); }

.pl-nag { margin: 0 0 6px; }
.pl-nag .pl-bub { border-color: var(--warn); background: color-mix(in srgb, var(--warn) 8%, var(--pl-bub)); }

/* ---------- 진도 ---------- */
.pl-prog { padding: 16px 18px; display: grid; gap: 9px; border: 2px solid var(--pl-bub-line); border-radius: 18px 16px 18px 15px; }
.pl-fc { display: flex; gap: 16px; align-items: center; padding-bottom: 12px; margin-bottom: 4px; border-bottom: 2px dashed var(--line); }
.pl-fc-big { flex: none; display: grid; justify-items: center; min-width: 96px; }
.pl-fc-big b { font-size: 34px; font-weight: 900; color: var(--pl-acc-ink); line-height: 1.1; letter-spacing: -0.03em; }
.pl-fc-big span { font-size: 12px; color: var(--muted); }
.pl-fc p { margin: 0; font-size: 14.5px; line-height: 1.65; min-width: 0; }
.pl-fc em { font-style: normal; font-weight: 800; font-size: 12.5px; padding: 1px 8px; border-radius: 99px; white-space: nowrap; }
.pl-fc em.late { color: var(--bad); background: var(--bad-soft); }
.pl-fc em.ok { color: var(--ok); background: var(--ok-soft); }
.pl-fc small { color: var(--muted); font-size: 12.5px; }
.pl-sb { display: grid; grid-template-columns: 76px minmax(0, 1fr) 52px 86px; gap: 10px; align-items: center; font-size: 13.5px; }
.pl-sb b { font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-bar { height: 10px; border-radius: 99px; background: var(--surface-2); overflow: hidden; border: 1.5px solid color-mix(in srgb, var(--c) 35%, var(--line)); }
.pl-bar span { display: block; height: 100%; border-radius: 99px; background: var(--c); min-width: 0; }
.pl-sb em { font-style: normal; font-weight: 800; text-align: right; font-variant-numeric: tabular-nums; }
.pl-sb i { font-style: normal; font-size: 12.5px; color: var(--muted); text-align: right; white-space: nowrap; }

/* ---------- 달력 ---------- */
.pl-cal { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 12px; }
.pl-month { padding: 12px 12px 10px; border-radius: 16px; background: var(--surface); border: 2px solid var(--pl-bub-line); }
.pl-month h3 { font-family: Gaegu, 'Nanum Pen Script', cursive; font-size: 21px; font-weight: 700; margin: 0 0 6px 4px; color: var(--text); }
.pl-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.pl-grid .wd { text-align: center; font-size: 11.5px; font-weight: 800; color: var(--muted); padding: 2px 0; }
.pl-grid .wd.sun { color: #e05252; } .pl-grid .wd.sat { color: #2f6fed; }
.pl-grid .c { position: relative; min-height: 44px; border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 1px; padding: 4px 0 3px; font-size: 13px; color: var(--text); background: var(--surface-2); border: 1.5px solid transparent; }
.pl-grid button.c:hover { border-color: var(--pl-me); }
.pl-grid .c b { font-weight: 700; font-size: 12.5px; line-height: 1.2; }
.pl-grid .c.out { background: none; color: color-mix(in srgb, var(--muted) 55%, transparent); }
.pl-grid .c.today { border-color: var(--pl-me); background: var(--pl-soft); box-shadow: 0 0 0 2px color-mix(in srgb, var(--pl-me) 30%, transparent); }
.pl-grid .c.today b { color: var(--pl-acc-ink); font-weight: 900; }
.pl-grid .c.sel { border-color: var(--pl-ink); }
.pl-grid .c.k-e { background: color-mix(in srgb, #e05252 14%, var(--surface)); }
.pl-grid .c.k-f { background: color-mix(in srgb, #e0620d 9%, var(--surface-2)); }
.pl-grid .pad { min-height: 44px; }
.pl-mk { font-style: normal; font-family: Gaegu, 'Nanum Pen Script', cursive; font-size: 21px; font-weight: 700; line-height: .9; }
.pl-mk.o { color: var(--pl-o); } .pl-mk.d { color: var(--pl-d); } .pl-mk.x { color: var(--pl-x); }
.pl-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--pl-acc)); margin-top: 3px; }
.pl-dot.r { background: #7a4de0; } .pl-dot.f { background: #e0620d; }
.pl-rvd { position: absolute; top: 4px; right: 4px; width: 6px; height: 6px; border-radius: 50%; background: var(--bad); }
.pl-legend .pl-rvd { position: static; display: inline-block; margin-right: 4px; }
.pl-star { font-style: normal; color: #e05252; font-size: 14px; line-height: 1.1; }
.pl-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 10px 4px 0; font-size: 12px; color: var(--muted); }
.pl-legend span { display: inline-flex; align-items: center; gap: 5px; }
.pl-legend .pl-dot { margin: 0; }
.pl-dayd { margin-top: 10px; padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 2px dashed var(--line-2); }
.pl-dd-h { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; margin-bottom: 6px; }
.pl-dd-h b { font-size: 15px; }
.pl-dd-h span { font-size: 12.5px; color: var(--muted); }
.pl-dd-l { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.pl-dd-l a { display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 6px 8px; border-radius: 8px; background: var(--surface-2); font-size: 13.5px; }
.pl-dd-l a:hover { background: var(--pl-soft); }
.pl-dd-l i { width: 8px; height: 8px; border-radius: 50%; }
.pl-dd-l span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-dd-l small { color: var(--muted); font-size: 11.5px; white-space: nowrap; }
.pl-dd-l li.done span { text-decoration: line-through; color: var(--muted); }
.pl-dd-p { margin: 0; font-size: 13.5px; }
.pl-dd-rv { display: flex; gap: 6px; align-items: center; margin: 8px 0 0; font-size: 13px; color: var(--bad); }
.pl-dd-rv svg { width: 15px; height: 15px; flex: none; }

.pl-foot { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 26px; }

/* ---------- 홈 카드 ---------- */
.pl-home { position: relative; margin: 0 0 18px; padding: 14px 16px; border-radius: 18px 20px 16px 19px; background: var(--pl-paper); border: 2px solid var(--pl-bub-line); box-shadow: 4px 5px 0 color-mix(in srgb, var(--pl-ink) 12%, transparent); }
.hm-has-plan > .pl-home { margin: 20px 0 6px; }      /* 히어로 바로 아래 — 권유 카드와 같은 간격 */
.pl-home.invite { display: flex; align-items: center; gap: 14px; margin: 20px 0 6px; }
.pl-h-top { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.pl-h-tx { flex: 1; min-width: 0; display: grid; }
.pl-h-tx b { font-size: 16.5px; font-weight: 900; line-height: 1.4; }
.pl-h-tx b em { font-style: normal; color: var(--pl-acc-ink); }
.pl-h-tx span { font-size: 13px; color: var(--muted); }
.pl-h-tx span em { font-style: normal; font-weight: 800; color: var(--pl-acc-ink); }
.pl-home.invite { border-color: color-mix(in srgb, var(--pl-acc) 70%, var(--pl-bub-line)); background: linear-gradient(120deg, color-mix(in srgb, var(--pl-acc) 10%, var(--pl-paper)), var(--pl-paper) 60%); }
.pl-h-more { flex: none; display: inline-flex; align-items: center; gap: 2px; font-size: 13.5px; font-weight: 800; color: var(--pl-acc-ink); }
.pl-h-more svg { width: 16px; height: 16px; }
.pl-h-nag { display: flex; gap: 6px; align-items: center; margin: -2px 0 10px; padding: 7px 10px; border-radius: 10px; background: var(--warn-soft); color: var(--warn); font-size: 13px; font-weight: 700; }
.pl-h-nag svg { width: 15px; height: 15px; flex: none; }
.pl-home .pl-task { padding: 10px 12px; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 9px; box-shadow: none; border-width: 1.5px; }
.pl-home .pl-tk-ic { width: 34px; height: 34px; border-radius: 10px; }
.pl-home .pl-tk-tx b { font-size: 14px; }
.pl-home .btn { flex: none; }
.pl-home .btn.primary { background: var(--pl-me); border-color: var(--pl-me); color: #fff; }
.pl-nag.lv .pl-bub { border-color: var(--pl-acc); background: color-mix(in srgb, var(--pl-acc) 7%, var(--pl-bub)); }

/* ---------- 홈 바로가기 7칸 · 집중 타이머 끝 · AI 시트 입구 ---------- */
.hm-quick { grid-template-columns: repeat(7, 1fr); }
@media (max-width: 640px) { .hm-quick { grid-template-columns: repeat(4, 1fr); } }
.plan-next { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 11px 13px; border-radius: 12px; background: var(--pl-soft); border: 1.5px solid color-mix(in srgb, var(--pl-acc) 35%, transparent); }
.plan-next > svg { width: 22px; height: 22px; flex: none; color: var(--pl-acc-ink); }
.plan-next span { flex: 1; min-width: 0; display: grid; line-height: 1.45; }
.plan-next small { font-size: 12px; color: var(--muted); }
.plan-next b { font-size: 14.5px; }
.plan-next em { font-style: normal; font-size: 12.5px; color: var(--text-2); }
.plan-next.done { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 35%, transparent); }
.plan-next.done > svg { color: var(--ok); }
.ait-plan { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 9px 12px; border-radius: 12px; background: var(--pl-soft); color: var(--pl-acc-ink); border: 1px solid color-mix(in srgb, var(--pl-acc) 30%, transparent); }
.ait-plan svg { width: 20px; height: 20px; flex: none; }
.ait-plan span { display: grid; line-height: 1.4; }
.ait-plan b { font-size: 13.5px; }
.ait-plan small { font-size: 12px; color: var(--text-2); }

/* ---------- 휴대폰 ---------- */
@media (max-width: 860px) {
  .pl-board { padding: 18px 16px 22px; border-width: 8px; gap: 10px; align-items: flex-start; }
  .pl-board h1 { font-size: 23px; }
  .pl-board p { font-size: 13.5px; }
  .pl-chalk-date { display: none; }
  .pl-dd { min-width: 80px; padding: 7px 8px; }
  .pl-dd b { font-size: 21px; }
  .pl-eraser, .pl-chalk { display: none; }
}
@media (max-width: 640px) {
  .pl-tasks { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .pl-tasks.sm { grid-template-columns: minmax(0, 1fr); }
  .pl-chat { padding: 12px 10px 10px; border-radius: 16px; }
  .pl-av { width: 38px; height: 38px; }
  .pl-msg { gap: 7px; }
  .pl-bub { max-width: calc(100% - 45px); font-size: 14.5px; padding: 10px 12px; }
  .pl-msg.u .pl-bub { max-width: 84%; }
  .pl-quick { margin-left: 0; }
  .pl-pv-st { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pl-pv-days li { grid-template-columns: 54px minmax(0, 1fr); }
  .pl-sb { grid-template-columns: 52px minmax(0, 1fr) 40px 74px; gap: 7px; font-size: 13px; }
  .pl-sb i { font-size: 11.5px; }
  .pl-fc { gap: 12px; }
  .pl-fc-big { min-width: 76px; }
  .pl-fc-big b { font-size: 28px; }
  .pl-cal { grid-template-columns: minmax(0, 1fr); }
  .pl-home.invite { flex-wrap: wrap; }
  .pl-home.invite .pl-h-tx { flex-basis: calc(100% - 64px); }
  .pl-home.invite .btn { width: 100%; justify-content: center; }
  .pl-or { grid-template-columns: 22px minmax(0, 1fr) 30px 30px auto; }
}
@media (prefers-reduced-motion: reduce) { .pl-bub, .pl-dots i { animation: none; } }

/* 서브 화면 맨 위 '오늘 할 일' 한 줄 막대 */
.pl-sub { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 14px; padding: 9px 14px; border-radius: 14px; background: var(--pl-paper); border: 1.5px solid var(--pl-bub-line); font-size: 14px; }
.pl-sub > svg { width: 18px; height: 18px; flex: none; color: var(--pl-acc-ink); }
.pl-sub-h { font-weight: 700; color: inherit; text-decoration: none; }
.pl-sub-h em { font-style: normal; color: var(--pl-acc-ink); }
.pl-sub-go { margin-left: auto; font-weight: 600; color: var(--pl-acc-ink); text-decoration: none; display: inline-flex; align-items: center; gap: 4px; min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-sub-go svg { width: 14px; height: 14px; flex: none; }
.pl-sub-done { margin-left: auto; font-weight: 600; }
@media (max-width: 560px) { .pl-sub { font-size: 13px; padding: 8px 12px; } .pl-sub-go { margin-left: 0; flex-basis: 100%; } }

/* 헤더(급수 선택·검색·테마·학습계획·타이머): 남는 폭은 검색창이 먼저 쓰게 — 학습계획 버튼이 들어가도 검색창이 너무 좁아지지 않게 */
.topbar .hdr-row .search { flex: 5 1 0; }
@media (max-width: 1060px) {
  .topbar .plan-pill { padding: 0 10px; margin-right: 4px; }
  .topbar .plan-pill span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
