/* 官网首页（.is-portal）：绸缎舞台 + 城市索引。
   只用 front-theme.css 的纸白、墨色与品牌酒红，字体与图形都由排印本身承担。 */
.is-portal .page-shell { padding-top: clamp(14px, 1.6vw, 24px); }

/* ---------- 品牌字：内联 SVG 轮廓，静态显示 ---------- */
.is-portal .brand-text { display: flex; align-items: center; }
.is-portal .brand-mark {
  display: block;
  height: clamp(17px, 1.9vw, 22px);
  width: auto;
  overflow: visible;
}
.is-portal .brand-mark path { fill: currentColor; }
.is-portal .brand-mark-latin path { color: rgba(43, 35, 32, .58); }

/* ---------- 舞台 ---------- */
.is-portal .portal-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: clamp(520px, 72vh, 720px);
  padding: clamp(64px, 9vw, 112px) clamp(24px, 6vw, 96px);
  border-radius: 26px;
  background-color: #f4ebe2;
  /* 绸带相结的意象图 + 左侧纸白渐层，把文字区留干净。 */
  background-image:
    linear-gradient(100deg, rgba(250, 246, 241, .96) 0%, rgba(250, 246, 241, .9) 46%, rgba(250, 246, 241, .6) 66%, rgba(250, 246, 241, 0) 84%),
    url("/static/portal-hero.jpg");
  background-size: cover, cover;
  background-position: center, 62% center;
  background-repeat: no-repeat;
  box-shadow: 0 30px 70px -52px rgba(60, 42, 38, .5);
  color: var(--text);
  text-align: center;
  overflow: hidden;
  isolation: isolate;
}
/* 指针跟光：坐标由 home.js 写入，触摸与减少动态效果时停在中间。 */
.is-portal .portal-stage-glow {
  position: absolute;
  inset: -20%;
  z-index: 0;
  background: radial-gradient(circle at var(--gx, 50%) var(--gy, 42%), rgba(255, 255, 255, .6), rgba(255, 255, 255, 0) 48%);
  opacity: .7;
  transition: opacity .4s ease;
}
.is-portal .portal-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: radial-gradient(140% 120% at 88% 92%, rgba(90, 52, 48, .1), transparent 58%);
  pointer-events: none;
}
.is-portal .portal-stage-inner {
  position: relative;
  z-index: 2;
  max-width: 980px;
}
.is-portal .portal-stage h1 {
  margin: 0;
  color: #241e1c;
  font-family: "Songti SC", "Noto Serif CJK SC", "Noto Serif SC", serif;
  font-size: clamp(38px, 6.2vw, 88px);
  font-weight: 600;
  line-height: 1.16;
  letter-spacing: -.02em;
}
.is-portal .portal-stage-line {
  margin: clamp(20px, 2.6vw, 30px) 0 0;
  color: rgba(43, 35, 32, .62);
  font-size: clamp(13px, 1.1vw, 15px);
  letter-spacing: .04em;
}
.is-portal .portal-stage-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: clamp(14px, 2vw, 28px);
  margin-top: clamp(30px, 4vw, 46px);
}
.is-portal .portal-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 32px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .02em;
  text-decoration: none;
  box-shadow: 0 16px 30px -18px rgba(93, 42, 47, .7);
  transition: transform .3s cubic-bezier(.22, .61, .36, 1), background-color .3s ease;
}
.is-portal .portal-cta:hover { transform: translateY(-2px); background: var(--accent-strong); }
.is-portal .portal-cta-quiet {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(43, 35, 32, .62);
  font-size: 14px;
  text-decoration: none;
  transition: color .25s ease;
}
.is-portal .portal-cta-quiet span { font-size: 13px; transition: transform .3s ease; }
.is-portal .portal-cta-quiet:hover { color: var(--accent-strong); }
.is-portal .portal-cta-quiet:hover span { transform: translateY(3px); }
.is-portal .portal-stage-rule {
  position: absolute;
  bottom: clamp(22px, 3vw, 34px);
  left: 50%;
  z-index: 2;
  width: 1px;
  height: 46px;
  background: linear-gradient(180deg, rgba(43, 35, 32, 0), rgba(43, 35, 32, .34));
  animation: portal-rule 2.6s ease-in-out infinite;
}

