/* 웹판에만 있는 것: 끌어다 놓기 칸, 배정 안내, 로그아웃, 좁은 화면 대응. 나머지 디자인·모션은 데스크톱 app.css 그대로 */

.dropzone {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  min-height: 160px; padding: 24px; text-align: center; cursor: pointer;
  border: 1.5px dashed var(--color-hairline-strong); border-radius: var(--radius-lg);
  background: var(--color-canvas-soft); color: var(--color-ink-secondary);
  transition: border-color var(--dur-quick) var(--ease), background-color var(--dur-quick) var(--ease), transform var(--dur-std) var(--ease);
}
.dropzone svg { color: var(--color-text-primary); transition: transform var(--dur-std) var(--ease); }
.dropzone:hover, .dropzone:focus-visible { border-color: var(--color-primary); background: var(--color-tint); }
.dropzone:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }
.dropzone.over { border-color: var(--color-primary); background: var(--color-tint); transform: scale(1.01); }
.dropzone.over svg { transform: translateY(-3px); }
.dropzone.busy { pointer-events: none; opacity: 0.7; }
.dropzone.busy svg { animation: drop-pulse 900ms var(--ease) infinite alternate; }
@keyframes drop-pulse { to { transform: translateY(-4px); } }
.dropzone-title { font-size: 16px; font-weight: 600; color: var(--color-ink); }
.dropzone.landed { animation: drop-land 520ms var(--ease-out); }
.dropzone.shake { animation: drop-shake 420ms var(--ease); }
@keyframes drop-land { 0% { transform: scale(1); } 35% { transform: scale(0.985); border-color: var(--color-text-success); } 100% { transform: scale(1); } }
@keyframes drop-shake { 20%, 60% { transform: translateX(-4px); } 40%, 80% { transform: translateX(4px); } }

