/* ============================================================
   윤슬고등학교 커뮤 — 스킨
   색은 아래 변수만 바꾸면 전체에 적용됩니다.
   ============================================================ */
:root {
  --navy: #14285a;
  --navy-deep: #0c1b40;
  --blue: #3d8fe0;
  --sky: #e3effb;
  --gold: #f2b21b;
  --cream: #f7f2e4;
  --paper: #fffdf8;
  --line: #ddd5c0;
  --line-soft: #ebe5d3;
  --ink: #232a44;
  --muted: #84838c;
  --danger: #c8523f;
  --serif: "Gowun Batang", "Nanum Myeongjo", serif;
  --sans: "Pretendard Variable", Pretendard, -apple-system, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
  --en: "Cormorant Garamond", "Gowun Batang", serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--sans); font-size: 15px; line-height: 1.7; color: var(--ink);
  background: var(--cream);
  background-image: radial-gradient(rgba(20, 40, 90, .045) 1px, transparent 1px); background-size: 18px 18px;
  -webkit-font-smoothing: antialiased; word-break: keep-all;
}
a { color: var(--navy); text-decoration: none; }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
code { font-family: ui-monospace, Consolas, monospace; font-size: .86em; background: var(--sky); padding: 1px 6px; border-radius: 3px; }
[hidden] { display: none !important; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }
.small { font-size: .88em; }
.hint { color: var(--muted); font-size: .85em; margin: 6px 0 0; }
.danger { color: var(--danger) !important; }
.center { justify-content: center; }
.end { justify-content: flex-end; }