/* 首屏入场：JS 可用时逐行落位。 */
.is-portal .reveal { opacity: 0; }
.is-portal .reveal.is-in {
  animation: portal-in .9s cubic-bezier(.22, .61, .36, 1) forwards;
  animation-delay: calc(var(--d, 0) * 120ms);
}
@keyframes portal-in {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}
@keyframes portal-rule {
  0%, 100% { opacity: .2; transform: scaleY(.6); transform-origin: top; }
  50% { opacity: .8; transform: scaleY(1); transform-origin: top; }
}

/* ---------- 城市索引 ---------- */
.is-portal .portal-cities { padding: clamp(44px, 5.4vw, 76px) 0 clamp(20px, 2.4vw, 32px); }
.is-portal .portal-cities-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px 40px;
  padding-bottom: clamp(20px, 2.6vw, 30px);
  border-bottom: 1px solid var(--line);
}
.is-portal .portal-cities-title { display: flex; align-items: baseline; gap: 14px; }
.is-portal .portal-cities-head h2 {
  margin: 0;
  color: var(--text);
  font-size: clamp(28px, 3.4vw, 44px);
  font-weight: 600;
  letter-spacing: -.01em;
}
/* 城市总数改成标题右侧的小标记，不再另起一行说明。 */
.is-portal .portal-cities-count {
  padding: 4px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: .04em;
  white-space: nowrap;
}
/* 搜索在页头右侧，替代原来的「城市」入口。 */
.is-portal .portal-search { flex: 0 0 auto; width: clamp(140px, 14vw, 190px); }
.is-portal .portal-search input {
  width: 100%;
  height: 34px;
  padding: 0 2px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  outline: none;
  transition: border-color .25s ease;
}
.is-portal .portal-search input::placeholder { color: #a99f97; }
.is-portal .portal-search input:focus { border-color: var(--accent); }
.is-portal .portal-search input::-webkit-search-cancel-button { -webkit-appearance: none; }

/* 省份横向标签：同时只展开一个，其余城市全部隐藏。 */
.is-portal .portal-tabs-nav {
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(0, 1fr) minmax(0, auto);
  align-items: center;
  gap: 0;
  padding: clamp(14px, 1.8vw, 20px) 0 clamp(6px, 1vw, 10px);
}
/* 省份多到放不下时出现的左右翻页钮，窄屏才显示。 */
.is-portal .portal-tabs-arrow {
  display: none;
  place-items: center;
  width: 30px;
  height: 30px;
  margin: 0 7px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: #6d635c;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color .2s ease, border-color .2s ease;
}
.is-portal .portal-tabs-arrow:not([hidden]) { display: grid; }
/* 隐藏的一端不参与自动排布，必须显式指定列，否则右侧箭头会被挤出版心。 */
.is-portal .portal-tabs-arrow.is-prev { grid-column: 1; }
.is-portal .portal-tabs { grid-column: 2; }
.is-portal .portal-tabs-arrow.is-next { grid-column: 3; }
.is-portal .portal-tabs-arrow svg { width: 16px; height: 16px; }
.is-portal .portal-tabs-arrow:hover { color: var(--accent-strong); border-color: #c8aaa9; }
.is-portal .portal-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 4px;
  min-width: 0;
}
/* 搜索时整个标签行让位给结果，hidden 必须压过 display: flex。 */
.is-portal .portal-tabs[hidden],
.is-portal .portal-tabs-nav[hidden] { display: none; }
.is-portal .portal-tab {
  padding: 8px 13px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.2;
  cursor: pointer;
  transition: color .2s ease, background-color .2s ease;
}
.is-portal .portal-tab:hover { color: var(--accent); background: rgba(119, 59, 64, .06); }
.is-portal .portal-tab.is-active { background: var(--accent); color: #fff; }
.is-portal .portal-panels { padding: clamp(18px, 2.4vw, 28px) 0 clamp(20px, 2.6vw, 30px); }
.is-portal .portal-panels.is-tabs .portal-panel { display: none; }
.is-portal .portal-panels.is-tabs .portal-panel.is-active { display: block; animation: portal-fade .35s ease both; }
.is-portal .portal-panels.is-search .portal-panel { display: none; }
.is-portal .portal-panels.is-search .portal-panel.is-match { display: block; }
.is-portal .portal-panel { min-height: clamp(96px, 9vw, 120px); }
/* 搜索结果多少就是多少，不再为对齐留白。 */
.is-portal .portal-panels.is-search .portal-panel { min-height: 0; }
.is-portal .portal-panel-name {
  display: none;
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 12px;
  letter-spacing: .14em;
}
.is-portal .portal-panels.is-search .portal-panel-name { display: block; }
.is-portal .portal-panels.is-search .portal-panel + .portal-panel { margin-top: 22px; }
.is-portal .portal-panel-links { display: flex; flex-wrap: wrap; gap: 8px; }
.is-portal .portal-panel-links a {
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #4c453f;
  font-size: 14px;
  text-decoration: none;
  transition: border-color .22s ease, background-color .22s ease, color .22s ease, transform .22s ease;
}
.is-portal .portal-panel-links a:hover {
  border-color: #c8aaa9;
  background: var(--accent-tint);
  color: var(--accent-strong);
  transform: translateY(-1px);
}
.is-portal .portal-panel-links a.is-quiet { color: #a99f97; }
.is-portal .portal-panels:not(.is-tabs):not(.is-search) .portal-panel + .portal-panel {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.is-portal .portal-index-empty { margin: 22px 0 0; color: var(--muted); font-size: 13px; }

/* 滚动入场（仅 JS 添加类名后生效，禁用脚本时全部可见）。 */
.is-portal .js-reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .8s ease, transform .8s cubic-bezier(.22, .61, .36, 1);
}
.is-portal .js-reveal.is-in { opacity: 1; transform: none; }

/* ---------- 页脚 ---------- */
.is-portal .site-footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 32px;
  padding-bottom: 18px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.is-portal .site-footer-legal,
.is-portal .site-footer-contact { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.is-portal .site-footer-contact { color: var(--muted); font-size: 13px; }
.is-portal .site-footer-nav a { color: var(--muted); font-size: 13px; }
.is-portal .site-footer-nav a:hover { color: var(--accent); }

/* ---------- 响应式 ---------- */
@media (max-width: 760px) {
  .is-portal .portal-stage {
    min-height: 68vh;
    border-radius: 20px;
    padding: clamp(48px, 12vw, 72px) 22px clamp(56px, 14vw, 80px);
    /* 窄屏只取绸结附近一小块，压白一些保证大字可读。 */
    background-image:
      linear-gradient(180deg, rgba(250, 246, 241, .9) 0%, rgba(250, 246, 241, .74) 46%, rgba(250, 246, 241, .6) 100%),
      url("/static/portal-hero.jpg");
    background-position: center, 70% center;
  }
  .is-portal .portal-stage-rule { height: 34px; }
  .is-portal .portal-cities-head { align-items: flex-start; }
  /* 窄屏省份标签改成一行横滑，避免 34 个省占掉半屏。 */
  .is-portal .portal-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 12px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 26px), transparent 100%);
    mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 26px), transparent 100%);
  }
  .is-portal .portal-tabs::-webkit-scrollbar { display: none; }
  .is-portal .portal-tab { flex: 0 0 auto; }
  .is-portal .portal-search { width: 108px; }
  .is-portal .portal-search input { font-size: 12px; }
  .is-portal .portal-cta { width: 100%; }
  .is-portal .portal-stage-actions { gap: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .is-portal .portal-cta,
  .is-portal .portal-panel-links a,
  .is-portal .portal-tab { transition: none; }
  .is-portal .portal-cta:hover { transform: none; }
  .is-portal .portal-stage-rule { animation: none; opacity: .5; }
  .is-portal .reveal { opacity: 1; }
  .is-portal .reveal.is-in { animation: none; }
  .is-portal .js-reveal { opacity: 1; transform: none; transition: none; }
  .is-portal .portal-panels.is-tabs .portal-panel.is-active { animation: none; }
}

@keyframes portal-fade {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: none; }
}
