html,
body {
  margin: 0;
  height: 100vh;
  overflow: hidden;
  background: var(--pageBg, #111);
}

body {
  background: var(--pageBg, #111);
  color: #fff;
}

:root {
  --btnColor: #fff;
  --btnSize: 16px;
  --crossColor: var(--btnColor);
  --crossSize: 100px;
  --padTop: 64px;
  --padBottom: 64px;
  --padSide: 10px;
  --corner-offset: 10px;
  --corner-pad-y: 6px;
  --corner-pad-x: 8px;
  --touch-ui-bottom-gap: calc(var(--btnSize) + var(--corner-pad-y) + var(--corner-pad-y) + var(--corner-offset) + var(--corner-offset) + env(safe-area-inset-bottom, 0px));
}

@media (max-width: 1194px) {
  html,
  body {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
    background: var(--pageBg, #111);
  }

  body {
    box-sizing: border-box;
  }

  :root {
    --padTop: calc(76px + env(safe-area-inset-top, 0px));
    --padBottom: var(--touch-ui-bottom-gap);
    --padSide: 10px;
  }

  body::before,
  body::after {
    content: "";
    position: fixed;
    left: 0;
    right: 0;
    background: var(--pageBg, #111);
    pointer-events: none;
    z-index: 900;
  }

  body::before {
    top: 0;
    height: var(--padTop);
  }

  body::after {
    bottom: 0;
    height: var(--padBottom);
  }
}

@media (max-width: 600px) {
  :root {
    --padTop: calc(82px + env(safe-area-inset-top, 0px));
    --padBottom: var(--touch-ui-bottom-gap);
    --padSide: 10px;
  }
}

.corner-btn {
  position: fixed;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: var(--corner-pad-y) var(--corner-pad-x);
  text-decoration: none;
  z-index: 1000;
  color: var(--btnColor);
  font-size: var(--btnSize);
  line-height: 1;
}

.corner-btn.left-top { top: var(--corner-offset); left: var(--corner-offset); }
.corner-btn.right-top { top: var(--corner-offset); right: var(--corner-offset); }
.corner-btn.left-bottom { bottom: var(--corner-offset); left: var(--corner-offset); }
.corner-btn.right-bottom { bottom: var(--corner-offset); right: var(--corner-offset); }

.about-cross-btn {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: var(--crossSize);
  height: var(--crossSize);
  display: inline-block;
  color: var(--crossColor);
  z-index: 1000;
}

.about-cross-btn svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
  display: block;
}

.wrap {
  display: flex;
  width: 100vw;
  height: 100vh;
  padding: var(--padTop) var(--padSide) var(--padBottom);
  box-sizing: border-box;
}

@media (max-width: 1194px) {
  .corner-btn.left-top {
    top: calc(var(--corner-offset) + env(safe-area-inset-top, 0px));
    left: calc(var(--corner-offset) + env(safe-area-inset-left, 0px));
  }

  .corner-btn.right-top {
    top: calc(var(--corner-offset) + env(safe-area-inset-top, 0px));
    right: calc(var(--corner-offset) + env(safe-area-inset-right, 0px));
  }

  .corner-btn.left-bottom {
    bottom: calc(var(--corner-offset) + env(safe-area-inset-bottom, 0px));
    left: calc(var(--corner-offset) + env(safe-area-inset-left, 0px));
  }

  .corner-btn.right-bottom {
    right: calc(var(--corner-offset) + env(safe-area-inset-right, 0px));
    bottom: calc(var(--corner-offset) + env(safe-area-inset-bottom, 0px));
  }

  .wrap {
    flex-direction: column;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    padding: var(--padTop) var(--padSide) var(--padBottom);
    gap: 20px;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
}

.col {
  flex: 1;
  display: flex;
  align-items: stretch;
  justify-content: flex-start;
  padding: 20px;
  box-sizing: border-box;
  width: 33%;
  min-height: 0;
}

@media (max-width: 1194px) {
  .col {
    width: 100%;
    min-height: auto;
    height: auto;
    padding: 12px 4px;
  }
}

.col-body {
  width: 100%;
  height: 100%;
  min-height: 0;
}

.kind-image,
.kind-text {
  width: 100%;
  height: 100%;
  min-height: 0;
}

@media (max-width: 1194px) {
  .col-body,
  .kind-image,
  .kind-text {
    height: auto;
    min-height: auto;
  }
}

.text-subwrap {
  display: flex;
  gap: 16px;
  width: 100%;
  height: 100%;
  min-height: 0;
}

@media (max-width: 1194px) {
  .text-subwrap {
    height: auto;
    min-height: auto;
  }
}

.text-sub {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overflow-wrap: break-word;
  word-break: break-word;
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
  transition: scrollbar-color .2s ease;
}

.text-sub img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  margin: 12px 0;
}

.text-sub a {
  color: inherit;
  font: inherit;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.text-sub strong,
.text-sub b {
  font-weight: 700;
}

@media (max-width: 1194px) {
  .text-sub {
    overflow: visible;
    min-height: auto;
    max-height: none;
    scrollbar-width: none;
  }

  .text-sub::-webkit-scrollbar {
    width: 0;
    height: 0;
  }
}

.text-sub::-webkit-scrollbar {
  width: 6px;
}

.text-sub::-webkit-scrollbar-track {
  background: transparent;
}

.text-sub::-webkit-scrollbar-thumb {
  background: transparent;
  border-radius: 999px;
  transition: background .2s ease;
}

.text-sub:hover {
  scrollbar-color: rgba(255,255,255,0.24) transparent;
}

.text-sub:hover::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.24);
}

.text-sub :where(p, ul, ol, h1, h2, h3) {
  margin: 0 0 0.6em;
}

.text-sub :where(*):not([style*="color"]) {
  color: inherit !important;
}

.text-sub :where(*):not([style*="font-size"]) {
  font-size: inherit !important;
}

.text-sub :where(*):not([style*="line-height"]) {
  line-height: inherit !important;
}

.text-sub .ql-align-center {
  text-align: center;
}

.text-sub .ql-align-right {
  text-align: right;
}

.text-sub .ql-align-justify {
  text-align: justify;
}

.text-sub li::marker {
  color: var(--marker-color, currentColor);
  font-size: var(--marker-size, 1em);
}

.text-sub li.ql-align-center,
.text-sub li.ql-align-right,
.text-sub li.ql-align-justify {
  list-style-position: inside;
}

.img-box {
  display: flex;
  width: 100%;
  height: 100%;
  min-height: 0;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

@media (max-width: 1194px) {
  .img-box {
    min-height: 280px;
    height: auto;
  }
}

.img-box img {
  display: block;
  object-fit: contain;
  max-width: 100%;
  max-height: 100%;
}

.col[data-kind-desktop="image"] .kind-text { display: none; }
.col[data-kind-desktop="text"] .kind-image { display: none; }

@media (min-width: 1920px) {
  .col[data-kind-bigdesktop="image"] .kind-text { display: none; }
  .col[data-kind-bigdesktop="image"] .kind-image { display: block; }
  .col[data-kind-bigdesktop="text"] .kind-image { display: none; }
  .col[data-kind-bigdesktop="text"] .kind-text { display: block; }
}

@media (max-width: 1194px) {
  .col[data-kind-tablet="image"] .kind-text { display: none; }
  .col[data-kind-tablet="image"] .kind-image { display: block; }
  .col[data-kind-tablet="text"] .kind-image { display: none; }
  .col[data-kind-tablet="text"] .kind-text { display: block; }
}

@media (max-width: 600px) {
  .col[data-kind-mobile="image"] .kind-text { display: none; }
  .col[data-kind-mobile="image"] .kind-image { display: block; }
  .col[data-kind-mobile="text"] .kind-image { display: none; }
  .col[data-kind-mobile="text"] .kind-text { display: block; }
}

.col .img-box[data-dev],
.col .text-subwrap[data-dev] {
  display: none;
}

.col .img-box[data-dev="desktop"],
.col .text-subwrap[data-dev="desktop"] {
  display: flex;
}

@media (min-width: 1920px) {
  .col .img-box[data-dev="bigDesktop"],
  .col .text-subwrap[data-dev="bigDesktop"] {
    display: flex;
  }

  .col .img-box[data-dev="desktop"],
  .col .text-subwrap[data-dev="desktop"] {
    display: none;
  }
}

@media (max-width: 1194px) {
  .col .img-box[data-dev="tablet"],
  .col .text-subwrap[data-dev="tablet"] {
    display: flex;
  }

  .col .img-box[data-dev="desktop"],
  .col .text-subwrap[data-dev="desktop"] {
    display: none;
  }
}

@media (max-width: 600px) {
  .col .img-box[data-dev="mobile"],
  .col .text-subwrap[data-dev="mobile"] {
    display: flex;
  }

  .col .img-box[data-dev="tablet"],
  .col .text-subwrap[data-dev="tablet"] {
    display: none;
  }
}

/* editor preview: force device */
html[data-editor-dev="bigDesktop"] .col .img-box[data-dev],
html[data-editor-dev="bigDesktop"] .col .text-subwrap[data-dev],
html[data-editor-dev="desktop"] .col .img-box[data-dev],
html[data-editor-dev="desktop"] .col .text-subwrap[data-dev],
html[data-editor-dev="tablet"] .col .img-box[data-dev],
html[data-editor-dev="tablet"] .col .text-subwrap[data-dev],
html[data-editor-dev="mobile"] .col .img-box[data-dev],
html[data-editor-dev="mobile"] .col .text-subwrap[data-dev] {
  display: none !important;
}

html[data-editor-dev="bigDesktop"] .col .img-box[data-dev="bigDesktop"],
html[data-editor-dev="bigDesktop"] .col .text-subwrap[data-dev="bigDesktop"],
html[data-editor-dev="desktop"] .col .img-box[data-dev="desktop"],
html[data-editor-dev="desktop"] .col .text-subwrap[data-dev="desktop"],
html[data-editor-dev="tablet"] .col .img-box[data-dev="tablet"],
html[data-editor-dev="tablet"] .col .text-subwrap[data-dev="tablet"],
html[data-editor-dev="mobile"] .col .img-box[data-dev="mobile"],
html[data-editor-dev="mobile"] .col .text-subwrap[data-dev="mobile"] {
  display: flex !important;
}
