:root {
  color-scheme: light;
  --bg: #f7f6f2;
  --paper: #fffdf8;
  --ink: #161616;
  --muted: #77736b;
  --line: #d9d4ca;
  --accent: #c44d2d;
  --font: "Pretendard", "SUIT", "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  line-height: 1.55;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}

body.landing-page,
body.community-home,
body.class-page,
body.kr-classroom { overflow-x: hidden; }

a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
img { display: block; width: 100%; height: 100%; object-fit: cover; }

.hidden { display: none !important; }
.text-button { border: 0; padding: 0; background: transparent; color: inherit; }

.boards-loading [data-board-key],
.boards-loading [data-home-board] {
  display: none !important;
}

.community-header,
.landing-header,
.student-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 22px clamp(20px, 4vw, 56px);
  background: rgba(247, 246, 242, 0.88);
  border-bottom: 1px solid rgba(22, 22, 22, 0.08);
  backdrop-filter: blur(14px);
}

.wordmark {
  display: grid;
  gap: 1px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: 0.02em;
}

.community-nav,
.landing-nav,
.student-header nav {
  display: flex;
  align-items: center;
  gap: clamp(18px, 3vw, 34px);
  color: #34312c;
  font-size: 13px;
  font-weight: 650;
}

.community-nav a,
.landing-nav a,
.student-header a,
.student-header button {
  position: relative;
}

.community-nav a::after,
.landing-nav a::after,
.student-header a::after {
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 0;
  height: 1px;
  background: var(--ink);
  content: "";
  transition: width 0.25s ease;
}

.community-nav a:hover::after,
.landing-nav a:hover::after,
.student-header a:hover::after { width: 100%; }

.header-tools {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  font-weight: 750;
}

.search-icon {
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
}

.community-hero {
  width: min(1360px, calc(100vw - 40px));
  min-height: 520px;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(420px, 0.75fr);
  gap: clamp(28px, 5vw, 76px);
  align-items: center;
  margin: 0 auto;
  padding: 46px 0 34px;
  border-bottom: 1px solid var(--line);
}

.hero-note p:first-child,
.panel-head p,
.class-cover .eyebrow,
.class-section .eyebrow {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.08em;
}

.hero-note h1 {
  margin: 0 0 22px;
  font-size: clamp(48px, 7vw, 88px);
  font-weight: 310;
  line-height: 0.94;
}

.hero-desc {
  max-width: 520px;
  margin: 0;
  color: #403b34;
  font-size: 18px;
}

.hero-images {
  display: grid;
  grid-template-columns: 1fr 0.72fr;
  gap: 14px;
  align-items: end;
}

.hero-images img {
  height: 430px;
  background: #e7e1d8;
}

.hero-images img + img {
  height: 300px;
}

.home-grid {
  width: min(1360px, calc(100vw - 40px));
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 18px 24px;
  margin: 0 auto;
  padding: 26px 0 74px;
}

.panel {
  min-width: 0;
  padding: 20px 0 18px;
  border-top: 1px solid var(--line);
}

.class-panel,
.gallery-panel {
  grid-row: span 2;
}

.panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.panel-head h2 {
  margin: 0;
  font-size: clamp(20px, 2.2vw, 30px);
  font-weight: 420;
}

