/* ✅ 오늘 할 일 (학생·선생님 화면) */
.td-wrap { max-width: 760px; margin: 0 auto; padding: 18px 16px 40px; }
.td-box { background: #fff; border-radius: 18px; padding: 20px; margin: 14px 0; box-shadow: 0 2px 10px rgba(0,0,0,.07); }
.td-box h2 { margin: 0 0 10px; font-size: 1.35rem; color: #5a4129; }
.td-big-title { text-align: center; font-size: clamp(1.5rem, 4.5vw, 2.1rem); color: #5a4129; margin: 8px 0 4px; }
.td-sub { text-align: center; color: #8a6d4f; font-size: 1.1rem; margin: 0 0 6px; }
.td-msg { text-align: center; font-size: 1.15rem; color: #5a4129; }
.td-msg.err { color: #c92a2a; }
.td-form { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.td-form input { font-size: 1.4rem; padding: 12px 14px; border: 2px solid #e0cdb4; border-radius: 12px; min-width: 0; flex: 1; max-width: 320px; }
.td-btn { background: #7a5c3e; color: #fff; font-size: 1.2rem; font-weight: 800; padding: 12px 22px; border-radius: 14px; }
.td-btn.alt { background: #efe6da; color: #5a4129; }
.td-btn.save { background: #2f9e44; font-size: 1.5rem; padding: 16px; width: 100%; margin-top: 14px; }
.td-btn.save:disabled { background: #b8c9bb; cursor: default; }
.td-btn.small { font-size: .95rem; padding: 7px 12px; font-weight: 700; }

/* 번호 고르기 */
.td-nums { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 10px; }
.td-nums button { font-size: 2rem; font-weight: 900; padding: 16px 0; background: #fff7e6; color: #5a4129; border: 3px solid #f0c060; border-radius: 16px; }
.td-nums button:active, .td-nums button:hover { background: #ffd166; }
.td-me { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; font-size: 1.3rem; }
.td-me b { background: #ffd166; color: #5a3e22; border-radius: 14px; padding: 4px 16px; font-size: 1.8rem; }

/* 할 일 카드 */
.td-items { display: grid; gap: 12px; }
.td-item { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; background: #fff; border: 3px solid #e8dccb; border-radius: 18px; padding: 16px 18px; font-size: 1.45rem; font-weight: 800; color: #4a3826; min-height: 78px; transition: transform .08s, background .15s, border-color .15s; }
.td-item:active { transform: scale(.98); }
.td-item .em { font-size: 2.2rem; width: 2.6rem; text-align: center; flex-shrink: 0; }
.td-item .tx { flex: 1; word-break: keep-all; }
.td-item .ck { width: 52px; height: 52px; border-radius: 14px; border: 3px solid #d9c6ad; display: flex; align-items: center; justify-content: center; font-size: 2rem; color: #fff; flex-shrink: 0; background: #fff; }
.td-item.on { background: #ebfbee; border-color: #69db7c; }
.td-item.on .ck { background: #2f9e44; border-color: #2f9e44; }
.td-item.on .tx { color: #2b8a3e; }
.td-item[disabled] { opacity: .75; cursor: default; }
.td-own-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 18px 0 8px; font-size: 1.15rem; color: #5a4129; font-weight: 800; }
.td-own-row { display: flex; gap: 8px; align-items: stretch; }
.td-own-row .td-item { flex: 1; }
.td-del { background: #fff0f0; color: #c92a2a; font-size: 1.2rem; border-radius: 14px; padding: 0 14px; }
.td-add { display: grid; gap: 10px; background: #fbf7f1; border-radius: 14px; padding: 12px; margin-top: 8px; }
.td-add input { font-size: 1.3rem; padding: 10px 12px; border: 2px solid #e0cdb4; border-radius: 12px; }
.td-emo { display: flex; flex-wrap: wrap; gap: 6px; }
.td-emo button { font-size: 1.6rem; background: #fff; border: 2px solid #eee; border-radius: 10px; padding: 4px 8px; }
.td-emo button.on { border-color: #f0a020; background: #fff3d6; }
.td-progress { height: 18px; background: #f1e9de; border-radius: 99px; overflow: hidden; margin: 6px 0 2px; }
.td-progress i { display: block; height: 100%; background: linear-gradient(90deg, #ffd166, #2f9e44); border-radius: 99px; transition: width .3s; }
.td-count { text-align: center; color: #5a4129; font-weight: 800; font-size: 1.15rem; }
.td-note { background: #fff3bf; color: #5c4400; border-radius: 12px; padding: 10px 14px; font-size: 1.05rem; margin: 10px 0; }

/* 연속 기록 · 도장판 */
.td-streak { text-align: center; font-size: 1.5rem; font-weight: 900; color: #e8590c; margin: 4px 0 12px; }
.td-board { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.td-board div { background: #fbf7f1; border: 2px dashed #e0cdb4; border-radius: 16px; text-align: center; padding: 8px 2px 10px; }
.td-board div.today { border: 3px solid #f0a020; background: #fff7e6; }
.td-board small { display: block; font-weight: 800; color: #8a6d4f; font-size: 1rem; }
.td-board span { display: flex; align-items: center; justify-content: center; height: 52px; font-size: 2.3rem; }
.td-stamp-mini { display: inline-flex; width: 50px; height: 50px; border-radius: 50%; border: 4px solid #e03131; color: #e03131; font-size: .78rem !important; font-weight: 900; line-height: 1.05; transform: rotate(-12deg); }

/* 도장 애니메이션 */
.td-ov { position: fixed; inset: 0; z-index: 1000; background: rgba(255,250,240,.92); display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; }
.td-stamp { width: min(62vw, 300px); height: min(62vw, 300px); border-radius: 50%; border: 12px solid #e03131; color: #e03131; display: flex; flex-direction: column; align-items: center; justify-content: center; font-weight: 900; font-size: min(11vw, 54px); line-height: 1.15; text-align: center; background: rgba(255,255,255,.6); animation: tdStamp .7s cubic-bezier(.2,1.6,.4,1) both; }
.td-stamp small { font-size: .45em; }
.td-ov p { font-size: clamp(1.3rem, 4.5vw, 2rem); font-weight: 900; color: #5a4129; margin: 22px 10px 6px; text-align: center; animation: tdUp .5s .5s both; }
.td-ov small.close { color: #a07a55; animation: tdUp .5s .8s both; }
.td-confetti { position: fixed; top: -40px; font-size: 2rem; animation: tdFall 2.4s linear forwards; pointer-events: none; }
@keyframes tdStamp { 0% { transform: scale(3) rotate(-40deg); opacity: 0; } 60% { opacity: 1; } 100% { transform: scale(1) rotate(-12deg); opacity: 1; } }
@keyframes tdUp { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes tdFall { to { transform: translateY(110vh) rotate(540deg); } }

/* 선생님 화면 */
.td-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 4px; }
.td-tabs button { font-size: 1.05rem; font-weight: 800; padding: 10px 18px; border-radius: 999px; border: 2px solid #f0c060; background: #fff; color: #4a3826; }
.td-tabs button.on { background: #f0a020; border-color: #f0a020; color: #fff; }
.td-link { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.td-link code { background: #f6efe6; padding: 8px 10px; border-radius: 8px; font-size: .95rem; word-break: break-all; flex: 1; min-width: 220px; }
.td-ed-row { display: flex; gap: 6px; align-items: center; padding: 6px 0; border-top: 1px solid #f1e9de; }
.td-ed-row .emo { width: 3.2em; text-align: center; font-size: 1.3rem; padding: 6px; border: 1px solid #ddd; border-radius: 8px; }
.td-ed-row .txt { flex: 1; min-width: 120px; font-size: 1.05rem; padding: 8px; border: 1px solid #ddd; border-radius: 8px; }
.td-ed-row button { padding: 6px 9px; background: #f6efe6; color: #5a4129; }
.td-ed-row button.x { background: #fff0f0; color: #c92a2a; }
.td-day { border: 1px solid #efe6da; border-radius: 12px; padding: 10px 12px; margin: 10px 0; }
.td-day > label { font-weight: 800; color: #5a4129; display: flex; gap: 8px; align-items: center; }
.td-opts { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; margin: 6px 0 12px; }
.td-opts label { font-weight: 700; display: flex; gap: 6px; align-items: center; }
.td-opts input[type=number] { width: 5em; font-size: 1.05rem; padding: 6px; }
.td-table-wrap { overflow-x: auto; }
.td-table { border-collapse: collapse; width: 100%; font-size: 15px; }
.td-table th, .td-table td { border-bottom: 1px solid #eee; padding: 6px 6px; text-align: center; white-space: nowrap; }
.td-table th { background: #f8f3ec; color: #5a4129; font-size: 13px; }
.td-table th .em { display: block; font-size: 20px; }
.td-table td.no { font-weight: 900; color: #7a5c3e; }
.td-table tr.miss td { color: #bbb; }
.td-table tr.all td.no { background: #ebfbee; }
.td-table button { padding: 3px 8px; font-size: 12px; background: #f6efe6; color: #5a4129; }
.td-datebar { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.td-datebar input { font-size: 1rem; padding: 6px; }
.td-datebar button { background: #efe6da; color: #5a4129; font-weight: 700; }
.td-strip { letter-spacing: 1px; font-size: 14px; }
@media (max-width: 520px) { .td-item { font-size: 1.25rem; padding: 12px; } .td-item .em { font-size: 1.9rem; } .td-board span { font-size: 1.8rem; } }
/* 설정: 없는 번호 빼기 */
.td-skip { display: flex; flex-wrap: wrap; gap: 6px; }
.td-skip button { width: 44px; padding: 8px 0; font-weight: 800; background: #fff7e6; color: #5a4129; border: 2px solid #f0c060; }
.td-skip button.off { background: #eee; color: #aaa; border-color: #ddd; text-decoration: line-through; }
.td-setup { margin-top: 6px; }
/* 학급 보물 (학생) */
.cb-enter { max-width: 560px; margin: 10px auto; text-align: center; }
.cb-tools { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin: 14px 0; }
.cb-tools a { display: flex; flex-direction: column; align-items: center; gap: 6px; background: linear-gradient(180deg,#fffdf7,#fff6e3); border: 2px solid #f3dca8; border-radius: 20px; padding: 24px 14px; text-decoration: none; color: #5a4129; box-shadow: 0 3px 10px rgba(0,0,0,.08); transition: transform .12s; }
.cb-tools a:hover { transform: translateY(-3px); border-color: #7a5c3e; }
.cb-tools .ico { font-size: 3rem; line-height: 0; }
.cb-tools .ico img { width: 88px; height: 88px; object-fit: contain; transition: transform .2s; }
.cb-tools a:hover .ico img { transform: scale(1.08) rotate(-4deg); }
.cb-tools b { font-size: 1.45rem; }
.cb-tools small { color: #7a6a58; font-size: 1rem; text-align: center; word-break: keep-all; }
.cb-teacher { text-align: center; margin: 30px 0 0; font-size: .9rem; }
.cb-teacher a { color: #a07a55; }
