:root {
  color: #111;
  background: #fff;
  font-family: Arial, "Microsoft YaHei", sans-serif;
  font-size: 16px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background: #fff;
}

a {
  color: inherit;
}

button {
  font: inherit;
}

.cms-site-header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 64px;
  padding: 0 28px;
  border-bottom: 1px solid #e5e5e5;
  background: #fff;
}

.cms-header-logo {
  position: absolute;
  left: 28px;
  display: flex;
  align-items: center;
  max-width: 132px;
  max-height: 40px;
}

.cms-header-logo img {
  display: block;
  max-width: 140px;
  max-height: 42px;
  object-fit: contain;
}

.cms-header-title {
  min-height: 1em;
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  text-align: center;
}

#cms-home {
  min-height: 1px;
  visibility: hidden;
}

#cms-home[data-cms-ready] {
  visibility: visible;
}

.cms-carousel,
.cms-sections {
  width: 100%;
}

.cms-carousel {
  position: relative;
  overflow: hidden;
  background: #f2f2f2;
}

.cms-slide {
  display: none;
  position: relative;
  width: 100%;
}

.cms-slide.is-active {
  display: block;
}

.cms-card-body {
  position: relative;
}

.cms-card-link-wrap {
  display: block;
  color: inherit;
  text-decoration: none;
}

.cms-media-frame {
  width: 100%;
  min-height: 360px;
  overflow: hidden;
  background: #f1f1f1;
}

.cms-media-frame.is-empty {
  display: none;
}

.cms-media-frame.media-failed {
  display: none;
}

.cms-carousel-card.media-failed .cms-card-body,
.cms-section-card.media-failed .cms-card-body {
  min-height: 0;
  height: auto;
  background: #fff;
}

.cms-carousel-card.media-failed .cms-content-block,
.cms-section-card.media-failed .cms-content-block {
  position: static;
  color: #111;
  background: #fff;
  text-shadow: none;
}

.cms-carousel-card.media-failed .cms-content-block p,
.cms-section-card.media-failed .cms-content-block p {
  color: #555;
}

.cms-media {
  display: block;
  width: 100%;
  min-height: 360px;
  object-fit: cover;
}

.cms-content-block {
  padding: 28px 7vw 34px;
  background: #fff;
}

.cms-carousel-card.has-media .cms-card-body {
  height: min(56.25vw, 760px);
  min-height: 420px;
  overflow: hidden;
  background: #f2f2f2;
}

.cms-carousel-card.has-media .cms-media-frame,
.cms-section-card.has-media .cms-media-frame {
  position: absolute;
  inset: 0;
  min-height: 100%;
}

.cms-carousel-card.has-media .cms-media,
.cms-section-card.has-media .cms-media {
  height: 100%;
  min-height: 100%;
}

.cms-carousel-card.has-media .cms-content-block,
.cms-section-card.has-media .cms-content-block {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
  color: #fff;
  background: rgba(0, 0, 0, .42);
  text-shadow: 0 1px 8px rgba(0, 0, 0, .7);
}

.cms-carousel-card.has-media .cms-content-block p,
.cms-section-card.has-media .cms-content-block p {
  color: inherit;
}

.cms-content-block h2,
.cms-content-block p {
  margin: 0 0 10px;
}

.cms-content-block h2 {
  font-size: clamp(22px, 3vw, 42px);
  line-height: 1.15;
}

.cms-content-block p {
  color: #555;
  line-height: 1.6;
}

.cms-subtitle {
  color: #666;
  font-size: 14px;
}

.cms-card-link {
  display: inline-block;
  margin-top: 8px;
  font-weight: 700;
  text-decoration: underline;
}

.cms-carousel-controls {
  position: absolute;
  right: 24px;
  bottom: 24px;
  display: flex;
  gap: 8px;
}

.cms-carousel-button {
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: #111;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.cms-sections {
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 0;
  padding: 0;
  background: #fff;
}

.cms-section-card {
  display: block;
  width: 100%;
  min-width: 0;
  background: #fff;
  overflow: hidden;
  border-top: 1px solid #e6e6e6;
}

.cms-section-card:first-child {
  border-top: 0;
}

.cms-section-card.has-media .cms-card-body {
  display: block;
  min-height: 0;
  overflow: hidden;
  background: #fff;
}

.cms-section-card.has-media.is-reversed .cms-card-body {
  display: block;
}

.cms-section-card.has-media.is-reversed .cms-media-frame {
  order: initial;
}