/* ---------- 맨 위 줄 ---------- */
.topline { background: var(--navy-deep); color: #c9d3ea; font-size: 12.5px; }
.topline-inner { display: flex; align-items: center; justify-content: space-between; height: 34px; }
.topline-en { font-family: var(--en); letter-spacing: .28em; font-size: 12px; color: #e9d9a6; }
.topline-user { display: flex; align-items: center; gap: 16px; }
.topline-user a, .top-btn { color: #c9d3ea; background: none; border: 0; padding: 0; font-size: 12.5px; }
.topline-user a:hover, .top-btn:hover { color: #fff; }
.top-me { display: flex; align-items: center; gap: 6px; color: #fff !important; }
.top-me img { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; }

/* ---------- 헤더 ---------- */
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; box-shadow: 0 3px 0 var(--navy), 0 6px 0 var(--gold); margin-bottom: 6px; }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 84px; }
.brand { display: flex; align-items: center; gap: 13px; }
.brand-emblem { width: 56px; height: 56px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong { font-family: var(--serif); font-size: 23px; letter-spacing: .04em; color: var(--navy); }
.brand-text small { font-size: 12px; color: var(--muted); letter-spacing: .12em; }
.main-nav { display: flex; height: 100%; }
.main-nav a { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 112px; color: var(--ink); }
.main-nav b { font-family: var(--serif); font-size: 17px; font-weight: 700; }
.main-nav i { font-family: var(--en); font-style: normal; font-size: 11px; letter-spacing: .22em; color: var(--muted); margin-top: -2px; }
.main-nav a::after { content: ""; position: absolute; left: 50%; bottom: 14px; width: 0; height: 2px; background: var(--gold); transition: all .2s; }
.main-nav a:hover::after, .main-nav a.active::after { left: 34px; width: calc(100% - 68px); }
.main-nav a.active b, .main-nav a:hover b { color: var(--navy); }
.main-nav a.active i { color: var(--blue); }
.nav-toggle { display: none; width: 42px; height: 42px; background: none; border: 1px solid var(--line); border-radius: 4px; padding: 11px 9px; flex-direction: column; justify-content: space-between; }
.nav-toggle span { display: block; height: 2px; background: var(--navy); }
.demo-banner { background: #fbf0cf; color: #6d5510; border-bottom: 1px solid #ecd9a0; text-align: center; padding: 6px 16px; font-size: 13px; }

/* ---------- 안쪽 페이지 배너 ---------- */
.banner { position: relative; height: 170px; background: url(../img/school.jpg) center 32% / cover; display: flex; align-items: center; }
.banner::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(12, 27, 64, .88) 0%, rgba(20, 40, 90, .62) 45%, rgba(20, 40, 90, .18) 100%); }
.banner .wrap { position: relative; width: 100%; color: #fff; }
.banner-en { font-family: var(--en); letter-spacing: .34em; font-size: 13px; color: var(--gold); }
.banner h1 { margin: 0; font-family: var(--serif); font-size: 34px; letter-spacing: .08em; font-weight: 700; }
.banner h1::after { content: ""; display: block; width: 34px; height: 2px; background: var(--gold); margin-top: 10px; }
main.page { padding-top: 34px; padding-bottom: 70px; min-height: 50vh; }

/* ---------- 푸터 ---------- */
.site-footer { background: var(--navy-deep); color: #aab6d3; font-size: 13px; margin-top: 30px; overflow: hidden; }
.footer-inner { display: flex; align-items: center; gap: 18px; padding-top: 30px; padding-bottom: 30px; position: relative; }
.footer-emblem { width: 58px; height: 58px; flex-shrink: 0; }
.site-footer strong { font-family: var(--serif); color: #fff; font-size: 17px; letter-spacing: .06em; }
.site-footer p { margin: 2px 0 0; line-height: 1.7; }
.footer-deco { position: absolute; right: 10px; bottom: -34px; width: 230px; opacity: .5; transform: rotate(-8deg); pointer-events: none; }

/* ---------- 버튼·입력 ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 18px; border-radius: 3px; border: 1px solid var(--navy); background: var(--navy); color: #fff; font-size: 14px; line-height: 1.3; white-space: nowrap; transition: all .15s; }
.btn:hover { background: var(--navy-deep); }
.btn-ghost { background: var(--paper); color: var(--navy); border-color: var(--line); }
.btn-ghost:hover { background: var(--sky); border-color: var(--blue); }
.btn-sm { padding: 6px 13px; font-size: 13px; }
.btn.wide { width: 100%; }
.btn:disabled { opacity: .5; cursor: default; }
.link { background: none; border: none; padding: 2px 4px; color: var(--muted); font-size: 13px; }
.link:hover { color: var(--navy); text-decoration: underline; }
.input { width: 100%; padding: 9px 12px; border: 1px solid var(--line); border-radius: 3px; background: #fff; outline: none; transition: border-color .15s; }
.input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(61, 143, 224, .15); }
.input-sm { padding: 6px 10px; font-size: 13px; }
textarea.input { resize: vertical; min-height: 60px; }
.ta-lg { min-height: 180px; }
.icon-btn { width: 34px; height: 34px; border-radius: 3px; border: 1px solid var(--line); background: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 15px; color: var(--muted); }
.icon-btn:hover { color: var(--navy); border-color: var(--blue); }
.icon-btn.primary { background: var(--navy); border-color: var(--navy); color: #fff; }
.row-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.badge { display: inline-block; padding: 1px 9px; border: 1px solid var(--line); border-radius: 20px; font-size: 12px; background: var(--paper); color: var(--muted); vertical-align: middle; }
.badge-notice { background: var(--navy); border-color: var(--navy); color: #fff; }
.badge-secret { background: #efe9f8; border-color: #d9cdee; color: #6b4fa8; }
.badge-sens { background: var(--sky); border-color: #c5dcf5; color: #2c6fb5; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); background: var(--navy-deep); color: #fff; padding: 10px 20px; border-radius: 3px; font-size: 14px; z-index: 400; border-bottom: 3px solid var(--gold); }
.toast.err { background: var(--danger); border-color: #8f3526; }
.loading, .empty { text-align: center; color: var(--muted); padding: 70px 20px; }
.empty small { color: var(--danger); }
.back { display: inline-block; color: var(--muted); font-size: 14px; margin-bottom: 14px; }
.back:hover { color: var(--navy); }
.page-head { display: flex; justify-content: flex-end; margin-bottom: 16px; }
.page-title { font-family: var(--serif); font-size: 22px; margin: 0 0 16px; color: var(--navy); letter-spacing: .03em; }
.filter-bar { background: var(--sky); border-left: 3px solid var(--blue); color: var(--navy); padding: 8px 14px; font-size: 14px; margin-bottom: 14px; display: flex; gap: 12px; align-items: center; }
.filter-bar a { color: var(--blue); }
.pagination { display: flex; justify-content: center; gap: 4px; margin-top: 28px; }
.pagination a { min-width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; font-family: var(--en); font-size: 17px; color: var(--muted); border-bottom: 2px solid transparent; }
.pagination a.active { color: var(--navy); border-color: var(--gold); }
.dialog { position: fixed; inset: 0; z-index: 350; background: rgba(12, 27, 64, .5); display: flex; align-items: center; justify-content: center; padding: 20px; }
.dialog-box { background: var(--paper); border-top: 4px solid var(--navy); padding: 24px 26px 18px; width: 100%; max-width: 360px; box-shadow: 0 20px 50px rgba(12, 27, 64, .3); }
.dialog-box p { margin: 0 0 18px; }

/* ============================================================
   대문 (메인)
   ============================================================ */
.gate { position: relative; height: min(62vh, 560px); min-height: 400px; overflow: hidden; margin-top: -6px; }
.gate-bg { position: absolute; inset: 0; background: url(../img/school.jpg) center 38% / cover; animation: gateZoom 22s ease-out forwards; }
@keyframes gateZoom { from { transform: scale(1.08); } to { transform: scale(1); } }
.gate-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(12, 27, 64, .15) 0%, rgba(12, 27, 64, 0) 35%, rgba(12, 27, 64, .55) 100%), linear-gradient(90deg, rgba(12, 27, 64, .62) 0%, rgba(12, 27, 64, .12) 55%, transparent 100%); }
.gate-inner { position: relative; height: 100%; display: flex; flex-direction: column; justify-content: center; color: #fff; padding-bottom: 70px; text-shadow: 0 2px 18px rgba(12, 27, 64, .55); }
.gate-en { font-family: var(--en); letter-spacing: .36em; font-size: 14px; color: #f6dd92; margin: 0 0 14px; }
.gate h1 { font-family: var(--serif); font-size: clamp(30px, 4.6vw, 50px); line-height: 1.38; margin: 0; letter-spacing: .05em; font-weight: 700; }
.gate-sub { margin: 18px 0 0; font-size: 16px; opacity: .92; padding-left: 14px; border-left: 2px solid var(--gold); }

.desk { position: relative; display: grid; grid-template-columns: 1fr 340px; gap: 20px; margin-top: -76px; }
.desk-box { position: relative; background: var(--paper); border: 1px solid var(--line); border-top: 4px solid var(--navy); padding: 22px 26px 20px; box-shadow: 0 14px 40px rgba(12, 27, 64, .14); }
.desk-box header { display: flex; align-items: baseline; justify-content: space-between; border-bottom: 1px solid var(--navy); padding-bottom: 10px; margin-bottom: 4px; }
.desk-box h2 { margin: 0; font-family: var(--serif); font-size: 20px; color: var(--navy); letter-spacing: .05em; }
.desk-box h2 i { font-family: var(--en); font-style: normal; font-size: 12px; letter-spacing: .24em; color: var(--blue); margin-left: 8px; }
.desk-box header a { font-size: 20px; color: var(--muted); line-height: 1; }
.desk-box header a:hover { color: var(--navy); }
.desk-notice ul { list-style: none; margin: 0; padding: 0; }
.desk-notice li a { display: flex; align-items: center; gap: 12px; padding: 12px 2px; border-bottom: 1px dashed var(--line); color: var(--ink); }
.desk-notice li:last-child a { border-bottom: 0; }
.desk-notice .tag { flex-shrink: 0; min-width: 52px; text-align: center; font-size: 12px; padding: 1px 8px; border: 1px solid var(--line); color: var(--muted); border-radius: 20px; }
.desk-notice .tag.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.desk-notice .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.desk-notice li a:hover .t { color: var(--blue); }
.desk-notice time { font-family: var(--en); font-size: 15px; color: var(--muted); }
.desk-empty { color: var(--muted); padding: 34px 0; text-align: center; margin: 0; }
.desk-login { overflow: hidden; }
.desk-deco { position: absolute; right: -36px; bottom: -30px; width: 170px; opacity: .9; pointer-events: none; transform: rotate(-6deg); }
.login-form { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 8px; padding-top: 14px; padding-bottom: 46px; }
.login-note { margin: 0 0 4px; font-size: 13.5px; color: var(--muted); }
.login-join { font-size: 13px; color: var(--muted); margin-top: 2px; }
.login-join:hover { color: var(--navy); }
.me-card { position: relative; z-index: 1; padding-top: 16px; padding-bottom: 40px; }
.me-top { display: flex; align-items: center; gap: 12px; }
.me-top img, .me-noimg { width: 54px; height: 54px; border-radius: 50%; object-fit: cover; border: 2px solid var(--navy); background: var(--sky); display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-size: 22px; color: var(--navy); }
.me-top strong { display: block; font-family: var(--serif); font-size: 18px; color: var(--navy); }
.me-top small { color: var(--muted); }
.me-chars { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0; }
.me-chars a { padding: 2px 11px; border: 1px solid var(--c); color: var(--c); border-radius: 20px; font-size: 13px; background: #fff; }
.me-none { color: var(--muted); font-size: 13.5px; margin: 12px 0; }
.me-actions { display: flex; gap: 6px; }

.quick { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 26px; margin-bottom: 50px; border-top: 1px solid var(--navy); border-bottom: 1px solid var(--navy); }
.quick a { position: relative; padding: 24px 22px 22px; display: flex; flex-direction: column; border-right: 1px solid var(--line); transition: background .2s; }
.quick a:last-child { border-right: 0; }
.quick em { font-family: var(--en); font-style: normal; font-size: 30px; line-height: 1; color: var(--gold); }
.quick b { font-family: var(--serif); font-size: 20px; color: var(--navy); margin-top: 6px; letter-spacing: .05em; }
.quick span { font-size: 13px; color: var(--muted); }
.quick a::after { content: "→"; position: absolute; right: 20px; top: 24px; color: var(--line); transition: all .2s; }
.quick a:hover { background: var(--paper); }
.quick a:hover::after { color: var(--navy); transform: translateX(4px); }

/* ---------- 아바타·이름 ---------- */
.avatar { width: 42px; height: 42px; border-radius: 50%; overflow: hidden; border: 2px solid var(--line); background: var(--sky); flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; font-family: var(--serif); color: var(--navy); }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar.sm { width: 32px; height: 32px; font-size: 13px; }
.who { display: flex; flex-direction: column; line-height: 1.35; }
.name { font-family: var(--serif); font-weight: 700; }
.name-sub { font-size: 12px; color: var(--muted); }

/* ============================================================
   세계관
   ============================================================ */
.world { display: grid; grid-template-columns: 190px 1fr; gap: 34px; align-items: start; }
.world-toc { position: sticky; top: 120px; }
.world-toc nav { display: flex; flex-direction: column; border-top: 2px solid var(--navy); }
.world-toc a { padding: 10px 6px; color: var(--ink); font-family: var(--serif); border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; }
.world-toc a::after { content: "›"; color: var(--line); }
.world-toc a:hover { color: var(--blue); padding-left: 10px; transition: padding .15s; }
.world-sec { background: var(--paper); border: 1px solid var(--line); padding: 34px 40px 30px; margin-bottom: 22px; scroll-margin-top: 120px; position: relative; }
.world-sec::before { content: ""; position: absolute; left: -1px; top: 34px; width: 4px; height: 30px; background: var(--gold); }
.world-sec-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.world-sec h2 { margin: 0; font-family: var(--serif); font-size: 25px; color: var(--navy); letter-spacing: .06em; }
.world-content h3 { font-family: var(--serif); font-size: 17.5px; margin: 26px 0 8px; color: var(--navy); padding-bottom: 6px; border-bottom: 1px dashed var(--line); }
.world-content p { margin: 0 0 12px; line-height: 1.95; }
.world-content ul { margin: 0 0 14px; padding: 0; list-style: none; }
.world-content li { position: relative; padding-left: 16px; margin: 5px 0; line-height: 1.8; }
.world-content li::before { content: ""; position: absolute; left: 2px; top: .78em; width: 5px; height: 5px; background: var(--gold); transform: rotate(45deg); }
.world-content strong { color: var(--navy); }
.md-fig { margin: 4px 0 22px; text-align: center; }
.md-fig img { max-height: 420px; cursor: zoom-in; }
.md-fig img[src$=".jpg"] { border: 1px solid var(--line); padding: 6px; background: #fff; width: 100%; max-height: none; }
.md-fig figcaption { font-size: 12.5px; color: var(--muted); margin-top: 6px; letter-spacing: .08em; }
.editor { display: flex; flex-direction: column; gap: 8px; }

/* ============================================================
   멤버란 — 학생증
   ============================================================ */
.id-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 26px; }
.idcard { display: block; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; color: var(--ink); box-shadow: 0 6px 20px rgba(12, 27, 64, .08); }
.id-top { display: flex; align-items: center; gap: 9px; background: var(--navy); color: #fff; padding: 10px 16px; border-bottom: 3px solid var(--gold); }
.id-top img { width: 30px; height: 30px; }
.id-top span { font-family: var(--serif); font-size: 15px; letter-spacing: .1em; }
.id-top i { margin-left: auto; font-family: var(--en); font-style: normal; font-size: 11px; letter-spacing: .22em; color: #f6dd92; }
.id-body { position: relative; display: flex; gap: 16px; padding: 18px 18px 8px; }
.id-mark { position: absolute; right: 14px; top: 50px; width: 118px; opacity: .13; pointer-events: none; }
.id-info, .id-photo { position: relative; }
.id-photo { width: 112px; height: 140px; flex-shrink: 0; border: 1px solid var(--line); background: var(--sky); overflow: hidden; }
.id-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.char-noimg { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-size: 44px; color: var(--c, var(--navy)); background: var(--sky); }
.id-info { margin: 0; flex: 1; min-width: 0; }
.id-name { font-family: var(--serif); font-size: 25px; font-weight: 700; color: var(--navy); letter-spacing: .12em; margin-bottom: 8px; padding-bottom: 6px; border-bottom: 2px solid var(--c); }
.id-info > div:not(.id-name) { display: flex; gap: 10px; font-size: 13.5px; padding: 2px 0; }
.id-info dt { color: var(--muted); width: 48px; flex-shrink: 0; }
.id-info dd { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.id-tag { margin: 4px 18px 0; font-family: var(--serif); font-size: 14px; color: var(--ink); }
.id-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; padding: 12px 18px 16px; }
.id-code { display: flex; flex-direction: column; gap: 3px; }
.id-bar { width: 120px; height: 22px; background: repeating-linear-gradient(90deg, var(--ink) 0 2px, transparent 2px 4px, var(--ink) 4px 5px, transparent 5px 9px, var(--ink) 9px 12px, transparent 12px 14px); opacity: .75; }
.id-no { font-family: var(--en); letter-spacing: .16em; color: var(--muted); font-size: 13px; line-height: 1; }
.id-sign { position: relative; display: flex; flex-direction: column; align-items: flex-end; padding-right: 46px; line-height: 1.4; }
.id-sign span { font-size: 11px; color: var(--muted); }
.id-sign b { font-family: var(--serif); font-size: 16px; letter-spacing: .14em; color: var(--ink); }
.id-seal { position: absolute; right: -6px; bottom: -8px; width: 46px; height: 46px; box-sizing: border-box; border: 2px solid #c8382c; border-radius: 3px; color: #c8382c; font-family: var(--serif); font-style: normal; font-weight: 700; font-size: 11px; line-height: 14px; writing-mode: vertical-rl; word-break: break-all; text-align: justify; text-align-last: justify; padding: 2px 0; opacity: .85; transform: rotate(-4deg); overflow: hidden; }

.profile { display: grid; grid-template-columns: 300px 1fr; gap: 38px; background: var(--paper); border: 1px solid var(--line); border-top: 4px solid var(--c); padding: 36px; }
.profile-portrait { aspect-ratio: 4 / 5; border: 1px solid var(--line); padding: 6px; background: #fff; margin-bottom: 14px; }
.profile-portrait img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; display: block; }
.profile-kicker { margin: 0; color: var(--muted); letter-spacing: .1em; font-size: 14px; }
.profile-name { margin: 0 0 6px; font-family: var(--serif); font-size: 40px; color: var(--navy); letter-spacing: .12em; }
.profile-tagline { margin: 0 0 22px; font-family: var(--serif); font-size: 17px; padding-left: 14px; border-left: 3px solid var(--c); }
.pf { margin: 0 0 22px; display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--navy); }
.pf-row { display: flex; gap: 12px; align-items: baseline; padding: 9px 4px; border-bottom: 1px solid var(--line-soft); }
.pf dt { color: var(--muted); font-size: 13px; min-width: 82px; }
.pf dd { margin: 0; }
.profile-bio { line-height: 2; margin-bottom: 18px; }

/* ---------- 폼 ---------- */
.form { background: var(--paper); border: 1px solid var(--line); border-top: 4px solid var(--navy); padding: 28px; display: flex; flex-direction: column; gap: 15px; }
.form label { display: flex; flex-direction: column; gap: 5px; font-size: 13.5px; color: var(--muted); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.form.inline { flex-direction: row; align-items: center; flex-wrap: wrap; padding: 14px; margin-top: 14px; border-top-width: 1px; }
.form.inline .input { width: 260px; }
.checks { display: flex; gap: 18px; flex-wrap: wrap; }
.checks label { flex-direction: row; align-items: center; gap: 6px; color: var(--ink); }
.img-field { display: flex; flex-direction: column; gap: 8px; }
.img-preview { width: 160px; height: 160px; border: 1px dashed var(--line); background: var(--cream); display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 13px; overflow: hidden; text-align: center; padding: 8px; }
.img-preview.wide { width: 100%; height: auto; min-height: 140px; max-height: 420px; }
.img-preview img { width: 100%; height: 100%; object-fit: contain; }
.img-preview.wide img { max-height: 400px; }
.ta-wrap { position: relative; }
.ta-emote { position: absolute; right: 8px; bottom: 8px; }
.auth { max-width: 420px; margin: 20px auto; text-align: center; }
.auth .form { text-align: left; margin-top: 10px; }
.search .input { width: 150px; }
.panel { background: var(--paper); border: 1px solid var(--line); border-top: 4px solid var(--navy); padding: 26px 28px; margin-bottom: 22px; }
.panel .form { border: 0; padding: 0; background: none; }
.panel .form.inline { border: 1px dashed var(--line); padding: 14px; }
.panel-title { margin: 0 0 16px; font-family: var(--serif); font-size: 19px; color: var(--navy); display: flex; align-items: baseline; gap: 10px; }
.panel-title small { font-family: var(--sans); font-size: 13px; font-weight: 400; }

/* ============================================================
   로드비 (좌 그림 / 우 글·댓글)
   ============================================================ */
.ic { display: block; flex-shrink: 0; }
.ibtn { width: 34px; height: 34px; border: 0; background: none; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); cursor: pointer; flex-shrink: 0; }
.ibtn:hover { color: var(--navy); background: rgba(20, 40, 90, .07); }
.who-select { border: 0; background: transparent; font-weight: 600; color: var(--navy); padding: 2px 2px; max-width: 150px; cursor: pointer; outline: none; font-size: 13.5px; }

/* 로그 올리기 창 */
.modal { position: fixed; inset: 0; z-index: 320; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal-bg { position: absolute; inset: 0; background: rgba(12, 27, 64, .55); backdrop-filter: blur(3px); }
.up { position: relative; width: 100%; max-width: 820px; max-height: calc(100vh - 40px); display: flex; flex-direction: column; background: var(--paper); border-radius: 18px; overflow: hidden; box-shadow: 0 30px 80px rgba(8, 16, 38, .45); }
.up-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 16px 14px 26px; border-bottom: 1px solid var(--line-soft); }
.up-head h3 { margin: 0; font-family: var(--serif); font-size: 20px; letter-spacing: .1em; color: var(--navy); }
.up-main { display: grid; grid-template-columns: 340px 1fr; min-height: 0; overflow: auto; }
.up-drop { position: relative; margin: 22px 0 22px 26px; aspect-ratio: 4 / 5; border-radius: 14px; background: #f3eedf; border: 1.5px dashed #cfc6ad; display: flex; align-items: center; justify-content: center; cursor: pointer; overflow: hidden; }
.up-drop.over { background: var(--sky); border-color: var(--blue); }
.up-drop.has { border-style: solid; border-color: var(--line); background: #efe9d8; }
.cp-empty { display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--navy); }
.cp-empty .ic { width: 40px; height: 40px; opacity: .45; }
.cp-empty b { font-size: 14px; font-weight: 600; background: var(--navy); color: #fff; padding: 7px 18px; border-radius: 20px; }
.up-drop.has .cp-empty { display: none; }
.up-drop img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.cp-x { position: absolute; top: 10px; right: 10px; width: 30px; height: 30px; border-radius: 50%; border: 0; background: rgba(12, 27, 64, .72); color: #fff; display: flex; align-items: center; justify-content: center; }
.cp-x .ic { width: 16px; height: 16px; }
.up-side { display: flex; flex-direction: column; padding: 22px 26px 16px 24px; min-width: 0; }
.up-chars { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.up-char { display: flex; align-items: center; gap: 7px; padding: 4px 14px 4px 4px; border: 1.5px solid var(--line); border-radius: 30px; cursor: pointer; font-size: 14px; font-weight: 600; color: var(--muted); background: #fff; }
.up-char input { position: absolute; opacity: 0; pointer-events: none; }
.up-char .avatar { width: 28px; height: 28px; border-width: 0; }
.up-char:has(input:checked) { border-color: var(--c); color: var(--ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 18%, transparent); }
.up-side textarea { flex: 1; min-height: 150px; border: 0; outline: none; resize: none; background: transparent; padding: 4px 2px 10px; font-size: 16px; line-height: 1.75; }
.up-tags { border: 0; border-top: 1px solid var(--line-soft); outline: none; background: transparent; padding: 13px 2px; font-size: 14.5px; color: var(--blue); }
.up-side textarea::placeholder, .up-tags::placeholder { color: #bcb7a8; }
.up-opts { display: flex; gap: 8px; padding-top: 4px; }
.pill { cursor: pointer; }
.pill input { position: absolute; opacity: 0; pointer-events: none; }
.pill span { display: inline-block; padding: 5px 14px; border: 1.5px solid var(--line); border-radius: 20px; font-size: 13px; color: var(--muted); background: #fff; }
.pill input:checked + span { background: var(--navy); border-color: var(--navy); color: #fff; }
.up-foot { display: flex; align-items: center; gap: 12px; padding: 12px 20px 14px 22px; border-top: 1px solid var(--line-soft); background: #faf6ea; }
.cp-more { font-size: 13px; color: var(--muted); margin-left: auto; }
.cp-more:hover { color: var(--navy); text-decoration: underline; }
.up-foot .btn { border-radius: 22px; padding: 10px 30px; font-size: 15px; }
.emote-picker { z-index: 400; }

/* 목록 위 줄 */
.rf-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.rf-bar-l { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rf-count { font-size: 13px; color: var(--muted); }
.chip { display: inline-flex; align-items: center; gap: 6px; background: var(--navy); color: #fff; border-radius: 20px; padding: 4px 8px 4px 13px; font-size: 13px; }
a.chip { padding: 4px 13px; }
.chip a { color: #fff; display: flex; opacity: .8; }
.chip .ic { width: 15px; height: 15px; }
.rf-search { display: flex; align-items: center; gap: 6px; background: var(--paper); border: 1px solid var(--line); border-radius: 20px; padding: 5px 12px; color: var(--muted); }
.rf-search .ic { width: 16px; height: 16px; }
.rf-search input { border: 0; outline: none; background: transparent; width: 130px; font-size: 13.5px; }

/* 카드 */
.rf-feed { display: flex; flex-direction: column; gap: 26px; }
.rf-card { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: 0 8px 26px rgba(12, 27, 64, .07); }
.rf-card-notice { border-color: var(--navy); }
.rf-card-inner { display: flex; position: relative; }
.rf-left { width: 50%; flex-shrink: 0; background: #f1ecdc; display: flex; align-items: center; justify-content: center; }
.rf-img-wrap { position: relative; max-width: 100%; display: flex; justify-content: center; }
.rf-img-wrap:has(.rf-yt) { width: 100%; }
.rf-img { display: block; width: auto; height: auto; max-width: 100%; cursor: zoom-in; }
.rf-img-blur { filter: blur(20px) brightness(.6); cursor: default; }
.rf-yt { width: 100%; aspect-ratio: 16 / 9; border: 0; }
.rf-img-cover { position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: #fff; background: rgba(12, 27, 64, .45); min-height: 120px; }
.rf-img-cover p { margin: 0; font-weight: 600; }
.rf-cover-btn { padding: 7px 20px; border-radius: 20px; border: 1px solid rgba(255, 255, 255, .8); background: transparent; color: #fff; font-size: 13px; }
.rf-landscape { flex-direction: column; }
.rf-landscape .rf-left { width: 100%; }
.rf-landscape .rf-img-wrap { max-width: min(100%, 900px); }
/* 세로로 긴 그림: 아래를 접고 더보기 */
.rf-img-wrap.clip { width: min(100%, var(--nw)); aspect-ratio: 2 / 3; max-height: 900px; overflow: hidden; align-items: flex-start; }
.rf-img-wrap.clip .rf-img { width: 100%; }
.rf-img-wrap.clip::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 120px; background: linear-gradient(transparent, rgba(241, 236, 220, .96)); pointer-events: none; }
.rf-clip-more { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 4; border: 0; background: var(--navy); color: #fff; font-size: 13px; padding: 7px 22px; border-radius: 20px; box-shadow: 0 4px 14px rgba(12, 27, 64, .3); }
.rf-img-wrap.clip.open { aspect-ratio: auto; max-height: none; padding-bottom: 54px; }
.rf-img-wrap.clip.open::after { display: none; }
.rf-secret-overlay { position: absolute; inset: 0; z-index: 6; background: rgba(12, 27, 64, .94); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.rf-secret-overlay .ic { width: 30px; height: 30px; margin-bottom: 6px; }
.rf-secret-overlay p { margin: 0; font-family: var(--serif); font-size: 17px; }
.rf-secret-overlay small { opacity: .7; }
.rf-right { flex: 1; min-width: 0; display: flex; flex-direction: column; padding: 20px 22px 16px; }
.rf-head { display: flex; align-items: center; gap: 11px; margin-bottom: 12px; }
.rf-head .name { font-size: 17px; }
.rf-head-r { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.rf-head-r time { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.rf-menu-wrap { position: relative; }
.rf-menu { position: absolute; right: 0; top: 36px; z-index: 20; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 28px rgba(12, 27, 64, .16); padding: 5px; min-width: 96px; display: flex; flex-direction: column; }
.rf-menu a, .rf-menu button { border: 0; background: none; text-align: left; padding: 8px 12px; border-radius: 6px; font-size: 14px; color: var(--ink); }
.rf-menu a:hover, .rf-menu button:hover { background: var(--cream); }
.rf-menu button { color: var(--danger); }
.rf-title { margin: 0 0 6px; font-family: var(--serif); font-size: 20px; color: var(--navy); }
.rf-post-body { font-size: 15.5px; line-height: 1.85; word-break: break-word; margin-bottom: 10px; }
.rf-tags { display: flex; gap: 4px 10px; flex-wrap: wrap; margin-bottom: 6px; }
.rf-tag { font-size: 13.5px; color: var(--blue); }
.rf-tag:hover { text-decoration: underline; }
.rf-actions { display: flex; gap: 4px; margin: 4px 0 4px -8px; }
.rf-act { display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 9px; border: 0; background: none; color: var(--muted); border-radius: 20px; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.rf-act:hover { background: rgba(20, 40, 90, .06); color: var(--navy); }
.rf-act.liked { color: #dc4a5d; }
.rf-act:disabled { opacity: .5; cursor: default; }

/* 댓글 — 메신저 말풍선: 내가 쓴 것은 오른쪽, 다른 사람은 왼쪽 */
.rf-cmts { display: flex; flex-direction: column; gap: 10px; flex: 1; border-top: 1px solid var(--line-soft); padding-top: 16px; margin-top: 4px; }
.rf-cmts:empty { display: none; }
.rf-cmt { display: flex; gap: 8px; align-items: flex-end; max-width: 92%; align-self: flex-start; }
.rf-cmt-more { display: none; }
.rf-cmt-more.show { display: flex; }
.rf-cmt-main { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; }
.rf-cmt-head { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; padding: 0 12px 3px; }
.rf-cmt-head .name { font-family: var(--sans); font-size: 12.5px; font-weight: 600; }
.rf-cmt-head .name-sub { font-size: 11.5px; }
.rf-bubble { max-width: 100%; background: #e9e5da; color: var(--ink); border-radius: 19px 19px 19px 5px; padding: 8px 14px; }
.rf-cmt-text { font-size: 15px; line-height: 1.55; word-break: break-word; }
.rf-cmt-pic { display: block; max-width: 220px; max-height: 240px; border-radius: 16px; margin-top: 4px; cursor: zoom-in; }
.rf-cmt { gap: 8px; }
.rf-cmt .avatar { margin-bottom: 0; }
.rf-cmt-row { display: flex; align-items: flex-end; gap: 7px; max-width: 100%; }
.rf-cmt-msg { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; }
.rf-cmt-meta { display: flex; flex-direction: column; align-items: flex-start; flex-shrink: 0; padding-bottom: 3px; font-size: 11px; line-height: 1.35; color: #a9a59a; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rf-cmt-meta button { border: 0; background: none; padding: 0; color: #a9a59a; font-size: 11px; }
.rf-cmt-meta button:hover { color: var(--danger); text-decoration: underline; }
.rf-cmt.mine { align-self: flex-end; }
.rf-cmt.mine .rf-cmt-main { align-items: flex-end; }
.rf-cmt.mine .rf-cmt-row { flex-direction: row-reverse; }
.rf-cmt.mine .rf-cmt-msg { align-items: flex-end; }
.rf-cmt.mine .rf-cmt-meta { align-items: flex-end; }
.rf-cmt.mine .rf-cmt-head .name { color: var(--muted) !important; }
.rf-cmt.mine .rf-bubble { background: #2f7fe6; color: #fff; border-radius: 19px 19px 5px 19px; }
.rf-cmt.mine .rf-bubble a { color: #fff; text-decoration: underline; }
.rf-more-btn { align-self: center; background: none; border: 0; color: var(--blue); font-size: 13px; padding: 0 0 4px; }

/* 댓글 쓰기 */
.rf-cmt-write { margin-top: 14px; }
.cw-row { display: flex; align-items: flex-end; gap: 8px; }
.cw-field { flex: 1; min-width: 0; display: flex; align-items: flex-end; gap: 2px; background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 4px 6px 4px 14px; }
.cw-field:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(61, 143, 224, .14); }
.cw-field .who-select { align-self: center; max-width: 118px; border-right: 1px solid var(--line); padding-right: 6px; margin-right: 8px; border-radius: 0; }
.cw-field textarea { flex: 1; min-width: 0; border: 0; outline: none; resize: none; background: transparent; padding: 7px 0; font-size: 14.5px; line-height: 1.5; height: 36px; max-height: 140px; }
.cw-send { width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--navy); color: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.cw-send:hover { background: var(--navy-deep); }
.cw-send:disabled { opacity: .5; }
.cw-send .ic { width: 18px; height: 18px; margin-left: -2px; margin-top: 1px; }
.cw-hint { margin: 6px 0 0 16px; font-size: 11.5px; color: #b0ab9d; }
.cmt-img-prev { position: relative; display: inline-block; margin: 0 0 8px 14px; }
.cmt-img-prev img { height: 84px; border-radius: 10px; display: block; border: 1px solid var(--line); }
.cmt-img-prev button { position: absolute; top: -8px; right: -8px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: var(--navy-deep); color: #fff; display: flex; align-items: center; justify-content: center; }
.cmt-img-prev .ic { width: 14px; height: 14px; }
.rf-cmt-login { border-top: 1px solid var(--line-soft); padding-top: 12px; margin-top: 14px; font-size: 13.5px; text-align: center; }
.emote { height: 2em; vertical-align: -.6em; margin: 0 1px; }
.ta-wrap .ta-emote { position: absolute; right: 8px; bottom: 8px; }
@media (max-width: 860px) {
  .up-main { grid-template-columns: 1fr; }
  .up-drop { margin: 16px 16px 0; aspect-ratio: 4 / 3; }
  .up-side { padding: 16px; }
  .up-side textarea { min-height: 90px; }
  .rf-card-inner { flex-direction: column; }
  .rf-left { width: 100%; }
  .rf-right { padding: 16px 16px 14px; }
  .cw-field .who-select { max-width: 84px; }
  .cw-hint { display: none; }
}

/* ---------- 게시판 목록 ---------- */
.rf-bar-r { display: flex; align-items: center; gap: 8px; }
.rf-bar-r .btn { border-radius: 20px; }
.board-list { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: 0 8px 26px rgba(12, 27, 64, .06); }
.board-row { display: grid; grid-template-columns: 1fr 130px 96px; gap: 12px; align-items: center; padding: 14px 20px; border-top: 1px solid var(--line-soft); color: var(--ink); }
.board-row:first-child { border-top: 0; }
.board-row:hover { background: #f8f4e8; }
.board-row.notice { background: #fbf6e6; }
.col-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.col-title .cnt { display: inline-block; margin-left: 8px; color: var(--blue); font-size: 12.5px; font-weight: 600; }
.col-title .pic { display: inline-block; margin-left: 6px; color: var(--muted); vertical-align: -3px; }
.col-title .pic .ic { width: 15px; height: 15px; }
.col-who { color: var(--muted); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.col-date { color: var(--muted); font-size: 12.5px; text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- 설정·이모티콘 ---------- */
.emote-grid { display: flex; gap: 10px; flex-wrap: wrap; }
.emote-card { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 8px 8px; border: 1px solid var(--line); width: 108px; background: #fff; }
.emote-card img { width: 48px; height: 48px; object-fit: contain; }
.emote-card code { font-size: 11.5px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.emote-picker { position: absolute; z-index: 150; background: var(--paper); border: 1px solid var(--line); border-top: 3px solid var(--navy); box-shadow: 0 12px 30px rgba(12, 27, 64, .2); padding: 8px; display: grid; grid-template-columns: repeat(6, 44px); gap: 4px; max-height: 260px; overflow: auto; }
.emote-item { width: 44px; height: 44px; border: none; background: none; padding: 4px; }
.emote-item:hover { background: var(--sky); }
.emote-item img { width: 100%; height: 100%; object-fit: contain; }
.emote-empty { grid-column: 1 / -1; color: var(--muted); font-size: 13px; text-align: center; padding: 10px; width: 240px; }

/* ---------- 라이트박스 ---------- */
.lightbox { position: fixed; inset: 0; z-index: 300; display: flex; align-items: center; justify-content: center; }
.lightbox-bg { position: absolute; inset: 0; background: rgba(8, 16, 38, .9); }
.lightbox img { position: relative; max-width: 94vw; max-height: 92vh; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); background: #fff; }
.lightbox-close { position: absolute; top: 16px; right: 20px; width: 40px; height: 40px; border-radius: 50%; border: none; background: rgba(255, 255, 255, .14); color: #fff; font-size: 16px; }

/* ---------- 반응형 ---------- */
@media (max-width: 860px) {
  .header-inner { height: 68px; }
  .brand-emblem { width: 44px; height: 44px; }
  .brand-text strong { font-size: 19px; }
  .main-nav { display: none; position: absolute; top: 68px; left: 0; right: 0; height: auto; background: var(--paper); border-bottom: 3px solid var(--navy); flex-direction: column; }
  .main-nav.open { display: flex; }
  .main-nav a { width: 100%; flex-direction: row; gap: 10px; justify-content: flex-start; padding: 13px 24px; border-top: 1px solid var(--line-soft); }
  .main-nav a::after { display: none; }
  .nav-toggle { display: flex; }
  .topline-en { letter-spacing: .14em; font-size: 10.5px; }
  .banner { height: 120px; }
  .banner h1 { font-size: 26px; }
  .gate { min-height: 340px; height: 52vh; }
  .desk { grid-template-columns: 1fr; margin-top: -56px; }
  .quick { grid-template-columns: 1fr 1fr; }
  .quick a:nth-child(2) { border-right: 0; }
  .quick a:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .world { grid-template-columns: 1fr; gap: 18px; }
  .world-toc { position: static; }
  .world-toc nav { flex-direction: row; flex-wrap: wrap; border-top: 0; gap: 6px; }
  .world-toc a { border: 1px solid var(--line); border-radius: 20px; padding: 3px 12px; font-size: 13.5px; background: var(--paper); }
  .world-toc a::after { display: none; }
  .world-sec { padding: 24px 20px; }
  .profile { grid-template-columns: 1fr; padding: 22px; gap: 20px; }
  .profile-name { font-size: 32px; }
  .pf { grid-template-columns: 1fr; }
  .rf-card-inner { flex-direction: column; }
  .rf-left { width: 100%; border-right: 0; border-bottom: 1px solid var(--line); }
  .board-row { grid-template-columns: 1fr 76px; }
  .col-who { display: none; }
  .footer-deco { display: none; }
  .id-grid { grid-template-columns: 1fr; }
}
.md-fig img[src*="emblem"] { max-height: 200px; }
@media (max-width: 560px) { .topline-en { display: none; } .topline-inner { justify-content: flex-end; } }

/* ============================================================
   학생 등록 원서 (캐릭터 등록·편집)
   ============================================================ */
.apply { max-width: 860px; margin: 0 auto; background: var(--paper); border: 1px solid var(--line); box-shadow: 0 14px 40px rgba(12, 27, 64, .1); padding: 44px 48px 36px; position: relative; }
.apply::before { content: ""; position: absolute; inset: 10px; border: 1px solid var(--line-soft); pointer-events: none; }
.apply-head { position: relative; display: flex; align-items: center; gap: 16px; padding-bottom: 20px; margin-bottom: 26px; border-bottom: 3px double var(--navy); }
.apply-head img { width: 62px; height: 62px; }
.apply-head small { font-family: var(--en); letter-spacing: .3em; font-size: 12px; color: var(--blue); }
.apply-head h2 { margin: 0; font-family: var(--serif); font-size: 30px; letter-spacing: .28em; color: var(--navy); }
.apply-no { margin-left: auto; text-align: right; font-size: 12px; color: var(--muted); line-height: 1.5; }
.apply-no b { display: block; font-family: var(--en); font-size: 18px; letter-spacing: .14em; color: var(--ink); font-weight: 600; }
.apply-top { position: relative; display: grid; grid-template-columns: 168px 1fr; gap: 22px; margin-bottom: 22px; }
.apply-photo-col { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.apply-photo { width: 168px; height: 210px; border: 1px solid var(--navy); background: var(--cream); display: flex; align-items: center; justify-content: center; text-align: center; cursor: pointer; overflow: hidden; font-family: var(--serif); font-size: 17px; color: var(--muted); letter-spacing: .2em; line-height: 1.6; background-image: linear-gradient(135deg, transparent 49.6%, var(--line) 49.6% 50.4%, transparent 50.4%); }
.apply-photo small { font-family: var(--sans); font-size: 12px; letter-spacing: 0; background: var(--cream); padding: 2px 6px; }
.apply-photo span { background: var(--cream); padding: 4px 8px; }
.apply-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.apply-photo:hover { border-color: var(--blue); }
.apply-grid { position: relative; display: grid; grid-template-columns: 96px 1fr 96px 1fr; border-top: 2px solid var(--navy); border-left: 1px solid var(--line); align-content: start; }
.apply-grid.one { grid-template-columns: 112px 1fr; }
.apply-grid .cell { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); min-height: 46px; display: flex; align-items: center; }
.apply-grid .k { background: #f1ecdc; justify-content: center; font-family: var(--serif); font-size: 14.5px; color: var(--navy); letter-spacing: .06em; text-align: center; }
.apply-grid .k.tall { align-items: flex-start; padding-top: 14px; }
.apply-grid .span3 { grid-column: span 3; }
.apply-grid .v input:not([type=color]), .apply-grid .v select, .apply-grid .v textarea { width: 100%; height: 100%; min-height: 44px; border: 0; background: transparent; padding: 8px 14px; outline: none; font-size: 15px; }
.apply-grid .v textarea { min-height: 190px; resize: vertical; line-height: 1.8; padding: 12px 14px; display: block; }
.apply-grid .v:focus-within { background: #fff; box-shadow: inset 0 -2px 0 var(--blue); }
.apply-grid .v input::placeholder, .apply-grid .v textarea::placeholder { color: #b9b4a4; }
.apply-grid .span3 input { font-family: var(--serif); font-size: 19px; letter-spacing: .1em; }
.apply-grid .color { gap: 10px; padding: 0 12px; }
.apply-grid .color input { width: 38px; height: 28px; padding: 0; border: 1px solid var(--line); background: none; cursor: pointer; }
.apply-grid .color span { font-size: 12px; color: var(--muted); }
.apply-foot { position: relative; margin-top: 30px; text-align: center; }
.apply-foot p { font-family: var(--serif); font-size: 16px; letter-spacing: .08em; margin: 0 0 20px; color: var(--ink); }
.apply-foot .row-actions { justify-content: center; }
.apply-foot .btn { min-width: 130px; padding: 11px 20px; font-size: 15px; }
@media (max-width: 760px) {
  .apply { padding: 28px 18px 24px; }
  .apply::before { display: none; }
  .apply-head h2 { font-size: 22px; letter-spacing: .12em; }
  .apply-no { display: none; }
  .apply-top { grid-template-columns: 1fr; }
  .apply-grid, .apply-grid.one { grid-template-columns: 84px 1fr; }
  .apply-grid .span3 { grid-column: auto; }
}
.apply-top .apply-grid { align-self: start; }
.apply-grid .color span { white-space: nowrap; }

/* ---------- 교원증 · 그룹 제목 ---------- */
.group-title { display: flex; align-items: baseline; gap: 10px; font-family: var(--serif); font-size: 22px; color: var(--navy); letter-spacing: .08em; margin: 0 0 18px; padding-bottom: 10px; border-bottom: 1px solid var(--navy); }
.group-title i { font-family: var(--en); font-style: normal; font-size: 12px; letter-spacing: .26em; color: var(--blue); }
.group-title span { margin-left: auto; font-family: var(--sans); font-size: 13px; color: var(--muted); letter-spacing: 0; }
.id-grid + .group-title { margin-top: 46px; }
.idcard.teacher { background: #fbf7ea; border-color: #d9c98f; }
.idcard.teacher .id-top { background: linear-gradient(90deg, #e9c24a, #f2d57c 60%, #e9c24a); color: var(--navy-deep); border-bottom: 3px solid var(--navy); }
.idcard.teacher .id-top span { font-weight: 700; }
.idcard.teacher .id-top i { color: var(--navy); }
.idcard.teacher .id-photo { border-color: var(--navy); box-shadow: 0 0 0 3px #fbf7ea, 0 0 0 4px #d9c98f; }
.id-name small { font-family: var(--sans); font-size: 12px; letter-spacing: 0; font-weight: 400; color: var(--paper); background: var(--navy); padding: 1px 8px; border-radius: 20px; margin-left: 10px; vertical-align: 5px; }
.apply-kind { position: relative; display: flex; align-items: center; gap: 22px; margin: -8px 0 20px; padding: 10px 16px; background: #f1ecdc; border-left: 3px solid var(--gold); }
.apply-kind span { font-family: var(--serif); color: var(--navy); letter-spacing: .1em; }
.apply-kind label { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.apply-kind input { accent-color: var(--navy); width: 16px; height: 16px; }
.apply[data-kind="student"] .t-only { display: none; }

.who-select:disabled { opacity: 1; color: var(--navy); cursor: default; appearance: none; -webkit-appearance: none; }

/* ---------- 화면 전환 표시 ---------- */
body.is-loading::before { content: ""; position: fixed; left: 0; top: 0; height: 3px; width: 40%; background: var(--gold); z-index: 500; animation: loadbar 1s ease-in-out infinite; }
@keyframes loadbar { from { transform: translateX(-100%); } to { transform: translateX(350%); } }
/* ---------- 기록부 (멤버 보기) ---------- */
.apply.view .cell.txt { padding: 10px 14px; font-size: 15px; line-height: 1.7; word-break: break-word; }
.apply.view .cell.txt.long { align-items: flex-start; min-height: 150px; padding: 14px; line-height: 1.9; display: block; }
.apply.view .cell.txt.serif { font-family: var(--serif); font-size: 16px; }
.apply.view .v-name { font-family: var(--serif); font-size: 22px; letter-spacing: .12em; color: var(--c); }
.apply.view .v-color { display: inline-block; width: 44px; height: 22px; border-radius: 4px; background: var(--c); border: 1px solid var(--line); }
.apply.view .apply-photo { cursor: default; background-image: none; font-size: 54px; letter-spacing: 0; color: var(--c); border-color: var(--c); }
.apply.view .apply-photo img { cursor: zoom-in; }
.apply.view .apply-head { border-bottom-color: var(--c); }
.apply.view .apply-no b { font-family: var(--sans); letter-spacing: 0; font-size: 15px; }

/* ---------- 댓글 오른쪽 클릭 메뉴 · 수정 ---------- */
.ctx-menu { position: absolute; z-index: 450; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(12, 27, 64, .2); padding: 5px; min-width: 110px; display: flex; flex-direction: column; }
.ctx-menu button { border: 0; background: none; text-align: left; padding: 9px 14px; border-radius: 8px; font-size: 14px; color: var(--ink); }
.ctx-menu button:hover { background: var(--cream); }
.rf-cmt[data-can] .rf-bubble, .rf-cmt[data-can] .rf-cmt-pic { -webkit-touch-callout: none; }
.cmt-edit { display: flex; flex-direction: column; gap: 6px; min-width: 240px; max-width: 100%; }
.cmt-edit textarea { border: 1.5px solid var(--blue); border-radius: 16px; padding: 8px 14px; font-size: 15px; line-height: 1.55; resize: none; outline: none; background: #fff; width: 100%; }
.cmt-edit div { display: flex; gap: 6px; justify-content: flex-end; }
.cmt-edit button { border: 0; border-radius: 16px; padding: 4px 14px; font-size: 12.5px; }
.ce-cancel { background: #e9e5da; color: var(--ink); }
.ce-save { background: var(--navy); color: #fff; }

/* ============================================================
   로그 그림: 왼쪽 위 정렬, 그림 크기에 맞춘 칸
   ============================================================ */
.rf-left { width: auto; max-width: 56%; background: none; align-items: flex-start; justify-content: flex-start; padding: 20px 0 20px 20px; }
.rf-left .rf-img { border-radius: 8px; }
.rf-left .rf-img-wrap { border-radius: 8px; overflow: hidden; }
.rf-landscape .rf-left { width: 100%; max-width: 100%; padding: 20px 20px 0; }
.rf-img-wrap.clip::after { background: linear-gradient(transparent, rgba(255, 253, 248, .97)); }
.rf-portrait .rf-right { padding-left: 22px; }
@media (max-width: 860px) { .rf-left { width: 100%; max-width: 100%; padding: 14px 14px 0; } }

/* ============================================================
   글쓰기 · 수정 화면 (올리기 창과 같은 모양)
   ============================================================ */
.up-page { max-width: 880px; max-height: none; margin: 0 auto; border: 1px solid var(--line); box-shadow: 0 10px 34px rgba(12, 27, 64, .08); overflow: visible; }
.up-page .up-main { overflow: visible; }
.up-page .up-head { border-radius: 18px 18px 0 0; }
.up-page .up-foot { border-radius: 0 0 18px 18px; }
.up-title { border: 0; border-bottom: 1px solid var(--line-soft); outline: none; background: transparent; font-family: var(--serif); font-size: 24px; color: var(--navy); letter-spacing: .02em; padding: 6px 2px 14px; margin-bottom: 12px; width: 100%; }
.up-title.sm { font-size: 18px; padding: 2px 2px 10px; margin-bottom: 8px; }
.up-title::placeholder { color: #c2bcab; }
.up-yt { color: var(--ink); }
.up-article { max-width: 780px; }
.up-article-body { display: flex; flex-direction: column; padding: 24px 30px 18px; }
.up-article-body textarea { min-height: 320px; border: 0; outline: none; resize: vertical; background: transparent; font-size: 16px; line-height: 1.85; padding: 4px 2px 14px; }
.up-article-body textarea::placeholder { color: #bcb7a8; }
.up-attach { padding: 4px 0 14px; }
.up-drop.mini { margin: 0; aspect-ratio: auto; width: 100%; min-height: 86px; border-radius: 12px; }
.up-drop.mini .cp-empty { flex-direction: row; gap: 12px; }
.up-drop.mini .cp-empty .ic { width: 26px; height: 26px; }
.up-drop.mini.has { min-height: 0; background: #f3eedf; padding: 12px; justify-content: flex-start; }
.up-drop.mini img { position: static; width: auto; height: auto; max-width: 100%; max-height: 360px; border-radius: 8px; }
.up-article-body .up-opts { padding-top: 6px; }
@media (max-width: 860px) { .up-article-body { padding: 18px 16px 14px; } .up-title { font-size: 20px; } }

/* ============================================================
   메인 로그인 박스
   ============================================================ */
.desk-login { display: flex; flex-direction: column; }
.login-form { padding: 18px 0 4px; gap: 12px; }
.login-form label { display: flex; flex-direction: column; gap: 5px; }
.login-form label span { font-size: 12.5px; color: var(--muted); letter-spacing: .04em; }
.login-form .input { padding: 11px 13px; border-radius: 8px; }
.login-form .btn.wide { padding: 12px; border-radius: 8px; font-size: 15px; margin-top: 4px; }
.login-join { text-align: center; font-size: 13px; color: var(--muted); padding-top: 2px; }
.me-card { padding: 20px 0 0; display: flex; flex-direction: column; flex: 1; }
.me-top { display: flex; align-items: center; gap: 14px; padding-bottom: 18px; border-bottom: 1px dashed var(--line); }
.me-top img, .me-noimg { width: 60px; height: 60px; flex-shrink: 0; }
.me-id { min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.me-id strong { font-family: var(--serif); font-size: 20px; color: var(--navy); line-height: 1.2; }
.me-id span { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.me-role { font-style: normal; font-size: 11.5px; padding: 1px 9px; border-radius: 20px; border: 1px solid var(--line); color: var(--muted); }
.me-role.admin { background: var(--navy); border-color: var(--navy); color: #fff; }
.me-sec { padding: 16px 0 18px; }
.me-sec h4 { margin: 0 0 10px; display: flex; justify-content: space-between; align-items: baseline; font-size: 12.5px; font-weight: 600; color: var(--muted); letter-spacing: .06em; }
.me-sec h4 a { font-weight: 400; color: var(--blue); letter-spacing: 0; }
.me-chars { display: flex; flex-direction: column; gap: 2px; margin: 0 -8px; }
.me-char { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 10px; background: none; border: 0; color: var(--ink); }
.me-char:hover { background: #f4efe1; }
.me-char b { font-family: var(--serif); font-size: 15.5px; color: var(--c); }
.me-char small { margin-left: auto; font-size: 12px; color: var(--muted); }
.me-chars a { padding: 6px 8px; border: 0; border-radius: 10px; font-size: inherit; background: none; }
.me-none { margin: 0; font-size: 13.5px; color: var(--muted); }
.me-card .btn.wide { padding: 12px; border-radius: 8px; font-size: 15px; margin-top: auto; }
.me-links { display: flex; justify-content: center; gap: 18px; padding-top: 12px; }
.me-links a, .me-links button { border: 0; background: none; padding: 0; font-size: 13px; color: var(--muted); }
.me-links a:hover, .me-links button:hover { color: var(--navy); text-decoration: underline; }
