html {
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
}

.app-section-ch7on {
  background: #fff;
}

.app-bg-ch7on {
  background-image: url("../../img/banner_ch7app-2.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

img.hd-logo {
  width: 64px;
  height: auto;
  padding-top: 6px;
}

img.hd-logo._mobile {
  width: 48px;
}

.main-nav-area .nav {
  padding-left: 16px;
}

.share-icon {
  background: url(https://static.ch7on.com/images/theme2018/social-icon.png) no-repeat scroll center center transparent;
  display: inline-block;
  height: 40px;
  width: 40px;
  transition: all 0.3s ease;
  margin-left: 10px;
}

.fb {
  background-position: 0 0;
}

.tw {
  background-position: -55px 0 !important;
}

.tw:hover {
  background-position: -55px -40px !important;
}

.app-section,
.app-section * {
  box-sizing: border-box;
}

.app-section {
  position: relative;
  width: 100%;
  height: 633px;
  overflow: hidden;
}

.app-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.app-bg-cover {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.app-inner {
  position: absolute;
  top: 0;
  left: 50%;
  width: 1440px;
  height: 633px;
  z-index: 10;
  transform: translateX(-50%);
  transform-origin: top center;
}

.app-logo-box {
  position: absolute;
  left: 89px;
  top: 134px;
  width: 141px;
  height: 141px;
}

.app-logo-box img {
  width: 141px;
  height: auto;
  object-fit: contain;
}

.app-main {
  position: absolute;
  left: 89px;
  top: 292px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  min-width: 513px;
  max-width: 520px;
}

.app-text {
  width: 100%;
  padding: 14px 18px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 24px rgba(16, 24, 40, 0.1);
}

#ch7on .app-text .lbl {
  font-family: "Inter", sans-serif;
  font-size: 12px;
  font-weight: 500;
  line-height: normal;
  color: #667085;
  margin-bottom: 4px;
}

#ch7on .app-text .nm {
  font-family: "Inter", sans-serif;
  font-size: 20px;
  font-weight: 600;
  line-height: normal;
  color: #101828;
  margin-bottom: 8px;
}

#ch7on .app-text .dc {
  font-family: "Inter", "Noto Sans Thai", sans-serif;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
  color: #344054;
  max-width: none;
  white-space: normal;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

#ch7on .app-text .dc .app-desc-line {
  display: block;
}

.app-stores {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 12px;
  width: 100%;
  max-width: 513px;
}

.app-stores a {
  display: block;
  line-height: 0;
}

.app-stores a img {
  display: block;
  height: 48px;
  width: auto;
  object-fit: contain;
  transition: opacity 0.2s;
}

.app-stores a:hover img {
  opacity: 0.85;
}

/* ===== LEGACY APP SECTIONS (TSM) ===== */
.app-section-legacy .app-logo-box {
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.app-section-legacy .app-main {
  position: absolute;
  left: 89px;
  top: 292px;
  z-index: 2;
}

.app-section-legacy .app-text {
  width: 100%;
  max-width: 520px;
}

.app-section-legacy .app-text .lbl {
  font-family: "Inter", sans-serif;
  font-size: 12px;
  font-weight: 500;
  line-height: normal;
  color: #667085;
  margin-bottom: 4px;
}

.app-section-legacy .app-text .nm {
  font-family: "Inter", sans-serif;
  font-size: 20px;
  font-weight: 600;
  line-height: normal;
  color: #101828;
  margin-bottom: 8px;
}

.app-section-legacy .app-text .dc {
  font-family: "Inter", "Noto Sans Thai", sans-serif;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
  color: #344054;
  max-width: none;
  white-space: normal;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.app-section-legacy .app-stores {
  width: 100%;
  max-width: 513px;
}

.app-section-legacy .app-devices {
  position: absolute;
  left: 723px;
  top: 36px;
  width: 635px;
  height: 568px;
  overflow: hidden;
}

.app-section-legacy .mockup-ipad {
  position: absolute;
  left: 241px;
  top: 2px;
  width: 388px;
  height: 561px;
  object-fit: cover;
}

.app-section-legacy .mockup-phone {
  position: absolute;
  left: 7px;
  top: 151px;
  width: 205px;
  height: 412px;
  object-fit: cover;
}

@media (max-width: 1439px) and (min-width: 993px) {
  .app-section {
    height: 633px;
  }

  .app-inner {
    transform: translateX(-50%) scale(0.999);
  }
}

@media (max-width: 1366px) and (min-width: 993px) {
  .app-section {
    height: 601px;
  }

  .app-inner {
    transform: translateX(-50%) scale(0.949);
  }
}

@media (max-width: 1280px) and (min-width: 993px) {
  .app-section {
    height: 563px;
  }

  .app-inner {
    transform: translateX(-50%) scale(0.889);
  }
}

@media (max-width: 1180px) and (min-width: 993px) {
  .app-section {
    height: 519px;
  }

  .app-inner {
    transform: translateX(-50%) scale(0.819);
  }
}

@media (max-width: 1080px) and (min-width: 993px) {
  .app-section {
    height: 475px;
  }

  .app-inner {
    transform: translateX(-50%) scale(0.75);
  }
}

@media (max-width: 992px) {
  .app-main {
    min-width: 0;
  }

  .app-section {
    min-height: 0;
    height: auto;
    padding: 0;
  }

  #ch7on .app-inner {
    position: relative;
    width: 100%;
    height: auto;
    min-height: 620px;
    padding: 48px 40px 56px;
    transform: none;
    left: 0;
  }

  #ch7on .app-logo-box {
    position: relative;
    left: 0;
    top: 0;
    width: 116px;
    height: 116px;
    margin-bottom: 16px;
  }

  #ch7on .app-logo-box img {
    width: 116px;
  }

  #ch7on .app-main {
    position: relative;
    top: 0;
    left: 0;
    max-width: 100%;
  }

  #ch7on .app-stores {
    max-width: 100%;
  }

  #ch7on .app-stores a img {
    width: 142px;
    height: auto;
  }

  .app-section-legacy .app-inner {
    position: relative;
    width: 100%;
    height: auto;
    min-height: 620px;
    padding: 48px 40px 56px;
    transform: none;
    left: 0;
    display: grid;
    grid-template-columns: minmax(230px, 38%) 1fr;
    grid-template-areas:
      "logo devices"
      "main devices";
    column-gap: 28px;
    align-content: center;
  }

  .app-section-legacy .app-main {
    position: relative;
    left: 0;
    top: 0;
    grid-area: main;
    max-width: 100%;
  }

  .app-section-legacy .app-logo-box {
    position: relative;
    left: 0;
    top: 0;
    grid-area: logo;
    width: 116px;
    height: 116px;
    border-radius: 16px;
    margin-bottom: 16px;
  }

  .app-section-legacy .app-logo-box img {
    width: 116px;
  }

  .app-section-legacy .app-text {
    max-width: 100%;
  }

  .app-section-legacy .app-text .dc {
    max-width: 360px;
  }

  .app-section-legacy .app-stores {
    max-width: 100%;
    flex-wrap: wrap;
  }

  .app-section-legacy .app-stores a img {
    width: 142px;
    height: auto;
  }

  .app-section-legacy .app-devices {
    position: absolute;
    grid-area: devices;
    left: auto;
    right: 24px;
    top: 46px;
    width: 100%;
    max-width: 420px;
    height: 520px;
    overflow: visible;
  }

  .app-section-legacy .mockup-ipad {
    left: auto;
    right: 0;
    top: 0;
    width: 282px;
    height: auto;
  }

  .app-section-legacy .mockup-phone {
    left: 30px;
    top: 138px;
    width: 150px;
    height: auto;
  }
}