.cms-section-card.has-media.is-reversed .cms-content-block {
  order: initial;
}

.cms-section-card.has-media .cms-media-frame {
  position: relative;
  inset: auto;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  min-height: 0;
  background: #e9e9e9;
}

.cms-section-card.has-media .cms-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: fill;
}

.cms-section-card.has-media .cms-content-block {
  position: relative;
  inset: auto;
  padding: 24px 28px 30px;
  color: #111;
  background: #fff;
  text-shadow: none;
}

.cms-section-card.has-media .cms-content-block p {
  color: #555;
}

.cms-section-card.text-only .cms-card-body {
  max-width: 1120px;
  margin: 0 auto;
}

.cms-section-card.text-only .cms-content-block {
  padding: 72px 7vw;
  text-align: center;
}

.cms-contact {
  display: flex;
  width: 100%;
  min-height: 96px;
  align-items: center;
  justify-content: center;
  border-top: 1px solid #e6e6e6;
  background: #fff;
}

.cms-contact-link {
  display: inline-flex;
  min-width: 132px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
  border-radius: 999px;
  background: #111;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
}

.cms-contact-link:hover {
  background: #333;
}

.cms-side-contact {
  position: fixed;
  z-index: 10;
  top: 50%;
  right: 0;
  display: inline-flex;
  min-width: 42px;
  min-height: 132px;
  align-items: center;
  justify-content: center;
  padding: 12px 10px;
  border: 1px solid #111;
  border-right: 0;
  border-radius: 8px 0 0 8px;
  background: #111;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  writing-mode: vertical-rl;
  transform: translateY(-50%);
}

.cms-side-contact:hover {
  background: #333;
}

.cms-sound-overlay {
  position: fixed;
  z-index: 15;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, .48);
}

.cms-sound-dialog {
  width: min(100%, 380px);
  padding: 28px;
  background: #fff;
  box-shadow: 0 16px 48px rgba(0, 0, 0, .2);
}

.cms-sound-dialog h2 {
  margin: 0 0 10px;
  font-size: 20px;
}

.cms-sound-dialog p {
  margin: 0;
  color: #666;
  line-height: 1.6;
}

.cms-sound-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}

.cms-sound-actions button {
  min-height: 40px;
  padding: 0 18px;
  border: 1px solid #111;
  background: #fff;
  cursor: pointer;
}

.cms-sound-actions .cms-sound-enable {
  background: #111;
  color: #fff;
}

.cms-sound-actions button:hover {
  opacity: .78;
}

.cms-verification-overlay[hidden] {
  display: none;
}

.cms-verification-overlay {
  position: fixed;
  z-index: 20;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, .48);
}

.cms-verification-dialog {
  position: relative;
  width: min(100%, 360px);
  padding: 28px;
  background: #fff;
  box-shadow: 0 16px 48px rgba(0, 0, 0, .2);
}

.cms-verification-dialog h2 {
  margin: 0 0 20px;
  font-size: 20px;
}

.cms-cf-check {
  display: flex;
  min-height: 66px;
  align-items: center;
  gap: 11px;
  padding: 0 14px;
  border: 1px solid #d7d7d7;
  background: #fafafa;
  color: #222;
  cursor: pointer;
  user-select: none;
}

.cms-cf-check input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.cms-cf-box {
  position: relative;
  display: inline-grid;
  width: 27px;
  height: 27px;
  flex: 0 0 27px;
  place-items: center;
  border: 2px solid #777;
  background: #fff;
}

.cms-cf-check input:checked + .cms-cf-box {
  border-color: #2563eb;
}

.cms-cf-check input:checked + .cms-cf-box::after {
  width: 11px;
  height: 6px;
  border-bottom: 3px solid #2563eb;
  border-left: 3px solid #2563eb;
  content: '';
  transform: rotate(-45deg) translate(1px, -1px);
}

.cms-cf-check.is-loading {
  cursor: wait;
}

.cms-cf-check.is-loading .cms-cf-box {
  border: 0;
  border-radius: 50%;
  background: transparent;
}

.cms-cf-check.is-loading .cms-cf-box::after {
  display: none;
}

.cms-cf-check.is-loading .cms-cf-box::before {
  display: block;
  position: absolute;
  inset: 1px;
  width: auto;
  height: auto;
  border-radius: 50%;
  background: conic-gradient(from 0deg, #2563eb 0deg 52deg, transparent 52deg 78deg, #2563eb 78deg 130deg, transparent 130deg 156deg, #2563eb 156deg 208deg, transparent 208deg 234deg, #2563eb 234deg 286deg, transparent 286deg 312deg, #2563eb 312deg 360deg);
  content: '';
  animation: cms-cf-segment-spin .8s linear infinite;
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 0);
  mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 0);
  will-change: transform;
}

