* { box-sizing: border-box; }
body { margin: 0; font-family: "Pretendard", "Noto Sans KR", sans-serif; background: #faf7f0; color: #2b2b2b; }
header { display: flex; justify-content: space-between; align-items: center; padding: 16px 24px; background: #7a5c3e; color: #fff; }
header h1 { margin: 0; font-size: 1.4rem; }
button { border: 0; border-radius: 8px; padding: 8px 14px; cursor: pointer; font-size: .95rem; }
#loginBtn, #logoutBtn { background: #fff; color: #7a5c3e; }
#userName { margin-right: 8px; }
main { max-width: 1000px; margin: 0 auto; padding: 24px; }
.hint { color: #777; }
.pickers { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
select { padding: 8px; border-radius: 8px; border: 1px solid #ccc; font-size: 1rem; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.card { background: #fff; border-radius: 12px; padding: 18px; box-shadow: 0 2px 6px rgba(0,0,0,.08); }
.card h3 { margin: 0 0 12px; }
.card a { display: inline-block; background: #7a5c3e; color: #fff; text-decoration: none; padding: 8px 12px; border-radius: 8px; }
.card .empty { color: #aaa; }
.home-link { color: inherit; text-decoration: none; }
#adminBtn { background: #fff; color: #7a5c3e; margin-right: 6px; font-size: 1.05rem; }
.admin-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.admin-head h2 { margin: 0; font-size: 1.2rem; }
.admin-head button, .admin-btns button { background: #7a5c3e; color: #fff; }
.admin-head #adminClose { background: #eee; color: #333; }
.btn-link { margin-right: 8px; color: #7a5c3e; font-weight: 700; }
.admin-form { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; background: #fff; padding: 16px; border-radius: 12px; margin: 16px 0; box-shadow: 0 2px 6px rgba(0,0,0,.08); }
.admin-form label { display: flex; flex-direction: column; font-size: .9rem; font-weight: 700; gap: 4px; }
.admin-form .wide { grid-column: 1 / -1; }
.admin-form input { padding: 8px; border: 1px solid #ccc; border-radius: 8px; font-size: 1rem; }
.admin-btns { display: flex; gap: 8px; align-items: center; }
.admin-btns #adminReset { background: #eee; color: #333; }
#adminMsg { color: #7a5c3e; font-weight: 700; }
.admin-search { width: 100%; padding: 8px; border: 1px solid #ccc; border-radius: 8px; margin-bottom: 8px; font-size: 1rem; }
.admin-list { width: 100%; border-collapse: collapse; background: #fff; border-radius: 12px; overflow: hidden; }
.admin-list th, .admin-list td { padding: 8px; border-bottom: 1px solid #eee; text-align: left; font-size: .92rem; }
.admin-list .acts { white-space: nowrap; }
.admin-list .acts button { padding: 4px 10px; background: #eee; margin-left: 4px; }
.admin-list .acts .del { background: #ffe1e1; color: #b00020; }
@media (max-width: 640px) { .admin-form { grid-template-columns: 1fr; } }
#adminHome { margin-right: 8px; }
#welcome h2 { margin-top: 0; }
#welcome h3 { margin-top: 24px; }
.card .desc { color: #555; font-size: .92rem; margin: 0 0 12px; }
.feature-list { line-height: 1.8; padding-left: 20px; }
.login-card { max-width: 520px; margin: 20px auto; background: #fff; border-radius: 14px; padding: 24px; box-shadow: 0 2px 10px rgba(0,0,0,.1); }
.login-card h2 { margin-top: 0; }
.wide-btn { width: 100%; background: #7a5c3e; color: #fff; padding: 12px; font-size: 1rem; }
.wide-btn small, .login-card label small { opacity: .8; font-weight: 400; }
.or { text-align: center; color: #999; margin: 14px 0; }
#krForm label { display: block; font-weight: 700; margin-bottom: 6px; }
.kr-row { display: flex; gap: 6px; }
.kr-row input { flex: 1; padding: 10px; border: 1px solid #ccc; border-radius: 8px; font-size: 1rem; }
.kr-row button { background: #7a5c3e; color: #fff; }
.login-msg { color: #7a5c3e; font-weight: 700; min-height: 1.2em; }
.link-btn { background: none; color: #777; text-decoration: underline; padding: 0; }
.site-footer { text-align: center; color: #888; font-size: .85rem; padding: 24px 0 32px; }
.site-footer a { color: #7a5c3e; }
.site-nav { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; background: #efe6da; padding: 10px; }
.site-nav a { color: #5a4129; font-weight: 700; text-decoration: none; }
.doc { max-width: 820px; margin: 0 auto; background: #fff; border-radius: 14px; padding: 24px 28px; line-height: 1.8; }
.doc h1 { font-size: 1.5rem; margin-top: 0; }
.doc h2 { font-size: 1.15rem; margin-top: 28px; color: #5a4129; }
.doc .lead { font-size: 1.05rem; }
.doc .meta, .story-list .meta { color: #888; font-size: .88rem; }
.books { display: grid; gap: 14px; }
.book { border: 1px solid #eadfce; border-radius: 12px; padding: 14px 18px; background: #fffaf3; }
.book h3 { margin: 0 0 4px; }
.book.todo { border-style: dashed; color: #999; }
.story-list { list-style: none; padding: 0; }
.story-list li { border-bottom: 1px solid #eee; padding: 14px 0; }
.story-list li p { margin: 6px 0 0; color: #555; }
.story-list .meta { margin-left: 10px; }
.admin-form textarea { padding: 8px; border: 1px solid #ccc; border-radius: 8px; font-size: 1rem; font-family: inherit; line-height: 1.6; }
.book { display: grid; grid-template-columns: 120px 1fr; gap: 16px; align-items: start; }
.book img { width: 120px; border-radius: 6px; box-shadow: 0 2px 8px rgba(0,0,0,.18); display: block; }
.book .buy { display: inline-block; margin-top: 4px; background: #7a5c3e; color: #fff; padding: 6px 12px; border-radius: 8px; text-decoration: none; font-weight: 700; font-size: .9rem; }
@media (max-width: 520px) { .book { grid-template-columns: 90px 1fr; } .book img { width: 90px; } }
.ask-btns { display: flex; gap: 10px; flex-wrap: wrap; margin: 16px 0; }
.ask-btns button { background: #7a5c3e; color: #fff; padding: 12px 18px; font-size: 1rem; }
.ask-form { background: #fffaf3; border: 1px solid #eadfce; border-radius: 12px; padding: 16px 18px; margin-bottom: 16px; }
.ask-form h2 { margin-top: 0; }
.ask-form label { display: flex; flex-direction: column; gap: 4px; font-weight: 700; margin-bottom: 12px; }
.ask-form label.check { flex-direction: row; align-items: flex-start; gap: 8px; font-weight: 400; font-size: .92rem; }
.ask-form textarea, .ask-form input[type=email] { padding: 10px; border: 1px solid #ccc; border-radius: 8px; font-size: 1rem; font-family: inherit; }
.ask-actions { display: flex; gap: 12px; align-items: center; }
.ask-actions #askSend { background: #7a5c3e; color: #fff; padding: 10px 22px; }
.inq-body { white-space: pre-wrap; max-width: 420px; }
.inq-done { opacity: .55; }
.tool-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 8px 0; }
.tool-row input { padding: 8px; border: 1px solid #ccc; border-radius: 8px; }
.tool-row button { background: #b00020; color: #fff; }
.badge { background: #b00020; color: #fff; border-radius: 999px; padding: 2px 8px; font-size: .8rem; vertical-align: middle; }
.hero { max-width: 900px; margin: 0 auto 20px; text-align: center; }
.hero h2 { font-size: 1.6rem; margin: 8px 0; }
.doors { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 20px 0 10px; }
.door { display: flex; flex-direction: column; gap: 6px; background: #fff; border-radius: 16px; padding: 24px; text-decoration: none; color: #333; box-shadow: 0 3px 12px rgba(0,0,0,.1); border: 2px solid transparent; transition: .15s; }
.door:hover { border-color: #7a5c3e; transform: translateY(-2px); }
.door .ico { font-size: 2.4rem; }
.door b { font-size: 1.35rem; color: #5a4129; }
.door span:last-child { color: #666; font-size: .95rem; }
.kid-links { color: #666; }
.sec-title { font-size: 1.4rem; margin-top: 0; }
@media (max-width: 640px) { .doors { grid-template-columns: 1fr; } }
.chips-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 16px; }
.chip { background: #efe6da; color: #5a4129; border-radius: 999px; padding: 6px 14px; }
.chip.on { background: #7a5c3e; color: #fff; }
.hdr-btn { background: #fff; color: #7a5c3e; padding: 8px 14px; border-radius: 8px; text-decoration: none; font-weight: 700; }
.card .meta { color: #999; font-size: .82rem; margin: 0 0 4px; }
.photo-preview { display: flex; gap: 8px; flex-wrap: wrap; }
.photo-preview figure { margin: 0; text-align: center; font-size: .8rem; color: #777; }
.photo-preview img { width: 110px; height: 80px; object-fit: cover; border-radius: 6px; }
.story-photo { margin: 16px 0; text-align: center; }
.story-photo img { max-width: 100%; border-radius: 10px; box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.admin-form label.check { flex-direction: row; align-items: center; gap: 6px; font-weight: 400; }
.home-link { display: inline-flex; align-items: center; gap: 10px; }
.home-link .logo { width: 40px; height: 40px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.25); }
.hero-top { display: flex; align-items: center; justify-content: center; gap: 24px; text-align: left; }
.hero-text { flex: 1; max-width: 520px; }
.hero-img { width: 280px; height: auto; flex-shrink: 0; }
@media (max-width: 640px) { .hero-top { flex-direction: column-reverse; text-align: center; } .hero-img { width: 200px; } }
.doors { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 760px) { .doors { grid-template-columns: 1fr; } }
.notice { background: #fff6e0; border: 1px solid #f0d9a8; border-radius: 10px; padding: 10px 14px; }
.pw-form { display: flex; gap: 6px; }
.pw-form input { flex: 1; min-width: 0; padding: 8px; border: 1px solid #ccc; border-radius: 8px; font-size: 1rem; }
.pw-form button { background: #7a5c3e; color: #fff; }
.pw-msg { color: #b00020; font-size: .88rem; min-height: 1.2em; margin: 6px 0 0; }
.pw-show { letter-spacing: .1em; color: #b00020; }
.doors { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 640px) { .doors { grid-template-columns: 1fr; } }
#logoutBtn { background: #fff; color: #7a5c3e; margin-left: 6px; }
#user { display: flex; align-items: center; gap: 6px; }
.room-box { margin-top: 24px; background: #fff; border-radius: 12px; padding: 16px 18px; box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.room-form { display: flex; gap: 8px; flex-wrap: wrap; }
.room-form input { flex: 1; min-width: 160px; padding: 8px 10px; font-size: 16px; }
.room-list { list-style: none; padding: 0; margin: 8px 0 0; }
.room-list li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid #eee; }
.room-list li b { flex: 1; font-size: 20px; letter-spacing: 2px; }
#adminLink { padding: 6px 10px; }
header { flex-wrap: wrap; gap: 10px; }
.join-box { flex: 1; display: flex; justify-content: center; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.join-box form { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: center; background: rgba(255,255,255,.14); padding: 6px 10px; border-radius: 10px; }
.join-box input { width: 7.5em; padding: 6px 8px; border: 0; border-radius: 6px; font-size: .95rem; }
.join-box #jbNo { width: 8.5em; }
.join-box button { background: #ffd166; color: #5a3e22; font-weight: 700; }
.jb-label { font-weight: 700; white-space: nowrap; }
.jb-label b { background: #fff; color: #7a5c3e; padding: 2px 8px; border-radius: 6px; margin: 0 2px; }
.join-box small { width: 100%; text-align: center; color: #ffe8b0; }
.join-box small:empty { display: none; }
.myclass-box { margin-top: 24px; background: #fff; border-radius: 12px; padding: 16px 18px; box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.myclass-box form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.myclass-box input { flex: 1; min-width: 220px; padding: 8px 10px; font-size: 16px; }
@media (max-width: 640px) { .join-box { order: 3; flex-basis: 100%; } }
.jb-show { display: flex; align-items: center; gap: 10px; background: #fff; color: #7a5c3e; border-radius:12px;padding:3px 12px;min-width:3em;justify-content:center; font-weight: 900; font-size: clamp(15px, 1.5vw, 19px); letter-spacing: 0; }
.jb-show small { font-size: 14px; color: #a07a55; letter-spacing: 0; width: auto !important; }
#adminLink { padding: 6px 10px; }
.login-steps { text-align: left; margin: 14px 0 4px; padding-left: 1.3em; line-height: 1.8; }
.me section { background: #fff; border-radius: 14px; padding: 18px 20px; margin: 18px 0; box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.me h2 { margin-top: 0; }
.me-form { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.me-form input { flex: 1; min-width: 240px; padding: 9px 10px; font-size: 16px; }
.cls-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 0; border-top: 1px solid #eee; }
.cls-row b { font-size: 20px; flex: none; margin-right: 4px; white-space: nowrap; }
.cls-row > button, .cls-row > a, .cls-row > select, .cls-todo > summary { white-space: nowrap; }
.cls-todo { position: relative; }
.cls-todo > summary { list-style: none; cursor: pointer; padding: 8px 12px; border-radius: 10px; background: #f1ece4; font-weight: 600; font-size: .95rem; }
.cls-todo > summary::-webkit-details-marker { display: none; }
.cls-todo[open] > summary { background: #e6dccd; }
.cls-menu { position: absolute; z-index: 20; top: calc(100% + 4px); left: 0; display: flex; flex-direction: column; gap: 4px; padding: 6px; background: #fff; border: 1px solid #e3d8c6; border-radius: 12px; box-shadow: 0 6px 18px rgba(0,0,0,.12); min-width: 150px; }
.cls-menu > button, .cls-menu > a { text-align: left; padding: 8px 10px; border-radius: 8px; background: #faf6ef; font-weight: 600; font-size: .95rem; text-decoration: none; color: inherit; border: 0; cursor: pointer; }
.cls-menu > button:hover, .cls-menu > a:hover { background: #efe6da; }
.cls-row .on { background: #2f9e44; color: #fff; }
.danger-btn { background: #e03131; color: #fff; }
.stat-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 10px 0 18px; }
.stat-tiles div { background: #f8f3ec; border-radius: 12px; padding: 12px; text-align: center; }
.stat-tiles b { display: block; font-size: 28px; color: #7a5c3e; }
.res-table { width: 100%; border-collapse: collapse; margin: 6px 0 18px; }
.res-table th, .res-table td { padding: 7px 8px; border-bottom: 1px solid #eee; text-align: left; font-size: 15px; }
.bar { display: inline-block; height: 10px; border-radius: 5px; background: #f0c060; vertical-align: middle; margin-right: 6px; }
#leaveDlg { max-width: 520px; border: 0; border-radius: 16px; padding: 22px; }
#leaveDlg li { margin: 6px 0; }
.dlg-btns { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.door-wide { grid-column: 1 / -1; }
.card-links { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.card-links a.card { text-decoration: none; color: inherit; cursor: pointer; transition: transform .12s, box-shadow .12s; border: 2px solid transparent; }
.card-links a.card:hover { transform: translateY(-3px); box-shadow: 0 6px 16px rgba(0,0,0,.14); border-color: #f0c060; }
.card-links a.card h3 { font-size: 1.05rem; }
.site-footer .copy { margin: 10px auto 0; max-width: 760px; font-size: .8rem; color: #999; line-height: 1.6; }
.jb-big{background:#ffd166;color:#5a3e22;border:0;border-radius:10px;padding:8px 12px;font-weight:800;cursor:pointer;font-size:15px}
.jb-overlay{position:fixed;inset:0;z-index:1000;background:rgba(40,28,16,.92);display:flex;align-items:center;justify-content:center;cursor:pointer;font-family:inherit}
.jb-ov-in{text-align:center;color:#fff;padding:20px}
.jb-ov-row{display:flex;flex-direction:column;align-items:center;margin:2vh 0}
.jb-ov-row span{font-size:clamp(18px,3vw,32px);color:#ffe8b0;font-weight:700}
.jb-ov-row b{display:inline-block;background:#fff;color:#7a5c3e;border-radius:24px;padding:1vh 5vw;font-size:clamp(56px,13vw,200px);line-height:1.15;letter-spacing:4px;margin-top:1vh}
.jb-ov-in p{font-size:clamp(18px,2.6vw,30px);margin-top:3vh}
.jb-ov-in small{display:block;margin-top:2vh;color:#c9b59c;font-size:16px}
.trend { display: flex; align-items: flex-end; gap: 6px; height: 170px; padding: 8px 4px 0; margin: 8px 0 18px; border-bottom: 2px solid #e8dccb; overflow-x: auto; }
.trend .tb { flex: 1; min-width: 42px; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; font-size: 12px; }
.trend .tbar { width: 70%; background: #f0c060; border-radius: 6px 6px 0 0; }
.trend .tv { font-weight: 800; color: #7a5c3e; margin-bottom: 2px; }
.trend .tl { color: #999; margin-top: 4px; white-space: nowrap; font-size: 11px; }
.kid-sheet { background: #fbf7f1; border-radius: 10px; padding: 10px 12px; margin: 8px 0; }
.kid-q { padding: 7px 0; border-top: 1px dashed #e6dccd; }
.kid-q small { color: #8a6d4f; }
.badge { background: #ffe3e3; color: #c92a2a; border-radius: 99px; padding: 1px 8px; font-size: 12px; }

/* 처음 화면 보물 6개: 3개씩 두 줄 */
.doors.doors3 { grid-template-columns: repeat(3, 1fr); }
.doors.doors3 .door { padding: 20px; }
@media (max-width: 860px) { .doors.doors3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .doors.doors3 { grid-template-columns: 1fr; } }
/* 처음 화면 문 그림 (챗GPT로 만든 점토 느낌 아이콘) */
.door .ico { line-height: 0; }
.door .ico img { width: 96px; height: 96px; object-fit: contain; transition: transform .2s; }
.door:hover .ico img { transform: scale(1.08) rotate(-3deg); }
.doors3 .door { align-items: center; text-align: center; }
@media (max-width: 760px) { .door .ico img { width: 72px; height: 72px; } }
.site-nav a { display: inline-flex; align-items: center; gap: 5px; }
.nav-ico { width: 24px; height: 24px; object-fit: contain; }
.h-ico { display: flex; align-items: center; gap: 10px; }
.h-ico > img { width: 52px; height: 52px; object-fit: contain; flex: none; }

/* ===== 보물창고 by 우현쌤 · 머리말 이름 ===== */
.brand { display: inline-flex; align-items: baseline; gap: 8px; }
.brand .by { font-size: .62em; font-weight: 600; opacity: .85; letter-spacing: 0; }

/* ===== 세 가지 모드 (js/site-nav.js 가 <html data-mode> 를 정해요) ===== */
html[data-mode="student"] .t-only, html[data-mode="student"] [data-for="tv"] { display: none !important; }
html:not([data-mode="teacher"]) .tc-only { display: none !important; }
html[data-mode="teacher"] .vis-only, html[data-mode="student"] .vis-only { display: none !important; }
html:not([data-mode="student"]) .st-only { display: none !important; }

/* ===== 공통 메뉴 ===== */
.site-nav { min-height: 44px; align-items: center; }
.site-nav a { padding: 4px 8px; border-radius: 10px; position: relative; }
.site-nav a:hover { background: rgba(255,255,255,.55); }
.site-nav a[aria-current="page"] { background: #fff; box-shadow: 0 1px 4px rgba(90,65,41,.18); }
.site-nav .lock-badge { font-size: 11px; margin-left: 2px; opacity: .8; }
.site-nav .nav-cap { color: #1f4e79; }
.site-nav .nav-out { background: #ffe1d6; color: #8a2d0b; font-weight: 800; border-radius: 10px; padding: 6px 12px; font-size: .95rem; }
.lock-ov { position: fixed; inset: 0; z-index: 9995; background: rgba(40,28,16,.55); display: flex; align-items: center; justify-content: center; padding: 14px; }
.lock-box { background: #fff; border-radius: 18px; padding: 20px 22px 14px; width: min(420px, 100%); text-align: center; box-shadow: 0 16px 40px rgba(0,0,0,.3); }
.lock-box h3 { margin: 0 0 6px; color: #4a3826; }
.lock-box p { color: #6b5a48; margin: 0 0 14px; word-break: keep-all; }
.lock-box form { display: flex; gap: 8px; }
.lock-box input { flex: 1; min-width: 0; padding: 10px; border: 2px solid #e7cf9f; border-radius: 10px; font-size: 1rem; }
.lock-go { display: inline-block; background: #7a5c3e; color: #fff; border: 0; border-radius: 10px; padding: 10px 18px; font-weight: 800; text-decoration: none; font-size: 1rem; cursor: pointer; }
.lock-x { margin-top: 12px; background: none; color: #888; text-decoration: underline; }

/* ===== 첫 화면: 보물섬 지도 ===== */
.map-hero { position: relative; max-width: 1280px; margin: 0 auto; background: #4fb6e8; border-radius: 0 0 22px 22px; overflow: hidden; }
.map-hero .map-img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.map-title { position: absolute; left: 50%; top: 4%; transform: translateX(-50%); text-align: center; color: #fff; pointer-events: none; }
.map-title h2 { margin: 0; font-size: clamp(32px, 4.6vw, 64px); font-weight: 900; letter-spacing: 2px; text-shadow: 0 3px 0 #2d6fa3, 0 6px 14px rgba(0,0,0,.25); }
.map-title p { display: inline-block; margin: 6px 0 0; background: rgba(255,255,255,.92); color: #2d5f8a; font-weight: 800; padding: 3px 14px; border-radius: 999px; font-size: clamp(13px, 1.3vw, 17px); }
.sign { position: absolute; transform: translate(-50%, -50%); display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px 7px 9px;
  background: linear-gradient(180deg, #a8743f, #8a5a2b); color: #fff8e8; font-weight: 900; font-size: clamp(13px, 1.35vw, 18px); text-decoration: none; white-space: nowrap;
  border: 2px solid #5e3b17; border-radius: 10px; box-shadow: 0 4px 0 #5e3b17, 0 6px 12px rgba(0,0,0,.25); text-shadow: 0 1px 0 rgba(0,0,0,.35); }
.sign img { width: 1.6em; height: 1.6em; object-fit: contain; }
.sign:active, .sign.pressed { transform: translate(-50%, calc(-50% + 3px)); box-shadow: 0 1px 0 #5e3b17, 0 2px 6px rgba(0,0,0,.25); }
.sign:focus-visible { outline: 3px solid #ffd166; outline-offset: 2px; }
.sign .lock-badge { font-size: .75em; }
.sign.cap { background: linear-gradient(180deg, #2f6f9f, #1f4e79); border-color: #143552; box-shadow: 0 4px 0 #143552, 0 6px 12px rgba(0,0,0,.25); }
.voyage { display: none; }
@media (max-width: 767px) {
  .map-hero { display: none; }
  .voyage { display: block; background: linear-gradient(180deg, #8fd3f4, #4fb6e8 40%, #3aa3dc); padding: 18px 14px 26px; position: relative; overflow: hidden; }
  .voyage-title { text-align: center; color: #fff; margin-bottom: 6px; }
  .voyage-title h2 { margin: 0; font-size: 38px; font-weight: 900; text-shadow: 0 3px 0 #2d6fa3; }
  .voyage-title p { display: inline-block; margin: 4px 0 0; background: rgba(255,255,255,.92); color: #2d5f8a; font-weight: 800; padding: 2px 12px; border-radius: 999px; font-size: 14px; }
  .voyage .boats { display: flex; justify-content: space-between; align-items: flex-end; margin: 4px 0 -6px; }
  .voyage .boats img { width: 96px; height: 96px; object-fit: contain; }
  .voyage ol { list-style: none; margin: 0; padding: 0; position: relative; }
  .voyage ol::before { content: ""; position: absolute; left: 50%; top: 30px; bottom: 30px; border-left: 4px dashed rgba(255,255,255,.85); transform: translateX(-2px); }
  .isle { position: relative; display: flex; align-items: center; gap: 10px; margin: 10px 0; }
  .isle:nth-child(even) { flex-direction: row-reverse; }
  .isle .pic { width: 128px; height: 128px; object-fit: contain; flex: none; filter: drop-shadow(0 6px 6px rgba(0,0,0,.18)); }
  .isle .sign { position: static; transform: none; font-size: 18px; padding: 10px 16px 10px 10px; }
  .isle .sign:active { transform: translateY(3px); }
  .isle small { display: block; color: #fff; font-weight: 700; font-size: 13px; margin-top: 6px; text-shadow: 0 1px 2px rgba(0,0,0,.35); word-break: keep-all; }
  .isle .txt { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; }
  .isle:nth-child(even) .txt { align-items: flex-end; text-align: right; }
}
.home-under { max-width: 900px; margin: 18px auto 0; }
main.home { max-width: none; padding: 0 0 24px; }
main.home .doc { width: calc(100% - 24px); margin: 20px auto; }
main.home .home-under { padding: 0 14px; }

/* ===== 🧭 선장실 (me.html) ===== */
.captain .cap-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.captain .cap-head h1 { margin: 6px 0; color: #1f4e79; }
.captain .cap-head h1 img { width: 48px; height: 48px; object-fit: contain; }
.cap-jump { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; }
.cap-jump a { background: #e8f1f8; color: #1f4e79; border-radius: 999px; padding: 5px 12px; text-decoration: none; font-weight: 700; font-size: .92rem; }
.cap-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 0 16px; }
.cap-grid section { margin: 9px 0; }
.captain section h2 { font-size: 1.15rem; color: #4a3826; }
.captain section h2 img { width: 40px; height: 40px; }
.cap-list { list-style: none; padding: 0; margin: 0 0 8px; }
.cap-list li { padding: 8px 0; border-top: 1px solid #eee; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.cap-tag { background: #f3ead9; color: #7a5c3e; border-radius: 6px; padding: 1px 7px; font-size: .82rem; }
.cap-no { background: #e8f1f8; color: #1f4e79; border-radius: 6px; padding: 1px 7px; font-size: .82rem; font-weight: 800; letter-spacing: 1px; }
.cap-st { margin-left: auto; color: #555; font-size: .9rem; }
.cap-big { display: flex; align-items: baseline; gap: 6px; }
.cap-big b { font-size: 44px; color: #2f9e44; }
.cap-big span { color: #777; font-size: 18px; }
.cap-btn { display: inline-block; background: #efe6da !important; margin-top: 4px; }
.cap-mini-btn { background: #efe6da; color: #5a4129; font-size: .88rem; padding: 6px 12px; }
.cap-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.cap-links a { display: flex; flex-direction: column; align-items: center; gap: 4px; background: #faf5ec; border-radius: 12px; padding: 10px 6px; text-decoration: none; color: #4a3826; font-weight: 700; font-size: .92rem; }
.cap-links a img { width: 44px; height: 44px; object-fit: contain; }
.cap-dl button { background: #7a5c3e; color: #fff; }
.cap-dl label { display: inline-flex; gap: 6px; align-items: center; }
.cap-chk { display: block; margin: 8px 0; }
.cap-mini { font-size: .88rem; color: #666; max-height: 200px; overflow: auto; }

/* ===== 선생님 화면(업무·연수·블로그·문의): 같은 색과 점토 아이콘 ===== */
.doc.tp { border-top: 6px solid #7a5c3e; }
.doc.tp > h1.h-ico { color: #4a3826; }
.doc.tp > h1.h-ico img { width: 56px; height: 56px; object-fit: contain; }
.doc.tp .lead { color: #5a4129; }
.doc.tp .card { border: 1px solid #eadfce; }
@media (max-width: 560px) {
  .site-nav { flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; gap: 6px; padding: 8px 10px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .site-nav a, .site-nav .nav-out { white-space: nowrap; flex: none; }
}
/* 🧒 학생 모드 처음 화면: 메뉴와 보물섬 그림만 (아래 소개·책·바닥글은 숨김) */
html[data-mode="student"] main.home > :not(.map-hero):not(.voyage) { display: none !important; }
html[data-mode="student"] body:has(main.home) .site-footer { display: none !important; }

/* 블로그 카드 목록 */
.story-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; margin-top: 16px; }
.story-card { display: flex; flex-direction: column; background: #fff; border: 2px solid #efe3cc; border-radius: 16px; overflow: hidden; text-decoration: none; color: inherit; box-shadow: 0 3px 0 #efe3cc; transition: transform .15s, box-shadow .15s; }
.story-card:hover, .story-card:focus-visible { transform: translateY(-3px); box-shadow: 0 8px 18px rgba(122,74,28,.15); }
.sc-thumb { aspect-ratio: 16 / 10; background: #f6ecd6; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.sc-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }
.sc-thumb span { font-size: 44px; }
.sc-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.sc-cat { align-self: flex-start; background: #fef3c7; color: #92400e; font-size: .78rem; font-weight: 700; border-radius: 999px; padding: 2px 10px; }
.sc-body b { font-size: 1.02rem; line-height: 1.4; color: #3b2a1a; word-break: keep-all; }
.sc-body p { margin: 0; color: #666; font-size: .9rem; line-height: 1.55; flex: 1; }
.sc-body .meta { color: #999; font-size: .8rem; }

/* 🧭 선장실 맨 위 선생님 도구 · 🪙 번호별 금화 */
.cap-tools { display: flex; gap: 10px; flex-wrap: wrap; margin: 6px 0 14px; }
.cap-tool { flex: 1; min-width: 150px; display: flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; font-weight: 900; font-size: 1.05rem; color: #4a3826; background: #fffdf5; border: 3px solid #e3cfa6; border-radius: 16px; padding: 10px 12px; box-shadow: 0 4px 0 #e3cfa6; }
.cap-tool img { width: 32px; height: 32px; } .cap-tool span { font-size: 26px; }
.cap-tool.hot { background: #fef3c7; border-color: #f59e0b; box-shadow: 0 4px 0 #d97706; }
.cap-tool:active { transform: translateY(3px); box-shadow: none; }
.cap-gold-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; margin: 6px 0 10px; }
.cap-gold-grid span { display: flex; justify-content: space-between; gap: 4px; background: #fffbeb; border: 2px solid #fde68a; border-radius: 10px; padding: 4px 8px; font-weight: 800; font-variant-numeric: tabular-nums; }
.cap-gold-grid span.top { border-color: #f59e0b; background: #fef3c7; }
/* ⚙️ 선장실 처음 설정 (me.html #secSetup) */
.cap-setup { border: 2px solid #f2c94c; background: #fffbea; }
.cap-steps { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin: 10px 0 12px; padding: 0; }
.cap-steps li a { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px 8px 40px; position: relative; min-height: 44px; border-radius: 12px; background: #fff; border: 2px solid #ead9b5; color: #4a3520; text-decoration: none; }
.cap-steps li a small { color: #8a6a48; font-size: .8rem; line-height: 1.3; word-break: keep-all; }
.cap-steps li .dot { position: absolute; left: 9px; top: 9px; width: 24px; height: 24px; border-radius: 50%; background: #ead9b5; color: #5b4630; display: grid; place-items: center; font-weight: 800; font-size: .85rem; }
.cap-steps li.ok a { border-color: #7cc49a; background: #f1fbf4; }
.cap-steps li.ok .dot { background: #2f9e44; color: #fff; }
.cap-setup-go { display: inline-block; padding: 12px 20px; border-radius: 14px; background: #7a5230; color: #fff; text-decoration: none; font-weight: 800; font-size: 1.05rem; box-shadow: 0 3px 0 rgba(0,0,0,.18); }
.cap-setup-go.done { background: #2f9e44; }
.h-sub { font-size: .5em; font-weight: 700; color: #8a6a48; margin-left: 4px; font-family: 'Gowun Dodum', sans-serif; }
/* 🎮 게임 보물: 맨 위 🧑‍🎨 내 아바타 · 🪙 금화 띠 (class-tools.js) */
.cb-ava { display: flex; align-items: center; gap: 10px; margin: 6px auto 12px; max-width: 900px; padding: 8px 14px; border-radius: 16px; background: #fff8e7; border: 2px solid #f0c060; text-decoration: none; color: #4a3826; box-shadow: 0 3px 0 rgba(0,0,0,.08); }
.cb-ava .ico { width: 48px; height: 48px; flex: none; display: grid; place-items: center; overflow: hidden; border-radius: 12px; background: #fff; }
.cb-ava .ico svg, .cb-ava .ico img { width: 48px; height: 48px; }
.cb-ava b { font-family: Jua, sans-serif; font-weight: 400; font-size: 1.1rem; white-space: nowrap; }
.cb-ava small { flex: 1; color: #8a6a48; font-size: .9rem; word-break: keep-all; }
.cb-ava .go { font-weight: 800; color: #b45309; white-space: nowrap; }
@media (max-width: 480px) { .cb-ava small { display: none; } .cb-ava b { flex: 1; } }
/* 🧭 선장실 아코디언 (me.js initAcc · openSetup) */
.cap-setup-top { display: flex; align-items: center; gap: 8px; }
.cap-setup-top h2 { flex: 1; margin: 0; }
.cap-acc-btn, .cap-acc-all { flex: none; min-width: 48px; min-height: 40px; border-radius: 12px; border: 2px solid #e3cfa6; background: #fff; color: #7a5230; font-weight: 900; font-size: 18px; line-height: 1; cursor: pointer; padding: 4px 10px; }
.cap-acc-btn[aria-expanded="true"], .cap-acc-all[aria-expanded="true"] { background: #7a5230; color: #fff; border-color: #7a5230; }
.cap-vv { letter-spacing: -4px; display: inline-block; transform: translateY(-2px); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.cap-jump .cap-acc-all { margin-left: auto; }
.cap-steps li.cur a { border-color: #7a5230; box-shadow: 0 0 0 2px #f2c94c inset; }
.cap-setup-panel { margin-top: 10px; border-top: 2px dashed #ead9b5; padding-top: 8px; }
section.cap-acc > .cap-acc-h { cursor: pointer; user-select: none; display: flex; align-items: center; gap: 6px; margin-bottom: 0; }
section.cap-acc > .cap-acc-h .cap-v { margin-left: auto; font-weight: 900; color: #7a5230; font-size: 1.1em; padding: 0 6px; }
section.cap-acc > .cap-acc-body { display: none; margin-top: 10px; }
section.cap-acc.open > .cap-acc-body { display: block; }
section.cap-acc:not(.open) { padding-top: 12px; padding-bottom: 12px; }
@media (max-width: 480px) { .cap-acc-btn, .cap-acc-all { min-width: 44px; } }
/* ⌄⌄ 전체 메뉴 한눈에 보기 (js/site-nav.js toggleMap) */
.nav-map { margin-left: 2px; min-width: 44px; min-height: 36px; border-radius: 12px; border: 2px solid #d9c3a0; background: #fff; color: #7a5230; font-weight: 900; font-size: 17px; line-height: 1; cursor: pointer; padding: 2px 10px; }
.nav-map[aria-expanded="true"] { background: #7a5230; color: #fff; border-color: #7a5230; }
.nav-vv { letter-spacing: -4px; display: inline-block; transform: translateY(-1px); }
.site-map { background: #fffaf0; border-bottom: 2px solid #ead9b5; box-shadow: 0 6px 14px rgba(0,0,0,.08); max-height: 72vh; overflow: auto; }
.site-map .sm-list { max-width: 1180px; margin: 0 auto; padding: 8px 16px 12px; display: flex; flex-direction: column; gap: 2px; }
.site-map .sm-row { display: flex; align-items: baseline; gap: 10px; padding: 5px 4px; border-bottom: 1px dashed #efdcb6; }
.site-map .sm-row:last-child { border-bottom: 0; }
.site-map .sm-lab { flex: none; display: inline-flex; align-items: center; gap: 4px; min-width: 92px; text-decoration: none; color: #4a3520; }
.site-map .sm-lab span { font-size: 1.05rem; }
.site-map .sm-lab small { font-size: .78rem; color: #8a6a48; font-weight: 700; white-space: nowrap; }
.site-map .sm-items { flex: 1; min-width: 0; font-size: .86rem; line-height: 1.7; }
.site-map .sm-it { white-space: nowrap; }
.site-map .sm-items a { color: #5b4630; text-decoration: none; font-weight: 700; padding: 1px 4px; border-radius: 6px; }
.site-map .sm-items a:hover, .site-map .sm-items a:focus { background: #fde68a; }
.site-map .sm-items i { font-style: normal; color: #c9a56a; margin: 0 2px; }
.site-map .sm-sub { font-size: .78rem; color: #8a6a48; margin-left: 1px; }
.site-map .sm-sub a { font-weight: 600; color: #7a6040; padding: 0 2px; }
@media (max-width: 600px) {
  .site-map .sm-list { padding: 6px 8px 10px; }
  .site-map .sm-row { gap: 6px; }
  .site-map .sm-lab { min-width: 62px; }
  .site-map .sm-items { white-space: nowrap; overflow-x: auto; scrollbar-width: thin; padding-bottom: 2px; }
}
[data-game].sm-flash { outline: 4px solid #f59e0b; outline-offset: 3px; transition: outline-color .3s; }
html.dy-embed .site-map { display: none !important; }
/* 🧭 선장실 바로 가기: 늘 한 줄 (좁은 화면은 옆으로 밀어요) */
.cap-jump { flex-wrap: nowrap; overflow-x: auto; gap: 5px; align-items: center; scrollbar-width: thin; -webkit-overflow-scrolling: touch; padding-bottom: 2px; }
.cap-jump a { flex: none; white-space: nowrap; padding: 5px 10px; font-size: .9rem; }
.cap-jump .cap-acc-all { position: sticky; right: 0; min-height: 34px; padding: 2px 8px; font-size: 16px; }
.nav-map, .cap-acc-btn, .cap-acc-all { position: relative; flex: none; }
.sr { top: 0; left: 0; }
.cap-setup-go[hidden] { display: none !important; }
@media (max-width: 480px) { .cap-setup-top h2 small { display: none; } }
.cap-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 8px; }
.cap-tools .cap-mini-btn { display: inline-block; text-decoration: none; border-radius: 10px; font-weight: 700; }
.nav-map .nav-more-ico { width: 28px; height: 28px; margin: -2px -4px; display: block; transition: transform .2s; }
.nav-map.open .nav-more-ico { transform: scaleY(-1); }
.cap-more-ico { width: 30px; height: 30px; display: block; transition: transform .2s; }
[aria-expanded="true"] > .cap-more-ico { transform: scaleY(-1); }
.hdr-admin { padding: 5px 10px; font-size: .82rem; background: #efe6da; }

/* 펼치기/접기 단추 (맨 위 전체 메뉴 · 선장실 모두 펼치기 · 처음 설정): 작은 글자 단추, 누를 때마다 글자가 바뀌어요 */
.nav-map, .cap-acc-btn, .cap-acc-all { border: 1px solid #d9c3a0 !important; background: #fffdf7 !important; box-shadow: none !important; color: #7a5230 !important; min-width: 0; min-height: 30px; padding: 3px 10px; border-radius: 999px; font: 700 13px/1.2 'Gowun Dodum', sans-serif; white-space: nowrap; cursor: pointer; }
.nav-map[aria-expanded="true"], .cap-acc-btn[aria-expanded="true"], .cap-acc-all[aria-expanded="true"] { background: #f3e3bf !important; border-color: #c9a46a !important; }
.nav-map:hover, .cap-acc-btn:hover, .cap-acc-all:hover { background: #fff3d6 !important; }
.nav-map:focus-visible, .cap-acc-btn:focus-visible, .cap-acc-all:focus-visible { outline: 3px solid #f59e0b; }

/* ⚙️ 처음 설정 여섯 단계: 크기를 모두 같게, 넓은 화면에서는 한 줄 (설명은 두 줄까지) */
.cap-steps { grid-template-columns: repeat(6, minmax(0, 1fr)) !important; grid-auto-rows: 1fr; align-items: stretch; }
.cap-steps li { display: flex; min-width: 0; }
.cap-steps li a { flex: 1; height: 100%; min-height: 72px; box-sizing: border-box; padding: 8px 8px 8px 38px !important; }
.cap-steps li a b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .95rem; }
.cap-steps li a small { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cap-steps li:not(.ok) a small { color: #9a8468; }
@media (max-width: 900px) { .cap-steps { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; } }
@media (max-width: 560px) { .cap-steps { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } }
/* ⚙️ 처음 설정 단추는 이름만 (설명은 단계 안에) · 🔧 계속 관리 단추 5개 */
.cap-steps li a { min-height: 48px; justify-content: center; }
.cap-keep-btns { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; }
.cap-keep-btns li .dot { background: none; font-size: 1.05rem; }
.cap-keep-btns li.cur a { background: #fffbea; }
@media (max-width: 900px) { .cap-keep-btns { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; } }
@media (max-width: 560px) { .cap-keep-btns { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } }
.cap-kp-info { margin: 2px 0 10px; padding: 8px 12px; border-radius: 10px; background: #fff8e7; border: 1px solid #f0d9a8; color: #5b4630; line-height: 1.6; word-break: keep-all; }
.cap-clean-btns { flex-wrap: wrap; gap: 8px; }
.cap-dl-more { margin-top: 12px; }
.cap-dl-more summary { cursor: pointer; font-weight: 700; color: #7a5230; }
/* 🏫 반 줄 안에서 여는 번호 설정 */
.cls-numbox { width: 100%; margin: 6px 0 2px; padding: 10px 12px; border: 2px dashed #ead9b5; border-radius: 12px; background: #fffdf7; }
/* 🧭 선장실 카드: 화면을 열면 접힌 채(제목 줄만) — 「펼치기」를 누르면 단추가 보여요 */
.cap-setup.shut .cap-steps, .cap-setup.shut .cap-setup-go, .cap-setup.shut .cap-setup-panel { display: none !important; }
.cap-setup.shut { padding-top: 12px; padding-bottom: 12px; }
/* 🧑‍🎓 처음 설정 4단계 (반·번호): 수업할 반 고르기·반 만들기를 선장실에서 바로 */
.cap-step4 { padding: 4px 2px 6px; }
.cap-step-info { margin: 4px 0 12px; padding: 10px 14px; border-radius: 12px; background: #fff8e7; border: 1px solid #f0d9a8; line-height: 1.7; color: #5b4630; font-size: .95rem; line-height: 1.6; word-break: keep-all; }
.cap-step4 #classList .cls-row:first-child { border-top: 0; }
.cap-step-nav { display: flex; justify-content: space-between; gap: 8px; margin-top: 12px; }
.cap-step-nav button { padding: 9px 14px; border-radius: 12px; border: 2px solid #e3cfa6; background: #fff; font-weight: 800; color: #7a5230; cursor: pointer; }
.cap-step-nav button.go { background: #7a5230; border-color: #7a5230; color: #fff; }
/* 🧭 선장실 단추 줄 하나로 맞추기 (⚙️ 처음 설정 · 🔧 계속 관리 같은 모양 · 초록 계열) */
.cap-btns li a { background: #fff; border: 2px solid #cfe8d6; color: #24452f; border-radius: 12px; min-height: 52px !important; justify-content: center; transition: background .12s, border-color .12s; }
.cap-btns li a:hover { background: #f3fbf5; border-color: #8fd0a4; }
.cap-btns li .dot { background: #e3f4e8 !important; color: #2f7a46 !important; font-size: .9rem; }
.cap-btns li.ok a { border-color: #7cc49a; background: #f1fbf4; }
.cap-btns li.ok .dot { background: #2f9e44 !important; color: #fff !important; }
.cap-btns li.cur a { border-color: #2f9e44 !important; background: #dff3e6 !important; box-shadow: 0 0 0 2px #2f9e44 inset !important; }
.cap-keep-btns li .dot { font-size: 1rem; }
.cls-row .cls-numbtn { background: #e3f4e8; color: #24452f; border: 2px solid #b7e0c3; }
.cls-row .cls-numbtn.on { background: #2f9e44; color: #fff; border-color: #2f9e44; }

/* 🎛️ 선장실 단추 하나로 통일 (처음 설정 · 계속 관리): 같은 크기·모양, 그림은 연한 동그라미, 단계 표시는 오른쪽 위 작은 배지 */
.cap-btns.cap-steps { grid-template-columns: repeat(6, minmax(0, 1fr)) !important; gap: 10px; }
.cap-btns li a { flex-direction: row !important; align-items: center; gap: 8px; padding: 10px 12px !important; min-height: 56px !important; position: relative; border: 2px solid #cfe8d6; background: #fff; }
.cap-btns li .dot { position: static !important; flex: none; width: 34px; height: 34px; border-radius: 50%; background: #e9f6ee !important; color: inherit !important; font-size: 1.15rem !important; display: grid; place-items: center; }
.cap-btns li a b { font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cap-btns li .st { position: absolute; top: -8px; right: -8px; min-width: 22px; height: 22px; padding: 0 4px; border-radius: 11px; background: #ece3d3; color: #6b5435; font-size: .75rem; font-weight: 800; display: grid; place-items: center; border: 2px solid #fff; }
.cap-btns li.ok a { border-color: #7cc49a; background: #f1fbf4; }
.cap-btns li.ok .dot { background: #d6f0de !important; color: inherit !important; }
.cap-btns li.ok .st { background: #2f9e44; color: #fff; }
.cap-steps li { overflow: visible; }
@media (max-width: 900px) { .cap-btns.cap-steps { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; } }
@media (max-width: 560px) { .cap-btns.cap-steps { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } }
/* 계속 관리: 다섯 단추가 한 줄을 가득 채워요 (글자가 겹치지 않게) */
.cap-btns.cap-steps.cap-keep-btns { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; }
.cap-btns li a { min-width: 0; overflow: hidden; }
.cap-btns li a b { flex: 0 1 auto; min-width: 0; }
@media (max-width: 900px) { .cap-btns.cap-steps.cap-keep-btns { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; } }
@media (max-width: 560px) { .cap-btns.cap-steps.cap-keep-btns { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } }
/* 단계 배지(✓·숫자)는 단추 안쪽 오른쪽 위에 (잘리지 않게) */
.cap-btns li .st { top: 6px !important; right: 6px !important; border: 0 !important; }
.cap-btns li a { padding-right: 30px !important; }
.cap-btns li a { padding: 10px 10px !important; gap: 6px; }
.cap-btns li .dot { width: 30px; height: 30px; font-size: 1.05rem !important; }
.cap-btns li .st { top: 3px !important; right: 3px !important; min-width: 18px; height: 18px; font-size: .7rem; border-radius: 9px; }
/* 🔍 기능 찾기 단추 (site-nav.js · site-search.js) */
.nav-find { font-size: 16px; padding: 2px 9px; }
/* 👀 학생 화면 미리 보기 (머리말, 선생님 이름 왼쪽) · 📮 제안하기 (메뉴 줄) */
.hdr-pv { font: inherit; font-weight: 800; font-size: .92rem; background: #fde68a; color: #5a3a12; border: 0; border-radius: 999px; padding: 7px 14px; cursor: pointer; white-space: nowrap; }
.hdr-pv:hover { background: #fcd34d; }
.site-nav .nav-sg { background: #e0f2fe; color: #075985; text-decoration: none; position: relative; }
.site-nav .nav-sg[aria-current="page"] { outline: 2px solid #0284c7; }
.site-nav .sg-dot { font-size: .72rem; margin-left: 4px; vertical-align: 2px; }
@media (max-width: 640px) { .hdr-pv .pv-t { display: none; } .hdr-pv { padding: 6px 10px; font-size: 1rem; } }
/* 🔴 💌 선생님께 한마디: 새 편지·새 답장 빨간 점 (js/site-nav.js letterDot) */
.site-nav a .lt-dot, .lt-dot { display:inline-block; width:10px; height:10px; border-radius:50%; background:#ef4444; box-shadow:0 0 0 2px #fff; margin-left:5px; vertical-align:6px; }
