:root {
  --font-sans:
    "IBM Plex Sans", /* Hangul */ "Pretendard Variable", "Pretendard",
    "-apple-system", "BlinkMacSystemFont", "system-ui", "Roboto",
    "Helvetica Neue", "Segoe UI", "Apple SD Gothic Neo", "Noto Sans KR",
    "Malgun Gothic", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol",
    "sans-serif", "Pretendard", "-apple-system", "BlinkMacSystemFont",
    "system-ui", "Roboto", "Helvetica Neue", "Segoe UI", "Apple SD Gothic Neo",
    "Noto Sans KR", "Malgun Gothic", "Apple Color Emoji", "Segoe UI Emoji",
    "Segoe UI Symbol", "sans-serif";
  --font-serif:
    "IBM Plex Serif", /* Hangul  */ "Pretendard Variable", "Pretendard",
    "-apple-system", "BlinkMacSystemFont", "system-ui", "Roboto",
    "Helvetica Neue", "Segoe UI", "Apple SD Gothic Neo", "Noto Sans KR",
    "Malgun Gothic", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol",
    "sans-serif";
  --font-code:
    "IBM Plex Mono", "SFMono-Regular", Consolas, "Liberation Mono", Menlo,
    Courier, monospace;

  --font-size-mobile: 17px;
  --line-height-mobile: 29px;
  --font-size-desktop: 19px;
  --line-height-desktop: 34px;
}

.notion,
.tiptap {
  /* font-family: var(--font-sans); */
  word-break: break-word;
  font-weight: 400;
  /* 본문 기본 글자색은 컨테이너에만 둔다. 요소마다 지정하면
     .post-content-style-enabled 의 var(--inblog-post-text-color, inherit) 가
     specificity에서 이겨 커스텀 색상 블로그에서 상속이 끊긴다.
     Notion 은 react-notion-x 의 .notion { color: var(--fg-color) } 를,
     Tiptap 은 body 의 --foreground 를 여기서 함께 덮는다. */
  color: #242424;
  /* word-break: keep-all;
  word-wrap: break-word;
  white-space: pre-line; */
  overflow-wrap: break-word;
  max-width: 100%;
}

.notion-page {
  padding: 0;
  max-width: 720px;
  width: 100%;
}

