/* HNFL / Two editions of the same site. Native links carry the active edition. */
:root { --edition-ease:cubic-bezier(.22,.72,.23,1); }
.page-index .start-return{display:inline-flex;align-items:center;min-height:2.75rem;margin-left:1.1rem;font-size:.78rem;text-decoration:underline;text-underline-offset:.22em}
.edition-start-link{align-self:center;justify-self:end;display:inline-flex;align-items:center;min-height:2.75rem;padding:.42rem .7rem;font-size:.8rem;font-weight:750;white-space:nowrap;border:1px solid var(--line)}
.edition-start-link:hover{color:var(--signal)}
.edition-switch { display:flex; gap:1px; padding:1px; align-items:stretch; background:var(--line); }
.edition-switch a { display:flex; min-height:2.75rem; flex-direction:column; justify-content:center; padding:.35rem .7rem; color:var(--ink); background:var(--paper); white-space:nowrap; line-height:1.17; font-size:.83rem; font-weight:750; }
.edition-switch a small { font-family:ui-monospace,Consolas,monospace; font-size:.69rem; font-weight:500; text-transform:uppercase; letter-spacing:.08em; margin-top:.14rem; }
.edition-switch a[aria-current=page] { color:var(--paper);background:var(--ink); }
.edition-switch a:hover:not([aria-current=page]) { color:var(--signal); }
.page-index .shop-header { grid-template-columns:auto minmax(0,1fr) auto; gap:clamp(.8rem,2.5vw,2.35rem); }
.page-index .shop-nav { justify-content:flex-end; gap:clamp(.72rem,1.55vw,1.6rem); }
.page-index .shop-nav a { font-size:clamp(.67rem,.83vw,.81rem); }
.page-index .match-hero__body { width:100%; }
.page-index .match-hero__body .match-button + .match-button { margin-left:1.1rem; }
.page-index .match-hero__body .match-button { color:var(--signal); }
.page-index .match-hero__body .match-button:hover { color:var(--ink); }
.page-index .match-hero__figure { align-self:end; }

/* Day: editorial columns with a compact vertical featured index. */
.page-index:not(.theme-night) .match-hero { grid-template-columns:minmax(0,1.27fr) minmax(0,1fr); }
.page-index:not(.theme-night) .match-hero__figure { justify-self:end;width:min(100%,37rem); }
.page-index:not(.theme-night) .match-hero__media { height:clamp(25rem,66svh,46rem); }
.page-index:not(.theme-night) .field-layout__cards { display:block; }
.page-index:not(.theme-night) .field-card:last-child { border-bottom:1px solid var(--line); }
.page-index:not(.theme-night) .field-card figure { display:grid;grid-template-columns:clamp(6rem,14vw,13rem) minmax(0,1fr); gap:clamp(.75rem,3vw,3rem);align-items:center;padding:.65rem 0; }
.page-index:not(.theme-night) .field-card__media { aspect-ratio:1.65; }
.page-index:not(.theme-night) .field-card figcaption { grid-template-columns:auto 1fr auto; padding:0; }
.page-index:not(.theme-night) .field-card figcaption>small { grid-column:auto; }