.panel-head a {
  flex: none;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.class-panel h2 {
  margin: 0 0 28px;
  font-size: clamp(34px, 4.4vw, 60px);
  font-weight: 310;
  line-height: 1.05;
}

.class-mini {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin: 0;
  border-top: 1px solid var(--line);
}

.class-mini div {
  display: grid;
  gap: 8px;
  padding: 16px 12px 0 0;
  border-right: 1px solid var(--line);
}

.class-mini div:last-child { border-right: 0; }
.class-mini dt { color: var(--accent); font-size: 12px; font-weight: 800; }
.class-mini dd { margin: 0; color: #2e2a25; font-size: 17px; }

.home-list,
.week-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.home-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.home-list a {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 520;
}

.home-list span,
.week-list span,
.week-list em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 750;
}

.week-list li {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr) auto;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.week-list strong {
  font-size: 17px;
  font-weight: 520;
}

.mini-gallery {
  display: grid;
  grid-template-columns: 1fr 0.8fr;
  grid-auto-rows: 180px;
  gap: 12px;
}

.mini-gallery a:first-child { grid-row: span 2; }
.mini-gallery img { background: #e7e1d8; }

.community-footer {
  width: min(1360px, calc(100vw - 40px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 0 auto;
  padding: 30px 0 38px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.community-footer nav {
  display: flex;
  gap: 18px;
}

.class-shell {
  width: min(1280px, calc(100vw - 40px));
  margin: 0 auto;
  padding: 42px 0 72px;
}

.class-cover {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 0.62fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  min-height: 520px;
  border-bottom: 1px solid var(--line);
}

.class-cover h1 {
  margin: 0 0 24px;
  font-size: clamp(42px, 6vw, 76px);
  font-weight: 320;
  line-height: 1.06;
}

.class-cover p:last-child {
  max-width: 620px;
  color: #403b34;
  font-size: 17px;
}

.class-cover img {
  height: 420px;
}

.class-info-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--line);
}

.class-info-grid article {
  min-height: 140px;
  padding: 22px 18px 18px 0;
  border-right: 1px solid var(--line);
}

.class-info-grid article:last-child { border-right: 0; }
.class-info-grid h2 { margin: 0 0 18px; color: var(--accent); font-size: 12px; }
.class-info-grid p { margin: 0; font-size: 18px; }

.class-section {
  padding: 70px 0;
  border-bottom: 1px solid var(--line);
}

.class-curriculum {
  margin: 0;
  padding: 0;
  list-style: none;
}

.class-curriculum li {
  display: grid;
  grid-template-columns: 80px minmax(0, 0.8fr) minmax(240px, 1fr);
  gap: 22px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

.class-curriculum span { color: var(--muted); font-size: 24px; font-weight: 300; }
.class-curriculum strong { font-size: 22px; font-weight: 420; }
.class-curriculum p { margin: 0; color: var(--muted); }

.split-section {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 50px;
}

.split-section h2,
.class-apply h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 52px);
  font-weight: 320;
}

.plain-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.plain-list li {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  font-size: 19px;
}

.class-apply {
  display: grid;
  gap: 18px;
  padding: 56px 0 0;
}

.class-apply p { max-width: 620px; margin: 0; color: var(--muted); }
.class-apply a { width: fit-content; border-bottom: 1px solid var(--ink); font-weight: 800; }

.kr-classroom {
  background: #f7f6f3;
  color: #151922;
}

.kr-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 28px;
  min-height: 86px;
  padding: 0 max(28px, calc((100vw - 1440px) / 2));
  background: #fff;
  border-bottom: 1px solid #e2e5ea;
}

.kr-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 210px;
}

.kr-brand strong {
  font-size: 20px;
  font-weight: 850;
}

.kr-tabs {
  display: flex;
  align-items: stretch;
  gap: 4px;
  height: 86px;
}

.kr-tabs a,
.kr-tabs button {
  display: grid;
  place-items: center;
  min-width: 86px;
  padding: 0 12px;
  border-bottom: 3px solid transparent;
  border-left: 0;
  border-right: 0;
  border-top: 0;
  background: transparent;
  color: #4d5562;
  font-size: 16px;
  font-weight: 750;
}

.kr-tabs a.active,
.kr-tabs a:hover,
.kr-tabs button.active,
.kr-tabs button:hover {
  border-bottom-color: #1f232b;
  color: #12151b;
}

.kr-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  min-width: 260px;
  color: #4f5662;
  font-size: 14px;
  font-weight: 750;
}

.kr-tools button[aria-label] {
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  color: #505864;
  font-size: 22px;
}

.kr-tools a,
.kr-tools span,
#headerLogout,
#adminLogout {
  flex: none;
  white-space: nowrap;
}

#headerLogout,
#adminLogout {
  min-height: 34px;
  border: 1px solid #d9dde5;
  border-radius: 5px;
  padding: 0 10px;
  background: #fff;
  color: #343b47;
  font-size: 13px;
  font-weight: 850;
}

#headerLogout:hover,
#adminLogout:hover {
  border-color: #2557d6;
  color: #2557d6;
}

.kr-shell {
  width: min(1240px, calc(100vw - 40px));
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 28px;
  margin: 0 auto;
  padding: 36px 0 72px;
}

.class-sidebar {
  display: grid;
  align-content: start;
  gap: 22px;
}

.class-profile,
.board-menu,
.kr-main {
  border: 1px solid #e0e3e8;
  background: #fff;
}

.class-profile {
  padding: 20px 18px;
}

.my-summary {
  display: grid;
  gap: 8px;
  margin: 0 0 18px;
  padding: 0 0 16px;
  border-bottom: 1px solid #edf0f3;
}

.my-summary div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.my-summary dt {
  color: #7a828d;
}

.my-summary dd {
  margin: 0;
  font-weight: 750;
}

.my-summary button {
  border: 0;
  padding: 0;
  background: transparent;
  color: #2557d6;
  font-weight: 850;
}

.primary-write {
  min-height: 48px;
  display: grid;
  place-items: center;
  margin: 0;
  border-radius: 8px;
  background: #2f62e9;
  color: #fff;
  font-size: 16px;
  font-weight: 850;
}

.board-menu {
  display: grid;
  padding: 14px 0;
}

#customBoardMenu {
  display: grid;
}

.board-menu strong {
  padding: 0 18px 12px;
  font-size: 17px;
}

.board-menu a,
.board-menu button {
  border: 0;
  background: transparent;
  text-align: left;
  padding: 12px 18px;
  color: #343b47;
  font-size: 15px;
  font-weight: 700;
}

.board-menu a.active,
.board-menu a:hover,
.board-menu button.active,
.board-menu button:hover {
  background: #f0f4ff;
  color: #2557d6;
}