/* 올린 파일 줄: 위에서 떨어져 들어오고, 처리 중 흐르는 막대 → 끝나면 ✓ / ✕ */
.drop-queue { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.drop-item {
  position: relative; overflow: hidden; display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; border: 1px solid var(--color-hairline); border-radius: var(--radius-element);
  background: var(--color-surface); font-size: 13px; color: var(--color-ink);
  animation: drop-in var(--dur-std) var(--ease-out) both;
}
.drop-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drop-state { width: 16px; text-align: center; font-weight: 700; }
.drop-bar { position: absolute; left: 0; bottom: 0; height: 2px; width: 40%; background: var(--color-primary); animation: drop-flow 1100ms var(--ease) infinite; }
.drop-item.done .drop-bar, .drop-item.fail .drop-bar { display: none; }
.drop-item.done { border-color: var(--color-text-success); }
.drop-item.done .drop-state::before { content: "✓"; color: var(--color-text-success); }
.drop-item.fail { border-color: var(--color-text-error); background: var(--color-error-muted); }
.drop-item.fail .drop-state::before { content: "✕"; color: var(--color-text-error); }
.drop-item.done .drop-state, .drop-item.fail .drop-state { animation: chip-in var(--dur-std) var(--ease-out) both; }
@keyframes drop-in { from { opacity: 0; transform: translateY(-10px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes drop-flow { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
/* 폴더째 올리기: 폴더마다 한 줄, 처리된 만큼 게이지가 차분히 찬다 (흐르는 막대 없음) */
.drop-group { padding-bottom: 11px; }
.drop-count { flex: none; font-size: 12px; color: var(--color-ink-muted); font-variant-numeric: tabular-nums; }
.drop-gauge { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--color-hairline); }
.drop-gauge i { display: block; height: 100%; width: 0; background: var(--color-primary); border-radius: 0 2px 2px 0;
  transition: width 600ms var(--ease), background-color var(--dur-std) var(--ease); }
.drop-group.active { border-color: var(--color-primary); }
.drop-gauge i { position: relative; overflow: hidden; }
/* 처리 중인 폴더: 찬 부분 위로 옅은 빛이 천천히 지나간다 (진행 중이라는 표시, 깜빡임 없이) */
.drop-group.active .drop-gauge i::after { content: ""; position: absolute; inset: 0; width: 60%;
  background: linear-gradient(90deg, transparent, rgb(255 255 255 / 0.35), transparent);
  animation: gauge-sheen 1800ms ease-in-out infinite; }
@keyframes gauge-sheen { from { transform: translateX(-100%); } to { transform: translateX(170%); } }
.drop-group.done .drop-gauge i { background: var(--color-text-success); }
.drop-group.fail .drop-gauge i { background: var(--color-text-error); }
.drop-group.fail .drop-count { color: var(--color-text-error); }
@media (prefers-reduced-motion: reduce) { .drop-gauge i { transition: none; } .drop-group.active .drop-gauge i::after { animation: none; } }
/* RC 인증서 올리기 줄 (rc.html): 아이콘 · 이름/크기·상태 · 다시 시도 · ✓/✕ · 지우기 */
.up-item { gap: 10px; padding: 10px 12px; }
.up-ico { flex: none; color: var(--color-ink-muted); }
.up-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.up-main .drop-name { font-weight: 600; }
.up-meta { font-size: 12px; color: var(--color-ink-muted); overflow-wrap: anywhere; }
.up-item.done .up-meta { color: var(--color-text-success); }
.up-item.fail .up-meta, .up-item.fail .up-ico { color: var(--color-text-error); }
.up-x { flex: none; border: 0; background: none; color: var(--color-ink-muted); font-size: 14px; padding: 4px 6px; border-radius: var(--radius-element); cursor: pointer; }
.up-x:hover:not(:disabled), .up-x:focus-visible { background: var(--color-canvas-soft); color: var(--color-ink); }
.up-x:disabled { opacity: 0.3; cursor: default; }
.up-item:not(.done) .drop-state { display: none; }   /* 실패는 빨간 줄·문구로 충분 (✕ 는 지우기 버튼과 헷갈림) */

/* 시수·성적: 성적산출표(구글 시트) 모양 미리보기. 계=파랑, 성적·성적평가·시수·F 점검=노랑 */
.sheet-box { overflow: auto; max-height: 70vh; }
.sheet-table { border-collapse: collapse; font-size: 12px; white-space: nowrap; user-select: text; }
.sheet-table th, .sheet-table td { border: 1px solid var(--color-hairline-strong); padding: 3px 8px; text-align: center; }
.sheet-table th { background: var(--color-canvas-soft); font-weight: 600; color: var(--color-ink); position: sticky; top: 0; }
.sheet-table thead tr:nth-child(2) th { top: 22px; }
.sheet-table thead th[rowspan="2"] { white-space: normal; max-width: 140px; }
.sheet-table td.sum, .sheet-table th.sum { background: color-mix(in srgb, var(--color-primary) 10%, transparent); }
.sheet-table td.key, .sheet-table th.key { background: color-mix(in srgb, var(--color-accent-orange) 22%, transparent); }
.sheet-table tr.fail-row td:nth-child(-n+2) { color: var(--color-text-error); font-weight: 600; }
.sheet-table th.copyable { cursor: copy; }
.sheet-table td.toggle { cursor: pointer; text-decoration: underline dotted; }
.sheet-table td.toggle:hover, .sheet-table td.toggle:focus-visible { background: var(--color-tint); color: var(--color-primary); outline: none; }
.sheet-table th.copyable:hover, .sheet-table th.copyable:focus-visible { background: var(--color-tint); color: var(--color-primary); outline: none; }
.sheet-table td.sheet-empty { padding: 20px; color: var(--color-ink-muted); }
/* 유학생: 문화체육 칸의 표시 버튼 (켜면 진하게), 비교과 회수 칸 */
.intl-chip { border: 1px dashed var(--color-hairline-strong); background: none; color: var(--color-ink-muted); border-radius: 999px; padding: 0 8px; font: inherit; font-size: 11px; cursor: pointer; }
.intl-chip.on { border: 1px solid var(--color-primary); background: var(--color-primary); color: var(--color-on-primary); }
.intl-chip:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 1px; }
.sheet-table td.intl-count::after { content: '회'; font-size: 10px; color: var(--color-ink-muted); margin-left: 1px; }
.sheet-table td.intl-count:has(input)::after { content: none; }
.sheet-input { width: 56px; font: inherit; text-align: center; }
/* 좌우로 넘겨도 학번·이름 두 칸은 왼쪽에 고정 (위쪽 머리글과 겹치는 모서리가 맨 위) */
.sheet-table thead th { z-index: 2; }
.sheet-table thead tr:first-child th:nth-child(-n+2), .sheet-table tbody td:nth-child(-n+2) { position: sticky; z-index: 1; background: var(--color-surface); box-shadow: inset -1px 0 var(--color-hairline-strong); }
.sheet-table thead tr:first-child th:nth-child(-n+2) { z-index: 3; background: var(--color-canvas-soft); }
.sheet-table thead tr:first-child th:nth-child(1), .sheet-table tbody td:nth-child(1) { left: 0; width: 92px; min-width: 92px; max-width: 92px; box-sizing: border-box; }
.sheet-table thead tr:first-child th:nth-child(2), .sheet-table tbody td:nth-child(2) { left: 92px; }

.profile-logout { margin-top: 10px; width: 100%; }

.web-gate {
  position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 16px;
  background: var(--color-scrim);
  animation: page-in var(--dur-std) var(--ease-out);
}
.web-gate-card {
  max-width: 420px; padding: 28px; border-radius: var(--radius-xl); background: var(--color-surface); box-shadow: var(--shadow-2);
  display: flex; flex-direction: column; gap: 12px; align-items: flex-start;
}
.web-gate-card h2, .web-gate-card p { margin: 0; }
.web-gate-card select { width: 100%; }
.web-banner {
  position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 90; max-width: calc(100% - 32px);
  padding: 10px 16px; border-radius: var(--radius-container); background: var(--color-ink); color: var(--color-canvas);
  font-size: 13px; box-shadow: var(--shadow-2);
}

/* 좁은 화면(태블릿 세로·휴대폰): 사이드바를 위로 올리고 본문은 스크롤 */
@media (max-width: 900px) {
  body { overflow: auto; user-select: auto; }
  .layout { flex-direction: column; height: auto; min-height: 100vh; }
  .sidebar { width: auto; height: auto; padding: 12px; border-right: 0; border-bottom: 1px solid var(--color-hairline); }
  .nav-label, .mini-cal { display: none; }
  /* 위쪽 탭: 아이콘만, 고른 탭만 이름이 옆으로 펼쳐진다 (한 줄에 다 들어가게) */
  .nav { flex-direction: row; flex-wrap: nowrap; align-items: center; justify-content: center; gap: 2px; width: max-content; max-width: 100%; margin: 0 auto;
    overflow-x: auto; scrollbar-width: none; padding: 4px; border: 1px solid var(--color-hairline); border-radius: 16px; background: var(--color-surface);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); }
  .nav::-webkit-scrollbar { display: none; }
  .nav-indicator { display: none; }
  .nav-item { white-space: nowrap; flex: none; gap: 0; padding: 9px 9px; border-radius: 12px; color: var(--color-ink-muted);
    transition: gap 600ms cubic-bezier(0.25, 1, 0.5, 1) 100ms, padding 600ms cubic-bezier(0.25, 1, 0.5, 1) 100ms, color 300ms, background-color 300ms; }
  .nav-item span { display: inline-block; max-width: 0; opacity: 0; overflow: hidden; vertical-align: middle;
    transition: max-width 600ms cubic-bezier(0.25, 1, 0.5, 1) 100ms, opacity 400ms ease 100ms; }
  .nav-item.active { gap: 8px; padding: 9px 14px; background: var(--color-canvas-soft); color: var(--color-text-primary); }
  .nav-item.active span { max-width: 9em; opacity: 1; }
  .nav-item:hover:not(.active) { color: var(--color-ink); }
  .role-nav { display: contents; }
  .profile { display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 10px; margin-top: 8px; padding: 8px 12px; text-align: left; }
  .profile .name, .profile .detail { text-align: left; grid-column: 1; }
  .profile-logout { grid-column: 2; grid-row: 1 / span 2; }
  .profile-logout { width: auto; margin: 0 0 0 auto; }
  .main { height: auto; overflow: visible; padding: 20px 16px 48px; }
  /* minmax(0,…): 1fr 은 안의 넓은 표보다 작아지지 않아 카드가 화면 밖으로 밀렸다 */
  .grid-two, .grid-group, .grid-roster, .field-grid { grid-template-columns: minmax(0, 1fr) !important; }
  .table-box { overflow-x: auto; }
  .ds-table th { white-space: nowrap; }   /* 좁은 칸에서 '번호'가 한 글자씩 세로로 깨지지 않게 (표는 옆으로 밀어 봄) */
  .top-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .top-tab { flex: none; white-space: nowrap; }
}

/* 담당이 아니라 잠긴 버튼·입력칸이 눈에 보이게 */
.ds-btn:disabled, .seg-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.ds-input[readonly], .ds-input:disabled { background: var(--color-canvas-soft); color: var(--color-ink-muted); }

/* 관리자 화면 */
.admin-body { overflow: auto; user-select: auto; min-height: 100vh; }
.admin-bar {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between;
  padding: 10px 24px; background: var(--color-canvas); border-bottom: 1px solid var(--color-hairline);
}
.admin-bar .brand { padding: 0; }
.admin-tag { margin-left: 4px; padding: 2px 8px; border-radius: var(--radius-full); background: var(--color-tint); color: var(--color-secondary); font-size: 12px; font-weight: 600; }
.admin-main { max-width: 1040px; margin: 0 auto; padding: 28px 24px 64px; }
.admin-main .page { display: flex; flex-direction: column; gap: 16px; }
@media (max-width: 700px) {
  .admin-bar { padding: 10px 16px; }
  .admin-tag { display: none; }
  .admin-main { padding: 20px 16px 48px; }
  .admin-main .grid-two { grid-template-columns: 1fr; }
}

/* 학생 자료함 */
.files-search { margin: 0; max-width: 360px; }
.files-list { display: flex; flex-direction: column; gap: 6px; }
.files-folder { border: 1px solid var(--color-hairline); border-radius: var(--radius-md); background: var(--color-surface); overflow: hidden; }
.files-head { display: flex; align-items: center; gap: 8px; padding: 4px 8px 4px 4px; }
.files-toggle {
  flex: 1; display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 6px 8px; text-align: left;
  border: 0; border-radius: var(--radius-element); background: none; cursor: pointer; font-size: 14px;
}
.files-toggle:hover { background: var(--color-canvas-soft); }
.files-toggle svg { flex: none; color: var(--color-ink-muted); transition: transform var(--dur-std) var(--ease); }
.files-toggle[aria-expanded="true"] svg:first-child { transform: rotate(90deg); }
.files-dir { width: 100%; min-height: 36px; padding: 4px 8px; }
.files-issue {
  display: inline-flex; align-items: center; justify-content: center; flex: none; width: 18px; height: 18px;
  border-radius: 50%; background: var(--color-danger); color: #fff; font-size: 12px; font-weight: 700;
}
.files-folder.has-issue { border-color: var(--color-danger); }
/* 처리 기록 > 직접 분류: 학번 · 폴더 · (폴더에 맞는 칸) · 넣기 */
.failed-form-row td { padding-top: 0; background: var(--color-error-muted); }
.failed-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; margin-top: 0; padding: 10px; border: 1px solid var(--color-hairline); border-radius: 10px; background: var(--color-surface-muted, var(--color-surface)); }
.failed-form label { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--color-ink-muted); }
.failed-form label[hidden] { display: none; }
.failed-form input, .failed-form select { width: 140px; min-height: 32px; padding: 2px 8px; border: 1px solid var(--color-hairline-strong); border-radius: 8px; background: var(--color-surface); color: var(--color-ink); font: inherit; font-size: 13px; }
.failed-form .ff-hint { flex-basis: 100%; margin: 0; }
.failed-form .ff-hint:empty { display: none; }
.files-issue-note { padding: 6px 12px 6px 38px; font-size: 13px; color: var(--color-danger); background: var(--color-fail-bg); }
.files-dir b { font-weight: 600; }
.files-items .files-items { border-top: 0; padding: 0 0 2px 22px; border-left: 1px solid var(--color-hairline); margin-left: 14px; }
.files-items { border-top: 1px solid var(--color-hairline); padding: 4px 8px 8px 30px; animation: page-in var(--dur-std) var(--ease-out); }
.files-item { display: flex; align-items: center; gap: 8px; }
.files-name {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 4px 8px; text-align: left;
  border: 0; border-radius: var(--radius-element); background: none; cursor: pointer; color: var(--color-text-primary); font-size: 14px;
}
.files-name:hover { background: var(--color-tint); }
.files-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.files-name small { flex: none; margin-left: auto; color: var(--color-ink-faint); font-size: 12px; }
.files-del, .files-zip { min-height: 32px; padding: 4px 10px; font-size: 13px; }