/* Night pages share the same content and assets but keep the edition in their links. */
.theme-night,.page-index.theme-night {
 --paper:#0c172d;--ink:#f2f4ff;--line:#344661;--signal:#ff5664;--red:#ef4354;--white:#f2f4ff;--black:#081224;
 --night-raised:#101e36;--night-tile:#14243e;--night-muted:#b4c2db;
 background:var(--paper);color:var(--ink);color-scheme:dark;
}
.theme-night .page-shell,.theme-night .shop-header,.theme-night .mobile-nav nav,.theme-night .breadcrumb,.theme-night .catalog,.theme-night .catalog-toolbar,.theme-night .city-index,.theme-night .custom-builder,.theme-night .design-story,.theme-night .custom-products,.theme-night .news-longread,.theme-night .latest-news {background:var(--paper);color:var(--ink);border-color:var(--line)}
.theme-night .shop-nav a[aria-current=page],.theme-night .red-text,.theme-night .field-label{color:var(--signal)}
.theme-night .mobile-nav summary,.theme-night .lab-option,.theme-night .gallery-options label { border-color:var(--line); }
.theme-night .mobile-nav[open] summary,.theme-night .lab-option:has(input:checked),.theme-night .gallery-options label:has(input:checked) { background:var(--ink);color:var(--paper); }
.theme-night .mobile-nav [aria-current=page]{color:var(--signal)}
.theme-night .city-index a{background:var(--night-tile);color:var(--ink)}
.theme-night .product-image,.theme-night .product-gallery-main,.theme-night .city-detail-products img{background:var(--night-tile)}
.theme-night .product-code{background:var(--white);color:var(--paper)}
.theme-night .product-info p,.theme-night .product-index,.theme-night .product-price-row,.theme-night .kit-frame figcaption,.theme-night .lab-note,.theme-night .design-story p,.theme-night .catalog-toolbar>div:first-child span,.theme-night .split-hero__copy p,.theme-night .news-longread article p{color:var(--night-muted)}
.theme-night .product-price-row strong{color:var(--ink)}
.theme-night .custom-preview{background:var(--night-tile)}
.theme-night .news-row:not(.featured-row){background:var(--night-raised);color:var(--ink)}
.theme-night .news-row small{color:#ff97a1}
.theme-night .primary-button{color:#0c172d;background:var(--signal)}
.theme-night .red-editorial,.theme-night .news-feature,.theme-night .custom-hero-number{background:#a62437;color:#fff}
.theme-night .shop-footer,.theme-night .news-number,.theme-night .matchday,.theme-night .custom-hero,.theme-night .product-buy,.theme-night .city-detail-hero,.theme-night .split-hero__graphic,.theme-night .black-section{background:var(--black)}
.theme-night .split-hero__graphic strong{color:var(--signal)}

/* Night: wide image above a new horizontal wordmark/text composition. */
.page-index.theme-night .match-hero{grid-template-columns:minmax(0,1.24fr) minmax(0,1fr);gap:clamp(1.25rem,3.4vw,3.5rem);padding-top:clamp(1.2rem,3.4vh,2.75rem);}
.page-index.theme-night .match-hero__copy{display:contents}
.page-index.theme-night .match-hero__figure{grid-column:1/-1;grid-row:1;align-self:start}
.page-index.theme-night .match-hero__media{height:clamp(18rem,49vh,38rem)}
.page-index.theme-night .match-hero__media img{object-position:50% 41%}
.page-index.theme-night .field-wordmark{grid-row:2;grid-column:1;align-self:start;margin:0 0 0 -.055em;font-size:clamp(5rem,17vw,19rem)}
.page-index.theme-night .match-hero__body{grid-row:2;grid-column:2;align-self:center;border-left:1px solid var(--line);padding-left:clamp(1rem,3vw,3rem)}
.page-index.theme-night .match-hero__body h1{margin:.4rem 0 .7rem}
.page-index.theme-night .match-hero__note{position:static;margin-top:.55rem;color:var(--night-muted)}
.page-index.theme-night .match-hero p,.page-index.theme-night .field-gallery__intro p,.page-index.theme-night .field-card figcaption>small,.page-index.theme-night .atlas-sideline{color:var(--night-muted)}
.page-index.theme-night .field-card{border-color:var(--line)}
.page-index.theme-night .field-card__media{background:var(--night-tile)}
.page-index.theme-night .city-selector,.page-index.theme-night #official-home,.page-index.theme-night .news-home{background:var(--night-raised);color:var(--ink)}
.page-index.theme-night .city-grid{background:var(--line)}
.page-index.theme-night .city-card{background:var(--night-tile);color:var(--ink)}
.page-index.theme-night .city-card__text span,.page-index.theme-night .city-scene__content p,.page-index.theme-night .city-scene__code,.page-index.theme-night .home-feature-copy p{color:var(--night-muted)}
.page-index.theme-night .city-scene{background:var(--night-tile);color:var(--ink)}
.page-index.theme-night .media-feature,.page-index.theme-night .goods-placeholder{background:var(--night-tile);color:var(--ink);border-color:var(--line)}
.page-index.theme-night .goods-placeholder span,.page-index.theme-night .goods-placeholder small{color:var(--night-muted)}
.page-index.theme-night #supporter-home{background:var(--black)}
.page-index.theme-night .home-feature-copy{color:var(--ink)}
.page-index.theme-night #custom-home{background:#a62437;color:#fff}
.page-index.theme-night .custom-home__stage{background:#641f35}
.page-index.theme-night .custom-home__copy .match-button:hover{color:#fff;background:none}

/* City picker: the existing line expands into the link, not onto adjacent tiles. */
.page-index .city-selector {
  --city-curve:cubic-bezier(.22,.7,.23,1);
  --city-tile:#fff;
  --city-preview-base:#e9e9e1;
}
.page-index.theme-night .city-selector {
  --city-tile:var(--night-tile);
  --city-preview-base:var(--night-tile);
}
.page-index .city-selector .city-card {
  --city-hover-ink:#fff;
  background:var(--city-tile);
  isolation:isolate;
}
.page-index .city-selector .city-card::before {
  height:2px;
  z-index:0;
  transition:height .35s var(--city-curve);
}
.page-index .city-selector .city-card :is(.city-card__code,.city-card__text) { z-index:1; }
.page-index .city-selector .city-card:is(:hover,:focus-visible) {
  transform:none;
  background:var(--city-tile);
}
.page-index .city-selector .city-card:is(.city-card--zhangjiajie,.city-card--yiyang,.city-card--changde,.city-card--chenzhou),
.page-index .city-selector .city-scene:is(.city-scene--zhangjiajie,.city-scene--yiyang,.city-scene--changde,.city-scene--chenzhou) {
  --city-hover-ink:#000;
}
.page-index .city-selector .city-card:focus-visible,
.page-index .city-selector .city-card:focus-visible .city-card__text span {
  color:var(--city-hover-ink);
}
.page-index .city-selector .city-card:focus-visible {
  outline:2px solid currentColor;
  outline-offset:-4px;
}
.page-index .city-selector .city-card:focus-visible::before { height:100%; }
.page-index .city-card__code { justify-self:start; }
.page-index .city-card__text > strong { position:relative; }
@media (hover:hover) and (pointer:fine) {
  .page-index .city-selector .city-card:hover,
  .page-index .city-selector .city-card:hover .city-card__text span { color:var(--city-hover-ink); }
  .page-index .city-selector .city-card:hover::before { height:100%; }
}
@media (prefers-reduced-motion:no-preference) {
  .page-index .city-selector .city-card {
    transition:scale 180ms var(--city-curve),box-shadow 260ms var(--city-curve);
  }
  .page-index .city-card::after {
    content:"";
    position:absolute;
    inset:.58rem .65rem auto auto;
    z-index:1;
    width:1.5rem;
    height:.58rem;
    pointer-events:none;
    background:linear-gradient(115deg,transparent 21%,currentColor 22% 36%,transparent 37% 49%,currentColor 50% 69%,transparent 70%);
    opacity:0;
    transform:translateX(-1.1rem) scaleX(.45);
    transition:transform 330ms var(--city-curve),opacity 210ms ease;
  }
  .page-index .city-card__code { transition:transform 310ms var(--city-curve); }
  .page-index .city-selector .city-card:focus-visible::after {
    opacity:.85;
    transform:none;
  }
  .page-index .city-selector .city-card:active {
    scale:.973;
    box-shadow:inset 0 0 0 1px currentColor;
    transition-duration:90ms;
  }
  .page-index .city-card :is(.city-card__code,.city-card__text > *)::after {
    content:"";
    position:absolute;
    pointer-events:none;
    top:50%;
    left:-.15em;
    width:calc(100% + .75em);
    height:.8em;
    background:
      linear-gradient(90deg,transparent,currentColor) 13% 16% / 37% 1px,
      linear-gradient(90deg,transparent,currentColor) 0 50% / 64% 1px,
      linear-gradient(90deg,transparent,currentColor) 22% 84% / 28% 1px;
    background-repeat:no-repeat;
    opacity:0;
  }
  .page-index .city-card:focus-visible .city-card__code::after {
    animation:city-speed-pass .5s cubic-bezier(.16,.72,.3,1) both;
  }
  @media (hover:hover) and (pointer:fine) {
    .page-index .city-selector .city-card:hover::after {
      opacity:.85;
      transform:none;
    }
    .page-index .city-selector .city-card:hover .city-card__code {
      transform:translateX(.17rem);
    }
    .page-index .city-card :is(.city-card__code,.city-card__text > *):hover::after {
      animation:city-speed-pass .5s cubic-bezier(.16,.72,.3,1) both;
    }
  }
}
@keyframes city-speed-pass {
  0% { opacity:0; transform:translate(-68%,-50%) skewX(-24deg) scaleX(.45); }
  20% { opacity:.75; }
  48% { opacity:.5; }
  100% { opacity:0; transform:translate(86%,-50%) skewX(-24deg) scaleX(1); }
}

/* Keep both scenes painted during the transition, with one fixed surface below. */
.page-index .city-selector .city-preview { background:var(--city-preview-base); isolation:isolate; }
.page-index .city-selector .city-scene {
  z-index:var(--city-preview-layer,1);
  transition:opacity 440ms var(--city-curve) var(--city-preview-fade-wait,100ms),visibility 0ms linear var(--city-preview-delay,540ms);
}
.page-index .city-selector:not(:has(.city-card:focus-visible,.city-card:hover)) .city-scene--changsha {
  --city-preview-rise:0px;
  --city-preview-scale:1;
  --city-preview-delay:0ms;
  --city-preview-fade-wait:0ms;
  --city-preview-layer:2;
}
.page-index .city-preview .city-scene__content > * {
  translate:0 var(--city-preview-rise,10px);
  transition:translate 490ms var(--city-curve);
}
.page-index .city-preview .city-scene__content h3 { transition-duration:550ms; }
.city-mark:is([data-city-number],[data-city-letter]) {
  position:relative;
  overflow:hidden;
  isolation:isolate;
  container-type:inline-size;
}
.city-mark:is([data-city-number],[data-city-letter])::before {
  position:absolute;
  z-index:-1;
  pointer-events:none;
  inset-block-start:51%;
  inset-inline-end:-.015em;
  transform:translate(0,-50%) scale(var(--city-preview-scale,1));
  transform-origin:right center;
  font-family:Arial,Helvetica,sans-serif;
  font-size:clamp(8rem,42vw,37rem);
  font-size:clamp(8rem,82cqi,37rem);
  font-weight:900;
  font-variant-numeric:tabular-nums;
  letter-spacing:-.09em;
  padding-inline-end:.09em;
  line-height:.82;
  color:var(--city-active-ink,var(--city-hover-ink,#fff));
  opacity:.19;
  transition:transform 650ms var(--city-curve);
}
.city-mark[data-city-number]::before { content:attr(data-city-number); }
.page-index .city-mark[data-city-letter]::before {
  content:attr(data-city-letter);
  inset-inline-end:7%;
  transform:translate(calc(var(--city-preview-rise,10px) * -4),-50%) skewX(-12deg) scale(var(--city-preview-scale,1));
  font-size:clamp(8rem,38vw,31rem);
  font-size:clamp(8rem,87cqi,31rem);
  letter-spacing:0;
  opacity:.24;
}
/* Three offset field lines follow the incoming city, below its main mark. */
.page-index .city-mark[data-city-letter]::after {
  content:"";
  position:absolute;
  z-index:-1;
  inset:auto auto 10% 7%;
  width:min(33%,8rem);
  height:.9rem;
  pointer-events:none;
  color:var(--city-hover-ink,#fff);
  background:
    linear-gradient(90deg,transparent,currentColor) 0 0 / 72% 1px,
    linear-gradient(90deg,transparent,currentColor) 100% 50% / 96% 1px,
    linear-gradient(90deg,transparent,currentColor) 24% 100% / 40% 1px;
  background-repeat:no-repeat;
  opacity:clamp(0,calc(1.13 - var(--city-preview-scale,1.04) * .75),.4);
  transform:translateX(calc(var(--city-preview-rise,10px) * -8)) skewX(-22deg);
  transition:transform 560ms var(--city-curve) 35ms,opacity 410ms ease;
}
.page-index .city-preview .city-mark strong {
  color:var(--city-hover-ink,#fff);
  translate:0 var(--city-preview-rise,10px);
  transition:translate 525ms var(--city-curve);
}
@media (prefers-reduced-motion:reduce) {
  .page-index .city-selector .city-scene { transition:none!important; }
  .page-index .city-preview .city-mark[data-city-letter]::before { transform:translateY(-50%) skewX(-12deg); }
  .page-index .city-preview .city-mark[data-city-letter]::after { transform:skewX(-22deg); }
  .page-index .city-preview .city-mark[data-city-letter]::before,
  .page-index .city-preview .city-mark[data-city-letter]::after,
  .page-index .city-preview :is(.city-mark strong,.city-scene__content > *) { transition:none; }
}

/* City identity: original team palette in Day, darker and less saturated in Night. */
.page-city :is(.city-detail-panel,.city-index a) {
  --city-active:var(--city);
  --city-active-ink:var(--city-day-ink,#fff);
}
.page-city.theme-night :is(.city-detail-panel,.city-index a) {
  --city-active:var(--city-night,var(--city));
  --city-active-ink:#fff;
}
.page-city .city-index a { border-bottom-color:var(--city-active); }
.page-city .city-detail-panel .city-detail-hero {
  background:var(--city-active);
  color:var(--city-active-ink);
}
.page-city .city-detail-hero :is(.city-detail-code,.city-detail-code span,p) {
  color:var(--city-active-ink);
}
.page-city .city-detail-hero .city-mark {
  border-inline-start:1px solid color-mix(in srgb,var(--city-active-ink) 22%,transparent);
  background:var(--city-active);
}
.page-city .city-detail-hero .city-mark strong { color:var(--city-active-ink);text-shadow:none; }
.page-city .city-kits-heading .section-label {
  color:var(--ink);
  border-inline-start:.45rem solid var(--city-active);
  padding-inline-start:.6rem;
}
.page-city .city-bottom .dark-button {
  background:var(--city-active);
  color:var(--city-active-ink);
  border-color:var(--city-active);
}
.page-city .city-bottom .dark-button:hover { text-decoration:underline;text-underline-offset:.2em; }

@media(min-width:1001px){
 .page-index.theme-night .shop-header{grid-template-columns:1fr auto auto;align-items:start;padding-block:.7rem}
 .page-index.theme-night .shop-nav{display:grid;grid-template-columns:repeat(2,auto);gap:.12rem 1rem}
 .page-index.theme-night .shop-nav a{padding:.15rem 0;line-height:1.2}
 .page-index.theme-night .shop-nav a::after{bottom:0}
}
@media(max-width:1000px){
 .page-index .shop-header{grid-template-columns:1fr auto auto}
 .page-index.theme-night .match-hero__media{height:clamp(17rem,55vw,29rem)}
}
@media(max-width:760px){
 .page-index:not(.theme-night) .match-hero,.page-index.theme-night .match-hero{grid-template-columns:minmax(0,1fr)}
 .page-index:not(.theme-night) .match-hero__figure{width:100%}
 .page-index:not(.theme-night) .match-hero__media{height:clamp(20rem,85vw,32rem)}
 .page-index.theme-night .match-hero__figure,.page-index.theme-night .field-wordmark,.page-index.theme-night .match-hero__body{grid-column:1;grid-row:auto}
 .page-index.theme-night .field-wordmark{font-size:clamp(5rem,23vw,10rem)}
 .page-index.theme-night .match-hero__body{border-left:0;padding-left:0}
 .page-index:not(.theme-night) .field-card figcaption{grid-template-columns:1fr}
 .edition-switch a{padding:.3rem .42rem;font-size:.73rem}
}
@media(max-width:390px){.page-index .shop-header{gap:.35rem}.page-index .shop-logo span{display:none}}

/* Browser-managed snapshots: same-origin navigation, no runtime scripts. */
@view-transition { navigation:auto; }
@media(prefers-reduced-motion:no-preference){
 body:not(.page-start) main{animation:edition-arrive .38s var(--edition-ease) both}
 html:active-view-transition body main{animation:none}
 .page-index .field-wordmark{view-transition-name:hnfl-wordmark}
 .page-index .match-hero__figure{view-transition-name:hnfl-image}
 ::view-transition-group(*){animation-duration:.48s;animation-timing-function:var(--edition-ease)}
 ::view-transition-image-pair(root){isolation:isolate}
 ::view-transition-old(root){animation:edition-leave .4s var(--edition-ease) both;mix-blend-mode:normal}
 ::view-transition-new(root){animation:edition-arrive .48s var(--edition-ease) both;mix-blend-mode:normal}
}
@keyframes edition-leave{from{opacity:1;transform:none}to{opacity:0;transform:translateY(-6px)}}
@keyframes edition-arrive{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}
@media(prefers-reduced-motion:reduce){
 @view-transition {navigation:none}
 ::view-transition-group(*),::view-transition-old(*),::view-transition-new(*){animation:none!important}
}