.admin-tools {
  border: 1px solid #e0e3e8;
  background: #fff;
}

.admin-tools-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid #edf0f3;
}

.admin-tools-head strong {
  font-size: 16px;
  font-weight: 850;
}

.admin-tools-head button {
  border: 0;
  background: transparent;
  color: #2557d6;
  font-size: 12px;
  font-weight: 850;
}

.admin-users-mini {
  display: grid;
}

.admin-mini-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid #edf0f3;
}

.admin-mini-row:last-child {
  border-bottom: 0;
}

.admin-mini-row strong {
  display: block;
  font-size: 14px;
  font-weight: 850;
}

.admin-mini-row strong span,
.admin-mini-row small {
  color: #737c89;
  font-size: 12px;
  font-weight: 750;
}

.admin-mini-row input {
  min-height: 36px;
  background: #fff;
}

.admin-mini-row button,
.admin-state {
  min-height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid #d9dde5;
  border-radius: 5px;
  background: #fff;
  color: #343b47;
  font-size: 13px;
  font-weight: 850;
}

.admin-mini-row button:hover {
  border-color: #2557d6;
  color: #2557d6;
}

.admin-state {
  color: #737c89;
}

.admin-shell {
  width: min(1180px, calc(100vw - 40px));
  display: grid;
  gap: 24px;
  margin: 0 auto;
  padding: 34px 0 72px;
}

.admin-page-panel {
  border: 1px solid #e0e3e8;
  background: #fff;
  padding: 24px;
}

.admin-page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 18px;
  border-bottom: 1px solid #d8dde5;
}

.admin-page-head p {
  margin: 0 0 4px;
  color: #607087;
  font-size: 12px;
  font-weight: 850;
}

.admin-page-head h1 {
  margin: 0;
  font-size: 25px;
  font-weight: 850;
}

.admin-page-head button,
.admin-board-form button,
.admin-table-row button {
  min-height: 38px;
  border: 1px solid #d9dde5;
  border-radius: 5px;
  padding: 0 12px;
  background: #fff;
  color: #343b47;
  font-size: 13px;
  font-weight: 850;
}

.admin-page-head button:hover,
.admin-board-form button:hover,
.admin-table-row button:hover {
  border-color: #2557d6;
  color: #2557d6;
}

.admin-board-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(160px, 220px) auto auto;
  gap: 10px;
  align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid #edf0f3;
}

.admin-board-form label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #4f5662;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.admin-board-form input[type="checkbox"] {
  width: auto;
  min-height: auto;
}

.admin-table {
  display: grid;
}

.admin-table-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 160px auto auto;
  gap: 10px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid #edf0f3;
}

.admin-table-row:last-child {
  border-bottom: 0;
}

.admin-table-row.muted {
  background: #fafbfc;
  opacity: 0.72;
}

.admin-table-row strong {
  display: block;
  font-size: 15px;
  font-weight: 850;
}

.admin-table-row strong span,
.admin-table-row small {
  color: #737c89;
  font-size: 12px;
  font-weight: 750;
}

.admin-table-row input {
  min-height: 38px;
  background: #fff;
}

.admin-table-row .danger {
  color: #d13c31;
}

.admin-table-row .danger:hover {
  border-color: #d13c31;
  background: #fff5f4;
  color: #d13c31;
}

.view-panel {
  display: none;
}

.view-panel.active {
  display: block;
}

.clean-empty,
.gallery-empty {
  min-height: 260px;
  display: grid;
  place-items: center;
  border-bottom: 1px solid #edf0f3;
  color: #8b94a1;
  font-size: 15px;
}

.home-board-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  padding-top: 22px;
}

.home-board-panel {
  min-width: 0;
  border: 1px solid #e0e3e8;
  background: #fff;
}

.home-board-notice {
  grid-column: 1 / -1;
}

.home-board-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  padding: 0 16px;
  border-bottom: 1px solid #edf0f3;
  background: #fbfcfd;
}

.home-board-head h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 850;
}

.home-board-head button {
  border: 0;
  padding: 0;
  background: transparent;
  color: #737c89;
  font-size: 13px;
  font-weight: 800;
}

.home-board-head button:hover {
  color: #2557d6;
}

.home-board-row {
  cursor: pointer;
  display: grid;
  gap: 5px;
  padding: 13px 16px;
  border-bottom: 1px solid #edf0f3;
}

.home-board-row:last-child {
  border-bottom: 0;
}

.home-board-row:hover strong {
  color: #2557d6;
}

.home-board-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
  font-weight: 800;
}

.home-board-row span {
  color: #737c89;
  font-size: 12px;
  font-weight: 750;
}

.compact-empty {
  min-height: 120px;
  display: grid;
  place-items: center;
  color: #8b94a1;
  font-size: 14px;
}

.compact-empty.wide {
  grid-column: 1 / -1;
}

.feed-row {
  position: relative;
  cursor: pointer;
  padding: 18px 0;
  border-bottom: 1px solid #edf0f3;
}

