html { scroll-behavior: smooth; max-width: 100%; overflow-x: hidden; }

body { max-width: 100%; overflow-x: hidden; }

.home { overflow-x: clip; }

button,
input,
select,
textarea { font: inherit; }

a { color: inherit; }

img { max-width: 100%; }

.home .container { width: 80%; max-width: none; padding: 0 var(--spacing-xxl); }
.companion-onboarding .container,
.login-page .container,
.dispatch-detail .container,
.component-test .container,
.site-map .container { width: min(1180px, calc(100% - 40px)); max-width: 1180px; }

.header-banner { min-height: 180px; overflow: hidden; position: relative; }
.header-banner > img { display: block; width: 100%; }
.header-banner::after { pointer-events: none; }

.link-item { cursor: pointer; }
.link-item:focus-visible,
.category-tab:focus-visible,
.anime-button:focus-visible { outline: 3px solid #667eea; outline-offset: 4px; }

.bottom-banner { text-align: center; overflow: hidden; padding: clamp(26px, 5vw, 70px) 20px; }
.bottom-banner img { display: block; width: 100%; }
.baofeng-notice { display: flex; align-items: flex-start; gap: clamp(20px, 4vw, 52px); width: min(1180px, 94%); margin: 0 auto; padding: clamp(22px, 4vw, 48px); background: linear-gradient(135deg, rgba(255,255,255,.96), rgba(238,234,255,.94)); border: 2px solid rgba(126,96,200,.2); border-radius: 30px; text-align: left; }
.baofeng-notice-mascot { position: sticky; top: 24px; width: clamp(150px, 20vw, 250px) !important; height: auto; aspect-ratio: 1; object-fit: contain; flex: 0 0 auto; margin-top: 36px; filter: drop-shadow(0 18px 25px rgba(75,49,135,.2)); }
.baofeng-notice-copy { flex: 1; min-width: 0; }
.baofeng-notice-kicker { margin: 0 0 4px; color: #7c63c6; font-weight: 800; letter-spacing: .12em; }
.baofeng-notice h2 { margin: 0 0 18px; color: #32254c; font-size: clamp(2rem, 3.5vw, 3.25rem); }
.baofeng-notice ol { margin: 0; padding-left: 1.6em; color: #594d6e; line-height: 1.75; }
.baofeng-notice-rules li { margin-bottom: .72em; padding-left: .25em; }
.baofeng-notice-rules li:last-child { margin-bottom: 0; }
.baofeng-notice-rules li::marker { color: #7c63c6; font-weight: 900; }
.wechat-search-panel { width: min(680px, 94%); margin: clamp(26px, 4vw, 46px) auto 0; }
.wechat-search-card { display: grid; grid-template-columns: 132px minmax(0, 1fr); align-items: center; gap: 20px; padding: 14px 22px 14px 14px; color: #fff; background: #07c160; border: 1px solid rgba(255,255,255,.65); border-radius: 10px; box-shadow: 0 14px 34px rgba(7,193,96,.24); }
.wechat-qr-frame { display: grid; place-items: center; padding: 7px; background: #fff; border-radius: 7px; }
.bottom-banner .wechat-search-qr { width: 116px; height: 116px; object-fit: contain; }
.wechat-search-copy { display: grid; gap: 10px; min-width: 0; }
.wechat-search-heading { display: flex; align-items: center; justify-content: center; gap: 12px; color: #fff !important; font-size: clamp(1.75rem, 4vw, 2.35rem); line-height: 1.1; }
.wechat-search-heading span { color: #fff !important; }
.wechat-bubbles { position: relative; display: inline-block; width: 54px; height: 38px; flex: 0 0 auto; }
.wechat-bubbles::before,
.wechat-bubbles::after { content: ''; position: absolute; display: block; background: #fff; border-radius: 50%; }
.wechat-bubbles::before { top: 0; left: 0; width: 36px; height: 29px; }
.wechat-bubbles::after { right: 0; bottom: 0; width: 30px; height: 24px; box-shadow: 0 0 0 3px #07c160; }
.wechat-search-term { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 5px 16px; color: #202020; background: #fff; border-radius: 7px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); font-size: clamp(1.3rem, 3vw, 1.8rem); text-align: left; }
.wechat-search-term strong { overflow-wrap: anywhere; }
.wechat-search-icon { position: relative; width: 20px; height: 20px; flex: 0 0 auto; border: 3px solid #8b8b8b; border-radius: 50%; box-sizing: border-box; }
.wechat-search-icon::after { content: ''; position: absolute; right: -7px; bottom: -5px; width: 9px; height: 3px; background: #8b8b8b; border-radius: 3px; transform: rotate(45deg); }
.wechat-search-panel figcaption { margin-top: 12px; color: #625574; font-size: .95rem; font-style: italic; }

/* Restore the archived footer's purple field and high-contrast white/yellow copy. */
.footer-info { color: #fff !important; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important; }
.footer-info .highlight-text,
.footer-info .service-features,
.footer-info .closing-text,
.footer-info .contact-value { color: #ffd700 !important; }
.footer-info .service-description,
.footer-info .vip-service,
.footer-info .contact-label { color: #fff !important; }
.footer-info .beian-link,
.footer-info .copyright-info,
.footer-info .interface-link { color: rgba(255,255,255,.78) !important; }

.rich-content img { display: block; width: auto; max-width: 100%; height: auto; margin: 18px auto; border-radius: 12px; }
.brand-media-frame { position: relative; display: block; width: max-content; max-width: 100%; margin: 18px auto; overflow: hidden; border-radius: 12px; box-shadow: 0 10px 34px rgba(71,49,119,.14); }
.brand-media-frame > img { margin: 0 auto; border-radius: 0; }
.brand-media-cover { position: absolute; top: 0; left: 0; right: 0; z-index: 3; display: flex; align-items: center; justify-content: center; gap: 14px; min-height: 180px; height: clamp(180px, 20vw, 260px); padding: 14px 24px; color: #2d2047; background: linear-gradient(135deg, #f9f3ff 0%, #e5dcff 53%, #e0f7ff 100%); border-bottom: 3px solid rgba(115,83,190,.24); box-sizing: border-box; pointer-events: none; }
.brand-media-cover > img { width: clamp(58px, 8vw, 96px); height: clamp(58px, 8vw, 96px); margin: 0; object-fit: contain; filter: drop-shadow(0 8px 14px rgba(68,43,127,.18)); }
.brand-media-cover span { display: grid; gap: 2px; text-align: left; }
.brand-media-cover b { font-size: clamp(1.35rem, 3.3vw, 2.7rem); line-height: 1; letter-spacing: .08em; }
.brand-media-cover small { color: #735daf; font-size: clamp(.72rem, 1.5vw, 1rem); font-weight: 700; }
.brand-media-stamp { position: absolute; z-index: 3; display: grid; place-items: center; min-width: 150px; min-height: 56px; padding: 8px 18px; color: #fff; background: linear-gradient(135deg, rgba(72,48,126,.96), rgba(126,91,199,.96)); border: 2px solid rgba(255,255,255,.76); border-radius: 18px; box-shadow: 0 8px 24px rgba(62,39,114,.2); font-weight: 900; letter-spacing: .08em; box-sizing: border-box; pointer-events: none; }
.brand-media-stamp.stamp-one { top: 47%; right: 2%; }
.brand-media-stamp.stamp-two { top: 72%; left: 2%; font-size: .76rem; }
.brand-media-footer { position: absolute; right: 0; bottom: 0; left: 0; z-index: 3; display: grid; place-items: center; min-height: 38px; padding: 6px 14px; color: #fff; background: linear-gradient(90deg, rgba(73,50,126,.96), rgba(120,90,189,.96)); font-size: clamp(.68rem, 1.4vw, .9rem); font-weight: 800; letter-spacing: .08em; box-sizing: border-box; pointer-events: none; }
.rich-content table { width: 100%; border-collapse: collapse; overflow: hidden; border-radius: 12px; }
.rich-content td,
.rich-content th { padding: 10px; border: 1px solid rgba(102, 126, 234, .16); }
.rich-content iframe,
.rich-content video { display: block; max-width: 100%; margin: 18px auto; }
.service-section-empty { min-height: 1px; }
.three-section-selector .category-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.three-section-selector .category-tab { width: 100%; min-width: 0; padding-right: 12px; padding-left: 12px; }
.two-section-selector .category-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.two-section-selector .category-tab { width: 100%; min-width: 0; }
.escort-price-display { overflow: hidden; padding: clamp(10px, 2vw, 20px); }
.escort-price-content { display: grid; place-items: center; }
.escort-price-content .escort-price-image { width: min(100%, 1024px); margin: 0 auto; border-radius: 18px; box-shadow: 0 12px 34px rgba(60, 39, 112, .14); }
.service-content-cleared { display: none; }
.merged-category-selector { display: grid; gap: 28px; }
.merged-tab-group { display: grid; gap: 14px; }
.merged-tab-group + .merged-tab-group { padding-top: 24px; border-top: 2px solid rgba(102,126,234,.16); }
.merged-tab-group h3 { margin: 0; color: #4c3b70; font-size: clamp(1.15rem, 2.4vw, 1.55rem); }
.merged-tab-group .category-tabs { gap: 10px; }
.merged-tab-group .category-tab { padding: 10px 16px; font-size: .92rem; }
.mobile-price-notice { display: grid; gap: 10px; padding: clamp(28px, 5vw, 46px); text-align: center; background: linear-gradient(135deg, rgba(255,255,255,.98), rgba(244,238,255,.96)); border: 2px solid rgba(126,96,200,.18); }
.mobile-price-notice p { margin: 0; color: #7659b9 !important; font-size: .95rem; font-weight: 800; letter-spacing: .12em; }
.mobile-price-notice strong { color: #33264b !important; font-size: clamp(1.25rem, 4vw, 2rem); line-height: 1.6; }
.mobile-price-notice b { display: inline-block; padding: 0 .28em; color: #ff5c8a !important; font-size: 1.2em; }

.interface-link { display: inline-block; margin-top: 16px; color: rgba(255,255,255,.78); font-size: .78rem; text-decoration: none; }
.interface-link:hover { color: #ffd700; }

.page-back { position: absolute; top: 24px; left: 24px; z-index: 5; text-decoration: none; }
.page-back.anime-button { display: inline-flex; align-items: center; gap: 8px; }

.static-notice { margin: 0 auto 20px; padding: 12px 18px; max-width: 900px; color: #5b4870; background: rgba(255,255,255,.72); border: 1px solid rgba(102,126,234,.18); border-radius: 14px; text-align: center; box-shadow: var(--shadow-sm); }

.form-container { padding: var(--spacing-xxl); background: rgba(255,255,255,.9); border-radius: var(--border-radius-xl); box-shadow: var(--shadow-lg); border: 2px solid rgba(255,154,158,.2); }
.upload-area { min-height: 150px; padding: 24px; text-align: center; }
.upload-trigger { appearance: none; border: 0; width: 100%; background: transparent; cursor: pointer; }
.uploaded-images { margin-top: 18px; }
.image-item img { width: 100%; height: 100%; object-fit: cover; }
.voice-recorder { padding: 22px; background: rgba(255,255,255,.72); border: 2px dashed rgba(102,126,234,.28); border-radius: 18px; }
.recording-status { min-height: 25px; margin-top: 10px; color: var(--text-light); }
.recording-status.active { color: #e74c3c; font-weight: 600; }
.form-message { display: none; margin-bottom: 20px; }
.form-message.visible { display: block; }
.results-section .table-container { box-shadow: var(--shadow-sm); }

.dispatch-detail { min-height: 100vh; }
.dispatch-detail .main-content { display: block; padding-bottom: 50px; }
.dispatch-section,
.applies-section,
.playmate-section,
.voice-submit-section { padding: 34px; margin-bottom: 30px; }
.customer-avatar { width: 68px; height: 68px; border-radius: 50%; background: var(--gradient-pink); display: grid; place-items: center; font-size: 30px; box-shadow: var(--shadow-md); }
.info-card-icon { font-size: 24px; margin-bottom: 8px; }
.info-card-value.highlight { color: #c471ed; font-weight: 700; }
.deadline-card,
.remark-card { margin-top: 18px; }
.deadline-content,
.remark-content { padding: 18px 20px; border-radius: 14px; background: rgba(255,255,255,.7); }
.remark-header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-weight: 700; }
.apply-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; }
.apply-card { padding: 18px; background: rgba(255,255,255,.82); border-radius: 18px; box-shadow: var(--shadow-sm); display: flex; gap: 14px; align-items: center; }
.apply-avatar { width: 70px; height: 70px; flex: 0 0 70px; border-radius: 50%; object-fit: cover; }
.mini-tag { display: inline-block; margin: 6px 4px 0 0; padding: 3px 8px; border-radius: 12px; background: rgba(102,126,234,.12); font-size: 12px; }
.login-prompt { padding: 32px; text-align: center; }
.login-prompt .login-icon { font-size: 44px; }
.login-prompt .anime-button { display: inline-block; margin-top: 18px; text-decoration: none; }
.login-error[hidden] { display: none; }
.playmate-photos .photo-container { height: 100%; }
.playmate-photos .photo-image { width: 100%; height: 100%; object-fit: cover; }
.voice-content { max-width: 760px; margin: 0 auto; }
.dispatch-submit-message { display: none; width: 100%; margin-bottom: 16px; }
.dispatch-submit-message.visible { display: block; }

.component-grid,
.site-map-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.component-panel,
.site-map-card { padding: 26px; }
.component-panel h2,
.site-map-card h2 { margin-bottom: 16px; }
.color-swatch-row { display: flex; flex-wrap: wrap; gap: 10px; }
.color-swatch { width: 62px; height: 62px; border-radius: 16px; box-shadow: var(--shadow-sm); }
.component-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.site-map { min-height: 100vh; padding-bottom: 60px; }
.site-map-list { list-style: none; display: grid; gap: 10px; }
.site-map-list a { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 12px 14px; background: rgba(255,255,255,.72); border-radius: 12px; text-decoration: none; transition: .25s ease; }
.site-map-list a:hover { transform: translateX(5px); background: white; box-shadow: var(--shadow-sm); }
.site-map-list a::after { content: '→'; color: #667eea; }
.map-category { grid-column: 1 / -1; }
.map-category h2 { margin-bottom: 18px; }
.product-map { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }

.toast { position: fixed; top: 20px; right: 20px; z-index: 10020; max-width: min(420px, calc(100% - 40px)); padding: 16px 20px; color: #fff; background: linear-gradient(135deg,#667eea,#764ba2); border-radius: 14px; box-shadow: var(--shadow-xl); transform: translateY(-130%); opacity: 0; transition: .35s ease; }
.toast.visible { transform: translateY(0); opacity: 1; }

.lightbox { position: fixed; inset: 0; z-index: 10010; display: none; place-items: center; padding: 30px; background: rgba(0,0,0,.9); }
.lightbox.open { display: grid; animation: fadeIn .25s ease both; }
.lightbox-stage { position: relative; max-width: 92vw; max-height: 86vh; overflow: hidden; border-radius: 12px; box-shadow: 0 20px 80px rgba(0,0,0,.5); }
.lightbox-stage > img { display: block; max-width: 92vw; max-height: 86vh; object-fit: contain; }
.lightbox-close { position: absolute; top: 22px; right: 28px; width: 44px; height: 44px; color: white; background: rgba(255,255,255,.16); border: 0; border-radius: 50%; font-size: 28px; cursor: pointer; }

.error-panel { max-width: 800px; margin: 80px auto; padding: 40px; text-align: center; }
.error-panel h1 { margin-bottom: 12px; }

@media (max-width: 768px) {
  .home .container { width: 90%; padding: 0 var(--spacing-sm); }
  .header-banner { min-height: 90px; padding: 0; }
  .baofeng-notice { flex-direction: column; text-align: center; }
  .baofeng-notice-mascot { position: static; width: min(180px, 55vw) !important; margin: 0 auto 4px; }
  .baofeng-notice-copy { width: 100%; }
  .baofeng-notice h2 { font-size: clamp(1.8rem, 9vw, 2.5rem); }
  .baofeng-notice ol { text-align: left; padding-left: 1.45em; line-height: 1.7; }
  .baofeng-notice-rules li { margin-bottom: .85em; padding-left: .15em; }
  .wechat-search-panel { width: min(100%, 560px); }
  .wechat-search-card { grid-template-columns: 92px minmax(0, 1fr); gap: 12px; padding: 10px 12px 10px 10px; }
  .bottom-banner .wechat-search-qr { width: 78px; height: 78px; }
  .wechat-search-heading { gap: 8px; font-size: clamp(1.15rem, 6vw, 1.55rem); }
  .wechat-bubbles { width: 38px; height: 28px; }
  .wechat-bubbles::before { width: 27px; height: 22px; }
  .wechat-bubbles::after { width: 22px; height: 18px; box-shadow: 0 0 0 2px #07c160; }
  .wechat-search-term { min-height: 38px; padding: 4px 10px; font-size: clamp(.92rem, 4.5vw, 1.15rem); }
  .wechat-search-icon { width: 16px; height: 16px; border-width: 2px; }
  .wechat-search-panel figcaption { font-size: .8rem; }
  .page-back { position: relative; top: auto; left: auto; margin: 12px 12px 0; }
  .page-back.anime-button { width: auto; }
  .dispatch-section,
  .applies-section,
  .playmate-section,
  .voice-submit-section { padding: 22px 18px; }
  .component-grid,
  .site-map-grid { grid-template-columns: 1fr; }
  .form-container { padding: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Keep below-the-fold sections cheap to render without changing their layout. */
.bottom-banner,
.footer-info { content-visibility: auto; contain-intrinsic-size: 700px; }
