.kbmb-write-focus{
  position: relative;
}

.kbmb-write-focus__inline-slot{
  width: 100%;
}

.kbmb-write-focus__shell{
  width: 100%;
}

.kbmb-write-focus__shell .kbmb-textarea{
  cursor: text;
}

.kbmb-write-focus__overlay[hidden]{
  display: none !important;
}

.kbmb-write-focus__overlay{
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
  padding: clamp(18px, 3vh, 28px) clamp(20px, 4vw, 40px);
}

.kbmb-write-focus__backdrop{
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(circle at top center, rgba(214, 186, 120, 0.06), rgba(214, 186, 120, 0) 34%),
    linear-gradient(180deg, rgba(16, 24, 37, 0.46), rgba(14, 22, 34, 0.62));
  -webkit-backdrop-filter: blur(9px);
  backdrop-filter: blur(9px);
}

.kbmb-write-focus__dialog{
  position: relative;
  z-index: 1;
  isolation: isolate;
  width: min(1180px, calc(100vw - 56px));
  max-height: none;
  margin: auto 0;
}

.kbmb-write-focus__paper{
  position: relative;
  z-index: 2;
  width: min(960px, 100%);
  min-height: min(86vh, 1120px);
  margin: 0 auto;
  padding: clamp(42px, 4.8vw, 58px) clamp(44px, 5.4vw, 68px) clamp(104px, 10vh, 128px);
  border-radius: 28px;
  border: 1px solid rgba(189, 171, 129, 0.24);
  background:
    linear-gradient(180deg, rgba(255,255,255,1) 0%, rgba(252,249,242,0.998) 100%);
  box-shadow:
    0 34px 82px rgba(7, 11, 21, 0.36),
    0 14px 30px rgba(7, 11, 21, 0.2);
  overflow: hidden;
}

.kbmb-write-focus__paper,
.kbmb-write-focus__paper *{
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  filter: none !important;
}

.kbmb-write-focus__paper::before{
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top center, rgba(214, 186, 120, 0.12), rgba(214, 186, 120, 0) 34%),
    linear-gradient(180deg, rgba(58,76,112,0.02), rgba(58,76,112,0) 22%);
  pointer-events: none;
}

.kbmb-write-focus__message{
  position: relative;
  z-index: 1;
  max-width: 520px;
  margin: 0 auto 34px;
  text-align: center;
  font-family: "Cormorant Garamond", "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-size: clamp(31px, 3.2vw, 44px);
  line-height: 1.18;
  font-weight: 500;
  color: #55637d;
  letter-spacing: 0.01em;
  text-wrap: balance;
}

.kbmb-write-focus__overlay-slot{
  position: relative;
  z-index: 1;
  min-height: min(66vh, 820px);
}

.kbmb-write-focus__overlay-slot .kbmb-write-focus__shell{
  display: flex;
  min-height: inherit;
}

.kbmb-write-focus__overlay-slot .kbmb-textarea{
  width: 100%;
  min-height: inherit;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #22314d;
  font-family: "Iowan Old Style", Baskerville, "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-size: clamp(19px, 1.85vw, 24px);
  line-height: 1.9;
  letter-spacing: 0.005em;
  resize: none;
}

.kbmb-write-focus__overlay-slot .kbmb-textarea::placeholder{
  color: rgba(86, 102, 129, 0.74);
  font-family: "Iowan Old Style", Baskerville, "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-style: italic;
}

.kbmb-write-focus__overlay-slot .kbmb-textarea:focus{
  outline: none;
  box-shadow: none;
}

.kbmb-write-focus__close{
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 4;
  min-height: 0;
  min-width: 0;
  padding: 8px 16px;
  font-size: 13px;
  line-height: 1.15;
  font-weight: 600;
  cursor: pointer;
}

.kbmb-write-focus__close:hover,
.kbmb-write-focus__close:focus-visible{
  transform: translateY(-1px);
  outline: none;
}

.kbmb-write-focus__actions{
  position: absolute;
  right: clamp(34px, 4.2vw, 48px);
  bottom: clamp(28px, 4.2vh, 38px);
  z-index: 4;
  display: flex;
  justify-content: flex-end;
}

.kbmb-write-focus__return{
  min-width: 220px;
}

.kbmb-write-focus__close,
.kbmb-write-focus__return{
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.74), rgba(255, 255, 255, 0.54)) !important;
  background-color: transparent !important;
  background-image: none !important;
  color: #56687b !important;
  border: 1px solid rgba(255, 255, 255, 0.48) !important;
  border-radius: 999px !important;
  box-shadow:
    0 0 0 1px rgba(212, 175, 55, 0.12),
    0 0 24px rgba(212, 175, 55, 0.18),
    0 8px 18px rgba(0, 0, 0, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.54) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  text-decoration: none !important;
  filter: none !important;
  opacity: 1 !important;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.34);
}

.kbmb-write-focus__close:hover,
.kbmb-write-focus__return:hover{
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.62)) !important;
  background-color: transparent !important;
  background-image: none !important;
  color: #d4af37 !important;
  border-color: rgba(255, 255, 255, 0.56) !important;
  box-shadow:
    0 0 0 1px rgba(212, 175, 55, 0.16),
    0 0 30px rgba(212, 175, 55, 0.24),
    0 10px 20px rgba(0, 0, 0, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.60) !important;
}

.kbmb-write-focus__close:active,
.kbmb-write-focus__return:active{
  transform: translateY(0);
  box-shadow:
    0 0 0 1px rgba(212, 175, 55, 0.12),
    0 0 18px rgba(212, 175, 55, 0.16),
    0 8px 18px rgba(0, 0, 0, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.54) !important;
}

body.kbmb-write-focus-open{
  overflow: hidden;
}

@media (min-width: 700px) and (max-height: 900px){
  .kbmb-write-focus__paper{
    min-height: auto;
    padding-bottom: clamp(88px, 12vh, 112px);
  }

  .kbmb-write-focus__overlay-slot{
    min-height: min(48vh, 440px);
  }
}

@media (max-width: 599px){
  .kbmb-write-focus__overlay{
    display: none;
  }
}

@media (min-width: 600px){
  .kbmb-write-focus[data-kbmb-write-focus-enabled="1"] .kbmb-write-focus__shell{
    cursor: text;
  }
}