.feed-row:hover strong {
  color: #2557d6;
}

.feed-row strong {
  display: block;
  margin-bottom: 7px;
  font-size: 18px;
  font-weight: 850;
}

.feed-row p {
  margin: 0 0 9px;
  color: #3c4552;
}

.feed-row .post-preview {
  display: -webkit-box;
  overflow: hidden;
  line-height: 1.6;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
}

.feed-row small {
  color: #737c89;
  font-size: 13px;
  font-weight: 750;
}

.post-thumb {
  width: min(220px, 100%);
  max-height: 180px;
  margin-top: 12px;
  border: 1px solid #edf0f3;
  object-fit: cover;
}

.post-actions {
  float: right;
  display: flex;
  gap: 6px;
  margin-left: 12px;
}

.post-action {
  min-height: 30px;
  border: 1px solid #d9dde5;
  border-radius: 5px;
  padding: 0 10px;
  background: #fff;
  color: #343b47;
  font-size: 13px;
  font-weight: 850;
}

.post-action:hover {
  border-color: #2557d6;
  color: #2557d6;
}

.post-action.danger {
  color: #d13c31;
}

.post-action.danger:hover {
  border-color: #d13c31;
  background: #fff5f4;
  color: #d13c31;
}

.detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 18px;
  border-bottom: 1px solid #d8dde5;
}

.detail-head button {
  border: 0;
  background: transparent;
  color: #2557d6;
  font-weight: 850;
}

.detail-head span {
  color: #737c89;
  font-size: 13px;
  font-weight: 750;
}

.post-detail {
  position: relative;
  padding: 26px 0;
  border-bottom: 1px solid #edf0f3;
}

.post-detail h2 {
  margin: 0 0 8px;
  font-size: 26px;
  font-weight: 850;
}

.post-detail small {
  color: #737c89;
  font-size: 13px;
  font-weight: 750;
}

.post-detail p {
  margin: 22px 0;
  color: #303946;
}

.post-detail .post-thumb {
  width: min(680px, 100%);
  max-height: 480px;
}

.comment-box {
  padding-top: 22px;
}

.comment-box h3 {
  margin: 0 0 12px;
  font-size: 18px;
}

.comment-row {
  padding: 12px 0;
  border-bottom: 1px solid #edf0f3;
}

.comment-row p {
  margin: 0 0 6px;
}

.comment-row small {
  color: #737c89;
  font-size: 12px;
}

#detailCommentForm {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 78px;
  gap: 8px;
  margin-top: 14px;
}

#detailCommentForm button {
  border: 0;
  border-radius: 6px;
  background: #2f62e9;
  color: #fff;
  font-weight: 850;
}

.clean-empty.small {
  min-height: 80px;
}

.gallery-empty {
  border: 1px dashed #d9dde5;
  margin-top: 22px;
  background: #fafbfc;
}

.clean-list {
  margin-top: 20px;
}

.class-feed {
  padding-top: 8px;
}

.class-note {
  position: relative;
  cursor: pointer;
  padding: 22px 0;
  border-bottom: 1px solid #edf0f3;
}

.class-note h3 {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 850;
}

.class-note small {
  color: #737c89;
  font-size: 13px;
  font-weight: 750;
}

.rendered-body {
  margin-top: 18px;
  color: #303946;
}

.rendered-body h3,
.rendered-body h4 {
  margin: 20px 0 8px;
  color: #151922;
  font-weight: 850;
}

.rendered-body h3 { font-size: 22px; }
.rendered-body h4 { font-size: 18px; }

.rendered-body p {
  margin: 8px 0;
  line-height: 1.72;
}