/* 메신저 페이지: 위아래 여백을 줄여 화면을 꽉 채움 */
.page-chat { gap: 0; }

.admin-views { display: inline-flex; gap: 2px; padding: 2px; border-radius: var(--radius-md); background: var(--color-canvas-soft); }
.admin-views .seg-btn { display: inline-flex; align-items: center; gap: 6px; }
.admin-views .nav-badge { margin-left: 0; }
.admin-chat { animation: page-in var(--dur-std) var(--ease-out); }
.admin-chat .chat { height: calc(100vh - 120px); }
@media (max-width: 700px) { .admin-bar { flex-wrap: wrap; gap: 8px; } }

[hidden] { display: none !important; }

.doc { max-width: 760px; margin: 0 auto; line-height: 1.75; font-size: 15px; }
.doc h1 { margin: 0 0 8px; }
.doc h2 { margin: 28px 0 8px; font-size: 18px; }
.doc p, .doc li { color: var(--color-ink); }

/* 화면 언어 고르기 */
.lang-pick { width: auto; min-height: 36px; padding: 4px 28px 4px 10px; font-size: 13px; }

/* 인증서 결과물 미리보기 */
.pdf-preview { position: fixed; inset: 0; z-index: 150; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(0, 0, 0, 0.55); }
.pdf-preview-card { display: flex; flex-direction: column; width: min(960px, 100%); height: min(88vh, 1100px); border-radius: var(--radius-container); overflow: hidden;
  background: var(--color-surface); box-shadow: var(--shadow-2); }
