:root {
  --navy-900: #0a1550;
  --navy-800: #0b1f6b;
  --navy-700: #0b2a8a;
  --ink: #0d1b4c;
  --blue-700: #1550b8;
  --blue-600: #1e5bd8;
  --blue-400: #3d8bf2;
  --page: #f8fafd;
  --avatar: #dbe7fb;
  --muted-1: #33436e;
  --muted-2: #4a5a82;
  --muted-3: #5a6a92;
  --muted-4: #7584a8;
  --muted-5: #9aa6c2;
  --line-1: #cdd8ee;
  --line-2: #d3ddef;
  --line-3: #e1e8f4;
  --line-4: #e2e9f5;
  --line-5: #e4ebf6;
  --line-6: #eef2f9;
  --like: #e0245e;
  --error: #c0392b;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--page);
  font-family: Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  color: var(--ink);
  /* 한글이 단어 중간에서 줄바꿈되지 않게 한다 */
  word-break: keep-all;
}
body.locked { overflow: hidden; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
input:focus { outline: 2px solid var(--blue-600); outline-offset: -1px; }

/* ---------- 페이지 배경 (모눈) ---------- */
.page {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: clip;
  background-color: var(--page);
  background-image:
    linear-gradient(rgba(30, 91, 216, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30, 91, 216, 0.045) 1px, transparent 1px);
  background-size: 36px 36px;
  background-position: center top;
}
.page-fade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(248, 250, 253, 0) 0%, rgba(248, 250, 253, 0.6) 45%, var(--page) 85%);
  pointer-events: none;
}