.rendered-body a {
  color: #1f55d6;
  font-weight: 750;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.rendered-body .body-bullet::before,
.rendered-body .body-check::before {
  display: inline-block;
  width: 18px;
  color: #2557d6;
}

.rendered-body .body-bullet::before { content: "-"; }
.rendered-body .body-check::before { content: "☐"; }

.rendered-body .body-callout,
.rendered-body .body-text-box {
  margin: 14px 0;
  border: 1px solid #dde2e8;
  border-radius: 8px;
  padding: 20px 24px;
  background: #fff;
  color: #151922;
  font-weight: 650;
  line-height: 1.72;
}

.rendered-body blockquote {
  margin: 14px 0;
  padding: 8px 0 8px 14px;
  border-left: 3px solid #cfd6e3;
  color: #555f6c;
}

.body-link-button-wrap {
  margin: 18px 0 !important;
}

.body-link-button {
  width: fit-content;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #151922;
  border-radius: 7px;
  padding: 0 18px;
  background: #151922;
  color: #fff !important;
  font-size: 14px;
  font-weight: 850;
  line-height: 1;
  text-decoration: none !important;
}

.body-link-button:hover {
  border-color: #2f62e9;
  background: #2f62e9;
}

.rendered-body hr {
  height: 1px;
  margin: 18px 0;
  border: 0;
  background: #d8dde5;
}

.kr-main {
  min-width: 0;
  padding: 28px 28px 34px;
}

.feed-head,
.quick-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.feed-head {
  padding-bottom: 22px;
  border-bottom: 1px solid #d8dde5;
}

.feed-head p {
  margin: 0 0 4px;
  color: #607087;
  font-size: 12px;
  font-weight: 850;
}

.feed-head h2 {
  margin: 0;
  font-size: 26px;
  font-weight: 850;
}

.feed-head > a,
.feed-head > button {
  min-height: 44px;
  display: grid;
  place-items: center;
  padding: 0 20px;
  border: 0;
  border-radius: 8px;
  background: #2f62e9;
  color: #fff;
  font-weight: 850;
}

.feed-item {
  padding: 26px 0;
  border-bottom: 1px solid #edf0f3;
}

.feed-item.pinned {
  background: linear-gradient(#f8faff, #fff);
  margin: 0 -28px;
  padding: 26px 28px;
}

.feed-author {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.feed-author img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
}

.feed-author strong,
.feed-author span {
  display: block;
}

.feed-author span {
  color: #7c8490;
  font-size: 13px;
}

.feed-author em {
  margin-left: auto;
  border-radius: 6px;
  padding: 6px 10px;
  background: #e95555;
  color: #fff;
  font-style: normal;
  font-size: 13px;
  font-weight: 850;
}

.feed-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 140px;
  gap: 24px;
  align-items: start;
}

.feed-body h3 {
  margin: 0 0 10px;
  font-size: 21px;
  font-weight: 850;
}

.feed-body p {
  margin: 0 0 14px;
  color: #3c4552;
  font-size: 15px;
}

.feed-body small {
  color: #737c89;
  font-size: 14px;
  font-weight: 750;
}

.feed-body img {
  height: 96px;
  border-radius: 8px;
}

.quick-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  padding-top: 28px;
}

.quick-panel {
  min-width: 0;
  border-top: 1px solid #d8dde5;
  padding-top: 18px;
}

.quick-head {
  margin-bottom: 12px;
}

.quick-head h3 {
  margin: 0;
  font-size: 19px;
  font-weight: 850;
}

.quick-head a {
  color: #727b89;
  font-size: 13px;
  font-weight: 750;
}

.assignment-list,
.compact-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.assignment-list li,
.compact-list li {
  display: grid;
  gap: 4px;
  padding: 12px 0;
  border-bottom: 1px solid #edf0f3;
}

.assignment-list span,
.assignment-list em,
.compact-list span {
  color: #7c8490;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.assignment-list strong,
.compact-list a {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
  font-weight: 750;
}

.compact-list li {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
}

.gallery-summary > div:last-child {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.gallery-summary img {
  aspect-ratio: 1;
  border-radius: 6px;
}

.kr-footer {
  width: min(1240px, calc(100vw - 40px));
  margin: 0 auto;
  padding: 28px 0 44px;
  color: #7c8490;
  font-size: 13px;
}

.write-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: block;
  padding: 0;
  background: #fff;
  overflow-y: auto;
}

.document-editor {
  min-height: 100vh;
  background: #fff;
}

#modalWriteForm {
  min-height: 100vh;
}

.editor-topbar {
  position: sticky;
  top: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 58px;
  padding: 0 28px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
}

.editor-back,
.publish-button {
  border: 0;
  background: transparent;
}

.editor-back {
  color: #5f6671;
  font-size: 14px;
  font-weight: 750;
}

.editor-status {
  margin-left: auto;
  color: #9aa3af;
  font-size: 13px;
  font-weight: 700;
}

.publish-button {
  min-height: 32px;
  border-radius: 5px;
  padding: 0 12px;
  background: #2557d6;
  color: #fff;
  font-size: 13px;
  font-weight: 850;
}

.editor-canvas {
  width: min(760px, calc(100vw - 48px));
  margin: 0 auto;
  padding: 74px 0 120px;
}

.editor-kicker {
  margin: 0 0 18px;
  color: #8b94a1;
  font-size: 13px;
  font-weight: 750;
}

.document-title {
  width: 100%;
  min-height: auto;
  border: 0;
  padding: 0;
  background: transparent;
  color: #151922;
  font-size: 40px;
  font-weight: 850;
  line-height: 1.18;
}

.document-title::placeholder {
  color: #c2c8d0;
}

.blocknote-editor-host {
  margin-top: 30px;
  min-height: 420px;
}

.editor-loading {
  min-height: 360px;
  display: grid;
  place-items: center;
  color: #8b94a1;
  font-size: 14px;
  font-weight: 750;
}

.editor-loading.error {
  color: #d13c31;
}

.attachment-summary {
  width: fit-content;
  margin: 18px 0 0 44px;
  border-radius: 5px;
  padding: 8px 10px;
  background: #f4f6f8;
  color: #5f6671;
  font-size: 13px;
  font-weight: 750;
}

.menu-toggle {
  display: none;
  border: 1px solid var(--ink);
  padding: 8px 12px;
  background: transparent;
  color: var(--ink);
}

