.smile-sim-ad-modal,
.smile-sim-frame-modal {
  display: none;
  position: fixed;
  z-index: 999999;
}

.smile-sim-ad-modal.is-active {
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(36, 33, 29, 0.68);
  padding: 20px;
}

.smile-sim-ad-box {
  position: relative;
  width: min(540px, 94vw);
  background: #fffaf2;
  border: 1px solid #b7a58c;
  padding: 34px 28px;
  text-align: center;
  box-shadow: 0 24px 70px rgba(0,0,0,.28);
}

.smile-sim-ad-close {
  position: absolute;
  right: 12px;
  top: 10px;
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  color: #4d463f;
}

.smile-sim-ad-label {
  display: inline-block;
  border: 1px solid #a89172;
  color: #7c6a52;
  padding: 5px 14px;
  font-size: 12px;
  letter-spacing: .14em;
  margin-bottom: 14px;
}

.smile-sim-ad-box h2 {
  margin: 0 0 12px;
  color: #3c3935;
  font-size: 25px;
  line-height: 1.55;
}

.smile-sim-ad-box p {
  margin: 0 0 22px;
  color: #706961;
  line-height: 1.8;
}

.smile-sim-main-btn {
  width: 100%;
  border: 1px solid #3c3935;
  background: #3c3935;
  color: #fff;
  padding: 15px 18px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
}

.smile-sim-floating-btn {
  display: none;
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 999998;
  border: 1px solid #a89172;
  background: #3c3935;
  color: #fff;
  padding: 14px 12px;
  writing-mode: vertical-rl;
  letter-spacing: .08em;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(0,0,0,.22);
}

.smile-sim-floating-btn span {
  color: #d9c9ad;
  font-size: 12px;
  margin-bottom: 6px;
}

.smile-sim-frame-modal.is-active {
  display: flex;
  align-items: center;
  justify-content: center;

  inset: 0;

  background: rgba(0,0,0,.72);

  padding: 20px;
}

.smile-sim-frame-window {
  position: relative;

  width: min(1100px, 96vw);
  height: min(880px, 94vh);

  background: #fff;

  border: 1px solid #b7a58c;

  box-shadow: 0 28px 80px rgba(0,0,0,.34);
}

.smile-sim-frame-head {
  height: 48px;
  background: #3c3935;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px 0 18px;
}

.smile-sim-frame-head strong {
  font-size: 15px;
}

.smile-sim-frame-close {
  width: 38px;
  height: 38px;
  border: none;
  background: transparent;
  color: #fff;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}

.smile-sim-frame {
  width: 100%;
  height: calc(100% - 48px);
  border: none;
  display: block;
  background: #fff;
}

body.smile-sim-modal-open {
  overflow: hidden;
}

@media (max-width: 768px) {
  .smile-sim-ad-box {
    padding: 30px 20px;
  }

  .smile-sim-ad-box h2 {
    font-size: 20px;
  }

  .smile-sim-floating-btn {
    right: 14px;
    top: auto;
    bottom: 94px;
    transform: none;
    writing-mode: horizontal-tb;
    padding: 12px 14px;
    font-size: 13px;
  }

  .smile-sim-floating-btn span {
    display: none;
  }

  .smile-sim-frame-modal.is-active {
    left: 0;
    top: 0;
    transform: none;
    width: 100vw;
    height: 100dvh;
    border: none;
  }
}