@media (max-width: 860px) {
  #ch7on .app-inner {
    min-height: 760px;
    padding: 36px 24px 46px;
  }

  #ch7on .app-text .dc {
    line-height: 1.55;
  }

  .app-section-legacy .app-inner {
    min-height: 760px;
    padding: 36px 24px 46px;
    display: block;
  }

  .app-section-legacy .app-logo-box {
    margin-bottom: 16px;
  }

  .app-section-legacy .app-text {
    max-width: 100%;
  }

  .app-section-legacy .app-text .dc {
    max-width: 100%;
    line-height: 1.55;
  }

  .app-section-legacy .app-stores {
    max-width: 328px;
    margin-bottom: 26px;
  }

  .app-section-legacy .app-devices {
    position: relative;
    right: auto;
    top: auto;
    max-width: 390px;
    height: 430px;
    margin: 8px auto 0;
  }

  .app-section-legacy .mockup-ipad {
    right: 0;
    width: min(64vw, 250px);
  }

  .app-section-legacy .mockup-phone {
    left: 0;
    top: 112px;
    width: min(35vw, 136px);
  }
}

@media (max-width: 639px) {
  #ch7on .app-text,
  .app-section-legacy .app-text {
    padding: 12px 10px;
  }

  #ch7on .app-text .dc .app-desc-line:first-child {
    white-space: nowrap;
  }
}

@media (max-width: 480px) {
  #ch7on .app-inner {
    min-height: 700px;
    padding: 30px 18px 40px;
  }

  #ch7on .app-logo-box {
    width: 96px;
    height: 96px;
  }

  #ch7on .app-logo-box img {
    width: 96px;
  }

  #ch7on .app-stores {
    flex-wrap: wrap;
    gap: 8px;
    max-width: 100%;
  }

  #ch7on .app-stores a img {
    width: 150px;
    height: auto;
  }

  .app-section-legacy .app-inner {
    min-height: 700px;
    padding: 30px 18px 40px;
  }

  .app-section-legacy .app-logo-box {
    width: 96px;
    height: 96px;
    border-radius: 14px;
  }

  .app-section-legacy .app-logo-box img {
    width: 96px;
  }

  .app-section-legacy .app-stores {
    width: 100%;
    max-width: 338px;
    gap: 8px;
  }

  .app-section-legacy .app-stores a img {
    width: 150px;
  }

  .app-section-legacy .app-devices {
    height: 356px;
    max-width: 324px;
  }

  .app-section-legacy .mockup-ipad {
    width: min(68vw, 220px);
  }

  .app-section-legacy .mockup-phone {
    top: 98px;
    width: min(38vw, 116px);
  }
}