.hero-section {
  min-height: calc(92vh - 74px);
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(380px, 0.72fr);
  gap: clamp(24px, 5vw, 80px);
  align-items: center;
  padding: clamp(40px, 6vw, 82px) clamp(20px, 5vw, 72px) clamp(28px, 5vw, 64px);
}

.hero-copy h1 {
  margin: 18px 0 28px;
  font-size: clamp(58px, 8vw, 116px);
  font-weight: 300;
  line-height: 0.9;
  letter-spacing: 0;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.hero-lead {
  margin: 0 0 34px;
  color: #2e2a25;
  font-size: clamp(22px, 3vw, 38px);
  font-weight: 400;
  line-height: 1.28;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-actions a,
.final-cta a,
.auth-panel button,
.auth-panel form button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--ink);
  padding: 0 20px;
  background: var(--ink);
  color: var(--bg);
  font-weight: 750;
}

.hero-actions a + a {
  background: transparent;
  color: var(--ink);
}

.hero-photo {
  height: min(760px, 78vh);
  margin: 0;
  overflow: hidden;
}

.section-pad {
  width: min(1360px, calc(100vw - 40px));
  margin: 0 auto;
  padding: clamp(70px, 10vw, 140px) 0;
}

.intro-section {
  display: grid;
  grid-template-columns: 260px minmax(0, 760px);
  gap: clamp(32px, 8vw, 140px);
  border-top: 1px solid var(--line);
}

.section-kicker {
  display: grid;
  align-content: start;
  gap: 6px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
}

.intro-copy h2,
.section-title h2 {
  margin: 0;
  font-size: clamp(34px, 5vw, 68px);
  font-weight: 330;
  line-height: 1.12;
}

.intro-copy p {
  max-width: 650px;
  margin: 28px 0 0;
  color: #39352f;
  font-size: 17px;
}

.overview-section {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.overview-item {
  min-height: 190px;
  display: grid;
  align-content: space-between;
  padding: 0 26px 24px 0;
  border-right: 1px solid var(--line);
}

.overview-item:last-child { border-right: 0; }

.overview-item strong {
  font-size: clamp(34px, 4.8vw, 64px);
  font-weight: 300;
  line-height: 1;
}

.overview-item span {
  color: var(--muted);
  font-size: 15px;
}

.section-title {
  display: grid;
  gap: 16px;
  margin-bottom: clamp(36px, 6vw, 70px);
}

.section-title p {
  margin: 0;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.curriculum-list,
.target-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.curriculum-list li {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 30px;
  align-items: center;
  min-height: 96px;
  border-bottom: 1px solid var(--line);
}

.curriculum-list span {
  color: var(--muted);
  font-size: 38px;
  font-weight: 250;
}

.curriculum-list strong {
  font-size: clamp(22px, 3vw, 38px);
  font-weight: 360;
}

.works-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.75fr 0.9fr;
  grid-auto-rows: 260px;
  gap: 18px;
}

.works-grid figure {
  margin: 0;
  overflow: hidden;
  background: #e7e1d8;
}

.works-grid figure:hover img {
  transform: scale(1.025);
}

.works-grid img { transition: transform 0.55s ease; }
.work-tall { grid-row: span 2; }
.work-wide { grid-column: span 2; }

.target-list {
  counter-reset: target;
  max-width: 980px;
}

.target-list li {
  counter-increment: target;
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 22px;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
  font-size: clamp(19px, 2.4vw, 30px);
  font-weight: 360;
}

.target-list li::before {
  color: var(--muted);
  content: "0" counter(target);
}

.details-section dl {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  margin: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.details-section div {
  display: grid;
  gap: 16px;
  min-height: 140px;
  padding: 24px 18px 20px 0;
  border-right: 1px solid var(--line);
}

.details-section div:last-child { border-right: 0; }
.details-section dt { color: var(--accent); font-size: 12px; font-weight: 800; }
.details-section dd { margin: 0; font-size: clamp(20px, 2.4vw, 32px); font-weight: 340; }

.faq-list {
  max-width: 900px;
  border-top: 1px solid var(--line);
}

.faq-list details {
  border-bottom: 1px solid var(--line);
  padding: 24px 0;
}

.faq-list summary {
  cursor: pointer;
  font-size: clamp(18px, 2vw, 25px);
  font-weight: 420;
}

.faq-list p {
  max-width: 620px;
  margin: 16px 0 0;
  color: var(--muted);
}

.final-cta {
  min-height: 72vh;
  display: grid;
  place-items: center;
  padding: 80px 20px;
  background: #171512;
  color: var(--bg);
  text-align: center;
}

.final-cta p {
  margin: 0 0 18px;
  color: #d8c4b5;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.final-cta h2 {
  margin: 0 0 34px;
  font-size: clamp(42px, 7vw, 94px);
  font-weight: 280;
  line-height: 0.98;
}

.final-cta a {
  border-color: var(--bg);
  background: var(--bg);
  color: var(--ink);
}

.landing-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 34px clamp(20px, 4vw, 56px);
  color: var(--muted);
  font-size: 13px;
}

.landing-footer nav {
  display: flex;
  gap: 18px;
}

.student-page {
  min-height: 100vh;
  background: var(--bg);
}

.student-layout {
  width: min(1280px, calc(100vw - 40px));
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 28px;
  margin: 0 auto;
  padding: 34px 0 70px;
}

.student-main,
.student-sidebar {
  min-width: 0;
}

.dashboard-board,
.wide-board,
.account-card,
.side-card,
.auth-panel {
  border: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.68);
  padding: 22px;
}