/* Text */
.notion-text,
.tiptap p {
  /* font-family: var(--font-sans); */
  margin: 2px 0px;
  padding: 0px 0px;
  word-break: break-word;
  /* word-break: keep-all;
  word-wrap: break-word;
  white-space: pre-line; */
}
.tiptap p {
  color: #242424;
  margin: 4px 0px;
}
/** Legacy */
/* .tiptap p span {
  color: #242424 !important;
} */
/* 1) p 태그 중 클래스에 text-color- 가 포함되지 않은 경우 */
/* 2) span 태그 중 클래스에 text-color- 가 포함되지 않은 경우 */
.tiptap p:not([class*="text-color-"]),
.tiptap p span:not([class*="text-color-"]) {
  /* !important 는 에디터가 남긴 인라인 색을 덮기 위한 것이다. 값을 상수로 두면
     커스텀 글자색을 지정한 블로그에서 본문 문단만 색이 안 바뀌므로 변수를 쓴다. */
  color: var(--inblog-post-text-color, #242424) !important;
}
.notion-blank {
  margin: 3px 0px;
}
.tiptap p.is-empty {
  /* font-family: var(--font-sans); */
}
.notion-text b,
.tiptap p strong {
  font-weight: 600;
}
@media only screen and (max-width: 759.98px) {
  .notion-text,
  .tiptap p {
    font-size: var(--font-size-mobile);
    line-height: var(--line-height-mobile);
    min-height: var(--line-height-mobile);
    margin-top: 0px;
    margin-bottom: 20px;
  }
}
@media only screen and (min-width: 760px) and (max-width: 9999px) {
  .notion-text,
  .tiptap p {
    font-size: var(--font-size-desktop);
    line-height: var(--line-height-desktop);
    min-height: var(--line-height-desktop);
    margin-top: 0px;
    margin-bottom: 24px;
  }
}

.notion-inline-underscore {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* a tag */
.tiptap a,
.tiptap a span,
.notion-link {
  color: #1a73e8 !important;
  text-underline-offset: 3px;
  transition-property:
    color, background-color, border-color, text-decoration-color, fill, stroke;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
  cursor: pointer;

  /* notion override */
  border-bottom: none;
  transition: none;
  border-color: transparent;
  opacity: 1;
  word-break: break-word;
  /* word-break: keep-all;
  word-wrap: break-word;
  white-space: pre-line; */
}
.tiptap a:hover,
.notion-link:hover {
  color: #216cce;
  text-decoration: underline;
}

.post-content-style-enabled .tiptap,
.post-content-style-enabled .notion {
  /* fallback을 inherit로 두면 글자색을 지정하지 않은 커스텀 UI 블로그가
     body 색(#09090b)을 물려받아 기본 블로그와 어긋난다. 기본색을 직접 쓴다. */
  color: var(--inblog-post-text-color, #242424);
}

.post-content-style-enabled .tiptap p,
.post-content-style-enabled .tiptap li,
.post-content-style-enabled .tiptap td,
.post-content-style-enabled .tiptap th,
.post-content-style-enabled .notion-text {
  color: var(--inblog-post-text-color, inherit);
}

.post-content-style-enabled .tiptap h1,
.post-content-style-enabled .tiptap h2,
.post-content-style-enabled .tiptap h3,
.post-content-style-enabled .tiptap h4,
.post-content-style-enabled .notion-h1,
.post-content-style-enabled .notion-h2,
.post-content-style-enabled .notion-h3 {
  color: var(--inblog-post-heading-color, inherit);
}

.post-content-style-enabled .tiptap blockquote,
.post-content-style-enabled .notion-quote {
  border-left-color: var(--inblog-post-quote-accent-color, #44403c);
}

.post-content-style-enabled .tiptap code,
.post-content-style-enabled .notion-inline-code {
  color: var(--inblog-post-code-text-color, inherit);
  background: var(--inblog-post-code-background-color, #f5f2f0);
}

.post-content-style-enabled .tiptap pre,
.post-content-style-enabled pre.notion-code {
  background: var(--inblog-post-code-background-color, #f5f2f0);
}

.post-content-style-enabled .tiptap pre code,
.post-content-style-enabled pre.notion-code code,
.post-content-style-enabled pre.notion-code code span {
  color: var(--inblog-post-code-text-color, inherit);
  background: transparent;
}

.post-content-style-enabled .tiptap table td,
.post-content-style-enabled .tiptap table th,
.post-content-style-enabled .notion-simple-table td,
.post-content-style-enabled .notion-simple-table th {
  border-color: var(--inblog-post-table-border-color, rgb(233, 233, 231));
}

.post-content-style-enabled .tiptap table th,
.post-content-style-enabled .notion-simple-table th,
.post-content-style-enabled .notion-simple-table-header-row td,
.post-content-style-enabled .notion-simple-table-header-cell {
  background-color: var(
    --inblog-post-table-header-background-color,
    rgb(247, 246, 243)
  );
}

.post-content-style-enabled .tiptap figure figcaption,
.post-content-style-enabled .notion-asset-caption {
  color: var(--inblog-post-caption-color, #595959);
}

.post-content-style-enabled .tiptap a,
.post-content-style-enabled .tiptap a span,
.post-content-style-enabled .notion-link {
  color: var(--inblog-post-link-color, #1a73e8) !important;
  text-decoration: var(--inblog-post-link-decoration, none);
  font-weight: var(--inblog-post-link-font-weight, inherit);
  font-style: var(--inblog-post-link-font-style, inherit);
}

.post-content-style-enabled .tiptap a:hover,
.post-content-style-enabled .tiptap a:hover span,
.post-content-style-enabled .notion-link:hover {
  color: var(--inblog-post-link-hover-color, #216cce) !important;
  text-decoration: var(--inblog-post-link-hover-decoration, underline);
}
/* .tiptap a::after {
  content: url(https://s2.svgbox.net/hero-solid.svg?ic=link);
  width: 14px;
  position: absolute;
}
@media only screen and (max-width: 759.98px) {
  .tiptap a::after {
    width: 12px;
    transform: translate(-6px, 10px);
  }
  .tiptap a {
    padding-right: 5px;
  }
}
@media only screen and (min-width: 760px) and (max-width: 9999px) {
  .tiptap a::after {
    width: 14px;
    transform: translate(-8px, 12px);
  }
  .tiptap a {
    padding-right: 6px;
  }
} */

/* Highlight */
.tiptap mark span {
  background: #e8f3e8 !important;
}
@media only screen and (max-width: 759.98px) {
  .tiptap mark {
    padding: 1px 0px;
  }
}
@media only screen and (min-width: 760px) and (max-width: 9999px) {
  .tiptap mark {
    padding: 1.5px 0px;
  }
}

/* Heading General */
.notion-h,
.tiptap h {
  word-break: break-word;
  /* word-break: keep-all;
  word-wrap: break-word;
  white-space: pre-line; */
  display: block;
  padding: 0;
}
.tiptap h {
  display: block;
}
.notion-hash-link {
  pointer-events: none;
  display: none;
}

/* Heading 2 */
.notion-h1,
.tiptap h2 {
  /* font-family: var(--font-sans); */
  font-weight: 600;
  line-height: 1.5;
  margin: 0px;
}
.notion-h1 b,
.tiptap h2 strong {
  font-weight: 600;
}
.editor.notion-h1::before,
.editor.tiptap h2::before {
  content: "H2";
  position: absolute;
  transform: translateX(-100%);
  white-space: nowrap;
  margin-top: 12px;
  padding-right: 10px;
  font-size: 14px;
  font-weight: 400;
  /* font-family: var(--font-sans); */
  color: #5e81ac80;
}
@media only screen and (max-width: 759.98px) {
  .notion-h1,
  .tiptap h2 {
    font-size: 26px;
    line-height: 1.4;
    /* padding-top: 60px;
    margin-top: -20px; */
    margin-top: 44px;
    margin-bottom: 14px;
  }
  /* .notion-h1 {
    padding-top: -8px;
    margin-top: 48px;
  } */
  /* .tiptap h2 {
    padding-top: 40px;
  } */
  .notion-h1::before,
  .tiptap h2::before {
    margin-top: 10px;
    margin-right: 10px;
    font-size: 14px;
  }
  .notion-h1:first-child,
  .tiptap h2:first-child {
    margin-top: 10px;
  }
}
@media only screen and (min-width: 760px) and (max-width: 9999px) {
  .notion-h1,
  .tiptap h2 {
    font-size: 34px;
    line-height: 1.3;
    /* padding-top: 70px;
    margin-top: -10px; */
    margin-top: 60px;
    margin-bottom: 20px;
  }
  /* .notion-h1 {
    padding-top: 16px;
    margin-top: 44px;
  } */
  /* .tiptap h2 {
    padding-top: 60px;
  } */
  .notion-h1::before,
  .tiptap h2::before {
    margin-top: 3px;
    margin-right: 10px;
    font-size: 20px;
  }
  .notion-h1:nth-child(2),
  .tiptap h2:first-child {
    margin-top: 15px;
  }
}

/* Heading 3 */
.notion-h2,
.tiptap h3 {
  /* font-family: var(--font-sans); */
  font-weight: 600;
  line-height: 1.5;
  margin: 0px;
}
.notion-h2 b,
.tiptap h3 strong {
  font-weight: 600;
}
.editor.notion-h2::before,
.editor.tiptap h3::before {
  content: "H3";
  position: absolute;
  transform: translateX(-100%);
  white-space: nowrap;
  font-weight: 400;
  /* font-family: var(--font-sans); */
  color: #5e81ac80;
}
@media only screen and (max-width: 759.98px) {
  .notion-h2,
  .tiptap h3 {
    font-size: 21px;
    line-height: 1.4;
    /* padding-top: 60px;
    margin-top: -40px; */
    margin-top: 30px;
    margin-bottom: 8px;
  }
  .notion-h2::before,
  .tiptap h3::before {
    margin-top: 4px;
    padding-right: 10px;
    font-size: 14px;
  }
  .notion-h2:first-child,
  .tiptap h3:first-child {
    margin-top: 5px;
  }
}
@media only screen and (min-width: 760px) and (max-width: 9999px) {
  .notion-h2,
  .tiptap h3 {
    font-size: 24px;
    line-height: 1.35;
    /* padding-top: 80px;
    margin-top: -60px; */
    margin-top: 36px;
    margin-bottom: 8px;
  }
  .notion-h2::before,
  .tiptap h3::before {
    margin-top: 7px;
    padding-right: 10px;
    font-size: 14px;
  }
  .notion-h2:first-child,
  .tiptap h3:first-child {
    margin-top: 5px;
  }
}

/* Heading 4 */
.notion-h3,
.tiptap h4 {
  /* font-family: var(--font-sans); */
  font-weight: 600;
  line-height: 1.5;
  margin: 0px;
}
.notion-h3 b,
.tiptap h4 strong {
  font-weight: 600;
}
.editor.notion-h3::before,
.editor.tiptap h4::before {
  content: "H4";
  position: absolute;
  transform: translateX(-100%);
  white-space: nowrap;
  font-weight: 400;
  /* font-family: var(--font-sans); */
  color: #5e81ac80;
}
@media only screen and (max-width: 759.98px) {
  .notion-h3,
  .tiptap h4 {
    font-size: 18px;
    line-height: 1.45;
    margin-top: 22px;
    margin-bottom: 6px;
  }
  .notion-h3::before,
  .tiptap h4::before {
    margin-top: 3px;
    padding-right: 10px;
    font-size: 14px;
  }
  .notion-h3:first-child,
  .tiptap h4:first-child {
    margin-top: 2px;
  }
}
@media only screen and (min-width: 760px) and (max-width: 9999px) {
  .notion-h3,
  .tiptap h4 {
    font-size: 20px;
    line-height: 1.4;
    margin-top: 26px;
    margin-bottom: 8px;
  }
  .notion-h3::before,
  .tiptap h4::before {
    margin-top: 5px;
    padding-right: 10px;
    font-size: 14px;
  }
  .notion-h3:first-child,
  .tiptap h4:first-child {
    margin-top: 2px;
  }
}

/* Notion callout */
.notion-callout {
  display: flex;
  align-items: center;
  padding: 16px;
  margin: 32px 0;
}
.notion-callout.notion-gray_background_co,
.tiptap call-out {
  background-color: #f5f5f5;
}
.notion-callout > * {
  min-width: 0;
}
.notion-callout-text {
  word-break: break-word;
}
.notion-callout .notion-text {
  margin: 0;
}
@media only screen and (max-width: 759.98px) {
  .notion-callout-text {
    font-size: var(--font-size-mobile);
    line-height: var(--line-height-mobile);
    min-height: var(--line-height-mobile);
  }
  .notion-page-icon-inline {
    margin-top: 4px;
  }
}
@media only screen and (min-width: 760px) and (max-width: 9999px) {
  .notion-callout-text {
    font-size: var(--font-size-desktop);
    line-height: var(--line-height-desktop);
    min-height: var(--line-height-desktop);
  }
  .notion-page-icon-inline {
    margin-top: 6px;
  }
}

/* react-notion-x renders consecutive top-level items as sibling lists. */
.notion-list-disc + .notion-list-disc,
.notion-list-numbered + .notion-list-numbered {
  margin-top: 0;
}
/* BlockQuote */
.notion-quote,
.tiptap blockquote {
  border-left: 4px solid #44403c;
  padding: 0 0 0 12px;
  margin: 20px 0;
  word-break: break-word;
  /* word-break: keep-all;
  word-wrap: break-word;
  white-space: pre-line; */
}
.notion-quote:first-child,
.tiptap blockquote:first-child {
  margin-top: 4px;
}
/* BlockQuote 내부의 리스트 스타일 */
.tiptap blockquote ul,
.tiptap blockquote ol,
.notion-quote ul,
.notion-quote ol {
  margin-top: 8px;
  margin-bottom: 8px;
}
.tiptap blockquote ul li,
.tiptap blockquote ol li,
.notion-quote li {
  margin-left: 0;
}
/* 인용문 안쪽은 본문보다 촘촘하게. 인용은 시각적으로 묶인 블록이라
   본문 문단 간격(20/24px)을 그대로 쓰면 상자 안이 헐거워진다. */
.tiptap blockquote p,
.notion-quote .notion-text {
  margin-bottom: 12px;
}
@media only screen and (max-width: 759.98px) {
  .notion-quote,
  .tiptap blockquote {
    font-size: var(--font-size-mobile);
    line-height: var(--line-height-mobile);
    min-height: var(--line-height-mobile);
  }
}
@media only screen and (min-width: 760px) and (max-width: 9999px) {
  .notion-quote,
  .tiptap blockquote {
    font-size: var(--font-size-desktop);
    line-height: var(--line-height-desktop);
    min-height: var(--line-height-desktop);
  }
}

/* Unordered List */
.notion-list-disc,
.tiptap ul {
  /* font-family: var(--font-sans); */
  width: 100%;
}
.notion-list-disc li,
.tiptap ul li {
  list-style: disc;
  padding: 0px 0px;
}
.notion-list-disc ul li,
.tiptap ul li li {
  list-style: circle;
}
.notion-list-disc ul ul li,
.tiptap ul li li li {
  list-style: square;
}
.notion-list-disc ul ul ul li,
.tiptap ul li li li li {
  list-style: disc;
}
.notion-list-disc ul ul ul ul li,
.tiptap ul li li li li li {
  list-style: circle;
}
.notion-list-disc ul ul ul ul ul li,
.tiptap ul li li li li li li {
  list-style: square;
}
.notion-list-disc ul ul ul ul ul ul li,
.tiptap ul li li li li li li li {
  list-style: disc;
}
.notion-list-disc ul ul ul ul ul ul ul li,
.tiptap ul li li li li li li li li {
  list-style: circle;
}
.notion-list-disc ul ul ul ul ul ul ul ul li,
.tiptap ul li li li li li li li li li {
  list-style: square;
}
.notion-list-disc ul ul ul ul ul ul ul ul ul li,
.tiptap ul li li li li li li li li li li {
  list-style: disc;
}
.notion-list-disc li p,
.tiptap ul li p {
  margin: 0px 0px 0px 0px;
  padding: 0px 0px;
}
@media only screen and (max-width: 759.98px) {
  .notion-list-disc,
  .tiptap ul {
    margin: 4px 0px 0px 0px;
    padding: 0px 0px 0px 16px;
  }
  .notion-list-disc li::marker,
  .tiptap ul li::marker,
  .notion-list-disc li,
  .tiptap ul li {
    margin: 0px 0px 8px 0px;
    font-size: var(--font-size-mobile);
    line-height: var(--line-height-mobile);
    min-height: var(--line-height-mobile);
  }
}
@media only screen and (min-width: 760px) and (max-width: 9999px) {
  .notion-list-disc,
  .tiptap ul {
    margin: 6px 0px 0px 0px;
    padding: 0px 0px 0px 24px;
  }
  .notion-list-disc li::marker,
  .tiptap ul li::marker,
  .notion-list-disc li,
  .tiptap ul li {
    margin: 0px 0px 12px 0px;
    font-size: var(--font-size-desktop);
    line-height: var(--line-height-desktop);
    min-height: var(--line-height-desktop);
  }
}

/* Ordered List */
.notion-list-numbered,
.tiptap ol {
  /* font-family: var(--font-sans); */
  width: 100%;
}
.notion-list-numbered li,
.tiptap ol li {
  list-style: decimal;
  padding: 0px 0px;
}
.notion-list-numbered ol li,
.tiptap ol li li {
  list-style: lower-alpha;
}
.notion-list-numbered ol ol li,
.tiptap ol li li li {
  list-style: lower-roman;
}
.notion-list-numbered ol ol ol li,
.tiptap ol li li li li {
  list-style: decimal;
}
.notion-list-numbered ol ol ol ol li,
.tiptap ol li li li li li {
  list-style: lower-alpha;
}
.notion-list-numbered ol ol ol ol ol li,
.tiptap ol li li li li li li {
  list-style: lower-roman;
}
.notion-list-numbered ol ol ol ol ol ol li,
.tiptap ol li li li li li li li {
  list-style: decimal;
}
.notion-list-numbered ol ol ol ol ol ol ol li,
.tiptap ol li li li li li li li li {
  list-style: lower-alpha;
}
.notion-list-numbered ol ol ol ol ol ol ol ol li,
.tiptap ol li li li li li li li li li {
  list-style: lower-roman;
}
.notion-list-numbered ol ol ol ol ol ol ol ol ol li,
.tiptap ol li li li li li li li li li li {
  list-style: decimal;
}
.notion-list-numbered li p,
.tiptap ol li p {
  margin: 0px 0px 0px 0px;
  padding: 0px 0px;
}
@media only screen and (max-width: 759.98px) {
  .notion-list-numbered,
  .tiptap ol {
    margin: 4px 0px 0px 0px;
  }
  .notion-list-numbered {
    padding: 0px 0px 0px 22px;
  }
  .tiptap ol {
    padding: 0px 0px 0px 16px;
  }
  .notion-list-numbered li::marker,
  .tiptap ol li::marker,
  .notion-list-numbered li,
  .tiptap ol li {
    margin: 0px 0px 8px 0px;
    font-size: var(--font-size-mobile);
    line-height: var(--line-height-mobile);
    min-height: var(--line-height-mobile);
  }
}
@media only screen and (min-width: 760px) and (max-width: 9999px) {
  .notion-list-numbered,
  .tiptap ol {
    margin: 6px 0px 0px 0px;
    padding: 0px 0px 0px 24px;
  }
  .notion-list-numbered li::marker,
  .tiptap ol li::marker,
  .notion-list-numbered li,
  .tiptap ol li {
    margin: 0px 0px 12px 0px;
    font-size: var(--font-size-desktop);
    line-height: var(--line-height-desktop);
    min-height: var(--line-height-desktop);
  }
}

/* inline code */
.notion-inline-code,
.tiptap code {
  font-family: var(--font-code);
  font-weight: 400;
  padding: 3px 7px;
  margin: 0px 2px;
  border-radius: 3px;
  background: #f5f2f0;
}
@media only screen and (max-width: 759.98px) {
  .notion-inline-code,
  .tiptap code {
    font-size: 16px;
    line-height: 28px;
    min-height: 28px;
  }
}
@media only screen and (min-width: 760px) and (max-width: 9999px) {
  .notion-inline-code,
  .tiptap code {
    font-size: 17px;
    line-height: 32px;
    min-height: 32px;
  }
}

/* code */
.code-toolbar {
  width: 100%;
  display: hidden;
}
pre.notion-code,
.tiptap pre {
  background: #f5f2f0;
  padding: 2rem;
  margin: 0px;
  border-radius: 3px;
  overflow-x: scroll;
}
pre.notion-code code,
pre.notion-code code span,
.tiptap pre code {
  display: inline-block;
  font-family: var(--font-code);
  font-weight: 400;
  padding: 0px 0px 18px 0px;
  margin: 0px 0px;
  background: transparent;
  color: black;
  word-break: break-word;
  /* word-break: keep-all;
  word-wrap: normal;
  white-space: pre; */
}
.notion-code-copy {
  display: none;
}
@media only screen and (max-width: 759.98px) {
  pre.notion-code,
  .tiptap pre {
    margin-bottom: 0px;
  }
  pre.notion-code code,
  pre.notion-code code span,
  .tiptap pre code {
    font-size: 14px;
    line-height: 22px;
    min-height: 22px;
    margin: 0;
    padding: 0;
  }
}
@media only screen and (min-width: 760px) and (max-width: 9999px) {
  pre.notion-code,
  .tiptap pre {
    margin-bottom: 0px;
  }
  pre.notion-code code,
  pre.notion-code code span,
  .tiptap pre code {
    font-size: 15px;
    line-height: 24px;
    min-height: 24px;
    margin: 0;
    padding: 0;
  }
}

/* img */

.notion-asset-wrapper-image,
.tiptap img:not(.bookmark-image-inner-container img) {
  display: flex;
  margin: 32px auto;
  padding: 0;
  max-width: 100%;
  height: auto;
}

.tiptap figure {
  display: block;
  margin-top: 32px;
  margin-bottom: 32px;
}

.tiptap figure img {
  margin: 0px auto !important;
}

.tiptap figure[fig-type="resize"] > a {
  display: block;
  width: 100%;
}

.tiptap figure[fig-type="resize"] > img,
.tiptap figure[fig-type="resize"] > a > img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.tiptap .notion-asset-wrapper-image > div,
.notion-asset-wrapper-image > div {
  width: 100%;
  height: auto !important;
}
.notion-asset-wrapper-image > div img {
  max-width: 100%;
  height: auto !important;
  object-fit: contain !important;
}
.tiptap figure figcaption {
  text-align: center;
  font-size: 14px;
  color: #595959;
  margin-top: 4px;
}
.node-imagePlaceholder {
  width: 100%;
  height: 100%;
}
/*
.ProseMirror img {
  display: block;
  margin: 32px auto;
  width: 100%;
  justify-content: center;
  transition: filter 0.1s ease-in-out;

  &:hover {
    cursor: pointer;
    filter: brightness(90%);
  }

  &.ProseMirror-selectednode {
    outline: 3px solid #5abbf7;
    filter: brightness(90%);
  }
}
*/

/* Link Button */
.tiptap link-button {
  margin-top: 32px;
  margin-bottom: 32px;
}

/* Callout */
.tiptap .node-callOut p:first-child {
  margin-top: 0px;
}
.tiptap .node-callOut p:last-child {
  margin-bottom: 0px;
}

/* divider */
.notion-hr,
.tiptap hr {
  border-top: 1px solid #37352f30;
}

@media only screen and (max-width: 759.98px) {
  .notion-hr,
  .tiptap hr {
    margin: 32px 0px 32px 0px;
  }
}
@media only screen and (min-width: 760px) and (max-width: 9999px) {
  .notion-hr,
  .tiptap hr {
    margin: 40px 0px 40px 0px;
  }
}

/* Editor place holder */
.ProseMirror .is-editor-empty:first-child::before {
  content: attr(data-placeholder);
  float: left;
  color: var(--novel-stone-400);
  pointer-events: none;
  height: 0;
}
.ProseMirror .is-empty::before {
  content: attr(data-placeholder);
  float: left;
  color: var(--novel-stone-400);
  pointer-events: none;
  height: 0;
}

.ProseMirror {
  padding-inline: 1.5rem;
}

.ProseMirror > * + * {
  margin-top: 0.75em;
}

.drag-handle {
  align-items: center;
  border-radius: 0.25rem;
  cursor: grab;
  display: flex;
  height: 2rem;
  justify-content: center;
  width: 2rem;
  background: white; /* No background by default */
  transition: all 0.2s ease-in-out;
  animation: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.drag-handle:hover {
  background: #f0f0f0; /* Background on hover */
}

/* Unset all styles inside emoji-picker-container */
.emoji-picker-container h2 {
  all: unset; /* Unset any inherited styles for h2 inside EmojiPicker */
  color: #8a8a8a !important;
  position: static; /* Ensure that ::before pseudo-element won't position itself */
  list-style-type: none !important; /* Remove the bullet point */
  font-size: 1rem !important; /* Set the font size */
}

.emoji-picker-container h2::before {
  content: none !important;
}
/* .ProseMirror {
  table {
    border-collapse: collapse;
    margin: 0;
    overflow: hidden;
    table-layout: fixed;
    width: 100%;

    td,
    th {
      border: 2px solid #ced4da;
      box-sizing: border-box;
      min-width: 1em;
      padding: 3px 5px;
      position: relative;
      vertical-align: top;

      > * {
        margin-bottom: 0;
      }
    }

    th {
      background-color: #f1f3f5;
      font-weight: bold;
      text-align: left;
    }

    .selectedCell:after {
      background: rgba(200, 200, 255, 0.4);
      content: "";
      left: 0;
      right: 0;
      top: 0;
      bottom: 0;
      pointer-events: none;
      position: absolute;
      z-index: 2;
    }

    .column-resize-handle {
      background-color: #adf;
      bottom: -2px;
      position: absolute;
      right: -2px;
      pointer-events: none;
      top: 0;
      width: 4px;
    }

    p {
      margin: 0;
    }
  }
} */

.tiptap {
  /* 테이블을 감싸는 div - 개별 블록 스크롤 */
  > div[style*="overflow-x"] {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 16px 0;
  }

  /* 모바일에서 테이블 wrapper 처리 */
  @media only screen and (max-width: 768px) {
    > div[style*="overflow-x"] {
      margin-left: -1.25rem;
      margin-right: -1.25rem;
      max-width: 100vw;
      padding-left: 1.25rem;
      padding-right: 1.25rem;
    }
  }

  table {
    border-collapse: collapse;
    table-layout: auto; /* auto로 변경하여 내용에 맞게 조정 */
    width: auto;
    min-width: 100%; /* 최소 너비는 100% 유지 */
    margin: 16px 0;

    td,
    th {
      border: 1px solid rgb(233, 233, 231);
      box-sizing: border-box;
      min-width: 120px; /* 최소 너비 보장 */
      padding: 7px 9px;
      position: relative;
      vertical-align: top;
      white-space: normal; /* 텍스트 줄바꿈 허용 */
      word-break: break-word; /* 긴 단어 줄바꿈 */

      > * {
        margin-bottom: 0;
      }
    }

    th {
      background-color: rgb(247, 246, 243);
      font-weight: 500;
      text-align: left;
    }

    .selectedCell {
      /* background: rgba(200, 200, 255, 0.4); */
      background: #5abbf720;
      /* border: 1px solid #5abbf7; */
      /* content: "";
      left: 0;
      right: 0;
      top: 0;
      bottom: 0;
      pointer-events: none;
      position: absolute;
      z-index: 2; */
    }
    .column-resize-handle {
      background-color: #adf;
      bottom: -2px;
      position: absolute;
      right: -2px;
      pointer-events: none;
      top: 0;
      width: 4px;
    }

    @media only screen and (max-width: 759.98px) {
      p {
        margin: 0;
        font-size: 15px;
        line-height: 22px;
        min-height: 22px;
      }
    }
    @media only screen and (min-width: 760px) and (max-width: 9999px) {
      p {
        margin: 0;
        font-size: 17px;
        line-height: 24px;
        min-height: 24px;
      }
    }
    ul,
    li {
      margin: 0;
    }
  }
}

tr.is-empty::before,
tr.is-editor-empty::before,
td.is-empty::before,
td.is-editor-empty::before {
  content: none !important; /* Remove any content */
  display: none !important; /* Ensure it's not rendered */
}

.tableWrapper {
  overflow-x: auto;
}

.resize-cursor {
  cursor: ew-resize;
  cursor: col-resize;
}
/* Notion table */
.notion-simple-table {
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
  padding: 0;
  margin-top: 16px;
  margin-bottom: 16px;
  font-size: 16px;
  line-height: 24px;
  /* font-family: var(--font-sans); */
}

.notion-simple-table table {
  width: auto;
  min-width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
}

.notion-simple-table td,
.notion-simple-table th {
  min-width: 120px; /* 최소 너비 보장 */
  padding: 7px 9px;
  word-break: break-word;
  white-space: normal;
}

.notion-simple-table-header-row td,
.notion-simple-table-header-cell {
  font-weight: 500;
  background: rgb(247, 246, 243);
}

/* 모바일에서 notion 테이블 처리 */
@media only screen and (max-width: 768px) {
  .notion-simple-table {
    margin-left: -1.25rem;
    margin-right: -1.25rem;
    max-width: 100vw;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }
}

.notion figure:not(.notion-asset-wrapper-image) div {
  width: 100% !important;
}

.image {
  width: fit-content;
  position: relative;
}

.image .alt-text-indicator {
  font-size: 0.9em;
  position: absolute;
  bottom: 4px;
  right: 0px;
  max-width: calc(100% - 20px);
  padding: 0 0.5em;
  display: inline-flex;
  align-items: center;
  overflow: hidden;
  color: black;
}

/*
.image .alt-text-indicator .symbol {
  flex: 0 0 auto;
  font-size: 1.4em;
  font-weight: bold;
}

.image .alt-text-indicator .symbol-positive {
  color: #19961b;
}

.image .alt-text-indicator .symbol-negative {
  color: #961f1f;
}
*/

.image .alt-text-indicator .text {
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notion-asset-wrapper-video {
  display: flex;
  height: fit-content !important;
}
.notion-asset-wrapper-video > div {
  height: fit-content !important;
  width: 100% !important;
  position: relative;
  padding-top: 56.25%;
  padding-bottom: 0% !important;
  /* 16:9 Aspect Ratio */
  height: 0;
  overflow: hidden;
}

.notion-asset-wrapper-video > div > video {
  /* height: fit-content !important; */
  /* object-fit: cover !important; */
  margin-top: -56.25%;
}

.notion-asset-wrapper-video > div > iframe {
  /* height: fit-content !important; */
  /* object-fit: cover !important; */
}

div[data-youtube-video=""] {
  /* CSS styles go here */
  position: relative;
  padding-top: 56.25%; /* 16:9 Aspect Ratio */
  padding-bottom: 0% !important;
  height: 0;
  overflow: hidden;
}

div[data-youtube-video] > iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.notion-yt-playbtn {
  display: none;
}

.notion-asset-caption {
  color: #595959;
  padding: 0;
  margin-top: 4px;
  text-align: center;
  font-size: 14px;
  line-height: 21px;
}

/* 캡션 크기는 Notion/Tiptap 공통. .notion-asset-caption 기본 규칙보다 뒤에
   두어야 같은 specificity 싸움에서 밀리지 않는다. */
@media only screen and (max-width: 759.98px) {
  .tiptap figure figcaption,
  .notion-asset-caption {
    font-size: 14px;
    line-height: 1.6;
  }
}
@media only screen and (min-width: 760px) and (max-width: 9999px) {
  .tiptap figure figcaption,
  .notion-asset-caption {
    font-size: 15px;
    line-height: 1.6;
  }
}

/* 스크롤시 하이라이트 */
.active-toc-entry {
  color: #1a69ff; /* Highlight color */
  transform: scale(1.05);
}

.has-focus {
  border-radius: 1px;
  box-shadow: 0 0 0 1px #68cef8;
}

.tippy-box {
  background: transparent;
  width: fit-content;
  height: fit-content;
}

.tiptap link-button {
  display: flex;
  margin-top: 32px;
  margin-bottom: 32px;
}

/* Styling for the a tag inside the link-button */
.tiptap link-button a:last-child {
  display: block;
  width: 100%;
  background-color: #000000;
  padding: 8px;
  border-radius: 4px;
  color: #ffffff !important;
  text-decoration: none;
  text-align: center;
  white-space: pre-wrap;
}

.tiptap link-button a:hover {
  text-decoration: none !important;
}

.tiptap call-out {
  display: flex;
  gap: 16px;
  align-items: start !important;
  padding: 16px;
  border-radius: 8px;
  margin-top: 32px;
  margin-bottom: 32px;
}

.tiptap call-out p {
  margin: 0 !important;
  white-space: pre-wrap !important;
}

.custom-code-block {
  margin-top: 32px;
  margin-bottom: 32px;
}

.typeform {
  margin-top: 28px;
  margin-bottom: 28px;
}

.hubspot-form {
  margin-top: 28px;
  margin-bottom: 28px;
}

.tally-form {
  margin-top: 28px;
  margin-bottom: 28px;
}

.google-form {
  margin-top: 28px;
  margin-bottom: 28px;
  position: relative;
  width: 100%;
  aspect-ratio: 2/3;
  overflow: hidden;
}

.google-form iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.hljs {
  color: #24292e;
  background: #ffffff;
}

.hljs-doctag,
.hljs-keyword,
.hljs-meta .hljs-keyword,
.hljs-template-tag,
.hljs-template-variable,
.hljs-type,
.hljs-variable.language_ {
  /* prettylights-syntax-keyword */
  color: #d73a49;
}

.hljs-title,
.hljs-title.class_,
.hljs-title.class_.inherited__,
.hljs-title.function_ {
  /* prettylights-syntax-entity */
  color: #6f42c1;
}

.hljs-attr,
.hljs-attribute,
.hljs-literal,
.hljs-meta,
.hljs-number,
.hljs-operator,
.hljs-variable,
.hljs-selector-attr,
.hljs-selector-class,
.hljs-selector-id {
  /* prettylights-syntax-constant */
  color: #005cc5;
}

.hljs-regexp,
.hljs-string,
.hljs-meta .hljs-string {
  /* prettylights-syntax-string */
  color: #032f62;
}

.hljs-built_in,
.hljs-symbol {
  /* prettylights-syntax-variable */
  color: #e36209;
}

.hljs-comment,
.hljs-code,
.hljs-formula {
  /* prettylights-syntax-comment */
  color: #6a737d;
}

.hljs-name,
.hljs-quote,
.hljs-selector-tag,
.hljs-selector-pseudo {
  /* prettylights-syntax-entity-tag */
  color: #22863a;
}

.hljs-subst {
  /* prettylights-syntax-storage-modifier-import */
  color: #24292e;
}

.hljs-section {
  /* prettylights-syntax-markup-heading */
  color: #005cc5;
  font-weight: bold;
}

.hljs-bullet {
  /* prettylights-syntax-markup-list */
  color: #735c0f;
}

.hljs-emphasis {
  /* prettylights-syntax-markup-italic */
  color: #24292e;
  font-style: italic;
}

.hljs-strong {
  /* prettylights-syntax-markup-bold */
  color: #24292e;
  font-weight: bold;
}

.hljs-addition {
  /* prettylights-syntax-markup-inserted */
  color: #22863a;
  background-color: #f0fff4;
}

.hljs-deletion {
  /* prettylights-syntax-markup-deleted */
  color: #b31d28;
  background-color: #ffeef0;
}

.hljs-char.escape_,
.hljs-link,
.hljs-params,
.hljs-property,
.hljs-punctuation,
.hljs-tag {
  /* purposely ignored */
}

/* Bookmark */
.bookmark-wrapper {
  margin-top: 24px;
  margin-bottom: 24px;
}

bookmark > a {
  display: flex;
  flex-direction: row;
  border: 1px solid rgba(55, 53, 47, 0.16) !important;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
}

bookmark > a:hover {
  background-color: rgb(249, 250, 251);
  text-decoration: none !important;
}

bookmark > a > .bookmark-meta-info {
  flex: 4 1 180px;
  padding: 12px;
  overflow: hidden;
  text-align: left;
  display: flex;
  flex-direction: column;
  min-height: 120px;
  justify-content: space-between;
}

bookmark > a > .bookmark-meta-info > .bookmark-title {
  font-size: 14px;
  color: rgb(55, 53, 47);
  line-height: 24px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 6px;
  margin-bottom: 0.5px !important;
}

bookmark > a > .bookmark-meta-info > .bookmark-description {
  font-size: 12px;
  color: rgba(55, 53, 47, 0.65);
  overflow: hidden;
  text-overflow: ellipsis;
  line-clamp: 2;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

bookmark > a > .bookmark-meta-info > .bookmark-source {
  display: flex;
  flex-direction: row;
  align-items: center;
  width: fit-content;
  gap: 8px;
  margin-top: auto;
}

bookmark > a > .bookmark-meta-info > .bookmark-source > img {
  width: 16px;
  height: 16px;
  border-radius: 100%;
  border: 1px solid rgba(55, 53, 47, 0.16);
  margin: 0 !important;
}

bookmark > a > .bookmark-meta-info > .bookmark-source > div {
  font-size: 12px;
  line-height: 16px;
  color: rgba(55, 53, 47, 0.65);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 16px;
  margin-bottom: 0.5px;
}

bookmark > a > .bookmark-image-wrapper {
  flex: 1 1 180px;
  position: relative;
}

bookmark > a > .bookmark-image-wrapper > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  margin: 0 !important;
  display: block;
  aspect-ratio: 2/1;
}

/* 북마크 이미지 모바일 대응 */
@media only screen and (max-width: 568px) {
  bookmark > a > .bookmark-image-wrapper {
    display: none;
  }

  bookmark > a > .bookmark-meta-info {
    flex: 1;
    min-height: 120px;
    padding: 16px;
  }
}