.cms-cf-brand {
  margin-left: auto;
  color: #6b7280;
  font-size: 11px;
}

@keyframes cms-cf-segment-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 759px) {
  .cms-side-contact {
    min-width: 38px;
    min-height: 116px;
    padding: 10px 8px;
    font-size: 13px;
  }

  .cms-sound-dialog { padding: 24px 20px; }
  .cms-sound-actions { flex-direction: column-reverse; }
  .cms-sound-actions button { width: 100%; }
}

.cms-puzzle-canvas {
  display: block;
  width: 100%;
  max-width: 320px;
  height: auto;
  margin: 0 auto;
  background: #eef1f4;
}

.cms-puzzle-track {
  position: relative;
  margin-top: 14px;
}

.cms-puzzle-label {
  display: block;
  margin-bottom: 4px;
  color: #666;
  font-size: 13px;
}

.cms-puzzle-range {
  display: block;
  width: 100%;
  accent-color: #111;
  cursor: grab;
}

.cms-puzzle-range:active {
  cursor: grabbing;
}

.cms-verification-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  font-size: 24px;
  cursor: pointer;
}

.cms-verification-check {
  display: flex;
  gap: 10px;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid #d5d5d5;
  cursor: pointer;
}

.cms-verification-message {
  min-height: 24px;
  margin: 12px 0 0;
  color: #c62828;
  font-size: 14px;
}

.cms-verification-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 12px;
}

.cms-verification-actions button {
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid #111;
  background: #fff;
  cursor: pointer;
}

.cms-verification-actions .cms-verification-submit {
  background: #111;
  color: #fff;
}

#cms-footer {
  border-top: 1px solid #e6e6e6;
  background: #f5f5f5;
}

.cms-footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 24px;
  padding: 36px 5vw;
}

.cms-footer-item h2,
.cms-footer-item p {
  margin: 0 0 10px;
}

.cms-footer-item h2 {
  font-size: 16px;
}

.cms-footer-item p {
  color: #555;
  line-height: 1.6;
}

.cms-footer-item a {
  font-weight: 700;
  text-decoration: underline;
}

@media (max-width: 759px) {
  .cms-site-header {
    height: 56px;
    padding: 0 16px;
  }

  .cms-header-logo {
    left: 16px;
    max-width: 96px;
  }

  .cms-header-logo img {
    max-width: 96px;
    max-height: 34px;
  }

  .cms-header-title {
    font-size: 19px;
  }

  .cms-media-frame,
  .cms-media {
    min-height: 260px;
  }

  .cms-carousel-card.has-media .cms-card-body {
    height: 125vw;
    min-height: 420px;
    max-height: 680px;
  }

  .cms-section-card.has-media .cms-card-body {
    min-height: 360px;
  }

  .cms-section-card.has-media .cms-card-body,
  .cms-section-card.has-media.is-reversed .cms-card-body {
    display: block;
    min-height: 0;
  }

  .cms-section-card.has-media .cms-media-frame {
    min-height: 0;
    height: auto;
    aspect-ratio: 4 / 3;
  }

  .cms-section-card.has-media .cms-content-block,
  .cms-section-card.text-only .cms-content-block {
    padding: 36px 20px 44px;
    text-align: left;
  }

  .cms-content-block {
    padding: 22px 20px 28px;
  }

  .cms-carousel-controls {
    right: 12px;
    bottom: 12px;
  }
}

@media (max-width: 759px) {
  .cms-sections {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
  }
}

/* Failed remote media falls back to the configured text without leaving an empty frame. */
.cms-carousel-card.has-media.media-failed .cms-card-body,
.cms-section-card.has-media.media-failed .cms-card-body {
  display: block;
  min-height: 0;
  height: auto;
  background: #fff;
}

.cms-carousel-card.has-media.media-failed .cms-content-block,
.cms-section-card.has-media.media-failed .cms-content-block {
  position: static;
  inset: auto;
  color: #111;
  background: #fff;
  text-shadow: none;
}

.cms-carousel-card.has-media.media-failed .cms-content-block p,
.cms-section-card.has-media.media-failed .cms-content-block p {
  color: #555;
}