.dashboard-board h1 {
  margin: 0 0 24px;
  font-size: clamp(44px, 6vw, 82px);
  font-weight: 300;
  line-height: 1;
}

.student-board-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid var(--line);
}

.student-board-links a {
  display: grid;
  gap: 8px;
  min-height: 120px;
  padding: 18px 12px 18px 0;
  border-bottom: 1px solid var(--line);
}

.student-board-links strong { font-size: 24px; font-weight: 380; }
.student-board-links span { color: var(--muted); }

.card-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.card-head h2 {
  margin: 0;
  font-size: 26px;
  font-weight: 380;
}

.card-head a { color: var(--muted); font-size: 13px; font-weight: 750; }

.board-form,
.upload-form,
.notice-form,
.comment-form,
.auth-panel form {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 0;
  background: #fffaf1;
  color: var(--ink);
  outline: 0;
}

input {
  min-height: 44px;
  padding: 0 12px;
}

textarea {
  min-height: 110px;
  padding: 12px;
  resize: vertical;
}

.board-form button,
.upload-form button,
.notice-form button,
.comment-form button,
#logoutButton,
.auth-panel form button {
  min-height: 42px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--bg);
  font-weight: 750;
}

.board-list,
.library-list,
.notice-list,
.my-activity {
  display: grid;
  gap: 10px;
}