/* ---------- 헤더 ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line-4);
}
.header-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand { display: flex; align-items: baseline; gap: 8px; min-width: 0; white-space: nowrap; }
.brand-entob { font-weight: 800; font-size: 13px; color: var(--blue-600); letter-spacing: 0.02em; }
.brand-nexus { font-weight: 900; font-size: 19px; color: var(--navy-800); letter-spacing: -0.02em; }
.brand-sub { font-size: 13px; color: var(--muted-3); }

.auth { position: relative; display: flex; align-items: center; gap: 10px; }
.auth-in { display: flex; align-items: center; gap: 10px; }
.auth-name { font-size: 14px; font-weight: 600; white-space: nowrap; }

.btn-navy {
  height: 34px;
  padding: 0 16px;
  border: none;
  background: var(--navy-700);
  color: #fff;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
}
.btn-navy:hover { background: var(--blue-600); }
.btn-outline {
  height: 34px;
  padding: 0 14px;
  border: 1px solid var(--line-1);
  background: #fff;
  border-radius: 8px;
  font-size: 13px;
  color: var(--muted-1);
}
.btn-outline:hover { border-color: var(--blue-600); color: var(--blue-600); }

.login-pop {
  position: absolute;
  top: 46px;
  right: 0;
  width: 280px;
  background: #fff;
  border: 1px solid #dfe7f5;
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(11, 31, 107, 0.16);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.login-title { font-weight: 800; font-size: 16px; margin-bottom: 4px; }
.login-guide {
  background: #f2f6fd;
  border: 1px solid var(--line-6);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted-1);
}
.login-guide b { display: inline-block; min-width: 26px; color: var(--blue-600); font-weight: 800; }
.login-guide span { color: var(--muted-4); font-size: 12px; }
.login-pop input, .gate input {
  height: 42px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  padding: 0 12px;
  font-size: 14px;
}
.login-error { font-size: 12px; color: var(--error); }
.btn-submit {
  height: 44px;
  border: none;
  background: var(--navy-700);
  color: #fff;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  margin-top: 4px;
}
.btn-submit:hover { background: var(--blue-600); }
.btn-submit:disabled { opacity: 0.6; cursor: default; }
.login-note { font-size: 12px; color: var(--muted-4); }

/* ---------- 배너 ---------- */
.banner {
  position: relative;
  overflow: hidden;
  background: radial-gradient(ellipse 50% 90% at 50% 50%, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0) 70%);
  border-bottom: 1px solid var(--line-5);
}
.banner-net {
  position: absolute;
  top: 50%;
  width: 260px;
  height: 130px;
  margin-top: -65px;
  pointer-events: none;
}
.banner-net.left { left: max(12px, calc(50% - 640px)); }
.banner-net.right { right: max(12px, calc(50% - 640px)); transform: scaleX(-1); }
.banner-inner {
  position: relative;
  max-width: 1080px;
  margin: 0 auto;
  padding: 30px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  column-gap: 22px;
  row-gap: 6px;
}
.b-entob, .b-year { font-weight: 900; font-size: clamp(34px, 5vw, 52px); line-height: 1; }
.b-entob { color: var(--blue-700); letter-spacing: -0.02em; }
.b-year { color: var(--navy-900); letter-spacing: -0.03em; }
.b-nexus {
  font-weight: 900;
  font-style: italic;
  font-size: clamp(40px, 6.2vw, 66px);
  letter-spacing: -0.04em;
  line-height: 1;
  background: linear-gradient(90deg, #0a1a6e 0%, #123fb0 55%, var(--blue-400) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-right: 6px;
}
.b-divider { width: 1px; height: 40px; background: #9db8e6; }
.b-title { font-weight: 800; font-size: clamp(18px, 2.2vw, 24px); color: #0d1f66; letter-spacing: -0.02em; }

/* ---------- 본문 ---------- */
.main {
  position: relative;
  max-width: 1080px;
  width: 100%;
  margin: 0 auto;
  padding: 28px 20px 64px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  flex: 1;
}

.intro {
  background: #fff;
  border: 1px solid var(--line-3);
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(11, 31, 107, 0.04);
  padding: 24px 28px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  align-items: start;
}
.intro-text { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.intro-label { font-size: 12px; font-weight: 700; color: var(--blue-600); letter-spacing: 0.08em; }
.intro h1 { margin: 0; font-size: 24px; font-weight: 800; letter-spacing: -0.02em; }
.intro p { margin: 0; font-size: 14px; line-height: 1.7; color: var(--muted-2); text-wrap: pretty; }
.results-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 16px;
  border: 1px solid var(--line-1);
  border-radius: 10px;
  white-space: nowrap;
  background: #fff;
  color: var(--navy-700);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}
.results-link:hover { border-color: var(--blue-600); color: var(--blue-600); }

.steps { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.steps li { display: flex; gap: 12px; align-items: baseline; font-size: 14px; }
.step-no { font-weight: 800; color: var(--blue-600); min-width: 22px; flex: none; }
.steps li > span:last-child { line-height: 1.55; }
.step-note {
  display: block;
  margin-top: 6px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.6;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.steps-period { font-size: 13px !important; color: #6a789c; padding-top: 6px; border-top: 1px solid var(--line-6); }

/* ---------- 피드 ---------- */
.feed { display: flex; flex-direction: column; gap: 14px; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.toolbar-left { display: flex; gap: 6px; }
.toolbar-right { display: flex; gap: 8px; margin-left: auto; }
.pill {
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--line-1);
  background: #fff;
  color: var(--muted-1);
}
.pill[aria-pressed="true"] { border-color: var(--navy-700); background: var(--navy-700); color: #fff; }
.post-count { align-self: center; font-size: 13px; color: var(--muted-4); margin-left: 6px; }
.btn-upload {
  height: 38px;
  padding: 0 18px;
  border: none;
  border-radius: 10px;
  background: var(--blue-600);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}
.btn-upload:hover { background: var(--navy-700); }
.btn-upload:disabled { opacity: 0.55; cursor: default; background: var(--blue-600); }

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 6px;
  row-gap: 14px;
}
.card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0;
  border: none;
  background: none;
  text-align: left;
  min-width: 0;
}
.card-img {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 6px;
  overflow: hidden;
  background: repeating-linear-gradient(135deg, #dde8fb 0 10px, #e8f0fd 10px 20px);
}
.card-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.card-img::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(11, 31, 107, 0.18);
  opacity: 0;
  transition: opacity 0.15s;
}
.card:hover .card-img::after, .card:focus-visible .card-img::after { opacity: 1; }
.card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 2px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted-1);
  min-width: 0;
}
.card-meta svg { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.meta-like, .meta-cmt { display: inline-flex; align-items: center; gap: 4px; }
.meta-like { color: var(--like); }
.meta-like.liked svg { fill: currentColor; }
.meta-cmt { color: var(--muted-4); }
.meta-author {
  margin-left: auto;
  font-weight: 600;
  font-size: 12px;
  color: var(--muted-4);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.empty {
  padding: 60px 20px;
  text-align: center;
  font-size: 14px;
  color: var(--muted-4);
  background: #fff;
  border: 1px dashed var(--line-1);
  border-radius: 16px;
}

.footer { position: relative; border-top: 1px solid #d6e3f7; background: #fff; }
.footer-inner { max-width: 1080px; margin: 0 auto; padding: 20px; font-size: 12px; color: var(--muted-4); }

/* ---------- 팝업 ---------- */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(8, 16, 48, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal {
  width: 100%;
  max-width: 920px;
  max-height: 90vh;
  background: #fff;
  border-radius: 14px;
  overflow: auto;
  display: flex;
  flex-wrap: wrap;
}
.modal-img {
  position: relative;
  flex: 1 1 380px;
  min-height: 320px;
  aspect-ratio: 1 / 1;
  max-height: 90vh;
  background: #0b1230;
}
.modal-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.modal-side { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; max-height: 90vh; }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line-6); }
.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--avatar);
  color: var(--navy-700);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  flex: none;
}
.modal-who { flex: 1; min-width: 0; }
.modal-author { font-weight: 700; font-size: 14px; }
.modal-team { font-size: 12px; color: var(--muted-4); }
.modal-delete {
  height: 28px;
  padding: 0 10px;
  border: 1px solid #f1c4cf;
  border-radius: 6px;
  background: #fff;
  color: var(--like);
  font-size: 12px;
  font-weight: 700;
}
.modal-delete:hover { background: #fdecef; }
.btn-link { display: inline-flex; align-items: center; text-decoration: none; }
.modal-close { border: none; background: none; font-size: 22px; color: var(--muted-4); line-height: 1; padding: 0 2px; }
.modal-body {
  flex: 1;
  min-height: 120px;
  overflow: auto;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.caption { font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.comment { font-size: 14px; line-height: 1.55; overflow-wrap: anywhere; }
.comment span { color: var(--muted-1); }
.no-comment { font-size: 13px; color: var(--muted-5); }
.modal-likes { border-top: 1px solid var(--line-6); padding: 12px 16px; display: flex; flex-direction: column; gap: 4px; }
.like-row { display: flex; align-items: center; gap: 10px; }
.like-btn { border: none; background: none; padding: 0; line-height: 0; color: var(--ink); }
.like-btn svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; transition: transform 0.12s; }
.like-btn:active svg { transform: scale(0.85); }
.like-btn.liked { color: var(--like); }
.like-btn.liked svg { fill: currentColor; }
.like-count { font-weight: 700; font-size: 14px; }
.members { margin-top: 6px; font-size: 13px; color: var(--muted-1); }
.members span { margin-right: 4px; font-size: 12px; font-weight: 700; color: var(--blue-600); }
.comment-form { border-top: 1px solid var(--line-6); display: flex; align-items: center; }
.comment-form input { flex: 1; min-width: 0; height: 50px; border: none; padding: 0 16px; font-size: 14px; }
.comment-form button {
  height: 50px;
  padding: 0 16px;
  border: none;
  background: none;
  color: var(--blue-600);
  font-weight: 700;
  font-size: 14px;
}
.comment-form button:disabled { opacity: 0.5; cursor: default; }

/* ---------- 업로드 팝업 ---------- */
.modal.upload { max-width: 440px; flex-direction: column; flex-wrap: nowrap; padding-bottom: 16px; }
.upload .modal-head { margin-bottom: 14px; }
.upload-title { flex: 1; font-weight: 800; font-size: 16px; }
.upload-preview {
  position: relative;
  margin: 0 16px;
  aspect-ratio: 1 / 1;
  max-height: 50vh;
  border-radius: 10px;
  overflow: hidden;
  background: #0b1230;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #c9d6f2;
  font-size: 13px;
}
.upload-preview img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.upload-label { margin: 14px 16px 6px; font-size: 13px; font-weight: 700; }
.upload input:not([type="checkbox"]) {
  margin: 0 16px;
  height: 42px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  padding: 0 12px;
  font-size: 14px;
}
.upload-actions { margin: 16px 16px 0; display: flex; justify-content: flex-end; gap: 8px; }
.upload-actions .btn-outline { height: 38px; }

/* ---------- 학습결과 자료 페이지 ---------- */
.brand-link { text-decoration: none; }
.btn-back { display: inline-flex; align-items: center; text-decoration: none; white-space: nowrap; }
.results-head { display: flex; flex-direction: column; gap: 8px; }
.results-head h1 { margin: 0; font-size: 24px; font-weight: 800; letter-spacing: -0.02em; }
.results-head p { margin: 0; font-size: 14px; line-height: 1.7; color: var(--muted-2); }

.gate {
  width: 100%;
  max-width: 360px;
  margin: 12px auto 0;
  background: #fff;
  border: 1px solid var(--line-3);
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(11, 31, 107, 0.04);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.gate-title { font-weight: 800; font-size: 17px; margin-bottom: 4px; }

.org-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.org-card {
  display: flex;
  flex-direction: column;
  padding: 0;
  border: 1px solid var(--line-3);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(11, 31, 107, 0.04);
  overflow: hidden;
  text-align: left;
  transition: box-shadow 0.15s, transform 0.15s, border-color 0.15s;
}
.org-card:hover, .org-card:focus-visible {
  border-color: #b9cdf0;
  box-shadow: 0 12px 28px rgba(11, 31, 107, 0.12);
  transform: translateY(-2px);
}
.org-cover {
  position: relative;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: flex-end;
  padding: 16px 18px;
  background:
    radial-gradient(circle at 85% 20%, rgba(255, 255, 255, 0.22) 0 18%, transparent 19%),
    linear-gradient(135deg, var(--navy-700) 0%, var(--blue-600) 60%, var(--blue-400) 100%);
}
.org-cover.has-img { padding: 0; background: var(--avatar); }
.org-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.org-cover-net { position: absolute; left: 50%; top: 50%; width: 78%; transform: translate(-50%, -50%); }
.org-body { padding: 14px 18px 16px; display: flex; flex-direction: column; gap: 6px; }
.org-name { font-size: 16px; font-weight: 800; }
.org-intro {
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.6em;
}
.org-count { margin-top: 4px; font-size: 12px; font-weight: 700; color: var(--blue-600); }
.org-count span { font-weight: 600; color: var(--muted-5); }

.modal.org-modal { max-width: 560px; flex-direction: column; flex-wrap: nowrap; }
.org-modal .modal-head { align-items: flex-start; padding: 18px 20px; }
.org-modal-name { font-size: 18px; font-weight: 800; margin-bottom: 4px; }
.file-list { list-style: none; margin: 0; padding: 8px 12px 14px; overflow: auto; }
.file-item { display: flex; align-items: center; gap: 12px; padding: 12px 8px; border-bottom: 1px solid var(--line-6); }
.file-item:last-child { border-bottom: none; }
.file-icon {
  flex: none;
  width: 40px;
  height: 46px;
  border-radius: 6px;
  background: #fdecef;
  color: #c8203f;
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}
.file-item.pending .file-icon { background: var(--line-6); color: var(--muted-5); }
.file-info { flex: 1; min-width: 0; }
.file-title { font-size: 14px; font-weight: 700; overflow-wrap: anywhere; }
.file-item.pending .file-title { color: var(--muted-4); }
.file-size { font-size: 12px; color: var(--muted-4); margin-top: 2px; }
.file-actions { display: flex; gap: 6px; flex: none; }
.file-btn {
  height: 32px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line-1);
  border-radius: 8px;
  background: #fff;
  color: var(--muted-1);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.file-btn:hover { border-color: var(--blue-600); color: var(--blue-600); }
.file-btn.primary { border-color: var(--blue-600); background: var(--blue-600); color: #fff; }
.file-btn.primary:hover { background: var(--navy-700); border-color: var(--navy-700); color: #fff; }
.file-pending { font-size: 12px; color: var(--muted-5); }
.file-empty { padding: 24px 8px; text-align: center; font-size: 13px; color: var(--muted-4); }

/* ---------- 계정 관리 페이지 ---------- */
.admin-panel { display: flex; flex-direction: column; gap: 14px; }
.admin-search {
  flex: 1;
  max-width: 320px;
  min-width: 0;
  height: 38px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  padding: 0 12px;
  font-size: 14px;
  background: #fff;
}
.admin-table-wrap {
  background: #fff;
  border: 1px solid var(--line-3);
  border-radius: 16px;
  overflow: hidden;
}
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th {
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted-4);
  background: #f6f9fe;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line-6);
}
.admin-table td { padding: 10px 16px; border-bottom: 1px solid var(--line-6); vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table .col-name { font-weight: 700; white-space: nowrap; }
.admin-table .col-team { color: var(--muted-1); }
.admin-table .col-edit { text-align: right; width: 1%; }
.admin-table .muted { color: var(--muted-5); }
.admin-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: #e8effd;
  color: var(--navy-700);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.admin-none { padding: 30px; text-align: center; font-size: 13px; color: var(--muted-4); }
.field-hint { margin: 6px 16px 0; font-size: 12px; color: var(--muted-4); }
.admin-check { margin: 16px 16px 0; display: flex; align-items: center; gap: 8px; font-size: 14px; }
.admin-check input { width: 16px; height: 16px; }
.admin-check:has(input:disabled) { color: var(--muted-4); }
.edit-error { margin: 10px 16px 0; }
.empty a { color: var(--blue-600); font-weight: 700; }

/* ---------- 토스트 ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  z-index: 60;
  background: var(--navy-900);
  color: #fff;
  font-size: 14px;
  padding: 11px 18px;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(11, 31, 107, 0.25);
  max-width: calc(100% - 32px);
}

/* ---------- 모바일 ---------- */
@media (max-width: 640px) {
  .brand-sub { display: none; }
  .intro { padding: 20px; }
  .grid { column-gap: 4px; row-gap: 10px; }
  .card-meta { gap: 8px; font-size: 12px; }
  .card-meta svg { width: 14px; height: 14px; }
  .meta-author { display: none; }
  .overlay { padding: 12px; }
  .modal-img { min-height: 0; }
  .org-grid { grid-template-columns: 1fr; }
  .admin-table th, .admin-table td { padding: 10px 10px; }
  .admin-search { max-width: none; }
  .file-item { flex-wrap: wrap; }
  .file-actions { width: 100%; justify-content: flex-end; }
}

@media (max-width: 420px) {
  /* 관리자는 [관리] 버튼까지 있어서 헤더가 좁다. 이름은 숨기고 버튼만 둔다. */
  .header .auth-name { display: none; }
}