.pdf-preview-head { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--color-hairline); }
.pdf-preview-head b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.pdf-preview iframe { flex: 1; width: 100%; border: 0; background: #fff; }
@media (max-width: 600px) { .pdf-preview { padding: 0; } .pdf-preview-card { height: 100vh; border-radius: 0; } }

/* 학생 자료함 (폰): 학생 폴더 = 유리 폴더 카드. 뒤판(오른쪽 탭) → 종류별 인증서 장 부채꼴 → 앞주머니(왼쪽 탭, 유리) → 이름·종류 칩
   누르면 아래로 원래 파일 목록이 펼쳐진다 (내려받기·미리보기·삭제·시간 고치기 그대로). 넓은 화면은 원래 목록 그대로 */
.ff-back, .ff-fan, .ff-front, .ff-tags, .ff-title { display: none; }
@media (max-width: 700px) {
  .files-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; }
  .files-folder { --hc: var(--color-ink-muted); border: 0; border-radius: 18px; background: none; overflow: visible; }
  .files-folder:has(.files-toggle[aria-expanded="true"]) { grid-column: 1 / -1; }
  .files-folder.has-issue { border: 0; }
  .files-head { position: relative; display: block; padding: 0; }
  .files-head > .files-toggle { position: relative; isolation: isolate; display: block; width: 100%; height: 150px; padding: 0; border-radius: 18px;
    background: none; -webkit-tap-highlight-color: transparent; transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1); }
  .files-head > .files-toggle:hover { background: none; }
  .files-head > .files-toggle:active { transform: scale(0.98); }
  .files-head > .files-toggle:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 3px; }
  .files-head > .files-toggle > svg { display: none; }
  /* 뒤판: 오른쪽 위에 탭 */
  .ff-back { display: block; position: absolute; inset: 14px 0 0; z-index: -2; border-radius: 18px;
    background: color-mix(in srgb, var(--color-ink) 4%, var(--color-surface)); box-shadow: inset 0 0 0 1px var(--color-hairline); }
  .ff-back::after { content: ""; position: absolute; right: 0; top: -14px; width: 44%; height: 28px; border-radius: 14px 14px 0 0; background: inherit; }
  /* 인증서 장: 종류(명사특강·비교과 …)마다 한 장, 부채꼴 */
  .ff-fan { display: block; position: absolute; left: 50%; top: 22px; z-index: -1; width: 0; height: 0; }
  .ff-fan i { position: absolute; left: -24px; top: 0; width: 48px; height: 62px; border-radius: 6px;
    background: var(--color-surface); box-shadow: 0 8px 16px -8px rgba(0, 0, 0, 0.35), 0 0 0 1px var(--color-hairline);
    transform: translate(calc(var(--k) * 32px), calc(var(--k) * var(--k) * 6px)) rotate(calc(var(--k) * 9deg));
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1); }
  .ff-fan i::before { content: ""; position: absolute; left: 7px; right: 7px; top: 8px; height: 4px; border-radius: 2px; background: var(--hc); opacity: 0.3;
    box-shadow: 0 8px 0 -1px var(--color-hairline), 0 15px 0 -1px var(--color-hairline), 0 22px 0 -1px var(--color-hairline); }
  .files-head > .files-toggle[aria-expanded="true"] .ff-fan i { transform: translate(calc(var(--k) * 40px), calc(var(--k) * var(--k) * 6px - 12px)) rotate(calc(var(--k) * 12deg)); }
  /* 앞주머니: 왼쪽 위에 탭, 반투명 유리 */
  .ff-front { display: block; position: absolute; left: 0; right: 0; bottom: 0; height: 92px; z-index: 0; border-radius: 18px;
    background: linear-gradient(160deg, color-mix(in srgb, #fff 55%, transparent), color-mix(in srgb, #fff 12%, transparent) 60%), color-mix(in srgb, var(--color-surface) 86%, transparent);   /* 흐림(backdrop-filter) 없음: 폴더마다 흐림이면 폰 스크롤이 끊겨서 */
    box-shadow: inset 0 1px 0 color-mix(in srgb, #fff 70%, transparent), inset 0 0 0 1px color-mix(in srgb, var(--color-ink) 7%, transparent), 0 10px 20px -12px rgba(0, 0, 0, 0.3); }
  :root[data-theme="dark"] .ff-front { background: linear-gradient(160deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.015) 55%), color-mix(in srgb, var(--color-surface) 78%, transparent);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), inset 0 0 0 1px rgba(255, 255, 255, 0.06), 0 10px 20px -12px rgba(0, 0, 0, 0.5); }
  .files-head > .files-toggle > b { display: none; }   /* '학번_이름' 대신 아래 ff-title 로 이름 크게, 학번 작게 */
  .ff-title { display: flex; flex-direction: column; position: absolute; left: 14px; right: 30px; bottom: 36px; z-index: 1; text-align: left; min-width: 0; }
  .ff-title b { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .ff-title small { font-size: 10.5px; color: var(--color-ink-muted); font-variant-numeric: tabular-nums; }
  .files-head > .files-toggle > span.text-caption { position: absolute; left: 14px; top: 24px; z-index: 1; display: none; }
  .files-head > .files-toggle > .files-issue { position: absolute; right: 12px; bottom: 48px; z-index: 1; }
  .ff-tags { display: flex; position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 1; gap: 4px; flex-wrap: wrap; height: 20px; overflow: hidden;   /* 안 들어가는 칩은 반쯤 잘리지 않고 통째로 숨긴다 */ }
  .ff-tags em { flex: none; padding: 2px 7px; border-radius: 99px; font-style: normal; font-size: 10.5px; line-height: 16px; white-space: nowrap;
    color: var(--color-ink-muted); background: color-mix(in srgb, var(--color-surface) 70%, transparent); box-shadow: inset 0 0 0 1px var(--color-hairline); }
  .files-folder.has-issue .ff-back { background: color-mix(in srgb, var(--color-danger) 16%, var(--color-canvas-soft)); }
  .files-head > .files-zip { position: absolute; right: 10px; top: 6px; z-index: 2; min-height: 26px; padding: 2px 9px; font-size: 11.5px; border-radius: 10px; }
  .files-folder > .files-items, .files-folder > .files-issue-note { margin-top: 8px; border-radius: 12px; background: var(--color-surface); border: 1px solid var(--color-hairline); }
  .files-folder > .files-items { padding: 4px 6px 8px 8px; }
}
@media (max-width: 700px) and (prefers-reduced-motion: reduce) { .ff-fan i, .files-head > .files-toggle { transition: none; } }

/* 이번 학기 RA 가 아닌데 지난 학기 이력으로 메신저만 연 경우: 업무 탭·업무 화면은 숨긴다 (서버도 업무 요청을 막음) */
body.work-locked .sidebar .nav-item:not([data-page="chat"]):not([data-page="community"]),
body.work-locked .sidebar .role-nav, body.work-locked .mode-btn[data-mode="work"],
body.work-locked .page:not([data-page="chat"]):not([data-page="community"]) { display: none !important; }