.board-post,
.library-item,
.notice-item,
.comment-item,
.my-item,
.admin-user {
  display: grid;
  gap: 6px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.board-post:first-child,
.library-item:first-child,
.notice-item:first-child,
.comment-item:first-child,
.my-item:first-child,
.admin-user:first-child { border-top: 0; }

.board-post strong,
.library-item strong,
.notice-item strong,
.my-item strong {
  font-size: 18px;
  font-weight: 520;
}

.board-post p,
.library-item p,
.notice-item p,
.comment-item p,
.my-item p,
.empty {
  margin: 0;
  color: var(--muted);
}

.board-post small,
.library-item small,
.library-item a,
.notice-item small,
.comment-item small,
.my-item small {
  color: var(--accent);
  font-size: 12px;
  font-weight: 750;
}

.comment-list {
  display: grid;
  gap: 6px;
  margin-top: 8px;
  padding-left: 14px;
  border-left: 1px solid var(--line);
}

.comment-form {
  grid-template-columns: minmax(0, 1fr) 64px;
  margin-top: 8px;
}

.comment-form input,
.comment-form button { min-height: 36px; }

.profile-box {
  display: grid;
  gap: 3px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.profile-box strong { font-size: 18px; }
.profile-box span,
.my-activity h3,
.admin-user small { color: var(--muted); font-size: 12px; font-weight: 750; }

.my-activity { margin: 18px 0; }
.my-activity h3 { margin: 10px 0 0; }

.admin-users { display: grid; }
.admin-user { grid-template-columns: minmax(0, 1fr) 86px; align-items: center; }
.admin-user input { min-height: 34px; }

.login-shell {
  min-height: calc(100vh - 86px);
  display: grid;
  place-items: center;
  padding: 32px 20px;
}

.auth-panel {
  width: min(460px, 100%);
}

.auth-panel h1 {
  margin: 0 0 24px;
  font-size: 42px;
  font-weight: 320;
}

.auth-panel > .text-button {
  margin-top: 8px;
  color: var(--accent);
  font-weight: 750;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 30;
  max-width: min(420px, calc(100vw - 28px));
  padding: 11px 14px;
  background: var(--ink);
  color: var(--bg);
  opacity: 0;
  transform: translate(-50%, 10px);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.fade-up {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 900px) {
  .kr-header {
    grid-template-columns: auto auto;
    min-height: auto;
    padding: 16px 20px 0;
  }
  .kr-brand {
    min-width: 0;
  }
  .kr-brand strong {
    font-size: 18px;
  }
  .kr-tabs {
    grid-column: 1 / -1;
    order: 3;
    width: calc(100vw - 40px);
    height: auto;
    overflow-x: auto;
    padding-top: 12px;
  }
  .kr-tabs a {
    min-width: max-content;
    height: 46px;
  }
  .kr-tools {
    min-width: 0;
  }
  .kr-shell {
    grid-template-columns: 1fr;
    width: calc(100vw - 32px);
    gap: 18px;
    padding-top: 20px;
  }
  .class-sidebar {
    gap: 14px;
  }
  .board-menu {
    display: flex;
    overflow-x: auto;
    padding: 0;
  }
  #customBoardMenu {
    display: flex;
  }
  .board-menu strong {
    display: none;
  }
  .board-menu a {
    flex: none;
    padding: 13px 16px;
  }
  .quick-grid {
    grid-template-columns: 1fr;
  }
  .home-board-grid {
    grid-template-columns: 1fr;
  }
  .home-board-notice {
    grid-column: auto;
  }
  .admin-board-form,
  .admin-table-row {
    grid-template-columns: 1fr;
  }
  .admin-shell {
    width: calc(100vw - 32px);
    padding-top: 20px;
  }
  .community-header,
  .landing-header { align-items: flex-start; }
  .menu-toggle { display: inline-flex; }
  .community-nav,
  .landing-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 8px 20px 20px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
  }
  .community-nav.open,
  .landing-nav.open { display: flex; }
  .community-nav a,
  .landing-nav a { padding: 10px 0; }
  .header-tools {
    margin-left: auto;
  }
  .community-hero,
  .class-cover,
  .split-section {
    grid-template-columns: 1fr;
  }
  .community-hero {
    min-height: auto;
    padding-top: 34px;
  }
  .hero-images img {
    height: 360px;
  }
  .hero-images img + img {
    height: 240px;
  }
  .home-grid {
    grid-template-columns: 1fr;
  }
  .class-panel,
  .gallery-panel {
    grid-row: auto;
  }
  .class-info-grid {
    grid-template-columns: 1fr 1fr;
  }
  .class-info-grid article:nth-child(2n) {
    border-right: 0;
  }
  .class-curriculum li {
    grid-template-columns: 62px minmax(0, 1fr);
  }
  .class-curriculum p {
    grid-column: 2;
  }
  .hero-section {
    min-height: auto;
    grid-template-columns: 1fr;
    padding-top: 34px;
  }
  .hero-copy h1 { font-size: clamp(46px, 13vw, 64px); }
  .hero-photo { height: min(64vh, 560px); }
  .intro-section,
  .student-layout {
    grid-template-columns: 1fr;
  }
  .overview-section,
  .details-section dl {
    grid-template-columns: 1fr 1fr;
  }
  .overview-item:nth-child(2n),
  .details-section div:nth-child(2n) { border-right: 0; }
  .works-grid {
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: 220px;
  }
  .work-tall { grid-row: span 1; }
  .work-wide { grid-column: span 2; }
  .student-header {
    align-items: flex-start;
    flex-direction: column;
  }
  .student-header nav { flex-wrap: wrap; gap: 12px 18px; }
}

@media (max-width: 620px) {
  .editor-topbar {
    padding: 0 20px;
  }
  .editor-canvas {
    width: 100%;
    padding: 54px 20px 90px;
  }
  .document-title {
    font-size: 34px;
  }
  .blocknote-editor-host {
    min-height: 360px;
  }
  .attachment-summary {
    margin-left: 0;
  }
  .kr-tools button[aria-label="알림"] {
    display: none;
  }
  .kr-main {
    padding: 20px 18px 26px;
  }
  .feed-item.pinned {
    margin: 0 -18px;
    padding: 22px 18px;
  }
  .feed-body {
    grid-template-columns: 1fr;
  }
  .feed-body img {
    width: 100%;
    height: 180px;
  }
  .gallery-summary > div:last-child {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .community-header,
  .landing-header,
  .student-header { padding: 18px 20px; }
  .community-hero,
  .home-grid,
  .community-footer,
  .class-shell {
    width: calc(100vw - 32px);
  }
  .hero-note h1 {
    font-size: clamp(42px, 14vw, 58px);
  }
  .hero-images {
    grid-template-columns: 1fr;
  }
  .hero-images img,
  .hero-images img + img {
    height: 310px;
  }
  .class-mini,
  .class-info-grid {
    grid-template-columns: 1fr;
  }
  .class-mini div,
  .class-info-grid article {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .week-list li {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .mini-gallery {
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: 150px;
  }
  .mini-gallery a:first-child {
    grid-row: span 1;
    grid-column: span 2;
  }
  .community-footer {
    align-items: flex-start;
    flex-direction: column;
  }
  .class-cover {
    min-height: auto;
  }
  .class-cover img {
    height: 320px;
  }
  .class-curriculum li {
    grid-template-columns: 1fr;
  }
  .class-curriculum p {
    grid-column: auto;
  }
  .section-pad { width: calc(100vw - 40px); padding: 70px 0; }
  .overview-section,
  .details-section dl,
  .student-board-links,
  .works-grid {
    grid-template-columns: 1fr;
  }
  .overview-item,
  .details-section div {
    min-height: 128px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .curriculum-list li,
  .target-list li {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 22px 0;
  }
  .works-grid { grid-auto-rows: 320px; }
  .work-wide { grid-column: span 1; }
  .landing-footer {
    align-items: flex-start;
    flex-direction: column;
  }
  .student-layout { width: calc(100vw - 32px); }
}
