@font-face {
  font-family: Pretendard;
  src: local("Pretendard");
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  color: #252d3a;
  background: #fff;
  font-family:
    Pretendard,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "Noto Sans KR",
    sans-serif;
  font-size: 14px;
  letter-spacing: -0.025em;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
textarea,
select {
  outline-offset: 4px;
}
button {
  cursor: pointer;
  border: 0;
  background: none;
  color: inherit;
}
a {
  color: #2873e3;
  text-decoration: none;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
button:hover {
  filter: brightness(0.97);
}
input,
select,
textarea {
  border: 1px solid #e2e6ec;
  border-radius: 8px;
  padding: 11px;
  background: #fff;
  color: #253047;
}
input:focus,
textarea:focus,
select:focus {
  outline: 2px solid #a9cdfd;
  border-color: #7baef5;
}
input::placeholder,
textarea::placeholder {
  color: #a0a8b5;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: 32px;
  line-height: 1.4;
  letter-spacing: -1.3px;
}
h2 {
  font-size: 21px;
}
small,
.muted {
  color: #8a94a3;
}
button.primary,
.primary {
  background: #3182f6;
  color: #fff;
  border-radius: 9px;
  padding: 11px 17px;
  font-weight: 650;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.secondary {
  background: #f2f4f7;
  border-radius: 8px;
  padding: 10px 14px;
}
.danger {
  color: #d24c4c;
}
.row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.between {
  justify-content: space-between;
}
.loading {
  padding: 100px;
  text-align: center;
  color: #8a94a3;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.7px;
}
.brand img {
  width: 31px;
  height: 31px;
}
.brand span {
  font-weight: 450;
  color: #8993a2;
  margin-left: 3px;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 248px;
  background: #f7f8fa;
  border-right: 1px solid #edf0f4;
  padding: 29px 18px 18px;
  display: flex;
  flex-direction: column;
  z-index: 10;
}
.sidebar .brand {
  margin: 0 12px 28px;
}
.search-button {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff;
  border: 1px solid #e5e8ed;
  border-radius: 9px;
  padding: 11px 12px;
  color: #8b94a1;
  margin-bottom: 21px;
  text-align: left;
}
.kbd {
  font-size: 10px;
  border: 1px solid #e5e8ed;
  border-radius: 4px;
  padding: 2px 4px;
}
.nav-item {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 10px;
  text-align: left;
  border-radius: 8px;
  padding: 11px 13px;
  margin: 2px 0;
  color: #677284;
  font-weight: 550;
}
.nav-item.active {
  background: #eaf2ff;
  color: #2879ed;
}
.nav-item:hover {
  background: #edf0f5;
}
.nav-icon {
  width: 21px;
  text-align: center;
  font-size: 17px;
}
.nav-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 13px 10px;
  font-size: 11px;
  color: #98a0ad;
  letter-spacing: 1px;
  font-weight: 700;
}
.nav-scroll {
  overflow: auto;
  flex: 1;
}
.sidebar-bottom {
  border-top: 1px solid #e6eaf0;
  padding-top: 15px;
}
.avatar {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  background: #e5edff;
  border-radius: 50%;
  color: #4274cc;
  font-size: 12px;
  font-weight: 700;
}
.profile {
  padding: 14px 9px 0;
  display: flex;
  align-items: center;
  gap: 9px;
}
.profile small {
  display: block;
  font-size: 10px;
  margin-top: 3px;
}
.logout {
  margin-left: auto;
  color: #939bab;
  font-size: 12px;
}
.main {
  margin-left: 248px;
  min-height: 100vh;
}
.topbar {
  height: 76px;
  border-bottom: 1px solid #eef0f4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 44px;
  color: #8c95a2;
  font-size: 12px;
}
.topbar strong {
  color: #596475;
  font-weight: 500;
}
.private {
  display: flex;
  align-items: center;
  gap: 6px;
}
.private i {
  width: 6px;
  height: 6px;
  background: #70af8a;
  border-radius: 50%;
}
.page {
  max-width: 1230px;
  margin: auto;
  padding: 46px 56px 70px;
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 1.7px;
  font-weight: 750;
  color: #4386e8;
  margin-bottom: 13px;
}
.subtitle {
  font-size: 15px;
  color: #8a94a3;
  line-height: 1.7;
}
.welcome {
  margin-bottom: 34px;
}
.welcome h1 {
  margin-bottom: 9px;
}
.hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  background: #f1f6ff;
  border: 1px solid #e8f0fe;
  border-radius: 15px;
  padding: 27px 30px;
  margin: 27px 0 35px;
  overflow: hidden;
}
.hero h2 {
  font-size: 18px;
  margin-bottom: 9px;
}
.hero p {
  color: #75869f;
  line-height: 1.7;
  font-size: 13px;
  margin: 0 0 16px;
}
.hero-art {
  font-size: 64px;
  transform: rotate(-9deg);
  padding-right: 20px;
  filter: drop-shadow(7px 9px 0 #dbe9ff);
}
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 29px 0 16px;
}
.section-title h2 {
  font-size: 17px;
  margin: 0;
}
.section-title small {
  font-size: 12px;
}
.spaces {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 13px;
}
.space-card {
  border: 1px solid #e8ecf2;
  border-radius: 12px;
  padding: 21px;
  text-align: left;
  transition:
    transform 0.15s,
    border-color 0.15s;
  min-height: 151px;
  background: #fff;
}
.space-card:hover {
  border-color: #a8c9fb;
  transform: translateY(-2px);
}
.space-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  background: #f3f6fb;
  border-radius: 11px;
  font-size: 21px;
  margin-bottom: 16px;
}
.space-card h3 {
  font-size: 15px;
  margin-bottom: 7px;
}
.space-card p {
  font-size: 12px;
  color: #939caa;
  margin: 0;
  line-height: 1.6;
}
.space-count {
  float: right;
  color: #a1aaba;
  font-size: 11px;
}
.doc-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
.doc-table th {
  font-size: 11px;
  color: #97a0ae;
  font-weight: 500;
  padding: 12px 13px;
  background: #f9fafb;
  border-bottom: 1px solid #edf0f3;
}
.doc-table td {
  padding: 17px 13px;
  border-bottom: 1px solid #edf0f3;
  font-size: 12px;
  color: #8c95a3;
}
.doc-table .doc-title {
  font-weight: 550;
  color: #434e60;
  font-size: 14px;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 10px;
}
.doc-title span {
  font-size: 17px;
  color: #9badc5;
}
.badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 5px;
  font-size: 10px;
  background: #f0f3f7;
  color: #7b8699;
  white-space: nowrap;
}
.badge.review {
  background: #fff4df;
  color: #b68935;
}
.badge.published {
  background: #eaf7ee;
  color: #5f9b74;
}
.empty {
  border: 1px dashed #dfe5ed;
  border-radius: 12px;
  padding: 43px 20px;
  text-align: center;
  color: #98a2b1;
  line-height: 1.8;
}
.empty strong {
  display: block;
  color: #616e81;
  margin: 10px 0;
}
.toolbar {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  margin-bottom: 25px;
}
.toolbar input {
  flex: 1;
  min-width: 180px;
}
.toolbar select {
  font-size: 12px;
}
.tree {
  padding: 8px 0;
  margin-bottom: 20px;
  border-bottom: 1px solid #edf0f3;
}
.tree button {
  display: block;
  text-align: left;
  padding: 9px;
  color: #6d7f99;
}
.doc-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.doc-actions button,
.doc-actions a {
  font-size: 12px;
}
.article-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 175px;
  gap: 44px;
}
.doc-meta {
  padding: 18px 0 23px;
  margin-bottom: 26px;
  border-bottom: 1px solid #edf0f4;
  display: flex;
  gap: 17px;
  flex-wrap: wrap;
  color: #8c97a5;
  font-size: 12px;
}
.prose {
  font-size: 15px;
  line-height: 1.9;
  overflow-wrap: anywhere;
  min-height: 120px;
}
.prose h1 {
  font-size: 29px;
}
.prose h2 {
  font-size: 23px;
  margin: 36px 0 15px;
}
.prose h3 {
  font-size: 18px;
  margin-top: 28px;
}
.prose p {
  margin-bottom: 18px;
}
.prose pre {
  background: #f5f7fa;
  border: 1px solid #e9edf2;
  border-radius: 9px;
  padding: 20px;
  overflow: auto;
  line-height: 1.6;
}
.prose code {
  font:
    13px/1.7 ui-monospace,
    monospace;
  background: #f2f4f8;
  padding: 3px 5px;
  border-radius: 4px;
}
.prose pre code {
  padding: 0;
}
.prose blockquote {
  border-left: 3px solid #82aff0;
  margin: 20px 0;
  padding: 12px 20px;
  background: #f5f8fd;
  color: #64748a;
}
.prose table {
  border-collapse: collapse;
  display: block;
  overflow: auto;
}
.prose td,
.prose th {
  border: 1px solid #e1e6ed;
  padding: 9px 14px;
}
.prose img {
  max-width: 100%;
  border-radius: 8px;
}
.prose iframe {
  width: 100%;
  height: 450px;
  border: 1px solid #e5e9f0;
  border-radius: 10px;
}
.prose hr {
  border: 0;
  border-top: 1px solid #e8ecf2;
  margin: 30px 0;
}
.toc {
  position: sticky;
  top: 28px;
  align-self: start;
  font-size: 12px;
  border-left: 1px solid #edf0f4;
  padding-left: 18px;
}
.toc strong {
  font-size: 11px;
  color: #a0a9b6;
  display: block;
  margin-bottom: 14px;
}
.toc a {
  display: block;
  color: #8b96a6;
  margin: 11px 0;
  line-height: 1.5;
}
.files {
  margin-top: 42px;
  border-top: 1px solid #e8ecf2;
  padding-top: 24px;
}
.file-card {
  border: 1px solid #e4e9f1;
  padding: 16px;
  border-radius: 10px;
  margin: 10px 0;
  display: flex;
  align-items: center;
  gap: 12px;
}
.file-icon {
  background: #edf3fe;
  color: #6791ca;
  border-radius: 7px;
  font-size: 10px;
  padding: 12px 7px;
  font-weight: 800;
}
.file-info {
  flex: 1;
  min-width: 0;
}
.file-info strong {
  font-size: 13px;
  overflow-wrap: anywhere;
}
.file-info small {
  display: block;
  font-size: 11px;
  margin-top: 5px;
}
.file-card button,
.file-card a {
  font-size: 12px;
}
.dropzone {
  margin: 16px 0;
  border: 1px dashed #cbd8e9;
  border-radius: 10px;
  padding: 24px;
  text-align: center;
  background: #f9fbfe;
  color: #8a9bb2;
  cursor: pointer;
  line-height: 1.8;
}
.dropzone.drag {
  border-color: #3182f6;
  background: #eaf2ff;
}
.editor-title {
  width: 100%;
  border: none;
  font-size: 30px;
  font-weight: 700;
  padding: 14px 0;
  margin: 10px 0;
}
.edit-fields {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 15px 0 20px;
}
.edit-fields label {
  font-size: 11px;
  color: #95a0b1;
}
.edit-fields select,
.edit-fields input {
  display: block;
  width: 100%;
  margin-top: 7px;
  font-size: 12px;
}
.editor-tools {
  display: flex;
  gap: 5px;
  align-items: center;
  flex-wrap: wrap;
  padding: 10px;
  border: 1px solid #e4e9f0;
  border-radius: 10px 10px 0 0;
  background: #f8fafc;
}
.editor-tools button {
  padding: 7px 10px;
  font-size: 12px;
  border-radius: 5px;
}
.editor-tools button:hover {
  background: #e9eff8;
}
.editor-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid #e4e9f0;
  border-top: 0;
  border-radius: 0 0 10px 10px;
  overflow: hidden;
}
.editor-grid textarea {
  border: 0;
  border-right: 1px solid #e4e9f0;
  border-radius: 0;
  resize: vertical;
  min-height: 490px;
  line-height: 1.8;
  font:
    13px/1.9 ui-monospace,
    monospace;
  padding: 22px;
}
.editor-preview {
  padding: 22px;
  max-height: 700px;
  overflow: auto;
  background: #fff;
}
.editor-preview:before {
  content: "미리보기";
  display: block;
  font-size: 10px;
  color: #a4adbb;
  margin-bottom: 16px;
  letter-spacing: 1px;
}
.editor-note {
  font-size: 11px;
  color: #95a0b1;
  margin-top: 11px;
}
.login-page {
  min-height: 100vh;
  background: #f7f9fc;
  display: grid;
  place-items: center;
  padding: 25px;
}
.login-card {
  background: #fff;
  border: 1px solid #e7ecf3;
  border-radius: 22px;
  padding: 45px;
  width: 420px;
  max-width: 100%;
  box-shadow: 0 20px 70px #233b5d08;
}
.login-card .brand {
  margin-bottom: 44px;
}
.login-card h1 {
  font-size: 27px;
  margin-bottom: 10px;
}
.login-card p {
  color: #8d98a8;
  line-height: 1.8;
  font-size: 13px;
  margin-bottom: 30px;
}
.login-card label {
  display: block;
  font-size: 12px;
  color: #758195;
  margin: 18px 0 8px;
}
.login-card input,
.login-card .primary {
  width: 100%;
}
.login-card .primary {
  margin-top: 25px;
  padding: 14px;
}
.login-card footer {
  margin-top: 28px;
  font-size: 11px;
  text-align: center;
  color: #a2acba;
}
.form-error {
  color: #cb5050;
  font-size: 12px;
  min-height: 16px;
  margin-top: 15px;
}
#toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 10px;
  padding: 13px 21px;
  background: #26354a;
  color: white;
  font-size: 13px;
  z-index: 100;
  box-shadow: 0 7px 30px #0002;
  display: none;
  max-width: 90vw;
}
dialog {
  border: 1px solid #e5eaf2;
  border-radius: 16px;
  padding: 28px;
  max-width: 900px;
  width: 90vw;
  max-height: 90vh;
  color: #2c394c;
}
dialog::backdrop {
  background: #14243b55;
  backdrop-filter: blur(3px);
}
dialog h2 {
  margin: 0;
  font-size: 19px;
}
.dialog-body {
  margin-top: 23px;
}
dialog iframe {
  width: 100%;
  height: 65vh;
  border: 1px solid #e6eaf0;
  border-radius: 8px;
}
dialog img,
dialog video {
  max-width: 100%;
  max-height: 65vh;
}
dialog input {
  width: 100%;
  margin: 8px 0 18px;
}
dialog .templates {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.template {
  border: 1px solid #e5eaf1;
  border-radius: 10px;
  padding: 20px;
  text-align: left;
}
.template strong {
  display: block;
  margin-bottom: 9px;
}
.template p {
  margin: 0;
  color: #8e99a9;
  font-size: 12px;
  line-height: 1.6;
}
.mobile-menu {
  display: none;
}
.search-results button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 16px;
  border-bottom: 1px solid #ecf0f5;
}
.search-results small {
  display: block;
  margin-top: 7px;
}
.backlinks {
  margin-top: 35px;
  border-top: 1px solid #edf0f5;
  padding-top: 20px;
}
.backlinks a {
  display: block;
  margin: 10px 0;
  font-size: 13px;
}
.footer-note {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid #edf0f4;
  margin-top: 40px;
  padding-top: 18px;
  font-size: 10px;
  color: #a0aab8;
}
.tag {
  color: #7f98bd;
  font-size: 12px;
}
.revision {
  padding: 15px 5px;
  border-bottom: 1px solid #edf0f5;
}
.revision button {
  color: #3182f6;
}
.button-link {
  color: #3182f6;
}
.search-highlight {
  background: #fff0b6;
}
.busy {
  opacity: 0.65;
  pointer-events: none;
}
@media (min-width: 1450px) {
  .page {
    padding-top: 55px;
  }
  .spaces {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 1100px) {
  .sidebar {
    width: 220px;
  }
  .main {
    margin-left: 220px;
  }
  .page {
    padding: 35px 30px;
  }
  .topbar {
    padding: 0 30px;
  }
  .article-wrap {
    grid-template-columns: 1fr;
  }
  .toc {
    display: none;
  }
  .spaces {
    grid-template-columns: repeat(2, 1fr);
  }
  .edit-fields {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 760px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.2s;
    box-shadow: 20px 0 60px #18325315;
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .main {
    margin: 0;
  }
  .mobile-menu {
    display: inline-block;
    margin-right: 12px;
    font-size: 20px;
  }
  .topbar {
    height: 62px;
    padding: 0 20px;
  }
  .page {
    padding: 29px 20px;
  }
  .welcome h1 {
    font-size: 27px;
  }
  .welcome .primary {
    font-size: 12px;
    white-space: nowrap;
    padding: 10px;
  }
  .hero {
    padding: 23px;
  }
  .hero-art {
    display: none;
  }
  .spaces {
    gap: 10px;
  }
  .space-card {
    padding: 17px;
  }
  .space-card p {
    font-size: 11px;
  }
  .doc-table th:nth-child(3),
  .doc-table td:nth-child(3),
  .doc-table th:nth-child(4),
  .doc-table td:nth-child(4) {
    display: none;
  }
  .doc-table td {
    padding: 15px 7px;
  }
  .doc-table .doc-title {
    font-size: 12px;
  }
  .editor-grid {
    grid-template-columns: 1fr;
  }
  .editor-grid textarea {
    min-height: 380px;
    border-right: 0;
  }
  .editor-preview {
    border-top: 1px solid #e4e9f0;
  }
  .editor-title {
    font-size: 25px;
  }
  .private {
    font-size: 10px;
  }
  .file-card {
    flex-wrap: wrap;
  }
  .file-info {
    min-width: 60%;
  }
  .login-card {
    padding: 33px;
  }
  .footer-note {
    gap: 20px;
  }
  .prose {
    font-size: 14px;
  }
}

[hidden] {
  display: none !important;
}
.editor-grid.rich-mode {
  display: block;
}
#rich-body {
  min-height: 490px;
  padding: 30px;
  outline: none;
}
#rich-body:empty:before {
  content: "여기에 생각을 기록하세요. 위 도구로 제목, 목록, 표를 넣을 수 있어요.";
  color: #a1adbc;
}
#rich-body:focus {
  box-shadow: inset 0 0 0 2px #c8defe;
}

.hero-books {
  width: 180px;
  height: 135px;
  flex-shrink: 0;
  margin-right: 10px;
}
.add-space-card {
  border-style: dashed;
  background: #fafcff;
}
.profile > div {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.profile .avatar,
.profile .logout {
  flex-shrink: 0;
}
.nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}
.space-icon {
  color: #7c9ac5;
}
@media (max-width: 760px) {
  .hero-books {
    display: none;
  }
}
h1,
h2,
h3,
.subtitle,
.space-card p,
.hero p {
  word-break: keep-all;
  overflow-wrap: break-word;
}
